diff -Nru qt5-ukui-platformtheme-4.1.0.0/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,8 @@ +project(qt5-ukui) +add_subdirectory(ukui-styles) +add_subdirectory(libqt5-ukui-style) +add_subdirectory(qt5-ukui-filedialog) +add_subdirectory(qt5-ukui-platformtheme) +#add_subdirectory(ukui-qqc2-style) +#add_subdirectory(ukui-qml-style-helper) +add_subdirectory(test) diff -Nru qt5-ukui-platformtheme-4.1.0.0/README.md qt5-ukui-platformtheme-4.10.0.1/README.md --- qt5-ukui-platformtheme-4.1.0.0/README.md 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/README.md 2024-12-20 09:22:49.000000000 +0800 @@ -1,9 +1,15 @@ # qt5-ukui-platformtheme - - 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 @@ 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 -Nru qt5-ukui-platformtheme-4.1.0.0/debian/changelog qt5-ukui-platformtheme-4.10.0.1/debian/changelog --- qt5-ukui-platformtheme-4.1.0.0/debian/changelog 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/changelog 2025-02-28 09:39:53.000000000 +0800 @@ -1,3 +1,56 @@ +qt5-ukui-platformtheme (4.10.0.1-ok0.4) huanghe; urgency=medium + + * 改动: + BUG号:无 + 需求号:无 + 其他改动:新增V11主题,主题框架适配 + 单选按钮与复选框动画实现 + 文件对话框ok2上BUG同步修复 + 影响域:无 + + -- xibowen <xibowen@kylinos.cn> Fri, 28 Feb 2025 09:39:53 +0800 + +qt5-ukui-platformtheme (4.10.0.1-ok0.3) huanghe; urgency=medium + + * 改动: + BUG号:#311175 开始菜单点击“系统监视器”无法打开,命令行打开报错 + 需求号:无 + 其他改动:无 + 影响域:无 + + -- xibowen <xibowen@kylinos.cn> Fri, 23 Dec 2024 09:39:53 +0800 + +qt5-ukui-platformtheme (4.10.0.1-ok0.2) huanghe; urgency=medium + + * 改动: + BUG号:无 + 需求号:无 + 其他改动:添加libkysdk-qtwidgets-dev编译依赖,解决编译问题 + 影响域:主题框架编译 + + -- xibowen <xibowen@kylinos.cn> Wed, 20 Dec 2024 15:28:53 +0800 + +qt5-ukui-platformtheme (4.10.0.1-ok0.1) huanghe; urgency=medium + + * 改动: + BUG号:无 + 需求号:无 + 其他改动:添加dt框架配置 + 影响域:主题框架绘制 + + -- xibowen <xibowen@kylinos.cn> Wed, 18 Dec 2024 15:28:53 +0800 + +qt5-ukui-platformtheme (4.1.0.0-ok51) nile; urgency=medium + + * 改动: + BUG号:无 + 需求号:无 + 其他改动:修改文字布局规范,中英文从左到右,维哈柯从右到左 + 主题框架添加跳过UKUI主题接口 + 影响域:维哈柯字体显示方向 + + -- xibowen <xibowen@kylinos.cn> Thu, 29 Aug 2024 10:33:53 +0800 + qt5-ukui-platformtheme (4.1.0.0-ok50) nile; urgency=medium * 改动: diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/control qt5-ukui-platformtheme-4.10.0.1/debian/control --- qt5-ukui-platformtheme-4.1.0.0/debian/control 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/control 2025-02-28 09:39:53.000000000 +0800 @@ -16,10 +16,10 @@ libkf5windowsystem-dev, libkysdk-conf2-dev, libkysdk-waylandhelper-dev, + libkysdk-qtwidgets-dev, libpeony-dev, libqt5svg5-dev, libqt5x11extras5-dev, - libqt5xdgiconloader-dev, peony, pkg-config, pkg-kde-tools, @@ -42,7 +42,6 @@ Package: qt5-ukui-platformtheme Architecture: any Depends: libqt5-ukui-style1 (= ${binary:Version}), - libqt5xdgiconloader3, qml-module-org-ukui-qqc2desktopstyle (= ${binary:Version}), qml-module-org-ukui-stylehelper (= ${binary:Version}), qt5-styles-ukui (= ${binary:Version}), diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0001-.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0001-.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0001-.patch 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0001-.patch 2025-02-28 09:39:53.000000000 +0800 @@ -0,0 +1,62 @@ +From: =?utf-8?b?6LCt6Z2Z?= <tanjing@kylinos.cn> +Date: Mon, 23 Dec 2024 10:53:24 +0800 +Subject: =?utf-8?b?5L+u5pS55a+56K+d5qGG5omT5byA5bSp5rqD55qE6Zeu6aKY?= + +--- + qt5-ukui-filedialog/sidebar.cpp | 2 ++ + qt5-ukui-platformtheme/CMakeLists.txt | 3 ++- + qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp | 2 -- + 3 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/qt5-ukui-filedialog/sidebar.cpp b/qt5-ukui-filedialog/sidebar.cpp +index 47ecfaf..4bab99b 100644 +--- a/qt5-ukui-filedialog/sidebar.cpp ++++ b/qt5-ukui-filedialog/sidebar.cpp +@@ -74,6 +74,8 @@ FileDialogSideBar::FileDialogSideBar(QWidget *parent) : QTreeView(parent) + setSortingEnabled(true); + + setProperty("useIconHighlightEffect", true); ++ setProperty("highlightMode", true); ++ + setDragDropMode(QTreeView::NoDragDrop); + setProperty("doNotBlur", true); + viewport()->setProperty("doNotBlur", true); +diff --git a/qt5-ukui-platformtheme/CMakeLists.txt b/qt5-ukui-platformtheme/CMakeLists.txt +index 2041b41..469332f 100644 +--- a/qt5-ukui-platformtheme/CMakeLists.txt ++++ b/qt5-ukui-platformtheme/CMakeLists.txt +@@ -164,12 +164,13 @@ add_definitions(-DQT5UKUIPLATFORMTHEME_LIBRARY) + add_definitions(-DQT_DEPRECATED_WARNINGS) + add_definitions(-DQT_MESSAGELOGCONTEXT) + ++set(TARGET_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/qt5/plugins") ++ + set(UKUIPLATFORMTHEME_DIR ${TARGET_PATH}) + target_compile_definitions(${PROJECT_NAME} PRIVATE UKUIPLATFORMTHEME_DIR="${UKUIPLATFORMTHEME_DIR}") + + message("DUKUIPLATFORMTHEME_DIR path: ${UKUIPLATFORMTHEME_DIR}") + if(UNIX) +- set(TARGET_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/qt5/plugins") + + MESSAGE("libqt5-ukui-platformtheme TARGET_PATH: ${TARGET_PATH}") + +diff --git a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp +index 7959da5..7898f6e 100644 +--- a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp ++++ b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp +@@ -189,7 +189,6 @@ Qt5UKUIPlatformTheme::Qt5UKUIPlatformTheme(const QStringList &args) + QString path = QString::fromUtf8(c); + if (QFile::exists(QString("%1/platformthemes/libqt5-ukui-filedialog.so").arg(path))) { + m_loader = new QPluginLoader(QString("%1/platformthemes/libqt5-ukui-filedialog.so").arg(path)); +- qDebug() << "m_loader....." << m_loader; + } + } + +@@ -325,7 +324,6 @@ QPlatformDialogHelper *Qt5UKUIPlatformTheme::createPlatformDialogHelper(DialogTy + { + switch (type) { + case QPlatformTheme::FileDialog: +- qDebug() << "QPlatformDialogHelper" << m_loader << m_loader->instance(); + + if (m_loader && m_loader->instance()) { + return qobject_cast<FileDialogInterface *>(m_loader->instance())->create(); diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0001-Add-a-changelog-2023.09.01-4.1.0.0-0k1.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0001-Add-a-changelog-2023.09.01-4.1.0.0-0k1.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0001-Add-a-changelog-2023.09.01-4.1.0.0-0k1.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0001-Add-a-changelog-2023.09.01-4.1.0.0-0k1.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,99 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Fri, 1 Sep 2023 11:32:08 +0800 -Subject: Add a changelog 2023.09.01 4.1.0.0-0k1 - ---- - .../widget/filedialog/kyfiledialog.cpp | 55 +++++++--------------- - 1 file changed, 18 insertions(+), 37 deletions(-) - -diff --git a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -index d80931b..3d90575 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -+++ b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -@@ -123,9 +123,9 @@ KyNativeFileDialog::KyNativeFileDialog(QWidget *parent) - setShortCuts(); - }); - -- connect(getCurrentPage(), &Peony::DirectoryViewContainer::directoryChanged, this, [=](){ -- updateSearchProgressBar(); -- }); -+// connect(getCurrentPage(), &Peony::DirectoryViewContainer::directoryChanged, this, [=](){ -+// updateSearchProgressBar(); -+// }); - connect(getCurrentPage(), &Peony::DirectoryViewContainer::viewDoubleClicked, this, [=](const QString &uri){ - auto info = Peony::FileInfo::fromUri(uri); - pDebug << "viewDoubleClicked....." << uri << info->isDir() << info->isVolume(); -@@ -185,42 +185,23 @@ KyNativeFileDialog::KyNativeFileDialog(QWidget *parent) - forceStopLoading(); - pDebug << "key is null m_lastSearchPath:" << m_lastSearchPath; - m_isClearSearchKey = true; -- m_needSearch = false; -+// m_needSearch = false; - goToUri(m_lastSearchPath, true); - -- QCursor c; -- c.setShape(Qt::ArrowCursor); -- this->setCursor(c); -- getCurrentPage()->getView()->setCursor(c); -- mKyFileDialogUi->m_sider->setCursor(c); -+// QCursor c; -+// c.setShape(Qt::ArrowCursor); -+// this->setCursor(c); -+// getCurrentPage()->getView()->setCursor(c); -+// mKyFileDialogUi->m_sider->setCursor(c); - - } - else - { -- bool isSearchEngine = true; -- const QByteArray id(UKUI_SEARCH_SCHEMAS); -- if (QGSettings::isSchemaInstalled(id)) { -- QGSettings *searchSettings = new QGSettings(id, QByteArray(), this); -- if (!searchSettings || !searchSettings->keys().contains(SEARCH_METHOD_KEY)) { -- isSearchEngine = false; -- } -- } else { -- isSearchEngine = false; -- } -- - auto targetUri = Peony::SearchVFSUriParser::parseSearchKey(path, key, true, false, "", true); -- targetUri = Peony::SearchVFSUriParser::addSearchKey(targetUri, isSearchEngine); - pDebug << "updateSearch targetUri:" <<targetUri; - pDebug << "updateSearch path:" <<path; -- m_needSearch = true; - goToUri(targetUri, true); - -- QCursor c; -- c.setShape(Qt::BusyCursor); -- this->setCursor(c); -- getCurrentPage()->getView()->setCursor(c); -- mKyFileDialogUi->m_sider->setCursor(c); -- - } - }); - -@@ -2494,15 +2475,15 @@ void KyNativeFileDialog::updateTableModel(bool tableModel) - - void KyNativeFileDialog::updateSearchProgressBar() - { -- if(m_needSearch){ -- pDebug << "updateSearchProgressBar...." << m_searchMode << m_needSearch; -- Q_EMIT mKyFileDialogUi->m_pathbar->updateSearchProgress(false); -- QCursor c; -- c.setShape(Qt::ArrowCursor); -- this->setCursor(c); -- getCurrentPage()->getView()->setCursor(c); -- mKyFileDialogUi->m_sider->setCursor(c); -- } -+// if(m_needSearch){ -+// pDebug << "updateSearchProgressBar...." << m_searchMode << m_needSearch; -+// Q_EMIT mKyFileDialogUi->m_pathbar->updateSearchProgress(false); -+// QCursor c; -+// c.setShape(Qt::ArrowCursor); -+// this->setCursor(c); -+// getCurrentPage()->getView()->setCursor(c); -+// mKyFileDialogUi->m_sider->setCursor(c); -+// } - } - - KyFileDialogHelper::KyFileDialogHelper() : QPlatformFileDialogHelper(), mKyFileDialog(new KyNativeFileDialog) diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0002-Update-changelog-2024.12.23-4.10.0.1-ok0.3.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0002-Update-changelog-2024.12.23-4.10.0.1-ok0.3.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0002-Update-changelog-2024.12.23-4.10.0.1-ok0.3.patch 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0002-Update-changelog-2024.12.23-4.10.0.1-ok0.3.patch 2025-02-28 09:39:53.000000000 +0800 @@ -0,0 +1,104 @@ +From: xibowen <xibowen@kylinos.cn> +Date: Mon, 23 Dec 2024 09:39:46 +0800 +Subject: Update changelog 2024.12.23 4.10.0.1-ok0.3 + +--- + .../qt5-config-style-ukui/ukui-config-style.cpp | 65 ++++++++++++---------- + 1 file changed, 35 insertions(+), 30 deletions(-) + +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 8e8c344..adcb917 100644 +--- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp ++++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp +@@ -5893,18 +5893,24 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp + bool reverse = (!vertical && (pb->direction == Qt::RightToLeft)) || vertical; + if (inverted) + reverse = !reverse; ++ QBrush brush; + +- QLinearGradient linearGradient; +- if(vertical){ +- linearGradient.setStart(pb->rect.bottomRight()); +- linearGradient.setFinalStop(pb->rect.topLeft()); +- } +- else{ +- linearGradient.setStart(pb->rect.topLeft()); +- linearGradient.setFinalStop(pb->rect.bottomRight()); ++ if (sp->m_ProgressBarParameters.progressBarContentBrush.style() == Qt::LinearGradientPattern) { ++ QLinearGradient linearGradient; ++ if(vertical){ ++ linearGradient.setStart(pb->rect.bottomRight()); ++ linearGradient.setFinalStop(pb->rect.topLeft()); ++ } ++ else{ ++ linearGradient.setStart(pb->rect.topLeft()); ++ linearGradient.setFinalStop(pb->rect.bottomRight()); ++ } ++ linearGradient.setStops(sp->m_ProgressBarParameters.progressBarContentBrush.gradient()->stops()); ++ brush = QBrush(linearGradient); ++ } else { ++ brush = sp->m_ProgressBarParameters.progressBarContentBrush; + } +- linearGradient.setStops(sp->m_ProgressBarParameters.progressBarContentBrush.gradient()->stops()); +- QBrush brush(linearGradient); ++ + + if (QVariantAnimation *animation = m_animation_helper->animation(option->styleObject)) { + if(animation->state() == QAbstractAnimation::Running){ +@@ -5912,37 +5918,36 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp + if(!forward) + reverse = !reverse; + +- linearGradient.setStops(sp->m_ProgressBarParameters.progressBarContentBrush.gradient()->stops()); +- if (vertical) { +- if (reverse) { +- linearGradient.setStart(pb->rect.bottomLeft()); +- linearGradient.setFinalStop(pb->rect.topLeft()); +- } else { +- linearGradient.setStart(pb->rect.topLeft()); +- linearGradient.setFinalStop(pb->rect.bottomLeft()); +- } +- } else { +- if (reverse) { +- linearGradient.setStart(pb->rect.topRight()); +- linearGradient.setFinalStop(pb->rect.topLeft()); ++ if (sp->m_ProgressBarParameters.progressBarContentBrush.style() == Qt::LinearGradientPattern) { ++ QLinearGradient linearGradient; ++ linearGradient.setStops(sp->m_ProgressBarParameters.progressBarContentBrush.gradient()->stops()); ++ if (vertical) { ++ if (reverse) { ++ linearGradient.setStart(pb->rect.bottomLeft()); ++ linearGradient.setFinalStop(pb->rect.topLeft()); ++ } else { ++ linearGradient.setStart(pb->rect.topLeft()); ++ linearGradient.setFinalStop(pb->rect.bottomLeft()); ++ } + } else { +- linearGradient.setStart(pb->rect.topLeft()); +- linearGradient.setFinalStop(pb->rect.topRight()); ++ if (reverse) { ++ linearGradient.setStart(pb->rect.topRight()); ++ linearGradient.setFinalStop(pb->rect.topLeft()); ++ } else { ++ linearGradient.setStart(pb->rect.topLeft()); ++ linearGradient.setFinalStop(pb->rect.topRight()); ++ } + } ++ brush = QBrush(linearGradient); + } +- +- brush = QBrush(linearGradient); + } + } + +- + painter->save(); + painter->setRenderHint(QPainter::Antialiasing, sp->m_ProgressBarParameters.radius != 0); + QColor penColor = sp->m_ProgressBarParameters.progressBarContentPen.color(); + int width = (penColor.alpha() == 0 || penColor == Qt::NoPen) ? 0 : sp->m_ProgressBarParameters.progressBarContentPen.width(); + painter->setPen(width > 0 ? sp->m_ProgressBarParameters.progressBarContentPen : Qt::NoPen); +- // if(width == 1 && sp->m_ProgressBarParameters.radius != 0) +- // painter->translate(0.5, 0.5); + painter->setBrush(brush); + + width = (sp->m_ProgressBarParameters.progressBarGrooveDefaultPen.color().alpha() == 0 || sp->m_ProgressBarParameters.progressBarGrooveDefaultPen.color() == Qt::NoPen) ? diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0002-update-changelog.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0002-update-changelog.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0002-update-changelog.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0002-update-changelog.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,38 +0,0 @@ -From: Yue-Lan <lanyue@kylinos.cn> -Date: Tue, 5 Sep 2023 10:59:15 +0800 -Subject: update changelog. - ---- - ukui-styles/proxy-style/window-manager.cpp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/ukui-styles/proxy-style/window-manager.cpp b/ukui-styles/proxy-style/window-manager.cpp -index 4d3fa88..c6578ec 100644 ---- a/ukui-styles/proxy-style/window-manager.cpp -+++ b/ukui-styles/proxy-style/window-manager.cpp -@@ -191,13 +191,13 @@ void WindowManager::mouseMoveEvent(QObject *obj, QMouseEvent *e) - if (!m_prepared_to_drag) - return; - -+ if (m_is_dragging) -+ return; -+ - QWidget *w = qobject_cast<QWidget*>(obj); - const QPoint native = e->globalPos(); - qreal dpiRatio = qApp->devicePixelRatio(); - if (QX11Info::isPlatformX11()) { -- if (m_is_dragging) -- return; -- - // qDebug()<<"x11 move start"; - auto connection = QX11Info::connection(); - xcb_ungrab_pointer(connection, XCB_TIME_CURRENT_TIME); -@@ -250,7 +250,7 @@ void WindowManager::mouseMoveEvent(QObject *obj, QMouseEvent *e) - return; - shellSurface->requestMove(m_seat, m_serial); - #endif -- -+ m_is_dragging = true; - } - - return; diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0003-Add-a-changelog-2023.10.08-4.1.0.0-0k3.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0003-Add-a-changelog-2023.10.08-4.1.0.0-0k3.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0003-Add-a-changelog-2023.10.08-4.1.0.0-0k3.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0003-Add-a-changelog-2023.10.08-4.1.0.0-0k3.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,2153 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Sun, 8 Oct 2023 10:24:01 +0800 -Subject: Add a changelog 2023.10.08 4.1.0.0-0k3 - ---- - ukui-styles/proxy-style/blur-helper.cpp | 346 ----------------------- - ukui-styles/proxy-style/blur-helper.h | 71 ----- - ukui-styles/proxy-style/gesture-helper.cpp | 371 ------------------------- - ukui-styles/proxy-style/gesture-helper.h | 83 ------ - ukui-styles/proxy-style/proxy-style-plugin.cpp | 246 ---------------- - ukui-styles/proxy-style/proxy-style-plugin.h | 55 ---- - ukui-styles/proxy-style/proxy-style.cpp | 285 ------------------- - ukui-styles/proxy-style/proxy-style.h | 84 ------ - ukui-styles/proxy-style/proxy-style.pro | 53 ---- - ukui-styles/proxy-style/proxy-style_global.h | 34 --- - ukui-styles/proxy-style/ukui-style.json | 3 - - ukui-styles/proxy-style/window-manager.cpp | 314 --------------------- - ukui-styles/proxy-style/window-manager.h | 97 ------- - 13 files changed, 2042 deletions(-) - delete mode 100644 ukui-styles/proxy-style/blur-helper.cpp - delete mode 100644 ukui-styles/proxy-style/blur-helper.h - delete mode 100644 ukui-styles/proxy-style/gesture-helper.cpp - delete mode 100644 ukui-styles/proxy-style/gesture-helper.h - delete mode 100644 ukui-styles/proxy-style/proxy-style-plugin.cpp - delete mode 100644 ukui-styles/proxy-style/proxy-style-plugin.h - delete mode 100644 ukui-styles/proxy-style/proxy-style.cpp - delete mode 100644 ukui-styles/proxy-style/proxy-style.h - delete mode 100644 ukui-styles/proxy-style/proxy-style.pro - delete mode 100644 ukui-styles/proxy-style/proxy-style_global.h - delete mode 100644 ukui-styles/proxy-style/ukui-style.json - delete mode 100644 ukui-styles/proxy-style/window-manager.cpp - delete mode 100644 ukui-styles/proxy-style/window-manager.h - -diff --git a/ukui-styles/proxy-style/blur-helper.cpp b/ukui-styles/proxy-style/blur-helper.cpp -deleted file mode 100644 -index a8f18e1..0000000 ---- a/ukui-styles/proxy-style/blur-helper.cpp -+++ /dev/null -@@ -1,346 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "blur-helper.h" --#include "ukui-style-settings.h" --#include <QWidget> --#include <KWindowEffects> --#include <QGSettings> --#include <QVariant> --#include <QEvent> --#include <QIcon> --#include <QPainterPath> -- --#include <QMenu> -- --#include "black-list.h" -- --#include <QApplication> --#include <QX11Info> -- --#include <QDebug> -- --BlurHelper::BlurHelper(QObject *parent) : QObject(parent) --{ -- if (QGSettings::isSchemaInstalled("org.ukui.control-center.personalise")) { -- QGSettings *settings = new QGSettings("org.ukui.control-center.personalise", QByteArray(), this); -- connect(settings, &QGSettings::changed, this, [=](const QString &key) { -- if (key == "effect") { -- bool enable = settings->get(key).toBool(); -- this->onBlurEnableChanged(enable); -- } -- }); -- bool enable = settings->get("effect").toBool(); -- this->onBlurEnableChanged(enable); -- -- if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind)) -- confirmBlurEnableDelay(); -- } -- m_timer.setSingleShot(true); -- m_timer.setInterval(100); --} -- --bool BlurHelper::eventFilter(QObject *obj, QEvent *e) --{ -- if (!m_blur_enable) -- return false; -- -- QWidget* widget = qobject_cast<QWidget*>(obj); -- -- if (!widget || !widget->isWindow()) -- return false; -- -- //FIXME: -- //qDebug()<<e->type()<<obj; -- //qDebug()<<KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind); -- switch (e->type()) { -- case QEvent::UpdateRequest: { -- //QWidget* widget = qobject_cast<QWidget*>(obj); -- delayUpdate(widget, true); -- break; -- } -- case QEvent::LayoutRequest: -- { -- //QWidget* widget = qobject_cast<QWidget*>(obj); -- delayUpdate(widget); -- break; -- } -- case QEvent::Hide: { -- //QWidget* widget = qobject_cast<QWidget*>(obj); -- KWindowEffects::enableBlurBehind(widget->winId(), false); -- } -- -- default: -- break; -- } -- return false; --} -- --/*! -- * \brief BlurHelper::registerWidget -- * \param widget -- * \note -- * -- * we can't blur a widget before it shown, because some times -- * there might be problems about window painting. -- * this usually happend on a widget which has graphics effect. -- * -- * to avoid them, never try get winid and do a blur for that case. -- */ --#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) --void BlurHelper::registerWidget(QWidget *widget) --{ -- // FIXME: how to blur window on wayland? -- if (!QX11Info::isPlatformX11()) -- return; -- -- if (!widget) -- return; -- -- if (shouldSkip(widget)) -- return; -- if (isApplicationInBlackList()) -- return; -- if (widget->property("doNotBlur").toBool()) -- return; -- if (!m_blur_widgets.contains(widget)) { -- m_blur_widgets<<widget; -- //qDebug()<<KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind); -- /*! -- \note -- never try enableBlurBehind when register widget. -- it might cause serious problems about paint. -- usually it happend with a widget which has graphics effect. -- */ --// if (!widget->mask().isEmpty()) { --// KWindowEffects::enableBlurBehind(widget->winId(), true, widget->mask()); --// } else { --// KWindowEffects::enableBlurBehind(widget->winId(), true); --// } -- -- connect(widget, &QWidget::destroyed, this, [=]() { -- this->onWidgetDestroyed(widget); -- }); -- } -- widget->removeEventFilter(this); -- widget->installEventFilter(this); -- -- if (!widget->mask().isEmpty()) { -- widget->update(widget->mask()); -- } else { -- widget->update(); -- } --} -- --void BlurHelper::unregisterWidget(QWidget *widget) --{ -- if (!QX11Info::isPlatformX11()) -- return; -- -- if (!widget) -- return; -- -- if (shouldSkip(widget)) -- return; -- if (isApplicationInBlackList()) -- return; -- if (widget->property("doNotBlur").toBool()) -- return; -- m_blur_widgets.removeOne(widget); -- widget->removeEventFilter(this); -- if (widget->winId() > 0) -- KWindowEffects::enableBlurBehind(widget->winId(), false); --} --#endif -- --bool BlurHelper::isApplicationInBlackList() --{ -- return blackList().contains(qAppName()); --} -- --const QStringList BlurHelper::blackList() --{ -- return blackAppListWithBlurHelper(); --} -- --bool BlurHelper::shouldSkip(QWidget *w) --{ -- if (w->property("useSystemStyleBlur").isValid()) { -- return !w->property("useSystemStyleBlur").toBool(); -- } -- -- bool skip = true; -- if (w->inherits("QComboBoxPrivateContainer")) -- return true; -- -- if (w->inherits("QMenu") || w->inherits("QTipLabel")) { -- return false; -- } -- --// if (w->inherits("QTipLabel")) --// return true; -- -- return skip; --} -- --void BlurHelper::onBlurEnableChanged(bool enable) --{ -- m_blur_enable = enable; -- -- if (enable) { -- qApp->setProperty("blurEnable", true); -- } else { -- qApp->setProperty("blurEnable", false); -- } -- -- if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind)) -- return; -- -- for (auto widget : qApp->allWidgets()) { -- widget->update(); -- if (m_blur_widgets.contains(widget)) { -- if (widget->winId() > 0) { -- KWindowEffects::enableBlurBehind(widget->winId(), enable); -- } -- } -- } --// QTimer::singleShot(100, this, [=](){ --// for (auto widget : m_blur_widgets) { --// if (!widget) --// continue; --// if (widget->winId() > 0) --// KWindowEffects::enableBlurBehind(widget->winId(), enable); --// } --// }); --} -- --void BlurHelper::onWidgetDestroyed(QWidget *widget) --{ -- widget->removeEventFilter(this); -- m_blur_widgets.removeOne(widget); -- //unregisterWidget(widget); --} -- --void BlurHelper::delayUpdate(QWidget *w, bool updateBlurRegionOnly) --{ -- if (w->winId() <= 0) -- return; -- -- if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind)) -- return; -- -- m_update_list.append(w); -- if (!m_timer.isActive()) { -- for (auto widget : m_update_list) { -- // cast to widget and check -- //KWindowEffects::enableBlurBehind(widget->winId(), false); -- -- if (!widget) -- continue; -- -- if (widget->winId() <= 0) -- continue; -- -- bool hasMask = false; -- if (widget->mask().isNull()) -- hasMask = true; -- -- QVariant regionValue = widget->property("blurRegion"); -- QRegion region = qvariant_cast<QRegion>(regionValue); -- -- if (widget->inherits("QMenu")) { -- //skip menu which has style sheet. -- if (!widget->styleSheet().isEmpty() || qApp->styleSheet().contains("QMenu")) { -- break; -- } -- QPainterPath path; -- path.addRoundedRect(widget->rect().adjusted(+2,+8,-2,-8), 8, 8); -- KWindowEffects::enableBlurBehind(widget->winId(), true, path.toFillPolygon().toPolygon()); -- if (!updateBlurRegionOnly) -- widget->update(); -- break; -- } -- -- if (widget->inherits("QTipLabel")) { -- QPainterPath path; -- path.addRoundedRect(widget->rect().adjusted(+3,+3,-3,-3), 6, 6); -- KWindowEffects::enableBlurBehind(widget->winId(), true, path.toFillPolygon().toPolygon()); -- if (!updateBlurRegionOnly) -- widget->update(); -- break; -- } -- -- if (!hasMask && region.isEmpty()) -- break; -- -- //qDebug()<<regionValue<<region; -- //qDebug()<<widget->metaObject()->className()<<widget->geometry()<<widget->mask(); -- if (!region.isEmpty()) { -- //qDebug()<<"blur region"<<region; -- KWindowEffects::enableBlurBehind(widget->winId(), true, region); -- if (!updateBlurRegionOnly) -- widget->update(); -- } else { -- //qDebug()<<widget->mask(); -- KWindowEffects::enableBlurBehind(widget->winId(), true, widget->mask()); -- if (!updateBlurRegionOnly) -- widget->update(widget->mask()); -- } -- -- //NOTE: we can not setAttribute Qt::WA_TranslucentBackground here, -- //because the window is about to be shown. -- //widget->setAttribute(Qt::WA_TranslucentBackground); -- //KWindowEffects::enableBlurBehind(widget->winId(), true); -- //widget->update(); -- } -- m_update_list.clear(); -- } else { -- m_timer.start(); -- } --} -- --void BlurHelper::confirmBlurEnableDelay() --{ -- QTimer::singleShot(3000, this, [=]() { -- bool enable = m_blur_enable; -- if (enable) { -- qApp->setProperty("blurEnable", true); -- } else { -- qApp->setProperty("blurEnable", false); -- } -- for (auto widget : qApp->allWidgets()) { -- widget->update(); -- if (m_blur_widgets.contains(widget)) { -- if (widget->winId() > 0) -- KWindowEffects::enableBlurBehind(widget->winId(), enable); -- } -- } --// QTimer::singleShot(100, this, [=](){ --// for (auto widget : m_blur_widgets) { --// if (!widget) --// continue; --// if (widget->winId() > 0) --// KWindowEffects::enableBlurBehind(widget->winId(), enable); --// } --// }); -- }); --} -diff --git a/ukui-styles/proxy-style/blur-helper.h b/ukui-styles/proxy-style/blur-helper.h -deleted file mode 100644 -index 7e07d26..0000000 ---- a/ukui-styles/proxy-style/blur-helper.h -+++ /dev/null -@@ -1,71 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef BLURHELPER_H --#define BLURHELPER_H -- --#include <QObject> --#include <QTimer> -- --class BlurHelper : public QObject --{ -- Q_OBJECT --public: -- explicit BlurHelper(QObject *parent = nullptr); -- -- bool eventFilter(QObject *obj, QEvent *e); -- void registerWidget(QWidget *widget); -- void unregisterWidget(QWidget *widget); -- -- bool isApplicationInBlackList(); -- const QStringList blackList(); -- -- bool shouldSkip(QWidget *w); -- --signals: -- --public slots: -- void onBlurEnableChanged(bool enable); -- void onWidgetDestroyed(QWidget *widget); -- void delayUpdate(QWidget *w, bool updateBlurRegionOnly = false); -- --protected: -- /*! -- * \brief confirmBlurEnableDelay -- * \note -- * some application start before kwin, such as peony-qt-desktop. -- * we have to ensure that the blurEnable protocol not effected by -- * the case. Delay a while and check it again is a normally way to -- * confirm. -- */ -- void confirmBlurEnableDelay(); -- --private: -- QList<QWidget *> m_blur_widgets; -- -- QList<QWidget *> m_update_list; -- QTimer m_timer; -- -- bool m_blur_enable = true; --}; -- --#endif // BLURHELPER_H -diff --git a/ukui-styles/proxy-style/gesture-helper.cpp b/ukui-styles/proxy-style/gesture-helper.cpp -deleted file mode 100644 -index 74e5143..0000000 ---- a/ukui-styles/proxy-style/gesture-helper.cpp -+++ /dev/null -@@ -1,371 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "gesture-helper.h" --#include "ukui-two-finger-slide-gesture.h" --#include "ukui-two-finger-zoom-gesture.h" -- --#include <QWidget> --#include <QGestureEvent> --#include <QTapAndHoldGesture> -- --#include <QContextMenuEvent> -- --#include <QApplication> --#include <QMenu> -- --#include <QTouchEvent> -- --#include <QScroller> --#include <QMouseEvent> -- --#include <QAbstractItemView> --#include <QItemSelectionModel> -- --#include <QScroller> -- --#include <QWheelEvent> -- --#include <QtMath> -- --#include <QDebug> -- --GestureHelper::GestureHelper(QObject *parent) : QObject(parent) --{ -- // we translate event by ourselves -- qApp->setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents, false); -- //qApp->setAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents, false); -- -- m_menu_popped_timer.setInterval(500); -- m_menu_popped_timer.setSingleShot(true); -- -- m_pinch_operation_delayer.setInterval(200); -- m_pinch_operation_delayer.setSingleShot(true); -- -- m_slider = new UKUI::TwoFingerSlideGestureRecognizer; -- m_zoomer = new UKUI::TwoFingerZoomGestureRecognizer; -- -- m_slide_type = QGestureRecognizer::registerRecognizer(m_slider); -- m_zoom_type = QGestureRecognizer::registerRecognizer(m_zoomer); -- --} -- --GestureHelper::~GestureHelper() --{ -- QGestureRecognizer::unregisterRecognizer(m_slide_type); -- QGestureRecognizer::unregisterRecognizer(m_zoom_type); --} -- --void GestureHelper::registerWidget(QWidget *widget) --{ -- if (!widget) -- return; -- -- if (widget->contextMenuPolicy() == Qt::NoContextMenu) -- return; -- -- //widget->setAttribute(Qt::WA_AcceptTouchEvents, false); -- -- widget->removeEventFilter(this); -- -- //widget->grabGesture(Qt::TapGesture); -- widget->grabGesture(Qt::TapAndHoldGesture); -- //widget->grabGesture(Qt::PanGesture); -- //widget->grabGesture(Qt::PinchGesture); -- //widget->grabGesture(Qt::SwipeGesture); -- //widget->grabGesture(m_slide_type); -- //widget->grabGesture(m_zoom_type); -- -- widget->installEventFilter(this); --} -- --void GestureHelper::unregisterWidget(QWidget *widget) --{ -- if (!widget) -- return; -- -- if (widget->contextMenuPolicy() == Qt::NoContextMenu) -- return; -- -- //widget->setAttribute(Qt::WA_AcceptTouchEvents, true); -- -- widget->removeEventFilter(this); -- -- //widget->ungrabGesture(Qt::TapGesture); -- widget->ungrabGesture(Qt::TapAndHoldGesture); -- //widget->ungrabGesture(Qt::PanGesture); -- //widget->ungrabGesture(Qt::PinchGesture); -- //widget->ungrabGesture(Qt::SwipeGesture); -- //widget->ungrabGesture(m_slide_type); -- //widget->ungrabGesture(m_zoom_type); --} -- --bool GestureHelper::eventFilter(QObject *watched, QEvent *event) --{ -- switch (event->type()) { -- case QEvent::ActivationChange: { -- // do not grab inactive window's gesture. -- auto widget = qobject_cast<QWidget *>(watched); -- if (widget->isActiveWindow()) { -- widget->grabGesture(Qt::TapAndHoldGesture); -- } else { -- widget->ungrabGesture(Qt::TapAndHoldGesture); -- } -- return false; -- } -- case QEvent::TouchBegin: { -- m_is_touching = true; -- auto te = static_cast<QTouchEvent *>(event); -- m_touch_points = te->touchPoints(); -- m_finger_count = te->touchPoints().count(); -- if (m_finger_count == 1) -- m_hold_and_tap_pos = te->touchPoints().first().pos(); -- else -- m_hold_and_tap_pos = QPointF(); -- -- if (m_touch_points.count() > 2) { -- m_menu_popped_timer.stop(); -- } -- break; -- } -- -- case QEvent::TouchUpdate: { -- auto te = static_cast<QTouchEvent *>(event); -- m_touch_points = te->touchPoints(); -- m_finger_count = te->touchPoints().count(); -- break; -- } -- -- case QEvent::TouchCancel: -- case QEvent::TouchEnd: { -- m_touch_points.clear(); -- m_is_touching = false; -- m_finger_count = 0; -- break; -- } -- -- case QEvent::Gesture: { -- auto e = static_cast<QGestureEvent *>(event); -- auto widget = qobject_cast<QWidget *>(watched); -- if (!widget->isActiveWindow()) -- return false; -- -- if (auto twoFingerSlideGesture = static_cast<UKUI::TwoFingerSlideGesture *>(e->gesture(m_slide_type))) { -- //qDebug()<<"has slide gesture"; -- //qDebug()<<"slide"<<twoFingerSlideGesture->state()<<twoFingerSlideGesture->direction()<<twoFingerSlideGesture->totalDelta(); -- if (twoFingerSlideGesture->state() == Qt::GestureUpdated) { -- // some view doesn't have scroller but also can scroll, such as process list view in ukui-system-monitor. -- // we send the wheel event to trigger the scroll when slide gesture updated. -- if (!QScroller::hasScroller(widget)) { -- bool isHorizal = twoFingerSlideGesture->direction() == UKUI::TwoFingerSlideGesture::Horizal; -- bool isVertical = twoFingerSlideGesture->direction() == UKUI::TwoFingerSlideGesture::Vertical; -- if (isVertical) { -- QWheelEvent we(twoFingerSlideGesture->hotSpot(), twoFingerSlideGesture->delta() * 10, Qt::NoButton, Qt::NoModifier, Qt::Vertical); -- qApp->sendEvent(widget, &we); -- } else if (isHorizal) { -- QWheelEvent we(twoFingerSlideGesture->hotSpot(), twoFingerSlideGesture->delta() * 10, Qt::NoButton, Qt::NoModifier, Qt::Horizontal); -- qApp->sendEvent(widget, &we); -- } -- } -- } -- } -- -- if (auto twoFingerZoomGesture = static_cast<UKUI::TwoFingerZoomGesture *>(e->gesture(m_zoom_type))) { -- //qDebug()<<"has zoom gesture"<<twoFingerZoomGesture->state()<<twoFingerZoomGesture->zoomDirection()<<twoFingerZoomGesture->startPoints()<<twoFingerZoomGesture->lastPoints()<<twoFingerZoomGesture->currentPoints(); -- switch (twoFingerZoomGesture->zoomDirection()) { -- case UKUI::TwoFingerZoomGesture::ZoomIn: { -- QWheelEvent we(twoFingerZoomGesture->hotSpot(), 100, Qt::NoButton, Qt::ControlModifier); -- qApp->sendEvent(watched, &we); -- break; -- } -- case UKUI::TwoFingerZoomGesture::ZoomOut: { -- QWheelEvent we(twoFingerZoomGesture->hotSpot(), -100, Qt::NoButton, Qt::ControlModifier); -- qApp->sendEvent(watched, &we); -- break; -- } -- default: -- break; -- } -- } -- -- if (auto tapGesture = static_cast<QTapGesture *>(e->gesture(Qt::TapGesture))) { -- //qDebug()<<tapGesture->gestureType()<<tapGesture->position()<<tapGesture->state(); -- switch (tapGesture->state()) { -- case Qt::GestureStarted: -- //mouse press event -- break; -- case Qt::GestureCanceled: -- case Qt::GestureFinished: { -- //mouse release event -- break; -- } -- default: -- break; -- } -- } -- -- if (auto tapAndHoldGesture = static_cast<QTapAndHoldGesture*>(e->gesture(Qt::TapAndHoldGesture))) { -- //qDebug()<<tapAndHoldGesture->gestureType()<<tapAndHoldGesture->position()<<tapAndHoldGesture->state(); -- if (m_menu_popped_timer.isActive()) -- return false; -- -- m_hold_and_tap_pos = QPoint(); -- -- // check if there is a menu popped. -- // note that the right click in a widget which has context menu -- // will trigger the tap and hold gesture. I have no idea to deal -- // with this case, because i didn't find how to recognize if this -- // event is translated from mouse event. -- if (qobject_cast<QMenu *>(watched) || qobject_cast<QMenu *>(qApp->activePopupWidget())) { -- qDebug()<<"menu popped, may be right click"; -- m_menu_popped = true; -- } -- -- switch (tapAndHoldGesture->state()) { -- case Qt::GestureStarted: { -- if (m_menu_popped || m_is_mouse_pressed) { -- return false; -- } else { -- m_menu_popped = true; -- m_menu_popped_timer.start(); -- auto pos = widget->mapFromGlobal(tapAndHoldGesture->position().toPoint()); -- auto gpos = tapAndHoldGesture->position().toPoint(); -- -- if (m_is_native_mouse_move) -- return false; -- -- QMouseEvent me(QMouseEvent::MouseButtonRelease, pos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); -- qApp->sendEvent(widget, &me); -- QContextMenuEvent ce(QContextMenuEvent::Other, pos, gpos, Qt::NoModifier); -- qApp->sendEvent(widget, &ce); -- } -- break; -- } -- case Qt::GestureCanceled: -- case Qt::GestureFinished: { -- m_menu_popped = false; -- break; -- } -- default: -- break; -- } -- } -- -- if (auto swipeGesture = static_cast<QSwipeGesture *>(e->gesture(Qt::SwipeGesture))) { -- //qDebug()<<swipeGesture->gestureType()<<swipeGesture->state()<<swipeGesture->horizontalDirection()<<swipeGesture->verticalDirection()<<swipeGesture->swipeAngle(); -- } -- -- if (auto panGesture = static_cast<QPanGesture*>(e->gesture(Qt::PanGesture))) { -- //qDebug()<<panGesture->gestureType()<<panGesture->state()<<panGesture->delta()<<panGesture->hotSpot(); -- switch (panGesture->state()) { -- case Qt::GestureStarted: { -- auto widget = qobject_cast<QWidget *>(watched); -- auto pos = widget->mapFromGlobal(QCursor::pos()); -- QMouseEvent me(QMouseEvent::MouseButtonRelease, pos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); -- qApp->sendEvent(widget, &me); -- if (m_is_paning) { -- return false; -- } else { -- m_is_paning = true; -- } -- break; -- } -- case Qt::GestureCanceled: -- case Qt::GestureFinished: { -- m_is_paning = false; -- break; -- } -- default: -- break; -- } -- return false; -- } -- -- break; -- } -- -- case QEvent::MouseMove: { -- if (m_finger_count > 1) -- return true; -- -- QMouseEvent *me = static_cast<QMouseEvent *>(event); -- auto widget = static_cast<QWidget *>(watched); -- if (!widget) -- return false; -- -- //qDebug()<<me->type()<<me->pos(); -- -- bool isTranslatedFromTouch = me->source() == Qt::MouseEventSynthesizedByQt; -- if (!isTranslatedFromTouch) { -- // do not trigger tap and hold gesture handler -- m_is_native_mouse_move = true; -- return false; -- } -- m_is_native_mouse_move = false; -- -- // if we do a hold and tap gesture, we should not trigger mouse move event. -- // so we have to ignore the small offset of finger move. -- auto lastTapPoint = m_hold_and_tap_pos.toPoint(); -- auto currentPoint = widget->mapTo(widget->topLevelWidget(), me->pos()); -- -- if (!lastTapPoint.isNull()) { -- //qDebug()<<lastTapPoint<<currentPoint<<lenthSquared; -- if (QRect(-50, -50, 100, 100).contains(lastTapPoint - currentPoint)) { -- if (qobject_cast<QAbstractScrollArea *>(widget) || qobject_cast<QAbstractScrollArea *>(widget->parent())) -- return true; -- } -- } -- -- if (m_is_paning) { -- return true; -- } -- -- return false; -- } -- -- case QEvent::DragEnter: -- case QEvent::DragMove: { -- if (m_is_paning) -- return true; -- } -- -- case QEvent::MouseButtonPress: { -- auto me = static_cast<QMouseEvent *>(event); -- if (me->source() == Qt::MouseEventNotSynthesized) -- m_is_mouse_pressed = true; -- else -- m_is_mouse_pressed = false; -- break; -- } -- case QEvent::MouseButtonRelease: { -- auto me = static_cast<QMouseEvent *>(event); -- if (me->source() == Qt::MouseEventNotSynthesized) -- m_is_mouse_pressed = false; -- break; -- } -- -- default: -- break; -- } -- -- return false; --} -diff --git a/ukui-styles/proxy-style/gesture-helper.h b/ukui-styles/proxy-style/gesture-helper.h -deleted file mode 100644 -index 6c51562..0000000 ---- a/ukui-styles/proxy-style/gesture-helper.h -+++ /dev/null -@@ -1,83 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef GESTUREHELPER_H --#define GESTUREHELPER_H -- --#include <QObject> --#include <QTimer> --#include <QPointF> --#include <QTouchEvent> -- --namespace UKUI { --class TwoFingerSlideGestureRecognizer; --class TwoFingerZoomGestureRecognizer; --} -- --/*! -- * \brief The GestureHelper class -- * \note -- * this class only handle hold and tap gesture for now. -- */ --class GestureHelper : public QObject --{ -- Q_OBJECT --public: -- -- explicit GestureHelper(QObject *parent = nullptr); -- ~GestureHelper(); -- -- void registerWidget(QWidget *widget); -- void unregisterWidget(QWidget *widget); -- -- bool eventFilter(QObject *watched, QEvent *event) override; -- --private: -- bool m_is_touching = false; -- int m_finger_count = 0; -- -- QList<QTouchEvent::TouchPoint> m_touch_points; -- -- // hold and tap gesture -- bool m_menu_popped = false; -- QTimer m_menu_popped_timer; -- QPointF m_hold_and_tap_pos; -- bool m_is_native_mouse_move = false; -- -- // pan gesture -- bool m_is_paning = false; -- QTimer m_disable_paning_flag_delayer; -- -- // pinch gesture -- bool m_is_pinching = false; -- QTimer m_pinch_operation_delayer; -- -- UKUI::TwoFingerSlideGestureRecognizer *m_slider; -- UKUI::TwoFingerZoomGestureRecognizer *m_zoomer; -- -- Qt::GestureType m_slide_type; -- Qt::GestureType m_zoom_type; -- -- bool m_is_mouse_pressed = false; --}; -- --#endif // GESTUREHELPER_H -diff --git a/ukui-styles/proxy-style/proxy-style-plugin.cpp b/ukui-styles/proxy-style/proxy-style-plugin.cpp -deleted file mode 100644 -index e830f59..0000000 ---- a/ukui-styles/proxy-style/proxy-style-plugin.cpp -+++ /dev/null -@@ -1,246 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "proxy-style-plugin.h" --#include "proxy-style.h" --#include "ukui-style-settings.h" -- --#include "application-style-settings.h" -- --#include "black-list.h" -- --#include <QApplication> --#include <QStyleFactory> --#include <QWidget> -- --#include <QDebug> --#include <QDBusConnection> --#include <QDBusInterface> --#include <QDBusConnection> --#include <QLayout> -- --using namespace UKUI; -- --#define blackStyleChangeApp "kylin-software-center" -- --ProxyStylePlugin::ProxyStylePlugin() --{ -- if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -- auto settings = UKUIStyleSettings::globalInstance(); -- connect(settings, &UKUIStyleSettings::changed, this, [=](const QString &key) { -- if (key == "styleName" || key == "widgetThemeName" || key == "themeColor" || -- key == "style-name" || key == "widget-theme-name" || key == "theme-color") { -- if (blackList().contains(qAppName()) || qAppName() == "kylin-software-center.py") -- return; -- -- //We should not swich a application theme which use internal style. -- if (QApplication::style()->inherits("InternalStyle")) -- return; -- -- auto appStyleSettings = ApplicationStyleSettings::getInstance(); -- if (appStyleSettings->currentStyleStretagy() != ApplicationStyleSettings::Default) -- return; -- -- auto styleName = settings->get("styleName").toString(); -- -- if (styleName == "ukui-default" || styleName == "ukui-dark" || styleName == "ukui-white" -- || styleName == "ukui-black" || styleName == "ukui-light" || styleName == "ukui") { -- -- if (styleName == "ukui") -- styleName = "ukui-default"; -- else if (styleName == "ukui-black") -- styleName = "ukui-dark"; -- else if (styleName == "ukui-white") -- styleName = "ukui-light"; -- -- -- if (qApp->property("customStyleName").isValid()) { -- if (qApp->property("customStyleName").toString() == "ukui-light") { -- styleName = "ukui-light"; -- } else if (qApp->property("customStyleName").toString() == "ukui-dark") { -- styleName = "ukui-dark"; -- } -- } -- -- if(qAppName() != blackStyleChangeApp) -- qApp->setStyle(new ProxyStyle(styleName)); -- return; -- } -- -- //other style -- for (auto keys : QStyleFactory::keys()) { -- if (styleName.toLower() == keys.toLower()) { -- qApp->setStyle(new QProxyStyle(styleName)); -- return; -- } -- } -- -- //default style fusion -- qApp->setStyle(new QProxyStyle("fusion")); -- return; -- } -- -- if (key == "systemPalette") { -- onSystemPaletteChanged(); -- } -- -- if (key == "useSystemPalette") { -- onSystemPaletteChanged(); -- } -- }); -- } -- -- QDBusInterface *interFace = new QDBusInterface("com.kylin.statusmanager.interface", -- "/", -- "com.kylin.statusmanager.interface", -- QDBusConnection::sessionBus()); -- if(interFace->isValid()){ -- connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(tableModeChanged(bool))); -- } --} -- --QStyle *ProxyStylePlugin::create(const QString &key) --{ -- if (blackList().contains(qAppName())) -- return new QProxyStyle("fusion"); -- if (key == "ukui") { -- if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -- auto styleName = UKUIStyleSettings::globalInstance()->get("styleName").toString(); -- -- if (styleName == "ukui-default" || styleName == "ukui-dark" -- || styleName == "ukui-white" || styleName == "ukui-black" -- || styleName == "ukui-light" || styleName == "ukui") { -- -- if (styleName == "ukui") -- styleName = "ukui-default"; -- else if (styleName == "ukui-black") -- styleName = "ukui-dark"; -- else if (styleName == "ukui-white") -- styleName = "ukui-light"; -- -- if (qApp->property("customStyleName").isValid()) { -- if (qApp->property("customStyleName").toString() == "ukui-light") { -- styleName = "ukui-light"; -- } else if (qApp->property("customStyleName").toString() == "ukui-dark") { -- styleName = "ukui-dark"; -- } -- } -- -- return new ProxyStyle(styleName); -- } -- -- for (auto styleName : QStyleFactory::keys()) { -- if (styleName.toLower() == styleName.toLower()) -- return new QProxyStyle(styleName); -- } -- } -- -- return new QProxyStyle("fusion"); -- } -- return new QProxyStyle("fusion"); --} -- --const QStringList ProxyStylePlugin::blackList() --{ -- return blackAppList(); --} -- --void ProxyStylePlugin::onSystemPaletteChanged() --{ -- bool useSystemPalette = UKUIStyleSettings::globalInstance()->get("useSystemPalette").toBool(); -- if (useSystemPalette) { -- auto data = UKUIStyleSettings::globalInstance()->get("systemPalette"); -- if (data.isNull()) -- return; -- auto palette = qvariant_cast<QPalette>(data); -- QApplication::setPalette(palette); -- } else { -- auto palette = QApplication::style()->standardPalette(); -- QApplication::setPalette(palette); -- } --} -- --void ProxyStylePlugin::tableModeChanged(bool isTableMode) --{ -- if (blackList().contains(qAppName())) -- return; -- -- //We should not swich a application theme which use internal style. -- if (QApplication::style()->inherits("InternalStyle")) -- return; -- -- auto appStyleSettings = ApplicationStyleSettings::getInstance(); -- if (appStyleSettings->currentStyleStretagy() != ApplicationStyleSettings::Default) -- return; -- -- auto settings = UKUIStyleSettings::globalInstance(); -- auto styleName = settings->get("styleName").toString(); -- -- if (styleName == "ukui-default" || styleName == "ukui-dark" || styleName == "ukui-white" -- || styleName == "ukui-black" || styleName == "ukui-light" || styleName == "ukui") -- -- { -- if (qApp->property("customStyleName").isValid()) { -- if (qApp->property("customStyleName").toString() == "ukui-light") { -- styleName = "ukui-light"; -- } else if (qApp->property("customStyleName").toString() == "ukui-dark") { -- styleName = "ukui-dark"; -- } -- } -- -- foreach (QWidget *widget, qApp->allWidgets()) { -- widget->updateGeometry(); -- } -- qApp->setProperty("isInitial", false); -- if(qAppName() != blackStyleChangeApp) -- qApp->setStyle(new ProxyStyle(styleName)); -- } -- /* -- foreach (QObject *obj, qApp->children()) { -- if(qobject_cast<const QVBoxLayout*>(obj))//obj->inherits("QVBoxLayout")) -- { -- auto *vlayout = qobject_cast<QVBoxLayout *>(obj); -- qDebug() << "vlayout..." << vlayout->spacing(); -- -- //layout->update(); -- } -- else if(qobject_cast<QHBoxLayout *>(obj)) -- { -- auto *hlayout = qobject_cast<QHBoxLayout *>(obj); -- qDebug() << "hlayout..." << hlayout->spacing(); -- -- //layout->update(); -- } -- } -- foreach (QWidget *widget, qApp->topLevelWidgets()) { -- qDebug() << "widget size...." << widget->size() << widget->minimumSizeHint() << widget->minimumSize(); -- widget->adjustSize(); -- if(widget->layout() != nullptr) -- { -- qDebug() << "layoutSpace...." << widget->layout()->spacing(); -- } --// if(widget->size() != widget->minimumSizeHint()) --// widget->setGeometry(widget->x(), widget->y(), widget->minimumSizeHint().width(), widget->minimumSizeHint().height()); -- } --*/ -- return; --} -diff --git a/ukui-styles/proxy-style/proxy-style-plugin.h b/ukui-styles/proxy-style/proxy-style-plugin.h -deleted file mode 100644 -index 7cf1654..0000000 ---- a/ukui-styles/proxy-style/proxy-style-plugin.h -+++ /dev/null -@@ -1,55 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef PROXYSTYLEPLUGIN_H --#define PROXYSTYLEPLUGIN_H -- --#include <QStylePlugin> -- --namespace UKUI { -- --class ProxyStylePlugin : public QStylePlugin --{ -- Q_OBJECT -- Q_PLUGIN_METADATA(IID QStyleFactoryInterface_iid FILE "ukui-style.json") --public: -- ProxyStylePlugin(); -- -- QStyle *create(const QString &key) override; -- -- const QStringList blackList(); -- --protected: -- void onSystemPaletteChanged(); -- --signals: -- --public slots: -- void tableModeChanged(bool isTableMode); -- --private: -- --}; -- --} -- --#endif // PROXYSTYLEPLUGIN_H -diff --git a/ukui-styles/proxy-style/proxy-style.cpp b/ukui-styles/proxy-style/proxy-style.cpp -deleted file mode 100644 -index d81e599..0000000 ---- a/ukui-styles/proxy-style/proxy-style.cpp -+++ /dev/null -@@ -1,285 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "proxy-style.h" --#include <QWidget> --#include "blur-helper.h" --#include "gesture-helper.h" --#include "window-manager.h" --#include "application-style-settings.h" -- --#include "ukui-style-settings.h" -- --#include <QApplication> --#include <QMenu> -- --#include <QWindow> -- --#include <QLabel> --#include <QWizardPage> -- --#include <QStyleHints> -- --#include <QDebug> -- --#include <QLibrary> -- --using namespace UKUI; -- --ProxyStyle::ProxyStyle(const QString &key) : QProxyStyle(key == nullptr? "fusion": key) --{ -- auto settings = UKUIStyleSettings::globalInstance(); -- if (settings) { --// m_use_custom_highlight_color = settings->get("useCustomHighlightColor").toBool(); --// m_custom_highlight_color = QColor(settings->get("customHighlightColor").toString()); -- m_blink_cursor = settings->get("cursorBlink").toBool(); -- m_blink_cursor_time = settings->get("cursorBlinkTime").toInt(); -- qApp->styleHints()->setCursorFlashTime(m_blink_cursor_time); -- connect(settings, &QGSettings::changed, this, [=](const QString &key) { -- if (key == "cursorBlink") { -- m_blink_cursor = settings->get("cursorBlink").toBool(); -- if (qApp->activeWindow()) { -- qApp->activeWindow()->update(); -- } -- if (qApp->activeModalWidget()) { -- qApp->activeModalWidget()->update(); -- } -- if (qApp->activePopupWidget()) { -- qApp->activePopupWidget()->update(); -- } -- } -- if (key == "cursorBlinkTime") { -- m_blink_cursor_time = settings->get("cursorBlinkTime").toInt(); -- qApp->styleHints()->setCursorFlashTime(m_blink_cursor_time); -- } -- }); -- --// connect(settings, &QGSettings::changed, this, [=](const QString &key) { --// if (key == "useCustomHighlightColor") { --// m_use_custom_highlight_color = settings->get("useCustomHighlightColor").toBool(); --// } --// if (key == "customHighlightColor") { --// m_custom_highlight_color = QColor(settings->get("customHighlightColor").toString()); --// } --// if (m_use_custom_highlight_color) { --// //qApp->setStyle(new ProxyStyle(key)); --// auto pal = QApplication::palette(); --// pal.setColor(QPalette::Active, QPalette::Highlight, m_custom_highlight_color); --// pal.setColor(QPalette::Inactive, QPalette::Highlight, m_custom_highlight_color); --// pal.setColor(QPalette::Disabled, QPalette::Highlight, Qt::transparent); -- --// qApp->setPalette(pal); --// qApp->paletteChanged(pal); --// } else { --// auto pal = qApp->style()->standardPalette(); --// qApp->setPalette(pal); --// qApp->paletteChanged(pal); --// } --// }); -- -- -- } else { -- qWarning("org.ukui.style is null!"); -- } -- -- m_blur_helper = new BlurHelper(this); --// m_gesture_helper = new GestureHelper(this); -- m_window_manager = new WindowManager(this); -- -- if (!baseStyle()->inherits("Qt5UKUIStyle")) { -- m_blur_helper->onBlurEnableChanged(false); -- } -- -- m_app_style_settings = ApplicationStyleSettings::getInstance(); -- if (m_app_style_settings) { -- connect(m_app_style_settings, &ApplicationStyleSettings::colorStretageChanged, [=](const ApplicationStyleSettings::ColorStretagy &stretagy) { -- /*! -- \todo implemet palette switch. -- */ -- switch (stretagy) { -- case ApplicationStyleSettings::System: { -- break; -- } -- case ApplicationStyleSettings::Bright: { -- break; -- } -- case ApplicationStyleSettings::Dark: { -- break; -- } -- default: -- break; -- } -- }); -- } else { -- qWarning("org.ukui.style is null!"); -- } -- -- if (QGSettings::isSchemaInstalled("org.ukui.peripherals-mouse")) { -- QGSettings *settings = new QGSettings("org.ukui.peripherals-mouse"); -- if (settings->keys().contains("doubleClick")) { -- int mouse_double_click_time = settings->get("doubleClick").toInt(); -- if (mouse_double_click_time != qApp->doubleClickInterval()) { -- qApp->setDoubleClickInterval(mouse_double_click_time); -- } -- connect(settings, &QGSettings::changed, qApp, [=] (const QString &key) { -- if (key == "doubleClick") { -- int mouse_double_click_time = settings->get("doubleClick").toInt(); -- if (mouse_double_click_time != qApp->doubleClickInterval()) { -- qApp->setDoubleClickInterval(mouse_double_click_time); -- } -- } -- }); -- } else { -- qWarning("org.ukui.peripherals-mouse no doubleClick keys!"); -- } -- } else { -- qWarning("org.ukui.peripherals-mouse is null!"); -- } --} -- --bool ProxyStyle::eventFilter(QObject *obj, QEvent *e) --{ -- return false; --} -- --int ProxyStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const --{ -- //FIXME: -- switch (hint) { -- case QStyle::SH_Menu_Scrollable: { -- return 1; -- } -- case QStyle::SH_BlinkCursorWhenTextSelected: { -- return m_blink_cursor; -- } -- default: -- return QProxyStyle::styleHint(hint, option, widget, returnData); -- } --} -- --void ProxyStyle::polish(QWidget *widget) --{ -- QLibrary gestureLib("libqt5-gesture-extensions"); -- if (widget && gestureLib.load()) { -- typedef void (*RegisterFun) (QWidget*, QObject*); -- auto fun = (RegisterFun) gestureLib.resolve("registerWidget"); -- fun(widget, widget); -- } -- -- if (!baseStyle()->inherits("Qt5UKUIStyle")) -- return QProxyStyle::polish(widget); -- -- QProxyStyle::polish(widget); -- -- if(!widget) -- return; -- if (qAppName() == "ukui-menu" && !widget->inherits("QMenu")) { -- return; -- } -- --// m_gesture_helper->registerWidget(widget); -- -- /*! -- \todo -- register transparent widget to blurhelper with better way. -- for now it will let some transparent widget show in error. -- i have to avoid them by limitting widget's class name, -- but that is no my expected. -- */ -- if (widget->testAttribute(Qt::WA_TranslucentBackground) && widget->isTopLevel()) { -- //FIXME: --#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) -- m_blur_helper->registerWidget(widget); --#endif -- -- /* -- if (QString(widget->metaObject()->className())=="QMenu" || -- widget->inherits("Peony::DirectoryViewMenu") || -- widget->inherits("Peony::DesktopMenu")) { -- m_blur_helper->registerWidget(widget); -- } -- */ -- } -- -- if (widget->isWindow()) { -- auto var = widget->property("useStyleWindowManager"); -- -- if (var.isNull()) { -- m_window_manager->registerWidget(widget); -- } else { -- if (var.toBool()) { -- m_window_manager->registerWidget(widget); -- } -- } -- } -- -- widget->installEventFilter(this); --} -- --void ProxyStyle::unpolish(QWidget *widget) --{ -- QLibrary gestureLib("libqt5-gesture-extensions"); -- if (widget && gestureLib.load()) { -- typedef void (*UnRegisterFun) (QWidget*, QObject*); -- auto fun = (UnRegisterFun) gestureLib.resolve("unregisterWidget"); -- fun(widget, widget); -- } -- -- if (!baseStyle()->inherits("Qt5UKUIStyle")) -- return QProxyStyle::unpolish(widget); -- -- if (qAppName() == "ukui-menu" && !widget->inherits("QMenu")) { -- return; -- } -- --// m_gesture_helper->unregisterWidget(widget); -- -- //return QProxyStyle::unpolish(widget); -- widget->removeEventFilter(this); -- -- //FIXME: -- if (widget->testAttribute(Qt::WA_TranslucentBackground) && widget->isTopLevel()) { --#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) -- m_blur_helper->unregisterWidget(widget); --#endif -- } -- -- if (widget->isWindow()) { -- auto var = widget->property("useStyleWindowManager"); -- -- if (var.isNull()) { -- m_window_manager->unregisterWidget(widget); -- } else { -- if (var.toBool()) { -- m_window_manager->unregisterWidget(widget); -- } -- } -- } -- -- QProxyStyle::unpolish(widget); --} -- --void ProxyStyle::polish(QPalette &pal) --{ -- QProxyStyle::polish(pal); --} -- -diff --git a/ukui-styles/proxy-style/proxy-style.h b/ukui-styles/proxy-style/proxy-style.h -deleted file mode 100644 -index e00748d..0000000 ---- a/ukui-styles/proxy-style/proxy-style.h -+++ /dev/null -@@ -1,84 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef PROXYSTYLE_H --#define PROXYSTYLE_H -- --#include "proxy-style_global.h" --#include <QProxyStyle> -- --class BlurHelper; --class GestureHelper; --class WindowManager; -- --class ApplicationStyleSettings; -- --namespace UKUI { -- --/*! -- * \brief The ProxyStyle class -- * \details -- * ProxyStyle is direct UKUI platform theme style for provide style-management -- * in ukui platform. -- * -- * ProxyStyle is not a completed style, and it must be created completedly form another -- * QStyle (exclude itself), such as fusion, oxygen, etc. -- * -- * UKUI style provide a global blur effect for qt windows, but it does not mean all window -- * will be blurred. In fact, you should make your application window be transparent first. -- * If you do not want your transparent window be blurred, you should add your class to exception, -- * which cached in gsettings org.ukui.style blur-exception-classes. -- */ --class PROXYSTYLESHARED_EXPORT ProxyStyle : public QProxyStyle --{ -- Q_OBJECT --public: -- explicit ProxyStyle(const QString &key); -- virtual ~ProxyStyle() {} -- -- //debuger -- bool eventFilter(QObject *obj, QEvent *e); -- -- int styleHint(StyleHint hint, -- const QStyleOption *option, -- const QWidget *widget, -- QStyleHintReturn *returnData) const; -- -- void polish(QWidget *widget); -- void unpolish(QWidget *widget); -- -- void polish(QPalette &pal); -- --private: -- BlurHelper *m_blur_helper; -- GestureHelper *m_gesture_helper; -- WindowManager *m_window_manager; -- -- ApplicationStyleSettings *m_app_style_settings; -- -- bool m_blink_cursor = true; -- int m_blink_cursor_time = 1200; --}; -- --} -- --#endif // PROXYSTYLE_H -diff --git a/ukui-styles/proxy-style/proxy-style.pro b/ukui-styles/proxy-style/proxy-style.pro -deleted file mode 100644 -index 081c25a..0000000 ---- a/ukui-styles/proxy-style/proxy-style.pro -+++ /dev/null -@@ -1,53 +0,0 @@ --#------------------------------------------------- --# --# Project created by QtCreator 2020-01-02T08:39:47 --# --#------------------------------------------------- -- --QT += widgets KWindowSystem x11extras KWaylandClient dbus -- --TARGET = ukui-proxy-style --TEMPLATE = lib --CONFIG += plugin c++11 link_pkgconfig --PKGCONFIG += gsettings-qt xcb -- --#include(../../libqt5-ukui-style/settings/settings.pri) --include(../../libqt5-ukui-style/libqt5-ukui-style.pri) -- --DEFINES += PROXYSTYLE_LIBRARY -- --# The following define makes your compiler emit warnings if you use --# any feature of Qt which has been marked as deprecated (the exact warnings --# depend on your compiler). Please consult the documentation of the --# deprecated API in order to know how to port your code away from it. --DEFINES += QT_DEPRECATED_WARNINGS --#DEFINES += QT_NO_DEBUG_OUTPUT --DEFINES += QT_MESSAGELOGCONTEXT -- --# You can also make your code fail to compile if you use deprecated APIs. --# In order to do so, uncomment the following line. --# You can also select to disable deprecated APIs only up to a certain version of Qt. --#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -- --SOURCES += \ -- gesture-helper.cpp \ -- proxy-style.cpp \ -- proxy-style-plugin.cpp \ -- blur-helper.cpp \ -- window-manager.cpp -- --HEADERS += \ -- gesture-helper.h \ -- proxy-style.h \ -- proxy-style_global.h \ -- proxy-style-plugin.h \ -- blur-helper.h \ -- window-manager.h -- --unix { -- target.path = $$[QT_INSTALL_PLUGINS]/styles -- INSTALLS += target --} -- --DISTFILES += \ -- ukui-style.json -diff --git a/ukui-styles/proxy-style/proxy-style_global.h b/ukui-styles/proxy-style/proxy-style_global.h -deleted file mode 100644 -index 76bfaea..0000000 ---- a/ukui-styles/proxy-style/proxy-style_global.h -+++ /dev/null -@@ -1,34 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef PROXYSTYLE_GLOBAL_H --#define PROXYSTYLE_GLOBAL_H -- --#include <QtCore/qglobal.h> -- --#if defined(PROXYSTYLE_LIBRARY) --# define PROXYSTYLESHARED_EXPORT Q_DECL_EXPORT --#else --# define PROXYSTYLESHARED_EXPORT Q_DECL_IMPORT --#endif -- --#endif // PROXYSTYLE_GLOBAL_H -diff --git a/ukui-styles/proxy-style/ukui-style.json b/ukui-styles/proxy-style/ukui-style.json -deleted file mode 100644 -index b0ae847..0000000 ---- a/ukui-styles/proxy-style/ukui-style.json -+++ /dev/null -@@ -1,3 +0,0 @@ --{ -- "Keys": [ "ukui" ] --} -diff --git a/ukui-styles/proxy-style/window-manager.cpp b/ukui-styles/proxy-style/window-manager.cpp -deleted file mode 100644 -index c6578ec..0000000 ---- a/ukui-styles/proxy-style/window-manager.cpp -+++ /dev/null -@@ -1,314 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "window-manager.h" -- --#include <QWidget> --#include <QMouseEvent> -- --#include <KWindowSystem> --#include <NETWM> --#include <QX11Info> --#include <xcb/xcb.h> -- --#include <QApplication> --#include <QWindow> -- --#include <QDebug> -- --WindowManager::WindowManager(QObject *parent) : QObject(parent) --{ -- m_timer.setTimerType(Qt::PreciseTimer); -- m_timer.setInterval(100); -- m_timer.setSingleShot(true); -- m_start_point = QPoint(0, 0); -- -- qApp->installEventFilter(new AppEventFilter(this)); -- -- if (QX11Info::isPlatformX11()) -- return; -- -- using namespace KWayland::Client; -- m_connection = ConnectionThread::fromApplication(qApp); -- if (!m_connection) -- return; -- m_registry = new Registry(this); -- m_registry->create(m_connection); -- -- connect(m_registry, &KWayland::Client::Registry::interfaceAnnounced, this, [=](){ -- const auto interface = m_registry->interface( Registry::Interface::Seat ); -- if( interface.name != 0 ) { -- m_seat = m_registry->createSeat( interface.name, interface.version, this ); -- connect(m_seat, &Seat::hasPointerChanged, this, [=](bool pointerChanged){ -- if (pointerChanged) { -- if (!m_pointer) { -- m_pointer = m_seat->createPointer(this); -- connect(m_pointer, &KWayland::Client::Pointer::buttonStateChanged, this, [=](int serial){ -- m_serial = serial; -- }); -- } -- } else { -- delete m_pointer; -- m_pointer = nullptr; -- } -- }); -- } -- }); -- -- m_registry->setup(); -- m_connection->roundtrip(); --} -- --void WindowManager::registerWidget(QWidget *w) --{ -- if (dragable = isDragable(w)) { -- w->removeEventFilter(this); -- w->installEventFilter(this); -- } --} -- --void WindowManager::unregisterWidget(QWidget *w) --{ -- if (dragable) -- w->removeEventFilter(this); --} -- --bool WindowManager::eventFilter(QObject *obj, QEvent *e) --{ -- //qDebug()<<e->type(); -- switch (e->type()) { -- case QEvent::MouseButtonPress: { -- QMouseEvent *event = static_cast<QMouseEvent*>(e); -- -- if (event->button() == Qt::LeftButton) { -- // If the cursor is not normal arrow cursor, -- // we should consider there is another excepted operation -- // which current widget hope do. So we won't trigger -- // the window move event. -- QWidget *w = qobject_cast<QWidget *>(obj); -- if (w->cursor().shape() != Qt::CursorShape::ArrowCursor) -- return false; -- -- buttonPresseEvent(obj, event); -- return false; -- } -- return false; -- } -- case QEvent::MouseMove: { -- //if (QWidget::mouseGrabber()) return false; -- QMouseEvent *event = static_cast<QMouseEvent*>(e); -- -- /*! \note In x11, accuracy of the MouseEvent translated from TouchEvent is not -- * consistent with the accuracy of the native MouseEvent(TouchEvent is a decimal -- * and MouseEvent is an integer). -- * When the touch is pressed, if the mouse clicks the right button, Qt will think that -- * the positions of the two clicks are inconsistent, and will send a MouseMoveEvent, -- * the source of this MouseMoveEvent is not MouseEventSynthesizedByQt, so this MouseMoveEvent -- * will not tirgger w->grabMouse(), window will be grabbed by kwin but no TouchEndEvent is received -- * Therefore, the MouseMoveEvent is filtered out here if the moving distance is too small. -- * \return return true because some borderless windows handle window dragging separately, -- * if return false will cause these windows to behave abnormally -- * \author wangweinan@kylinos.cn -- */ -- if (qAbs(event->pos().x() - m_start_point.x()) < 2 && -- qAbs(event->pos().y() - m_start_point.y()) < 2) { -- return true; -- } -- -- //move request -- mouseMoveEvent(obj, event); -- return false; -- } -- case QEvent::MouseButtonRelease: { -- QMouseEvent *event = static_cast<QMouseEvent*>(e); -- mouseReleaseEvent(obj, event); -- return false; -- } -- case QEvent::Move: { -- if (m_current_obj && m_is_dragging) { -- //qDebug()<<"drag end"; -- endDrag(); -- } else { -- //qDebug()<<"move"; -- } -- return false; -- } -- default: -- return false; -- } --} -- --void WindowManager::buttonPresseEvent(QObject *obj, QMouseEvent *e) --{ -- //qDebug()<<"mouse press event"; -- endDrag(); -- QWidget *w = qobject_cast<QWidget*>(obj); -- //NOTE: We have to skip the border for resize event. -- auto pos = w->mapFromGlobal(e->globalPos()); -- -- //title active height set 48px -- QRect activeRect(0, 0, w->width(), 48); -- if (!activeRect.contains(pos)) { -- //qDebug()<<"skip move event"; -- return; -- } --// if (!w->rect().adjusted(10, 10, -10, -10).contains(pos)) { --// //qDebug()<<"skip move event"; --// return; --// } -- -- -- m_prepared_to_drag = true; -- m_is_dragging = false; -- m_current_obj = obj; -- m_start_point = e->pos(); -- m_timer.start(); --} -- --void WindowManager::mouseMoveEvent(QObject *obj, QMouseEvent *e) --{ -- //qDebug()<<"mouse move event"; -- -- if (!m_prepared_to_drag) -- return; -- -- if (m_is_dragging) -- return; -- -- QWidget *w = qobject_cast<QWidget*>(obj); -- const QPoint native = e->globalPos(); -- qreal dpiRatio = qApp->devicePixelRatio(); -- if (QX11Info::isPlatformX11()) { --// qDebug()<<"x11 move start"; -- auto connection = QX11Info::connection(); -- xcb_ungrab_pointer(connection, XCB_TIME_CURRENT_TIME); -- NETRootInfo(connection, NET::WMMoveResize).moveResizeRequest(w->winId(), native.x() * dpiRatio, native.y() * dpiRatio, NET::Move); --// qDebug()<<"x11 move end"; -- -- if (e->source() == Qt::MouseEventSynthesizedByQt) { -- if (!w->mouseGrabber()) { -- //! \note Under XI, grabMouse will grab touch devices at the same time. -- //! When the touch device grabbing changes, xserver will send TouchEndEvent -- //! to the client that monitors the touch sequence. -- //! \see qtbase QXcbConnection::xi2SetMouseGrabEnabled -- w->grabMouse(); -- w->releaseMouse(); -- } -- } -- -- xcb_button_release_event_t* event = new xcb_button_release_event_t; -- memset(event, 0x00, sizeof(xcb_button_release_event_t)); -- event->response_type = XCB_BUTTON_RELEASE; -- event->event = w->winId(); -- event->time = QX11Info::getTimestamp(); -- event->same_screen = 1; -- event->root = QX11Info::appRootWindow(); -- event->root_x = native.x(); -- event->root_y = native.y(); -- event->event_x = 0; -- event->event_y = 0; -- event->child = 0; -- event->state = 0; -- event->detail = XCB_BUTTON_INDEX_1; -- -- xcb_send_event(connection, false, w->winId(), XCB_EVENT_MASK_BUTTON_RELEASE, (char *) event); -- delete event; -- -- xcb_flush(connection); -- -- m_is_dragging = true; -- -- m_timer.start(); -- } else { -- auto widget = qobject_cast<QWidget *>(obj); -- auto topLevel = widget->topLevelWidget(); -- --#if (QT_VERSION >= QT_VERSION_CHECK(5,15,0)) -- topLevel->windowHandle()->startSystemMove(); --#else -- auto shellSurface = KWayland::Client::ShellSurface::fromWindow(topLevel->windowHandle()); -- if (!shellSurface) -- return; -- shellSurface->requestMove(m_seat, m_serial); --#endif -- m_is_dragging = true; -- } -- -- return; --} -- --void WindowManager::mouseReleaseEvent(QObject *obj, QMouseEvent *e) --{ -- //qDebug()<<"mouse release event"; -- endDrag(); --} -- --void WindowManager::endDrag() --{ -- m_is_dragging = false; -- m_current_obj = nullptr; -- m_start_point = QPoint(0, 0); -- m_timer.stop(); --} -- --bool WindowManager::isDragable(QWidget *widget) --{ -- if (widget && widget->isWindow()) { -- if ((widget->windowFlags() & Qt::Popup) == Qt::Popup) { -- if ((widget->windowFlags() & Qt::Tool) == Qt::Tool) -- return true; -- return false; -- } -- return true; -- } else { -- return false; -- } --} -- -- -- --// AppEventFilter --AppEventFilter::AppEventFilter(WindowManager *parent) : QObject(parent) --{ -- m_wm = parent; --} -- --bool AppEventFilter::eventFilter(QObject *obj, QEvent *e) --{ -- if (e->type() == QEvent::MouseButtonRelease) { -- m_wm->m_prepared_to_drag = false; -- m_wm->m_is_dragging = false; -- m_wm->m_current_obj = nullptr; -- m_wm->m_timer.stop(); -- m_wm->m_start_point = QPoint(); -- } -- --// if (m_wm->m_is_dragging && m_wm->m_current_obj && (e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseMove)) { --// QMouseEvent mouseEvent(QEvent::MouseButtonRelease, --// m_wm->m_start_point, --// Qt::LeftButton, --// Qt::LeftButton, --// Qt::NoModifier); --// qApp->sendEvent(m_wm->m_current_obj, &mouseEvent); --// } -- return false; --} -diff --git a/ukui-styles/proxy-style/window-manager.h b/ukui-styles/proxy-style/window-manager.h -deleted file mode 100644 -index 52f57e3..0000000 ---- a/ukui-styles/proxy-style/window-manager.h -+++ /dev/null -@@ -1,97 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef WINDOWMANAGER_H --#define WINDOWMANAGER_H -- --#include <QObject> --#include <QTimer> --#include <QPoint> -- --#include <KWayland/Client/shell.h> --#include <KWayland/Client/seat.h> --#include <KWayland/Client/registry.h> --#include <KWayland/Client/connection_thread.h> --#include <KWayland/Client/pointer.h> -- --class QMouseEvent; --class AppEventFilter; -- --/*! -- * \brief The WindowManager class -- * \details -- * This class is use to help window management. -- * There are some qt's windows, such as frameless window, could not -- * move and move resize by it self. Through registering widget to window -- * manager, we can let them movable and can be maximum/half-maximum like -- * other normal window. -- */ --class WindowManager : public QObject --{ -- friend class AppEventFilter; -- Q_OBJECT --public: -- explicit WindowManager(QObject *parent = nullptr); -- -- void registerWidget(QWidget *w); -- void unregisterWidget(QWidget *w); -- -- bool eventFilter(QObject *obj, QEvent *e); -- -- void buttonPresseEvent(QObject *obj, QMouseEvent *e); -- void mouseMoveEvent(QObject *obj, QMouseEvent *e); -- void mouseReleaseEvent(QObject *obj, QMouseEvent *e); -- --protected: -- void endDrag(); -- --private: -- QObject *m_current_obj = nullptr; -- bool m_is_dragging = false; -- QTimer m_timer; -- QPoint m_start_point; -- -- bool m_prepared_to_drag = false; -- bool isDragable(QWidget *widget); -- bool dragable = true; -- -- KWayland::Client::ConnectionThread *m_connection = nullptr; -- KWayland::Client::Registry *m_registry = nullptr; -- KWayland::Client::Seat *m_seat = nullptr; -- KWayland::Client::Pointer *m_pointer = nullptr; -- int m_serial = 0; --}; -- --class AppEventFilter : public QObject --{ -- friend class WindowManager; -- Q_OBJECT --private: -- explicit AppEventFilter(WindowManager *parent); -- ~AppEventFilter() {} -- -- bool eventFilter(QObject *obj, QEvent *e); -- -- WindowManager *m_wm = nullptr; --}; -- --#endif // WINDOWMANAGER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0003-ok2-copyright.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0003-ok2-copyright.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0003-ok2-copyright.patch 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0003-ok2-copyright.patch 2025-02-28 09:39:53.000000000 +0800 @@ -0,0 +1,1412 @@ +From: =?utf-8?b?6LCt6Z2Z?= <tanjing@kylinos.cn> +Date: Wed, 25 Dec 2024 13:41:06 +0800 +Subject: =?utf-8?b?b2sy5LiK5paH5Lu25a+56K+d5qGG54m55q6K55qE6YOo5YiG5ZCM5q2l?= + =?utf-8?b?77yM5Y+K57uZ5paw5aKe55qE5aS05paH5Lu25re75YqgY29weXJpZ2h0?= + +--- + qt5-ukui-filedialog/debug.h | 34 ++++++++++++-- + .../file-operation-dialog/kyfiledialogrename.cpp | 2 +- + .../file-operation-dialog/kyfiledialogrename.h | 25 +++++++++- + .../kyfileoperationdialog.cpp | 1 + + .../file-operation-dialog/kyfileoperationdialog.h | 25 +++++++++- + .../file-operation-dialog/rename-editor.cpp | 1 + + .../file-operation-dialog/rename-editor.h | 25 +++++++++- + qt5-ukui-filedialog/filedialoginterface.h | 23 +++++++++ + qt5-ukui-filedialog/filedialogplugin.cpp | 2 +- + qt5-ukui-filedialog/filedialogplugin.h | 23 +++++++++ + qt5-ukui-filedialog/filedialogplugin_global.h | 23 +++++++++ + qt5-ukui-filedialog/kyfiledialog.cpp | 54 +++++++++++++++------- + qt5-ukui-filedialog/kyfiledialog.h | 29 ++++++++++-- + qt5-ukui-filedialog/kyfiledialogprivate.cpp | 28 ++++++++++- + qt5-ukui-filedialog/kyfiledialogprivate.h | 26 +++++++++++ + qt5-ukui-filedialog/menutoolbutoon.cpp | 38 ++++++++++++++- + qt5-ukui-filedialog/menutoolbutoon.h | 28 ++++++++++- + qt5-ukui-filedialog/pathbar.cpp | 44 +++++++++++++++++- + qt5-ukui-filedialog/pathbar.h | 27 +++++++++++ + qt5-ukui-filedialog/sidebar.cpp | 25 +++++++++- + qt5-ukui-filedialog/sidebar.h | 29 ++++++++++++ + .../translations/qt5-ukui-filedialog_bo_CN.ts | 6 +-- + .../translations/qt5-ukui-filedialog_cs.ts | 6 +-- + .../translations/qt5-ukui-filedialog_en_US.ts | 6 +-- + .../translations/qt5-ukui-filedialog_fa.ts | 6 +-- + .../translations/qt5-ukui-filedialog_fr.ts | 6 +-- + .../translations/qt5-ukui-filedialog_kk.ts | 6 +-- + .../translations/qt5-ukui-filedialog_ky.ts | 6 +-- + .../translations/qt5-ukui-filedialog_mn.ts | 6 +-- + .../translations/qt5-ukui-filedialog_tr.ts | 6 +-- + .../translations/qt5-ukui-filedialog_ug.ts | 6 +-- + .../translations/qt5-ukui-filedialog_zh_CN.ts | 6 +-- + .../translations/qt5-ukui-filedialog_zh_HK.ts | 6 +-- + qt5-ukui-filedialog/uikyfiledialog.cpp | 2 +- + qt5-ukui-filedialog/uikyfiledialog.h | 25 ++++++++++ + 35 files changed, 538 insertions(+), 73 deletions(-) + +diff --git a/qt5-ukui-filedialog/debug.h b/qt5-ukui-filedialog/debug.h +index 828f04c..7c8edbc 100644 +--- a/qt5-ukui-filedialog/debug.h ++++ b/qt5-ukui-filedialog/debug.h +@@ -1,11 +1,39 @@ ++/* ++ * KWin Style UKUI ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Jing Tan <tanjing@kylinos.cn> ++ * ++ */ ++ + #ifndef PDEBUG_H + #define PDEBUG_H + #include <QDebug> + #include <QDateTime> + ++#define SERVICE "com.kylin.statusmanager.interface" ++#define PATH "/" ++#define INTERFACE "com.kylin.statusmanager.interface" ++ + #define UKUI_SEARCH_SCHEMAS "org.ukui.search.settings" + #define SEARCH_METHOD_KEY "fileIndexEnable" + ++namespace UKUIFileDialog { ++ + class NullDebug + + { +@@ -17,10 +45,8 @@ template<typename T> + NullDebug & operator <<(const T&){return *this;} + + }; +- + inline NullDebug nullDebug(){return NullDebug();} +- +- ++} + + //#define LOG_TIMI + +@@ -30,7 +56,7 @@ inline NullDebug nullDebug(){return NullDebug();} + + #else + +-# define pDebug nullDebug() ++# define pDebug UKUIFileDialog::nullDebug() + + #endif + +diff --git a/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.cpp b/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.cpp +index a3781ff..5075acd 100644 +--- a/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.cpp ++++ b/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.cpp +@@ -22,7 +22,7 @@ + + #define PEONY_TRUNCATE_NAME_LIMIT 225 + #define PEONY_RENAME_LIMIT 255 +- ++using namespace UKUIFileDialog; + extern bool isFuseFileSystem(QString path); + + MyTextEdit:: MyTextEdit(QWidget *parent) : QTextEdit(parent) +diff --git a/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.h b/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.h +index 4c6856a..009f287 100644 +--- a/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.h ++++ b/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.h +@@ -1,9 +1,32 @@ ++/* ++ * KWin Style UKUI ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Jing Tan <tanjing@kylinos.cn> ++ * ++ */ ++ + #ifndef KYFILEDIALOGRENAME_H + #define KYFILEDIALOGRENAME_H + + #include <QTextEdit> + #include "file-operation-error-handler.h" + #include "kyfileoperationdialog.h" ++namespace UKUIFileDialog { + + enum TurnCateType { + Post = 0, +@@ -47,5 +70,5 @@ private: + QString m_currentUri; + int m_maxLength = 255; + }; +- ++} + #endif // KYFILEDIALOGRENAME_H +diff --git a/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.cpp b/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.cpp +index 40c90fb..1164895 100644 +--- a/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.cpp ++++ b/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.cpp +@@ -1,4 +1,5 @@ + #include "kyfileoperationdialog.h" ++using namespace UKUIFileDialog; + + KyFileOperationDialog::KyFileOperationDialog(QWidget *parent) : kdk::KDialog(parent) + { +diff --git a/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.h b/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.h +index 5536e37..f266426 100644 +--- a/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.h ++++ b/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.h +@@ -1,8 +1,31 @@ ++/* ++ * KWin Style UKUI ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Jing Tan <tanjing@kylinos.cn> ++ * ++ */ ++ + #ifndef KYFILEOPERATIONDIALOG_H + #define KYFILEOPERATIONDIALOG_H + + #include <QWidget> + #include <kysdk/applications/kdialog.h> ++namespace UKUIFileDialog { + + class KyFileOperationDialog : public kdk::KDialog + { +@@ -10,5 +33,5 @@ class KyFileOperationDialog : public kdk::KDialog + public: + explicit KyFileOperationDialog(QWidget *parent = nullptr); + }; +- ++} + #endif // KYFILEOPERATIONDIALOG_H +diff --git a/qt5-ukui-filedialog/file-operation-dialog/rename-editor.cpp b/qt5-ukui-filedialog/file-operation-dialog/rename-editor.cpp +index a85e4a9..f17daff 100644 +--- a/qt5-ukui-filedialog/file-operation-dialog/rename-editor.cpp ++++ b/qt5-ukui-filedialog/file-operation-dialog/rename-editor.cpp +@@ -1,5 +1,6 @@ + #include "rename-editor.h" + #include <QKeyEvent> ++using namespace UKUIFileDialog; + + RenameEditor::RenameEditor(QWidget *parent) : QTextEdit(parent) + { +diff --git a/qt5-ukui-filedialog/file-operation-dialog/rename-editor.h b/qt5-ukui-filedialog/file-operation-dialog/rename-editor.h +index 3e92625..4d17dd7 100644 +--- a/qt5-ukui-filedialog/file-operation-dialog/rename-editor.h ++++ b/qt5-ukui-filedialog/file-operation-dialog/rename-editor.h +@@ -1,7 +1,30 @@ ++/* ++ * KWin Style UKUI ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Jing Tan <tanjing@kylinos.cn> ++ * ++ */ ++ + #ifndef RENAMEEDITOR_H + #define RENAMEEDITOR_H + + #include <QTextEdit> ++namespace UKUIFileDialog { + + class RenameEditor: public QTextEdit + { +@@ -17,5 +40,5 @@ protected: + void keyPressEvent(QKeyEvent *e) override; + + }; +- ++} + #endif // RENAMEEDITOR_H +diff --git a/qt5-ukui-filedialog/filedialoginterface.h b/qt5-ukui-filedialog/filedialoginterface.h +index c5a6a58..fe59ff0 100644 +--- a/qt5-ukui-filedialog/filedialoginterface.h ++++ b/qt5-ukui-filedialog/filedialoginterface.h +@@ -1,6 +1,29 @@ ++/* ++ * KWin Style UKUI ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Jing Tan <tanjing@kylinos.cn> ++ * ++ */ ++ + #ifndef FILEDIALOGINTERFACE_H + #define FILEDIALOGINTERFACE_H + #include "qpa/qplatformdialoghelper.h" ++ + //定义接口 + class FileDialogInterface + { +diff --git a/qt5-ukui-filedialog/filedialogplugin.cpp b/qt5-ukui-filedialog/filedialogplugin.cpp +index 8c0aefc..ca2ca61 100644 +--- a/qt5-ukui-filedialog/filedialogplugin.cpp ++++ b/qt5-ukui-filedialog/filedialogplugin.cpp +@@ -6,6 +6,6 @@ Q_EXPORT_PLUGIN2(plugin, myPlugin) + + QPlatformDialogHelper *FileDialogPlugin::create() + { +- return new KyFileDialogHelper; ++ return new UKUIFileDialog::KyFileDialogHelper; + } + +diff --git a/qt5-ukui-filedialog/filedialogplugin.h b/qt5-ukui-filedialog/filedialogplugin.h +index 5f5502e..e139d7c 100644 +--- a/qt5-ukui-filedialog/filedialogplugin.h ++++ b/qt5-ukui-filedialog/filedialogplugin.h +@@ -1,3 +1,26 @@ ++/* ++ * KWin Style UKUI ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Jing Tan <tanjing@kylinos.cn> ++ * ++ */ ++ ++ + #ifndef MYPLUGIN_H + #define MYPLUGIN_H + #include <QtPlugin> +diff --git a/qt5-ukui-filedialog/filedialogplugin_global.h b/qt5-ukui-filedialog/filedialogplugin_global.h +index af97589..7438bd8 100644 +--- a/qt5-ukui-filedialog/filedialogplugin_global.h ++++ b/qt5-ukui-filedialog/filedialogplugin_global.h +@@ -1,3 +1,26 @@ ++/* ++ * KWin Style UKUI ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Jing Tan <tanjing@kylinos.cn> ++ * ++ */ ++ ++ + #ifndef FILEDIALOGPLUGIN_GLOBAL_H + #define FILEDIALOGPLUGIN_GLOBAL_H + +diff --git a/qt5-ukui-filedialog/kyfiledialog.cpp b/qt5-ukui-filedialog/kyfiledialog.cpp +index 2242df6..b80683a 100644 +--- a/qt5-ukui-filedialog/kyfiledialog.cpp ++++ b/qt5-ukui-filedialog/kyfiledialog.cpp +@@ -34,6 +34,7 @@ + #include <peony-qt/thumbnail-manager.h> + #include <KWindowEffects> + #include <KWindowSystem> ++#include "ukuistylehelper/ukuistylehelper.h" + #include "debug.h" + #include "uikyfiledialog.h" + #include "kyfiledialogprivate.h" +@@ -46,6 +47,7 @@ + + #define PERSONALSIE_SCHEMA "org.ukui.control-center.personalise" + #define PERSONALSIE_TRAN_KEY "transparency" ++using namespace UKUIFileDialog; + + bool isFuseFileSystem(QString path) + { +@@ -1755,7 +1757,14 @@ void KyNativeFileDialog::updateWindowState() + auto uri = getCurrentUri(); + pDebug << "updateWindowState uri updatePath....." << uri << getCurrentPage()->canGoBack(); + //mKyFileDialogUi->m_pathbarWidget->updatePath(uri); +- mKyFileDialogUi->m_backButton->setEnabled(getCurrentPage()->canGoBack()); ++ bool canGoBack = false; ++ if(getCurrentPage()->canGoBack() && !(getCurrentPage()->getBackList().length() == 1 && getCurrentPage()->getBackList().at(0).isEmpty())) ++ { ++ canGoBack = true; ++ } ++ ++ mKyFileDialogUi->m_backButton->setEnabled(canGoBack); ++ + mKyFileDialogUi->m_forwardButton->setEnabled(getCurrentPage()->canGoForward()); + bool canCdUp = getCurrentPage()->canCdUp(); + if(uri.startsWith("mult://")) +@@ -1910,18 +1919,20 @@ void KyNativeFileDialog::paintEvent(QPaintEvent *e) + colorBase.setRed(R); + colorBase.setGreen(G); + colorBase.setBlue(B); +- colorBase.setAlphaF(m_transparency/255.0); +- ++ auto sidebarOpacity = Peony::GlobalSettings::getInstance()->getValue(SIDEBAR_BG_OPACITY).toInt(); + +- QPalette palette = mKyFileDialogUi->m_sider->viewport()->palette(); +- palette.setColor(QPalette::Base, Qt::transparent); +- mKyFileDialogUi->m_sider->viewport()->setPalette(palette); ++ if(sidebarOpacity != 100) ++ mKyFileDialogUi->m_sider->viewport()->setAttribute(Qt::WA_TranslucentBackground); + ++ colorBase.setAlphaF(sidebarOpacity/100.0); + + QPainterPath sidebarPath; + QRect sideBarRect = QRect(mKyFileDialogUi->m_sider->mapTo(this, QPoint()), mKyFileDialogUi->m_sider->size()); + auto adjustedRect = sideBarRect.adjusted(0, 0, 0, 0); +- sidebarPath.addRoundedRect(adjustedRect, 6, 6); ++ int radius = 6; ++ if(this && this->property("normalRadius").isValid()) ++ radius = this->property("normalRadius").toInt(); ++ sidebarPath.addRoundedRect(adjustedRect, radius, radius); + + // sidebarPath.addRect(adjustedRect.adjusted(0, 0, 0, -6)); + // sidebarPath.addRect(adjustedRect.adjusted(6, 0, 0, 0)); +@@ -3314,9 +3325,10 @@ bool KyFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality wi + for(QFileDialog *fd : p->findChildren<QFileDialog *>()){ + if(options()->windowTitle() == fd->windowTitle()){ + pDebug << "filedoalog set parent...." << fd->geometry(); +- if(mKyFileDialog->parentWidget() != fd){ ++ if(mKyFileDialog->parentWidget() != p){ + ///设置parent是QFiledialog 之前设置的是p 会有问题 showevent里有时候会找不到对应name的 +- mKyFileDialog->setParent(fd, windowFlags); ++ /// 必须是p 否则设置的模态有问题 只对parent模态 在parent里去遍历找子对象 ++ mKyFileDialog->setParent(p, windowFlags); + KWindowSystem::setState(mKyFileDialog->winId(), NET::SkipPager | NET::SkipSwitcher); + } + pDebug << "filediaog directory000...." << fd->directory(); +@@ -3360,9 +3372,9 @@ bool KyFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality wi + if(QFileDialog *fd = qobject_cast<QFileDialog *>(widget)){ + if(options()->windowTitle() == fd->windowTitle()){ + pDebug << "parent us null filedoalog set parent...." << fd->geometry() << options()->windowTitle() << fd->objectName(); +- if(mKyFileDialog->parentWidget() != fd){ +- mKyFileDialog->setParent(fd, windowFlags); +- } ++// if(mKyFileDialog->parentWidget() != fd){ ++// mKyFileDialog->setParent(fd, windowFlags); ++// } + pDebug << "parent us null filedoalog directory...." << fd->directory(); + pDebug << "parent us null filedoalog selectedFiles...." << m_initialSelectFiles.value(0).path() << QFile::exists(m_initialSelectFiles.value(0).path()); + pDebug << "parent us null filedoalog selectedFiles11111111...." << fd->selectedFiles(); +@@ -3399,11 +3411,19 @@ bool KyFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality wi + else if(options()->viewMode() == QFileDialog::Detail && mKyFileDialog->viewMode() != KyNativeFileDialog::List) + mKyFileDialog->setViewMode(KyNativeFileDialog::List); + +- MotifWmHints hints; +- hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; +- hints.functions = MWM_FUNC_ALL; +- hints.decorations = MWM_DECOR_BORDER; +- XAtomHelper::getInstance()->setWindowMotifHint(mKyFileDialog->winId(), hints); ++ //remove windows header ++// QString platform = QGuiApplication::platformName(); ++// if(platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) ++// { ++// kdk::UkuiStyleHelper::self()->removeHeader(mKyFileDialog); ++// } else { ++// MotifWmHints hints; ++// hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; ++// hints.functions = MWM_FUNC_ALL; ++// hints.decorations = MWM_DECOR_BORDER; ++// XAtomHelper::getInstance()->setWindowMotifHint(mKyFileDialog->winId(), hints); ++// } ++ kdk::UkuiStyleHelper::self()->removeHeader(mKyFileDialog); + + + mKyFileDialog->delayShow(); +diff --git a/qt5-ukui-filedialog/kyfiledialog.h b/qt5-ukui-filedialog/kyfiledialog.h +index 67ee5c3..012ee6a 100644 +--- a/qt5-ukui-filedialog/kyfiledialog.h ++++ b/qt5-ukui-filedialog/kyfiledialog.h +@@ -1,3 +1,25 @@ ++/* ++ * KWin Style UKUI ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Jing Tan <tanjing@kylinos.cn> ++ * ++ */ ++ + #ifndef KYNATIVEFILEDIALOG_H + #define KYNATIVEFILEDIALOG_H + #include <QDialog> +@@ -60,6 +82,9 @@ class DirectoryViewContainer; + class DirectoryViewWidget; + class FMWindowIface; + } ++ ++namespace UKUIFileDialog { ++ + class Ui_KyFileDialog; + class FileDialogSideBar; + class FileDialogPathBar; +@@ -441,8 +466,6 @@ private: + private: + void initDialog(); + }; +- +- +- ++} + + #endif // KYNATIVEFILEDIALOG_H +diff --git a/qt5-ukui-filedialog/kyfiledialogprivate.cpp b/qt5-ukui-filedialog/kyfiledialogprivate.cpp +index 0326a27..f9342cc 100644 +--- a/qt5-ukui-filedialog/kyfiledialogprivate.cpp ++++ b/qt5-ukui-filedialog/kyfiledialogprivate.cpp +@@ -1,10 +1,34 @@ ++/* ++ * KWin Style UKUI ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Jing Tan <tanjing@kylinos.cn> ++ * ++ */ ++ ++#include "debug.h" ++ ++#include "kyfiledialogprivate.h" + #include <QFileDialog> + #include <QTimer> + #include <QLineEdit> + #include "kyfiledialog.h" + #include "uikyfiledialog.h" +-#include "kyfiledialogprivate.h" +- ++using namespace UKUIFileDialog; + KyNativeFileDialogPrivate::KyNativeFileDialogPrivate() + { + // Q_Q(KyNativeFileDialog); +diff --git a/qt5-ukui-filedialog/kyfiledialogprivate.h b/qt5-ukui-filedialog/kyfiledialogprivate.h +index fa0ac82..28cc0cd 100644 +--- a/qt5-ukui-filedialog/kyfiledialogprivate.h ++++ b/qt5-ukui-filedialog/kyfiledialogprivate.h +@@ -1,3 +1,26 @@ ++/* ++ * KWin Style UKUI ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Jing Tan <tanjing@kylinos.cn> ++ * ++ */ ++ ++#include "debug.h" + #ifndef KYNATIVEFILEDIALOGPRIVATE_H + #define KYNATIVEFILEDIALOGPRIVATE_H + +@@ -7,6 +30,8 @@ + namespace Peony { + class DirectoryViewContainer; + } ++namespace UKUIFileDialog { ++ + class KyFileDialogHelper; + class KyNativeFileDialogPrivate + { +@@ -27,6 +52,7 @@ private: + QTimer *m_timer = nullptr; + QDir::Filters filters = QDir::AllEntries; + }; ++} + + #endif // KYNATIVEFILEDIALOGPRIVATE_H + +diff --git a/qt5-ukui-filedialog/menutoolbutoon.cpp b/qt5-ukui-filedialog/menutoolbutoon.cpp +index 4ce8566..8c51857 100644 +--- a/qt5-ukui-filedialog/menutoolbutoon.cpp ++++ b/qt5-ukui-filedialog/menutoolbutoon.cpp +@@ -1,8 +1,44 @@ +-#include <QApplication> ++/* ++ * KWin Style UKUI ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Jing Tan <tanjing@kylinos.cn> ++ * ++ */ ++ ++#include "debug.h" + #include "menutoolbutoon.h" ++#include <QApplication> ++#include <QDBusInterface> ++using namespace UKUIFileDialog; ++ + static ToolButtonStyle *global_instance = nullptr; + + MenuToolButton::MenuToolButton(QWidget *parent) : QToolButton(parent) ++{ ++ setStyle(ToolButtonStyle::getStyle()); ++ ++ QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); ++ if(interFace->isValid()){ ++ connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(tableModeChanged(bool))); ++ } ++} ++ ++void MenuToolButton::tableModeChanged(bool isTableMode) + { + setStyle(ToolButtonStyle::getStyle()); + } +diff --git a/qt5-ukui-filedialog/menutoolbutoon.h b/qt5-ukui-filedialog/menutoolbutoon.h +index b7d9281..2854992 100644 +--- a/qt5-ukui-filedialog/menutoolbutoon.h ++++ b/qt5-ukui-filedialog/menutoolbutoon.h +@@ -1,10 +1,34 @@ ++/* ++ * KWin Style UKUI ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Jing Tan <tanjing@kylinos.cn> ++ * ++ */ ++ ++#include "debug.h" ++ + #ifndef MENUTOOLBUTTON_H + #define MENUTOOLBUTTON_H + #include <QToolButton> + #include <QProxyStyle> + #include <QStyleOption> + #include <QPainter> +- ++namespace UKUIFileDialog { + class MenuToolButton : public QToolButton + { + Q_OBJECT +@@ -16,6 +40,7 @@ Q_SIGNALS: + + + public Q_SLOTS: ++ void tableModeChanged(bool isTableMode); + + }; + +@@ -33,4 +58,5 @@ class ToolButtonStyle : public QProxyStyle + void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget = nullptr) const override; + void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = nullptr) const override; + }; ++} + #endif // MENUTOOLBUTTON_H +diff --git a/qt5-ukui-filedialog/pathbar.cpp b/qt5-ukui-filedialog/pathbar.cpp +index 6d5531d..a14488f 100644 +--- a/qt5-ukui-filedialog/pathbar.cpp ++++ b/qt5-ukui-filedialog/pathbar.cpp +@@ -1,17 +1,42 @@ + #include <QDebug> + #include <QObject> ++#include <QDBusInterface> ++#include <QDBusMessage> + #include <PeonyPathCompleter> + #include <PeonyPathBarModel> + #include <peony-qt/file-utils.h> + #include "debug.h" + #include "pathbar.h" ++#include "settings/ukui-style-settings.h" ++using namespace UKUIFileDialog; + + FileDialogPathBar::FileDialogPathBar(QWidget *parent) : QWidget(parent)//Peony::AdvancedLocationBar(parent)//QLineEdit(parent)// + { + setAttribute(Qt::WA_TranslucentBackground); ++ setContentsMargins(0,0,0,0); + m_pathBar = new Peony::AdvancedLocationBar(this); +- m_pathBar->setFixedWidth(this->width()); +- m_pathBar->setGeometry(0, (this->height() - m_pathBar->height()) / 2, this->width(), m_pathBar->height()); ++ ++ QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); ++ if(interFace->isValid()){ ++ connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(updateTableModel(bool))); ++ } ++ ++ ++ QDBusMessage message = QDBusMessage::createMethodCall("com.kylin.statusmanager.interface", ++ "/", ++ "com.kylin.statusmanager.interface", ++ "get_current_tabletmode"); ++ QDBusMessage ret = QDBusConnection::sessionBus().call(message); ++ if (ret.type() != QDBusMessage::ReplyMessage) ++ { ++ //从返回参数获取返回值 ++ pDebug << "complex type failed!"; ++ updateTableModel(false); ++ } ++ else ++ { ++ updateTableModel(ret.arguments()[0].value<bool>()); ++ } + } + + FileDialogPathBar::~FileDialogPathBar() +@@ -38,3 +63,18 @@ Peony::AdvancedLocationBar *FileDialogPathBar::getPathBar() + { + return m_pathBar; + } ++ ++void FileDialogPathBar::updateTableModel(bool isTable) ++{ ++ pDebug << "updateTableModel...." << isTable; ++// m_pathBar->updateTabletModeValue(isTable); ++ if(isTable){ ++ m_pathBar->setFixedHeight(48); ++ this->setFixedHeight(48); ++ } ++ else{ ++ m_pathBar->setFixedHeight(36); ++ this->setFixedHeight(36); ++ } ++ pDebug << "m_pathBar height1111:" << m_pathBar->height() << this->height(); ++} +diff --git a/qt5-ukui-filedialog/pathbar.h b/qt5-ukui-filedialog/pathbar.h +index d03a0eb..0a64214 100644 +--- a/qt5-ukui-filedialog/pathbar.h ++++ b/qt5-ukui-filedialog/pathbar.h +@@ -1,9 +1,34 @@ ++/* ++ * KWin Style UKUI ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Jing Tan <tanjing@kylinos.cn> ++ * ++ */ ++ ++#include "debug.h" ++ + #ifndef PATHBAR_H + #define PATHBAR_H + #include <QLineEdit> + #include <QResizeEvent> + #include <peony-qt/controls/navigation-bar/advanced-location-bar.h> + ++namespace UKUIFileDialog { + class FileDialogPathBar : public QWidget//public QLineEdit// + { + Q_OBJECT +@@ -20,8 +45,10 @@ Q_SIGNALS: + void searchRequest(const QString &path, const QString &key); + + public Q_SLOTS: ++ void updateTableModel(bool isTable); + void updatePath(const QString &uri); + private: + Peony::AdvancedLocationBar *m_pathBar = nullptr; + }; ++} + #endif // PATHBAR_H +diff --git a/qt5-ukui-filedialog/sidebar.cpp b/qt5-ukui-filedialog/sidebar.cpp +index 4bab99b..a87d240 100644 +--- a/qt5-ukui-filedialog/sidebar.cpp ++++ b/qt5-ukui-filedialog/sidebar.cpp +@@ -10,6 +10,8 @@ + #include <QMessageBox> + #include <QToolTip> + #include <QScreen> ++#include <QDBusInterface> ++#include "kyfiledialog.h" + #include "peony-qt/controls/menu/side-bar-menu/side-bar-menu.h" + #include "peony-qt/side-bar-abstract-item.h" + #include "peony-qt/volume-manager.h" +@@ -26,7 +28,7 @@ + #include "sidebar.h" + + using namespace Peony; +- ++using namespace UKUIFileDialog; + FileDialogComboBox::FileDialogComboBox(QWidget *parent):QComboBox(parent) + { + if (QGSettings::isSchemaInstalled("org.ukui.style")) { +@@ -41,7 +43,17 @@ FileDialogComboBox::FileDialogComboBox(QWidget *parent):QComboBox(parent) + pDebug << "setStyleChanged m_styleChanged:" << change; + m_styleChanged = change; + }); ++ QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); ++ if(interFace->isValid()){ ++ connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(tableModeChanged(bool))); ++ } + m_minSize = this->minimumSize(); ++ pDebug << "combobox minsize...." << m_minSize; ++} ++ ++void FileDialogComboBox::tableModeChanged(bool isTableMode) ++{ ++ m_styleChanged = true; + } + + QSize FileDialogComboBox::minimumSizeHint() const +@@ -223,6 +235,11 @@ FileDialogSideBar::FileDialogSideBar(QWidget *parent) : QTreeView(parent) + } + }); + ++ QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); ++ if(interFace->isValid()){ ++ connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(tableModeChanged(bool))); ++ } ++ + // if (QGSettings::isSchemaInstalled("org.ukui.style")) { + // auto settings = UKUIStyleSettings::globalInstance(); + // connect(settings, &QGSettings::changed, this, [=](const QString &key){ +@@ -256,6 +273,12 @@ FileDialogSideBar::~FileDialogSideBar() + } + } + ++void FileDialogSideBar::tableModeChanged(bool isTableMode) ++{ ++ pDebug << "tableModeChanged........"; ++// setStyle(SideBarStyle::getStyle()); ++} ++ + void FileDialogSideBar::resizeEvent(QResizeEvent *e) + { + setViewportMargins(8, 4, 4, 4); +diff --git a/qt5-ukui-filedialog/sidebar.h b/qt5-ukui-filedialog/sidebar.h +index 69f51ee..d7731da 100644 +--- a/qt5-ukui-filedialog/sidebar.h ++++ b/qt5-ukui-filedialog/sidebar.h +@@ -1,3 +1,26 @@ ++/* ++ * KWin Style UKUI ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Jing Tan <tanjing@kylinos.cn> ++ * ++ */ ++ ++#include "debug.h" + #ifndef SIDEBAR_H + #define SIDEBAR_H + #include <QTreeView> +@@ -13,6 +36,7 @@ + #include <QSize> + #include <PeonySideBarModel> + ++namespace UKUIFileDialog { + class FileDialogComboBox : public QComboBox + { + Q_OBJECT +@@ -21,6 +45,9 @@ public: + ~FileDialogComboBox(){} + QSize minimumSizeHint() const; + ++public Q_SLOTS: ++ void tableModeChanged(bool isTableMode); ++ + Q_SIGNALS: + void setStyleChanged(bool change) const; + +@@ -55,6 +82,7 @@ public: + + public Q_SLOTS: + void menuRequest(const QPoint &pos); ++ void tableModeChanged(bool isTableMode); + + private: + Peony::SideBarProxyFilterSortModel *m_proxyModel = nullptr; +@@ -75,4 +103,5 @@ public: + void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override; + void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override; + }; ++} + #endif // SIDEBAR_H +diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_bo_CN.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_bo_CN.ts +index 2c6c5ad..cd2450d 100644 +--- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_bo_CN.ts ++++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_bo_CN.ts +@@ -2,7 +2,7 @@ + <!DOCTYPE TS> + <TS version="2.1" language="bo_CN"> + <context> +- <name>KyFileDialogHelper</name> ++ <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> +@@ -20,7 +20,7 @@ + </message> + </context> + <context> +- <name>KyFileDialogRename</name> ++ <name>UKUIFileDialog::KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> +@@ -195,7 +195,7 @@ + </message> + </context> + <context> +- <name>KyNativeFileDialog</name> ++ <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> +diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_cs.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_cs.ts +index 1677c00..c714a9d 100644 +--- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_cs.ts ++++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_cs.ts +@@ -2,7 +2,7 @@ + <!DOCTYPE TS> + <TS version="2.1" language="cs_CZ"> + <context> +- <name>KyFileDialogHelper</name> ++ <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> +@@ -20,7 +20,7 @@ + </message> + </context> + <context> +- <name>KyFileDialogRename</name> ++ <name>UKUIFileDialog::KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> +@@ -143,7 +143,7 @@ + </message> + </context> + <context> +- <name>KyNativeFileDialog</name> ++ <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> +diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_en_US.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_en_US.ts +index c940e45..6c25374 100644 +--- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_en_US.ts ++++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_en_US.ts +@@ -2,7 +2,7 @@ + <!DOCTYPE TS> + <TS version="2.1" language="en_US"> + <context> +- <name>KyFileDialogHelper</name> ++ <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> +@@ -20,7 +20,7 @@ + </message> + </context> + <context> +- <name>KyFileDialogRename</name> ++ <name>UKUIFileDialog::KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> +@@ -199,7 +199,7 @@ + </message> + </context> + <context> +- <name>KyNativeFileDialog</name> ++ <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> +diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fa.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fa.ts +index 4e7cbd4..c95d7e8 100644 +--- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fa.ts ++++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fa.ts +@@ -2,7 +2,7 @@ + <!DOCTYPE TS> + <TS version="2.1" language="fa_IR"> + <context> +- <name>KyFileDialogHelper</name> ++ <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> +@@ -20,7 +20,7 @@ + </message> + </context> + <context> +- <name>KyFileDialogRename</name> ++ <name>UKUIFileDialog::KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> +@@ -143,7 +143,7 @@ + </message> + </context> + <context> +- <name>KyNativeFileDialog</name> ++ <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> +diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fr.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fr.ts +index 8fd444d..66ddb05 100644 +--- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fr.ts ++++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fr.ts +@@ -2,7 +2,7 @@ + <!DOCTYPE TS> + <TS version="2.1" language="fr_FR"> + <context> +- <name>KyFileDialogHelper</name> ++ <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> +@@ -20,7 +20,7 @@ + </message> + </context> + <context> +- <name>KyFileDialogRename</name> ++ <name>UKUIFileDialog::KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> +@@ -143,7 +143,7 @@ + </message> + </context> + <context> +- <name>KyNativeFileDialog</name> ++ <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> +diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts +index ed05623..7791cb3 100644 +--- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts ++++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts +@@ -2,7 +2,7 @@ + <!DOCTYPE TS> + <TS version="2.1" language="kk_KZ"> + <context> +- <name>KyFileDialogHelper</name> ++ <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> +@@ -20,7 +20,7 @@ + </message> + </context> + <context> +- <name>KyFileDialogRename</name> ++ <name>UKUIFileDialog::KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> +@@ -143,7 +143,7 @@ + </message> + </context> + <context> +- <name>KyNativeFileDialog</name> ++ <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> +diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts +index 5406363..0e2da26 100644 +--- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts ++++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts +@@ -2,7 +2,7 @@ + <!DOCTYPE TS> + <TS version="2.1" language="ky_KG"> + <context> +- <name>KyFileDialogHelper</name> ++ <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> +@@ -20,7 +20,7 @@ + </message> + </context> + <context> +- <name>KyFileDialogRename</name> ++ <name>UKUIFileDialog::KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> +@@ -143,7 +143,7 @@ + </message> + </context> + <context> +- <name>KyNativeFileDialog</name> ++ <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> +diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_mn.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_mn.ts +index d1a1c1a..a3eeeb5 100644 +--- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_mn.ts ++++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_mn.ts +@@ -2,7 +2,7 @@ + <!DOCTYPE TS> + <TS version="2.1" language="mn_MN"> + <context> +- <name>KyFileDialogHelper</name> ++ <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> +@@ -20,7 +20,7 @@ + </message> + </context> + <context> +- <name>KyFileDialogRename</name> ++ <name>UKUIFileDialog::KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> +@@ -195,7 +195,7 @@ + </message> + </context> + <context> +- <name>KyNativeFileDialog</name> ++ <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> +diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_tr.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_tr.ts +index d4a4944..9ea69cd 100644 +--- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_tr.ts ++++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_tr.ts +@@ -2,7 +2,7 @@ + <!DOCTYPE TS> + <TS version="2.1" language="tr_TR"> + <context> +- <name>KyFileDialogHelper</name> ++ <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> +@@ -20,7 +20,7 @@ + </message> + </context> + <context> +- <name>KyFileDialogRename</name> ++ <name>UKUIFileDialog::KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> +@@ -143,7 +143,7 @@ + </message> + </context> + <context> +- <name>KyNativeFileDialog</name> ++ <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> +diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts +index cb4bf7b..a5b2a3f 100644 +--- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts ++++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts +@@ -2,7 +2,7 @@ + <!DOCTYPE TS> + <TS version="2.1" language="ug_CN"> + <context> +- <name>KyFileDialogHelper</name> ++ <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> +@@ -20,7 +20,7 @@ + </message> + </context> + <context> +- <name>KyFileDialogRename</name> ++ <name>UKUIFileDialog::KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> +@@ -143,7 +143,7 @@ + </message> + </context> + <context> +- <name>KyNativeFileDialog</name> ++ <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> +diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_CN.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_CN.ts +index 01e7811..678cd56 100644 +--- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_CN.ts ++++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_CN.ts +@@ -2,7 +2,7 @@ + <!DOCTYPE TS> + <TS version="2.1" language="zh_CN"> + <context> +- <name>KyFileDialogHelper</name> ++ <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> +@@ -20,7 +20,7 @@ + </message> + </context> + <context> +- <name>KyFileDialogRename</name> ++ <name>UKUIFileDialog::KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> +@@ -207,7 +207,7 @@ + </message> + </context> + <context> +- <name>KyNativeFileDialog</name> ++ <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> +diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_HK.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_HK.ts +index 7b976d0..4fddd62 100644 +--- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_HK.ts ++++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_HK.ts +@@ -2,7 +2,7 @@ + <!DOCTYPE TS> + <TS version="2.1" language="zh"> + <context> +- <name>KyFileDialogHelper</name> ++ <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> +@@ -20,7 +20,7 @@ + </message> + </context> + <context> +- <name>KyFileDialogRename</name> ++ <name>UKUIFileDialog::KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> +@@ -203,7 +203,7 @@ + </message> + </context> + <context> +- <name>KyNativeFileDialog</name> ++ <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> +diff --git a/qt5-ukui-filedialog/uikyfiledialog.cpp b/qt5-ukui-filedialog/uikyfiledialog.cpp +index 79ac244..22f2c82 100644 +--- a/qt5-ukui-filedialog/uikyfiledialog.cpp ++++ b/qt5-ukui-filedialog/uikyfiledialog.cpp +@@ -4,7 +4,7 @@ + #include "kyfiledialog.h" + #include "debug.h" + #include "uikyfiledialog.h" +- ++using namespace UKUIFileDialog; + //Ui_KyFileDialog::Ui_KyFileDialog(QDialog *parent) + //{ + // setupUi(parent); +diff --git a/qt5-ukui-filedialog/uikyfiledialog.h b/qt5-ukui-filedialog/uikyfiledialog.h +index 469797e..86719b5 100644 +--- a/qt5-ukui-filedialog/uikyfiledialog.h ++++ b/qt5-ukui-filedialog/uikyfiledialog.h +@@ -1,3 +1,26 @@ ++/* ++ * KWin Style UKUI ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This program is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Jing Tan <tanjing@kylinos.cn> ++ * ++ */ ++ ++#include "debug.h" + #ifndef UI_KYFILEDIALOG_H + #define UI_KYFILEDIALOG_H + #include <QApplication> +@@ -30,6 +53,7 @@ + namespace Peony { + class DirectoryViewContainer; + } ++namespace UKUIFileDialog { + class Ui_KyFileDialog: public QWidget + { + QOBJECT_H +@@ -111,4 +135,5 @@ private: + void initLineEditLayout(QDialog *mKyFileDialog); + void intiBtnLayout(QDialog *mKyFileDialog); + }; ++} + #endif // UI_KYFILEDIALOG_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0004-.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0004-.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0004-.patch 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0004-.patch 2025-02-28 09:39:53.000000000 +0800 @@ -0,0 +1,1335 @@ +From: wuruiwen <wuruiwen@kylinos.cn> +Date: Wed, 22 Jan 2025 18:25:29 +0800 +Subject: =?utf-8?b?5Y2V6YCJ5oyJ6ZKu5Y+K5aSN6YCJ5qGG55qE5Yqo55S75a6e546w?= + +--- + .../animations/config-radiobutton-animator.cpp | 234 ++++++--- + .../animations/config-radiobutton-animator.h | 5 + + .../ukui-config-style-parameters.cpp | 6 +- + .../qt5-config-style-ukui/ukui-config-style.cpp | 565 ++++++++++++++++----- + .../widget-parameters/config-checkbox-parameters.h | 17 + + ukui-styles/readconfig.cpp | 7 +- + 6 files changed, 648 insertions(+), 186 deletions(-) + +diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.cpp +index 06fa254..93db765 100644 +--- a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.cpp ++++ b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.cpp +@@ -34,14 +34,24 @@ ConfigRadioButtonAnimator::ConfigRadioButtonAnimator(QObject *parent) : QParalle + + ConfigRadioButtonAnimator::~ConfigRadioButtonAnimator() + { +- if(m_off){ ++ if (m_off) { + m_off->deleteLater(); + m_off = nullptr; + } +- if(m_sunkenon){ ++ if (m_sunkenon) { + m_sunkenon->deleteLater(); + m_sunkenon = nullptr; + } ++ ++ if (m_off_hover) { ++ m_off_hover->deleteLater(); ++ m_off_hover = nullptr; ++ } ++ ++ if (m_on_hover) { ++ m_on_hover->deleteLater(); ++ m_on_hover = nullptr; ++ } + } + + bool ConfigRadioButtonAnimator::bindWidget(QWidget *w) +@@ -59,7 +69,8 @@ bool ConfigRadioButtonAnimator::bindWidget(QWidget *w) + m_sunkenon->setStartValue(0.0); + m_sunkenon->setEndValue(1.0); + m_sunkenon->setDuration(200); +- m_sunkenon->setEasingCurve(QEasingCurve::OutCubic); ++ m_sunkenon->setEasingCurve(QEasingCurve::Linear); ++ + + addAnimation(m_sunkenon); + +@@ -74,7 +85,7 @@ bool ConfigRadioButtonAnimator::bindWidget(QWidget *w) + m_off->setStartValue(1.0); + m_off->setEndValue(0.0); + m_off->setDuration(100); +- m_off->setEasingCurve(QEasingCurve::OutCubic); ++ m_off->setEasingCurve(QEasingCurve::Linear); + + addAnimation(m_off); + +@@ -84,23 +95,64 @@ bool ConfigRadioButtonAnimator::bindWidget(QWidget *w) + connect(m_off, &QVariantAnimation::finished, w, [=]() { + w->update(); + }); +- return true; + ++ //OffHover 动画初始化 ++ m_off_hover = new QVariantAnimation(this); ++ m_off_hover->setStartValue(0.0); ++ m_off_hover->setEndValue(1.0); ++ m_off_hover->setDuration(200); ++ m_off_hover->setEasingCurve(QEasingCurve::Linear); ++ ++ addAnimation(m_off_hover); ++ ++ connect(m_off_hover, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { ++ w->update(); ++ }); ++ connect(m_off_hover, &QVariantAnimation::finished, w, [=]() { ++ w->update(); ++ }); ++ ++ //OnHover 动画初始化 ++ m_on_hover = new QVariantAnimation(this); ++ m_on_hover->setStartValue(1.0); ++ m_on_hover->setEndValue(1.5); ++ m_on_hover->setDuration(200); ++ m_on_hover->setEasingCurve(QEasingCurve::Linear); ++ ++ addAnimation(m_on_hover); ++ ++ connect(m_on_hover, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { ++ w->update(); ++ }); ++ connect(m_on_hover, &QVariantAnimation::finished, w, [=]() { ++ w->update(); ++ }); ++ ++ return true; + } + + bool ConfigRadioButtonAnimator::unboundWidget() + { + this->stop(); + this->setDirection(QAbstractAnimation::Forward); +- if(m_off){ ++ if (m_off) { + m_off->deleteLater(); + m_off = nullptr; + } +- if(m_sunkenon){ ++ if (m_sunkenon) { + m_sunkenon->deleteLater(); + m_sunkenon = nullptr; + } + ++ if (m_off_hover) { ++ m_off_hover->deleteLater(); ++ m_off_hover = nullptr; ++ } ++ if (m_on_hover) { ++ m_on_hover->deleteLater(); ++ m_on_hover = nullptr; ++ } ++ + if (m_widget) { + this->setParent(nullptr); + return true; +@@ -111,75 +163,101 @@ bool ConfigRadioButtonAnimator::unboundWidget() + + QVariant ConfigRadioButtonAnimator::value(const QString &property) + { +- if(property == "SunKenOn") ++ if (property == "SunKenOn") { + return m_sunkenon->currentValue(); +- else if(property == "Off") ++ } else if (property == "Off") { + return m_off->currentValue(); +- else ++ } else if (property == "OffHover") { ++ return m_off_hover->currentValue(); ++ } else if (property == "OnHover") { ++ return m_on_hover->currentValue(); ++ } else { + return QVariant(); ++ } + } + + bool ConfigRadioButtonAnimator::isRunning(const QString &property) + { +- if(property == "SunKenOn"){ ++ if (property == "SunKenOn") { + return m_sunkenon->state() == Running; +- } +- else if(property == "Off") ++ } else if (property == "Off") { + return m_off->state() == Running; +- else ++ } else if (property == "OffHover") { ++ return m_off_hover->state() == Running; ++ } else if (property == "OnHover") { ++ return m_on_hover->state() == Running; ++ } else { + return this->state() == Running; ++ } ++} ++bool ConfigRadioButtonAnimator::isStopped(const QString &property) ++{ ++ if (property == "SunKenOn") { ++ return m_sunkenon->state() == Stopped; ++ } else if (property == "Off") { ++ return m_off->state() == Stopped; ++ } else if (property == "OffHover") { ++ return m_off_hover->state() == Stopped; ++ } else if (property == "OnHover") { ++ return m_on_hover->state() == Stopped; ++ } else { ++ return this->state() == Stopped; ++ } + } + + bool ConfigRadioButtonAnimator::setAnimatorStartValue(const QString &property, const QVariant &value) + { +- if(property == "SunKenOn") +- { ++ if (property == "SunKenOn") { + m_sunkenon->setStartValue(value); + return true; +- } +- else if(property == "Off") +- { ++ } else if (property == "Off") { + m_off->setStartValue(value); + return true; +- } +- else +- { ++ } else if (property == "OffHover") { ++ m_off_hover->setStartValue(value); ++ return true; ++ } else if (property == "OnHover") { ++ m_on_hover->setStartValue(value); ++ return true; ++ } else { + return false; + } + } + + bool ConfigRadioButtonAnimator::setAnimatorEndValue(const QString &property, const QVariant &value) + { +- if(property == "SunKenOn") +- { ++ if (property == "SunKenOn") { + m_sunkenon->setEndValue(value); + return true; +- } +- else if(property == "Off") +- { ++ } else if (property == "Off") { + m_off->setEndValue(value); + return true; +- } +- else +- { ++ } else if (property == "OffHover") { ++ m_off_hover->setEndValue(value); ++ return true; ++ } else if (property == "OnHover") { ++ m_on_hover->setEndValue(value); ++ return true; ++ } else { + return false; + } + } + + bool ConfigRadioButtonAnimator::setAnimatorDuration(const QString &property, int duration) + { +- if(property == "SunKenOn") +- { ++ if (property == "SunKenOn") { + m_sunkenon->setDuration(duration); + return true; +- } +- else if(property == "Off") +- { ++ } else if (property == "Off") { + m_off->setDuration(duration); + return true; +- } +- else +- { ++ } else if (property == "OffHover") { ++ m_off_hover->setDuration(duration); ++ return true; ++ } else if (property == "OnHover") { ++ m_on_hover->setDuration(duration); ++ return true; ++ } else { + return false; + } + } +@@ -187,43 +265,48 @@ bool ConfigRadioButtonAnimator::setAnimatorDuration(const QString &property, int + void ConfigRadioButtonAnimator::setAnimatorDirectionForward(const QString &property, bool forward) + { + auto d = forward? QAbstractAnimation::Forward: QAbstractAnimation::Backward; +- if(property == "SunKenOn") ++ if (property == "SunKenOn") { + m_sunkenon->setDirection(d); +- else if(property == "Off") +- { ++ } else if (property == "Off") { + m_off->setDirection(d); +- } +- else ++ } else if (property == "OffHover") { ++ m_off_hover->setDirection(d); ++ } else if (property == "OnHover") { ++ m_on_hover->setDirection(d); ++ } else { + return; ++ } + } + void ConfigRadioButtonAnimator::startAnimator(const QString &property) + { +- if(property == "SunKenOn") +- { ++ if (property == "SunKenOn") { + m_sunkenon->start(); +- } +- else if(property == "Off") +- { ++ } else if (property == "Off") { + m_off->start(); +- } +- else ++ } else if (property == "OffHover") { ++ m_off_hover->start(); ++ } else if (property == "OnHover") { ++ m_on_hover->start(); ++ } else { + this->start(); ++ } + } + + void ConfigRadioButtonAnimator::stopAnimator(const QString &property) + { +- if(property == "SunKenOn") +- { ++ if (property == "SunKenOn") { + m_sunkenon->stop(); + m_sunkenon->setCurrentTime(0); +- } +- else if(property == "Off") +- { ++ } else if (property == "Off") { + m_off->stop(); + m_off->setCurrentTime(0); +- } +- else +- { ++ } else if (property == "OffHover") { ++ m_off_hover->stop(); ++ m_off_hover->setCurrentTime(0); ++ } else if (property == "OnHover") { ++ m_on_hover->stop(); ++ m_on_hover->setCurrentTime(0); ++ } else { + this->stop(); + this->setCurrentTime(0); + } +@@ -231,30 +314,51 @@ void ConfigRadioButtonAnimator::stopAnimator(const QString &property) + + int ConfigRadioButtonAnimator::currentAnimatorTime(const QString &property) + { +- if(property == "SunKenOn") ++ if (property == "SunKenOn") { + return m_sunkenon->currentTime(); +- if(property == "Off") ++ } ++ if (property == "Off") { + return m_off->currentTime(); +- else ++ } ++ if (property == "OffHover") { ++ return m_off_hover->currentTime(); ++ } ++ if (property == "OnHover") { ++ return m_on_hover->currentTime(); ++ } else { + return this->currentTime(); ++ } + } + + void ConfigRadioButtonAnimator::setAnimatorCurrentTime(const QString &property, const int msecs) + { + if ("SunKenOn" == property) { + m_sunkenon->setCurrentTime(msecs); +- } else if("Off" == property) { ++ } else if ("Off" == property) { + m_off->setCurrentTime(msecs); ++ } else if ("OffHover" == property) { ++ m_off_hover->setCurrentTime(msecs); ++ } else if ("OnHover" == property) { ++ m_on_hover->setCurrentTime(msecs); + } + } + + int ConfigRadioButtonAnimator::totalAnimationDuration(const QString &property) + { +- if(property == "SunKenOn") ++ if (property == "SunKenOn") { + return m_sunkenon->duration(); +- if(property == "Off") ++ } ++ if (property == "Off") { + return m_off->duration(); +- else ++ } ++ if (property == "OffHover") { ++ return m_off_hover->duration(); ++ } ++ if (property == "OnHover") { ++ return m_on_hover->duration(); ++ } else { + return this->duration(); ++ } ++ + } + +diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h +index 5c66fd2..35fd42d 100644 +--- a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h ++++ b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h +@@ -54,12 +54,17 @@ public: + void setAnimatorCurrentTime(const QString &property = nullptr, const int msecs = 0); + int totalAnimationDuration(const QString &property = nullptr); + ++ bool isStopped(const QString &property = nullptr); ++ + signals: + + private: + QWidget* m_widget = nullptr; + QVariantAnimation *m_off = nullptr; + QVariantAnimation *m_sunkenon = nullptr; ++ ++ QVariantAnimation* m_off_hover = nullptr;//用于按钮off(unchecked)状态下的hover的动画对象 ++ QVariantAnimation* m_on_hover = nullptr;//用于按钮on(checked)状态下hover的动画对象 + }; + } + +diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp +index 9e3792b..cd47d93 100644 +--- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp ++++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp +@@ -2964,7 +2964,7 @@ void UKUIConfigStyleParameters::getDefaultToolTipParameters(ConfigToolTipParamet + p->toolTipBackgroundBrush = m_ToolTipParameters.toolTipBackgroundBrush; + p->toolTipBackgroundPen = m_ToolTipParameters.toolTipBackgroundPen ; + } +- ++//解析TabWidget相关颜色 + void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) + { + int tabradius = (widget && widget->property("normalRadius").isValid()) ? +@@ -3044,6 +3044,10 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const + tabBarFocusPen = widget->property("setTabBarHoverPen").value<QPen>(); + } + } ++ qDebug() << "========> widgetBackgroundBrush = " << widgetBackgroundBrush; ++ qDebug() << "========> tabBarBackgroundBrush = " << tabBarBackgroundBrush; ++ qDebug() << "========> tabBarDefaultBrush = " << tabBarDefaultBrush; ++ qDebug() << "========> tabBarHoverBrush = " << tabBarHoverBrush; + + m_TabWidgetParameters.radius = tabradius; + m_TabWidgetParameters.tabWidgetBackgroundBrush = widgetBackgroundBrush; +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 adcb917..1e1ef28 100644 +--- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp ++++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp +@@ -112,6 +112,13 @@ + #include <QProxyStyle> + #include <QDialogButtonBox> + ++// #define LOG_ENABLED ++#ifdef LOG_ENABLED ++ #define ANIMATION_LOG(str) qDebug() << str ++#else ++ #define ANIMATION_LOG(str) ++#endif ++ + using namespace UKUIConfigStyleSpace; + + const char* GESTURE_LIB = "libqt5-gesture-extensions.so.1"; +@@ -2417,7 +2424,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + } + break; + } +- ++ //绘制单选按钮指示器部分 + case PE_IndicatorRadioButton: + { + if (const QStyleOptionButton* radiobutton = qstyleoption_cast<const QStyleOptionButton*>(option)) { +@@ -2434,10 +2441,13 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + + auto animator = m_radiobutton_animation_helper->animator(widget); + +- bool hasAnimation = widget &&(!widget->property("animation").isValid() || +- (widget->property("animation").isValid() && widget->property("animation").toBool())); +- if (enable && hasAnimation && +- animator != nullptr && animator->isRunning("SunKenOn")) { ++ //bool hasAnimation = widget &&(!widget->property("animation").isValid() || ++ //(widget->property("animation").isValid() && widget->property("animation").toBool())); ++ ++ bool hasAnimation = widget && (!widget->property("animation").isValid() || widget->property("animation").toBool()); ++ ++ //SunkenOn动画运行过程:到checked过程 ++ if (enable && hasAnimation && animator != nullptr && animator->isRunning("SunKenOn")) { + float value = animator->value("SunKenOn").toFloat(); + QColor clickColor = sp->m_RadioButtonParameters.radioButtonClickBrush.color(); + QColor onDefaultPenColor = mouseOver ? sp->m_RadioButtonParameters.radioButtonOnHoverPen.color() : +@@ -2458,11 +2468,13 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + penColor.setAlphaF(onDefaultPenColor.alphaF()); + painter->setPen(QPen(QBrush(penColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); + +- painter->setBrush(brush); ++ //绘制外圆 ++ painter->setBrush(sp->m_RadioButtonParameters.radioButtonOnDefaultBrush); + painter->drawEllipse(rect); + painter->restore(); + painter->save(); + ++ //绘制内圆 + QRectF childRect(rect.x(), rect.y(), value * 1.0 * ( sp->m_RadioButtonParameters.childrenRadius), value * 1.0 * ( sp->m_RadioButtonParameters.childrenRadius)); + childRect.moveCenter(rect.center()); + painter->setPen(Qt::NoPen); +@@ -2471,9 +2483,8 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + painter->drawEllipse(childRect); + painter->restore(); + return; +- } +- else if (enable && hasAnimation && +- animator != nullptr && animator->isRunning("Off")) { ++ } else if (enable && hasAnimation && animator != nullptr && animator->isRunning("Off")) {//Off动画运行过程:到unchecked过程 ++ + float value = animator->value("Off").toFloat(); + QPen pen = sp->m_RadioButtonParameters.radioButtonDefaultPen; + pen.color().setAlphaF(sp->m_RadioButtonParameters.radioButtonDefaultPen.color().alphaF() * (1.0 - value)); +@@ -2484,9 +2495,10 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + defaultColor.green() + value * (onDefaultColor.green() - defaultColor.green()), + defaultColor.blue() + value * (onDefaultColor.blue() - defaultColor.blue()), + defaultColor.alpha() + value * (onDefaultColor.alpha() - defaultColor.alpha()))); +- ++ //绘制外圆 + painter->setBrush(brush); + painter->drawEllipse(rect); ++ //绘制内圆 + QRectF childRect(rect.x(), rect.y(), ( sp->m_RadioButtonParameters.childrenRadius) * (value) * 1.0, (value) * 1.0 * ( sp->m_RadioButtonParameters.childrenRadius)); + childRect.moveCenter(rect.center()); + painter->setPen(Qt::NoPen); +@@ -2495,37 +2507,152 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + painter->drawEllipse(childRect); + painter->restore(); + return; ++ } else if (enable && hasAnimation && animator != nullptr && animator->isRunning("OffHover")) {//OffHover动画运行过程:Off状态下执行Hover ++ ++ ANIMATION_LOG("[OffHover]: 动画运行过程中..."); ++ float value = animator->value("OffHover").toFloat(); ++ ++// QColor defaultColor = sp->m_RadioButtonParameters.radioButtonDefaultBrush.color(); ++// QColor hoverColor = sp->m_RadioButtonParameters.radioButtonHoverBrush.color();//这个brush可能没有被赋予一个颜色值 ++ ++// QColor targetColor = QColor(defaultColor.red() + value * (hoverColor.red() - defaultColor.red()), ++// defaultColor.green() + value * (hoverColor.green() - defaultColor.green()), ++// defaultColor.blue() + value * (hoverColor.blue() - defaultColor.blue()), ++// defaultColor.alpha() + value * (hoverColor.alpha() - defaultColor.alpha()) ++// ); ++ ++ painter->setPen(sp->m_RadioButtonParameters.radioButtonHoverPen); ++ painter->setBrush(sp->m_RadioButtonParameters.radioButtonHoverBrush); ++ painter->setOpacity(value);//动画控制不透明度值 ++ painter->drawEllipse(rect); ++ painter->restore(); ++ ++ ANIMATION_LOG("[OffHover Running]: currentTime = " << animator->currentAnimatorTime("OffHover") << ", duration = " << animator->totalAnimationDuration("OffHover") << " , value = " << value); ++ return; ++ } else if (enable && hasAnimation && animator != nullptr && animator->isRunning("OnHover")) {//onHover动画运行过程:On状态下执行Hover ++ ++ ANIMATION_LOG("[OnHover]: 动画运行过程中..."); ++ float value = animator->value("OnHover").toFloat(); ++ ++ QColor clickColor = sp->m_RadioButtonParameters.radioButtonClickBrush.color(); ++ QColor onDefaultPenColor = mouseOver ? sp->m_RadioButtonParameters.radioButtonOnHoverPen.color() : ++ sp->m_RadioButtonParameters.radioButtonOnDefaultPen.color(); ++// QColor onDefaultColor = mouseOver ? sp->m_RadioButtonParameters.radioButtonOnClickBrush.color() : ++// sp->m_RadioButtonParameters.radioButtonOnDefaultBrush.color(); ++ QColor frameColor = mouseOver ? sp->m_RadioButtonParameters.radioButtonHoverPen.color() : ++ sp->m_RadioButtonParameters.radioButtonDefaultPen.color(); ++// QBrush brush(QColor(clickColor.red() + value * (onDefaultColor.red() - clickColor.red()), ++// clickColor.green() + value * (onDefaultColor.green() - clickColor.green()), ++// clickColor.blue() + value * (onDefaultColor.blue() - clickColor.blue()), ++// clickColor.alpha() + value * (onDefaultColor.alpha() - clickColor.alpha()))); ++ QBrush frameBrush(QColor(frameColor.red() + value * (onDefaultPenColor.red() - frameColor.red()), ++ frameColor.green() + value * (onDefaultPenColor.green() - frameColor.green()), ++ frameColor.blue() + value * (onDefaultPenColor.blue() - frameColor.blue()), ++ frameColor.alpha() + value * (onDefaultPenColor.alpha() - frameColor.alpha()))); ++ ++ QColor penColor = frameBrush.color(); ++ penColor.setAlphaF(onDefaultPenColor.alphaF()); ++ painter->setPen(QPen(QBrush(penColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); ++ ++ //绘制外圆 ++ painter->setRenderHint(QPainter::Antialiasing); ++ painter->setPen(sp->m_RadioButtonParameters.radioButtonOnHoverPen); ++ painter->setBrush(sp->m_RadioButtonParameters.radioButtonOnHoverBrush); ++ painter->drawEllipse(rect); ++ ++ painter->restore(); ++ painter->save(); ++ ++ //绘制内圆 ++ QRectF childRect(rect.x(), rect.y(), value * ( sp->m_RadioButtonParameters.childrenRadius), value * ( sp->m_RadioButtonParameters.childrenRadius)); ++ ANIMATION_LOG("value = " << value << " , OnHover动画绘制内圆 (w,h) = " << "(" << value * ( sp->m_RadioButtonParameters.childrenRadius) << "," << value * ( sp->m_RadioButtonParameters.childrenRadius) << ") , 默认宽高 = (" << sp->m_RadioButtonParameters.childrenRadius << "," << sp->m_RadioButtonParameters.childrenRadius << ")"); ++ childRect.moveCenter(rect.center()); ++ painter->setPen(Qt::NoPen); ++ painter->setRenderHint(QPainter::Antialiasing); ++ painter->setBrush(sp->m_RadioButtonParameters.radioButtonChildrenOnDefaultBrush); ++ painter->drawEllipse(childRect); ++ painter->restore(); ++ return; + } + ++ //各动画的开启、结束处理 + if (enable) { + if (on) { +- if (animator != nullptr) { +- if (hasAnimation && !animator->isRunning("SunKenOn") ) { +- if(animator->currentAnimatorTime("SunKenOn") == 0){ +- animator->startAnimator("SunKenOn"); +- animator->setAnimatorCurrentTime("Off", 0); +- painter->setPen(sp->m_RadioButtonParameters.radioButtonDefaultPen); +- painter->setBrush(sp->m_RadioButtonParameters.radioButtonDefaultBrush); +- painter->drawEllipse(rect); +- painter->restore(); +- return; +- } +- } ++ if (animator != nullptr && hasAnimation && !animator->isRunning("SunKenOn") && animator->currentAnimatorTime("SunKenOn") == 0) { ++ animator->startAnimator("SunKenOn");//开启sunken动画 ++ animator->setAnimatorCurrentTime("OnHover",0);//前运行过的动画置为初始状态 ++ animator->stopAnimator("OffHover"); ++ animator->setAnimatorCurrentTime("OffHover",0); ++ animator->setAnimatorCurrentTime("Off", 0); ++ ++ //绘制on动画开始前,即Off状态 ++ painter->setPen(sp->m_RadioButtonParameters.radioButtonDefaultPen); ++ painter->setBrush(Qt::NoBrush); ++ painter->drawEllipse(rect); ++ painter->restore(); ++ return; + } + if (sunKen) { + painter->setPen(sp->m_RadioButtonParameters.radioButtonOnClickPen); + painter->setBrush(sp->m_RadioButtonParameters.radioButtonOnClickBrush); +- } else if (mouseOver) { +- painter->setPen(sp->m_RadioButtonParameters.radioButtonOnHoverPen); +- painter->setBrush(sp->m_RadioButtonParameters.radioButtonOnHoverBrush); +- } else { ++ } else if (mouseOver) {//需要开启OnHover动画 ++ ++ //painter->setPen(sp->m_RadioButtonParameters.radioButtonOnHoverPen); ++ //painter->setBrush(sp->m_RadioButtonParameters.radioButtonOnHoverBrush); ++ ++ //情况1:on——>hover,第一次执行: ++ if(!animator->isRunning("OnHover") && animator->currentAnimatorTime("OnHover") == 0) { ++ ANIMATION_LOG("开启 [OnHover] 动画"); ++ animator->startAnimator("OnHover"); ++ //animator->setAnimatorCurrentTime("Off",0);//重置上一个动画Off ++ //animator->setAnimatorCurrentTime("SunKenOn",0);//重置上一个动画SunkenOn动画 ++ ++ //绘制原始静态On状态下的内外圆 ++ painter->setPen(sp->m_RadioButtonParameters.radioButtonOnDefaultPen); ++ painter->setBrush(sp->m_RadioButtonParameters.radioButtonOnDefaultBrush); ++ painter->drawEllipse(rect); ++ painter->restore(); ++ painter->save(); ++ ++ //若onHover动画结束后,仍处于hover状态 ++ QRectF childRect(rect.x(), rect.y(), sp->m_RadioButtonParameters.childrenRadius, sp->m_RadioButtonParameters.childrenRadius); ++ childRect.moveCenter(rect.center()); ++ painter->setPen(Qt::NoPen); ++ painter->setRenderHint(QPainter::Antialiasing); ++ painter->setBrush(sp->m_RadioButtonParameters.radioButtonChildrenOnDefaultBrush); ++ painter->drawEllipse(childRect); ++ painter->restore(); ++ return ; ++ } else if (!animator->isRunning("OnHover") && animator->currentAnimatorTime("OnHover") > 0) { ++ //情况2:onHover动画绘制结束 ++ //不能return,需绘制内容 ++ ANIMATION_LOG("[OnHover] 动画绘制结束/暂停"); ++ painter->setPen(Qt::NoPen); ++ painter->setBrush(sp->m_RadioButtonParameters.radioButtonOnDefaultBrush); ++ } ++ } else {//鼠标不处于hover状态,即鼠标已经移出了圆圈,则需要停止、重置OnHover动画 ++ + painter->setPen(sp->m_RadioButtonParameters.radioButtonOnDefaultPen); + painter->setBrush(sp->m_RadioButtonParameters.radioButtonOnDefaultBrush); ++ ++ animator->stopAnimator("OnHover"); ++ animator->setAnimatorCurrentTime("OnHover",0); + } ++ //处理——on状态下的静态/默认绘制:绘制内外圆 ++ painter->setBrush(sp->m_RadioButtonParameters.radioButtonOnDefaultBrush); ++ + painter->drawEllipse(rect); + painter->restore(); + painter->save(); +- QRectF childRect(rect.x(), rect.y(), sp->m_RadioButtonParameters.childrenRadius, sp->m_RadioButtonParameters.childrenRadius); ++ ++ //若onHover动画结束后,仍处于hover状态 ++ QRectF childRect; ++// QRectF childRect(rect.x(), rect.y(), sp->m_RadioButtonParameters.childrenRadius, sp->m_RadioButtonParameters.childrenRadius); ++ if (mouseOver) { ++ childRect = QRectF(rect.x(), rect.y(), 1.5 * 1.0 * sp->m_RadioButtonParameters.childrenRadius, 1.5 * 1.0 * sp->m_RadioButtonParameters.childrenRadius); ++ } else { ++ childRect = QRectF(rect.x(), rect.y(), sp->m_RadioButtonParameters.childrenRadius, sp->m_RadioButtonParameters.childrenRadius); ++ } + childRect.moveCenter(rect.center()); + painter->setPen(Qt::NoPen); + painter->setRenderHint(QPainter::Antialiasing); +@@ -2534,11 +2661,14 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + + painter->restore(); + return; +- } else { ++ } else {//Off ++ + if (hasAnimation && animator != nullptr) { ++ //On——>Off动作的处理 + if (!animator->isRunning("Off") && animator->currentAnimatorTime("SunKenOn") > 0 && animator->currentAnimatorTime("Off") == 0) { +- animator->startAnimator("Off"); +- animator->setAnimatorCurrentTime("SunKenOn", 0); ++ ANIMATION_LOG("开启[Off]动画"); ++ animator->startAnimator("Off");//开启Off动画 ++ animator->setAnimatorCurrentTime("SunKenOn", 0);//重置上一个sunken动画 + painter->restore(); + return; + } +@@ -2547,15 +2677,57 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + painter->setPen(sp->m_RadioButtonParameters.radioButtonClickPen); + painter->setBrush(sp->m_RadioButtonParameters.radioButtonClickBrush); + } else if (mouseOver) { +- painter->setPen(sp->m_RadioButtonParameters.radioButtonHoverPen); +- painter->setBrush(sp->m_RadioButtonParameters.radioButtonHoverBrush); +- } else { ++ //painter->setPen(sp->m_RadioButtonParameters.radioButtonHoverPen); ++ //painter->setBrush(sp->m_RadioButtonParameters.radioButtonHoverBrush); ++ ++ //情况:初次状态,即off——>hover, ++ if (!animator->isRunning("OffHover") && animator->currentAnimatorTime("OffHover") == 0) { ++ ANIMATION_LOG("[offHover]: 动画开启"); ++ animator->startAnimator("OffHover");//开启OffHover动画 ++ animator->setAnimatorCurrentTime("Off",0);//重置上一个动画Off ++ ++ //绘制OffHover动画之前,即默认的状态 ++ painter->setPen(sp->m_RadioButtonParameters.radioButtonDefaultPen); ++ painter->setBrush(Qt::NoBrush); ++ ANIMATION_LOG("[OffHover]: 动画开启后,先进行的Off默认状态的静态绘制:radioButtonDefaultPen = " << sp->m_RadioButtonParameters.radioButtonDefaultPen.color().name()); ++ painter->drawEllipse(rect); ++ painter->restore(); ++ return ; ++ } else if (!animator->isRunning("OffHover") && animator->currentAnimatorTime("OffHover") > 0) { ++ //情况:offHover动画结束了 ++ //绘制结束状态 ++ ANIMATION_LOG("[OffHover]: 动画绘制结束/暂停"); ++ ++ animator->stopAnimator("Off"); ++ painter->setPen(sp->m_RadioButtonParameters.radioButtonHoverPen); ++ painter->setBrush(sp->m_RadioButtonParameters.radioButtonHoverBrush); ++ ANIMATION_LOG("[OffHover]: 动画绘制结束/暂停, 结束状态绘制,使用颜色 brush = " << sp->m_RadioButtonParameters.radioButtonHoverBrush.color().name()); ++ painter->drawEllipse(rect); ++ painter->restore(); ++ return ; ++ } else if (!animator->isRunning("OffHover") && animator->currentAnimatorTime("Off") > 0 && animator->currentAnimatorTime("OffHover") == 0) {//情况:On——>off——>hover ++ ANIMATION_LOG("[OffHover]: 动画开启"); ++ animator->setAnimatorCurrentTime("OffHover",0); ++ animator->startAnimator("OffHover");//开启OffHover动画 ++ animator->setAnimatorCurrentTime("Off",0);//重置上一个动画Off ++ painter->restore(); ++ return ; ++ } ++ } else {//按钮的Off默认状态绘制 ++ + painter->setPen(sp->m_RadioButtonParameters.radioButtonDefaultPen); +- painter->setBrush(sp->m_RadioButtonParameters.radioButtonDefaultBrush); ++ painter->setBrush(Qt::NoBrush); ++ ++ animator->stopAnimator("OffHover");//stop包含time置0 ++ animator->stopAnimator("OnHover"); ++ animator->stopAnimator("SunKenOn"); ++ animator->stopAnimator("Off"); + } + painter->drawEllipse(rect); ++ ANIMATION_LOG("Off状态最后的绘制: painter 使用brush = " << painter->brush().color()); + } +- } else { ++ } else {//disable状态按钮绘制 ++ + painter->setPen(sp->m_RadioButtonParameters.radioButtonDisablePen); + painter->setBrush(sp->m_RadioButtonParameters.radioButtonDisableBrush); + painter->drawEllipse(rect); +@@ -2573,7 +2745,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + } + break; + } +- ++ //复选框指示器部分绘制 + case PE_IndicatorCheckBox: + { + if (const QStyleOptionButton *checkbox = qstyleoption_cast<const QStyleOptionButton*>(option)) { +@@ -2588,6 +2760,23 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + QRectF pathrect = rect.adjusted(1, 1, -1, -1); + double width = pathrect.width(); + double heigth = pathrect.height(); ++ ++ ++ //hookRect用于绘制对钩的基准矩形 ++ //hLineRect用于绘制水平线的基准矩形 ++ QRectF hookRect = rect.adjusted(rect.width()*0.17, rect.height()*0.28, -1*rect.width()*0.10, -1*rect.height()*0.21); ++ hookRect.moveCenter(rect.center()); ++ QRectF hLineRect= pathrect; ++ ++ //原始默认的hookRect内部的绘制对钩的路径点 ++ QPointF startPoint(1.0*hookRect.x(),hookRect.y()+0.53*hookRect.height()); ++ QPointF midBottomPoint(hookRect.x()+0.41*hookRect.width(),1.0*hookRect.y()+hookRect.height()); ++ QPointF topRightPoint(1.0*hookRect.x()+hookRect.width(),hookRect.y()+0.15*hookRect.height()); ++ QPointF topLeftPoint(hookRect.x()+0.9*hookRect.width(),1.0*hookRect.y()); ++ QPointF midTopPoint(hookRect.x()+0.41*hookRect.width(),hookRect.y()+0.70*hookRect.height()); ++ QPointF endPoint(hookRect.x()+0.1*hookRect.width(),hookRect.y()+0.36*hookRect.height()); ++ ++ + int margin = 0; + + QPainterPath path; +@@ -2595,27 +2784,54 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + painter->setClipRect(rect); + painter->setRenderHint(QPainter::Antialiasing, sp->m_CheckBoxParameters.radius != 0); + +- bool hasAnimation = widget &&(!widget->property("animation").isValid() || +- (widget->property("animation").isValid() && widget->property("animation").toBool())); ++// bool hasAnimation = widget &&(!widget->property("animation").isValid() || ++// (widget->property("animation").isValid() && widget->property("animation").toBool())); ++ bool hasAnimation = widget && (!widget->property("animation").isValid() || widget->property("animation").toBool()); + + auto animator = m_checkbox_animation_helper->animator(widget); ++ ++ /* ++ CheckBox几种颜色: ++ checkBoxDefaultBrush = QBrush(QColor(ARGB 1, 0.901961, 0.901961, 0.901961),SolidPattern) ++ checkBoxHoverBrush = QBrush(QColor(Invalid),LinearGradientPattern) ++ checkBoxClickBrush = QBrush(QColor(Invalid),LinearGradientPattern) ++ checkBoxDisableBrush = QBrush(QColor(ARGB 1, 0.933333, 0.933333, 0.933333),SolidPattern) ++ checkBoxOnDefaultBrush = QBrush(QColor(ARGB 1, 0.470588, 0.45098, 0.960784),SolidPattern) ++ checkBoxOnHoverBrush = QBrush(QColor(Invalid),LinearGradientPattern) ++ checkBoxOnClickBrush = QBrush(QColor(Invalid),LinearGradientPattern) ++ checkBoxPathBrush = QBrush(QColor(ARGB 1, 0.470588, 0.45098, 0.960784),SolidPattern) ++ checkBoxPathDisableBrush = QBrush(QColor(ARGB 0.349996, 0, 0, 0),SolidPattern) ++ checkBoxDefaultPen = QPen(1,QBrush(QColor(ARGB 0.100008, 0, 0, 0),SolidPattern),SolidLine,32,128,QVector(),0,2) ++ checkBoxHoverPen = QPen(1,QBrush(QColor(ARGB 0.100008, 0, 0, 0),SolidPattern),SolidLine,32,128,QVector(),0,2) ++ checkBoxClickPen = QPen(1,QBrush(QColor(ARGB 0.100008, 0, 0, 0),SolidPattern),SolidLine,32,128,QVector(),0,2) ++ checkBoxOnDefaultPen = QPen(1,QBrush(QColor(ARGB 0.100008, 0, 0, 0),SolidPattern),SolidLine,32,128,QVector(),0,2) ++ checkBoxOnHoverPen = QPen(1,QBrush(QColor(ARGB 0.100008, 0, 0, 0),SolidPattern),SolidLine,32,128,QVector(),0,2) ++ checkBoxOnClickPen = QPen(1,QBrush(QColor(ARGB 0.100008, 0, 0, 0),SolidPattern),SolidLine,32,128,QVector(),0,2) ++ ++ CheckBox颜色的渐变对象有: ++ [CheckBox]: checkBoxHoverBrush = QBrush(QColor(Invalid),LinearGradientPattern) 动画未使用 ++ [CheckBox]: checkBoxClickBrush = QBrush(QColor(Invalid),LinearGradientPattern) 动画使用过 ++ [CheckBox]: checkBoxOnHoverBrush = QBrush(QColor(Invalid),LinearGradientPattern) ++ [CheckBox]: checkBoxOnClickBrush = QBrush(QColor(Invalid),LinearGradientPattern) ++ */ ++ ++ + if (hasAnimation && animator != nullptr) { +- if(animator->isRunning("OnBase")) +- { +- float value = animator->value("OnBase").toFloat(); ++ if (animator->isRunning("OnBase")) { ++ float value = animator->value("OnBase").toFloat();//0.0——>1.0 + margin = sp->m_CheckBoxParameters.checkBoxDefaultPen.width(); + +- QColor onDefaultColor = mouseOver ? (!sp->m_CheckBoxParameters.onHoverBrushIslinearGradient ? +- sp->m_CheckBoxParameters.checkBoxOnHoverBrush.color() : +- sp->m_CheckBoxParameters.checkBoxOnDefaultBrush.color()) : +- sp->m_CheckBoxParameters.checkBoxOnDefaultBrush.color(); +- QColor clickColor = sp->m_CheckBoxParameters.checkBoxClickBrush.color(); ++// QColor onDefaultColor = mouseOver ? (!sp->m_CheckBoxParameters.onHoverBrushIslinearGradient ? ++// sp->m_CheckBoxParameters.checkBoxOnHoverBrush.color() : ++// sp->m_CheckBoxParameters.checkBoxOnDefaultBrush.color()) : ++// sp->m_CheckBoxParameters.checkBoxOnDefaultBrush.color(); ++// QColor clickColor = sp->m_CheckBoxParameters.checkBoxClickBrush.color(); + QColor frameColor = sp->m_CheckBoxParameters.checkBoxClickPen.color();//checkBoxHoverPen.color(); + QColor onDefaultPenColor = mouseOver ? sp->m_CheckBoxParameters.checkBoxOnHoverPen.color() : sp->m_CheckBoxParameters.checkBoxOnDefaultPen.color(); +- QBrush brush(QColor(clickColor.red() + value * (onDefaultColor.red() - clickColor.red()), +- clickColor.green() + value * (onDefaultColor.green() - clickColor.green()), +- clickColor.blue() + value * (onDefaultColor.blue() - clickColor.blue()), +- clickColor.alpha() + value * (onDefaultColor.alpha() - clickColor.alpha()))); ++// QBrush brush(QColor(clickColor.red() + value * (onDefaultColor.red() - clickColor.red()), ++// clickColor.green() + value * (onDefaultColor.green() - clickColor.green()), ++// clickColor.blue() + value * (onDefaultColor.blue() - clickColor.blue()), ++// clickColor.alpha() + value * (onDefaultColor.alpha() - clickColor.alpha()))); + + QBrush frameBrush(QColor(frameColor.red() + value * (onDefaultPenColor.red() - frameColor.red()), + frameColor.green() + value * (onDefaultPenColor.green() - frameColor.green()), +@@ -2624,6 +2840,9 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + + QColor penColor = frameBrush.color(); + painter->setPen(QPen(QBrush(penColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));//sp->m_CheckBoxParameters.checkBoxDefaultPen); ++ ++ QBrush brush(sp->m_CheckBoxParameters.checkBoxOnDefaultBrush); ++ painter->setOpacity(value);//动画控制不透明度 + painter->setBrush(brush); + + if(painter->pen().width() == 1 && sp->m_CheckBoxParameters.radius != 0) +@@ -2631,8 +2850,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), sp->m_CheckBoxParameters.radius, sp->m_CheckBoxParameters.radius); + painter->restore(); + painter->save(); +- } +- else if (animator->isRunning("OnScale")) { ++ } else if (animator->isRunning("OnScale")) { + margin = sp->m_CheckBoxParameters.checkBoxOnDefaultPen.width(); + painter->setBrush(mouseOver ? sp->m_CheckBoxParameters.checkBoxOnHoverBrush : sp->m_CheckBoxParameters.checkBoxOnDefaultBrush); + painter->setPen(mouseOver ? sp->m_CheckBoxParameters.checkBoxOnHoverPen.color() : sp->m_CheckBoxParameters.checkBoxOnDefaultPen.color()); +@@ -2646,8 +2864,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + + + if (animator != nullptr) { +- if(hasAnimation && animator->isRunning("OnOpacity")) +- { ++ if (hasAnimation && animator->isRunning("OnOpacity")) { + float value = animator->value("OnOpacity").toFloat(); + + if (on) { +@@ -2663,8 +2880,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + brush.setColor(color); + painter->setPen(QPen(brush, 2)); + } +- } +- else{ ++ } else { + if (on) { + painter->setPen(QPen(sp->m_CheckBoxParameters.checkBoxContentPen.brush(), 1.5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); + } else if (noChange) { +@@ -2673,83 +2889,152 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + } + } + ++ //对钩、水平线 放大动画 + if (hasAnimation && animator != nullptr && animator->isRunning("OnScale")) { + float value = animator->value("OnScale").toFloat(); + if (on) { +- path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.top() + heigth / 2); +- path.lineTo(pathrect.left() + width * 0.45, pathrect.bottom() - heigth / 3 - (1.0 - value) * heigth /8); +- path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0, pathrect.top() + heigth / 3 + (1.0 - value) * heigth /6); ++ //path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.top() + heigth / 2); ++ //path.lineTo(pathrect.left() + width * 0.45, pathrect.bottom() - heigth / 3 - (1.0 - value) * heigth /8); ++ //path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0, pathrect.top() + heigth / 3 + (1.0 - value) * heigth /6); ++ ++ QRectF realTimeRect(hookRect.x(), hookRect.y(), value * 1.0 * hookRect.width(), value * 1.0 * hookRect.height()); ++ realTimeRect.moveCenter(hookRect.center()); ++ ++ auto x = realTimeRect.x(); ++ auto y = realTimeRect.y(); ++ auto w = realTimeRect.width(); ++ auto h = realTimeRect.height(); ++ ++ path.clear(); ++ path.moveTo(x,y+0.53*h); ++ path.lineTo(x+0.41*w,y+1.0*h); ++ path.lineTo(x+1.0*w,y+0.15*h); ++ path.lineTo(x+0.9*w,y); ++ path.lineTo(x+0.41*w,y+0.70*h); ++ path.lineTo(x+0.1*w,y+0.36*h); ++ path.lineTo(x,y+0.53*h); ++ ++ ANIMATION_LOG("OnScale 动画 Running: value = " << value << " , 原始hookRect.(w,h) = (" << hookRect.width() << "," << hookRect.height() << ") ,realTimeRect 放大矩形 = (" << w << "," << h << ")"); ++ ++ painter->setBrush(Qt::white);//对钩内部颜色,待封装变量 ++ + animator->setExtraProperty("nochange", false); + } else if (noChange) { ++ //path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.center().y() - 0.5); ++ //path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0 , pathrect.center().y() - 0.5); ++ ++ ANIMATION_LOG(" CheckBox: noChange Running...."); ++ ++ path.clear(); + path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.center().y() - 0.5); + path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0 , pathrect.center().y() - 0.5); ++ ++ painter->setPen(QPen(Qt::white,pathrect.height()*1.0/20));//水平线内部颜色,以及高度,待封装变量 ++ + animator->setExtraProperty("nochange", true); + } +- painter->setBrush(Qt::NoBrush); ++ //painter->setBrush(Qt::NoBrush); + painter->drawPath(path); + painter->restore(); + return; + } + +- if(path.isEmpty()) +- { ++ if (path.isEmpty()) { + if (on) { + path.moveTo(pathrect.left() + width / 4, pathrect.top() + heigth / 2); + path.lineTo(pathrect.left() + width * 0.45, pathrect.bottom() - heigth / 3); + path.lineTo(pathrect.right() - width / 4, pathrect.top() + heigth / 3); +- if(animator != nullptr) +- animator->setExtraProperty("nochange", false); ++// if(animator != nullptr) ++// animator->setExtraProperty("nochange", false); + } else if (noChange) { + path.moveTo(pathrect.left() + width / 4, pathrect.center().y()); + path.lineTo(pathrect.right() - width / 4, pathrect.center().y()); +- if(animator != nullptr) +- animator->setExtraProperty("nochange", true); ++// if(animator != nullptr) ++// animator->setExtraProperty("nochange", true); + } + } + ++ //Off动画:包括对钩、水平线的缩放 + if (hasAnimation && animator != nullptr && animator->isRunning("Off")) { +- float value = animator->value("Off").toFloat(); ++ ++ ANIMATION_LOG("[CheckBox]: Off动画运行中"); ++ float value = animator->value("Off").toFloat();//1.0——>0.0 + + margin = sp->m_CheckBoxParameters.checkBoxDefaultPen.width(); + QPen pen = mouseOver ? sp->m_CheckBoxParameters.checkBoxHoverPen : sp->m_CheckBoxParameters.checkBoxDefaultPen; + pen.color().setAlphaF(sp->m_CheckBoxParameters.checkBoxDefaultPen.color().alphaF() * (1.0 - value)); + painter->setPen(pen); +- QColor defaultColor = mouseOver ? (sp->m_CheckBoxParameters.onHoverBrushIslinearGradient ? +- sp->m_CheckBoxParameters.checkBoxClickBrush.color() : sp->m_CheckBoxParameters.checkBoxDefaultBrush.color()): +- sp->m_CheckBoxParameters.checkBoxDefaultBrush.color(); +- QColor onDefaultColor = mouseOver ? sp->m_CheckBoxParameters.checkBoxOnClickBrush.color() : sp->m_CheckBoxParameters.checkBoxOnClickBrush.color(); +- QBrush brush(QColor(defaultColor.red() + value * (onDefaultColor.red() - defaultColor.red()), +- defaultColor.green() + value * (onDefaultColor.green() - defaultColor.green()), +- defaultColor.blue() + value * (onDefaultColor.blue() - defaultColor.blue()), +- defaultColor.alpha() + value * (onDefaultColor.alpha() - defaultColor.alpha()))); +- painter->setBrush(brush); +- if(painter->pen().width() == 1 && sp->m_CheckBoxParameters.radius != 0) ++ ++// QColor defaultColor = mouseOver ? (sp->m_CheckBoxParameters.onHoverBrushIslinearGradient ? ++// sp->m_CheckBoxParameters.checkBoxClickBrush.color() : sp->m_CheckBoxParameters.checkBoxDefaultBrush.color()): ++// sp->m_CheckBoxParameters.checkBoxDefaultBrush.color(); ++// QColor onDefaultColor = mouseOver ? sp->m_CheckBoxParameters.checkBoxOnClickBrush.color() : sp->m_CheckBoxParameters.checkBoxOnClickBrush.color(); ++// QBrush brush(QColor(defaultColor.red() + value * (onDefaultColor.red() - defaultColor.red()), ++// defaultColor.green() + value * (onDefaultColor.green() - defaultColor.green()), ++// defaultColor.blue() + value * (onDefaultColor.blue() - defaultColor.blue()), ++// defaultColor.alpha() + value * (onDefaultColor.alpha() - defaultColor.alpha()))); ++ //绘制矩形 ++ QColor startBrushColor = sp->m_CheckBoxParameters.checkBoxOnDefaultBrush.color(); ++ QColor endBrushColor = sp->m_CheckBoxParameters.checkBoxDefaultBrush.color(); ++ QBrush targetBrush(QColor(endBrushColor.red() + value * (startBrushColor.red() - endBrushColor.red()), ++ endBrushColor.green() + value * (startBrushColor.green() - endBrushColor.green()), ++ endBrushColor.blue() + value * (startBrushColor.blue() - endBrushColor.blue()), ++ endBrushColor.alpha() + value * (startBrushColor.alpha() - endBrushColor.alpha()))); ++ ++ painter->setBrush(targetBrush); ++ ++ ++ if (painter->pen().width() == 1 && sp->m_CheckBoxParameters.radius != 0) + painter->translate(0.5, 0.5); + painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), sp->m_CheckBoxParameters.radius, sp->m_CheckBoxParameters.radius); + painter->restore(); + painter->save(); +- bool _nochange = animator->getExtraProperty("noChange").toBool(); +- if (!_nochange) { +- path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.top() + heigth / 2); +- path.lineTo(pathrect.left() + width * 0.45, pathrect.bottom() - heigth / 3 - (1.0 - value) * heigth /8); +- path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0, pathrect.top() + heigth / 3 + (1.0 - value) * heigth /6); +- +- QBrush brush = sp->m_CheckBoxParameters.checkBoxContentPen.brush(); +- QColor color = brush.color(); +- color.setAlphaF(value); +- brush.setColor(color); +- painter->setPen(QPen(brush, 1.5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); ++ ++// bool _nochange = animator->getExtraProperty("noChange").toBool(); ++ bool _nochange = animator->getExtraProperty("nochange").toBool(); ++ if (!_nochange) {//缩小对钩 ++ //path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.top() + heigth / 2); ++ //path.lineTo(pathrect.left() + width * 0.45, pathrect.bottom() - heigth / 3 - (1.0 - value) * heigth /8); ++ //path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0, pathrect.top() + heigth / 3 + (1.0 - value) * heigth /6); ++ ++ QRectF realTimeRect(hookRect.x(), hookRect.y(), value * 1.0 * hookRect.width(), value * 1.0 * hookRect.height()); ++ realTimeRect.moveCenter(hookRect.center()); ++ ++ auto x = realTimeRect.x(); ++ auto y = realTimeRect.y(); ++ auto w = realTimeRect.width(); ++ auto h = realTimeRect.height(); ++ ++ path.clear(); ++ path.moveTo(x,y+0.53*h); ++ path.lineTo(x+0.41*w,y+1.0*h); ++ path.lineTo(x+1.0*w,y+0.15*h); ++ path.lineTo(x+0.9*w,y); ++ path.lineTo(x+0.41*w,y+0.70*h); ++ path.lineTo(x+0.1*w,y+0.36*h); ++ path.lineTo(x,y+0.53*h); ++ ++ ++// QBrush brush = sp->m_CheckBoxParameters.checkBoxContentPen.brush(); ++// QColor color = brush.color(); ++// color.setAlphaF(value); ++// brush.setColor(color); ++// painter->setPen(QPen(brush, 1.5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); ++ painter->setBrush(Qt::white);//对钩内部颜色,待封装变量 + painter->setRenderHint(QPainter::Antialiasing, true); +- } else if (_nochange) { ++ } else if (_nochange) {//缩小水平线 + + path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.center().y()); + path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0 , pathrect.center().y()); + +- QBrush brush = sp->m_CheckBoxParameters.checkBoxContentPen.brush(); +- QColor color = brush.color(); +- color.setAlphaF(value); +- brush.setColor(color); +- painter->setPen(QPen(brush, 2)); ++// QBrush brush = sp->m_CheckBoxParameters.checkBoxContentPen.brush(); ++// QColor color = brush.color(); ++// color.setAlphaF(value); ++// brush.setColor(color); ++// painter->setPen(QPen(brush, 2)); ++ ++ painter->setBrush(Qt::white); ++ painter->setPen(QPen(Qt::white,pathrect.height()*1.0/20));//水平线内部颜色,以及高度,待封装变量 + } + + painter->setBrush(Qt::NoBrush); +@@ -2760,24 +3045,32 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + + if (enable) { + if (on | noChange) { +- if(hasAnimation && animator != nullptr) +- { +- if(!animator->isRunning("OnBase") && animator->currentAnimatorTime("OnBase") == 0) +- { ++ if (hasAnimation && animator != nullptr) { ++ if (!animator->isRunning("OnBase") && animator->currentAnimatorTime("OnBase") == 0) { + animator->startAnimator("OnBase"); + } +- if(!animator->isRunning("OnOpacity") && animator->currentAnimatorTime("OnOpacity") == 0) +- { ++ if (!animator->isRunning("OnOpacity") && animator->currentAnimatorTime("OnOpacity") == 0) { + animator->startAnimator("OnOpacity"); + } +- if(!animator->isRunning("OnScale") && animator->currentAnimatorTime("OnScale") == 0) +- { ++ ++ bool _nochange = animator->getExtraProperty("nochange").toBool(); ++ ++ ANIMATION_LOG("=========_nochange = " << _nochange << " , on = " << on << " , noChange = " << noChange); ++ ++ //OnScale动画开启的2个条件(场景): ++ //1、初始状态:OnScale处于未执行状态,且动画值=0(意味着应用程序还未执行过OnScale) ++ //2、执行过OnScale,即currentAnimatorTime("OnScale")>0,此时需要继续开启该动画,因为复选框半选态和checked状态两两切换也需要执行动画 ++ //对于2,需要满足 当前动画(OnScale: on,nochange) 和 前一个 执行的动画(OnScale: on,nochange) 不是同一个即可 ++ ++ //if(!animator->isRunning("OnScale") && animator->currentAnimatorTime("OnScale") == 0) ++ if (!animator->isRunning("OnScale") && (animator->currentAnimatorTime("OnScale") == 0 || ( (on && _nochange) || (noChange && !_nochange) ) )) { ++ ANIMATION_LOG("=========CheckBox 开启 OnScale动画"); + animator->startAnimator("OnScale"); + margin = sp->m_CheckBoxParameters.checkBoxDefaultPen.width(); + painter->setPen(sp->m_CheckBoxParameters.checkBoxClickPen); + painter->setBrush(sp->m_CheckBoxParameters.checkBoxClickBrush); + +- if(painter->pen().width() == 1 && sp->m_CheckBoxParameters.radius != 0) ++ if (painter->pen().width() == 1 && sp->m_CheckBoxParameters.radius != 0) + painter->translate(0.5, 0.5); + painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), sp->m_CheckBoxParameters.radius, sp->m_CheckBoxParameters.radius); + painter->restore(); +@@ -2799,26 +3092,46 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + painter->setPen(sp->m_CheckBoxParameters.checkBoxOnDefaultPen); + painter->setBrush(sp->m_CheckBoxParameters.checkBoxOnDefaultBrush); + } +- if(painter->pen().width() == 1 && sp->m_CheckBoxParameters.radius != 0) ++ if (painter->pen().width() == 1 && sp->m_CheckBoxParameters.radius != 0) + painter->translate(0.5, 0.5); + painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), + sp->m_CheckBoxParameters.radius, sp->m_CheckBoxParameters.radius); + painter->restore(); + painter->save(); ++ + //draw path + if (on) { + painter->setPen(QPen(sp->m_CheckBoxParameters.checkBoxContentPen.color(), 1.5, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); + painter->setRenderHint(QPainter::Antialiasing, true); ++ //绘制On状态的静态时间点 对钩 ++ path.clear(); ++ path.moveTo(startPoint); ++ path.lineTo(midBottomPoint); ++ path.lineTo(topRightPoint); ++ path.lineTo(topLeftPoint); ++ path.lineTo(midTopPoint); ++ path.lineTo(endPoint); ++ path.lineTo(startPoint); ++ ++ painter->setBrush(Qt::white);//对钩内部颜色,待封装变量 ++ + } else if (noChange) { + painter->setPen(QPen(sp->m_CheckBoxParameters.checkBoxContentPen.color(), 1.5, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); ++ //绘制静nochange状态静态水平线 ++ path.clear(); ++ path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - 1.0 * 0.6 * width /4.0, pathrect.center().y() - 0.5); ++ path.lineTo(pathrect.right() - width / 4, pathrect.center().y() - 0.5); ++ ++ painter->setPen(QPen(Qt::white,pathrect.height()*1.0/20));//水平线内部颜色,以及高度,待封装变量 + } +- painter->setBrush(Qt::NoBrush); ++ //painter->setBrush(Qt::NoBrush); + painter->drawPath(path); +- } else { ++ } else {//Off ++ + if (animator != nullptr) { +- if(hasAnimation && !animator->isRunning("Off") && ++ if (hasAnimation && !animator->isRunning("Off") && + animator->currentAnimatorTime("Off") == 0 && + animator->currentAnimatorTime("OnScale") > 0 && + animator->currentAnimatorTime("OnOpacity") > 0 && +@@ -2834,26 +3147,35 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty + if (sunKen) { + margin = sp->m_CheckBoxParameters.checkBoxClickPen.width(); + painter->setPen(sp->m_CheckBoxParameters.checkBoxClickPen); +- painter->setBrush(sp->m_CheckBoxParameters.checkBoxClickBrush); ++// painter->setBrush(sp->m_CheckBoxParameters.checkBoxClickBrush); + } else if (mouseOver) { +- margin = sp->m_CheckBoxParameters.checkBoxHoverPen.width(); +- painter->setPen(sp->m_CheckBoxParameters.checkBoxHoverPen); +- painter->setBrush(sp->m_CheckBoxParameters.checkBoxHoverBrush); ++ //margin = sp->m_CheckBoxParameters.checkBoxHoverPen.width(); ++ //painter->setPen(sp->m_CheckBoxParameters.checkBoxHoverPen); ++ //painter->setBrush(sp->m_CheckBoxParameters.checkBoxHoverBrush); ++ ++ margin = sp->m_CheckBoxParameters.checkBoxDefaultPen.width(); ++ QPen offHoverPen(sp->m_CheckBoxParameters.checkBoxOnDefaultBrush,3); ++ painter->setPen(offHoverPen); ++// painter->setBrush(sp->m_CheckBoxParameters.checkBoxDefaultBrush); + } else { + margin = sp->m_CheckBoxParameters.checkBoxDefaultPen.width(); +- painter->setPen(sp->m_CheckBoxParameters.checkBoxDefaultPen); ++ //painter->setPen(sp->m_CheckBoxParameters.checkBoxDefaultPen); + painter->setBrush(sp->m_CheckBoxParameters.checkBoxDefaultBrush); ++ ++ QPen defaultPen(Qt::lightGray,3);//复选框默认情况下边框颜色,及厚度,待封装变量 ++ painter->setPen(defaultPen); ++ painter->setBrush(Qt::NoBrush);//默认无背景色 + } +- if(painter->pen().width() == 1 && sp->m_CheckBoxParameters.radius != 0) ++ if (painter->pen().width() == 1 && sp->m_CheckBoxParameters.radius != 0) + painter->translate(0.5, 0.5); + painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), + sp->m_CheckBoxParameters.radius, sp->m_CheckBoxParameters.radius); + } +- } else { ++ } else {//disabled + margin = sp->m_CheckBoxParameters.checkBoxDisablePen.width(); + painter->setPen(sp->m_CheckBoxParameters.checkBoxDisablePen); + painter->setBrush(sp->m_CheckBoxParameters.checkBoxDisableBrush); +- if(painter->pen().width() == 1 && sp->m_CheckBoxParameters.radius != 0) ++ if (painter->pen().width() == 1 && sp->m_CheckBoxParameters.radius != 0) + painter->translate(0.5, 0.5); + painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), + sp->m_CheckBoxParameters.radius, sp->m_CheckBoxParameters.radius); +@@ -5840,7 +6162,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp + } + return; + } break; +- ++ //绘制进度条 + case CE_ProgressBar: + { + if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { +@@ -5881,7 +6203,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp + painter->restore(); + return; + } +- ++ //绘制进度条的进度内容部分 + case CE_ProgressBarContents: + { + if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { +@@ -5959,6 +6281,15 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp + if(pb->rect.height() == 0) + rect.setHeight(0); + painter->drawRoundedRect(rect, sp->m_ProgressBarParameters.radius, sp->m_ProgressBarParameters.radius); ++ ++ //绘制移动光片 ++ //用于绘制光片的矩形区域 ++// QRectF brightChipRect = rect.adjusted(0,1,-1,-1); ++// auto x = brightChipRect.x(); ++// auto y = brightChipRect.y(); ++// auto w = brightChipRect.width(); ++// auto h = brightChipRect.height(); ++ + painter->restore(); + return; + } +diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h +index 3166b90..e824f49 100644 +--- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h ++++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h +@@ -59,6 +59,23 @@ public: + QPen checkBoxContentPen; + // bool animation = true; + bool onHoverBrushIslinearGradient = false; ++ ++ ++ /* ++ * 需要配置文件(token)加几个用于CheckBox动画的参数: ++ ++ 1、checked状态下,对钩的内部颜色(已经暂时直接设置Qt::white) ++ 2、具有半选态的按钮,半选态下,水平线的颜色(已经暂时直接设置Qt::white) ++ 3、水平线的厚度(处于所在按钮矩形的高度的百分比) ++ 4、复选框默认情况下边框颜色,及厚度(有defaultPen为黑色,但动画需求是灰色) ++ ++ QBrush checkboxHookBrush; ++ QBrush checkboxHorizontalLineBrush; ++ float lineHeight; ++ ++ ... ++ */ ++ + }; + } + #endif // ConfigCheckBoxParameters_H +diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp +index e1335e4..2e532e4 100644 +--- a/ukui-styles/readconfig.cpp ++++ b/ukui-styles/readconfig.cpp +@@ -33,7 +33,8 @@ + #include <QPainter> + #include "platformthemedebug.h" + +-#define ThemeConfigPath "/usr/share/config/globaltheme/token/" ++// #define ThemeConfigPath "/usr/share/config/globaltheme/token/" ++#define ThemeConfigPath "/usr/share/config/themeconfig/token/" + #define DefaultConfigName "kdefault-light.css" + + using namespace UKUIGlobalDTConfig; +@@ -203,13 +204,13 @@ GlobalDTConfigPrivate::GlobalDTConfigPrivate() + + m_widgetThemeName = settings->get("widgetThemeName").toString(); + } +- ++ qDebug() << "===========> m_widgetThemeName = " << m_widgetThemeName; + QString path = ThemeConfigPath; + //dt config + m_ukui_dt_path = (QFile::exists(path + "k" + m_widgetThemeName + "-" + m_lightMode + ".css")) ? + path + "k" + m_widgetThemeName + "-" + m_lightMode + ".css" : + path + "k" + m_widgetThemeName + ".css"; +- ++ qDebug() << "=========> m_ukui_dt_path = " << m_ukui_dt_path; + m_ukui_dt_loadConfig = this->load(m_ukui_dt_path); + + initUKUIGlobalThemeParameters(); diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0004-Add-a-changelog-2023.10.08-4.1.0.0-0k4.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0004-Add-a-changelog-2023.10.08-4.1.0.0-0k4.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0004-Add-a-changelog-2023.10.08-4.1.0.0-0k4.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0004-Add-a-changelog-2023.10.08-4.1.0.0-0k4.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,4947 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Sun, 8 Oct 2023 18:20:36 +0800 -Subject: Add a changelog 2023.10.08 4.1.0.0-0k4 - ---- - libqt5-ukui-style/animations/animation-helper.cpp | 2 +- - libqt5-ukui-style/animations/animation-helper.h | 2 +- - libqt5-ukui-style/animations/animator-iface.h | 2 +- - .../animations/animator-plugin-iface.h | 2 +- - ...ukui-scrollbar-default-interaction-animator.cpp | 2 +- - .../ukui-scrollbar-default-interaction-animator.h | 2 +- - .../tabwidget/ukui-tabwidget-animator-iface.h | 2 +- - .../ukui-tabwidget-animator-plugin-iface.h | 2 +- - ...ui-tabwidget-default-slide-animator-factory.cpp | 2 +- - ...ukui-tabwidget-default-slide-animator-factory.h | 2 +- - .../ukui-tabwidget-default-slide-animator.cpp | 2 +- - .../ukui-tabwidget-default-slide-animator.h | 2 +- - libqt5-ukui-style/effects/highlight-effect.cpp | 2 +- - libqt5-ukui-style/effects/highlight-effect.h | 2 +- - .../gestures/ukui-two-finger-slide-gesture.cpp | 2 +- - .../gestures/ukui-two-finger-slide-gesture.h | 2 +- - .../gestures/ukui-two-finger-zoom-gesture.cpp | 2 +- - .../gestures/ukui-two-finger-zoom-gesture.h | 2 +- - .../internal-styles/internal-style.cpp | 2 +- - libqt5-ukui-style/internal-styles/internal-style.h | 2 +- - libqt5-ukui-style/internal-styles/mps-style.cpp | 2 +- - libqt5-ukui-style/internal-styles/mps-style.h | 2 +- - .../settings/application-style-settings.cpp | 2 +- - .../settings/application-style-settings.h | 2 +- - libqt5-ukui-style/settings/black-list.h | 2 +- - .../settings/libqt5-ukui-style_global.h | 2 +- - libqt5-ukui-style/settings/ukui-style-settings.cpp | 2 +- - libqt5-ukui-style/settings/ukui-style-settings.h | 2 +- - qt5-ukui-platformtheme/main.cpp | 2 +- - qt5-ukui-platformtheme/platform-theme-fontdata.cpp | 2 +- - qt5-ukui-platformtheme/platform-theme-fontdata.h | 2 +- - qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp | 2 +- - qt5-ukui-platformtheme/qt5-ukui-platform-theme.h | 2 +- - .../qt5-ukui-platformtheme_global.h | 2 +- - qt5-ukui-platformtheme/widget/filedialog/debug.h | 22 ++++++++++++++++++++++ - .../widget/filedialog/kyfiledialog.cpp | 22 ++++++++++++++++++++++ - .../widget/filedialog/kyfiledialog.h | 22 ++++++++++++++++++++++ - .../widget/filedialog/kyfiledialogprivate.cpp | 22 ++++++++++++++++++++++ - .../widget/filedialog/kyfiledialogprivate.h | 22 ++++++++++++++++++++++ - .../widget/filedialog/menutoolbutoon.cpp | 22 ++++++++++++++++++++++ - .../widget/filedialog/menutoolbutoon.h | 22 ++++++++++++++++++++++ - .../widget/filedialog/pathbar.cpp | 22 ++++++++++++++++++++++ - qt5-ukui-platformtheme/widget/filedialog/pathbar.h | 22 ++++++++++++++++++++++ - .../widget/filedialog/sidebar.cpp | 22 ++++++++++++++++++++++ - qt5-ukui-platformtheme/widget/filedialog/sidebar.h | 22 ++++++++++++++++++++++ - .../widget/filedialog/ui_kyfiledialog.cpp | 22 ++++++++++++++++++++++ - .../widget/filedialog/ui_kyfiledialog.h | 22 ++++++++++++++++++++++ - .../widget/messagebox/message-box.cpp | 4 ++-- - .../widget/messagebox/message-box.h | 4 ++-- - qt5-ukui-platformtheme/widget/xatom-helper.cpp | 2 +- - qt5-ukui-platformtheme/widget/xatom-helper.h | 2 +- - test/custom-shadow/main.cpp | 2 +- - test/custom-shadow/mainwindow.cpp | 2 +- - test/custom-shadow/mainwindow.h | 2 +- - test/filedialog/filedialog.pro | 6 +++--- - test/filedialog/main.cpp | 22 ++++++++++++++++++++++ - test/filedialog/mainwindow.cpp | 22 ++++++++++++++++++++++ - test/filedialog/mainwindow.h | 22 ++++++++++++++++++++++ - test/highlighted-icon-button/main.cpp | 2 +- - test/highlighted-icon-button/mainwindow.cpp | 2 +- - test/highlighted-icon-button/mainwindow.h | 2 +- - test/messagebox/main.cpp | 22 ++++++++++++++++++++++ - test/messagebox/messagebox.pro | 6 +++--- - test/mps-style-application/main.cpp | 2 +- - test/mps-style-application/mainwindow.cpp | 2 +- - test/mps-style-application/mainwindow.h | 2 +- - test/region-blur/main.cpp | 2 +- - test/region-blur/mainwindow.cpp | 2 +- - test/region-blur/mainwindow.h | 2 +- - test/system-settings/main.cpp | 2 +- - test/system-settings/mainwindow.cpp | 2 +- - test/system-settings/mainwindow.h | 2 +- - test/tabwidget/main.cpp | 2 +- - test/tabwidget/widget.cpp | 2 +- - test/tabwidget/widget.h | 2 +- - ukui-qml-style-helper/KyIcon.cpp | 22 ++++++++++++++++++++++ - ukui-qml-style-helper/KyIcon.h | 22 ++++++++++++++++++++++ - ukui-qml-style-helper/kyquickpadding_p.h | 22 ++++++++++++++++++++++ - ukui-qml-style-helper/kyquickstyleitem.cpp | 22 ++++++++++++++++++++++ - ukui-qml-style-helper/kyquickstyleitem.h | 22 ++++++++++++++++++++++ - ukui-qml-style-helper/kystylehelper.cpp | 22 ++++++++++++++++++++++ - ukui-qml-style-helper/kystylehelper.h | 22 ++++++++++++++++++++++ - ukui-qml-style-helper/qqc2styleplugin.cpp | 22 ++++++++++++++++++++++ - ukui-qml-style-helper/qqc2styleplugin.h | 22 ++++++++++++++++++++++ - ukui-styles/blur-helper.cpp | 2 +- - ukui-styles/blur-helper.h | 2 +- - ukui-styles/gesture-helper.cpp | 2 +- - ukui-styles/gesture-helper.h | 2 +- - .../animations/config-box-animation-helper.cpp | 2 +- - .../animations/config-box-animation-helper.h | 4 ++-- - .../animations/config-box-animator.cpp | 4 ++-- - .../animations/config-box-animator.h | 4 ++-- - .../animations/config-button-animation-helper.cpp | 4 ++-- - .../animations/config-button-animation-helper.h | 4 ++-- - .../animations/config-button-animator.cpp | 4 ++-- - .../animations/config-button-animator.h | 4 ++-- - .../config-checkbox-animation-helper.cpp | 4 ++-- - .../animations/config-checkbox-animation-helper.h | 4 ++-- - .../animations/config-checkbox-animator.cpp | 4 ++-- - .../animations/config-checkbox-animator.h | 4 ++-- - .../config-progressbar-animation-helper.cpp | 4 ++-- - .../config-progressbar-animation-helper.h | 4 ++-- - .../animations/config-progressbar-animation.cpp | 4 ++-- - .../animations/config-progressbar-animation.h | 4 ++-- - .../config-radiobutton-animation-helper.cpp | 4 ++-- - .../config-radiobutton-animation-helper.h | 4 ++-- - .../animations/config-radiobutton-animator.cpp | 4 ++-- - .../animations/config-radiobutton-animator.h | 4 ++-- - .../config-scrollbar-animation-helper.cpp | 4 ++-- - .../animations/config-scrollbar-animation-helper.h | 4 ++-- - .../animations/config-slider-animation-helper.cpp | 4 ++-- - .../animations/config-slider-animation-helper.h | 4 ++-- - .../animations/config-slider-animator.cpp | 4 ++-- - .../animations/config-slider-animator.h | 4 ++-- - .../config-tab-widget-animation-helper.cpp | 4 ++-- - .../config-tab-widget-animation-helper.h | 4 ++-- - .../animations/config-tree-animation-helper.cpp | 5 +++-- - .../animations/config-tree-animation-helper.h | 4 ++-- - .../animations/config-tree-animator.cpp | 4 ++-- - .../animations/config-tree-animator.h | 4 ++-- - .../qt5-config-style-ukui/config-shadow-helper.cpp | 5 +++-- - .../qt5-config-style-ukui/config-shadow-helper.h | 4 ++-- - .../qt5-config-style-ukui/config-style-helper.cpp | 4 ++-- - .../qt5-config-style-ukui/config-style-helper.h | 4 ++-- - .../qt5-config-style-ukui/config-view-helper.cpp | 22 ++++++++++++++++++++++ - .../ukui-config-style-parameters.cpp | 4 ++-- - .../ukui-config-style-parameters.h | 4 ++-- - .../qt5-config-style-ukui/ukui-config-style.cpp | 4 ++-- - .../qt5-config-style-ukui/ukui-config-style.h | 4 ++-- - .../config-checkbox-parameters.cpp | 4 ++-- - .../widget-parameters/config-checkbox-parameters.h | 4 ++-- - .../config-combobox-parameters.cpp | 22 ++++++++++++++++++++++ - .../widget-parameters/config-combobox-parameters.h | 4 ++-- - .../config-lineedit-parameters.cpp | 4 ++-- - .../widget-parameters/config-lineedit-parameters.h | 4 ++-- - .../widget-parameters/config-list-parameters.cpp | 4 ++-- - .../widget-parameters/config-list-parameters.h | 4 ++-- - .../widget-parameters/config-menu-parameters.cpp | 4 ++-- - .../widget-parameters/config-menu-parameters.h | 4 ++-- - .../config-progressbar-parameters.cpp | 4 ++-- - .../config-progressbar-parameters.h | 4 ++-- - .../config-pushbutton-parameters.cpp | 4 ++-- - .../config-pushbutton-parameters.h | 4 ++-- - .../config-radiobutton-parameters.cpp | 4 ++-- - .../config-radiobutton-parameters.h | 4 ++-- - .../config-scrollbar-parameters.cpp | 4 ++-- - .../config-scrollbar-parameters.h | 4 ++-- - .../widget-parameters/config-slider-parameters.cpp | 4 ++-- - .../widget-parameters/config-slider-parameters.h | 4 ++-- - .../config-spinbox-parameters.cpp | 4 ++-- - .../widget-parameters/config-spinbox-parameters.h | 4 ++-- - .../widget-parameters/config-table-parameters.cpp | 4 ++-- - .../widget-parameters/config-table-parameters.h | 4 ++-- - .../config-tabwidget-parameters.cpp | 4 ++-- - .../config-tabwidget-parameters.h | 4 ++-- - .../config-toolbutton-parameters.cpp | 4 ++-- - .../config-toolbutton-parameters.h | 4 ++-- - .../config-tooltip-parameters.cpp | 4 ++-- - .../widget-parameters/config-tooltip-parameters.h | 4 ++-- - .../widget-parameters/config-tree-parameters.cpp | 4 ++-- - .../widget-parameters/config-tree-parameters.h | 4 ++-- - .../animations/box-animation-helper.cpp | 2 +- - .../animations/box-animation-helper.h | 2 +- - .../qt5-style-ukui/animations/box-animator.cpp | 2 +- - .../qt5-style-ukui/animations/box-animator.h | 2 +- - .../animations/button-animation-helper.cpp | 2 +- - .../animations/button-animation-helper.h | 2 +- - .../qt5-style-ukui/animations/button-animator.cpp | 2 +- - .../qt5-style-ukui/animations/button-animator.h | 2 +- - .../animations/checkbox-animation-helper.cpp | 2 +- - .../animations/checkbox-animation-helper.h | 2 +- - .../animations/checkbox-animator.cpp | 2 +- - .../qt5-style-ukui/animations/checkbox-animator.h | 2 +- - .../animations/progressbar-animation-helper.cpp | 2 +- - .../animations/progressbar-animation-helper.h | 2 +- - .../animations/progressbar-animation.cpp | 2 +- - .../animations/progressbar-animation.h | 2 +- - .../animations/radiobutton-animation-helper.cpp | 2 +- - .../animations/radiobutton-animation-helper.h | 2 +- - .../animations/radiobutton-animator.cpp | 2 +- - .../animations/radiobutton-animator.h | 2 +- - .../animations/scrollbar-animation-helper.cpp | 2 +- - .../animations/scrollbar-animation-helper.h | 2 +- - .../animations/slider-animation-helper.cpp | 2 +- - .../animations/slider-animation-helper.h | 2 +- - .../qt5-style-ukui/animations/slider-animator.cpp | 2 +- - .../qt5-style-ukui/animations/slider-animator.h | 2 +- - .../animations/tab-widget-animation-helper.cpp | 2 +- - .../animations/tab-widget-animation-helper.h | 2 +- - .../animations/tree-animation-helper.cpp | 2 +- - .../animations/tree-animation-helper.h | 2 +- - .../qt5-style-ukui/animations/tree-animator.cpp | 2 +- - .../qt5-style-ukui/animations/tree-animator.h | 2 +- - .../qt5-style-ukui/kabstract-style-parameters.cpp | 4 ++-- - .../qt5-style-ukui/kabstract-style-parameters.h | 4 ++-- - .../qt5-style-ukui/qt5-ukui-style-helper.cpp | 2 +- - ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.h | 2 +- - .../qt5-style-ukui/qt5-ukui-style-plugin.cpp | 2 +- - ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.h | 2 +- - ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp | 2 +- - ukui-styles/qt5-style-ukui/qt5-ukui-style.h | 2 +- - ukui-styles/qt5-style-ukui/shadow-helper.cpp | 2 +- - ukui-styles/qt5-style-ukui/shadow-helper.h | 2 +- - .../qt5-style-ukui/ukui-style-parameters.cpp | 4 ++-- - ukui-styles/qt5-style-ukui/ukui-style-parameters.h | 4 ++-- - ukui-styles/qt5-style-ukui/view-helper.cpp | 22 ++++++++++++++++++++++ - .../widget-parameters/checkbox-parameters.cpp | 4 ++-- - .../widget-parameters/checkbox-parameters.h | 4 ++-- - .../widget-parameters/combobox-parameters.cpp | 22 ++++++++++++++++++++++ - .../widget-parameters/combobox-parameters.h | 4 ++-- - .../widget-parameters/lineedit-parameters.cpp | 4 ++-- - .../widget-parameters/lineedit-parameters.h | 4 ++-- - .../widget-parameters/list-parameters.cpp | 4 ++-- - .../widget-parameters/list-parameters.h | 4 ++-- - .../widget-parameters/menu-parameters.cpp | 4 ++-- - .../widget-parameters/menu-parameters.h | 4 ++-- - .../widget-parameters/progressbar-parameters.cpp | 4 ++-- - .../widget-parameters/progressbar-parameters.h | 4 ++-- - .../widget-parameters/pushbutton-parameters.cpp | 4 ++-- - .../widget-parameters/pushbutton-parameters.h | 4 ++-- - .../widget-parameters/radiobutton-parameters.cpp | 4 ++-- - .../widget-parameters/radiobutton-parameters.h | 4 ++-- - .../widget-parameters/scrollbar-parameters.cpp | 4 ++-- - .../widget-parameters/scrollbar-parameters.h | 4 ++-- - .../widget-parameters/slider-parameters.cpp | 4 ++-- - .../widget-parameters/slider-parameters.h | 4 ++-- - .../widget-parameters/spinbox-parameters.cpp | 4 ++-- - .../widget-parameters/spinbox-parameters.h | 4 ++-- - .../widget-parameters/table-parameters.cpp | 4 ++-- - .../widget-parameters/table-parameters.h | 4 ++-- - .../widget-parameters/tabwidget-parameters.cpp | 4 ++-- - .../widget-parameters/tabwidget-parameters.h | 4 ++-- - .../widget-parameters/toolbutton-parameters.cpp | 4 ++-- - .../widget-parameters/toolbutton-parameters.h | 4 ++-- - .../widget-parameters/tooltip-parameters.cpp | 4 ++-- - .../widget-parameters/tooltip-parameters.h | 4 ++-- - .../widget-parameters/tree-parameters.cpp | 4 ++-- - .../widget-parameters/tree-parameters.h | 4 ++-- - ukui-styles/readconfig.cpp | 4 ++-- - ukui-styles/readconfig.h | 4 ++-- - ukui-styles/themeinformation.h | 4 ++-- - ukui-styles/ukui-style-plugin.cpp | 2 +- - ukui-styles/ukui-style-plugin.h | 2 +- - ukui-styles/window-manager.cpp | 2 +- - ukui-styles/window-manager.h | 2 +- - 245 files changed, 991 insertions(+), 329 deletions(-) - -diff --git a/libqt5-ukui-style/animations/animation-helper.cpp b/libqt5-ukui-style/animations/animation-helper.cpp -index d5ffb4d..f38d107 100644 ---- a/libqt5-ukui-style/animations/animation-helper.cpp -+++ b/libqt5-ukui-style/animations/animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/animations/animation-helper.h b/libqt5-ukui-style/animations/animation-helper.h -index 979c9ab..a4b9a6d 100644 ---- a/libqt5-ukui-style/animations/animation-helper.h -+++ b/libqt5-ukui-style/animations/animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/animations/animator-iface.h b/libqt5-ukui-style/animations/animator-iface.h -index 87e1326..6fc3c04 100644 ---- a/libqt5-ukui-style/animations/animator-iface.h -+++ b/libqt5-ukui-style/animations/animator-iface.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/animations/animator-plugin-iface.h b/libqt5-ukui-style/animations/animator-plugin-iface.h -index b82bccb..570a52d 100644 ---- a/libqt5-ukui-style/animations/animator-plugin-iface.h -+++ b/libqt5-ukui-style/animations/animator-plugin-iface.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.cpp b/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.cpp -index 644380f..32529e6 100644 ---- a/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.cpp -+++ b/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.h b/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.h -index aeeae0b..8367dbb 100644 ---- a/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.h -+++ b/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-iface.h b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-iface.h -index 2877666..19642e1 100644 ---- a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-iface.h -+++ b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-iface.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-plugin-iface.h b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-plugin-iface.h -index 6617965..9e7dcc0 100644 ---- a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-plugin-iface.h -+++ b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-plugin-iface.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.cpp b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.cpp -index 1ca87c7..008cc20 100644 ---- a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.cpp -+++ b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h -index d3922c8..507b3cd 100644 ---- a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h -+++ b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.cpp b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.cpp -index 1bf0511..24ec074 100644 ---- a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.cpp -+++ b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.h b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.h -index 2abe8b7..63e6d3d 100644 ---- a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.h -+++ b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/effects/highlight-effect.cpp b/libqt5-ukui-style/effects/highlight-effect.cpp -index 6246a47..44bd0fb 100644 ---- a/libqt5-ukui-style/effects/highlight-effect.cpp -+++ b/libqt5-ukui-style/effects/highlight-effect.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/effects/highlight-effect.h b/libqt5-ukui-style/effects/highlight-effect.h -index 1578f62..4940324 100644 ---- a/libqt5-ukui-style/effects/highlight-effect.h -+++ b/libqt5-ukui-style/effects/highlight-effect.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.cpp b/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.cpp -index 81ac373..5b50679 100644 ---- a/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.cpp -+++ b/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.h b/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.h -index 128d347..f731f9a 100644 ---- a/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.h -+++ b/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.cpp b/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.cpp -index f42307a..c9d707c 100644 ---- a/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.cpp -+++ b/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.h b/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.h -index bf6d6ca..9d562e0 100644 ---- a/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.h -+++ b/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/internal-styles/internal-style.cpp b/libqt5-ukui-style/internal-styles/internal-style.cpp -index 16f50e6..4a6e0cf 100644 ---- a/libqt5-ukui-style/internal-styles/internal-style.cpp -+++ b/libqt5-ukui-style/internal-styles/internal-style.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/internal-styles/internal-style.h b/libqt5-ukui-style/internal-styles/internal-style.h -index b618ad8..c71377f 100644 ---- a/libqt5-ukui-style/internal-styles/internal-style.h -+++ b/libqt5-ukui-style/internal-styles/internal-style.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/internal-styles/mps-style.cpp b/libqt5-ukui-style/internal-styles/mps-style.cpp -index f87b603..7bc16f4 100644 ---- a/libqt5-ukui-style/internal-styles/mps-style.cpp -+++ b/libqt5-ukui-style/internal-styles/mps-style.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/internal-styles/mps-style.h b/libqt5-ukui-style/internal-styles/mps-style.h -index 58276d0..117bd52 100644 ---- a/libqt5-ukui-style/internal-styles/mps-style.h -+++ b/libqt5-ukui-style/internal-styles/mps-style.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/settings/application-style-settings.cpp b/libqt5-ukui-style/settings/application-style-settings.cpp -index c1cc7db..fc6c924 100644 ---- a/libqt5-ukui-style/settings/application-style-settings.cpp -+++ b/libqt5-ukui-style/settings/application-style-settings.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/settings/application-style-settings.h b/libqt5-ukui-style/settings/application-style-settings.h -index 43aaab6..b7f7d41 100644 ---- a/libqt5-ukui-style/settings/application-style-settings.h -+++ b/libqt5-ukui-style/settings/application-style-settings.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/settings/black-list.h b/libqt5-ukui-style/settings/black-list.h -index bac2bb6..a1a8825 100644 ---- a/libqt5-ukui-style/settings/black-list.h -+++ b/libqt5-ukui-style/settings/black-list.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/settings/libqt5-ukui-style_global.h b/libqt5-ukui-style/settings/libqt5-ukui-style_global.h -index d867851..09468ae 100644 ---- a/libqt5-ukui-style/settings/libqt5-ukui-style_global.h -+++ b/libqt5-ukui-style/settings/libqt5-ukui-style_global.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/settings/ukui-style-settings.cpp b/libqt5-ukui-style/settings/ukui-style-settings.cpp -index dc060ba..274bae5 100644 ---- a/libqt5-ukui-style/settings/ukui-style-settings.cpp -+++ b/libqt5-ukui-style/settings/ukui-style-settings.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/libqt5-ukui-style/settings/ukui-style-settings.h b/libqt5-ukui-style/settings/ukui-style-settings.h -index 9997715..861c855 100644 ---- a/libqt5-ukui-style/settings/ukui-style-settings.h -+++ b/libqt5-ukui-style/settings/ukui-style-settings.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/qt5-ukui-platformtheme/main.cpp b/qt5-ukui-platformtheme/main.cpp -index fa87211..b52eaa7 100644 ---- a/qt5-ukui-platformtheme/main.cpp -+++ b/qt5-ukui-platformtheme/main.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/qt5-ukui-platformtheme/platform-theme-fontdata.cpp b/qt5-ukui-platformtheme/platform-theme-fontdata.cpp -index 1835f37..83e6b0d 100644 ---- a/qt5-ukui-platformtheme/platform-theme-fontdata.cpp -+++ b/qt5-ukui-platformtheme/platform-theme-fontdata.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/qt5-ukui-platformtheme/platform-theme-fontdata.h b/qt5-ukui-platformtheme/platform-theme-fontdata.h -index 96abf38..82e9761 100644 ---- a/qt5-ukui-platformtheme/platform-theme-fontdata.h -+++ b/qt5-ukui-platformtheme/platform-theme-fontdata.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -index 5b0798e..c056682 100644 ---- a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -+++ b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h -index 9c1f389..a1b4cbe 100644 ---- a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h -+++ b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/qt5-ukui-platformtheme/qt5-ukui-platformtheme_global.h b/qt5-ukui-platformtheme/qt5-ukui-platformtheme_global.h -index 951600d..6425483 100644 ---- a/qt5-ukui-platformtheme/qt5-ukui-platformtheme_global.h -+++ b/qt5-ukui-platformtheme/qt5-ukui-platformtheme_global.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/qt5-ukui-platformtheme/widget/filedialog/debug.h b/qt5-ukui-platformtheme/widget/filedialog/debug.h -index 9e594b9..7c8edbc 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/debug.h -+++ b/qt5-ukui-platformtheme/widget/filedialog/debug.h -@@ -1,3 +1,25 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #ifndef PDEBUG_H - #define PDEBUG_H - #include <QDebug> -diff --git a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -index 3d90575..d64458e 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -+++ b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -@@ -1,3 +1,25 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #include "debug.h" - #include "kyfiledialog.h" - #include <QDebug> -diff --git a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h -index 1342aa4..3710fb1 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h -+++ b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h -@@ -1,3 +1,25 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #include "debug.h" - #ifndef KYNATIVEFILEDIALOG_H - #define KYNATIVEFILEDIALOG_H -diff --git a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.cpp b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.cpp -index e7ea54e..40225fb 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.cpp -+++ b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.cpp -@@ -1,3 +1,25 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #include "debug.h" - - #include "kyfiledialogprivate.h" -diff --git a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.h b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.h -index 46ba0f6..7af515b 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.h -+++ b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.h -@@ -1,3 +1,25 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #include "debug.h" - #ifndef KYNATIVEFILEDIALOGPRIVATE_H - #define KYNATIVEFILEDIALOGPRIVATE_H -diff --git a/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.cpp b/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.cpp -index e0e7741..9493854 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.cpp -+++ b/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.cpp -@@ -1,3 +1,25 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #include "debug.h" - #include "menutoolbutoon.h" - #include <QApplication> -diff --git a/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.h b/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.h -index 7909104..2854992 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.h -+++ b/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.h -@@ -1,3 +1,25 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #include "debug.h" - - #ifndef MENUTOOLBUTTON_H -diff --git a/qt5-ukui-platformtheme/widget/filedialog/pathbar.cpp b/qt5-ukui-platformtheme/widget/filedialog/pathbar.cpp -index d5d2bea..9f47383 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/pathbar.cpp -+++ b/qt5-ukui-platformtheme/widget/filedialog/pathbar.cpp -@@ -1,3 +1,25 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #include "debug.h" - - #include "pathbar.h" -diff --git a/qt5-ukui-platformtheme/widget/filedialog/pathbar.h b/qt5-ukui-platformtheme/widget/filedialog/pathbar.h -index bbe7f70..0a64214 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/pathbar.h -+++ b/qt5-ukui-platformtheme/widget/filedialog/pathbar.h -@@ -1,3 +1,25 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #include "debug.h" - - #ifndef PATHBAR_H -diff --git a/qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp b/qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp -index 8db0adb..969ace3 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp -+++ b/qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp -@@ -1,3 +1,25 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #include "debug.h" - #include "sidebar.h" - #include <QTimer> -diff --git a/qt5-ukui-platformtheme/widget/filedialog/sidebar.h b/qt5-ukui-platformtheme/widget/filedialog/sidebar.h -index bc82a5b..48112e9 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/sidebar.h -+++ b/qt5-ukui-platformtheme/widget/filedialog/sidebar.h -@@ -1,3 +1,25 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #include "debug.h" - #ifndef SIDEBAR_H - #define SIDEBAR_H -diff --git a/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.cpp b/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.cpp -index 5e8c530..04e1679 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.cpp -+++ b/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.cpp -@@ -1,3 +1,25 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #include "debug.h" - #include "ui_kyfiledialog.h" - #include <QFileDialog> -diff --git a/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.h b/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.h -index 7e2b879..106aaa7 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.h -+++ b/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.h -@@ -1,3 +1,25 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #include "debug.h" - #ifndef UI_KYFILEDIALOG_H - #define UI_KYFILEDIALOG_H -diff --git a/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp b/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -index d20c4f0..6d2a97a 100644 ---- a/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -+++ b/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -@@ -1,7 +1,7 @@ - /* - * KWin Style UKUI - * -- * Copyright (C) 2020, KylinSoft Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Ding Jing <dingjing@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/qt5-ukui-platformtheme/widget/messagebox/message-box.h b/qt5-ukui-platformtheme/widget/messagebox/message-box.h -index 8cc510a..0c9810c 100644 ---- a/qt5-ukui-platformtheme/widget/messagebox/message-box.h -+++ b/qt5-ukui-platformtheme/widget/messagebox/message-box.h -@@ -1,7 +1,7 @@ - /* - * KWin Style UKUI - * -- * Copyright (C) 2020, KylinSoft Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Ding Jing <dingjing@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/qt5-ukui-platformtheme/widget/xatom-helper.cpp b/qt5-ukui-platformtheme/widget/xatom-helper.cpp -index 46ee5e5..e8907ba 100644 ---- a/qt5-ukui-platformtheme/widget/xatom-helper.cpp -+++ b/qt5-ukui-platformtheme/widget/xatom-helper.cpp -@@ -1,7 +1,7 @@ - /* - * KWin Style UKUI - * -- * Copyright (C) 2020, KylinSoft Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/qt5-ukui-platformtheme/widget/xatom-helper.h b/qt5-ukui-platformtheme/widget/xatom-helper.h -index 5de806d..a274abe 100644 ---- a/qt5-ukui-platformtheme/widget/xatom-helper.h -+++ b/qt5-ukui-platformtheme/widget/xatom-helper.h -@@ -1,7 +1,7 @@ - /* - * KWin Style UKUI - * -- * Copyright (C) 2020, KylinSoft Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/custom-shadow/main.cpp b/test/custom-shadow/main.cpp -index ca7d279..2162700 100644 ---- a/test/custom-shadow/main.cpp -+++ b/test/custom-shadow/main.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/custom-shadow/mainwindow.cpp b/test/custom-shadow/mainwindow.cpp -index fc32ec6..661904d 100644 ---- a/test/custom-shadow/mainwindow.cpp -+++ b/test/custom-shadow/mainwindow.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/custom-shadow/mainwindow.h b/test/custom-shadow/mainwindow.h -index b6315aa..de958ce 100644 ---- a/test/custom-shadow/mainwindow.h -+++ b/test/custom-shadow/mainwindow.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/filedialog/filedialog.pro b/test/filedialog/filedialog.pro -index 0086fd6..00c0d0d 100644 ---- a/test/filedialog/filedialog.pro -+++ b/test/filedialog/filedialog.pro -@@ -26,6 +26,6 @@ FORMS += \ - mainwindow.ui - - # Default rules for deployment. --qnx: target.path = /tmp/$${TARGET}/bin --else: unix:!android: target.path = /opt/$${TARGET}/bin --!isEmpty(target.path): INSTALLS += target -+#qnx: target.path = /tmp/$${TARGET}/bin -+#else: unix:!android: target.path = /opt/$${TARGET}/bin -+#!isEmpty(target.path): INSTALLS += target -diff --git a/test/filedialog/main.cpp b/test/filedialog/main.cpp -index b508266..eae34b3 100644 ---- a/test/filedialog/main.cpp -+++ b/test/filedialog/main.cpp -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #include "mainwindow.h" - - #include <QApplication> -diff --git a/test/filedialog/mainwindow.cpp b/test/filedialog/mainwindow.cpp -index ea8ab72..61ee820 100644 ---- a/test/filedialog/mainwindow.cpp -+++ b/test/filedialog/mainwindow.cpp -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #include "mainwindow.h" - #include "ui_mainwindow.h" - -diff --git a/test/filedialog/mainwindow.h b/test/filedialog/mainwindow.h -index 16b35a9..bf51130 100644 ---- a/test/filedialog/mainwindow.h -+++ b/test/filedialog/mainwindow.h -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ - #ifndef MAINWINDOW_H - #define MAINWINDOW_H - -diff --git a/test/highlighted-icon-button/main.cpp b/test/highlighted-icon-button/main.cpp -index 8827614..512c2a0 100644 ---- a/test/highlighted-icon-button/main.cpp -+++ b/test/highlighted-icon-button/main.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/highlighted-icon-button/mainwindow.cpp b/test/highlighted-icon-button/mainwindow.cpp -index 0fba02e..3986eb9 100644 ---- a/test/highlighted-icon-button/mainwindow.cpp -+++ b/test/highlighted-icon-button/mainwindow.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/highlighted-icon-button/mainwindow.h b/test/highlighted-icon-button/mainwindow.h -index 16ec527..2da9854 100644 ---- a/test/highlighted-icon-button/mainwindow.h -+++ b/test/highlighted-icon-button/mainwindow.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/messagebox/main.cpp b/test/messagebox/main.cpp -index d6c12e6..55642a5 100644 ---- a/test/messagebox/main.cpp -+++ b/test/messagebox/main.cpp -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: xibowen <xibowen@kylinos.cn> -+ * -+ */ -+ - #include <QApplication> - #include <QCheckBox> - #include <QMessageBox> -diff --git a/test/messagebox/messagebox.pro b/test/messagebox/messagebox.pro -index d1fe67b..a50ff7f 100644 ---- a/test/messagebox/messagebox.pro -+++ b/test/messagebox/messagebox.pro -@@ -14,6 +14,6 @@ SOURCES += \ - HEADERS += - - # Default rules for deployment. --qnx: target.path = /tmp/$${TARGET}/bin --else: unix:!android: target.path = /opt/$${TARGET}/bin --!isEmpty(target.path): INSTALLS += target -+#qnx: target.path = /tmp/$${TARGET}/bin -+#else: unix:!android: target.path = /opt/$${TARGET}/bin -+#!isEmpty(target.path): INSTALLS += target -diff --git a/test/mps-style-application/main.cpp b/test/mps-style-application/main.cpp -index 33b2a7a..0683598 100644 ---- a/test/mps-style-application/main.cpp -+++ b/test/mps-style-application/main.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/mps-style-application/mainwindow.cpp b/test/mps-style-application/mainwindow.cpp -index 8e32bc8..1329b15 100644 ---- a/test/mps-style-application/mainwindow.cpp -+++ b/test/mps-style-application/mainwindow.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/mps-style-application/mainwindow.h b/test/mps-style-application/mainwindow.h -index b384b73..202bdb3 100644 ---- a/test/mps-style-application/mainwindow.h -+++ b/test/mps-style-application/mainwindow.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/region-blur/main.cpp b/test/region-blur/main.cpp -index c3c4ed4..f241b67 100644 ---- a/test/region-blur/main.cpp -+++ b/test/region-blur/main.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/region-blur/mainwindow.cpp b/test/region-blur/mainwindow.cpp -index 361bb0b..4a7f4a2 100644 ---- a/test/region-blur/mainwindow.cpp -+++ b/test/region-blur/mainwindow.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/region-blur/mainwindow.h b/test/region-blur/mainwindow.h -index 873c072..b45f94c 100644 ---- a/test/region-blur/mainwindow.h -+++ b/test/region-blur/mainwindow.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/system-settings/main.cpp b/test/system-settings/main.cpp -index aea7578..713114a 100644 ---- a/test/system-settings/main.cpp -+++ b/test/system-settings/main.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/system-settings/mainwindow.cpp b/test/system-settings/mainwindow.cpp -index 822079b..cc95850 100644 ---- a/test/system-settings/mainwindow.cpp -+++ b/test/system-settings/mainwindow.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/system-settings/mainwindow.h b/test/system-settings/mainwindow.h -index 42bef23..e7606b7 100644 ---- a/test/system-settings/mainwindow.h -+++ b/test/system-settings/mainwindow.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/tabwidget/main.cpp b/test/tabwidget/main.cpp -index b91ff79..50bbcdc 100644 ---- a/test/tabwidget/main.cpp -+++ b/test/tabwidget/main.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/tabwidget/widget.cpp b/test/tabwidget/widget.cpp -index 9f3ef3c..c8f3874 100644 ---- a/test/tabwidget/widget.cpp -+++ b/test/tabwidget/widget.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/test/tabwidget/widget.h b/test/tabwidget/widget.h -index 5b9696e..23b4f1d 100644 ---- a/test/tabwidget/widget.h -+++ b/test/tabwidget/widget.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -diff --git a/ukui-qml-style-helper/KyIcon.cpp b/ukui-qml-style-helper/KyIcon.cpp -index 490b838..7cd51cc 100644 ---- a/ukui-qml-style-helper/KyIcon.cpp -+++ b/ukui-qml-style-helper/KyIcon.cpp -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Yan Wang <wangyan@kylinos.cn> -+ * -+ */ -+ - #include "KyIcon.h" - #include <QStyleOption> - #include <QStyle> -diff --git a/ukui-qml-style-helper/KyIcon.h b/ukui-qml-style-helper/KyIcon.h -index 1ec2f7e..de004e5 100644 ---- a/ukui-qml-style-helper/KyIcon.h -+++ b/ukui-qml-style-helper/KyIcon.h -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Yan Wang <wangyan@kylinos.cn> -+ * -+ */ -+ - #ifndef KYICON_H - #define KYICON_H - #include <QQuickPaintedItem> -diff --git a/ukui-qml-style-helper/kyquickpadding_p.h b/ukui-qml-style-helper/kyquickpadding_p.h -index 3d7bbbb..774cfe5 100644 ---- a/ukui-qml-style-helper/kyquickpadding_p.h -+++ b/ukui-qml-style-helper/kyquickpadding_p.h -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Yan Wang <wangyan@kylinos.cn> -+ * -+ */ -+ - #ifndef KYQUICKPADDING_P_H - #define KYQUICKPADDING_P_H - -diff --git a/ukui-qml-style-helper/kyquickstyleitem.cpp b/ukui-qml-style-helper/kyquickstyleitem.cpp -index 171eda6..b2514d6 100644 ---- a/ukui-qml-style-helper/kyquickstyleitem.cpp -+++ b/ukui-qml-style-helper/kyquickstyleitem.cpp -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Yan Wang <wangyan@kylinos.cn> -+ * -+ */ -+ - #include "kyquickstyleitem.h" - - #include <QStyle> -diff --git a/ukui-qml-style-helper/kyquickstyleitem.h b/ukui-qml-style-helper/kyquickstyleitem.h -index e3cd77f..b1324e6 100644 ---- a/ukui-qml-style-helper/kyquickstyleitem.h -+++ b/ukui-qml-style-helper/kyquickstyleitem.h -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Yan Wang <wangyan@kylinos.cn> -+ * -+ */ -+ - #ifndef KYQUICKSTYLEITEM_H - #define KYQUICKSTYLEITEM_H - -diff --git a/ukui-qml-style-helper/kystylehelper.cpp b/ukui-qml-style-helper/kystylehelper.cpp -index f6ff8d9..1c7b68d 100644 ---- a/ukui-qml-style-helper/kystylehelper.cpp -+++ b/ukui-qml-style-helper/kystylehelper.cpp -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Yan Wang <wangyan@kylinos.cn> -+ * -+ */ -+ - #include "kystylehelper.h" - - #include <QQuickWindow> -diff --git a/ukui-qml-style-helper/kystylehelper.h b/ukui-qml-style-helper/kystylehelper.h -index 2336c6d..45a39a6 100644 ---- a/ukui-qml-style-helper/kystylehelper.h -+++ b/ukui-qml-style-helper/kystylehelper.h -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Yan Wang <wangyan@kylinos.cn> -+ * -+ */ -+ - #ifndef KYSTYLEHELPER_H - #define KYSTYLEHELPER_H - -diff --git a/ukui-qml-style-helper/qqc2styleplugin.cpp b/ukui-qml-style-helper/qqc2styleplugin.cpp -index 951e0d6..de4fa78 100644 ---- a/ukui-qml-style-helper/qqc2styleplugin.cpp -+++ b/ukui-qml-style-helper/qqc2styleplugin.cpp -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Yan Wang <wangyan@kylinos.cn> -+ * -+ */ -+ - #include "qqc2styleplugin.h" - #include "kyquickstyleitem.h" - #include "kystylehelper.h" -diff --git a/ukui-qml-style-helper/qqc2styleplugin.h b/ukui-qml-style-helper/qqc2styleplugin.h -index b3a105a..3a98e78 100644 ---- a/ukui-qml-style-helper/qqc2styleplugin.h -+++ b/ukui-qml-style-helper/qqc2styleplugin.h -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Yan Wang <wangyan@kylinos.cn> -+ * -+ */ -+ - #ifndef QQC2STYLEPLUGIN_H - #define QQC2STYLEPLUGIN_H - -diff --git a/ukui-styles/blur-helper.cpp b/ukui-styles/blur-helper.cpp -index 106348a..83948ff 100644 ---- a/ukui-styles/blur-helper.cpp -+++ b/ukui-styles/blur-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/blur-helper.h b/ukui-styles/blur-helper.h -index 81dd5f8..fae5cf8 100644 ---- a/ukui-styles/blur-helper.h -+++ b/ukui-styles/blur-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/gesture-helper.cpp b/ukui-styles/gesture-helper.cpp -index 74e5143..699aab6 100644 ---- a/ukui-styles/gesture-helper.cpp -+++ b/ukui-styles/gesture-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/gesture-helper.h b/ukui-styles/gesture-helper.h -index 6c51562..10fa610 100644 ---- a/ukui-styles/gesture-helper.h -+++ b/ukui-styles/gesture-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.cpp -index d7c8661..7201962 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.h -index 40f6d95..9cbb31c 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.cpp -index 228589a..b93de39 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.h b/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.h -index e8c497a..ae982ed 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.cpp -index 62b3b05..7928201 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.h -index b531451..0d62e57 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.cpp -index ba3893f..f48b940 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.h b/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.h -index bf9945d..2f1e8a4 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.cpp -index c4b021c..12f1adc 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.h -index 4b7348d..1e6b8ac 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.cpp -index 87f9362..e9c6d9a 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.h b/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.h -index e8ca50b..8fe3b1b 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.cpp -index 84a677f..cc95a5d 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.h -index 714a828..e06484a 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.cpp -index b64258d..ac69022 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.h b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.h -index 545b26e..27e84a6 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.cpp -index 0f5de76..f951195 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.h -index fe58c48..7f7e326 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.cpp -index 5f11409..06fa254 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h -index 93fca70..89217b7 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.cpp -index 38bf611..bed1a4e 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.h -index d87bcfd..c9eed06 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.cpp -index f6139bb..77ae052 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.h -index 8417250..ae252e6 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.cpp -index e32fb96..0f58d0a 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.h b/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.h -index 52d0725..8b6cb09 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.cpp -index 139d60a..e438290 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.h -index d9f761a..1a5e78a 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.cpp -index 22b91ba..0bfcaf3 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,10 +16,11 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -+ - #include "config-tree-animation-helper.h" - - #include "config-tree-animator.h" -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.h -index bec9132..5bf8924 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -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 376474f..2309e8e 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 -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -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 4c0bb1b..29df8f7 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 -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -index 08d7d42..4135a69 100644 ---- a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,10 +16,11 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -+ - #include "config-shadow-helper.h" - - #include <QPainter> -diff --git a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.h b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.h -index 4aab9f2..8ea66ce 100644 ---- a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/config-style-helper.cpp b/ukui-styles/qt5-config-style-ukui/config-style-helper.cpp -index 4a256c9..f9f125f 100644 ---- a/ukui-styles/qt5-config-style-ukui/config-style-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/config-style-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/config-style-helper.h b/ukui-styles/qt5-config-style-ukui/config-style-helper.h -index 341c909..20db2e9 100644 ---- a/ukui-styles/qt5-config-style-ukui/config-style-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/config-style-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/config-view-helper.cpp b/ukui-styles/qt5-config-style-ukui/config-view-helper.cpp -index c145ccc..e94d01e 100644 ---- a/ukui-styles/qt5-config-style-ukui/config-view-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/config-view-helper.cpp -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: xibowen <xibowen@kylinos.cn> -+ * -+ */ -+ - #include "ukui-config-style.h" - #include <QListView> - #include <QTreeView> -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index 32dbf37..a6becd1 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Lei Chen <leichen@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -index ab8caeb..585c166 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Lei Chen <leichen@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -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 bf5c99b..0ec1a53 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -index a25580e..dbf330b 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.cpp -index 0eea306..0cc6e98 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h -index 66c1e9c..3905689 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.cpp -index 918670d..8dc1fc0 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.cpp -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: xibowen <xibowen@kylinos.cn> -+ * -+ */ -+ - #include "config-combobox-parameters.h" - using namespace UKUIConfigStyleSpace; - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h -index 020fa31..2559d05 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.cpp -index baec393..11d4abc 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h -index a6a27e5..2d6eaf1 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.cpp -index dbaf182..ce53782 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -index 4b7f7af..eba553a 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.cpp -index 2bc8248..4cf74b2 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h -index a478c0f..850c04e 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.cpp -index 52de2b4..a266621 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h -index a271d7a..c79b738 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.cpp -index d0b9d8f..e870476 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <xibowen@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h -index 6f1cbc2..ff96a18 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.cpp -index 53235aa..76f8aa4 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h -index 644e1be..4944f64 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.cpp -index 162d7cc..016105b 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h -index 4ce5c96..7a1206a 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp -index 5108a2d..a9a8754 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -index 73d9878..9cdb1bc 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.cpp -index 57d5039..8c16c48 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h -index bd725ec..54c808f 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.cpp -index a713318..12728d1 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -index 4992c94..19c3ee9 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.cpp -index 1703649..abdef1c 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <xibowen@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -index bf8b243..bca8ae3 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <xibowen@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.cpp -index 73b790a..751ea76 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <xibowen@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h -index 83570ae..9886255 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.cpp -index 3b718fa..ef2f9c4 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h -index 0fd7a52..b126159 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.cpp -index 75856c5..ba2fd62 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -index 42954ab..23e7015 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/animations/box-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/box-animation-helper.cpp -index 3b2ec23..7e5ba67 100644 ---- a/ukui-styles/qt5-style-ukui/animations/box-animation-helper.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/box-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/box-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/box-animation-helper.h -index 017eff4..1b3d50d 100644 ---- a/ukui-styles/qt5-style-ukui/animations/box-animation-helper.h -+++ b/ukui-styles/qt5-style-ukui/animations/box-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/box-animator.cpp b/ukui-styles/qt5-style-ukui/animations/box-animator.cpp -index 79d821a..fd0269e 100644 ---- a/ukui-styles/qt5-style-ukui/animations/box-animator.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/box-animator.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/box-animator.h b/ukui-styles/qt5-style-ukui/animations/box-animator.h -index 339270c..211725f 100644 ---- a/ukui-styles/qt5-style-ukui/animations/box-animator.h -+++ b/ukui-styles/qt5-style-ukui/animations/box-animator.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/button-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/button-animation-helper.cpp -index b10af46..c70dae2 100644 ---- a/ukui-styles/qt5-style-ukui/animations/button-animation-helper.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/button-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/button-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/button-animation-helper.h -index 74ed621..5fa3eb5 100644 ---- a/ukui-styles/qt5-style-ukui/animations/button-animation-helper.h -+++ b/ukui-styles/qt5-style-ukui/animations/button-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/button-animator.cpp b/ukui-styles/qt5-style-ukui/animations/button-animator.cpp -index f482842..bf3532e 100644 ---- a/ukui-styles/qt5-style-ukui/animations/button-animator.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/button-animator.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/button-animator.h b/ukui-styles/qt5-style-ukui/animations/button-animator.h -index 2c1d017..140c40b 100644 ---- a/ukui-styles/qt5-style-ukui/animations/button-animator.h -+++ b/ukui-styles/qt5-style-ukui/animations/button-animator.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.cpp -index 2e430c0..91bd90c 100644 ---- a/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.h -index 1f78b3e..b51d2bd 100644 ---- a/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.h -+++ b/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/checkbox-animator.cpp b/ukui-styles/qt5-style-ukui/animations/checkbox-animator.cpp -index 737f7ef..0861304 100644 ---- a/ukui-styles/qt5-style-ukui/animations/checkbox-animator.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/checkbox-animator.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/checkbox-animator.h b/ukui-styles/qt5-style-ukui/animations/checkbox-animator.h -index bce2ec1..3575118 100644 ---- a/ukui-styles/qt5-style-ukui/animations/checkbox-animator.h -+++ b/ukui-styles/qt5-style-ukui/animations/checkbox-animator.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.cpp -index 6cdd5d1..8d16e5e 100644 ---- a/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.h -index 39e4702..e03a59e 100644 ---- a/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.h -+++ b/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/progressbar-animation.cpp b/ukui-styles/qt5-style-ukui/animations/progressbar-animation.cpp -index 8fd893a..cd18ae7 100644 ---- a/ukui-styles/qt5-style-ukui/animations/progressbar-animation.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/progressbar-animation.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/progressbar-animation.h b/ukui-styles/qt5-style-ukui/animations/progressbar-animation.h -index 4fc2afe..e470427 100644 ---- a/ukui-styles/qt5-style-ukui/animations/progressbar-animation.h -+++ b/ukui-styles/qt5-style-ukui/animations/progressbar-animation.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.cpp -index e6980d7..078b138 100644 ---- a/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.h -index 3602f26..681ab75 100644 ---- a/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.h -+++ b/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.cpp b/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.cpp -index 0f21d0c..bb376de 100644 ---- a/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.h b/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.h -index f06a515..e355ee4 100644 ---- a/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.h -+++ b/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.cpp -index d77caa8..b1f673a 100644 ---- a/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.h -index 7cb2f27..ab21905 100644 ---- a/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.h -+++ b/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.cpp -index 999b098..48d4414 100644 ---- a/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.h -index e3dea18..955dafd 100644 ---- a/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.h -+++ b/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/slider-animator.cpp b/ukui-styles/qt5-style-ukui/animations/slider-animator.cpp -index a0d6971..496b0b5 100644 ---- a/ukui-styles/qt5-style-ukui/animations/slider-animator.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/slider-animator.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/slider-animator.h b/ukui-styles/qt5-style-ukui/animations/slider-animator.h -index abf7157..54324fa 100644 ---- a/ukui-styles/qt5-style-ukui/animations/slider-animator.h -+++ b/ukui-styles/qt5-style-ukui/animations/slider-animator.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.cpp -index d2ed47c..170f7bf 100644 ---- a/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.h -index af43102..c9f2c2c 100644 ---- a/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.h -+++ b/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.cpp -index a679ac2..a1b0dbb 100644 ---- a/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.h -index 08ef155..3f5e923 100644 ---- a/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.h -+++ b/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/tree-animator.cpp b/ukui-styles/qt5-style-ukui/animations/tree-animator.cpp -index 4dbe3e9..8cd21fd 100644 ---- a/ukui-styles/qt5-style-ukui/animations/tree-animator.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/tree-animator.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/animations/tree-animator.h b/ukui-styles/qt5-style-ukui/animations/tree-animator.h -index 89d5402..0037a1b 100644 ---- a/ukui-styles/qt5-style-ukui/animations/tree-animator.h -+++ b/ukui-styles/qt5-style-ukui/animations/tree-animator.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/kabstract-style-parameters.cpp b/ukui-styles/qt5-style-ukui/kabstract-style-parameters.cpp -index ab131c8..ccbdebb 100644 ---- a/ukui-styles/qt5-style-ukui/kabstract-style-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/kabstract-style-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Lei Chen <leichen@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/kabstract-style-parameters.h b/ukui-styles/qt5-style-ukui/kabstract-style-parameters.h -index 6108cc7..5c8a940 100644 ---- a/ukui-styles/qt5-style-ukui/kabstract-style-parameters.h -+++ b/ukui-styles/qt5-style-ukui/kabstract-style-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Lei Chen <leichen@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.cpp b/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.cpp -index e894913..e25ec49 100644 ---- a/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.cpp -+++ b/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.h b/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.h -index 956dbf5..c8332b3 100644 ---- a/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.h -+++ b/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.cpp b/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.cpp -index 6dd5448..ebc8f17 100644 ---- a/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.cpp -+++ b/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.h b/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.h -index 579574b..9f8e860 100644 ---- a/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.h -+++ b/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp b/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp -index a2d0fec..d0a7aaf 100644 ---- a/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp -+++ b/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style.h b/ukui-styles/qt5-style-ukui/qt5-ukui-style.h -index 9509ba0..d5bf066 100644 ---- a/ukui-styles/qt5-style-ukui/qt5-ukui-style.h -+++ b/ukui-styles/qt5-style-ukui/qt5-ukui-style.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/shadow-helper.cpp b/ukui-styles/qt5-style-ukui/shadow-helper.cpp -index 7a2850e..46f29d7 100644 ---- a/ukui-styles/qt5-style-ukui/shadow-helper.cpp -+++ b/ukui-styles/qt5-style-ukui/shadow-helper.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/shadow-helper.h b/ukui-styles/qt5-style-ukui/shadow-helper.h -index b465cc1..3b8f766 100644 ---- a/ukui-styles/qt5-style-ukui/shadow-helper.h -+++ b/ukui-styles/qt5-style-ukui/shadow-helper.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp b/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp -index 71b22ce..126fa2b 100644 ---- a/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Lei Chen <leichen@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/ukui-style-parameters.h b/ukui-styles/qt5-style-ukui/ukui-style-parameters.h -index ff83c0d..6b838fe 100644 ---- a/ukui-styles/qt5-style-ukui/ukui-style-parameters.h -+++ b/ukui-styles/qt5-style-ukui/ukui-style-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Lei Chen <leichen@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/view-helper.cpp b/ukui-styles/qt5-style-ukui/view-helper.cpp -index afd95a7..5652aa9 100644 ---- a/ukui-styles/qt5-style-ukui/view-helper.cpp -+++ b/ukui-styles/qt5-style-ukui/view-helper.cpp -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Yue Lan <lanyue@kylinos.cn> -+ * -+ */ -+ - #include "qt5-ukui-style.h" - #include <QListView> - #include <QTreeView> -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.cpp -index c57a430..d77b234 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h -index 0423906..e00800f 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.cpp -index 9fd69b1..0573c53 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.cpp -@@ -1,3 +1,25 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: xibowen <xibowen@kylinos.cn> -+ * -+ */ -+ - #include "combobox-parameters.h" - - ComboBoxParameters::ComboBoxParameters() -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.h -index 04a42a5..23a8ea7 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.cpp -index 49a4812..a5fe2a0 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.h -index fb78556..6b4ba0a 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.cpp -index c6f15c1..03e5a1e 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.h -index a90ea4c..aa07c3a 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.cpp -index 391d61b..37ad797 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.h -index b89556a..d9230af 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.cpp -index d5eaa16..7904a57 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.h -index ec1648e..a8e0849 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.cpp -index fb6bf54..75c7ac1 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <xibowen@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.h -index 1377ba1..8439c50 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.cpp -index 7fbdbf5..fe0ff09 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h -index ae612f8..05258d9 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp -index 9582da3..4863cd6 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h -index 54863ac..828351b 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp -index c5816af..7c0ac18 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h -index 8f2bc68..91cffac 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.cpp -index 391853a..41be5b6 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.h -index 6d856a9..55e911f 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.cpp -index 4a1665b..b267e15 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.h -index f1db717..55521ab 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.cpp -index ee368a5..8ece588 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <xibowen@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.h -index 62bbcb2..6b1c8e0 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <xibowen@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.cpp -index ca51a88..539ff98 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <xibowen@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.h -index 145893a..0d258c4 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.cpp -index 264f25e..362cf47 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.h -index 367dcd1..d46f60a 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <lanyue@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.cpp -index aea9d58..2c63639 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h -index 742f8c8..387fe0d 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Xibowen <lanyue@kylinos.cn> -+ * Authors: xibowen <xibowen@kylinos.cn> - * - */ - -diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp -index 10538ee..4b2cb0f 100644 ---- a/ukui-styles/readconfig.cpp -+++ b/ukui-styles/readconfig.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: Jing Tan <tanjing@kylinos.cn> - * - */ - -diff --git a/ukui-styles/readconfig.h b/ukui-styles/readconfig.h -index 50a16b1..ded39fc 100644 ---- a/ukui-styles/readconfig.h -+++ b/ukui-styles/readconfig.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: Jing Tan <tanjing@kylinos.cn> - * - */ - -diff --git a/ukui-styles/themeinformation.h b/ukui-styles/themeinformation.h -index 3ee4853..4af35c2 100644 ---- a/ukui-styles/themeinformation.h -+++ b/ukui-styles/themeinformation.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -16,7 +16,7 @@ - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * -- * Authors: Yue Lan <lanyue@kylinos.cn> -+ * Authors: Jing Tan <tanjing@kylinos.cn> - * - */ - -diff --git a/ukui-styles/ukui-style-plugin.cpp b/ukui-styles/ukui-style-plugin.cpp -index b473793..a41ddd2 100644 ---- a/ukui-styles/ukui-style-plugin.cpp -+++ b/ukui-styles/ukui-style-plugin.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/ukui-style-plugin.h b/ukui-styles/ukui-style-plugin.h -index d72f232..6ee6041 100644 ---- a/ukui-styles/ukui-style-plugin.h -+++ b/ukui-styles/ukui-style-plugin.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/window-manager.cpp b/ukui-styles/window-manager.cpp -index 6915f23..e3efd8e 100644 ---- a/ukui-styles/window-manager.cpp -+++ b/ukui-styles/window-manager.cpp -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -diff --git a/ukui-styles/window-manager.h b/ukui-styles/window-manager.h -index cb93fca..d0a3201 100644 ---- a/ukui-styles/window-manager.h -+++ b/ukui-styles/window-manager.h -@@ -1,7 +1,7 @@ - /* - * Qt5-UKUI's Library - * -- * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. -+ * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0005-Add-comments-and-remove-debugging-code.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0005-Add-comments-and-remove-debugging-code.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0005-Add-comments-and-remove-debugging-code.patch 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0005-Add-comments-and-remove-debugging-code.patch 2025-02-28 09:39:53.000000000 +0800 @@ -0,0 +1,205 @@ +From: like <like1@kylinos.cn> +Date: Mon, 10 Feb 2025 14:37:10 +0800 +Subject: Add comments and remove debugging code. + +--- + ukui-styles/readconfig.cpp | 158 +++++++++++++++++++++++++++++++++++++++++++++ + ukui-styles/readconfig.h | 8 ++- + 2 files changed, 164 insertions(+), 2 deletions(-) + +diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp +index 2e532e4..a34227f 100644 +--- a/ukui-styles/readconfig.cpp ++++ b/ukui-styles/readconfig.cpp +@@ -814,6 +814,164 @@ void GlobalDTConfigPrivate::initUKUIGlobalThemeParameters() + qApp->setProperty("kradius-menu", kradiusMenu); + qApp->setProperty("kradius-normal", kradiusNormal); + qApp->setProperty("kradius-window", kradiusWindow); ++ ++ if (QGSettings::isSchemaInstalled("org.ukui.style")) { ++ auto *settings = new QGSettings("org.ukui.style"); ++ connect(settings, &QGSettings::changed, this, [=](const QString &key) { ++ if (key == "themeColor" ||key == "theme-color") { ++ // 获取当前的主题颜色 ++ QString themeColor = settings->get("themeColor").value<QString>(); ++ QColor color; ++ if (themeColor == "default") { ++ ++ } else if (themeColor == "daybreakBlue") { ++ color = QColor(55, 144, 250); ++ } else if (themeColor == "jamPurple") { ++ color = QColor(120, 115, 245); ++ } else if (themeColor == "magenta") { ++ color = QColor(235, 48, 150); ++ } else if (themeColor == "sunRed") { ++ color = QColor(243, 34, 45); ++ } else if (themeColor == "sunsetOrange") { ++ color = QColor(246, 140, 39); ++ } else if (themeColor == "dustGold") { ++ color = QColor(249, 197, 61); ++ } else if (themeColor == "polarGreen") { ++ color = QColor(82, 196, 41); ++ } ++ // 更新颜色 ++ updateColorsBasedOnAccentColor(color); ++ } ++ }); ++ ++ ++ // 初始获取主题颜色 ++ QString initialThemeColorString = settings->get("themeColor").value<QString>(); ++ QColor initialThemeColor; ++ if (initialThemeColorString == "default") { ++ ++ } else if (initialThemeColorString == "daybreakBlue") { ++ initialThemeColor = QColor(55, 144, 250); ++ } else if (initialThemeColorString == "jamPurple") { ++ initialThemeColor = QColor(120, 115, 245); ++ } else if (initialThemeColorString == "magenta") { ++ initialThemeColor = QColor(235, 48, 150); ++ } else if (initialThemeColorString == "sunRed") { ++ initialThemeColor = QColor(243, 34, 45); ++ } else if (initialThemeColorString == "sunsetOrange") { ++ initialThemeColor = QColor(246, 140, 39); ++ } else if (initialThemeColorString == "dustGold") { ++ initialThemeColor = QColor(249, 197, 61); ++ } else if (initialThemeColorString == "polarGreen") { ++ initialThemeColor = QColor(82, 196, 41); ++ } ++ updateColorsBasedOnAccentColor(initialThemeColor); ++ } ++} ++ ++/** ++ * @brief 根据传入的强调色更新全局颜色配置 ++ * ++ * 此函数用于基于给定的强调色(accentColor)更新一系列的颜色属性。它会将强调色应用于多个颜色相关的属性, ++ * 同时处理包含特定颜色的 CSS 字符串,将其中的默认颜色替换为强调色,并将最终的颜色值设置为应用程序的属性。 ++ * ++ * @param accentColor 作为基础的强调色,用于更新其他颜色属性 ++ */ ++void GlobalDTConfigPrivate::updateColorsBasedOnAccentColor(const QColor &accentColor) ++{ ++ QBrush accentColorBrush = QBrush(QColor(accentColor)); ++ ++ kBrandNormal = accentColorBrush; ++ linkInactive = accentColorBrush; ++ highLightActive = accentColorBrush; ++ linkActive = accentColorBrush; ++ highLightInactive = accentColorBrush; ++ ++ kLineBrandNormal = accentColorBrush; ++ kLineBrandHover = accentColorBrush; ++ kLineBrandDisable = accentColorBrush; ++ kLineBrandClick = accentColorBrush; ++ kBrand1 = accentColorBrush; ++ ++ QString cssStringhover = "linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%), rgba(55, 144, 250, 1)"; ++ QColor resultColor = processCSSColor(cssStringhover, accentColor); ++ kBrandHover = resultColor; ++ ++ QString cssStringclick = "linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%), rgba(55, 144, 250, 1)"; ++ QColor resultColor1 = processCSSColor(cssStringclick, accentColor); ++ kBrandClick = resultColor1; ++ ++ qApp->setProperty("kbrand-normal", kBrandNormal); ++ qApp->setProperty("kbrand-hover", kBrandHover); ++ qApp->setProperty("kbrand-click", kBrandClick); ++ ++ qApp->setProperty("link-inactive", linkInactive); ++ qApp->setProperty("highlight-active", highLightActive); ++ qApp->setProperty("link-active", linkActive); ++ qApp->setProperty("highlight-inactive", highLightInactive); ++ ++ qApp->setProperty("kline-brand-normal", kLineBrandNormal); ++ qApp->setProperty("kline-brand-hover", kLineBrandHover); ++ qApp->setProperty("kline-brand-disable", kLineBrandDisable); ++ qApp->setProperty("kline-brand-click", kLineBrandClick); ++ qApp->setProperty("kbrand1", kBrand1); ++} ++ ++QColor GlobalDTConfigPrivate::stringToColor(const QString &colorStr) ++{ ++ QStringList parts = colorStr.mid(colorStr.indexOf("(") + 1, colorStr.indexOf(")") - colorStr.indexOf("(") - 1).split(","); ++ if (parts.size() == 4) { ++ int r = parts[0].trimmed().toInt(); ++ int g = parts[1].trimmed().toInt(); ++ int b = parts[2].trimmed().toInt(); ++ double a = parts[3].trimmed().toDouble(); ++ return QColor(r, g, b, static_cast<int>(a * 255)); ++ } ++ return QColor(); ++} ++ ++/** ++ * @brief processCSSColor 函数用于处理 CSS 字符串中的颜色信息,将特定的 rgba 颜色替换为指定颜色, ++ * 提取所有的 rgba 颜色字符串并转换为 QColor 对象,最后将这些颜色混合得到一个最终颜色。 ++ * ++ * @param cssString 输入的 CSS 字符串,其中可能包含一个或多个 rgba 颜色值。 ++ * @param replacementColor 用于替换特定 rgba 颜色(rgba(55, 144, 250, 1))的 QColor 对象。 ++ * @return QColor 返回混合所有提取到的有效 rgba 颜色后的最终 QColor 对象。 ++ */ ++QColor GlobalDTConfigPrivate::processCSSColor(const QString &cssString, const QColor &replacementColor) ++{ ++ // 构建新的 rgba 字符串 ++ QString newRGBA = QString("rgba(%1, %2, %3, %4)").arg(replacementColor.red()).arg(replacementColor.green()).arg(replacementColor.blue()).arg(replacementColor.alpha() / 255.0); ++ ++ // 查找原字符串中 rgba(55, 144, 250, 1) 并替换 ++ QString newCSSString = cssString; ++ newCSSString.replace("rgba(55, 144, 250, 1)", newRGBA); ++ ++ // 提取所有 rgba 颜色字符串 ++ QStringList rgbaStrings; ++ int index = 0; ++ while ((index = newCSSString.indexOf("rgba", index)) != -1) { ++ int start = newCSSString.indexOf("(", index); ++ int end = newCSSString.indexOf(")", start); ++ if (start != -1 && end != -1) { ++ rgbaStrings.append(newCSSString.mid(index, end - index + 1)); ++ index = end + 1; ++ } else { ++ break; ++ } ++ } ++ ++ // 将 rgba 字符串转换为 QColor 对象 ++ QList<QColor> colors; ++ for (const QString& rgba : rgbaStrings) { ++ QColor color = stringToColor(rgba); ++ if (color.isValid()) { ++ colors.append(color); ++ } ++ } ++ ++ // 混合所有颜色 ++ return mixColor(colors); + } + + GlobalDTConfig::GlobalDTConfig() : d(new GlobalDTConfigPrivate()) +diff --git a/ukui-styles/readconfig.h b/ukui-styles/readconfig.h +index ad2aeb5..1aee0a3 100644 +--- a/ukui-styles/readconfig.h ++++ b/ukui-styles/readconfig.h +@@ -32,8 +32,10 @@ + namespace UKUIGlobalDTConfig { + + +-class GlobalDTConfigPrivate ++class GlobalDTConfigPrivate : public QObject + { ++ Q_OBJECT ++ + public: + explicit GlobalDTConfigPrivate(); + ~GlobalDTConfigPrivate(); +@@ -46,7 +48,9 @@ public: + + bool load(const QString &cfg); + void initUKUIGlobalThemeParameters(); +- ++ void updateColorsBasedOnAccentColor(const QColor& accentColor); ++ QColor stringToColor(const QString& colorStr); ++ QColor processCSSColor(const QString& cssString, const QColor& replacementColor); + + //qt palette + QBrush windowTextActive ; diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0005-menu-tooltip.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0005-menu-tooltip.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0005-menu-tooltip.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0005-menu-tooltip.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,2159 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Thu, 14 Sep 2023 09:42:08 +0800 -Subject: =?utf-8?b?bWVudSAgdG9vbHRpcOWTjeW6lOaOp+WItumdouadv+eahOmAj+aYjg==?= - =?utf-8?b?5bqm6K6+572u?= - ---- - .../widget/filedialog/kyfiledialog.cpp | 10 +- - .../widget/filedialog/sidebar.cpp | 12 +- - ukui-styles/blur-helper.cpp | 10 +- - .../animations/config-slider-animator.cpp | 2 +- - .../qt5-config-style-ukui/config-shadow-helper.cpp | 26 +- - .../qt5-config-style-ukui/config-shadow-helper.h | 7 +- - .../themeconfig/UKUIConfigClassical.json | 42 ++++ - .../themeconfig/UKUIConfigDefault.json | 48 ++++ - .../themeconfig/UKUIConfigFashion.json | 48 ++++ - .../ukui-config-style-parameters.cpp | 215 +++++++++++++---- - .../qt5-config-style-ukui/ukui-config-style.cpp | 265 ++++++++++++++++----- - .../widget-parameters/config-checkbox-parameters.h | 2 +- - .../config-radiobutton-parameters.h | 2 +- - .../config-scrollbar-parameters.cpp | 1 - - .../config-scrollbar-parameters.h | 2 +- - .../widget-parameters/config-slider-parameters.cpp | 2 - - .../widget-parameters/config-slider-parameters.h | 2 +- - .../widget-parameters/config-tree-parameters.h | 2 +- - .../qt5-style-ukui/animations/slider-animator.cpp | 2 +- - ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp | 216 ++++++++++++----- - .../qt5-style-ukui/ukui-style-parameters.cpp | 24 +- - .../widget-parameters/checkbox-parameters.h | 1 - - .../widget-parameters/radiobutton-parameters.h | 1 - - .../widget-parameters/scrollbar-parameters.cpp | 1 - - .../widget-parameters/scrollbar-parameters.h | 2 - - .../widget-parameters/slider-parameters.cpp | 2 - - .../widget-parameters/slider-parameters.h | 2 - - .../widget-parameters/tree-parameters.h | 1 - - ukui-styles/readconfig.cpp | 2 +- - ukui-styles/themeinformation.h | 3 + - ukui-styles/ukui-styles.pro | 2 +- - 31 files changed, 741 insertions(+), 216 deletions(-) - -diff --git a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -index d64458e..546f535 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -+++ b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -@@ -1672,17 +1672,17 @@ void KyNativeFileDialog::paintEvent(QPaintEvent *e) - QRect sideBarRect = QRect(mKyFileDialogUi->m_sider->mapTo(this, QPoint()), mKyFileDialogUi->m_sider->size()); - auto adjustedRect = sideBarRect.adjusted(0, 0, 0, 0); - int radius = 6; -- if(qApp->style()->property("normalRadius").isValid()) -- radius = qApp->style()->property("normalRadius").toInt(); -+ if(this && this->property("normalRadius").isValid()) -+ radius = this->property("normalRadius").toInt(); - sidebarPath.addRoundedRect(adjustedRect, radius, radius); - - // sidebarPath.addRect(adjustedRect.adjusted(0, 0, 0, -6)); - // sidebarPath.addRect(adjustedRect.adjusted(6, 0, 0, 0)); - QPainter p(this); - QPainterPath contentPath; -- if(qApp->style()->property("maxRadius").isValid()) -- radius = qApp->style()->property("maxRadius").toInt(); -- qDebug() << "KyNativeFileDialog radius........" << radius; -+ if(this && this->property("maxRadius").isValid()) -+ radius = this->property("maxRadius").toInt(); -+// qDebug() << "KyNativeFileDialog radius........" << radius; - contentPath.addRoundedRect(this->rect(), radius, radius); - auto bgPath = contentPath - sidebarPath; - p.fillPath(bgPath, color); -diff --git a/qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp b/qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp -index 969ace3..2194f14 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp -+++ b/qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp -@@ -362,8 +362,8 @@ void SideBarItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o - rect.setRight(view->viewport()->rect().right()); - } - int radius = 4; -- if(qApp->style()->property("minRadius").isValid()) -- radius = qApp->style()->property("minRadius").toInt(); -+ if(view && view->property("minRadius").isValid()) -+ radius = view->property("minRadius").toInt(); - - rightRoundedRegion.addRoundedRect(rect, radius, radius); - rightRoundedRegion.addRect(rect.adjusted(0, 0, -1 * radius, 0)); -@@ -399,8 +399,8 @@ void SideBarStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleO - QColor color = option->palette.color(QPalette::Highlight); - painter->setPen(color); - int radius = 6; -- if(qApp->style()->property("normalRadius").isValid()) -- radius = qApp->style()->property("normalRadius").toInt(); -+ if(widget && widget->property("normalRadius").isValid()) -+ radius = widget->property("normalRadius").toInt(); - - painter->drawRoundedRect(option->rect, radius, radius); - painter->restore(); -@@ -413,8 +413,8 @@ void SideBarStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleO - QPainterPath leftRoundedRegion; - leftRoundedRegion.setFillRule(Qt::WindingFill); - int radius = 4; -- if(qApp->style()->property("minRadius").isValid()) -- radius = qApp->style()->property("minRadius").toInt(); -+ if(widget && widget->property("minRadius").isValid()) -+ radius = widget->property("minRadius").toInt(); - - leftRoundedRegion.addRoundedRect(option->rect, radius, radius); - leftRoundedRegion.addRect(option->rect.adjusted(radius, 0, 0, 0)); -diff --git a/ukui-styles/blur-helper.cpp b/ukui-styles/blur-helper.cpp -index 83948ff..7028ac9 100644 ---- a/ukui-styles/blur-helper.cpp -+++ b/ukui-styles/blur-helper.cpp -@@ -281,7 +281,10 @@ void BlurHelper::delayUpdate(QWidget *w, bool updateBlurRegionOnly) - break; - } - QPainterPath path; -- path.addRoundedRect(widget->rect().adjusted(+2,+8,-2,-8), 8, 8); -+ int radius = 8; -+ if(widget->property("maxRadius").isValid()) -+ radius = widget->property("maxRadius").toInt(); -+ path.addRoundedRect(widget->rect(), radius, radius); - KWindowEffects::enableBlurBehind(widget->winId(), true, path.toFillPolygon().toPolygon()); - if (!updateBlurRegionOnly) - widget->update(); -@@ -290,7 +293,10 @@ void BlurHelper::delayUpdate(QWidget *w, bool updateBlurRegionOnly) - - if (widget->inherits("QTipLabel")) { - QPainterPath path; -- path.addRoundedRect(widget->rect().adjusted(+4,+4,-4,-4), 6, 6); -+ int radius = 8; -+ if(widget->property("normalRadius").isValid()) -+ radius = widget->property("normalRadius").toInt(); -+ path.addRoundedRect(widget->rect().adjusted(+4,+4,-4,-4), radius, radius); - KWindowEffects::enableBlurBehind(widget->winId(), true, path.toFillPolygon().toPolygon()); - if (!updateBlurRegionOnly) - widget->update(); -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.cpp -index 0f58d0a..3c92579 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.cpp -@@ -108,7 +108,7 @@ bool ConfigSliderAnimator::bindWidget(QWidget *w) - m_silder_move_position->setStartValue(0.0); - m_silder_move_position->setEndValue(1.0); - m_silder_move_position->setDuration(150); -- m_silder_move_position->setEasingCurve(QEasingCurve::Linear); -+ m_silder_move_position->setEasingCurve(QEasingCurve::InOutCubic); - addAnimation(m_silder_move_position); - - connect(m_slider_opacity, &QVariantAnimation::valueChanged, w, [=]() { -diff --git a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -index 4135a69..d83b09b 100644 ---- a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -@@ -108,7 +108,7 @@ void ConfigShadowHelper::registerWidget(QWidget *widget) - } - } - -- auto shadow = getShadow(shadowColor, shadowBorder, darkness, radius.x(), radius.y(), radius.z(), radius.w()); -+ auto shadow = getShadow(shadowColor, shadowBorder, darkness, widget, radius.x(), radius.y(), radius.z(), radius.w()); - shadow->setPadding(QMargins(margins.x(), margins.y(), margins.z(), margins.w())); - shadow->setWindow(widget->windowHandle()); - shadow->create(); -@@ -139,7 +139,7 @@ void ConfigShadowHelper::unregisterWidget(const QWidget *widget) - } - } - --QPixmap ConfigShadowHelper::getShadowPixmap(QColor color, /*ConfigShadowHelper::State state,*/ int shadow_border, qreal darkness, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight) -+QPixmap ConfigShadowHelper::getShadowPixmap(QColor color, /*ConfigShadowHelper::State state,*/ int shadow_border, qreal darkness, QWidget* widget, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight) - { - int maxTopRadius = qMax(borderRadiusTopLeft, borderRadiusTopRight); - int maxBottomRadius = qMax(borderRadiusBottomLeft, borderRadiusBottomRight); -@@ -155,8 +155,8 @@ QPixmap ConfigShadowHelper::getShadowPixmap(QColor color, /*ConfigShadowHelper:: - QPoint currentPos; - - int qAppMaxradius = maxRadius; -- if(qApp->style()->property("maxRadius").isValid()){ -- qAppMaxradius = qApp->style()->property("maxRadius").toInt(); -+ if(widget && widget->property("maxRadius").isValid()){ -+ qAppMaxradius = widget->property("maxRadius").toInt(); - // qDebug() << "radius...." << qAppMaxradius; - } - // move to top left arc start point -@@ -231,7 +231,7 @@ QPixmap ConfigShadowHelper::getShadowPixmap(QColor color, /*ConfigShadowHelper:: - QPixmap darkerTarget = QPixmap::fromImage(newImg); - painter2.begin(&darkerTarget); - -- auto borderPath = caculateRelativePainterPath(borderRadiusTopLeft + 0.5, borderRadiusTopRight + 0.5, borderRadiusBottomLeft + 0.5, borderRadiusBottomRight + 0.5); -+ auto borderPath = caculateRelativePainterPath(widget, borderRadiusTopLeft + 0.5, borderRadiusTopRight + 0.5, borderRadiusBottomLeft + 0.5, borderRadiusBottomRight + 0.5); - painter2.setCompositionMode(QPainter::CompositionMode_DestinationOver); - painter2.setRenderHint(QPainter::HighQualityAntialiasing); - QColor borderColor = color; -@@ -245,7 +245,7 @@ QPixmap ConfigShadowHelper::getShadowPixmap(QColor color, /*ConfigShadowHelper:: - return darkerTarget; - } - --QPainterPath ConfigShadowHelper::caculateRelativePainterPath(qreal borderRadiusTopLeft, qreal borderRadiusTopRight, qreal borderRadiusBottomLeft, qreal borderRadiusBottomRight) -+QPainterPath ConfigShadowHelper::caculateRelativePainterPath(QWidget *widget, qreal borderRadiusTopLeft, qreal borderRadiusTopRight, qreal borderRadiusBottomLeft, qreal borderRadiusBottomRight) - { - qreal maxTopRadius = qMax(borderRadiusTopLeft, borderRadiusTopRight); - qreal maxBottomRadius = qMax(borderRadiusBottomLeft, borderRadiusBottomRight); -@@ -259,9 +259,9 @@ QPainterPath ConfigShadowHelper::caculateRelativePainterPath(qreal borderRadiusT - QPointF currentPos; - - int qAppMaxradius = maxRadius; -- if(qApp->style()->property("maxRadius").isValid()){ -- qAppMaxradius = qApp->style()->property("maxRadius").toInt(); -- qDebug() << "radius...." << qAppMaxradius; -+ if(widget && widget->property("maxRadius").isValid()){ -+ qAppMaxradius = widget->property("maxRadius").toInt(); -+ //qDebug() << "radius...." << qAppMaxradius; - } - - // move to top left arc start point -@@ -306,9 +306,9 @@ QPainterPath ConfigShadowHelper::caculateRelativePainterPath(qreal borderRadiusT - return windowRelativePath; - } - --KWindowShadow *ConfigShadowHelper::getShadow(QColor color, int shadow_border, qreal darkness, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight) -+KWindowShadow *ConfigShadowHelper::getShadow(QColor color, int shadow_border, qreal darkness, QWidget* widget, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight) - { -- QPixmap shadowPixmap = getShadowPixmap(color, shadow_border, darkness, borderRadiusTopLeft, borderRadiusTopRight, borderRadiusBottomLeft, borderRadiusBottomRight); -+ QPixmap shadowPixmap = getShadowPixmap(color, shadow_border, darkness, widget, borderRadiusTopLeft, borderRadiusTopRight, borderRadiusBottomLeft, borderRadiusBottomRight); - qreal maxTopRadius = qMax(borderRadiusTopLeft, borderRadiusTopRight); - qreal maxBottomRadius = qMax(borderRadiusBottomLeft, borderRadiusBottomRight); - int maxRadius = qMax(maxTopRadius, maxBottomRadius); -@@ -374,7 +374,7 @@ bool ConfigShadowHelper::eventFilter(QObject *watched, QEvent *event) - return false; - } - -- auto shadow = getShadow(shadowColor, shadowBorder, darkness, radius.x(), radius.y(), radius.z(), radius.w()); -+ auto shadow = getShadow(shadowColor, shadowBorder, darkness, widget, radius.x(), radius.y(), radius.z(), radius.w()); - shadow->setPadding(QMargins(margins.x(), margins.y(), margins.z(), margins.w())); - shadow->setWindow(widget->windowHandle()); - shadow->create(); -@@ -406,7 +406,7 @@ bool ConfigShadowHelper::eventFilter(QObject *watched, QEvent *event) - - int radius = 10; - -- auto shadow = getShadow(shadowColor, 15, 0.5, radius, radius, radius, radius); -+ auto shadow = getShadow(shadowColor, 15, 0.5, widget, radius, radius, radius, radius); - shadow->setPadding(QMargins(15, 15, 15, 15)); - shadow->setWindow(widget->windowHandle()); - shadow->create(); -diff --git a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.h b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.h -index 8ea66ce..c49dcf7 100644 ---- a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.h -@@ -47,19 +47,21 @@ public: - QColor color, - int shadow_border, - qreal darkness, -+ QWidget *widget, - int borderRadiusTopLeft = 0, - int borderRadiusTopRight = 0, - int borderRadiusBottomLeft = 0, - int borderRadiusBottomRight = 0); - -- QPainterPath caculateRelativePainterPath(qreal borderRadiusTopLeft = 0, -+ QPainterPath caculateRelativePainterPath(QWidget *widget, -+ qreal borderRadiusTopLeft = 0, - qreal borderRadiusTopRight = 0, - qreal borderRadiusBottomLeft = 0, - qreal borderRadiusBottomRight = 0); - - - KWindowShadow *getShadow(QColor color, int shadow_border, -- qreal darkness, -+ qreal darkness, QWidget* widget, - int borderRadiusTopLeft = 0, - int borderRadiusTopRight = 0, - int borderRadiusBottomLeft = 0, -@@ -69,6 +71,7 @@ public: - - private: - QMap<const QWidget *, KWindowShadow *> m_shadows; -+ int m_maxRadius = 8; - }; - - } -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigClassical.json b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigClassical.json -index 7136a60..a1017d0 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigClassical.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigClassical.json -@@ -240,6 +240,13 @@ - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, -+ "HighlightListView":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, - "TranslucentListView":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, -@@ -255,6 +262,13 @@ - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "HighlightTreeView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "Table":{ -@@ -264,6 +278,13 @@ - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "HighlightTable":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "CheckBox":{ -@@ -601,6 +622,13 @@ - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, -+ "HighlightListView":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, - "TranslucentListView":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, -@@ -616,6 +644,13 @@ - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "HighlightTreeView":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "Table":{ -@@ -625,6 +660,13 @@ - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "HighlightTable":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "CheckBox":{ -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json -index 23b5a99..c99d47f 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json -@@ -235,6 +235,14 @@ - }, - "ListView":{ - "DefaultListView":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightListView":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -@@ -253,6 +261,14 @@ - }, - "TreeView":{ - "DefaultTreeView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -@@ -263,6 +279,14 @@ - }, - "Table":{ - "DefaultTable":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTable":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -@@ -619,6 +643,14 @@ - }, - "ListView":{ - "DefaultListView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightListView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -@@ -637,6 +669,14 @@ - }, - "TreeView":{ - "DefaultTreeView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -@@ -647,6 +687,14 @@ - }, - "Table":{ - "DefaultTable":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTable":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json -index 0de7d72..0148840 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json -@@ -233,6 +233,14 @@ - }, - "ListView":{ - "DefaultListView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightListView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -@@ -250,6 +258,14 @@ - }, - "TreeView":{ - "DefaultTreeView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -@@ -260,6 +276,14 @@ - }, - "Table":{ - "DefaultTable":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTable":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -@@ -613,6 +637,14 @@ - }, - "ListView":{ - "DefaultListView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightListView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -@@ -630,6 +662,14 @@ - }, - "TreeView":{ - "DefaultTreeView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -@@ -640,6 +680,14 @@ - }, - "Table":{ - "DefaultTable":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTable":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index a6becd1..8393924 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -933,6 +933,30 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - if (widget->property("setCheckDisableBrush").isValid() && widget->property("setCheckDisableBrush").canConvert<QBrush>()) { - checkDisableBrush = widget->property("setCheckDisableBrush").value<QBrush>(); - } -+ if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { -+ defaultPen = widget->property("setDefaultPen").value<QPen>(); -+ } -+ if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { -+ clickPen = widget->property("setClickPen").value<QPen>(); -+ } -+ if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { -+ hoverPen = widget->property("setHoverPen").value<QPen>(); -+ } -+ if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { -+ disablePen = widget->property("setDisablePen").value<QPen>(); -+ } -+ if (widget->property("setCheckPen").isValid() && widget->property("setCheckPen").canConvert<QPen>()) { -+ checkPen = widget->property("setCheckPen").value<QPen>(); -+ } -+ if (widget->property("setCheckHoverPen").isValid() && widget->property("setCheckHoverPen").canConvert<QPen>()) { -+ checkHoverPen = widget->property("setCheckHoverPen").value<QPen>(); -+ } -+ if (widget->property("setCheckClickPen").isValid() && widget->property("setCheckClickPen").canConvert<QPen>()) { -+ checkClickPen = widget->property("setCheckClickPen").value<QPen>(); -+ } -+ if (widget->property("setCheckDisablePen").isValid() && widget->property("setCheckDisablePen").canConvert<QPen>()) { -+ checkDisablePen = widget->property("setCheckDisablePen").value<QPen>(); -+ } - if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { - focusPen = widget->property("setFocusPen").value<QPen>(); - } -@@ -1312,6 +1336,30 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - if (widget->property("setCheckDisableBrush").isValid() && widget->property("setCheckDisableBrush").canConvert<QBrush>()) { - checkDisableBrush = widget->property("setCheckDisableBrush").value<QBrush>(); - } -+ if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { -+ defaultPen = widget->property("setDefaultPen").value<QPen>(); -+ } -+ if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { -+ clickPen = widget->property("setClickPen").value<QPen>(); -+ } -+ if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { -+ hoverPen = widget->property("setHoverPen").value<QPen>(); -+ } -+ if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { -+ disablePen = widget->property("setDisablePen").value<QPen>(); -+ } -+ if (widget->property("setCheckPen").isValid() && widget->property("setCheckPen").canConvert<QPen>()) { -+ checkPen = widget->property("setCheckPen").value<QPen>(); -+ } -+ if (widget->property("setCheckHoverPen").isValid() && widget->property("setCheckHoverPen").canConvert<QPen>()) { -+ checkHoverPen = widget->property("setCheckHoverPen").value<QPen>(); -+ } -+ if (widget->property("setCheckClickPen").isValid() && widget->property("setCheckClickPen").canConvert<QPen>()) { -+ checkClickPen = widget->property("setCheckClickPen").value<QPen>(); -+ } -+ if (widget->property("setCheckDisablePen").isValid() && widget->property("setCheckDisablePen").canConvert<QPen>()) { -+ checkDisablePen = widget->property("setCheckDisablePen").value<QPen>(); -+ } - if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { - focusPen = widget->property("setFocusPen").value<QPen>(); - } -@@ -2077,11 +2125,15 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - int radius = m_radiusStruct.normalRadius; - - bool needTranslucent = false; -+ bool highlightMode = false; -+ if (widget && widget->property("highlightMode").isValid()) { -+ highlightMode = widget->property("highlightMode").toBool(); -+ } - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - -- UKUIColorTheme::ListViewColorCfg listViewColorCfg = readCfg()->listViewColorCfg(option->palette ,needTranslucent ? C_ListView_Translucent : C_ListView_Default); -+ UKUIColorTheme::ListViewColorCfg listViewColorCfg = readCfg()->listViewColorCfg(option->palette, highlightMode ? C_ListView_Highlight : (needTranslucent ? C_ListView_Translucent : C_ListView_Default)); - - QBrush defaultBrush = listViewColorCfg.defaultBrush; - QBrush hoverBrush = listViewColorCfg.hoverBrush; -@@ -2190,6 +2242,12 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - if (widget->property("setTextSelectPen").isValid() && widget->property("setTextSelectPen").canConvert<QPen>()) { - textSelectPen = widget->property("setTextSelectPen").value<QPen>(); - } -+ if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { -+ hoverPen = widget->property("setHoverPen").value<QPen>(); -+ } -+ if (widget->property("setSelectPen").isValid() && widget->property("setSelectPen").canConvert<QPen>()) { -+ selectPen = widget->property("setSelectPen").value<QPen>(); -+ } - } - - m_ListParameters.radius = radius; -@@ -2207,7 +2265,11 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - { - int radius = m_radiusStruct.normalRadius;; - -- UKUIColorTheme::TreeViewColorCfg treeViewColorCfg = readCfg()->treeViewColorCfg(option->palette, C_TreeView_Default); -+ bool highlightMode = false; -+ if (widget && widget->property("highlightMode").isValid()) { -+ highlightMode = widget->property("highlightMode").toBool(); -+ } -+ UKUIColorTheme::TreeViewColorCfg treeViewColorCfg = readCfg()->treeViewColorCfg(option->palette, highlightMode ? C_TreeView_HighLight : C_TreeView_Default); - - QBrush defaultBrush = treeViewColorCfg.defaultBrush; - QBrush hoverBrush = treeViewColorCfg.hoverBrush; -@@ -2285,8 +2347,6 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - branchDisableBrush = disableBrush; - - if (widget) { -- if (widget->property("animation").isValid()) -- m_TreeParameters.animation = widget->property("animation").toBool(); - - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); -@@ -2321,6 +2381,12 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - if (widget->property("setTextSelectPen").isValid() && widget->property("setTextSelectPen").canConvert<QPen>()) { - textSelectPen = widget->property("setTextSelectPen").value<QPen>(); - } -+ if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { -+ hoverPen = widget->property("setHoverPen").value<QPen>(); -+ } -+ if (widget->property("setSelectPen").isValid() && widget->property("setSelectPen").canConvert<QPen>()) { -+ selectPen = widget->property("setSelectPen").value<QPen>(); -+ } - } - - m_TreeParameters.radius = radius; -@@ -2342,8 +2408,13 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - - void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int radius = m_radiusStruct.normalRadius;; -- UKUIColorTheme::TableColorCfg tableColorCfg = readCfg()->tableColorCfg(option->palette, C_Table_Default); -+ int radius = m_radiusStruct.normalRadius; -+ -+ bool highlightMode = false; -+ if (widget && widget->property("highlightMode").isValid()) { -+ highlightMode = widget->property("highlightMode").toBool(); -+ } -+ UKUIColorTheme::TableColorCfg tableColorCfg = readCfg()->tableColorCfg(option->palette, highlightMode ? C_Table_Highlight : C_Table_Default); - - QBrush defaultBrush = tableColorCfg.defaultBrush; - QBrush hoverBrush = QBrush(tableColorCfg.hoverBrush); -@@ -2643,11 +2714,6 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - break; - } - -- if (widget && widget->property("animation").isValid()) -- m_CheckBoxParameters.animation = widget->property("animation").toBool(); -- -- m_CheckBoxParameters.checkBoxContentPen = contentPen; -- - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); -@@ -2716,6 +2782,7 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - m_CheckBoxParameters.checkBoxOnDefaultPen = onDefaultPen; - m_CheckBoxParameters.checkBoxOnHoverPen = onHoverPen; - m_CheckBoxParameters.checkBoxOnClickPen = onClickPen; -+ m_CheckBoxParameters.checkBoxContentPen = contentPen; - - m_CheckBoxParameters.checkBoxDefaultBrush = defaultBrush; - m_CheckBoxParameters.checkBoxHoverBrush = hoverBrush; -@@ -2893,11 +2960,20 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - if (widget->property("setOnClickBrush").isValid() && widget->property("setOnClickBrush").canConvert<QBrush>()) { - onClickBrush = widget->property("setOnClickBrush").value<QBrush>(); - } -+ if (widget->property("setChildrenOnDefaultBrush").isValid() && widget->property("setChildrenOnDefaultBrush").canConvert<QBrush>()) { -+ childrenOnDefaultBrush = widget->property("setChildrenOnDefaultBrush").value<QBrush>(); -+ } -+ if (widget->property("setChildrenOnHoverBrush").isValid() && widget->property("setChildrenOnHoverBrush").canConvert<QBrush>()) { -+ childrenOnHoverBrush = widget->property("setChildrenOnHoverBrush").value<QBrush>(); -+ } -+ if (widget->property("setChildrenOnClickBrush").isValid() && widget->property("setChildrenOnClickBrush").canConvert<QBrush>()) { -+ childrenOnClickBrush = widget->property("setChildrenOnClickBrush").value<QBrush>(); -+ } -+ if (widget->property("setChildrenOnDisableBrush").isValid() && widget->property("setChildrenOnDisableBrush").canConvert<QBrush>()) { -+ childrenOnDisableBrush = widget->property("setChildrenOnDisableBrush").value<QBrush>(); -+ } - } - -- if(widget && widget->property("animation").isValid()) -- m_RadioButtonParameters.animation = widget->property("animation").toBool(); -- - m_RadioButtonParameters.radioButtonDefaultPen = defaultPen; - m_RadioButtonParameters.radioButtonHoverPen = hoverPen; - m_RadioButtonParameters.radioButtonClickPen = clickPen; -@@ -3089,9 +3165,6 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - break; - } - -- if (widget->property("animation").isValid()) -- m_SliderParameters.animation = widget->property("animation").toBool(); -- - if (widget) { - if (widget->property("setGrooveRadius").isValid() && widget->property("setGrooveRadius").canConvert<int>()) { - grooveRadius = widget->property("setGrooveRadius").value<int>(); -@@ -3126,6 +3199,22 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - if (widget->property("setGrooveUnvalueDisableBrush").isValid() && widget->property("setGrooveUnvalueDisableBrush").canConvert<QBrush>()) { - grooveUnvalueDisableBrush = widget->property("setGrooveUnvalueDisableBrush").value<QBrush>(); - } -+ -+ if (widget->property("setHandleDefaultPen").isValid() && widget->property("setHandleDefaultPen").canConvert<QBrush>()) { -+ handleDefaultPen = widget->property("setHandleDefaultPen").value<QPen>(); -+ } -+ if (widget->property("setHandleHoverPen").isValid() && widget->property("setHandleHoverPen").canConvert<QBrush>()) { -+ handleHoverPen = widget->property("setHandleHoverPen").value<QPen>(); -+ } -+ if (widget->property("setHandleClickPen").isValid() && widget->property("setHandleClickPen").canConvert<QBrush>()) { -+ handleClickPen = widget->property("setHandleClickPen").value<QPen>(); -+ } -+ if (widget->property("setHandleDisablePen").isValid() && widget->property("setHandleDisablePen").canConvert<QBrush>()) { -+ handleDisablePen = widget->property("setHandleDisablePen").value<QPen>(); -+ } -+ if (widget->property("setSliderGroovePen").isValid() && widget->property("setSliderGroovePen").canConvert<QBrush>()) { -+ sliderGroovePen = widget->property("setSliderGroovePen").value<QPen>(); -+ } - } - - m_SliderParameters.sliderGrooveRadius = grooveRadius; -@@ -3253,22 +3342,14 @@ void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, con - if (widget->property("setContentMidLightColor").isValid() && widget->property("setContentMidLightColor").canConvert<QColor>()) { - endColor = widget->property("setContentMidLightColor").value<QColor>(); - } -+ if (widget->property("setGrooveDefaultPen").isValid() && widget->property("setGrooveDefaultPen").canConvert<QColor>()) { -+ grooveDefaultPen = widget->property("setGrooveDefaultPen").value<QPen>(); -+ } -+ if (widget->property("setGrooveDisablePen").isValid() && widget->property("setGrooveDisablePen").canConvert<QColor>()) { -+ grooveDisablePen = widget->property("setGrooveDisablePen").value<QPen>(); -+ } - } - -- if(qApp->palette().color(QPalette::Active, QPalette::Button) != -- option->palette.color(QPalette::Active, QPalette::Button)) -- grooveDefaultBrush = pb->palette.brush(QPalette::Active, QPalette::Button); -- if(needTranslucent && qApp->palette().color(QPalette::Active, QPalette::BrightText) != -- option->palette.color(QPalette::Active, QPalette::BrightText)) -- { -- QColor grooveDefaultColor = pb->palette.color(QPalette::Active, QPalette::BrightText); -- grooveDefaultColor.setAlphaF(0.10); -- grooveDefaultBrush.setColor(grooveDefaultColor); -- } -- if(qApp->palette().color(QPalette::Disabled, QPalette::Button) != -- option->palette.color(QPalette::Disabled, QPalette::Button)) -- grooveDisableBrush = pb->palette.brush(QPalette::Disabled, QPalette::Button); -- - m_ProgressBarParameters.radius = radius; - - m_ProgressBarParameters.progressBarContentPen = contentPen; -@@ -3298,9 +3379,6 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - QBrush sliderClickBrush = scrollBarColorCfg.sliderClickBrush; - QBrush sliderDisableBrush = scrollBarColorCfg.sliderDisableBrush; - -- if(widget->property("animation").isValid()) -- m_ScrollBarParameters.animation = widget->property("animation").toBool(); -- - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option); -@@ -3426,11 +3504,31 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - UKUIColorTheme::ToolTipColorCfg tooltipColorCfg = readCfg()->toolTipColorCfg(option->palette, C_ToolTip_Default); -- QBrush backgroundBrush = tooltipColorCfg.backgroundBrush; -+ - QPen backgroundPen = QPen(tooltipColorCfg.backgroundPen, (tooltipColorCfg.backgroundPen.alpha() == 0 || tooltipColorCfg.backgroundPen == Qt::NoPen ) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //background -- backgroundBrush = option->palette.color(QPalette::Active, QPalette::ToolTipBase); -+ auto color = tooltipColorCfg.backgroundBrush; -+ if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -+ auto opacity = UKUIStyleSettings::globalInstance()->get("menuTransparency").toInt()/100.0; -+ color.setAlphaF(opacity); -+ } -+ if (qApp->property("blurEnable").isValid()) { -+ bool blurEnable = qApp->property("blurEnable").toBool(); -+ if (!blurEnable) { -+ color.setAlphaF(1); -+ } -+ } -+ if (widget) { -+ if (widget->property("useSystemStyleBlur").isValid() && !widget->property("useSystemStyleBlur").toBool()) { -+ color.setAlphaF(1); -+ } -+ } -+ //if blur effect is not supported, do not use transparent color. -+ if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind) || blackAppListWithBlurHelper().contains(qAppName())) { -+ color.setAlphaF(1); -+ } -+ QBrush backgroundBrush = color; - - int radius = m_radiusStruct.normalRadius; - -@@ -3441,6 +3539,9 @@ void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const Q - if (widget->property("setBackgroundBrush").isValid() && widget->property("setBackgroundBrush").canConvert<QBrush>()) { - backgroundBrush = widget->property("setBackgroundBrush").value<QBrush>(); - } -+ if (widget->property("setBackgroundPen").isValid() && widget->property("setBackgroundPen").canConvert<QBrush>()) { -+ backgroundPen = widget->property("setBackgroundPen").value<QPen>(); -+ } - } - - m_ToolTipParameters.radius = radius; -@@ -3550,6 +3651,9 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - if (widget->property("setTabBarSelectBrush").isValid() && widget->property("setTabBarSelectBrush").canConvert<QBrush>()) { - tabBarSelectBrush = widget->property("setTabBarSelectBrush").value<QBrush>(); - } -+ if (widget->property("setTabBarPen").isValid() && widget->property("setTabBarPen").canConvert<QBrush>()) { -+ tabBarPen = widget->property("setTabBarPen").value<QPen>(); -+ } - } - - m_TabWidgetParameters.radius = tabradius; -@@ -3566,10 +3670,9 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - { - int frameradius = m_radiusStruct.maxRadius; - int itemradius = m_radiusStruct.normalRadius; -- QPixmap framePixmap(option->rect.size()); -+// QPixmap framePixmap(option->rect.size()); - UKUIColorTheme::MenuColorCfg menuColorCfg = readCfg()->menuColorCfg(C_Menu_Default); - -- QBrush menuBackgroundBrush = menuColorCfg.menuBackgroundBrush; - QPen menuBackgroundPen = QPen(menuColorCfg.menuBackgroundPen, (menuColorCfg.menuBackgroundPen.alpha() == 0 || menuColorCfg.menuBackgroundPen == Qt::NoPen ) ? - 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QBrush itemSelectBrush = menuColorCfg.menuItemSelectBrush; -@@ -3588,6 +3691,28 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - break; - } - -+ auto color = menuColorCfg.menuBackgroundBrush; -+ if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -+ auto opacity = UKUIStyleSettings::globalInstance()->get("menuTransparency").toInt()/100.0; -+ color.setAlphaF(opacity); -+ } -+ if (qApp->property("blurEnable").isValid()) { -+ bool blurEnable = qApp->property("blurEnable").toBool(); -+ if (!blurEnable) { -+ color.setAlphaF(1); -+ } -+ } -+ if (widget) { -+ if (widget->property("useSystemStyleBlur").isValid() && !widget->property("useSystemStyleBlur").toBool()) { -+ color.setAlphaF(1); -+ } -+ } -+ //if blur effect is not supported, do not use transparent color. -+ if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind) || blackAppListWithBlurHelper().contains(qAppName())) { -+ color.setAlphaF(1); -+ } -+ QBrush menuBackgroundBrush = color; -+ - - if(widget){ - if (widget->property("setFrameRadius").isValid() && widget->property("setFrameRadius").canConvert<int>()) { -@@ -3596,20 +3721,26 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - if (widget->property("setItemRadius").isValid() && widget->property("setItemRadius").canConvert<int>()) { - itemradius = widget->property("setItemRadius").value<int>(); - } -- if (widget->property("setFramePixmap").isValid() && widget->property("setFramePixmap").canConvert<QPixmap>()) { -- framePixmap = widget->property("setFramePixmap").value<QPixmap>(); -- } -+// if (widget->property("setFramePixmap").isValid() && widget->property("setFramePixmap").canConvert<QPixmap>()) { -+// framePixmap = widget->property("setFramePixmap").value<QPixmap>(); -+// } - if (widget->property("setItemSelectBrush").isValid() && widget->property("setItemSelectBrush").canConvert<QBrush>()) { - itemSelectBrush = widget->property("setItemSelectBrush").value<QBrush>(); - } - if (widget->property("setTextHoverPen").isValid() && widget->property("setTextHoverPen").canConvert<QPen>()) { - menuHoverPen = widget->property("setTextHoverPen").value<QPen>(); - } -+ if (widget->property("setMenuBackgroundBrush").isValid() && widget->property("setMenuBackgroundBrush").canConvert<QBrush>()) { -+ menuBackgroundBrush = widget->property("setMenuBackgroundBrush").value<QBrush>(); -+ } -+ if (widget->property("setMenuBackgroundPen").isValid() && widget->property("setMenuBackgroundPen").canConvert<QPen>()) { -+ menuBackgroundPen = widget->property("setMenuBackgroundPen").value<QPen>(); -+ } - } - - m_MenuParameters.frameRadius = frameradius; - m_MenuParameters.itemRadius = itemradius; -- m_MenuParameters.menuFramePixmap = framePixmap; -+// m_MenuParameters.menuFramePixmap = framePixmap; - m_MenuParameters.menuBackgroundBrush = menuBackgroundBrush; - m_MenuParameters.menuBackgroundPen = menuBackgroundPen; - m_MenuParameters.menuItemSelectBrush = itemSelectBrush; -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 0ec1a53..48559ed 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -379,18 +379,23 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - } - - if (qobject_cast<QSlider *>(obj)) { -- if (e->type() == QEvent::Wheel) { -- if (QWidget *w = qobject_cast<QWidget *>(obj)) { -- if (!w->hasFocus()) { -- return true; -- } -- } -- } -- if(e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick){ -+// if (e->type() == QEvent::Wheel) { -+// if (QWidget *w = qobject_cast<QWidget *>(obj)) { -+// if (!w->hasFocus()) { -+// return true; -+// } -+// } -+// } -+ auto mousePressEvent = static_cast<QMouseEvent*>(e); -+ -+ if((e->type() ==QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) && (proxy()->styleHint(QStyle::SH_Slider_AbsoluteSetButtons) == mousePressEvent->button() || -+ proxy()->styleHint(QStyle::SH_Slider_PageSetButtons) == mousePressEvent->button())){ -+ //qDebug() << "e->type:" << e->type() << mousePressEvent->button(); - if(obj->property("animation").isValid() && !obj->property("animation").toBool()) - return false; -- if(!sp->m_SliderParameters.animation) -- return false; -+ -+// if(!sp->m_SliderParameters.animation) -+// return false; - - auto *slider = qobject_cast<QSlider *>(obj); - if(slider == nullptr || !slider->isEnabled()) -@@ -403,12 +408,13 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - const bool horizontal = slider->orientation() == Qt::Horizontal; - - // qDebug() << "MouseButtonPress............"; -- auto mousePressEvent = static_cast<QMouseEvent*>(e); -+// if(mousePressEvent->button() != Qt::LeftButton) -+// return false; - // if(mousePressEvent) - // qDebug() << "mousepressevent....." << mousePressEvent->pos() << mousePressEvent->localPos() << slider->geometry(); - -- QStyleOptionSlider *opt = new QStyleOptionSlider(); -- opt->init(slider); -+// QStyleOptionSlider *opt = new QStyleOptionSlider(); -+// opt->init(slider); - // qDebug() << "pppppppp;;;;;;;;;:" << subControlRect(CC_Slider, opt, SC_SliderHandle, slider); - - QRect handleRect = sliderHandleRec(); -@@ -443,11 +449,43 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - // qDebug() << "pagestep..." << slider->pageStep() << animator->getExtraProperty("addValue").toBool(); - int step = (animator->getExtraProperty("addValue").toBool() ? 1 : -1) * slider->pageStep(); - // qDebug() << "step............" << step; -+ bool absoluteButton = proxy()->styleHint(QStyle::SH_Slider_AbsoluteSetButtons) == mousePressEvent->button(); -+ if(absoluteButton) -+ { -+ QStyleOptionSlider *opt = new QStyleOptionSlider(); -+ opt->init(slider); -+ -+ QRect gr = proxy()->subControlRect(QStyle::CC_Slider, opt, QStyle::SC_SliderGroove, slider); -+ QRect sr = proxy()->subControlRect(QStyle::CC_Slider, opt, QStyle::SC_SliderHandle, slider); -+ int sliderMin, sliderMax, sliderLength; -+ QPoint center = sr.center() - sr.topLeft(); -+ int pos; -+ -+ if (slider->orientation() == Qt::Horizontal) { -+ sliderLength = sr.width(); -+ sliderMin = gr.x(); -+ sliderMax = gr.right() - sliderLength + 1; -+ pos = (mousePressEvent->pos() - center).x(); -+// qDebug() << "pos....:" << mousePressEvent->pos() << center << pos; -+ } else { -+ sliderLength = sr.height(); -+ sliderMin = gr.y(); -+ sliderMax = gr.bottom() - sliderLength + 1; -+ pos = (mousePressEvent->pos() - center).y(); -+ } -+// qDebug() << "minumum..." << slider->minimum() << slider->maximum() << sliderMin << sliderMax << pos; -+ int sliderValue = sliderValueFromPosition(slider->minimum(), slider->maximum(), pos - sliderMin, sliderMax - sliderMin, opt->upsideDown); -+// qDebug() << "sliderValue....." << sliderValue << slider->value(); -+ step = sliderValue - slider->value(); -+// qDebug() << "step0000...." << step; -+// qDebug() << "addValue........." << animator->getExtraProperty("addValue"); -+ } - animator->startAnimator("move_position"); - -- int endPos = (startPosition + step) - (startPosition + step)%step; -+ int endPos = (startPosition + step) - (absoluteButton ? 0 : (startPosition + step)%step); -+// qDebug() << "endPos0000....." << endPos; - if(!animator->getExtraProperty("addValue").toBool()) -- endPos = (startPosition + step) + (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0); -+ endPos = (startPosition + step) + (absoluteButton ? 0 : (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0)); - // qDebug() << "endPos1111....." << endPos; - - if(animator->getExtraProperty("addValue").toBool()) -@@ -472,29 +510,35 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - } - - if(qobject_cast<QScrollBar*>(obj)){ -- if(e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick){ -- if(!sp->m_ScrollBarParameters.animation) -- return false; -+ auto mousePressEvent = static_cast<QMouseEvent*>(e); -+ auto *scrollbar = qobject_cast<QScrollBar *>(obj); -+ if(scrollbar == nullptr || !scrollbar->isEnabled()) -+ return false; -+ -+ bool midButtonAbsPos = proxy()->styleHint(QStyle::SH_ScrollBar_MiddleClickAbsolutePosition, 0, scrollbar); -+// if(mousePressEvent->button() != Qt::LeftButton) -+// return false; -+// qDebug() << "e->type......" << e->type(); -+ if ((e->type() != QEvent::MouseButtonPress && e->type() != QEvent::MouseButtonDblClick) -+ || (!(mousePressEvent->button() == Qt::LeftButton || (midButtonAbsPos && mousePressEvent->button() == Qt::MidButton)))) -+ return false; - -- auto *scrollbar = qobject_cast<QScrollBar *>(obj); -- if(scrollbar == nullptr || !scrollbar->isEnabled()) -+ if(obj->property("animation").isValid() && !obj->property("animation").toBool()) - return false; - - auto animator = m_scrollbar_animation_helper->animator(scrollbar); - if(!animator) - return false; -- -+// qDebug() << "event..." << e->type() << mousePressEvent->button(); - const bool horizontal = scrollbar->orientation() == Qt::Horizontal; - -- auto mousePressEvent = static_cast<QMouseEvent*>(e); -- - if(horizontal){ - if(mousePressEvent->pos().x() <= scrollbarSliderRec().x()){ -- animator->setExtraProperty("addValue", false); -+ animator->setExtraProperty("addValue", scrollbar->layoutDirection() == Qt::RightToLeft ? true : false); - - } - else if(mousePressEvent->pos().x() >= scrollbarSliderRec().x() + scrollbarSliderRec().width()){ -- animator->setExtraProperty("addValue", true); -+ animator->setExtraProperty("addValue", scrollbar->layoutDirection() == Qt::RightToLeft ? false : true); - } - else - return false; -@@ -520,12 +564,62 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - if(animator->getExtraProperty("addValue").isValid()){ - // qDebug() << "pagestep..." << scrollbar->pageStep() << animator->getExtraProperty("addValue").toBool(); - int step = (animator->getExtraProperty("addValue").toBool() ? 1 : -1) * scrollbar->pageStep(); --// qDebug() << "step............" << step; -+// qDebug() << "step............" << step << animator->getExtraProperty("addValue").toBool(); -+ -+ QStyleOptionSlider *opt = new QStyleOptionSlider(); -+ opt->init(scrollbar); -+ -+// qDebug() << "scrollbar。。。。。。" << scrollbar; -+// qDebug() << "11111111" << scrollbar->property("ScrollBarSliderRect").isValid(); -+ -+ QRect sr = scrollbar->property("ScrollBarSliderRect").isValid() ? -+ scrollbar->property("ScrollBarSliderRect").value<QRect>() : -+ QRect(); -+ -+// qDebug() << "sr......." << sr; -+// qDebug() << "12333333" << scrollbar->property("ScrollBarGrooveRect").isValid(); -+ QRect gr = scrollbar->property("ScrollBarGrooveRect").isValid() ? -+ scrollbar->property("ScrollBarGrooveRect").value<QRect>() : -+ QRect(); -+ -+ bool absoluteButton = (midButtonAbsPos && mousePressEvent->button() == Qt::MidButton) -+ || (proxy()->styleHint(QStyle::SH_ScrollBar_LeftClickAbsolutePosition, opt, scrollbar) -+ && mousePressEvent->button() == Qt::LeftButton); -+ if(absoluteButton){ -+ int sliderMin, sliderMax, sliderLength, pos; -+ -+ if (horizontal == Qt::Horizontal) { -+ sliderLength = sr.width(); -+ sliderMin = gr.x(); -+ sliderMax = gr.right() - sliderLength + 1; -+// qDebug() << "sliderLength....." << sliderLength << gr << gr.right(); -+ pos = mousePressEvent->pos().x() - sliderLength / 2; -+ if (scrollbar->layoutDirection() == Qt::RightToLeft) -+ opt->upsideDown = !opt->upsideDown; -+ } else { -+ sliderLength = sr.height(); -+ sliderMin = gr.y(); -+ sliderMax = gr.bottom() - sliderLength + 1; -+ pos = mousePressEvent->pos().y() - sliderLength / 2; -+ -+ } -+ -+// qDebug() << "minimum..." << scrollbar->minimum() << scrollbar->maximum() << pos << sliderMin << sliderMax; -+ int scrollValue = sliderValueFromPosition(scrollbar->minimum(), scrollbar->maximum(), pos - sliderMin, -+ sliderMax - sliderMin, opt->upsideDown); -+// qDebug() << "scrollValue....." << scrollValue << scrollbar->value(); -+ step = scrollValue - scrollbar->value(); -+// qDebug() << "step0000...." << step; -+// qDebug() << "addValue........." << animator->getExtraProperty("addValue"); -+ -+ } - animator->startAnimator("move_position"); - -- int endPos = (startPosition + step) - (startPosition + step)%step; -+ int endPos = (startPosition + step) - (absoluteButton ? 0 : (startPosition + step)%step); -+// qDebug() << "endPos000....." << startPosition << step << endPos; -+ - if(!animator->getExtraProperty("addValue").toBool()) -- endPos = (startPosition + step) + (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0); -+ endPos = (startPosition + step) + (absoluteButton ? 0 : (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0)); - // qDebug() << "endPos1111....." << endPos; - - if(animator->getExtraProperty("addValue").toBool()) -@@ -546,7 +640,7 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - return true; - - return false; -- } -+ - } - - return false; -@@ -835,6 +929,11 @@ void UKUIConfigStyle::polish(QWidget *widget) - if(!widget) - return; - -+ widget->setProperty("maxRadius", sp->radiusProperty().maxRadius); -+ widget->setProperty("normalRadius", sp->radiusProperty().normalRadius); -+ widget->setProperty("minRadius", sp->radiusProperty().minRadius); -+ -+ - Style::polish(widget); - - realSetWindowSurfaceFormatAlpha(widget); -@@ -991,15 +1090,14 @@ void UKUIConfigStyle::polish(QWidget *widget) - - if(widget != nullptr && widget->inherits("QTreeView")){ - m_tree_animation_helper->registerWidget(widget); -- if(qobject_cast<QTreeView *>(widget)->isAnimated() && !widget->property("animation").isValid()){ -- widget->setProperty("animation", true); -+ if(!qobject_cast<QTreeView *>(widget)->isAnimated() && -+ widget->property("animation").isValid() && !widget->property("animation").toBool()){ -+ qobject_cast<QTreeView *>(widget)->setAnimated(false); - } -- if(widget->property("animation").isValid()){ -- sp->m_TreeParameters.animation = widget->property("animation").toBool(); -- qobject_cast<QTreeView *>(widget)->setAnimated(sp->m_TreeParameters.animation); -+ else{ -+ widget->setProperty("animation", true); -+ qobject_cast<QTreeView *>(widget)->setAnimated(true); - } -- else -- qobject_cast<QTreeView *>(widget)->setAnimated(sp->m_TreeParameters.animation); - - auto tree = qobject_cast<QTreeView*>(widget); - connect(tree, &QTreeView::expanded, this, [=](const QModelIndex &index){ -@@ -2102,6 +2200,12 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - else if(!sp->indicatorIconHoverNeedHighLight) - target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -+ else if(widget && (widget->inherits("QTreeView") || widget->inherits("QTreeWidget"))){ -+ if(widget->property("highlightMode").isValid() && widget->property("highlightMode").toBool()) -+ target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -+ else -+ target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -+ } - else - target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); - -@@ -2238,7 +2342,9 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - - auto animator = m_radiobutton_animation_helper->animator(widget); - -- if (enable && sp->m_RadioButtonParameters.animation && -+ bool hasAnimation = widget &&(!widget->property("animation").isValid() || -+ (widget->property("animation").isValid() && widget->property("animation").toBool())); -+ if (enable && hasAnimation && - animator != nullptr && animator->isRunning("SunKenOn")) { - float value = animator->value("SunKenOn").toFloat(); - QColor clickColor = sp->m_RadioButtonParameters.radioButtonClickBrush.color(); -@@ -2275,7 +2381,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - painter->restore(); - return; - } -- else if (enable && sp->m_RadioButtonParameters.animation && -+ else if (enable && hasAnimation && - animator != nullptr && animator->isRunning("Off")) { - float value = animator->value("Off").toFloat(); - // qDebug() << "off SunKenOn value......" << qobject_cast<const QRadioButton *>(widget)->text() << value; -@@ -2304,7 +2410,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - if (enable) { - if (on) { - if (animator != nullptr) { -- if (sp->m_RadioButtonParameters.animation && !animator->isRunning("SunKenOn") ) { -+ if (hasAnimation && !animator->isRunning("SunKenOn") ) { - // qDebug() << "SunKenOn time....:" << qobject_cast<const QRadioButton *>(widget)->text() << animator->currentAnimatorTime("SunKenOn"); - if(animator->currentAnimatorTime("SunKenOn") == 0){ - animator->startAnimator("SunKenOn"); -@@ -2341,7 +2447,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - painter->restore(); - return; - } else { -- if (sp->m_RadioButtonParameters.animation && animator != nullptr) { -+ if (hasAnimation && animator != nullptr) { - if (!animator->isRunning("Off") && animator->currentAnimatorTime("SunKenOn") > 0 && animator->currentAnimatorTime("Off") == 0) { - animator->startAnimator("Off"); - animator->setAnimatorCurrentTime("SunKenOn", 0); -@@ -2401,8 +2507,11 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - painter->setClipRect(rect); - painter->setRenderHint(QPainter::Antialiasing, sp->m_CheckBoxParameters.radius != 0); - -+ bool hasAnimation = widget &&(!widget->property("animation").isValid() || -+ (widget->property("animation").isValid() && widget->property("animation").toBool())); -+ - auto animator = m_checkbox_animation_helper->animator(widget); -- if (sp->m_CheckBoxParameters.animation && animator != nullptr) { -+ if (hasAnimation && animator != nullptr) { - if(animator->isRunning("OnBase")) - { - float value = animator->value("OnBase").toFloat(); -@@ -2450,7 +2559,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - - - if (animator != nullptr) { -- if(sp->m_CheckBoxParameters.animation && animator->isRunning("OnOpacity")) -+ if(hasAnimation && animator->isRunning("OnOpacity")) - { - float value = animator->value("OnOpacity").toFloat(); - -@@ -2478,7 +2587,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - } - } - -- if (sp->m_CheckBoxParameters.animation && animator != nullptr && animator->isRunning("OnScale")) { -+ if (hasAnimation && animator != nullptr && animator->isRunning("OnScale")) { - float value = animator->value("OnScale").toFloat(); - // qDebug() << "OnScale.....value:" << value; - if (on) { -@@ -2513,7 +2622,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - } - } - -- if (sp->m_CheckBoxParameters.animation && animator != nullptr && animator->isRunning("Off")) { -+ if (hasAnimation && animator != nullptr && animator->isRunning("Off")) { - float value = animator->value("Off").toFloat(); - // qDebug() << "Off.....value:" << value; - -@@ -2571,7 +2680,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - - if (enable) { - if (on | noChange) { -- if(sp->m_CheckBoxParameters.animation && animator != nullptr) -+ if(hasAnimation && animator != nullptr) - { - if(!animator->isRunning("OnBase") && animator->currentAnimatorTime("OnBase") == 0) - { -@@ -2631,7 +2740,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - painter->drawPath(path); - } else { - if (animator != nullptr) { -- if(sp->m_CheckBoxParameters.animation && !animator->isRunning("Off") && -+ if(hasAnimation && !animator->isRunning("Off") && - animator->currentAnimatorTime("Off") == 0 && - animator->currentAnimatorTime("OnScale") > 0 && - animator->currentAnimatorTime("OnOpacity") > 0 && -@@ -3362,6 +3471,7 @@ void UKUIConfigStyle::drawComplexControl(QStyle::ComplexControl control, const Q - } - - } -+ proxy()->subControlRect(control, option, SC_ScrollBarGroove, widget); - return; - } - break; -@@ -4122,8 +4232,10 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - painter->setPen(Qt::NoPen); - painter->setRenderHint(QPainter::Antialiasing, true); - -+ bool hasAnimation = widget &&(!widget->property("animation").isValid() || -+ (widget->property("animation").isValid() && widget->property("animation").toBool())); - -- if(sp->m_ScrollBarParameters.animation) { -+ if(hasAnimation) { - qreal len; - if(sp->m_ScrollBarParameters.grooveWidthAnimation){ - //width animation -@@ -6130,7 +6242,12 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - } - - auto animator = m_scrollbar_animation_helper->animator(widget); -- if (animator && sp->m_ScrollBarParameters.animation) { -+ bool hasAnimation = widget &&(!widget->property("animation").isValid() || -+ (widget->property("animation").isValid() && widget->property("animation").toBool())); -+ int sliderstart = lineLength + sliderPositionFromValue(bar->minimum, bar->maximum, bar->sliderPosition, maxlen - sliderlen, bar->upsideDown) + distance / 2; -+ -+// qDebug() << "sliderstart0000......" << sliderstart << lineLength << bar->sliderPosition; -+ if (animator && hasAnimation) { - // qDebug() << "bar value..." << bar->sliderValue << bar->sliderPosition; - if(animator->isRunning("move_position") || - (animator->getExtraProperty("start_position").toInt() != -@@ -6145,14 +6262,21 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - int endValue = animator->getExtraProperty("end_position").toInt(); - int v = startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal(); - // qDebug() << "v...................." << v << startValue << endValue; -- if(v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)) -+ if(v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)){ - sbar->setValue(v); -+ auto startPos = sliderPositionFromValue(bar->minimum, bar->maximum, startValue, maxlen - sliderlen, bar->upsideDown) + distance / 2; -+ auto endPos = sliderPositionFromValue(bar->minimum, bar->maximum, endValue, maxlen - sliderlen, bar->upsideDown) + distance / 2; -+ -+// qDebug() << "startpos....:" << startPos << "endpos...:" << endPos; -+ sliderstart = lineLength + startPos + (endPos - startPos) * 1.0 * animator->value("move_position").toReal(); -+// qDebug() << "sliderstart11111......" << sliderstart; -+ -+ } - } - } - } - } - -- int sliderstart = lineLength + sliderPositionFromValue(bar->minimum, bar->maximum, bar->sliderPosition, maxlen - sliderlen, bar->upsideDown) + distance / 2; - switch (subControl) { - case SC_ScrollBarSubLine: - { -@@ -6201,18 +6325,28 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - animator->setExtraProperty("end_position", 0); - animator->setExtraProperty("start_position", 0); - } -+ QRect r; - if (horizontal) -- return QRect(sliderstart, 0, sliderlen, rect.height()); -+ r = QRect(sliderstart, 0, sliderlen, rect.height()); - else -- return QRect(0, sliderstart, rect.width(), sliderlen); -+ r = QRect(0, sliderstart, rect.width(), sliderlen); -+ QWidget *w = const_cast<QWidget *>(widget); -+// qDebug() << "SC_ScrollBarSlider......" << w << r; -+ w->setProperty("ScrollBarSliderRect", r); -+ return r; - } - - case SC_ScrollBarGroove: - { -+ QRect r; - if (horizontal) -- return QRect(rect.x() + lineLength, rect.y(), rect.width() - 2 * lineLength, rect.height()); -+ r = QRect(rect.x() + lineLength, rect.y(), rect.width() - 2 * lineLength, rect.height()); - else -- return QRect(rect.x(), rect.y() + lineLength, rect.width(), rect.height() - 2 * lineLength); -+ r = QRect(rect.x(), rect.y() + lineLength, rect.width(), rect.height() - 2 * lineLength); -+ QWidget *w = const_cast<QWidget *>(widget); -+// qDebug() << "SC_ScrollBarGroove......" << w << r; -+ w->setProperty("ScrollBarGrooveRect", r); -+ return r; - } - - default: -@@ -6245,7 +6379,11 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - { - auto animator = m_slider_animation_helper->animator(widget); - -- if (slider && animator && sp->m_SliderParameters.animation){ -+ int sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum, slider->sliderValue, -+ proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); -+// qDebug() << "sliderPos000........" << sliderPos; -+ bool hasAnimation = widget && ((widget->property("animation").isValid() && widget->property("animation").toBool())||(!widget->property("animation").isValid())); -+ if (slider && animator && hasAnimation){ - if(animator->isRunning("move_position") || - (animator->getExtraProperty("start_position").toInt() != - animator->getExtraProperty("end_position").toInt() && -@@ -6264,14 +6402,24 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - // << animator->getExtraProperty("start_position").toInt() - // << animator->getExtraProperty("end_position").toInt(); - int v = startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal(); -- if(v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)) -+// qDebug() << "vvvvvvvvvvv" << v; -+ if(v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)){ - sbar->setValue(startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal()); -+ -+ auto startPos = sliderPositionFromValue(slider->minimum, slider->maximum, startValue, -+ proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); -+ auto endPos = sliderPositionFromValue(slider->minimum, slider->maximum, endValue, -+ proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); -+ sliderPos = startPos + (endPos - startPos) * 1.0 * animator->value("move_position").toReal(); -+// qDebug() << "sliderPos1111........" << sliderPos; -+ } -+// qDebug() << "sbar value:" << sbar->value(); - } - } - } - - -- if (animator && sp->m_SliderParameters.animation) { -+ if (animator && hasAnimation) { - if(!animator->isRunning("move_position") && animator->currentAnimatorTime("move_position") != 0){ - animator->setAnimatorCurrentTime("move_position", 0); - animator->setExtraProperty("end_position", 0); -@@ -6288,8 +6436,7 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - else - handleRect.setSize(QSize(handleThickness, handleLength)); - handleRect.moveCenter(rect.center()); -- int sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum, slider->sliderValue, -- proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); -+ - if (horizontal) { - handleRect.moveLeft(sliderPos + sp->Slider_Margin); - } else { -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h -index 3905689..9612e78 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h -@@ -54,7 +54,7 @@ public: - QPen checkBoxOnHoverPen; - QPen checkBoxOnClickPen; - QPen checkBoxContentPen; -- bool animation = true; -+// bool animation = true; - bool onHoverBrushIslinearGradient = false; - }; - } -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h -index 4944f64..d1e738d 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h -@@ -55,7 +55,7 @@ public: - QPen radioButtonOnDefaultPen; - QPen radioButtonOnHoverPen; - QPen radioButtonOnClickPen; -- bool animation = true; -+// bool animation = true; - }; - } - #endif // RADIOBUTTONPARAMETERS_H -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.cpp -index 016105b..d425baf 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.cpp -@@ -26,5 +26,4 @@ using namespace UKUIConfigStyleSpace; - - ConfigScrollBarParameters::ConfigScrollBarParameters() - { -- animation = true; - } -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h -index 7a1206a..1ecfb2f 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h -@@ -42,7 +42,7 @@ public: - QBrush scrollBarSliderHoverBrush; - QBrush scrollBarSliderClickBrush; - QBrush scrollBarSliderDisableBrush; -- bool animation = true; -+// bool animation = true; - - }; - } -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp -index a9a8754..d08fa1a 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp -@@ -45,6 +45,4 @@ ConfigSliderParameters::ConfigSliderParameters() - sliderGrooveUnvalueDefaultBrush = QBrush(Qt::NoBrush); - sliderGrooveUnvalueHoverBrush = QBrush(Qt::NoBrush); - sliderGrooveUnvalueDisableBrush = QBrush(Qt::NoBrush); -- -- animation = true; - } -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -index 9cdb1bc..8722603 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -@@ -56,7 +56,7 @@ public: - QPen sliderGroovePen = Qt::NoPen; - QPainterPath sliderHandlePath; - -- bool animation = true; -+// bool animation = true; - - int sliderGrooveRadius = 2; - }; -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -index 23e7015..5490152 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -@@ -50,7 +50,7 @@ public: - QPen treeTextSelectPen; - - bool indicatorIconHoverNeedHighLight = true; -- bool animation = true; -+// bool animation = true; - - }; - } -diff --git a/ukui-styles/qt5-style-ukui/animations/slider-animator.cpp b/ukui-styles/qt5-style-ukui/animations/slider-animator.cpp -index 496b0b5..9dc0991 100644 ---- a/ukui-styles/qt5-style-ukui/animations/slider-animator.cpp -+++ b/ukui-styles/qt5-style-ukui/animations/slider-animator.cpp -@@ -108,7 +108,7 @@ bool SliderAnimator::bindWidget(QWidget *w) - m_silder_move_position->setStartValue(0.0); - m_silder_move_position->setEndValue(1.0); - m_silder_move_position->setDuration(150); -- m_silder_move_position->setEasingCurve(QEasingCurve::Linear); -+ m_silder_move_position->setEasingCurve(QEasingCurve::InOutCubic); - addAnimation(m_silder_move_position); - - connect(m_slider_opacity, &QVariantAnimation::valueChanged, w, [=]() { -diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp b/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp -index d0a7aaf..d63da35 100644 ---- a/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp -+++ b/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp -@@ -368,18 +368,19 @@ bool Qt5UKUIStyle::eventFilter(QObject *obj, QEvent *e) - } - - if (qobject_cast<QSlider *>(obj)) { -- if (e->type() == QEvent::Wheel) { -- if (QWidget *w = qobject_cast<QWidget *>(obj)) { -- if (!w->hasFocus()) { -- return true; -- } -- } -- } -- if(e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick){ -+// if (e->type() == QEvent::Wheel) { -+// if (QWidget *w = qobject_cast<QWidget *>(obj)) { -+// if (!w->hasFocus()) { -+// return true; -+// } -+// } -+// } -+ auto mousePressEvent = static_cast<QMouseEvent*>(e); -+ if((e->type() ==QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) && (proxy()->styleHint(QStyle::SH_Slider_AbsoluteSetButtons) == mousePressEvent->button() || -+ proxy()->styleHint(QStyle::SH_Slider_PageSetButtons) == mousePressEvent->button())){ -+ //qDebug() << "e->type:" << e->type() << mousePressEvent->button(); - if(obj->property("animation").isValid() && !obj->property("animation").toBool()) - return false; -- if(!sp->sliderParameters.animation) -- return false; - - auto *slider = qobject_cast<QSlider *>(obj); - if(slider == nullptr || !slider->isEnabled()) -@@ -392,7 +393,7 @@ bool Qt5UKUIStyle::eventFilter(QObject *obj, QEvent *e) - const bool horizontal = slider->orientation() == Qt::Horizontal; - - // qDebug() << "MouseButtonPress............"; -- auto mousePressEvent = static_cast<QMouseEvent*>(e); -+// auto mousePressEvent = static_cast<QMouseEvent*>(e); - // if(mousePressEvent) - // qDebug() << "mousepressevent....." << mousePressEvent->pos() << mousePressEvent->localPos() << slider->geometry(); - -@@ -432,11 +433,43 @@ bool Qt5UKUIStyle::eventFilter(QObject *obj, QEvent *e) - // qDebug() << "pagestep..." << slider->pageStep() << animator->getExtraProperty("addValue").toBool(); - int step = (animator->getExtraProperty("addValue").toBool() ? 1 : -1) * slider->pageStep(); - // qDebug() << "step............" << step; -+ bool absoluteButton = proxy()->styleHint(QStyle::SH_Slider_AbsoluteSetButtons) == mousePressEvent->button(); -+ if(absoluteButton) -+ { -+ QStyleOptionSlider *opt = new QStyleOptionSlider(); -+ opt->init(slider); -+ -+ QRect gr = proxy()->subControlRect(QStyle::CC_Slider, opt, QStyle::SC_SliderGroove, slider); -+ QRect sr = proxy()->subControlRect(QStyle::CC_Slider, opt, QStyle::SC_SliderHandle, slider); -+ int sliderMin, sliderMax, sliderLength; -+ QPoint center = sr.center() - sr.topLeft(); -+ int pos; -+ -+ if (slider->orientation() == Qt::Horizontal) { -+ sliderLength = sr.width(); -+ sliderMin = gr.x(); -+ sliderMax = gr.right() - sliderLength + 1; -+ pos = (mousePressEvent->pos() - center).x(); -+// qDebug() << "pos....:" << mousePressEvent->pos() << center << pos; -+ } else { -+ sliderLength = sr.height(); -+ sliderMin = gr.y(); -+ sliderMax = gr.bottom() - sliderLength + 1; -+ pos = (mousePressEvent->pos() - center).y(); -+ } -+// qDebug() << "minumum..." << slider->minimum() << slider->maximum() << sliderMin << sliderMax << pos; -+ int sliderValue = sliderValueFromPosition(slider->minimum(), slider->maximum(), pos - sliderMin, sliderMax - sliderMin, opt->upsideDown); -+// qDebug() << "sliderValue....." << sliderValue << slider->value(); -+ step = sliderValue - slider->value(); -+// qDebug() << "step0000...." << step; -+// qDebug() << "addValue........." << animator->getExtraProperty("addValue"); -+ } - animator->startAnimator("move_position"); - -- int endPos = (startPosition + step) - (startPosition + step)%step; -+ int endPos = (startPosition + step) - (absoluteButton ? 0 : (startPosition + step)%step); -+// qDebug() << "endPos0000....." << endPos; - if(!animator->getExtraProperty("addValue").toBool()) -- endPos = (startPosition + step) + (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0); -+ endPos = (startPosition + step) + (absoluteButton ? 0 : (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0)); - // qDebug() << "endPos1111....." << endPos; - - if(animator->getExtraProperty("addValue").toBool()) -@@ -461,29 +494,35 @@ bool Qt5UKUIStyle::eventFilter(QObject *obj, QEvent *e) - } - - if(qobject_cast<QScrollBar*>(obj)){ -- if(e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick){ -- if(!sp->scrollBarParameters.animation) -- return false; -+ auto mousePressEvent = static_cast<QMouseEvent*>(e); -+ auto *scrollbar = qobject_cast<QScrollBar *>(obj); -+ if(scrollbar == nullptr || !scrollbar->isEnabled()) -+ return false; - -- auto *scrollbar = qobject_cast<QScrollBar *>(obj); -- if(scrollbar == nullptr || !scrollbar->isEnabled()) -+ bool midButtonAbsPos = proxy()->styleHint(QStyle::SH_ScrollBar_MiddleClickAbsolutePosition, 0, scrollbar); -+// if(mousePressEvent->button() != Qt::LeftButton) -+// return false; -+// qDebug() << "e->type......" << e->type(); -+ if ((e->type() != QEvent::MouseButtonPress && e->type() != QEvent::MouseButtonDblClick) -+ || (!(mousePressEvent->button() == Qt::LeftButton || (midButtonAbsPos && mousePressEvent->button() == Qt::MidButton)))) -+ return false; -+ -+ if(obj->property("animation").isValid() && !obj->property("animation").toBool()) - return false; - - auto animator = m_scrollbar_animation_helper->animator(scrollbar); - if(!animator) - return false; -- -+// qDebug() << "event..." << e->type() << mousePressEvent->button(); - const bool horizontal = scrollbar->orientation() == Qt::Horizontal; - -- auto mousePressEvent = static_cast<QMouseEvent*>(e); -- - if(horizontal){ - if(mousePressEvent->pos().x() <= scrollbarSliderRec().x()){ -- animator->setExtraProperty("addValue", false); -+ animator->setExtraProperty("addValue", scrollbar->layoutDirection() == Qt::RightToLeft ? true : false); - - } - else if(mousePressEvent->pos().x() >= scrollbarSliderRec().x() + scrollbarSliderRec().width()){ -- animator->setExtraProperty("addValue", true); -+ animator->setExtraProperty("addValue", scrollbar->layoutDirection() == Qt::RightToLeft ? false : true); - } - else - return false; -@@ -509,12 +548,62 @@ bool Qt5UKUIStyle::eventFilter(QObject *obj, QEvent *e) - if(animator->getExtraProperty("addValue").isValid()){ - // qDebug() << "pagestep..." << scrollbar->pageStep() << animator->getExtraProperty("addValue").toBool(); - int step = (animator->getExtraProperty("addValue").toBool() ? 1 : -1) * scrollbar->pageStep(); --// qDebug() << "step............" << step; -+// qDebug() << "step............" << step << animator->getExtraProperty("addValue").toBool(); -+ -+ QStyleOptionSlider *opt = new QStyleOptionSlider(); -+ opt->init(scrollbar); -+ -+// qDebug() << "scrollbar。。。。。。" << scrollbar; -+// qDebug() << "11111111" << scrollbar->property("ScrollBarSliderRect").isValid(); -+ -+ QRect sr = scrollbar->property("ScrollBarSliderRect").isValid() ? -+ scrollbar->property("ScrollBarSliderRect").value<QRect>() : -+ QRect(); -+ -+// qDebug() << "sr......." << sr; -+// qDebug() << "12333333" << scrollbar->property("ScrollBarGrooveRect").isValid(); -+ QRect gr = scrollbar->property("ScrollBarGrooveRect").isValid() ? -+ scrollbar->property("ScrollBarGrooveRect").value<QRect>() : -+ QRect(); -+ -+ bool absoluteButton = (midButtonAbsPos && mousePressEvent->button() == Qt::MidButton) -+ || (proxy()->styleHint(QStyle::SH_ScrollBar_LeftClickAbsolutePosition, opt, scrollbar) -+ && mousePressEvent->button() == Qt::LeftButton); -+ if(absoluteButton){ -+ int sliderMin, sliderMax, sliderLength, pos; -+ -+ if (horizontal == Qt::Horizontal) { -+ sliderLength = sr.width(); -+ sliderMin = gr.x(); -+ sliderMax = gr.right() - sliderLength + 1; -+// qDebug() << "sliderLength....." << sliderLength << gr << gr.right(); -+ pos = mousePressEvent->pos().x() - sliderLength / 2; -+ if (scrollbar->layoutDirection() == Qt::RightToLeft) -+ opt->upsideDown = !opt->upsideDown; -+ } else { -+ sliderLength = sr.height(); -+ sliderMin = gr.y(); -+ sliderMax = gr.bottom() - sliderLength + 1; -+ pos = mousePressEvent->pos().y() - sliderLength / 2; -+ -+ } -+ -+// qDebug() << "minimum..." << scrollbar->minimum() << scrollbar->maximum() << pos << sliderMin << sliderMax; -+ int scrollValue = sliderValueFromPosition(scrollbar->minimum(), scrollbar->maximum(), pos - sliderMin, -+ sliderMax - sliderMin, opt->upsideDown); -+// qDebug() << "scrollValue....." << scrollValue << scrollbar->value(); -+ step = scrollValue - scrollbar->value(); -+// qDebug() << "step0000...." << step; -+// qDebug() << "addValue........." << animator->getExtraProperty("addValue"); -+ -+ } - animator->startAnimator("move_position"); - -- int endPos = (startPosition + step) - (startPosition + step)%step; -+ int endPos = (startPosition + step) - (absoluteButton ? 0 : (startPosition + step)%step); -+// qDebug() << "endPos000....." << startPosition << step << endPos; -+ - if(!animator->getExtraProperty("addValue").toBool()) -- endPos = (startPosition + step) + (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0); -+ endPos = (startPosition + step) + (absoluteButton ? 0 : (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0)); - // qDebug() << "endPos1111....." << endPos; - - if(animator->getExtraProperty("addValue").toBool()) -@@ -535,7 +624,7 @@ bool Qt5UKUIStyle::eventFilter(QObject *obj, QEvent *e) - return true; - - return false; -- } -+ - } - - return false; -@@ -1014,16 +1103,14 @@ void Qt5UKUIStyle::polish(QWidget *widget) - - if(widget != nullptr && widget->inherits("QTreeView")){ - m_tree_animation_helper->registerWidget(widget); -- if(qobject_cast<QTreeView *>(widget)->isAnimated() && !widget->property("animation").isValid()){ -- widget->setProperty("animation", true); -+ if(!qobject_cast<QTreeView *>(widget)->isAnimated() && -+ widget->property("animation").isValid() && !widget->property("animation").toBool()){ -+ qobject_cast<QTreeView *>(widget)->setAnimated(false); - } -- if(widget->property("animation").isValid()){ -- sp->treeParameters.animation = widget->property("animation").toBool(); -- qobject_cast<QTreeView *>(widget)->setAnimated(sp->treeParameters.animation); -+ else{ -+ widget->setProperty("animation", true); -+ qobject_cast<QTreeView *>(widget)->setAnimated(true); - } -- else -- qobject_cast<QTreeView *>(widget)->setAnimated(sp->treeParameters.animation); -- - - auto tree = qobject_cast<QTreeView*>(widget); - connect(tree, &QTreeView::expanded, this, [=](const QModelIndex &index){ -@@ -2186,8 +2273,10 @@ void Qt5UKUIStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleO - painter->setRenderHint(QPainter::Antialiasing, true); - - auto animator = m_radiobutton_animation_helper->animator(widget); -+ bool hasAnimation = widget &&(!widget->property("animation").isValid() || -+ (widget->property("animation").isValid() && widget->property("animation").toBool())); - -- if (enable && sp->radioButtonParameters.animation && -+ if (enable && hasAnimation && - animator != nullptr && animator->isRunning("SunKenOn")) { - float value = animator->value("SunKenOn").toFloat(); - QColor clickColor = sp->radioButtonParameters.radioButtonClickBrush.color(); -@@ -2222,7 +2311,7 @@ void Qt5UKUIStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleO - painter->restore(); - return; - } -- else if (enable && sp->radioButtonParameters.animation && -+ else if (enable && hasAnimation && - animator != nullptr && animator->isRunning("Off")) { - float value = animator->value("Off").toFloat(); - // qDebug() << "off SunKenOn value......" << qobject_cast<const QRadioButton *>(widget)->text() << value; -@@ -2250,7 +2339,7 @@ void Qt5UKUIStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleO - if (enable) { - if (on) { - if (animator != nullptr) { -- if (sp->radioButtonParameters.animation && !animator->isRunning("SunKenOn") ) { -+ if (hasAnimation && !animator->isRunning("SunKenOn") ) { - // qDebug() << "SunKenOn time....:" << qobject_cast<const QRadioButton *>(widget)->text() << animator->currentAnimatorTime("SunKenOn"); - if(animator->currentAnimatorTime("SunKenOn") == 0){ - animator->startAnimator("SunKenOn"); -@@ -2287,7 +2376,7 @@ void Qt5UKUIStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleO - painter->restore(); - return; - } else { -- if (sp->radioButtonParameters.animation && animator != nullptr) { -+ if (hasAnimation && animator != nullptr) { - if (!animator->isRunning("Off") && animator->currentAnimatorTime("SunKenOn") > 0 && animator->currentAnimatorTime("Off") == 0) { - animator->startAnimator("Off"); - animator->setAnimatorCurrentTime("SunKenOn", 0); -@@ -2349,7 +2438,10 @@ void Qt5UKUIStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleO - painter->setRenderHint(QPainter::Antialiasing); - - auto animator = m_checkbox_animation_helper->animator(widget); -- if (sp->checkBoxParameters.animation && animator != nullptr) { -+ bool hasAnimation = widget &&(!widget->property("animation").isValid() || -+ (widget->property("animation").isValid() && widget->property("animation").toBool())); -+ -+ if (hasAnimation && animator != nullptr) { - if(animator->isRunning("OnBase")) - { - float value = animator->value("OnBase").toFloat(); -@@ -2394,7 +2486,7 @@ void Qt5UKUIStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleO - - - if (animator != nullptr) { -- if(sp->checkBoxParameters.animation && animator->isRunning("OnOpacity")) -+ if(hasAnimation && animator->isRunning("OnOpacity")) - { - float value = animator->value("OnOpacity").toFloat(); - -@@ -2422,7 +2514,7 @@ void Qt5UKUIStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleO - } - } - -- if (sp->checkBoxParameters.animation && animator != nullptr && animator->isRunning("OnScale")) { -+ if (hasAnimation && animator != nullptr && animator->isRunning("OnScale")) { - float value = animator->value("OnScale").toFloat(); - if (on) { - path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.top() + heigth / 2); -@@ -2456,7 +2548,7 @@ void Qt5UKUIStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleO - } - } - -- if (sp->checkBoxParameters.animation && animator != nullptr && animator->isRunning("Off")) { -+ if (hasAnimation && animator != nullptr && animator->isRunning("Off")) { - float value = animator->value("Off").toFloat(); - // qDebug() << "Off.....value:" << value; - -@@ -2512,7 +2604,7 @@ void Qt5UKUIStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleO - - if (enable) { - if (on | noChange) { -- if(sp->checkBoxParameters.animation && animator != nullptr) -+ if(hasAnimation && animator != nullptr) - { - if(!animator->isRunning("OnBase") && animator->currentAnimatorTime("OnBase") == 0) - { -@@ -2572,7 +2664,7 @@ void Qt5UKUIStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleO - painter->drawPath(path); - } else { - if (animator != nullptr) { -- if(sp->checkBoxParameters.animation && !animator->isRunning("Off") && -+ if(hasAnimation && !animator->isRunning("Off") && - animator->currentAnimatorTime("Off") == 0 && - animator->currentAnimatorTime("OnScale") > 0 && - animator->currentAnimatorTime("OnOpacity") > 0 && -@@ -3311,6 +3403,7 @@ void Qt5UKUIStyle::drawComplexControl(QStyle::ComplexControl control, const QSty - } - - } -+ proxy()->subControlRect(control, option, SC_ScrollBarGroove, widget); - return; - } - break; -@@ -4062,8 +4155,10 @@ void Qt5UKUIStyle::drawControl(QStyle::ControlElement element, const QStyleOptio - painter->setPen(Qt::NoPen); - painter->setRenderHint(QPainter::Antialiasing, true); - -+ bool hasAnimation = widget &&(!widget->property("animation").isValid() || -+ (widget->property("animation").isValid() && widget->property("animation").toBool())); - -- if(sp->scrollBarParameters.animation == true) { -+ if(hasAnimation) { - qreal len; - if(sp->scrollBarParameters.grooveWidthAnimation){ - //width animation -@@ -6076,7 +6171,10 @@ QRect Qt5UKUIStyle::subControlRect(QStyle::ComplexControl control, const QStyleO - } - - auto animator = m_scrollbar_animation_helper->animator(widget); -- if (animator && sp->scrollBarParameters.animation) { -+ bool hasAnimation = widget &&(!widget->property("animation").isValid() || -+ (widget->property("animation").isValid() && widget->property("animation").toBool())); -+ -+ if (animator && hasAnimation) { - // qDebug() << "bar value..." << bar->sliderValue << bar->sliderPosition; - if(animator->isRunning("move_position") || - (animator->getExtraProperty("start_position").toInt() != -@@ -6147,18 +6245,28 @@ QRect Qt5UKUIStyle::subControlRect(QStyle::ComplexControl control, const QStyleO - animator->setExtraProperty("end_position", 0); - animator->setExtraProperty("start_position", 0); - } -+ QRect r; - if (horizontal) -- return QRect(sliderstart, 0, sliderlen, rect.height()); -+ r = QRect(sliderstart, 0, sliderlen, rect.height()); - else -- return QRect(0, sliderstart, rect.width(), sliderlen); -+ r = QRect(0, sliderstart, rect.width(), sliderlen); -+ QWidget *w = const_cast<QWidget *>(widget); -+// qDebug() << "SC_ScrollBarSlider......" << w << r; -+ w->setProperty("ScrollBarSliderRect", r); -+ return r; - } - - case SC_ScrollBarGroove: - { -+ QRect r; - if (horizontal) -- return QRect(rect.x() + lineLength, rect.y(), rect.width() - 2 * lineLength, rect.height()); -+ r = QRect(rect.x() + lineLength, rect.y(), rect.width() - 2 * lineLength, rect.height()); - else -- return QRect(rect.x(), rect.y() + lineLength, rect.width(), rect.height() - 2 * lineLength); -+ r = QRect(rect.x(), rect.y() + lineLength, rect.width(), rect.height() - 2 * lineLength); -+ QWidget *w = const_cast<QWidget *>(widget); -+// qDebug() << "SC_ScrollBarGroove......" << w << r; -+ w->setProperty("ScrollBarGrooveRect", r); -+ return r; - } - - default: -@@ -6190,8 +6298,10 @@ QRect Qt5UKUIStyle::subControlRect(QStyle::ComplexControl control, const QStyleO - case SC_SliderHandle: - { - auto animator = m_slider_animation_helper->animator(widget); -+ bool hasAnimation = widget &&(!widget->property("animation").isValid() || -+ (widget->property("animation").isValid() && widget->property("animation").toBool())); - -- if (slider && animator && sp->sliderParameters.animation){ -+ if (slider && animator && hasAnimation){ - if(animator->isRunning("move_position") || - (animator->getExtraProperty("start_position").toInt() != - animator->getExtraProperty("end_position").toInt() && -@@ -6217,7 +6327,7 @@ QRect Qt5UKUIStyle::subControlRect(QStyle::ComplexControl control, const QStyleO - } - - -- if (animator && sp->sliderParameters.animation) { -+ if (animator && hasAnimation) { - if(!animator->isRunning("move_position") && animator->currentAnimatorTime("move_position") != 0){ - animator->setAnimatorCurrentTime("move_position", 0); - animator->setExtraProperty("end_position", 0); -diff --git a/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp b/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp -index 126fa2b..f4a1e4a 100644 ---- a/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp -@@ -1507,8 +1507,8 @@ void KClassicalStyleParameters::initTreeParameters(bool isDark, const QStyleOpti - disableBrush = QBrush(Qt::transparent); - branchDisableBrush = disableBrush; - -- if(widget->property("animation").isValid()) -- treeParameters.animation = widget->property("animation").toBool(); -+// if(widget->property("animation").isValid()) -+// treeParameters.animation = widget->property("animation").toBool(); - - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -@@ -1694,8 +1694,8 @@ void KClassicalStyleParameters::initCheckBoxParameters(bool isDark, const QStyle - pathBrush = option->palette.brush(QPalette::Active, QPalette::Text); - pathDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::ButtonText); - -- if(widget->property("animation").isValid()) -- checkBoxParameters.animation = widget->property("animation").toBool(); -+// if(widget->property("animation").isValid()) -+// checkBoxParameters.animation = widget->property("animation").toBool(); - - checkBoxParameters.checkBoxContentPen = QPen(QBrush(option->palette.brush(QPalette::Active, QPalette::ButtonText)), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -@@ -1882,8 +1882,8 @@ void KClassicalStyleParameters::initRadioButtonParameters(bool isDark, const QSt - } - } - -- if(widget->property("animation").isValid()) -- radioButtonParameters.animation = widget->property("animation").toBool(); -+// if(widget->property("animation").isValid()) -+// radioButtonParameters.animation = widget->property("animation").toBool(); - - radioButtonParameters.radioButtonDefaultPen = defaultPen; - radioButtonParameters.radioButtonHoverPen = hoverPen; -@@ -2027,10 +2027,10 @@ void KClassicalStyleParameters::initSliderParameters(bool isDark, const QStyleOp - } - - qDebug() << "sloder animation 00000000000" << widget->property("animation").isValid(); -- if(widget->property("animation").isValid()){ -- sliderParameters.animation = widget->property("animation").toBool(); -- qDebug() << "slider animation11111" << widget->property("animation").toBool(); -- } -+// if(widget->property("animation").isValid()){ -+// sliderParameters.animation = widget->property("animation").toBool(); -+// qDebug() << "slider animation11111" << widget->property("animation").toBool(); -+// } - - if(widget){ - if (widget->property("setGrooveRadius").isValid() && widget->property("setGrooveRadius").canConvert<int>()) { -@@ -2177,8 +2177,8 @@ void KClassicalStyleParameters::initScrollBarParameters(bool isDark, const QStyl - QBrush sliderHoverBrush; - QBrush sliderClickBrush; - QBrush sliderDisableBrush; -- if(widget->property("animation").isValid()) -- scrollBarParameters.animation = widget->property("animation").toBool(); -+// if(widget->property("animation").isValid()) -+// scrollBarParameters.animation = widget->property("animation").toBool(); - - const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option); - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h -index e00800f..5645ce3 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h -@@ -53,7 +53,6 @@ public: - QPen checkBoxOnHoverPen; - QPen checkBoxOnClickPen; - QPen checkBoxContentPen; -- bool animation = true; - bool onHoverBrushIslinearGradient = false; - }; - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h -index 05258d9..ad64acb 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h -@@ -55,7 +55,6 @@ public: - QPen radioButtonOnDefaultPen; - QPen radioButtonOnHoverPen; - QPen radioButtonOnClickPen; -- bool animation = true; - }; - - #endif // RADIOBUTTONPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp -index 4863cd6..67984a3 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp -@@ -25,5 +25,4 @@ - - ScrollBarParameters::ScrollBarParameters() - { -- animation = true; - } -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h -index 828351b..9bb7616 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h -@@ -42,8 +42,6 @@ public: - QBrush scrollBarSliderHoverBrush; - QBrush scrollBarSliderClickBrush; - QBrush scrollBarSliderDisableBrush; -- bool animation = true; -- - }; - - #endif // SCROLLBARPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp -index 7c0ac18..0e269a7 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp -@@ -44,6 +44,4 @@ SliderParameters::SliderParameters() - sliderGrooveUnvalueDefaultBrush = QBrush(Qt::NoBrush); - sliderGrooveUnvalueHoverBrush = QBrush(Qt::NoBrush); - sliderGrooveUnvalueDisableBrush = QBrush(Qt::NoBrush); -- -- animation = true; - } -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h -index 91cffac..f658b0c 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h -@@ -56,8 +56,6 @@ public: - QPen sliderGroovePen = Qt::NoPen; - QPainterPath sliderHandlePath; - -- bool animation = true; -- - int sliderGrooveRadius = 2; - }; - -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h -index 387fe0d..f747ea4 100644 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h -+++ b/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h -@@ -50,7 +50,6 @@ public: - QPen treeTextSelectPen; - - bool indicatorIconHoverNeedHighLight = true; -- bool animation = true; - - }; - -diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp -index 4b2cb0f..81842a9 100644 ---- a/ukui-styles/readconfig.cpp -+++ b/ukui-styles/readconfig.cpp -@@ -1049,7 +1049,7 @@ UKUIColorTheme::ScrollBarColorCfg ReadThemeConfig::scrollBarColorCfg(const QPale - m_scrollBarColorCfg.sliderHoverGradientList.clear(); - m_readConfig->getGradientValue(m_scrollBarColorCfg.sliderHoverGradientList , m_theme, UKUIScrollBar, property, C_ScrollBar_SliderHoverBrush); - } -- else if(m_scrollBarColorCfg.sliderHoverType == Obj_Color_Type){ -+ else{ - m_readConfig->getColorValue(m_scrollBarColorCfg.sliderHoverBrush, m_theme, UKUIScrollBar, property, C_ScrollBar_SliderHoverBrush); - } - return m_scrollBarColorCfg; -diff --git a/ukui-styles/themeinformation.h b/ukui-styles/themeinformation.h -index 4af35c2..937ae83 100644 ---- a/ukui-styles/themeinformation.h -+++ b/ukui-styles/themeinformation.h -@@ -184,6 +184,7 @@ - - #define UKUITable "Table" - #define C_Table_Default "DefaultTable" -+#define C_Table_Highlight "HighlightTable" - #define C_Table_DefaultBrush "DefaultBrush" - #define C_Table_HoverBrush "HoverBrush" - #define C_Table_SelectBrush "SelectBrush" -@@ -195,6 +196,7 @@ - - #define UKUIListView "ListView" - #define C_ListView_Default "DefaultListView" -+#define C_ListView_Highlight "HighlightListView" - #define C_ListView_Translucent "TranslucentListView" - #define C_ListView_DefaultBrush "DefaultBrush" - #define C_ListView_HoverBrush "HoverBrush" -@@ -207,6 +209,7 @@ - - #define UKUITreeView "TreeView" - #define C_TreeView_Default "DefaultTreeView" -+#define C_TreeView_HighLight "HighlightTreeView" - #define C_TreeView_Translucent "TranslucentTreeView" - #define C_TreeView_DefaultBrush "DefaultBrush" - #define C_TreeView_HoverBrush "HoverBrush" -diff --git a/ukui-styles/ukui-styles.pro b/ukui-styles/ukui-styles.pro -index 72c2ca7..34c086b 100644 ---- a/ukui-styles/ukui-styles.pro -+++ b/ukui-styles/ukui-styles.pro -@@ -6,7 +6,7 @@ - - QT += widgets widgets-private KWindowSystem gui gui-private x11extras dbus KWaylandClient - --TARGET = qt5-style-ukuis -+TARGET = qt5-style-ukui - TEMPLATE = lib - CONFIG += plugin c++11 link_pkgconfig - PKGCONFIG += gsettings-qt diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0006-.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0006-.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0006-.patch 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0006-.patch 2025-02-28 09:39:53.000000000 +0800 @@ -0,0 +1,490 @@ +From: wuruiwen <wuruiwen@kylinos.cn> +Date: Mon, 10 Mar 2025 15:19:16 +0800 +Subject: =?utf-8?b?6L+b5bqm5p2h5Yqo55S7?= + +--- + libqt5-ukui-style/settings/black-list.h | 6 + + .../config-progressbar-animation-helper.cpp | 22 +- + .../config-progressbar-animation-helper.h | 20 ++ + .../animations/config-progressbar-animation.cpp | 39 +++- + .../animations/config-progressbar-animation.h | 11 +- + .../ukui-config-style-parameters.cpp | 8 +- + .../qt5-config-style-ukui/ukui-config-style.cpp | 227 +++++++++++++++++---- + 7 files changed, 276 insertions(+), 57 deletions(-) + +diff --git a/libqt5-ukui-style/settings/black-list.h b/libqt5-ukui-style/settings/black-list.h +index e126fe7..5614000 100644 +--- a/libqt5-ukui-style/settings/black-list.h ++++ b/libqt5-ukui-style/settings/black-list.h +@@ -122,4 +122,10 @@ static const QStringList windowManageBlackList() { + return l; + } + ++// static const QStringList disableProgressBarAnimationList() {//不需要使用进度条动画的appName ++// QStringList l; ++// l << "ukui-settings-daemon"; ++// return l; ++// } ++ + #endif // BLACKLIST_H +diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.cpp +index cc95a5d..6df32f6 100644 +--- a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.cpp ++++ b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.cpp +@@ -53,7 +53,7 @@ void ConfigProgressBarAnimationHelper::startAnimation(QVariantAnimation *animati + stopAnimation(animation->parent()); + connect(animation, SIGNAL(destroyed()), SLOT(_q_removeAnimation()), Qt::UniqueConnection); + animations->insert(animation->parent(), animation); +- animation->start(); ++ // animation->start(); + } + + +@@ -83,3 +83,23 @@ void ConfigProgressBarAnimationHelper::_q_removeAnimation() + if (animation) + animations->remove(animation->parent()); + } ++ ++ ++void ConfigProgressBarAnimationHelper::cacheTotalBarInfo(const int& width,const int& height) ++{ ++ totalBarWidth = width; ++ totalBarHeight = height; ++} ++void ConfigProgressBarAnimationHelper::getTotalBarInfo(int& width,int& height) const ++{ ++ width = totalBarWidth; ++ height = totalBarHeight; ++} ++int ConfigProgressBarAnimationHelper::getSliderFixedSpan() const ++{ ++ return sliderFixedSpan; ++} ++bool ConfigProgressBarAnimationHelper::canEnableNormalAnimation(int width) ++{ ++ return width >= startAnimationBaseWidth; ++} +\ No newline at end of file +diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.h +index e06484a..882591f 100644 +--- a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.h ++++ b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.h +@@ -41,6 +41,26 @@ public: + void stopAnimation(QObject *target); + QVariantAnimation* animation(QObject *target); + ++private: ++ //进度条normal动画滑片的一些参数 ++ // const int baseDuration = 1000; ++ // const int baseMinWidth = 200; ++ // const int baseMaxWidth = 1000; ++ // const int baseMaxDuration = 4000; ++ // const int baseMinDuration = 1000; ++ ++ const int sliderFixedSpan = 150;//滑片本身固定宽度 ++ const int startAnimationBaseWidth = 200;//进度条达到200宽度才开始光片移动动画 ++ ++ int totalBarWidth;//进度条整体宽度 ++ int totalBarHeight;//进度条整体高度 ++public: ++ bool canEnableNormalAnimation(int width); ++ ++ int getSliderFixedSpan() const; ++ void cacheTotalBarInfo(const int& width,const int& height);//存储进度条信息,宽,高 ++ void getTotalBarInfo(int& width,int& height) const;//获取进度条信息,宽,高 ++ + public slots: + void _q_removeAnimation(); + +diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.cpp +index ac69022..43dd14a 100644 +--- a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.cpp ++++ b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.cpp +@@ -24,9 +24,11 @@ + + using namespace UKUIConfigStyleSpace; + +-ConfigProgressBarAnimation::ConfigProgressBarAnimation(QObject *parent) : QVariantAnimation (parent) ++// ConfigProgressBarAnimation::ConfigProgressBarAnimation(QObject *parent) : QVariantAnimation (parent) ++ConfigProgressBarAnimation::ConfigProgressBarAnimation(QObject *parent, ProgressBarStatus curStatus) : QVariantAnimation (parent) + { +- init(); ++ // init(); ++ init(curStatus); + } + + +@@ -41,18 +43,35 @@ ConfigProgressBarAnimation::~ConfigProgressBarAnimation() + + } + +-void ConfigProgressBarAnimation::init() ++void ConfigProgressBarAnimation::init(ProgressBarStatus curStatus) + { +- this->setStartValue(0.0); +- this->setEndValue(1.0); +- this->setDuration(2500); +- this->setDirection(QAbstractAnimation::Forward); +- this->setEasingCurve(QEasingCurve::InOutSine); ++ // this->setStartValue(0.0); ++ // this->setEndValue(1.0); ++ // this->setDuration(2500); ++ // this->setDirection(QAbstractAnimation::Forward); ++ // this->setEasingCurve(QEasingCurve::InOutSine); ++ ++ if (curStatus == ProgressBarStatus::INDETERMINATE) {//用于indeterminate状态动画的初始化,往返移动 ++ this->setStartValue(0.0); ++ this->setEndValue(1.0); ++ this->setDuration(2500); ++ this->setDirection(QAbstractAnimation::Forward); ++ this->setEasingCurve(QEasingCurve::InOutSine); ++ } else if (curStatus == ProgressBarStatus::NORMAL) {//用于normal状态动画的初始化,循环前向移动 ++ this->setStartValue(0.0); ++ this->setEndValue(1.0); ++ this->setDuration(2500); ++ this->setDirection(QAbstractAnimation::Forward); ++ this->setEasingCurve(QEasingCurve::Linear); ++ } ++ + + connect(this, &QVariantAnimation::valueChanged, target(), [=](QVariant value) { +- target()->repaint(); ++ // target()->repaint(); ++ target()->update();//repaint会造成recursive repaint问题 + }); + connect(this, &QVariantAnimation::finished, target(), [=]() { +- target()->repaint(); ++ // target()->repaint(); ++ target()->update(); + }); + } +diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.h b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.h +index 27e84a6..669cbe3 100644 +--- a/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.h ++++ b/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.h +@@ -30,16 +30,23 @@ + + namespace UKUIConfigStyleSpace { + ++enum class ProgressBarStatus { ++ NORMAL = 0,//进度条正常状态 ++ INDETERMINATE = 1 //进度条不确定状态 ++}; ++ + class ConfigProgressBarAnimation : public QVariantAnimation + { + Q_OBJECT + public: +- ConfigProgressBarAnimation(QObject *parent); ++ // ConfigProgressBarAnimation(QObject *parent); ++ ConfigProgressBarAnimation(QObject *parent, ProgressBarStatus curStatus); + ~ConfigProgressBarAnimation(); + + QWidget *target(); + private: +- void init(); ++ // void init(); ++ void init(ProgressBarStatus curStatus); + }; + } + #endif // PROGRESSBARANIMATOR_H +diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp +index cd47d93..42a7f01 100644 +--- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp ++++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp +@@ -3044,10 +3044,10 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const + tabBarFocusPen = widget->property("setTabBarHoverPen").value<QPen>(); + } + } +- qDebug() << "========> widgetBackgroundBrush = " << widgetBackgroundBrush; +- qDebug() << "========> tabBarBackgroundBrush = " << tabBarBackgroundBrush; +- qDebug() << "========> tabBarDefaultBrush = " << tabBarDefaultBrush; +- qDebug() << "========> tabBarHoverBrush = " << tabBarHoverBrush; ++ // qDebug() << "========> widgetBackgroundBrush = " << widgetBackgroundBrush; ++ // qDebug() << "========> tabBarBackgroundBrush = " << tabBarBackgroundBrush; ++ // qDebug() << "========> tabBarDefaultBrush = " << tabBarDefaultBrush; ++ // qDebug() << "========> tabBarHoverBrush = " << tabBarHoverBrush; + + m_TabWidgetParameters.radius = tabradius; + m_TabWidgetParameters.tabWidgetBackgroundBrush = widgetBackgroundBrush; +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 1e1ef28..58a3e1c 100644 +--- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp ++++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp +@@ -6209,8 +6209,9 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp + if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { + sp->initConfigProgressBarParameters(isUseDarkPalette(), pb, widget); + +- const bool vertical = pb->orientation == Qt::Vertical; +- const bool inverted = pb->invertedAppearance; ++ const bool vertical = pb->orientation == Qt::Vertical;//是否垂直 ++ const bool inverted = pb->invertedAppearance;//是否反向 ++ const bool indeterminate = (pb->minimum == 0 && pb->maximum == 0);//是否为indeterminate状态 + + bool reverse = (!vertical && (pb->direction == Qt::RightToLeft)) || vertical; + if (inverted) +@@ -6234,37 +6235,81 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp + } + + +- if (QVariantAnimation *animation = m_animation_helper->animation(option->styleObject)) { +- if(animation->state() == QAbstractAnimation::Running){ +- bool forward = animation->direction() == QAbstractAnimation::Forward; +- if(!forward) +- reverse = !reverse; +- +- if (sp->m_ProgressBarParameters.progressBarContentBrush.style() == Qt::LinearGradientPattern) { +- QLinearGradient linearGradient; +- linearGradient.setStops(sp->m_ProgressBarParameters.progressBarContentBrush.gradient()->stops()); +- if (vertical) { +- if (reverse) { +- linearGradient.setStart(pb->rect.bottomLeft()); +- linearGradient.setFinalStop(pb->rect.topLeft()); +- } else { +- linearGradient.setStart(pb->rect.topLeft()); +- linearGradient.setFinalStop(pb->rect.bottomLeft()); +- } +- } else { +- if (reverse) { +- linearGradient.setStart(pb->rect.topRight()); +- linearGradient.setFinalStop(pb->rect.topLeft()); +- } else { +- linearGradient.setStart(pb->rect.topLeft()); +- linearGradient.setFinalStop(pb->rect.topRight()); ++ // if (QVariantAnimation *animation = m_animation_helper->animation(option->styleObject)) { ++ // if(animation->state() == QAbstractAnimation::Running){ ++ // bool forward = animation->direction() == QAbstractAnimation::Forward; ++ // if(!forward) ++ // reverse = !reverse; ++ ++ // if (sp->m_ProgressBarParameters.progressBarContentBrush.style() == Qt::LinearGradientPattern) { ++ // QLinearGradient linearGradient; ++ // linearGradient.setStops(sp->m_ProgressBarParameters.progressBarContentBrush.gradient()->stops()); ++ // if (vertical) { ++ // if (reverse) { ++ // linearGradient.setStart(pb->rect.bottomLeft()); ++ // linearGradient.setFinalStop(pb->rect.topLeft()); ++ // } else { ++ // linearGradient.setStart(pb->rect.topLeft()); ++ // linearGradient.setFinalStop(pb->rect.bottomLeft()); ++ // } ++ // } else { ++ // if (reverse) { ++ // linearGradient.setStart(pb->rect.topRight()); ++ // linearGradient.setFinalStop(pb->rect.topLeft()); ++ // } else { ++ // linearGradient.setStart(pb->rect.topLeft()); ++ // linearGradient.setFinalStop(pb->rect.topRight()); ++ // } ++ // } ++ // brush = QBrush(linearGradient); ++ // } ++ // } ++ // } ++ ++ double curAnimationValue; ++ QVariantAnimation *animation = m_animation_helper->animation(option->styleObject); ++ ++ // bool enableBarAnimation = !disableProgressBarAnimationList().contains(qAppName());//是否启用进度条动画 ++ bool enableBarAnimation = widget && (!widget->property("animation").isValid() || widget->property("animation").toBool()); ++ ++ if (enableBarAnimation) { ++ if (animation) { ++ if (animation->state() == QAbstractAnimation::Running) { ++ if (indeterminate) {//indeterminate状态,动画处理 ++ bool forward = animation->direction() == QAbstractAnimation::Forward; ++ if(!forward) ++ reverse = !reverse; ++ ++ if (sp->m_ProgressBarParameters.progressBarContentBrush.style() == Qt::LinearGradientPattern) { ++ QLinearGradient linearGradient; ++ linearGradient.setStops(sp->m_ProgressBarParameters.progressBarContentBrush.gradient()->stops()); ++ if (vertical) { ++ if (reverse) { ++ linearGradient.setStart(pb->rect.bottomLeft()); ++ linearGradient.setFinalStop(pb->rect.topLeft()); ++ } else { ++ linearGradient.setStart(pb->rect.topLeft()); ++ linearGradient.setFinalStop(pb->rect.bottomLeft()); ++ } ++ } else { ++ if (reverse) { ++ linearGradient.setStart(pb->rect.topRight()); ++ linearGradient.setFinalStop(pb->rect.topLeft()); ++ } else { ++ linearGradient.setStart(pb->rect.topLeft()); ++ linearGradient.setFinalStop(pb->rect.topRight()); ++ } ++ } ++ brush = QBrush(linearGradient); + } ++ } else { //normal状态,动画处理 ++ curAnimationValue = animation->currentValue().toDouble(); + } +- brush = QBrush(linearGradient); + } + } + } + ++ + painter->save(); + painter->setRenderHint(QPainter::Antialiasing, sp->m_ProgressBarParameters.radius != 0); + QColor penColor = sp->m_ProgressBarParameters.progressBarContentPen.color(); +@@ -6280,15 +6325,88 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp + rect.setWidth(0); + if(pb->rect.height() == 0) + rect.setHeight(0); +- painter->drawRoundedRect(rect, sp->m_ProgressBarParameters.radius, sp->m_ProgressBarParameters.radius); ++ // painter->drawRoundedRect(rect, sp->m_ProgressBarParameters.radius, sp->m_ProgressBarParameters.radius); + +- //绘制移动光片 +- //用于绘制光片的矩形区域 +-// QRectF brightChipRect = rect.adjusted(0,1,-1,-1); +-// auto x = brightChipRect.x(); +-// auto y = brightChipRect.y(); +-// auto w = brightChipRect.width(); +-// auto h = brightChipRect.height(); ++ if (rect.width() > 0 && rect.height() > 0) { ++ painter->drawRoundedRect(rect, sp->m_ProgressBarParameters.radius, sp->m_ProgressBarParameters.radius); ++ } ++ ++ if (!indeterminate && enableBarAnimation && animation) { ++ QRect sliderRectScope = vertical ? rect.adjusted(0,1,0,-1) : rect.adjusted(1,0,-1,0);//滑片作用区域 ++ ++ if (rect.width() == 0) { ++ sliderRectScope.setWidth(0); ++ } ++ if (rect.height() == 0) { ++ sliderRectScope.setHeight(0); ++ } ++ ++ ++ int totalBarWidth,totalBarHeight; ++ m_animation_helper->getTotalBarInfo(totalBarWidth,totalBarHeight); ++ ++ int sliderWidth = m_animation_helper->getSliderFixedSpan();//宽度固定,后续会设置显示有效区域 ++ ++ int targetW,targetH; ++ int targetX,targetY; ++ ++ if (vertical) {//垂直 ++ ++ targetW = sliderRectScope.width(); ++ targetH = sliderWidth; ++ // auto baseHeight = sliderWidth + sliderRectScope.height(); ++ auto baseHeight = sliderWidth + totalBarHeight; ++ ++ if (inverted) {//垂直和反向,从上往下 ++ targetX = sliderRectScope.x(); ++ targetY = sliderRectScope.y() - sliderWidth + curAnimationValue*baseHeight; ++ } else {//仅垂直,从下往上 ++ targetX = sliderRectScope.x(); ++ targetY = sliderRectScope.y() + sliderRectScope.height() - curAnimationValue*baseHeight; ++ } ++ } else { ++ targetW = sliderWidth; ++ targetH = sliderRectScope.height(); ++ auto baseWidth = sliderWidth + totalBarWidth; ++ if (inverted) {//仅反向 ++ targetX = sliderRectScope.right() - curAnimationValue*baseWidth; ++ targetY = sliderRectScope.y(); ++ } else {//普通状态 ++ targetX = (sliderRectScope.x()-sliderWidth) + curAnimationValue*baseWidth; ++ targetY = sliderRectScope.y(); ++ } ++ } ++ ++ QRect targetRect(targetX,targetY,targetW,targetH); ++ ++ ++ // //滑片有效作用域 ++ QPainterPath path; ++ path.addRoundedRect(rect, sp->m_ProgressBarParameters.radius, sp->m_ProgressBarParameters.radius); ++ QRegion effectRegion(path.toFillPolygon().toPolygon()); ++ ++ painter->setClipRegion(effectRegion); ++ painter->setRenderHint(QPainter::Antialiasing); ++ painter->setPen(Qt::NoPen); ++ ++ auto radius = targetRect.width() >= targetRect.height() ? targetRect.width() : targetRect.height(); ++ QRadialGradient gradient(targetRect.center(),0.6*radius,targetRect.center()); ++ QColor targetColor = sp->m_ProgressBarParameters.progressBarContentBrush.color().name(); ++ ++ //滑片颜色 ++ QColor startColor(Qt::white); ++ gradient.setColorAt(0,startColor); ++ gradient.setColorAt(1,targetColor); ++ painter->setBrush(gradient); ++ ++ ++ //动画重启条件,不是time结束,而是进度值更新的时候,即绘制起始点x()触碰到进度值所在矩形的右边缘,就重启 ++ if (targetX >= (pb->rect.x()+pb->rect.width())) { ++ animation->setCurrentTime(animation->totalDuration());//设置为终止时间,模拟动画假结束状态 ++ } else { ++ painter->drawRect(targetRect); ++ } ++ } + + painter->restore(); + return; +@@ -7631,10 +7749,24 @@ QRect UKUIConfigStyle::subElementRect(SubElement element, const QStyleOption *op + reverse = !reverse; + + int diff = 0; ++ ++ // bool enableBarAnimation = !disableProgressBarAnimationList().contains(qAppName());//是否启用进度条动画 ++ bool enableBarAnimation = widget && (!widget->property("animation").isValid() || widget->property("animation").toBool()); ++ QVariantAnimation *animation = m_animation_helper->animation(option->styleObject); ++ ++ //初始化对应状态的动画对象 ++ if (enableBarAnimation && !animation) { ++ if (indeterminate) {//indeterminate状态 ++ m_animation_helper->startAnimation(new ConfigProgressBarAnimation(option->styleObject, ProgressBarStatus::INDETERMINATE)); ++ } else if (progressBarWidth < maxWidth) {//normal状态,(进度值已经铺满,则不使用动画) ++ m_animation_helper->startAnimation(new ConfigProgressBarAnimation(option->styleObject, ProgressBarStatus::NORMAL)); ++ } ++ } ++ + if (indeterminate) { + len = 56; + double currentValue = 0; +- if (QVariantAnimation *animation = m_animation_helper->animation(option->styleObject)) { ++ if (animation) { + currentValue = animation->currentValue().toDouble(); + int barLength = pb->rect.width(); + if(vertical) +@@ -7649,15 +7781,30 @@ QRect UKUIConfigStyle::subElementRect(SubElement element, const QStyleOption *op + animation->setDuration(500 + barLength * speed); + animation->start(); + } +- } else { +- m_animation_helper->startAnimation(new ConfigProgressBarAnimation(option->styleObject)); + } + diff = currentValue * (maxWidth - len); +- } else { +- m_animation_helper->stopAnimation(option->styleObject); ++ } else { ++ // m_animation_helper->stopAnimation(option->styleObject); ++ ++ // 确定状态,QVariantAnimation,用于确定状态下的滑动光片动画 ++ if (animation && m_animation_helper->canEnableNormalAnimation(progressBarWidth)) {//初始状态开启动画 ++ if (animation->currentTime() == 0 ) { ++ animation->start(); ++ } else if (animation->currentTime() == animation->totalDuration() && progressBarWidth >= maxWidth) {//动画运行结束,且进度值铺满了,停止动画 ++ m_animation_helper->stopAnimation(option->styleObject); ++ // animation->stop(); ++ // delete animation; ++ // animation = nullptr; ++ } else if (animation->currentTime() == animation->totalDuration()) {//动画运行结束,重启动画 ++ animation->setCurrentTime(0); ++ animation->start(); ++ } ++ } + } + + QRect rect = proxy()->subElementRect(SE_ProgressBarGroove, pb, widget); ++ m_animation_helper->cacheTotalBarInfo(rect.width(),rect.height());//存储进度条信息 ++ + QRect progressRect; + if (vertical) { + if (reverse) { diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0006-Add-a-changelog-2023.10.13-4.1.0.0-0k6.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0006-Add-a-changelog-2023.10.13-4.1.0.0-0k6.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0006-Add-a-changelog-2023.10.13-4.1.0.0-0k6.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0006-Add-a-changelog-2023.10.13-4.1.0.0-0k6.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,89 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Fri, 13 Oct 2023 10:25:14 +0800 -Subject: Add a changelog 2023.10.13 4.1.0.0-0k6 - ---- - .../qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json | 2 +- - .../qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json | 2 ++ - ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp | 7 +++---- - ukui-styles/readconfig.cpp | 2 +- - 4 files changed, 7 insertions(+), 6 deletions(-) - -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json -index c99d47f..ed9e456 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json -@@ -304,7 +304,7 @@ - "OnHoverPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "OnClickPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "NoRole_dis", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "255, 255, 255", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "color"}, -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json -index 0148840..d6c2381 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json -@@ -322,6 +322,7 @@ - "RadioButton":{ - "DefaultRadioButton":{ - "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, -+ "DisablePen" : {"value": "166, 166, 166", "type": "color"}, - "OnDefaultPen" : {"value": "83, 80, 171", "type": "color"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "HoverBrush" : { "type": "color"}, -@@ -727,6 +728,7 @@ - "RadioButton":{ - "DefaultRadioButton":{ - "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, -+ "DisablePen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "OnDefaultPen" : {"value": "160, 157, 248", "type": "color"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index 8393924..b76ac1e 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -2854,9 +2854,6 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - clickBrush = QBrush(configMixColor(defaultBrush.color(), mix, 0.15)); - } - -- //disable -- disablePen = defaultPen; -- - onHoverPen = onDefaultPen; - if(radioButtonColorCfg.onHoverType == Obj_Color_Type){ - //on hover -@@ -2865,6 +2862,8 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - } else { - onHoverBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, 0.05)); - } -+ //disable -+ disablePen = defaultPen; - } - else if(radioButtonColorCfg.onHoverType == Obj_Gradient_Type){ - QColor startColor; -@@ -3692,7 +3691,7 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - } - - auto color = menuColorCfg.menuBackgroundBrush; -- if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -+ if (!widget->inherits("QComboBoxPrivateContainer") && UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { - auto opacity = UKUIStyleSettings::globalInstance()->get("menuTransparency").toInt()/100.0; - color.setAlphaF(opacity); - } -diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp -index 81842a9..29373c1 100644 ---- a/ukui-styles/readconfig.cpp -+++ b/ukui-styles/readconfig.cpp -@@ -894,7 +894,7 @@ UKUIColorTheme::TableColorCfg ReadThemeConfig::tableColorCfg(const QPalette pale - m_tableColorCfg.hoverGradientList.clear(); - m_readConfig->getGradientValue(m_tableColorCfg.hoverGradientList , m_theme, UKUITable, property, C_Table_HoverBrush); - } -- else if(m_tableColorCfg.hoverType == Obj_Color_Type){ -+ else{ - m_readConfig->getColorValue(m_tableColorCfg.hoverBrush, m_theme, UKUITable, property, C_Table_HoverBrush); - } - return m_tableColorCfg; diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0007-Add-a-changelog-2023.10.16-4.1.0.0-0k7.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0007-Add-a-changelog-2023.10.16-4.1.0.0-0k7.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0007-Add-a-changelog-2023.10.16-4.1.0.0-0k7.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0007-Add-a-changelog-2023.10.16-4.1.0.0-0k7.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,5198 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Mon, 16 Oct 2023 10:40:23 +0800 -Subject: Add a changelog 2023.10.16 4.1.0.0-0k7 - ---- - .../qt5-config-style-ukui/config-shadow-helper.cpp | 2 +- - .../qt5-config-style-ukui.pri | 7 +- - .../themeconfig/UKUIConfigClassical.json | 772 ------------------- - .../themeconfig/UKUIConfigDefault.json | 820 --------------------- - .../themeconfig/UKUIConfigFashion.json | 814 -------------------- - .../themeconfig/classical.json | 772 +++++++++++++++++++ - .../qt5-config-style-ukui/themeconfig/default.json | 820 +++++++++++++++++++++ - .../qt5-config-style-ukui/themeconfig/fashion.json | 814 ++++++++++++++++++++ - .../ukui-config-style-parameters.cpp | 48 +- - .../qt5-config-style-ukui/ukui-config-style.cpp | 21 +- - ukui-styles/qt5-style-ukui/qt5-style-ukui.pri | 3 +- - .../qt5-style-ukui/themeconfig/UKUIClassical.json | 7 - - .../themeconfig/style-ukui-classical.json | 7 + - .../qt5-style-ukui/ukui-style-parameters.cpp | 4 +- - ukui-styles/readconfig.cpp | 10 +- - ukui-styles/themeinformation.h | 1 + - ukui-styles/ukui-style-plugin.cpp | 6 +- - 17 files changed, 2460 insertions(+), 2468 deletions(-) - delete mode 100644 ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigClassical.json - delete mode 100644 ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json - delete mode 100644 ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json - create mode 100644 ukui-styles/qt5-config-style-ukui/themeconfig/classical.json - create mode 100644 ukui-styles/qt5-config-style-ukui/themeconfig/default.json - create mode 100644 ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json - delete mode 100644 ukui-styles/qt5-style-ukui/themeconfig/UKUIClassical.json - create mode 100644 ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json - -diff --git a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -index d83b09b..c586f7a 100644 ---- a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -@@ -240,7 +240,7 @@ QPixmap ConfigShadowHelper::getShadowPixmap(QColor color, /*ConfigShadowHelper:: - painter2.setBrush(Qt::NoBrush); - painter2.translate(shadow_border, shadow_border); - painter2.translate(-0.5, -0.5); -- painter2.drawPath(borderPath); -+// painter2.drawPath(borderPath); - - return darkerTarget; - } -diff --git a/ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pri b/ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pri -index dfcd32b..afc4d89 100644 ---- a/ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pri -+++ b/ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pri -@@ -20,6 +20,7 @@ HEADERS += \ - # $$PWD/readconfig.h \ - # $$PWD/themeinformation.h - --DISTFILES += $$PWD/themeconfig/UKUIConfigDefault.json \ -- $$PWD/themeconfig/UKUIConfigClassical.json \ -- $$PWD/themeconfig/UKUIConfigFashion.json -+DISTFILES += \ -+ $$PWD/themeconfig/classical.json \ -+ $$PWD/themeconfig/default.json \ -+ $$PWD/themeconfig/fashion.json -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigClassical.json b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigClassical.json -deleted file mode 100644 -index a1017d0..0000000 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigClassical.json -+++ /dev/null -@@ -1,772 +0,0 @@ --{ -- "Radius":{ -- "Max_Radius" : {"value": "0", "type": "int"}, -- "Normal_Radius" : {"value": "0", "type": "int"}, -- "Min_Radius" : {"value": "0", "type": "int"} -- }, -- "ColorAdjustRules" : "HSL", -- "LightTheme":{ -- "Palette":{ -- "WindowText_at" : {"value": "38, 38, 38", "type": "color"}, -- "WindowText_iat" : {"value": "38, 38, 38", "type": "color"}, -- "WindowText_dis" : {"value": "166, 166, 166", "type": "color"}, -- "Button_at" : {"value": "250, 250, 250 ", "type": "color"}, -- "Button_iat" : {"value": "250, 250, 250", "type": "color"}, -- "Button_dis" : {"value": "217, 217, 217", "type": "color"}, -- "Light_at" : {"value": "255, 255, 255", "type": "color"}, -- "Light_iat" : {"value": "255, 255, 255", "type": "color"}, -- "Light_dis" : {"value": "242, 242, 242", "type": "color"}, -- "Midlight_at" : {"value": "170, 170, 170", "type": "color"}, -- "Midlight_iat" : {"value": "170, 170, 170", "type": "color"}, -- "Midlight_dis" : {"value": "230, 230, 230", "type": "color"}, -- "Dark_at" : {"value": "77, 77, 77", "type": "color"}, -- "Dark_iat" : {"value": "77, 77, 77", "type": "color"}, -- "Dark_dis" : {"value": "64, 64, 64", "type": "color"}, -- "Mid_at" : {"value": "115, 115, 115", "type": "color"}, -- "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, -- "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, -- "Text_at" : {"value": "38, 38, 38 ", "type": "color"}, -- "Text_iat" : {"value": "38, 38, 38", "type": "color"}, -- "Text_dis" : {"value": "140, 140, 140", "type": "color"}, -- "BrightText_at" : {"value": "89, 89, 89", "type": "color"}, -- "BrightText_iat" : {"value": "89, 89, 89", "type": "color"}, -- "BrightText_dis" : {"value": "77, 77, 77", "type": "color"}, -- "ButtonText_at" : {"value": "38, 38, 38", "type": "color"}, -- "ButtonText_iat" : {"value": "38, 38, 38", "type": "color"}, -- "ButtonText_dis" : {"value": "179, 179, 179", "type": "color"}, -- "Base_at" : {"value": "255, 255, 255", "type": "color"}, -- "Base_iat" : {"value": "245, 245, 245", "type": "color"}, -- "Base_dis" : {"value": "237, 237, 237", "type": "color"}, -- "Window_at" : {"value": "245, 245, 245", "type": "color"}, -- "Window_iat" : {"value": "237, 237, 237", "type": "color"}, -- "Window_dis" : {"value": "230, 230, 230", "type": "color"}, -- "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -- "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -- "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, -- "HighLight_at" : {"value": "48, 148, 241", "type": "color"}, -- "HighLight_iat" : {"value": "133, 180, 236", "type": "color"}, -- "HighLight_dis" : {"value": "217, 217, 217 ", "type": "color"}, -- "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, -- "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, -- "HighLightText_dis" : {"value": "179, 179, 179", "type": "color"}, -- "Link_at" : {"value": "43, 121, 218 ", "type": "color"}, -- "Link_iat" : {"value": "43, 121, 218 ", "type": "color"}, -- "Link_dis" : {"value": "43, 121, 218 ", "type": "color"}, -- "LinkVisited_at" : {"value": "167, 87, 193 ", "type": "color"}, -- "LinkVisited_iat" : {"value": "167, 87, 193 ", "type": "color"}, -- "LinkVisited_dis" : {"value": "167, 87, 193 ", "type": "color"}, -- "AlternateBase_at" : {"value": "244, 245, 245 ", "type": "color"}, -- "AlternateBase_iat" : {"value": "244, 245, 245 ", "type": "color"}, -- "AlternateBase_dis" : {"value": "244, 245, 245 ", "type": "color"}, -- "NoRole_at" : {"value": "240, 240, 240 ", "type": "color"}, -- "NoRole_iat" : {"value": "240, 240, 240 ", "type": "color"}, -- "NoRole_dis" : {"value": "217, 217, 217 ", "type": "color"}, -- "ToolTipBase_at" : {"value": "255, 255, 255 ", "type": "color"}, -- "ToolTipBase_iat" : {"value": "255, 255, 255 ", "type": "color"}, -- "ToolTipBase_dis" : {"value": "255, 255, 255 ", "type": "color"}, -- "ToolTipText_at" : {"value": "38, 38, 38 ", "type": "color"}, -- "ToolTipText_iat" : {"value": "38, 38, 38 ", "type": "color"}, -- "ToolTipText_dis" : {"value": "38, 38, 38 ", "type": "color"}, -- "PlaceholderText_at" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, -- "PlaceholderText_iat" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, -- "PlaceholderText_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"} -- }, -- "PushButton":{ -- "DefaultPushButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "WindowCloseButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, -- "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "207, 20, 34", "type": "color"}, -- "ClickPen" : {"value": "161, 0, 12", "type": "color"}, -- "FocusPen" : {"value": "207, 20, 34", "type": "color"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "WindowButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "ImportButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "TranslucentButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- } -- }, -- "ToolButton":{ -- "DefaultToolButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "WindowCloseButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, -- "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "207, 20, 34", "type": "color"}, -- "ClickPen" : {"value": "161, 0, 12", "type": "color"}, -- "FocusPen" : {"value": "207, 20, 34", "type": "color"}, -- "TextColor" : {"value": "HighLightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "HighLightText_at", "type": "paletterole"} -- }, -- "WindowButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "ImportButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "TranslucentButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- } -- }, -- "LineEdit":{ -- "DefaultLineEdit":{ -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, -- "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentLineEdit":{ -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, -- "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "SpinBox":{ -- "DefaultSpinBox":{ -- "HorizonLayout":{ -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} -- }, -- "DefaultLayout":{ -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} -- } -- } -- }, -- "ComboBox":{ -- "DefaultComboBox":{ -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_iat", "type": "paletterole"} -- } -- }, -- "ListView":{ -- "DefaultListView":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "HighlightListView":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "TranslucentListView":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -- } -- }, -- "TreeView":{ -- "DefaultTreeView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "HighlightTreeView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -- } -- }, -- "Table":{ -- "DefaultTable":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "HighlightTable":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -- } -- }, -- "CheckBox":{ -- "DefaultCheckBox":{ -- "DisablePen" : {"value": "Button_dis", "type": "color"}, -- "ContentPen" : {"value": "Text_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "PathBrush" : {"value": "Text_at", "type": "paletterole"}, -- "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -- }, -- "TranslucentCheckBox":{ -- "DisablePen" : {"value": "Button_dis", "type": "color"}, -- "ContentPen" : {"value": "Text_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "PathBrush" : {"value": "Text_at", "type": "paletterole"}, -- "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -- } -- }, -- "RadioButton":{ -- "DefaultRadioButton":{ -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : { "type": "color"}, -- "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -- "ChildrenOnDefaultBrush" : {"value": "Text_at", "type": "paletterole"}, -- "ChildrenOnHoverBrush" : {"value": "Text_at", "type": "paletterole"}, -- "ChildrenOnClickBrush" : {"value": "Text_at", "type": "paletterole"}, -- "ChildrenOnDisableBrush" : {"value": "ButtonText_dis","type": "paletterole"} -- } -- }, -- "SliderBar":{ -- "DefaultSliderBar":{ -- "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveValueDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "GrooveValueHoverBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "GrooveValueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_at", "type": "paletterole"} -- }, -- "TranslucentSliderBar":{ -- "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveValueDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "GrooveValueHoverBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "GrooveValueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_at", "type": "paletterole"} -- } -- }, -- "ProgressBar":{ -- "DefaultProgressBar" :{ -- "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -- "ContentEnd" : {"value": "HighLight_at", "type": "paletterole"}, -- "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} -- }, -- "TranslucentProgressBar": { -- "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -- "ContentEnd" : {"value": "HighLight_at", "type": "paletterole"}, -- "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} -- } -- }, -- "ScrollBar":{ -- "DefaultScrollBar" :{ -- "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveInactiveBrush" : {"value": "Button_iat", "type": "paletterole"}, -- "SliderDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -- "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} -- }, -- "TranslucentScrollBar": { -- "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveInactiveBrush" : {"value": "Button_iat", "type": "paletterole"}, -- "SliderDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -- "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} -- } -- }, -- "ToolTip":{ -- "DefaultToolTip" :{ -- "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, -- "BackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"} -- } -- }, -- "TabWidget":{ -- "DefaultTabWidget" :{ -- "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -- "TabBarBackgroundBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TabBarDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "TabBarHoverBrush" : { "type": "color"}, -- "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"} -- } -- }, -- "Menu":{ -- "DefaultMenu" :{ -- "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -- "MenuBackgroundPen" : {"value": "187, 187, 187", "type": "color"}, -- "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -- } -- } -- }, -- "DarkTheme":{ -- "Palette":{ -- "WindowText_at" : {"value": "217, 217, 217", "type": "color"}, -- "WindowText_iat" : {"value": "217, 217, 217", "type": "color"}, -- "WindowText_dis" : {"value": "77, 77, 77", "type": "color"}, -- "Button_at" : {"value": "68, 68, 68 ", "type": "color"}, -- "Button_iat" : {"value": "68, 68, 68 ", "type": "color"}, -- "Button_dis" : {"value": "43, 43, 43 ", "type": "color"}, -- "Light_at" : {"value": "255, 255, 255", "type": "color"}, -- "Light_iat" : {"value": "255, 255, 255", "type": "color"}, -- "Light_dis" : {"value": "242, 242, 242", "type": "color"}, -- "Midlight_at" : {"value": "77, 77, 77", "type": "color"}, -- "Midlight_iat" : {"value": "77, 77, 77", "type": "color"}, -- "Midlight_dis" : {"value": "64, 64, 64", "type": "color"}, -- "Dark_at" : {"value": "38, 38, 38", "type": "color"}, -- "Dark_iat" : {"value": "38, 38, 38", "type": "color"}, -- "Dark_dis" : {"value": "26, 26, 26", "type": "color"}, -- "Mid_at" : {"value": "115, 115, 115", "type": "color"}, -- "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, -- "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, -- "Text_at" : {"value": "217, 217, 217", "type": "color"}, -- "Text_iat" : {"value": "217, 217, 217", "type": "color"}, -- "Text_dis" : {"value": "77, 77, 77", "type": "color"}, -- "BrightText_at" : {"value": "255, 255, 255", "type": "color"}, -- "BrightText_iat" : {"value": "255, 255, 255", "type": "color"}, -- "BrightText_dis" : {"value": "77, 77, 77", "type": "color"}, -- "ButtonText_at" : {"value": "217, 217, 217", "type": "color"}, -- "ButtonText_iat" : {"value": "217, 217, 217", "type": "color"}, -- "ButtonText_dis" : {"value": "76, 76, 79", "type": "color"}, -- "Base_at" : {"value": "18, 18, 18", "type": "color"}, -- "Base_iat" : {"value": "28, 28, 28", "type": "color"}, -- "Base_dis" : {"value": "36, 36, 36", "type": "color"}, -- "Window_at" : {"value": "35, 36, 38", "type": "color"}, -- "Window_iat" : {"value": "34, 34, 34", "type": "color"}, -- "Window_dis" : {"value": "18, 18, 18", "type": "color"}, -- "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -- "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -- "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, -- "HighLight_at" : {"value": "126, 180, 234", "type": "color"}, -- "HighLight_iat" : {"value": "68, 143, 218", "type": "color"}, -- "HighLight_dis" : {"value": "43, 43, 43", "type": "color"}, -- "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, -- "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, -- "HighLightText_dis" : {"value": "77, 77, 77", "type": "color"}, -- "Link_at" : {"value": "43, 121, 218", "type": "color"}, -- "Link_iat" : {"value": "43, 121, 218", "type": "color"}, -- "Link_dis" : {"value": "43, 121, 218", "type": "color"}, -- "LinkVisited_at" : {"value": "167, 87, 193", "type": "color"}, -- "LinkVisited_iat" : {"value": "167, 87, 193", "type": "color"}, -- "LinkVisited_dis" : {"value": "167, 87, 193", "type": "color"}, -- "AlternateBase_at" : {"value": "38, 38, 38 ", "type": "color"}, -- "AlternateBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, -- "AlternateBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, -- "NoRole_at" : {"value": "51, 51, 51 ", "type": "color"}, -- "NoRole_iat" : {"value": "51, 51, 51 ", "type": "color"}, -- "NoRole_dis" : {"value": "60, 60, 64 ", "type": "color"}, -- "ToolTipBase_at" : {"value": "38, 38, 38 ", "type": "color"}, -- "ToolTipBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, -- "ToolTipBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, -- "ToolTipText_at" : {"value": "217, 217, 217", "type": "color"}, -- "ToolTipText_iat" : {"value": "217, 217, 217", "type": "color"}, -- "ToolTipText_dis" : {"value": "217, 217, 217", "type": "color"}, -- "PlaceholderText_at" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, -- "PlaceholderText_iat" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, -- "PlaceholderText_dis" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"} -- }, -- "PushButton":{ -- "DefaultPushButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "WindowCloseButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, -- "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "207, 20, 34", "type": "color"}, -- "ClickPen" : {"value": "161, 0, 12", "type": "color"}, -- "FocusPen" : {"value": "161, 0, 12", "type": "color"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "WindowButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "ImportButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "TranslucentButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- } -- }, -- "ToolButton":{ -- "DefaultToolButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "WindowCloseButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, -- "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "207, 20, 34", "type": "color"}, -- "ClickPen" : {"value": "161, 0, 12", "type": "color"}, -- "FocusPen" : {"value": "161, 0, 12", "type": "color"}, -- "TextColor" : {"value": "AlternateBase_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "AlternateBase_at", "type": "paletterole"} -- }, -- "WindowButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "ImportButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- } -- }, -- "LineEdit":{ -- "DefaultLineEdit":{ -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentLineEdit":{ -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "SpinBox":{ -- "DefaultSpinBox":{ -- "HorizonLayout":{ -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} -- }, -- "DefaultLayout":{ -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} -- } -- } -- }, -- "ComboBox":{ -- "DefaultComboBox":{ -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "ListView":{ -- "DefaultListView":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "HighlightListView":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "TranslucentListView":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -- } -- }, -- "TreeView":{ -- "DefaultTreeView":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "HighlightTreeView":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -- } -- }, -- "Table":{ -- "DefaultTable":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "HighlightTable":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -- } -- }, -- "CheckBox":{ -- "DefaultCheckBox":{ -- "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, -- "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -- }, -- "TranslucentCheckBox":{ -- "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, -- "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -- } -- }, -- "RadioButton":{ -- "DefaultRadioButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : { "type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -- } -- }, -- "SliderBar":{ -- "DefaultSliderBar":{ -- "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveValueDefaultBrush" : {"value": "HighLight_iat", "type": "paletterole"}, -- "GrooveValueHoverBrush" : {"value": "HighLight_iat", "type": "paletterole"}, -- "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -- "GrooveUnvalueDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "GrooveUnvalueHoverBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentSliderBar":{ -- "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveValueDefaultBrush" : {"value": "HighLight_iat", "type": "paletterole"}, -- "GrooveValueHoverBrush" : {"value": "HighLight_iat", "type": "paletterole"}, -- "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -- "GrooveUnvalueDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "GrooveUnvalueHoverBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "ProgressBar":{ -- "DefaultProgressBar" :{ -- "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} -- }, -- "TranslucentProgressBar": { -- "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} -- } -- }, -- "ScrollBar":{ -- "DefaultScrollBar" :{ -- "GrooveDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "GrooveInactiveBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "SliderHoverBrush" : { "type": "color"}, -- "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} -- }, -- "TranslucentScrollBar": { -- "GrooveDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "GrooveInactiveBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "SliderHoverBrush" : { "type": "color"}, -- "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} -- } -- }, -- "ToolTip":{ -- "DefaultToolTip" :{ -- "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, -- "BackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"} -- } -- }, -- "TabWidget":{ -- "DefaultTabWidget" :{ -- "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -- "TabBarBackgroundBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TabBarDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TabBarHoverBrush" : { "type": "color"}, -- "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"} -- } -- }, -- "Menu":{ -- "DefaultMenu" :{ -- "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -- "MenuBackgroundPen" : {"value": "89, 89, 89", "type": "color"}, -- "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -- } -- } -- } --} -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json -deleted file mode 100644 -index ed9e456..0000000 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json -+++ /dev/null -@@ -1,820 +0,0 @@ --{ -- "Radius":{ -- "Max_Radius" : {"value": "8", "type": "int"}, -- "Normal_Radius" : {"value": "6", "type": "int"}, -- "Min_Radius" : {"value": "4", "type": "int"} -- }, -- "ColorAdjustRules" : "Default", -- "LightTheme":{ -- "Palette":{ -- "WindowText_at" : {"value": "38, 38, 38", "type": "color"}, -- "WindowText_iat" : {"value": "0, 0, 0, 255*0.55", "type": "color"}, -- "WindowText_dis" : {"value": "0, 0, 0, 255*0.3", "type": "color"}, -- "Button_at" : {"value": "230, 230, 230 ", "type": "color"}, -- "Button_iat" : {"value": "230, 230, 230", "type": "color"}, -- "Button_dis" : {"value": "233, 233, 233", "type": "color"}, -- "Light_at" : {"value": "255, 255, 255", "type": "color"}, -- "Light_iat" : {"value": "255, 255, 255", "type": "color"}, -- "Light_dis" : {"value": "242, 242, 242", "type": "color"}, -- "Midlight_at" : {"value": "218, 218, 218", "type": "color"}, -- "Midlight_iat" : {"value": "218, 218, 218", "type": "color"}, -- "Midlight_dis" : {"value": "230, 230, 230", "type": "color"}, -- "Dark_at" : {"value": "77, 77, 77", "type": "color"}, -- "Dark_iat" : {"value": "77, 77, 77", "type": "color"}, -- "Dark_dis" : {"value": "64, 64, 64", "type": "color"}, -- "Mid_at" : {"value": "115, 115, 115", "type": "color"}, -- "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, -- "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, -- "Text_at" : {"value": "38, 38, 38 ", "type": "color"}, -- "Text_iat" : {"value": "38, 38, 38", "type": "color"}, -- "Text_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"}, -- "BrightText_at" : {"value": "0, 0, 0", "type": "color"}, -- "BrightText_iat" : {"value": "0, 0, 0", "type": "color"}, -- "BrightText_dis" : {"value": "0, 0, 0", "type": "color"}, -- "ButtonText_at" : {"value": "38, 38, 38", "type": "color"}, -- "ButtonText_iat" : {"value": "38, 38, 38", "type": "color"}, -- "ButtonText_dis" : {"value": "179, 179, 179", "type": "color"}, -- "Base_at" : {"value": "255, 255, 255", "type": "color"}, -- "Base_iat" : {"value": "245, 245, 245", "type": "color"}, -- "Base_dis" : {"value": "237, 237, 237", "type": "color"}, -- "Window_at" : {"value": "245, 245, 245", "type": "color"}, -- "Window_iat" : {"value": "237, 237, 237", "type": "color"}, -- "Window_dis" : {"value": "230, 230, 230", "type": "color"}, -- "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -- "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -- "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, -- "HighLight_at" : {"value": "55, 144, 250", "type": "color"}, -- "HighLight_iat" : {"value": "55, 144, 250", "type": "color"}, -- "HighLight_dis" : {"value": "233, 233, 233 ", "type": "color"}, -- "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, -- "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, -- "HighLightText_dis" : {"value": "179, 179, 179", "type": "color"}, -- "Link_at" : {"value": "55, 144, 250 ", "type": "color"}, -- "Link_iat" : {"value": "55, 144, 250 ", "type": "color"}, -- "Link_dis" : {"value": "55, 144, 250 ", "type": "color"}, -- "LinkVisited_at" : {"value": "114, 46, 209 ", "type": "color"}, -- "LinkVisited_iat" : {"value": "114, 46, 209 ", "type": "color"}, -- "LinkVisited_dis" : {"value": "114, 46, 209 ", "type": "color"}, -- "AlternateBase_at" : {"value": "245, 245, 245 ", "type": "color"}, -- "AlternateBase_iat" : {"value": "245, 245, 245 ", "type": "color"}, -- "AlternateBase_dis" : {"value": "245, 245, 245 ", "type": "color"}, -- "NoRole_at" : {"value": "240, 240, 240 ", "type": "color"}, -- "NoRole_iat" : {"value": "240, 240, 240 ", "type": "color"}, -- "NoRole_dis" : {"value": "217, 217, 217 ", "type": "color"}, -- "ToolTipBase_at" : {"value": "255, 255, 255 ", "type": "color"}, -- "ToolTipBase_iat" : {"value": "255, 255, 255 ", "type": "color"}, -- "ToolTipBase_dis" : {"value": "255, 255, 255 ", "type": "color"}, -- "ToolTipText_at" : {"value": "38, 38, 38 ", "type": "color"}, -- "ToolTipText_iat" : {"value": "38, 38, 38 ", "type": "color"}, -- "ToolTipText_dis" : {"value": "38, 38, 38 ", "type": "color"}, -- "PlaceholderText_at" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, -- "PlaceholderText_iat" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, -- "PlaceholderText_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"} -- }, -- "PushButton":{ -- "DefaultPushButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -- }, -- "WindowCloseButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, -- "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -- }, -- "WindowButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -- "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "ImportButton":{ -- "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "Base_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -- }, -- "TranslucentButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- } -- }, -- "ToolButton":{ -- "DefaultToolButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -- }, -- "WindowCloseButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, -- "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -- }, -- "WindowButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -- "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "ImportButton":{ -- "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "Base_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -- }, -- "TranslucentButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- } -- }, -- "LineEdit":{ -- "DefaultLineEdit":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"value": "NoRole_dis", "type": "paletterole"}, -- "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentLineEdit":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "0, 0, 0, 0.04", "type": "color"}, -- "HoverBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, -- "FocusBrush" : {"value": "255, 255, 255, 0.65", "type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "SpinBox":{ -- "DefaultSpinBox":{ -- "HorizonLayout":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "UpHoverBrush" : {"type": "color"}, -- "UpFocusHoverBrush" : {"type": "color"}, -- "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DownHoverBrush" : {"type": "color"}, -- "DownFocusHoverBrush" : {"type": "color"} -- }, -- "DefaultLayout":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -- "UpHoverBrush" : {"type": "color"}, -- "UpFocusHoverBrush" : {"type": "color"}, -- "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -- "DownHoverBrush" : {"type": "color"}, -- "DownFocusHoverBrush" : {"type": "color"} -- } -- } -- }, -- "ComboBox":{ -- "DefaultComboBox":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "OnBrush" : {"value": "Base_at", "type": "paletterole"}, -- "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "ListView":{ -- "DefaultListView":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -- "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -- }, -- "HighlightListView":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -- "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} -- }, -- "TranslucentListView":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -- "SelectBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -- } -- }, -- "TreeView":{ -- "DefaultTreeView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -- "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -- }, -- "HighlightTreeView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -- "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} -- } -- }, -- "Table":{ -- "DefaultTable":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -- "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -- }, -- "HighlightTable":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -- "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} -- } -- }, -- "CheckBox":{ -- "DefaultCheckBox":{ -- "DefaultPen" : {"value": "166, 166, 166", "type": "color"}, -- "HoverPen" : {"value": "166, 166, 166", "type": "color"}, -- "ClickPen" : {"value": "Mid_at", "type": "paletterole"}, -- "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, -- "OnHoverPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, -- "OnClickPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, -- "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "255, 255, 255", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -- "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "OnHoverBrush" : { "type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -- }, -- "TranslucentCheckBox":{ -- "DisablePen" : {"value": "166, 166, 166", "type": "color"}, -- "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, -- "OnHoverPen" : {"value": "0, 0, 0, 0.15", "type": "color"}, -- "OnClickPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, -- "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -- "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "OnHoverBrush" : { "type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -- } -- }, -- "RadioButton":{ -- "DefaultRadioButton":{ -- "DefaultPen" : {"value": "166, 166, 166", "type": "color"}, -- "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, -- "DefaultBrush" : {"value": "Light_at", "type": "paletterole"}, -- "HoverBrush" : { "type": "color"}, -- "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "ChildrenOnClickBrush" : {"value": "Button_at", "type": "paletterole"}, -- "ChildrenOnDisableBrush" : {"value": "HighLightText_dis","type": "paletterole"} -- } -- -- }, -- "SliderBar":{ -- "DefaultSliderBar":{ -- "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HandleHoverBrush" : { "type": "color"}, -- "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -- "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentSliderBar":{ -- "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HandleHoverBrush" : { "type": "color"}, -- "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "ProgressBar":{ -- "DefaultProgressBar" :{ -- "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -- "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentProgressBar": { -- "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -- "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, -- "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "ScrollBar":{ -- "DefaultScrollBar" :{ -- "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, -- "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "SliderHoverBrush" : { "type": "color"}, -- "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentScrollBar": { -- "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.06", "type": "color"}, -- "GrooveInactiveBrush" : {"value": "0, 0, 0, 0.06", "type": "color"}, -- "SliderDefaultBrush" : {"value": "0, 0, 0 , 0.10", "type": "color"}, -- "SliderHoverBrush" : {"value": "0, 0, 0, 0.18", "type": "color"}, -- "SliderClickBrush" : {"value": "0, 0, 0, 0.28", "type": "color"}, -- "SliderDisableBrush" : {"value": "0, 0, 0, 0.10", "type": "color"} -- } -- }, -- "ToolTip":{ -- "DefaultToolTip" :{ -- "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, -- "BackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"} -- } -- }, -- "TabWidget":{ -- "DefaultTabWidget" :{ -- "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -- "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, -- "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, -- "TabBarHoverBrush" : { "type": "color"}, -- "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, -- "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} -- } -- }, -- "Menu":{ -- "DefaultMenu" :{ -- "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -- "MenuBackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"}, -- "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -- } -- } -- }, -- "DarkTheme":{ -- "Palette":{ -- "WindowText_at" : {"value": "217, 217, 217", "type": "color"}, -- "WindowText_iat" : {"value": "255, 255, 255, 255 * 0.55", "type": "color"}, -- "WindowText_dis" : {"value": "255, 255, 255, 255 * 0.3", "type": "color"}, -- "Button_at" : {"value": "55, 55, 59 ", "type": "color"}, -- "Button_iat" : {"value": "55, 55, 59 ", "type": "color"}, -- "Button_dis" : {"value": "46, 46, 46 ", "type": "color"}, -- "Light_at" : {"value": "255, 255, 255", "type": "color"}, -- "Light_iat" : {"value": "255, 255, 255", "type": "color"}, -- "Light_dis" : {"value": "242, 242, 242", "type": "color"}, -- "Midlight_at" : {"value": "95, 95, 98", "type": "color"}, -- "Midlight_iat" : {"value": "95, 95, 98", "type": "color"}, -- "Midlight_dis" : {"value": "79, 79, 82", "type": "color"}, -- "Dark_at" : {"value": "38, 38, 38", "type": "color"}, -- "Dark_iat" : {"value": "38, 38, 38", "type": "color"}, -- "Dark_dis" : {"value": "26, 26, 26", "type": "color"}, -- "Mid_at" : {"value": "115, 115, 115", "type": "color"}, -- "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, -- "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, -- "Text_at" : {"value": "217, 217, 217", "type": "color"}, -- "Text_iat" : {"value": "217, 217, 217", "type": "color"}, -- "Text_dis" : {"value": "255, 255, 255, 255 * 0.3", "type": "color"}, -- "BrightText_at" : {"value": "255, 255, 255", "type": "color"}, -- "BrightText_iat" : {"value": "255, 255, 255", "type": "color"}, -- "BrightText_dis" : {"value": "255, 255, 255", "type": "color"}, -- "ButtonText_at" : {"value": "217, 217, 217", "type": "color"}, -- "ButtonText_iat" : {"value": "217, 217, 217", "type": "color"}, -- "ButtonText_dis" : {"value": "76, 76, 79", "type": "color"}, -- "Base_at" : {"value": "29, 29, 29", "type": "color"}, -- "Base_iat" : {"value": "28, 28, 28", "type": "color"}, -- "Base_dis" : {"value": "36, 36, 36", "type": "color"}, -- "Window_at" : {"value": "35, 36, 38", "type": "color"}, -- "Window_iat" : {"value": "26, 26, 26", "type": "color"}, -- "Window_dis" : {"value": "18, 18, 18", "type": "color"}, -- "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -- "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -- "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, -- "HighLight_at" : {"value": "55, 144, 250", "type": "color"}, -- "HighLight_iat" : {"value": "55, 144, 250", "type": "color"}, -- "HighLight_dis" : {"value": "46, 46, 46", "type": "color"}, -- "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, -- "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, -- "HighLightText_dis" : {"value": "179, 179, 179", "type": "color"}, -- "Link_at" : {"value": "55, 144, 250", "type": "color"}, -- "Link_iat" : {"value": "55, 144, 250", "type": "color"}, -- "Link_dis" : {"value": "55, 144, 250", "type": "color"}, -- "LinkVisited_at" : {"value": "114, 46, 209", "type": "color"}, -- "LinkVisited_iat" : {"value": "114, 46, 209", "type": "color"}, -- "LinkVisited_dis" : {"value": "114, 46, 209", "type": "color"}, -- "AlternateBase_at" : {"value": "38, 38, 38 ", "type": "color"}, -- "AlternateBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, -- "AlternateBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, -- "NoRole_at" : {"value": "51, 51, 51 ", "type": "color"}, -- "NoRole_iat" : {"value": "51, 51, 51 ", "type": "color"}, -- "NoRole_dis" : {"value": "60, 60, 60 ", "type": "color"}, -- "ToolTipBase_at" : {"value": "38, 38, 38 ", "type": "color"}, -- "ToolTipBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, -- "ToolTipBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, -- "ToolTipText_at" : {"value": "217, 217, 217", "type": "color"}, -- "ToolTipText_iat" : {"value": "217, 217, 217", "type": "color"}, -- "ToolTipText_dis" : {"value": "217, 217, 217", "type": "color"}, -- "PlaceholderText_at" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, -- "PlaceholderText_iat" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, -- "PlaceholderText_dis" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"} -- }, -- "PushButton":{ -- "DefaultPushButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "WindowCloseButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, -- "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "WindowButton":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "ImportButton":{ -- "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "TranslucentButton":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0.1", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- } -- }, -- "ToolButton":{ -- "DefaultToolButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "WindowCloseButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, -- "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "WindowButton":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "ImportButton":{ -- "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "TranslucentButton":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0.1", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- } -- }, -- "LineEdit":{ -- "DefaultLineEdit":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentLineEdit":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -- "FocusBrush" : {"value": "29, 29, 29, 0.45", "type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "SpinBox":{ -- "DefaultSpinBox":{ -- "HorizonLayout":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "UpHoverBrush" : {"type": "color"}, -- "UpFocusHoverBrush" : {"type": "color"}, -- "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DownHoverBrush" : {"type": "color"}, -- "DownFocusHoverBrush" : {"type": "color"} -- }, -- "DefaultLayout":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -- "UpHoverBrush" : {"type": "color"}, -- "UpFocusHoverBrush" : {"type": "color"}, -- "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -- "DownHoverBrush" : {"type": "color"}, -- "DownFocusHoverBrush" : {"type": "color"} -- } -- } -- }, -- "ComboBox":{ -- "DefaultComboBox":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "OnBrush" : {"value": "Base_at", "type": "paletterole"}, -- "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "ListView":{ -- "DefaultListView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -- }, -- "HighlightListView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -- }, -- "TranslucentListView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -- "SelectBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -- } -- }, -- "TreeView":{ -- "DefaultTreeView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -- }, -- "HighlightTreeView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} -- } -- }, -- "Table":{ -- "DefaultTable":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -- }, -- "HighlightTable":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} -- } -- }, -- "CheckBox":{ -- "DefaultCheckBox":{ -- "DefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "HoverPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "ClickPen" : {"value": "Mid_dis", "type": "paletterole"}, -- "OnDefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "OnHoverPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "OnClickPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : { "type": "color"}, -- "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "OnHoverBrush" : { "type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -- }, -- "TranslucentCheckBox":{ -- "OnDefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "OnHoverPen" : {"value": "255, 255, 255, 0.20", "type": "color"}, -- "OnClickPen" : {"value": "255, 255, 255, 0.10", "type": "color"}, -- "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, -- "HoverBrush" : { "type": "color"}, -- "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "OnHoverBrush" : { "type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -- } -- }, -- "RadioButton":{ -- "DefaultRadioButton":{ -- "DefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "OnDefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -- } -- }, -- "SliderBar":{ -- "DefaultSliderBar":{ -- "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HandleHoverBrush" : { "type": "color"}, -- "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -- "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "HighLight_dis", "type": "paletterole"} -- }, -- "TranslucentSliderBar":{ -- "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HandleHoverBrush" : { "type": "color"}, -- "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "HighLight_dis", "type": "paletterole"} -- } -- }, -- "ProgressBar":{ -- "DefaultProgressBar" :{ -- "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -- "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentProgressBar": { -- "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -- "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -- "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "ScrollBar":{ -- "DefaultScrollBar" :{ -- "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, -- "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "SliderHoverBrush" : { "type": "color"}, -- "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentScrollBar": { -- "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, -- "GrooveInactiveBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, -- "SliderDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -- "SliderHoverBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, -- "SliderClickBrush" : {"value": "255, 255, 255, 0.30", "type": "color"}, -- "SliderDisableBrush" : {"value": "255, 255, 255, 0.10", "type": "color"} -- } -- }, -- "ToolTip":{ -- "DefaultToolTip" :{ -- "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, -- "BackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"} -- } -- }, -- "TabWidget":{ -- "DefaultTabWidget" :{ -- "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -- "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, -- "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, -- "TabBarHoverBrush" : { "type": "color"}, -- "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, -- "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} -- } -- }, -- "Menu":{ -- "DefaultMenu" :{ -- "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -- "MenuBackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -- } -- } -- } --} -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json b/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json -deleted file mode 100644 -index d6c2381..0000000 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json -+++ /dev/null -@@ -1,814 +0,0 @@ --{ -- "Radius":{ -- "Max_Radius" : {"value": "8", "type": "int"}, -- "Normal_Radius" : {"value": "6", "type": "int"}, -- "Min_Radius" : {"value": "4", "type": "int"} -- }, -- "ColorAdjustRules" : "Default", -- "LightTheme":{ -- "Palette":{ -- "WindowText_at" : {"value": "38,38,38 ", "type": "color"}, -- "WindowText_iat" : {"value": "0,0,0,255*0.55 ", "type": "color"}, -- "WindowText_dis" : {"value": "0,0,0,255*0.3 ", "type": "color"}, -- "Button_at" : {"value": "230,230,230 ", "type": "color"}, -- "Button_iat" : {"value": "230, 230, 230 ", "type": "color"}, -- "Button_dis" : {"value": "233, 233, 233 ", "type": "color"}, -- "Light_at" : {"value": "255, 255, 255 ", "type": "color"}, -- "Light_iat" : {"value": "255, 255, 255 ", "type": "color"}, -- "Light_dis" : {"value": "242, 242, 242 ", "type": "color"}, -- "Midlight_at" : {"value": "218, 218, 218 ", "type": "color"}, -- "Midlight_iat" : {"value": "218, 218, 218 ", "type": "color"}, -- "Midlight_dis" : {"value": "230, 230, 230 ", "type": "color"}, -- "Dark_at" : {"value": "77, 77, 77 ", "type": "color"}, -- "Dark_iat" : {"value": "77, 77, 77 ", "type": "color"}, -- "Dark_dis" : {"value": "64, 64, 64 ", "type": "color"}, -- "Mid_at" : {"value": "115, 115, 115 ", "type": "color"}, -- "Mid_iat" : {"value": "115, 115, 115 ", "type": "color"}, -- "Mid_dis" : {"value": "102, 102, 102 ", "type": "color"}, -- "Text_at" : {"value": "38, 38, 38 ", "type": "color"}, -- "Text_iat" : {"value": "38, 38, 38 ", "type": "color"}, -- "Text_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"}, -- "BrightText_at" : {"value": "0, 0, 0 ", "type": "color"}, -- "BrightText_iat" : {"value": "0, 0, 0 ", "type": "color"}, -- "BrightText_dis" : {"value": "0, 0, 0 ", "type": "color"}, -- "ButtonText_at" : {"value": "38, 38, 38 ", "type": "color"}, -- "ButtonText_iat" : {"value": "38, 38, 38 ", "type": "color"}, -- "ButtonText_dis" : {"value": "179, 179, 179 ", "type": "color"}, -- "Base_at" : {"value": "255, 255, 255 ", "type": "color"}, -- "Base_iat" : {"value": "245, 245, 245 ", "type": "color"}, -- "Base_dis" : {"value": "237, 237, 237 ", "type": "color"}, -- "Window_at" : {"value": "245, 245, 245 ", "type": "color"}, -- "Window_iat" : {"value": "237, 237, 237 ", "type": "color"}, -- "Window_dis" : {"value": "230, 230, 230 ", "type": "color"}, -- "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, -- "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, -- "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21 ", "type": "color"}, -- "HighLight_at" : {"value": "120, 115, 245 ", "type": "color"}, -- "HighLight_iat" : {"value": "120, 115, 245 ", "type": "color"}, -- "HighLight_dis" : {"value": "233, 233, 233 ", "type": "color"}, -- "HighLightText_at" : {"value": "255, 255, 255 ", "type": "color"}, -- "HighLightText_iat" : {"value": "255, 255, 255 ", "type": "color"}, -- "HighLightText_dis" : {"value": "179, 179, 179 ", "type": "color"}, -- "Link_at" : {"value": "120, 115, 245 ", "type": "color"}, -- "Link_iat" : {"value": "120, 115, 245 ", "type": "color"}, -- "Link_dis" : {"value": "120, 115, 245 ", "type": "color"}, -- "LinkVisited_at" : {"value": "62, 118, 247 ", "type": "color"}, -- "LinkVisited_iat" : {"value": "62, 118, 247 ", "type": "color"}, -- "LinkVisited_dis" : {"value": "62, 118, 247 ", "type": "color"}, -- "AlternateBase_at" : {"value": "245, 245, 245 ", "type": "color"}, -- "AlternateBase_iat" : {"value": "245, 245, 245 ", "type": "color"}, -- "AlternateBase_dis" : {"value": "245, 245, 245 ", "type": "color"}, -- "NoRole_at" : {"value": "240, 240, 240 ", "type": "color"}, -- "NoRole_iat" : {"value": "240, 240, 240 ", "type": "color"}, -- "NoRole_dis" : {"value": "217, 217, 217 ", "type": "color"}, -- "ToolTipBase_at" : {"value": "255, 255, 255 ", "type": "color"}, -- "ToolTipBase_iat" : {"value": "255, 255, 255 ", "type": "color"}, -- "ToolTipBase_dis" : {"value": "255, 255, 255 ", "type": "color"}, -- "ToolTipText_at" : {"value": "38, 38, 38 ", "type": "color"}, -- "ToolTipText_iat" : {"value": "38, 38, 38 ", "type": "color"}, -- "ToolTipText_dis" : {"value": "38, 38, 38 ", "type": "color"}, -- "PlaceholderText_at" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, -- "PlaceholderText_iat" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, -- "PlaceholderText_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"} -- }, -- "PushButton":{ -- "DefaultPushButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -- }, -- "WindowCloseButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "242, 82, 117 ~ 221, 44, 68", "type": "gradient"}, -- "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -- }, -- "WindowButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "218, 218, 218 ~ 184, 184, 184", "type": "gradient"}, -- "ClickBrush" : {"value": "191, 191, 191", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "ImportButton":{ -- "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "Base_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -- }, -- "TranslucentButton":{ -- "DefaultBrush" : {"value": "38, 38, 38, 0.10", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- } -- }, -- "ToolButton":{ -- "DefaultToolButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -- }, -- "WindowCloseButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "242, 82, 117 ~ 221, 44, 68", "type": "gradient"}, -- "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -- }, -- "WindowButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "218, 218, 218 ~ 184, 184, 184", "type": "gradient"}, -- "ClickBrush" : {"value": "191, 191, 191", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -- }, -- "ImportButton":{ -- "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "Base_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -- }, -- "TranslucentButton":{ -- "DefaultBrush" : {"value": "38, 38, 38, 0.10", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -- "TextColor" : {"value": "Base_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -- } -- }, -- "LineEdit":{ -- "DefaultLineEdit":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "FocusPen" : {"value": "102, 97, 208", "type": "color"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentLineEdit":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "SpinBox":{ -- "DefaultSpinBox":{ -- "HorizonLayout":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpHoverBrush" : {"type": "gradient"}, -- "UpFocusHoverBrush" : {"type": "gradient"}, -- "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DownHoverBrush" : {"type": "gradient"}, -- "DownFocusHoverBrush" : {"type": "gradient"}, -- "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} -- }, -- "DefaultLayout":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpHoverBrush" : {"type": "gradient"}, -- "UpFocusHoverBrush" : {"type": "gradient"}, -- "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -- "DownHoverBrush" : {"type": "gradient"}, -- "DownFocusHoverBrush" : {"type": "gradient"}, -- "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"} -- } -- } -- }, -- "ComboBox":{ -- "DefaultComboBox":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "OnBrush" : {"value": "Base_at", "type": "paletterole"}, -- "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "ListView":{ -- "DefaultListView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -- "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -- }, -- "HighlightListView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -- "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -- }, -- "TranslucentListView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "BrightText_at", "type": "paletterole"} -- } -- }, -- "TreeView":{ -- "DefaultTreeView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -- "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -- }, -- "HighlightTreeView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -- "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -- } -- }, -- "Table":{ -- "DefaultTable":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -- "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -- }, -- "HighlightTable":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -- "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -- } -- }, -- "CheckBox":{ -- "DefaultCheckBox":{ -- "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, -- "HoverPen" : {"value": "140, 140, 140", "type": "color"}, -- "ClickPen" : {"value": "140, 140, 140", "type": "color"}, -- "OnDefaultPen" : {"value": "83, 80, 171", "type": "color"}, -- "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Light_at", "type": "paletterole"}, -- "HoverBrush" : { "type": "color"}, -- "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "OnHoverBrush" : { "type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, -- "PathDisableBrush" : {"value": "140, 140, 140", "type": "color"} -- }, -- "TranslucentCheckBox":{ -- "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, -- "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "115, 115, 115, 0.2", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -- "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "OnHoverBrush" : { "type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, -- "PathDisableBrush" : {"value": "140, 140, 140", "type": "color"} -- } -- }, -- "RadioButton":{ -- "DefaultRadioButton":{ -- "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, -- "DisablePen" : {"value": "166, 166, 166", "type": "color"}, -- "OnDefaultPen" : {"value": "83, 80, 171", "type": "color"}, -- "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "HoverBrush" : { "type": "color"}, -- "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "OnHoverBrush" : { "type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -- } -- }, -- "SliderBar":{ -- "DefaultSliderBar":{ -- "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HandleHoverBrush" : {"type": "gradient"}, -- "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -- "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentSliderBar":{ -- "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HandleHoverBrush" : { "type": "gradient"}, -- "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "ProgressBar":{ -- "DefaultProgressBar" :{ -- "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -- "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentProgressBar": { -- "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -- "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, -- "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "ScrollBar":{ -- "DefaultScrollBar" :{ -- "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, -- "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "SliderHoverBrush" : { "type": "gradient"}, -- "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentScrollBar": { -- "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, -- "GrooveInactiveBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, -- "SliderDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, -- "SliderHoverBrush" : {"value": "0, 0, 0, 0.20", "type": "color"}, -- "SliderClickBrush" : {"value": "0, 0, 0, 0.30", "type": "color"}, -- "SliderDisableBrush" : {"value": "0, 0, 0, 0.10", "type": "color"} -- } -- }, -- "ToolTip":{ -- "DefaultToolTip" :{ -- "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, -- "BackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"} -- } -- }, -- "TabWidget":{ -- "DefaultTabWidget" :{ -- "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -- "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, -- "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, -- "TabBarHoverBrush" : { "type": "gradient"}, -- "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, -- "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} -- } -- }, -- "Menu":{ -- "DefaultMenu" :{ -- "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -- "MenuBackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"}, -- "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -- } -- } -- }, -- "DarkTheme":{ -- "Palette":{ -- "WindowText_at" : {"value": "217, 217, 217 ", "type": "color"}, -- "WindowText_iat" : {"value": "255, 255, 255, 255 * 0.55 ", "type": "color"}, -- "WindowText_dis" : {"value": "255, 255, 255, 255 * 0.3 ", "type": "color"}, -- "Button_at" : {"value": "55, 55, 59 ", "type": "color"}, -- "Button_iat" : {"value": "55, 55, 59 ", "type": "color"}, -- "Button_dis" : {"value": "46, 46, 46 ", "type": "color"}, -- "Light_at" : {"value": "255, 255, 255 ", "type": "color"}, -- "Light_iat" : {"value": "255, 255, 255 ", "type": "color"}, -- "Light_dis" : {"value": "242, 242, 242 ", "type": "color"}, -- "Midlight_at" : {"value": "95, 95, 98 ", "type": "color"}, -- "Midlight_iat" : {"value": "95, 95, 98 ", "type": "color"}, -- "Midlight_dis" : {"value": "79, 79, 82 ", "type": "color"}, -- "Dark_at" : {"value": "38, 38, 38 ", "type": "color"}, -- "Dark_iat" : {"value": "38, 38, 38 ", "type": "color"}, -- "Dark_dis" : {"value": "26, 26, 26 ", "type": "color"}, -- "Mid_at" : {"value": "115, 115, 115 ", "type": "color"}, -- "Mid_iat" : {"value": "115, 115, 115 ", "type": "color"}, -- "Mid_dis" : {"value": "102, 102, 102 ", "type": "color"}, -- "Text_at" : {"value": "217, 217, 217 ", "type": "color"}, -- "Text_iat" : {"value": "217, 217, 217 ", "type": "color"}, -- "Text_dis" : {"value": "255, 255, 255, 255 * 0.3 ", "type": "color"}, -- "BrightText_at" : {"value": "255, 255, 255 ", "type": "color"}, -- "BrightText_iat" : {"value": "255, 255, 255 ", "type": "color"}, -- "BrightText_dis" : {"value": "255, 255, 255 ", "type": "color"}, -- "ButtonText_at" : {"value": "217, 217, 217 ", "type": "color"}, -- "ButtonText_iat" : {"value": "217, 217, 217 ", "type": "color"}, -- "ButtonText_dis" : {"value": "76, 76, 79 ", "type": "color"}, -- "Base_at" : {"value": "29, 29, 29 ", "type": "color"}, -- "Base_iat" : {"value": "28, 28, 28 ", "type": "color"}, -- "Base_dis" : {"value": "36, 36, 36 ", "type": "color"}, -- "Window_at" : {"value": "35, 36, 38 ", "type": "color"}, -- "Window_iat" : {"value": "26, 26, 26 ", "type": "color"}, -- "Window_dis" : {"value": "18, 18, 18 ", "type": "color"}, -- "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, -- "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, -- "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21 ", "type": "color"}, -- "HighLight_at" : {"value": "120, 115, 245 ", "type": "color"}, -- "HighLight_iat" : {"value": "120, 115, 245 ", "type": "color"}, -- "HighLight_dis" : {"value": "46, 46, 46 ", "type": "color"}, -- "HighLightText_at" : {"value": "255, 255, 255 ", "type": "color"}, -- "HighLightText_iat" : {"value": "255, 255, 255 ", "type": "color"}, -- "HighLightText_dis" : {"value": "77, 77, 77 ", "type": "color"}, -- "Link_at" : {"value": "120, 115, 245 ", "type": "color"}, -- "Link_iat" : {"value": "120, 115, 245 ", "type": "color"}, -- "Link_dis" : {"value": "120, 115, 245 ", "type": "color"}, -- "LinkVisited_at" : {"value": "62, 118, 247 ", "type": "color"}, -- "LinkVisited_iat" : {"value": "62, 118, 247 ", "type": "color"}, -- "LinkVisited_dis" : {"value": "62, 118, 247 ", "type": "color"}, -- "AlternateBase_at" : {"value": "38, 38, 38 ", "type": "color"}, -- "AlternateBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, -- "AlternateBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, -- "NoRole_at" : {"value": "51, 51, 51 ", "type": "color"}, -- "NoRole_iat" : {"value": "51, 51, 51 ", "type": "color"}, -- "NoRole_dis" : {"value": "60, 60, 60 ", "type": "color"}, -- "ToolTipBase_at" : {"value": "38, 38, 38 ", "type": "color"}, -- "ToolTipBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, -- "ToolTipBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, -- "ToolTipText_at" : {"value": "217, 217, 217 ", "type": "color"}, -- "ToolTipText_iat" : {"value": "217, 217, 217 ", "type": "color"}, -- "ToolTipText_dis" : {"value": "217, 217, 217 ", "type": "color"}, -- "PlaceholderText_at" : {"value": "255, 255, 255, 255 * 0.35 ", "type": "color"}, -- "PlaceholderText_iat" : {"value": "255, 255, 255, 255 * 0.35 ", "type": "color"}, -- "PlaceholderText_dis" : {"value": "255, 255, 255, 255 * 0.35 ", "type": "color"} -- }, -- "PushButton":{ -- "DefaultPushButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "WindowCloseButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "242, 116, 113 ~ 221, 44, 68", "type": "gradient"}, -- "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "WindowButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "95, 95, 95 ~ 56, 56, 56", "type": "gradient"}, -- "ClickBrush" : {"value": "95, 95, 95", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "ImportButton":{ -- "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "TranslucentButton":{ -- "DefaultBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, -- "HoverBrush" : {"value": "255, 255, 255, 0.2 ~ 217, 217, 217, 0.2", "type": "gradient"}, -- "ClickBrush" : {"value": "255, 255, 255, 0.3", "type": "color"}, -- "DisableBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- } -- }, -- "ToolButton":{ -- "DefaultToolButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "WindowCloseButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "242, 116, 113 ~ 221, 44, 68", "type": "gradient"}, -- "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "WindowButton":{ -- "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"value": "95, 95, 95 ~ 56, 56, 56", "type": "gradient"}, -- "ClickBrush" : {"value": "95, 95, 95", "type": "color"}, -- "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "ImportButton":{ -- "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- }, -- "TranslucentButton":{ -- "DefaultBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, -- "HoverBrush" : {"value": "255, 255, 255, 0.2 ~ 217, 217, 217, 0.2", "type": "gradient"}, -- "ClickBrush" : {"value": "255, 255, 255, 0.3", "type": "color"}, -- "DisableBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, -- "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -- } -- }, -- "LineEdit":{ -- "DefaultLineEdit":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "FocusBrush" : {"value": "Window_dis", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentLineEdit":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "SpinBox":{ -- "DefaultSpinBox":{ -- "HorizonLayout":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "FocusBrush" : {"value": "Window_dis", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpHoverBrush" : {"type": "gradient"}, -- "UpFocusHoverBrush" : {"type": "gradient"}, -- "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DownHoverBrush" : {"type": "gradient"}, -- "DownFocusHoverBrush" : {"type": "gradient"}, -- "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} -- }, -- "DefaultLayout":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -- "FocusBrush" : {"value": "Window_dis", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpHoverBrush" : {"type": "gradient"}, -- "UpFocusHoverBrush" : {"type": "gradient"}, -- "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -- "DownHoverBrush" : {"type": "gradient"}, -- "DownFocusHoverBrush" : {"type": "gradient"}, -- "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"} -- } -- } -- }, -- "ComboBox":{ -- "DefaultComboBox":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "OnBrush" : {"value": "Base_at", "type": "paletterole"}, -- "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "ListView":{ -- "DefaultListView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -- "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -- }, -- "HighlightListView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -- "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -- }, -- "TranslucentListView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Light_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -- } -- }, -- "TreeView":{ -- "DefaultTreeView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -- "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -- }, -- "HighlightTreeView":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -- "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -- } -- }, -- "Table":{ -- "DefaultTable":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -- "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -- }, -- "HighlightTable":{ -- "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -- "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -- } -- }, -- "CheckBox":{ -- "DefaultCheckBox":{ -- "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, -- "HoverPen" : {"value": "140, 140, 140", "type": "color"}, -- "ClickPen" : {"value": "140, 140, 140", "type": "color"}, -- "OnDefaultPen" : {"value": "160, 157, 248", "type": "color"}, -- "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "OnHoverBrush" : {"type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, -- "PathDisableBrush" : {"value": "140, 140, 140", "type": "color"} -- }, -- "TranslucentCheckBox":{ -- "OnDefaultPen" : {"value": "255, 255, 255, 0.10", "type": "color"}, -- "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -- "ClickBrush" : {"value": "255, 255, 255, 0.30", "type": "color"}, -- "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "OnHoverBrush" : { "type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, -- "PathDisableBrush" : {"value": "179, 179, 179", "type": "color"} -- } -- }, -- "RadioButton":{ -- "DefaultRadioButton":{ -- "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, -- "DisablePen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "OnDefaultPen" : {"value": "160, 157, 248", "type": "color"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "OnHoverBrush" : { "type": "gradient"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -- "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -- } -- }, -- "SliderBar":{ -- "DefaultSliderBar":{ -- "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HandleHoverBrush" : { "type": "gradient"}, -- "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -- "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentSliderBar":{ -- "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "HandleHoverBrush" : { "type": "gradient"}, -- "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "ProgressBar":{ -- "DefaultProgressBar" :{ -- "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -- "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentProgressBar": { -- "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -- "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -- "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- } -- }, -- "ScrollBar":{ -- "DefaultScrollBar" :{ -- "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, -- "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "SliderHoverBrush" : { "type": "gradient"}, -- "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -- }, -- "TranslucentScrollBar": { -- "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -- "GrooveInactiveBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -- "SliderDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -- "SliderHoverBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, -- "SliderClickBrush" : {"value": "255, 255, 255, 0.30", "type": "color"}, -- "SliderDisableBrush" : {"value": "255, 255, 255, 0.10", "type": "color"} -- } -- }, -- "ToolTip":{ -- "DefaultToolTip" :{ -- "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, -- "BackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"} -- } -- }, -- "TabWidget":{ -- "DefaultTabWidget" :{ -- "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -- "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, -- "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, -- "TabBarHoverBrush" : { "type": "gradient"}, -- "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, -- "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} -- } -- }, -- "Menu":{ -- "DefaultMenu" :{ -- "MenuBackgroundBrush" : {"value": "Window_dis", "type": "paletterole"}, -- "MenuBackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -- "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -- } -- } -- } --} -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json b/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -new file mode 100644 -index 0000000..f1c3388 ---- /dev/null -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -@@ -0,0 +1,772 @@ -+{ -+ "Radius":{ -+ "Max_Radius" : {"value": "0", "type": "int"}, -+ "Normal_Radius" : {"value": "0", "type": "int"}, -+ "Min_Radius" : {"value": "0", "type": "int"} -+ }, -+ "ColorAdjustRules" : "HSL", -+ "LightTheme":{ -+ "Palette":{ -+ "WindowText_at" : {"value": "38, 38, 38", "type": "color"}, -+ "WindowText_iat" : {"value": "38, 38, 38", "type": "color"}, -+ "WindowText_dis" : {"value": "166, 166, 166", "type": "color"}, -+ "Button_at" : {"value": "250, 250, 250 ", "type": "color"}, -+ "Button_iat" : {"value": "250, 250, 250", "type": "color"}, -+ "Button_dis" : {"value": "217, 217, 217", "type": "color"}, -+ "Light_at" : {"value": "255, 255, 255", "type": "color"}, -+ "Light_iat" : {"value": "255, 255, 255", "type": "color"}, -+ "Light_dis" : {"value": "242, 242, 242", "type": "color"}, -+ "Midlight_at" : {"value": "170, 170, 170", "type": "color"}, -+ "Midlight_iat" : {"value": "170, 170, 170", "type": "color"}, -+ "Midlight_dis" : {"value": "230, 230, 230", "type": "color"}, -+ "Dark_at" : {"value": "77, 77, 77", "type": "color"}, -+ "Dark_iat" : {"value": "77, 77, 77", "type": "color"}, -+ "Dark_dis" : {"value": "64, 64, 64", "type": "color"}, -+ "Mid_at" : {"value": "115, 115, 115", "type": "color"}, -+ "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, -+ "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, -+ "Text_at" : {"value": "38, 38, 38 ", "type": "color"}, -+ "Text_iat" : {"value": "38, 38, 38", "type": "color"}, -+ "Text_dis" : {"value": "140, 140, 140", "type": "color"}, -+ "BrightText_at" : {"value": "89, 89, 89", "type": "color"}, -+ "BrightText_iat" : {"value": "89, 89, 89", "type": "color"}, -+ "BrightText_dis" : {"value": "77, 77, 77", "type": "color"}, -+ "ButtonText_at" : {"value": "38, 38, 38", "type": "color"}, -+ "ButtonText_iat" : {"value": "38, 38, 38", "type": "color"}, -+ "ButtonText_dis" : {"value": "179, 179, 179", "type": "color"}, -+ "Base_at" : {"value": "255, 255, 255", "type": "color"}, -+ "Base_iat" : {"value": "245, 245, 245", "type": "color"}, -+ "Base_dis" : {"value": "237, 237, 237", "type": "color"}, -+ "Window_at" : {"value": "245, 245, 245", "type": "color"}, -+ "Window_iat" : {"value": "237, 237, 237", "type": "color"}, -+ "Window_dis" : {"value": "230, 230, 230", "type": "color"}, -+ "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -+ "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -+ "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, -+ "HighLight_at" : {"value": "48, 148, 241", "type": "color"}, -+ "HighLight_iat" : {"value": "133, 180, 236", "type": "color"}, -+ "HighLight_dis" : {"value": "217, 217, 217 ", "type": "color"}, -+ "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, -+ "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, -+ "HighLightText_dis" : {"value": "179, 179, 179", "type": "color"}, -+ "Link_at" : {"value": "43, 121, 218 ", "type": "color"}, -+ "Link_iat" : {"value": "43, 121, 218 ", "type": "color"}, -+ "Link_dis" : {"value": "43, 121, 218 ", "type": "color"}, -+ "LinkVisited_at" : {"value": "167, 87, 193 ", "type": "color"}, -+ "LinkVisited_iat" : {"value": "167, 87, 193 ", "type": "color"}, -+ "LinkVisited_dis" : {"value": "167, 87, 193 ", "type": "color"}, -+ "AlternateBase_at" : {"value": "244, 245, 245 ", "type": "color"}, -+ "AlternateBase_iat" : {"value": "244, 245, 245 ", "type": "color"}, -+ "AlternateBase_dis" : {"value": "244, 245, 245 ", "type": "color"}, -+ "NoRole_at" : {"value": "240, 240, 240 ", "type": "color"}, -+ "NoRole_iat" : {"value": "240, 240, 240 ", "type": "color"}, -+ "NoRole_dis" : {"value": "217, 217, 217 ", "type": "color"}, -+ "ToolTipBase_at" : {"value": "255, 255, 255 ", "type": "color"}, -+ "ToolTipBase_iat" : {"value": "255, 255, 255 ", "type": "color"}, -+ "ToolTipBase_dis" : {"value": "255, 255, 255 ", "type": "color"}, -+ "ToolTipText_at" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ToolTipText_iat" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ToolTipText_dis" : {"value": "38, 38, 38 ", "type": "color"}, -+ "PlaceholderText_at" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, -+ "PlaceholderText_iat" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, -+ "PlaceholderText_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"} -+ }, -+ "PushButton":{ -+ "DefaultPushButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "WindowCloseButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, -+ "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "207, 20, 34", "type": "color"}, -+ "ClickPen" : {"value": "161, 0, 12", "type": "color"}, -+ "FocusPen" : {"value": "207, 20, 34", "type": "color"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "WindowButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "UseButtonPalette":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "ImportButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "TranslucentButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ } -+ }, -+ "ToolButton":{ -+ "DefaultToolButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "WindowCloseButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, -+ "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "207, 20, 34", "type": "color"}, -+ "ClickPen" : {"value": "161, 0, 12", "type": "color"}, -+ "FocusPen" : {"value": "207, 20, 34", "type": "color"}, -+ "TextColor" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "HighLightText_at", "type": "paletterole"} -+ }, -+ "WindowButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "UseButtonPalette":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "ImportButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "TranslucentButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ } -+ }, -+ "LineEdit":{ -+ "DefaultLineEdit":{ -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentLineEdit":{ -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "SpinBox":{ -+ "DefaultSpinBox":{ -+ "HorizonLayout":{ -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} -+ }, -+ "DefaultLayout":{ -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} -+ } -+ } -+ }, -+ "ComboBox":{ -+ "DefaultComboBox":{ -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"} -+ } -+ }, -+ "ListView":{ -+ "DefaultListView":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "HighlightListView":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "TranslucentListView":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ } -+ }, -+ "TreeView":{ -+ "DefaultTreeView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "HighlightTreeView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ } -+ }, -+ "Table":{ -+ "DefaultTable":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "HighlightTable":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ } -+ }, -+ "CheckBox":{ -+ "DefaultCheckBox":{ -+ "DisablePen" : {"value": "Button_dis", "type": "color"}, -+ "ContentPen" : {"value": "Text_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "PathBrush" : {"value": "Text_at", "type": "paletterole"}, -+ "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -+ }, -+ "TranslucentCheckBox":{ -+ "DisablePen" : {"value": "Button_dis", "type": "color"}, -+ "ContentPen" : {"value": "Text_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "PathBrush" : {"value": "Text_at", "type": "paletterole"}, -+ "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -+ } -+ }, -+ "RadioButton":{ -+ "DefaultRadioButton":{ -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "ChildrenOnDefaultBrush" : {"value": "Text_at", "type": "paletterole"}, -+ "ChildrenOnHoverBrush" : {"value": "Text_at", "type": "paletterole"}, -+ "ChildrenOnClickBrush" : {"value": "Text_at", "type": "paletterole"}, -+ "ChildrenOnDisableBrush" : {"value": "ButtonText_dis","type": "paletterole"} -+ } -+ }, -+ "SliderBar":{ -+ "DefaultSliderBar":{ -+ "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveValueDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "GrooveValueHoverBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "GrooveValueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveUnvalueDisableBrush" : {"value": "Button_at", "type": "paletterole"} -+ }, -+ "TranslucentSliderBar":{ -+ "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveValueDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "GrooveValueHoverBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "GrooveValueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveUnvalueDisableBrush" : {"value": "Button_at", "type": "paletterole"} -+ } -+ }, -+ "ProgressBar":{ -+ "DefaultProgressBar" :{ -+ "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -+ "ContentEnd" : {"value": "HighLight_at", "type": "paletterole"}, -+ "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} -+ }, -+ "TranslucentProgressBar": { -+ "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -+ "ContentEnd" : {"value": "HighLight_at", "type": "paletterole"}, -+ "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} -+ } -+ }, -+ "ScrollBar":{ -+ "DefaultScrollBar" :{ -+ "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveInactiveBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "SliderDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -+ "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} -+ }, -+ "TranslucentScrollBar": { -+ "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveInactiveBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "SliderDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -+ "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} -+ } -+ }, -+ "ToolTip":{ -+ "DefaultToolTip" :{ -+ "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, -+ "BackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"} -+ } -+ }, -+ "TabWidget":{ -+ "DefaultTabWidget" :{ -+ "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarBackgroundBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TabBarDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "TabBarHoverBrush" : { "type": "color"}, -+ "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"} -+ } -+ }, -+ "Menu":{ -+ "DefaultMenu" :{ -+ "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "MenuBackgroundPen" : {"value": "127, 127, 127", "type": "color"}, -+ "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ } -+ } -+ }, -+ "DarkTheme":{ -+ "Palette":{ -+ "WindowText_at" : {"value": "217, 217, 217", "type": "color"}, -+ "WindowText_iat" : {"value": "217, 217, 217", "type": "color"}, -+ "WindowText_dis" : {"value": "77, 77, 77", "type": "color"}, -+ "Button_at" : {"value": "68, 68, 68 ", "type": "color"}, -+ "Button_iat" : {"value": "68, 68, 68 ", "type": "color"}, -+ "Button_dis" : {"value": "43, 43, 43 ", "type": "color"}, -+ "Light_at" : {"value": "255, 255, 255", "type": "color"}, -+ "Light_iat" : {"value": "255, 255, 255", "type": "color"}, -+ "Light_dis" : {"value": "242, 242, 242", "type": "color"}, -+ "Midlight_at" : {"value": "77, 77, 77", "type": "color"}, -+ "Midlight_iat" : {"value": "77, 77, 77", "type": "color"}, -+ "Midlight_dis" : {"value": "64, 64, 64", "type": "color"}, -+ "Dark_at" : {"value": "38, 38, 38", "type": "color"}, -+ "Dark_iat" : {"value": "38, 38, 38", "type": "color"}, -+ "Dark_dis" : {"value": "26, 26, 26", "type": "color"}, -+ "Mid_at" : {"value": "115, 115, 115", "type": "color"}, -+ "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, -+ "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, -+ "Text_at" : {"value": "217, 217, 217", "type": "color"}, -+ "Text_iat" : {"value": "217, 217, 217", "type": "color"}, -+ "Text_dis" : {"value": "77, 77, 77", "type": "color"}, -+ "BrightText_at" : {"value": "255, 255, 255", "type": "color"}, -+ "BrightText_iat" : {"value": "255, 255, 255", "type": "color"}, -+ "BrightText_dis" : {"value": "77, 77, 77", "type": "color"}, -+ "ButtonText_at" : {"value": "217, 217, 217", "type": "color"}, -+ "ButtonText_iat" : {"value": "217, 217, 217", "type": "color"}, -+ "ButtonText_dis" : {"value": "76, 76, 79", "type": "color"}, -+ "Base_at" : {"value": "18, 18, 18", "type": "color"}, -+ "Base_iat" : {"value": "28, 28, 28", "type": "color"}, -+ "Base_dis" : {"value": "36, 36, 36", "type": "color"}, -+ "Window_at" : {"value": "35, 36, 38", "type": "color"}, -+ "Window_iat" : {"value": "34, 34, 34", "type": "color"}, -+ "Window_dis" : {"value": "18, 18, 18", "type": "color"}, -+ "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -+ "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -+ "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, -+ "HighLight_at" : {"value": "126, 180, 234", "type": "color"}, -+ "HighLight_iat" : {"value": "68, 143, 218", "type": "color"}, -+ "HighLight_dis" : {"value": "43, 43, 43", "type": "color"}, -+ "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, -+ "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, -+ "HighLightText_dis" : {"value": "77, 77, 77", "type": "color"}, -+ "Link_at" : {"value": "43, 121, 218", "type": "color"}, -+ "Link_iat" : {"value": "43, 121, 218", "type": "color"}, -+ "Link_dis" : {"value": "43, 121, 218", "type": "color"}, -+ "LinkVisited_at" : {"value": "167, 87, 193", "type": "color"}, -+ "LinkVisited_iat" : {"value": "167, 87, 193", "type": "color"}, -+ "LinkVisited_dis" : {"value": "167, 87, 193", "type": "color"}, -+ "AlternateBase_at" : {"value": "38, 38, 38 ", "type": "color"}, -+ "AlternateBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, -+ "AlternateBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, -+ "NoRole_at" : {"value": "51, 51, 51 ", "type": "color"}, -+ "NoRole_iat" : {"value": "51, 51, 51 ", "type": "color"}, -+ "NoRole_dis" : {"value": "60, 60, 64 ", "type": "color"}, -+ "ToolTipBase_at" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ToolTipBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ToolTipBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ToolTipText_at" : {"value": "217, 217, 217", "type": "color"}, -+ "ToolTipText_iat" : {"value": "217, 217, 217", "type": "color"}, -+ "ToolTipText_dis" : {"value": "217, 217, 217", "type": "color"}, -+ "PlaceholderText_at" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, -+ "PlaceholderText_iat" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, -+ "PlaceholderText_dis" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"} -+ }, -+ "PushButton":{ -+ "DefaultPushButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "WindowCloseButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, -+ "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "207, 20, 34", "type": "color"}, -+ "ClickPen" : {"value": "161, 0, 12", "type": "color"}, -+ "FocusPen" : {"value": "161, 0, 12", "type": "color"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "WindowButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "UseButtonPalette":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "ImportButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "TranslucentButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ } -+ }, -+ "ToolButton":{ -+ "DefaultToolButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "WindowCloseButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, -+ "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "207, 20, 34", "type": "color"}, -+ "ClickPen" : {"value": "161, 0, 12", "type": "color"}, -+ "FocusPen" : {"value": "161, 0, 12", "type": "color"}, -+ "TextColor" : {"value": "AlternateBase_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "AlternateBase_at", "type": "paletterole"} -+ }, -+ "WindowButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "UseButtonPalette":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "ImportButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ } -+ }, -+ "LineEdit":{ -+ "DefaultLineEdit":{ -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentLineEdit":{ -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "SpinBox":{ -+ "DefaultSpinBox":{ -+ "HorizonLayout":{ -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} -+ }, -+ "DefaultLayout":{ -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} -+ } -+ } -+ }, -+ "ComboBox":{ -+ "DefaultComboBox":{ -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "ListView":{ -+ "DefaultListView":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "HighlightListView":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "TranslucentListView":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ } -+ }, -+ "TreeView":{ -+ "DefaultTreeView":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "HighlightTreeView":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ } -+ }, -+ "Table":{ -+ "DefaultTable":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "HighlightTable":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} -+ } -+ }, -+ "CheckBox":{ -+ "DefaultCheckBox":{ -+ "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, -+ "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -+ }, -+ "TranslucentCheckBox":{ -+ "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, -+ "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -+ } -+ }, -+ "RadioButton":{ -+ "DefaultRadioButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -+ } -+ }, -+ "SliderBar":{ -+ "DefaultSliderBar":{ -+ "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveValueDefaultBrush" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "GrooveValueHoverBrush" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveUnvalueDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "GrooveUnvalueHoverBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentSliderBar":{ -+ "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveValueDefaultBrush" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "GrooveValueHoverBrush" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveUnvalueDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "GrooveUnvalueHoverBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "ProgressBar":{ -+ "DefaultProgressBar" :{ -+ "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} -+ }, -+ "TranslucentProgressBar": { -+ "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} -+ } -+ }, -+ "ScrollBar":{ -+ "DefaultScrollBar" :{ -+ "GrooveDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "GrooveInactiveBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "SliderHoverBrush" : { "type": "color"}, -+ "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} -+ }, -+ "TranslucentScrollBar": { -+ "GrooveDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "GrooveInactiveBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "SliderHoverBrush" : { "type": "color"}, -+ "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} -+ } -+ }, -+ "ToolTip":{ -+ "DefaultToolTip" :{ -+ "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, -+ "BackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"} -+ } -+ }, -+ "TabWidget":{ -+ "DefaultTabWidget" :{ -+ "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarBackgroundBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TabBarDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TabBarHoverBrush" : { "type": "color"}, -+ "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"} -+ } -+ }, -+ "Menu":{ -+ "DefaultMenu" :{ -+ "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "MenuBackgroundPen" : {"value": "89, 89, 89", "type": "color"}, -+ "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ } -+ } -+ } -+} -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/default.json b/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -new file mode 100644 -index 0000000..ed9e456 ---- /dev/null -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -@@ -0,0 +1,820 @@ -+{ -+ "Radius":{ -+ "Max_Radius" : {"value": "8", "type": "int"}, -+ "Normal_Radius" : {"value": "6", "type": "int"}, -+ "Min_Radius" : {"value": "4", "type": "int"} -+ }, -+ "ColorAdjustRules" : "Default", -+ "LightTheme":{ -+ "Palette":{ -+ "WindowText_at" : {"value": "38, 38, 38", "type": "color"}, -+ "WindowText_iat" : {"value": "0, 0, 0, 255*0.55", "type": "color"}, -+ "WindowText_dis" : {"value": "0, 0, 0, 255*0.3", "type": "color"}, -+ "Button_at" : {"value": "230, 230, 230 ", "type": "color"}, -+ "Button_iat" : {"value": "230, 230, 230", "type": "color"}, -+ "Button_dis" : {"value": "233, 233, 233", "type": "color"}, -+ "Light_at" : {"value": "255, 255, 255", "type": "color"}, -+ "Light_iat" : {"value": "255, 255, 255", "type": "color"}, -+ "Light_dis" : {"value": "242, 242, 242", "type": "color"}, -+ "Midlight_at" : {"value": "218, 218, 218", "type": "color"}, -+ "Midlight_iat" : {"value": "218, 218, 218", "type": "color"}, -+ "Midlight_dis" : {"value": "230, 230, 230", "type": "color"}, -+ "Dark_at" : {"value": "77, 77, 77", "type": "color"}, -+ "Dark_iat" : {"value": "77, 77, 77", "type": "color"}, -+ "Dark_dis" : {"value": "64, 64, 64", "type": "color"}, -+ "Mid_at" : {"value": "115, 115, 115", "type": "color"}, -+ "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, -+ "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, -+ "Text_at" : {"value": "38, 38, 38 ", "type": "color"}, -+ "Text_iat" : {"value": "38, 38, 38", "type": "color"}, -+ "Text_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"}, -+ "BrightText_at" : {"value": "0, 0, 0", "type": "color"}, -+ "BrightText_iat" : {"value": "0, 0, 0", "type": "color"}, -+ "BrightText_dis" : {"value": "0, 0, 0", "type": "color"}, -+ "ButtonText_at" : {"value": "38, 38, 38", "type": "color"}, -+ "ButtonText_iat" : {"value": "38, 38, 38", "type": "color"}, -+ "ButtonText_dis" : {"value": "179, 179, 179", "type": "color"}, -+ "Base_at" : {"value": "255, 255, 255", "type": "color"}, -+ "Base_iat" : {"value": "245, 245, 245", "type": "color"}, -+ "Base_dis" : {"value": "237, 237, 237", "type": "color"}, -+ "Window_at" : {"value": "245, 245, 245", "type": "color"}, -+ "Window_iat" : {"value": "237, 237, 237", "type": "color"}, -+ "Window_dis" : {"value": "230, 230, 230", "type": "color"}, -+ "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -+ "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -+ "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, -+ "HighLight_at" : {"value": "55, 144, 250", "type": "color"}, -+ "HighLight_iat" : {"value": "55, 144, 250", "type": "color"}, -+ "HighLight_dis" : {"value": "233, 233, 233 ", "type": "color"}, -+ "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, -+ "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, -+ "HighLightText_dis" : {"value": "179, 179, 179", "type": "color"}, -+ "Link_at" : {"value": "55, 144, 250 ", "type": "color"}, -+ "Link_iat" : {"value": "55, 144, 250 ", "type": "color"}, -+ "Link_dis" : {"value": "55, 144, 250 ", "type": "color"}, -+ "LinkVisited_at" : {"value": "114, 46, 209 ", "type": "color"}, -+ "LinkVisited_iat" : {"value": "114, 46, 209 ", "type": "color"}, -+ "LinkVisited_dis" : {"value": "114, 46, 209 ", "type": "color"}, -+ "AlternateBase_at" : {"value": "245, 245, 245 ", "type": "color"}, -+ "AlternateBase_iat" : {"value": "245, 245, 245 ", "type": "color"}, -+ "AlternateBase_dis" : {"value": "245, 245, 245 ", "type": "color"}, -+ "NoRole_at" : {"value": "240, 240, 240 ", "type": "color"}, -+ "NoRole_iat" : {"value": "240, 240, 240 ", "type": "color"}, -+ "NoRole_dis" : {"value": "217, 217, 217 ", "type": "color"}, -+ "ToolTipBase_at" : {"value": "255, 255, 255 ", "type": "color"}, -+ "ToolTipBase_iat" : {"value": "255, 255, 255 ", "type": "color"}, -+ "ToolTipBase_dis" : {"value": "255, 255, 255 ", "type": "color"}, -+ "ToolTipText_at" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ToolTipText_iat" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ToolTipText_dis" : {"value": "38, 38, 38 ", "type": "color"}, -+ "PlaceholderText_at" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, -+ "PlaceholderText_iat" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, -+ "PlaceholderText_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"} -+ }, -+ "PushButton":{ -+ "DefaultPushButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ }, -+ "WindowCloseButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, -+ "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ }, -+ "WindowButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "UseButtonPalette":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "ImportButton":{ -+ "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ }, -+ "TranslucentButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, -+ "HoverBrush" : {"type": "color"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ } -+ }, -+ "ToolButton":{ -+ "DefaultToolButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ }, -+ "WindowCloseButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, -+ "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ }, -+ "WindowButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "UseButtonPalette":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "ImportButton":{ -+ "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ }, -+ "TranslucentButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ } -+ }, -+ "LineEdit":{ -+ "DefaultLineEdit":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"value": "NoRole_dis", "type": "paletterole"}, -+ "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentLineEdit":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "0, 0, 0, 0.04", "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, -+ "FocusBrush" : {"value": "255, 255, 255, 0.65", "type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "SpinBox":{ -+ "DefaultSpinBox":{ -+ "HorizonLayout":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "UpHoverBrush" : {"type": "color"}, -+ "UpFocusHoverBrush" : {"type": "color"}, -+ "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DownHoverBrush" : {"type": "color"}, -+ "DownFocusHoverBrush" : {"type": "color"} -+ }, -+ "DefaultLayout":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -+ "UpHoverBrush" : {"type": "color"}, -+ "UpFocusHoverBrush" : {"type": "color"}, -+ "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -+ "DownHoverBrush" : {"type": "color"}, -+ "DownFocusHoverBrush" : {"type": "color"} -+ } -+ } -+ }, -+ "ComboBox":{ -+ "DefaultComboBox":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "OnBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "ListView":{ -+ "DefaultListView":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightListView":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ }, -+ "TranslucentListView":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "SelectBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ } -+ }, -+ "TreeView":{ -+ "DefaultTreeView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTreeView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ } -+ }, -+ "Table":{ -+ "DefaultTable":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTable":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ } -+ }, -+ "CheckBox":{ -+ "DefaultCheckBox":{ -+ "DefaultPen" : {"value": "166, 166, 166", "type": "color"}, -+ "HoverPen" : {"value": "166, 166, 166", "type": "color"}, -+ "ClickPen" : {"value": "Mid_at", "type": "paletterole"}, -+ "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, -+ "OnHoverPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, -+ "OnClickPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, -+ "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "255, 255, 255", "type": "color"}, -+ "HoverBrush" : {"type": "color"}, -+ "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "OnHoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -+ }, -+ "TranslucentCheckBox":{ -+ "DisablePen" : {"value": "166, 166, 166", "type": "color"}, -+ "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, -+ "OnHoverPen" : {"value": "0, 0, 0, 0.15", "type": "color"}, -+ "OnClickPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, -+ "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "OnHoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -+ } -+ }, -+ "RadioButton":{ -+ "DefaultRadioButton":{ -+ "DefaultPen" : {"value": "166, 166, 166", "type": "color"}, -+ "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, -+ "DefaultBrush" : {"value": "Light_at", "type": "paletterole"}, -+ "HoverBrush" : { "type": "color"}, -+ "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "ChildrenOnClickBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "ChildrenOnDisableBrush" : {"value": "HighLightText_dis","type": "paletterole"} -+ } -+ -+ }, -+ "SliderBar":{ -+ "DefaultSliderBar":{ -+ "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HandleHoverBrush" : { "type": "color"}, -+ "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentSliderBar":{ -+ "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HandleHoverBrush" : { "type": "color"}, -+ "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "ProgressBar":{ -+ "DefaultProgressBar" :{ -+ "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -+ "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentProgressBar": { -+ "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -+ "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, -+ "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "ScrollBar":{ -+ "DefaultScrollBar" :{ -+ "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, -+ "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "SliderHoverBrush" : { "type": "color"}, -+ "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentScrollBar": { -+ "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.06", "type": "color"}, -+ "GrooveInactiveBrush" : {"value": "0, 0, 0, 0.06", "type": "color"}, -+ "SliderDefaultBrush" : {"value": "0, 0, 0 , 0.10", "type": "color"}, -+ "SliderHoverBrush" : {"value": "0, 0, 0, 0.18", "type": "color"}, -+ "SliderClickBrush" : {"value": "0, 0, 0, 0.28", "type": "color"}, -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0.10", "type": "color"} -+ } -+ }, -+ "ToolTip":{ -+ "DefaultToolTip" :{ -+ "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, -+ "BackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"} -+ } -+ }, -+ "TabWidget":{ -+ "DefaultTabWidget" :{ -+ "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, -+ "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, -+ "TabBarHoverBrush" : { "type": "color"}, -+ "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} -+ } -+ }, -+ "Menu":{ -+ "DefaultMenu" :{ -+ "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "MenuBackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"}, -+ "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ } -+ } -+ }, -+ "DarkTheme":{ -+ "Palette":{ -+ "WindowText_at" : {"value": "217, 217, 217", "type": "color"}, -+ "WindowText_iat" : {"value": "255, 255, 255, 255 * 0.55", "type": "color"}, -+ "WindowText_dis" : {"value": "255, 255, 255, 255 * 0.3", "type": "color"}, -+ "Button_at" : {"value": "55, 55, 59 ", "type": "color"}, -+ "Button_iat" : {"value": "55, 55, 59 ", "type": "color"}, -+ "Button_dis" : {"value": "46, 46, 46 ", "type": "color"}, -+ "Light_at" : {"value": "255, 255, 255", "type": "color"}, -+ "Light_iat" : {"value": "255, 255, 255", "type": "color"}, -+ "Light_dis" : {"value": "242, 242, 242", "type": "color"}, -+ "Midlight_at" : {"value": "95, 95, 98", "type": "color"}, -+ "Midlight_iat" : {"value": "95, 95, 98", "type": "color"}, -+ "Midlight_dis" : {"value": "79, 79, 82", "type": "color"}, -+ "Dark_at" : {"value": "38, 38, 38", "type": "color"}, -+ "Dark_iat" : {"value": "38, 38, 38", "type": "color"}, -+ "Dark_dis" : {"value": "26, 26, 26", "type": "color"}, -+ "Mid_at" : {"value": "115, 115, 115", "type": "color"}, -+ "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, -+ "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, -+ "Text_at" : {"value": "217, 217, 217", "type": "color"}, -+ "Text_iat" : {"value": "217, 217, 217", "type": "color"}, -+ "Text_dis" : {"value": "255, 255, 255, 255 * 0.3", "type": "color"}, -+ "BrightText_at" : {"value": "255, 255, 255", "type": "color"}, -+ "BrightText_iat" : {"value": "255, 255, 255", "type": "color"}, -+ "BrightText_dis" : {"value": "255, 255, 255", "type": "color"}, -+ "ButtonText_at" : {"value": "217, 217, 217", "type": "color"}, -+ "ButtonText_iat" : {"value": "217, 217, 217", "type": "color"}, -+ "ButtonText_dis" : {"value": "76, 76, 79", "type": "color"}, -+ "Base_at" : {"value": "29, 29, 29", "type": "color"}, -+ "Base_iat" : {"value": "28, 28, 28", "type": "color"}, -+ "Base_dis" : {"value": "36, 36, 36", "type": "color"}, -+ "Window_at" : {"value": "35, 36, 38", "type": "color"}, -+ "Window_iat" : {"value": "26, 26, 26", "type": "color"}, -+ "Window_dis" : {"value": "18, 18, 18", "type": "color"}, -+ "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -+ "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, -+ "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, -+ "HighLight_at" : {"value": "55, 144, 250", "type": "color"}, -+ "HighLight_iat" : {"value": "55, 144, 250", "type": "color"}, -+ "HighLight_dis" : {"value": "46, 46, 46", "type": "color"}, -+ "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, -+ "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, -+ "HighLightText_dis" : {"value": "179, 179, 179", "type": "color"}, -+ "Link_at" : {"value": "55, 144, 250", "type": "color"}, -+ "Link_iat" : {"value": "55, 144, 250", "type": "color"}, -+ "Link_dis" : {"value": "55, 144, 250", "type": "color"}, -+ "LinkVisited_at" : {"value": "114, 46, 209", "type": "color"}, -+ "LinkVisited_iat" : {"value": "114, 46, 209", "type": "color"}, -+ "LinkVisited_dis" : {"value": "114, 46, 209", "type": "color"}, -+ "AlternateBase_at" : {"value": "38, 38, 38 ", "type": "color"}, -+ "AlternateBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, -+ "AlternateBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, -+ "NoRole_at" : {"value": "51, 51, 51 ", "type": "color"}, -+ "NoRole_iat" : {"value": "51, 51, 51 ", "type": "color"}, -+ "NoRole_dis" : {"value": "60, 60, 60 ", "type": "color"}, -+ "ToolTipBase_at" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ToolTipBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ToolTipBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ToolTipText_at" : {"value": "217, 217, 217", "type": "color"}, -+ "ToolTipText_iat" : {"value": "217, 217, 217", "type": "color"}, -+ "ToolTipText_dis" : {"value": "217, 217, 217", "type": "color"}, -+ "PlaceholderText_at" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, -+ "PlaceholderText_iat" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, -+ "PlaceholderText_dis" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"} -+ }, -+ "PushButton":{ -+ "DefaultPushButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "WindowCloseButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, -+ "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "WindowButton":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "UseButtonPalette":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "ImportButton":{ -+ "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "TranslucentButton":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0.1", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ } -+ }, -+ "ToolButton":{ -+ "DefaultToolButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "WindowCloseButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, -+ "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "WindowButton":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "UseButtonPalette":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "ImportButton":{ -+ "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "TranslucentButton":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0.1", "type": "color"}, -+ "HoverBrush" : { "type": "color"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ } -+ }, -+ "LineEdit":{ -+ "DefaultLineEdit":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentLineEdit":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, -+ "HoverBrush" : {"type": "color"}, -+ "FocusBrush" : {"value": "29, 29, 29, 0.45", "type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "SpinBox":{ -+ "DefaultSpinBox":{ -+ "HorizonLayout":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "UpHoverBrush" : {"type": "color"}, -+ "UpFocusHoverBrush" : {"type": "color"}, -+ "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DownHoverBrush" : {"type": "color"}, -+ "DownFocusHoverBrush" : {"type": "color"} -+ }, -+ "DefaultLayout":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -+ "UpHoverBrush" : {"type": "color"}, -+ "UpFocusHoverBrush" : {"type": "color"}, -+ "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -+ "DownHoverBrush" : {"type": "color"}, -+ "DownFocusHoverBrush" : {"type": "color"} -+ } -+ } -+ }, -+ "ComboBox":{ -+ "DefaultComboBox":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "OnBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "ListView":{ -+ "DefaultListView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightListView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -+ }, -+ "TranslucentListView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -+ "SelectBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -+ } -+ }, -+ "TreeView":{ -+ "DefaultTreeView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTreeView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ } -+ }, -+ "Table":{ -+ "DefaultTable":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTable":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ } -+ }, -+ "CheckBox":{ -+ "DefaultCheckBox":{ -+ "DefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "HoverPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "ClickPen" : {"value": "Mid_dis", "type": "paletterole"}, -+ "OnDefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "OnHoverPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "OnClickPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : { "type": "color"}, -+ "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "OnHoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -+ }, -+ "TranslucentCheckBox":{ -+ "OnDefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "OnHoverPen" : {"value": "255, 255, 255, 0.20", "type": "color"}, -+ "OnClickPen" : {"value": "255, 255, 255, 0.10", "type": "color"}, -+ "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "HoverBrush" : { "type": "color"}, -+ "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "OnHoverBrush" : { "type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -+ } -+ }, -+ "RadioButton":{ -+ "DefaultRadioButton":{ -+ "DefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "OnDefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -+ } -+ }, -+ "SliderBar":{ -+ "DefaultSliderBar":{ -+ "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HandleHoverBrush" : { "type": "color"}, -+ "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveUnvalueDisableBrush" : {"value": "HighLight_dis", "type": "paletterole"} -+ }, -+ "TranslucentSliderBar":{ -+ "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HandleHoverBrush" : { "type": "color"}, -+ "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveUnvalueDisableBrush" : {"value": "HighLight_dis", "type": "paletterole"} -+ } -+ }, -+ "ProgressBar":{ -+ "DefaultProgressBar" :{ -+ "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -+ "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentProgressBar": { -+ "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -+ "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -+ "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "ScrollBar":{ -+ "DefaultScrollBar" :{ -+ "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, -+ "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "SliderHoverBrush" : { "type": "color"}, -+ "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentScrollBar": { -+ "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, -+ "GrooveInactiveBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, -+ "SliderDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -+ "SliderHoverBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, -+ "SliderClickBrush" : {"value": "255, 255, 255, 0.30", "type": "color"}, -+ "SliderDisableBrush" : {"value": "255, 255, 255, 0.10", "type": "color"} -+ } -+ }, -+ "ToolTip":{ -+ "DefaultToolTip" :{ -+ "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, -+ "BackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"} -+ } -+ }, -+ "TabWidget":{ -+ "DefaultTabWidget" :{ -+ "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, -+ "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, -+ "TabBarHoverBrush" : { "type": "color"}, -+ "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} -+ } -+ }, -+ "Menu":{ -+ "DefaultMenu" :{ -+ "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "MenuBackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ } -+ } -+ } -+} -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json b/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -new file mode 100644 -index 0000000..44da586 ---- /dev/null -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -@@ -0,0 +1,814 @@ -+{ -+ "Radius":{ -+ "Max_Radius" : {"value": "8", "type": "int"}, -+ "Normal_Radius" : {"value": "6", "type": "int"}, -+ "Min_Radius" : {"value": "4", "type": "int"} -+ }, -+ "ColorAdjustRules" : "Default", -+ "LightTheme":{ -+ "Palette":{ -+ "WindowText_at" : {"value": "38,38,38 ", "type": "color"}, -+ "WindowText_iat" : {"value": "0,0,0,255*0.55 ", "type": "color"}, -+ "WindowText_dis" : {"value": "0,0,0,255*0.3 ", "type": "color"}, -+ "Button_at" : {"value": "230,230,230 ", "type": "color"}, -+ "Button_iat" : {"value": "230, 230, 230 ", "type": "color"}, -+ "Button_dis" : {"value": "233, 233, 233 ", "type": "color"}, -+ "Light_at" : {"value": "255, 255, 255 ", "type": "color"}, -+ "Light_iat" : {"value": "255, 255, 255 ", "type": "color"}, -+ "Light_dis" : {"value": "242, 242, 242 ", "type": "color"}, -+ "Midlight_at" : {"value": "218, 218, 218 ", "type": "color"}, -+ "Midlight_iat" : {"value": "218, 218, 218 ", "type": "color"}, -+ "Midlight_dis" : {"value": "230, 230, 230 ", "type": "color"}, -+ "Dark_at" : {"value": "77, 77, 77 ", "type": "color"}, -+ "Dark_iat" : {"value": "77, 77, 77 ", "type": "color"}, -+ "Dark_dis" : {"value": "64, 64, 64 ", "type": "color"}, -+ "Mid_at" : {"value": "115, 115, 115 ", "type": "color"}, -+ "Mid_iat" : {"value": "115, 115, 115 ", "type": "color"}, -+ "Mid_dis" : {"value": "102, 102, 102 ", "type": "color"}, -+ "Text_at" : {"value": "38, 38, 38 ", "type": "color"}, -+ "Text_iat" : {"value": "38, 38, 38 ", "type": "color"}, -+ "Text_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"}, -+ "BrightText_at" : {"value": "0, 0, 0 ", "type": "color"}, -+ "BrightText_iat" : {"value": "0, 0, 0 ", "type": "color"}, -+ "BrightText_dis" : {"value": "0, 0, 0 ", "type": "color"}, -+ "ButtonText_at" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ButtonText_iat" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ButtonText_dis" : {"value": "179, 179, 179 ", "type": "color"}, -+ "Base_at" : {"value": "255, 255, 255 ", "type": "color"}, -+ "Base_iat" : {"value": "245, 245, 245 ", "type": "color"}, -+ "Base_dis" : {"value": "237, 237, 237 ", "type": "color"}, -+ "Window_at" : {"value": "245, 245, 245 ", "type": "color"}, -+ "Window_iat" : {"value": "237, 237, 237 ", "type": "color"}, -+ "Window_dis" : {"value": "230, 230, 230 ", "type": "color"}, -+ "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, -+ "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, -+ "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21 ", "type": "color"}, -+ "HighLight_at" : {"value": "120, 115, 245 ", "type": "color"}, -+ "HighLight_iat" : {"value": "120, 115, 245 ", "type": "color"}, -+ "HighLight_dis" : {"value": "233, 233, 233 ", "type": "color"}, -+ "HighLightText_at" : {"value": "255, 255, 255 ", "type": "color"}, -+ "HighLightText_iat" : {"value": "255, 255, 255 ", "type": "color"}, -+ "HighLightText_dis" : {"value": "179, 179, 179 ", "type": "color"}, -+ "Link_at" : {"value": "120, 115, 245 ", "type": "color"}, -+ "Link_iat" : {"value": "120, 115, 245 ", "type": "color"}, -+ "Link_dis" : {"value": "120, 115, 245 ", "type": "color"}, -+ "LinkVisited_at" : {"value": "62, 118, 247 ", "type": "color"}, -+ "LinkVisited_iat" : {"value": "62, 118, 247 ", "type": "color"}, -+ "LinkVisited_dis" : {"value": "62, 118, 247 ", "type": "color"}, -+ "AlternateBase_at" : {"value": "245, 245, 245 ", "type": "color"}, -+ "AlternateBase_iat" : {"value": "245, 245, 245 ", "type": "color"}, -+ "AlternateBase_dis" : {"value": "245, 245, 245 ", "type": "color"}, -+ "NoRole_at" : {"value": "240, 240, 240 ", "type": "color"}, -+ "NoRole_iat" : {"value": "240, 240, 240 ", "type": "color"}, -+ "NoRole_dis" : {"value": "217, 217, 217 ", "type": "color"}, -+ "ToolTipBase_at" : {"value": "255, 255, 255 ", "type": "color"}, -+ "ToolTipBase_iat" : {"value": "255, 255, 255 ", "type": "color"}, -+ "ToolTipBase_dis" : {"value": "255, 255, 255 ", "type": "color"}, -+ "ToolTipText_at" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ToolTipText_iat" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ToolTipText_dis" : {"value": "38, 38, 38 ", "type": "color"}, -+ "PlaceholderText_at" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, -+ "PlaceholderText_iat" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, -+ "PlaceholderText_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"} -+ }, -+ "PushButton":{ -+ "DefaultPushButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ }, -+ "WindowCloseButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "242, 82, 117 ~ 221, 44, 68", "type": "gradient"}, -+ "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ }, -+ "WindowButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "218, 218, 218 ~ 184, 184, 184", "type": "gradient"}, -+ "ClickBrush" : {"value": "191, 191, 191", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "UseButtonPalette":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "ImportButton":{ -+ "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ }, -+ "TranslucentButton":{ -+ "DefaultBrush" : {"value": "38, 38, 38, 0.10", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ } -+ }, -+ "ToolButton":{ -+ "DefaultToolButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ }, -+ "WindowCloseButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "242, 82, 117 ~ 221, 44, 68", "type": "gradient"}, -+ "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ }, -+ "WindowButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "218, 218, 218 ~ 184, 184, 184", "type": "gradient"}, -+ "ClickBrush" : {"value": "191, 191, 191", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "UseButtonPalette":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ }, -+ "ImportButton":{ -+ "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ }, -+ "TranslucentButton":{ -+ "DefaultBrush" : {"value": "38, 38, 38, 0.10", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "TextColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ } -+ }, -+ "LineEdit":{ -+ "DefaultLineEdit":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "102, 97, 208", "type": "color"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentLineEdit":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "SpinBox":{ -+ "DefaultSpinBox":{ -+ "HorizonLayout":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "UpHoverBrush" : {"type": "gradient"}, -+ "UpFocusHoverBrush" : {"type": "gradient"}, -+ "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DownHoverBrush" : {"type": "gradient"}, -+ "DownFocusHoverBrush" : {"type": "gradient"}, -+ "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} -+ }, -+ "DefaultLayout":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "UpHoverBrush" : {"type": "gradient"}, -+ "UpFocusHoverBrush" : {"type": "gradient"}, -+ "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -+ "DownHoverBrush" : {"type": "gradient"}, -+ "DownFocusHoverBrush" : {"type": "gradient"}, -+ "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"} -+ } -+ } -+ }, -+ "ComboBox":{ -+ "DefaultComboBox":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "OnBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "ListView":{ -+ "DefaultListView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightListView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -+ }, -+ "TranslucentListView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "BrightText_at", "type": "paletterole"} -+ } -+ }, -+ "TreeView":{ -+ "DefaultTreeView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTreeView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -+ } -+ }, -+ "Table":{ -+ "DefaultTable":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTable":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -+ } -+ }, -+ "CheckBox":{ -+ "DefaultCheckBox":{ -+ "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, -+ "HoverPen" : {"value": "140, 140, 140", "type": "color"}, -+ "ClickPen" : {"value": "140, 140, 140", "type": "color"}, -+ "OnDefaultPen" : {"value": "83, 80, 171", "type": "color"}, -+ "ContentPen" : {"value": "Light_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Light_at", "type": "paletterole"}, -+ "HoverBrush" : { "type": "color"}, -+ "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "OnHoverBrush" : { "type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, -+ "PathDisableBrush" : {"value": "140, 140, 140", "type": "color"} -+ }, -+ "TranslucentCheckBox":{ -+ "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, -+ "ContentPen" : {"value": "Light_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "115, 115, 115, 0.2", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "OnHoverBrush" : { "type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, -+ "PathDisableBrush" : {"value": "140, 140, 140", "type": "color"} -+ } -+ }, -+ "RadioButton":{ -+ "DefaultRadioButton":{ -+ "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, -+ "DisablePen" : {"value": "166, 166, 166", "type": "color"}, -+ "OnDefaultPen" : {"value": "83, 80, 171", "type": "color"}, -+ "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "HoverBrush" : { "type": "color"}, -+ "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "OnHoverBrush" : { "type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -+ } -+ }, -+ "SliderBar":{ -+ "DefaultSliderBar":{ -+ "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HandleHoverBrush" : {"type": "gradient"}, -+ "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentSliderBar":{ -+ "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HandleHoverBrush" : { "type": "gradient"}, -+ "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "ProgressBar":{ -+ "DefaultProgressBar" :{ -+ "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -+ "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentProgressBar": { -+ "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -+ "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, -+ "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "ScrollBar":{ -+ "DefaultScrollBar" :{ -+ "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, -+ "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "SliderHoverBrush" : { "type": "gradient"}, -+ "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentScrollBar": { -+ "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, -+ "GrooveInactiveBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, -+ "SliderDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, -+ "SliderHoverBrush" : {"value": "0, 0, 0, 0.20", "type": "color"}, -+ "SliderClickBrush" : {"value": "0, 0, 0, 0.30", "type": "color"}, -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0.10", "type": "color"} -+ } -+ }, -+ "ToolTip":{ -+ "DefaultToolTip" :{ -+ "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, -+ "BackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"} -+ } -+ }, -+ "TabWidget":{ -+ "DefaultTabWidget" :{ -+ "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, -+ "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, -+ "TabBarHoverBrush" : { "type": "gradient"}, -+ "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} -+ } -+ }, -+ "Menu":{ -+ "DefaultMenu" :{ -+ "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "MenuBackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"}, -+ "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ } -+ } -+ }, -+ "DarkTheme":{ -+ "Palette":{ -+ "WindowText_at" : {"value": "217, 217, 217 ", "type": "color"}, -+ "WindowText_iat" : {"value": "255, 255, 255, 255 * 0.55 ", "type": "color"}, -+ "WindowText_dis" : {"value": "255, 255, 255, 255 * 0.3 ", "type": "color"}, -+ "Button_at" : {"value": "55, 55, 59 ", "type": "color"}, -+ "Button_iat" : {"value": "55, 55, 59 ", "type": "color"}, -+ "Button_dis" : {"value": "46, 46, 46 ", "type": "color"}, -+ "Light_at" : {"value": "255, 255, 255 ", "type": "color"}, -+ "Light_iat" : {"value": "255, 255, 255 ", "type": "color"}, -+ "Light_dis" : {"value": "242, 242, 242 ", "type": "color"}, -+ "Midlight_at" : {"value": "95, 95, 98 ", "type": "color"}, -+ "Midlight_iat" : {"value": "95, 95, 98 ", "type": "color"}, -+ "Midlight_dis" : {"value": "79, 79, 82 ", "type": "color"}, -+ "Dark_at" : {"value": "38, 38, 38 ", "type": "color"}, -+ "Dark_iat" : {"value": "38, 38, 38 ", "type": "color"}, -+ "Dark_dis" : {"value": "26, 26, 26 ", "type": "color"}, -+ "Mid_at" : {"value": "115, 115, 115 ", "type": "color"}, -+ "Mid_iat" : {"value": "115, 115, 115 ", "type": "color"}, -+ "Mid_dis" : {"value": "102, 102, 102 ", "type": "color"}, -+ "Text_at" : {"value": "217, 217, 217 ", "type": "color"}, -+ "Text_iat" : {"value": "217, 217, 217 ", "type": "color"}, -+ "Text_dis" : {"value": "255, 255, 255, 255 * 0.3 ", "type": "color"}, -+ "BrightText_at" : {"value": "255, 255, 255 ", "type": "color"}, -+ "BrightText_iat" : {"value": "255, 255, 255 ", "type": "color"}, -+ "BrightText_dis" : {"value": "255, 255, 255 ", "type": "color"}, -+ "ButtonText_at" : {"value": "217, 217, 217 ", "type": "color"}, -+ "ButtonText_iat" : {"value": "217, 217, 217 ", "type": "color"}, -+ "ButtonText_dis" : {"value": "76, 76, 79 ", "type": "color"}, -+ "Base_at" : {"value": "29, 29, 29 ", "type": "color"}, -+ "Base_iat" : {"value": "28, 28, 28 ", "type": "color"}, -+ "Base_dis" : {"value": "36, 36, 36 ", "type": "color"}, -+ "Window_at" : {"value": "35, 36, 38 ", "type": "color"}, -+ "Window_iat" : {"value": "26, 26, 26 ", "type": "color"}, -+ "Window_dis" : {"value": "18, 18, 18 ", "type": "color"}, -+ "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, -+ "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, -+ "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21 ", "type": "color"}, -+ "HighLight_at" : {"value": "120, 115, 245 ", "type": "color"}, -+ "HighLight_iat" : {"value": "120, 115, 245 ", "type": "color"}, -+ "HighLight_dis" : {"value": "46, 46, 46 ", "type": "color"}, -+ "HighLightText_at" : {"value": "255, 255, 255 ", "type": "color"}, -+ "HighLightText_iat" : {"value": "255, 255, 255 ", "type": "color"}, -+ "HighLightText_dis" : {"value": "77, 77, 77 ", "type": "color"}, -+ "Link_at" : {"value": "120, 115, 245 ", "type": "color"}, -+ "Link_iat" : {"value": "120, 115, 245 ", "type": "color"}, -+ "Link_dis" : {"value": "120, 115, 245 ", "type": "color"}, -+ "LinkVisited_at" : {"value": "62, 118, 247 ", "type": "color"}, -+ "LinkVisited_iat" : {"value": "62, 118, 247 ", "type": "color"}, -+ "LinkVisited_dis" : {"value": "62, 118, 247 ", "type": "color"}, -+ "AlternateBase_at" : {"value": "38, 38, 38 ", "type": "color"}, -+ "AlternateBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, -+ "AlternateBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, -+ "NoRole_at" : {"value": "51, 51, 51 ", "type": "color"}, -+ "NoRole_iat" : {"value": "51, 51, 51 ", "type": "color"}, -+ "NoRole_dis" : {"value": "60, 60, 60 ", "type": "color"}, -+ "ToolTipBase_at" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ToolTipBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ToolTipBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, -+ "ToolTipText_at" : {"value": "217, 217, 217 ", "type": "color"}, -+ "ToolTipText_iat" : {"value": "217, 217, 217 ", "type": "color"}, -+ "ToolTipText_dis" : {"value": "217, 217, 217 ", "type": "color"}, -+ "PlaceholderText_at" : {"value": "255, 255, 255, 255 * 0.35 ", "type": "color"}, -+ "PlaceholderText_iat" : {"value": "255, 255, 255, 255 * 0.35 ", "type": "color"}, -+ "PlaceholderText_dis" : {"value": "255, 255, 255, 255 * 0.35 ", "type": "color"} -+ }, -+ "PushButton":{ -+ "DefaultPushButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "WindowCloseButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "242, 116, 113 ~ 221, 44, 68", "type": "gradient"}, -+ "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "WindowButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "95, 95, 95 ~ 56, 56, 56", "type": "gradient"}, -+ "ClickBrush" : {"value": "95, 95, 95", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "UseButtonPalette":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "ImportButton":{ -+ "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "TranslucentButton":{ -+ "DefaultBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.2 ~ 217, 217, 217, 0.2", "type": "gradient"}, -+ "ClickBrush" : {"value": "255, 255, 255, 0.3", "type": "color"}, -+ "DisableBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ } -+ }, -+ "ToolButton":{ -+ "DefaultToolButton":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "WindowCloseButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "242, 116, 113 ~ 221, 44, 68", "type": "gradient"}, -+ "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "WindowButton":{ -+ "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"value": "95, 95, 95 ~ 56, 56, 56", "type": "gradient"}, -+ "ClickBrush" : {"value": "95, 95, 95", "type": "color"}, -+ "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "UseButtonPalette":{ -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "ImportButton":{ -+ "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ }, -+ "TranslucentButton":{ -+ "DefaultBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.2 ~ 217, 217, 217, 0.2", "type": "gradient"}, -+ "ClickBrush" : {"value": "255, 255, 255, 0.3", "type": "color"}, -+ "DisableBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, -+ "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ } -+ }, -+ "LineEdit":{ -+ "DefaultLineEdit":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "FocusBrush" : {"value": "Window_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentLineEdit":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "SpinBox":{ -+ "DefaultSpinBox":{ -+ "HorizonLayout":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "FocusBrush" : {"value": "Window_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "UpHoverBrush" : {"type": "gradient"}, -+ "UpFocusHoverBrush" : {"type": "gradient"}, -+ "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DownHoverBrush" : {"type": "gradient"}, -+ "DownFocusHoverBrush" : {"type": "gradient"}, -+ "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} -+ }, -+ "DefaultLayout":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "FocusBrush" : {"value": "Window_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "UpHoverBrush" : {"type": "gradient"}, -+ "UpFocusHoverBrush" : {"type": "gradient"}, -+ "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -+ "DownHoverBrush" : {"type": "gradient"}, -+ "DownFocusHoverBrush" : {"type": "gradient"}, -+ "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"} -+ } -+ } -+ }, -+ "ComboBox":{ -+ "DefaultComboBox":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "OnBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "ListView":{ -+ "DefaultListView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightListView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -+ }, -+ "TranslucentListView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : {"type": "gradient"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Light_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -+ } -+ }, -+ "TreeView":{ -+ "DefaultTreeView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTreeView":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -+ } -+ }, -+ "Table":{ -+ "DefaultTable":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ }, -+ "HighlightTable":{ -+ "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -+ "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} -+ } -+ }, -+ "CheckBox":{ -+ "DefaultCheckBox":{ -+ "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, -+ "HoverPen" : {"value": "140, 140, 140", "type": "color"}, -+ "ClickPen" : {"value": "140, 140, 140", "type": "color"}, -+ "OnDefaultPen" : {"value": "160, 157, 248", "type": "color"}, -+ "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"type": "color"}, -+ "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "OnHoverBrush" : {"type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, -+ "PathDisableBrush" : {"value": "140, 140, 140", "type": "color"} -+ }, -+ "TranslucentCheckBox":{ -+ "OnDefaultPen" : {"value": "255, 255, 255, 0.10", "type": "color"}, -+ "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, -+ "HoverBrush" : { "type": "gradient"}, -+ "ClickBrush" : {"value": "255, 255, 255, 0.30", "type": "color"}, -+ "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "OnHoverBrush" : { "type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, -+ "PathDisableBrush" : {"value": "179, 179, 179", "type": "color"} -+ } -+ }, -+ "RadioButton":{ -+ "DefaultRadioButton":{ -+ "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, -+ "DisablePen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "OnDefaultPen" : {"value": "160, 157, 248", "type": "color"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "OnHoverBrush" : { "type": "gradient"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -+ } -+ }, -+ "SliderBar":{ -+ "DefaultSliderBar":{ -+ "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HandleHoverBrush" : { "type": "gradient"}, -+ "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentSliderBar":{ -+ "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "HandleHoverBrush" : { "type": "gradient"}, -+ "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "ProgressBar":{ -+ "DefaultProgressBar" :{ -+ "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -+ "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentProgressBar": { -+ "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, -+ "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -+ "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ } -+ }, -+ "ScrollBar":{ -+ "DefaultScrollBar" :{ -+ "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, -+ "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "SliderHoverBrush" : { "type": "gradient"}, -+ "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ }, -+ "TranslucentScrollBar": { -+ "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -+ "GrooveInactiveBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -+ "SliderDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -+ "SliderHoverBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, -+ "SliderClickBrush" : {"value": "255, 255, 255, 0.30", "type": "color"}, -+ "SliderDisableBrush" : {"value": "255, 255, 255, 0.10", "type": "color"} -+ } -+ }, -+ "ToolTip":{ -+ "DefaultToolTip" :{ -+ "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, -+ "BackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"} -+ } -+ }, -+ "TabWidget":{ -+ "DefaultTabWidget" :{ -+ "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, -+ "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, -+ "TabBarHoverBrush" : { "type": "gradient"}, -+ "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} -+ } -+ }, -+ "Menu":{ -+ "DefaultMenu" :{ -+ "MenuBackgroundBrush" : {"value": "Window_dis", "type": "paletterole"}, -+ "MenuBackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ } -+ } -+ } -+} -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index b76ac1e..285918f 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -115,7 +115,7 @@ void UKUIConfigStyleParameters::initialDefaultPaletteColor(QString colorPath, bo - { - if (!QFile(colorPath).exists()) { - QString path = ColorPath; -- colorPath = path + "UKUIConfigDefault.json"; -+ colorPath = path + DefaultConfigName; - } - - if (!QFile(colorPath).exists()) { -@@ -235,9 +235,9 @@ void UKUIConfigStyleParameters::initPalette(bool isDark) - { - cDebug << "homelocation:" << QStandardPaths::writableLocation(QStandardPaths::HomeLocation); - QString cfgPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + -- HomeCFGColorPath + cfgName() + ".json"; -+ HomeCFGColorPath + cfgName(); - if(!QFile::exists(cfgPath)) -- cfgPath = ColorPath + cfgName() + ".json"; -+ cfgPath = ColorPath + cfgName(); - initialDefaultPaletteColor(cfgPath, isDark); - } - -@@ -245,9 +245,9 @@ void UKUIConfigStyleParameters::initRadiusCfg() - { - cDebug << "homelocation:" << QStandardPaths::writableLocation(QStandardPaths::HomeLocation); - QString cfgPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + -- HomeCFGColorPath + cfgName() + ".json"; -+ HomeCFGColorPath + cfgName(); - if(!QFile::exists(cfgPath)) -- cfgPath = UsrRadiusPath + cfgName() + ".json"; -+ cfgPath = UsrRadiusPath + cfgName(); - - if (!QFile(cfgPath).exists()) { - cDebug << "cfgPath:" << cfgPath << "is not exists"; -@@ -630,9 +630,9 @@ void UKUIConfigStyleParameters::normalButtonColor(bool isDark, QPalette p, QPen - void UKUIConfigStyleParameters::setCfgName(QString cfgName) - { - if(cfgName == "") -- cfgName = "UKUIConfigDefault"; -- if(m_cfgName != cfgName) -- m_cfgName = cfgName; -+ cfgName = DefaultConfigName; -+ if(m_cfgName != cfgName + ".json") -+ m_cfgName = cfgName + ".json"; - } - - QString UKUIConfigStyleParameters::cfgName() -@@ -1651,23 +1651,19 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); -- if(!isDefaultThemeColor()){ -- if (isDark) { -- startColor = option->palette.color(QPalette::Active, QPalette::Midlight); -- endColor = option->palette.color(QPalette::Disabled, QPalette::NoRole); -- startColor.setAlphaF(0.5); -- endColor.setAlphaF(0.5); -- } else { -- startColor = option->palette.color(QPalette::Active, QPalette::Midlight); -- endColor = configMixColor(startColor, mix, 0.1); -- startColor.setAlphaF(0.5); -- endColor.setAlphaF(0.5); -- } -- } -- else{ -- startColor = spinBoxColorCfg.hoverGradientList.value(0); -- endColor = spinBoxColorCfg.hoverGradientList.value(1); -+ -+ if (isDark) { -+ startColor = option->palette.color(QPalette::Active, QPalette::Midlight); -+ endColor = option->palette.color(QPalette::Disabled, QPalette::NoRole); -+ startColor.setAlphaF(0.5); -+ endColor.setAlphaF(0.5); -+ } else { -+ startColor = option->palette.color(QPalette::Active, QPalette::Midlight); -+ endColor = configMixColor(startColor, mix, 0.1); -+ startColor.setAlphaF(0.5); -+ endColor.setAlphaF(0.5); - } -+ - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); -@@ -2627,7 +2623,6 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - clickBrush.setColor(clickColor); - clickPen = defaultPen; - } -- onHoverBrushIslinearGradient = true; - } - - if(checkboxColorCfg.onHoverType == Obj_Color_Type){ -@@ -2636,7 +2631,7 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - onClickBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, isDark ? 0.05 : 0.2)); - - } -- else if(checkboxColorCfg.hoverType == Obj_Gradient_Type){ -+ else if(checkboxColorCfg.onHoverType == Obj_Gradient_Type){ - //on default - QColor DefaultPenColor = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor onDefaultPenColor = configMixColor(DefaultPenColor, mix, 0.1); -@@ -2684,6 +2679,7 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - onClickPenColor.setAlphaF(0.2); - onClickPen = QPen(QBrush(onClickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } -+ onHoverBrushIslinearGradient = true; - } - disablePen = defaultPen; - } -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 48559ed..d07001e 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -260,18 +260,10 @@ UKUIConfigStyle::UKUIConfigStyle(bool dark, bool useDefault, QString type) : QPr - } - } - -- if (m_widget_theme == "default") { -- sp = new UKUIConfigStyleParameters(this, isUseDarkPalette(), "UKUIConfigDefault"); -- } else if (m_widget_theme == "fashion"){ -- sp = new UKUIConfigStyleParameters(this, isUseDarkPalette(), "UKUIConfigFashion"); -- }else if (m_widget_theme == "classical"){ -- sp = new UKUIConfigStyleParameters(this, isUseDarkPalette(), "UKUIConfigClassical"); -- }else if (m_widget_theme != ""){ -- sp = new UKUIConfigStyleParameters(this, isUseDarkPalette(), m_widget_theme); -- } -- else { -- sp = new UKUIConfigStyleParameters(this, isUseDarkPalette(), "UKUIConfigDefault"); -- } -+ if(m_widget_theme == "") -+ m_widget_theme == "default"; -+ -+ sp = new UKUIConfigStyleParameters(this, isUseDarkPalette(), m_widget_theme); - - setProperty("maxRadius", sp->radiusProperty().maxRadius); - setProperty("normalRadius", sp->radiusProperty().normalRadius); -@@ -2730,11 +2722,12 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - painter->save(); - //draw path - if (on) { -- painter->setPen(QPen(sp->m_CheckBoxParameters.checkBoxPathBrush, 1.5, -+ painter->setPen(QPen(sp->m_CheckBoxParameters.checkBoxContentPen.color(), 1.5, - Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); - painter->setRenderHint(QPainter::Antialiasing, true); - } else if (noChange) { -- painter->setPen(QPen(sp->m_CheckBoxParameters.checkBoxPathBrush, 2)); -+ painter->setPen(QPen(sp->m_CheckBoxParameters.checkBoxContentPen.color(), 1.5, -+ Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); - } - painter->setBrush(Qt::NoBrush); - painter->drawPath(path); -diff --git a/ukui-styles/qt5-style-ukui/qt5-style-ukui.pri b/ukui-styles/qt5-style-ukui/qt5-style-ukui.pri -index 13b90bc..9e58b00 100644 ---- a/ukui-styles/qt5-style-ukui/qt5-style-ukui.pri -+++ b/ukui-styles/qt5-style-ukui/qt5-style-ukui.pri -@@ -22,4 +22,5 @@ SOURCES += \ - $$PWD/qt5-ukui-style-helper.cpp \ - $$PWD/breezeboxshadowrenderer.cpp - # $$PWD/readconfig.cpp --DISTFILES += $$PWD/themeconfig/UKUIClassical.json -+DISTFILES += \ -+ $$PWD/themeconfig/style-ukui-classical.json -diff --git a/ukui-styles/qt5-style-ukui/themeconfig/UKUIClassical.json b/ukui-styles/qt5-style-ukui/themeconfig/UKUIClassical.json -deleted file mode 100644 -index 45be0db..0000000 ---- a/ukui-styles/qt5-style-ukui/themeconfig/UKUIClassical.json -+++ /dev/null -@@ -1,7 +0,0 @@ --{ -- "Radius":{ -- "Max_Radius" : {"value": "0", "type": "int"}, -- "Normal_Radius" : {"value": "0", "type": "int"}, -- "Min_Radius" : {"value": "0", "type": "int"} -- } --} -diff --git a/ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json b/ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json -new file mode 100644 -index 0000000..45be0db ---- /dev/null -+++ b/ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json -@@ -0,0 +1,7 @@ -+{ -+ "Radius":{ -+ "Max_Radius" : {"value": "0", "type": "int"}, -+ "Normal_Radius" : {"value": "0", "type": "int"}, -+ "Min_Radius" : {"value": "0", "type": "int"} -+ } -+} -diff --git a/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp b/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp -index f4a1e4a..dae27b5 100644 ---- a/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp -+++ b/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp -@@ -430,10 +430,10 @@ void UKUIStyleParameters::initRadius() - { - qDebug() << "homelocation:" << QStandardPaths::writableLocation(QStandardPaths::HomeLocation); - QString cfgPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + -- HomeCFGColorPath + "UKUIClassical.json"; -+ HomeCFGColorPath + "style-ukui-classical.json"; - if(!QFile::exists(cfgPath)){ - cfgPath = UsrRadiusPath; -- cfgPath += "UKUIClassical.json"; -+ cfgPath += "style-ukui-classical.json"; - } - - if (!QFile(cfgPath).exists()) { -diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp -index 29373c1..607b7fd 100644 ---- a/ukui-styles/readconfig.cpp -+++ b/ukui-styles/readconfig.cpp -@@ -41,13 +41,13 @@ ReadConfig::~ReadConfig() - bool ReadConfig::load(const QString &cfg) - { - if (!QFile::exists(cfg)) { -- qWarning("ReadConfig load file not exists!"); -+ qWarning() << "ReadConfig load file not exists!" << cfg; - return false; - } - - QFile file(cfg); - if(!file.open(QIODevice::ReadOnly)) { -- qWarning("ReadConfig load file Error!"); -+ qWarning() << "ReadConfig load file Error!" << cfg; - return false; - } - -@@ -60,7 +60,7 @@ bool ReadConfig::load(const QString &cfg) - return false; - } - m_cfgPath = cfg; -- cDebug << "m_cfgPath..." << m_cfgPath; -+ qDebug() << "m_cfgPath..." << m_cfgPath; - m_cfgJsonObj = jdoc.object(); - return true; - } -@@ -505,7 +505,7 @@ ReadThemeConfig::ReadThemeConfig(QString colorCfgPath, bool isDark): - { - if (m_colorCfgPath.isEmpty()) { - QString path = ColorPath; -- m_colorCfgPath = path + "UKUIConfigDefault.json"; -+ m_colorCfgPath = path + DefaultConfigName; - } - m_readConfig = new ReadConfig(m_colorCfgPath); - m_loadConfig = m_readConfig->load(m_colorCfgPath); -@@ -1150,7 +1150,7 @@ RadiusConfig::RadiusConfig(QString cfgPath): - { - if (m_cfgPath.isEmpty()) { - QString path = UsrRadiusPath; -- m_cfgPath = path + "UKUIConfigDefault.json"; -+ m_cfgPath = path + DefaultConfigName; - } - m_readConfig = new ReadConfig(m_cfgPath); - m_loadConfig = m_readConfig->load(m_cfgPath); -diff --git a/ukui-styles/themeinformation.h b/ukui-styles/themeinformation.h -index 937ae83..5cbe95d 100644 ---- a/ukui-styles/themeinformation.h -+++ b/ukui-styles/themeinformation.h -@@ -33,6 +33,7 @@ - #define ColorPath "/usr/share/qt5-ukui-platformtheme/themeconfig/" - #define UsrRadiusPath "/usr/share/qt5-ukui-platformtheme/themeconfig/" - #define HomeCFGColorPath "/.config/qt5-ukui-platformthemem/themeconfig/" -+#define DefaultConfigName "default.json" - - #define Obj_Value "value" - #define Obj_Type "type" -diff --git a/ukui-styles/ukui-style-plugin.cpp b/ukui-styles/ukui-style-plugin.cpp -index a41ddd2..9cefa7e 100644 ---- a/ukui-styles/ukui-style-plugin.cpp -+++ b/ukui-styles/ukui-style-plugin.cpp -@@ -64,7 +64,7 @@ UKUIStylePlugin::UKUIStylePlugin(QObject *parent) : - if (widgetThemeName != "") { - if(qAppName() != blackStyleChangeApp) { - if (widgetThemeName == "classical") { -- styleName ="ukui-default"; -+ styleName ="ukui-config"; - qApp->setStyle(new UKUIConfigStyle(styleName)); - } else { - styleName = "ukui-config"; -@@ -196,8 +196,8 @@ void UKUIStylePlugin::tableModeChanged(bool isTableMode) - } - } - } -- -- qApp->setStyle(new UKUIConfigStyle(styleName)); -+ else -+ qApp->setStyle(new UKUIConfigStyle(styleName)); - } - } - /* diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0007-cameke.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0007-cameke.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0007-cameke.patch 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0007-cameke.patch 2025-02-28 09:39:53.000000000 +0800 @@ -0,0 +1,17038 @@ +From: =?utf-8?b?6LCt6Z2Z?= <tanjing@kylinos.cn> +Date: Wed, 19 Mar 2025 11:40:47 +0800 +Subject: =?utf-8?b?5L+u5pS5Y2FtZWtl5a6J6KOF6Lev5b6E?= + +--- + CMakeLists.txt | 4 +- + libqt5-ukui-style/CMakeLists.txt | 2 +- + qt5-ukui-filedialog/CMakeLists.txt | 2 +- + qt5-ukui-platformtheme/CMakeLists.txt | 2 +- + qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp | 7 +- + ukui-qml-style-helper/CMakeLists.txt | 88 +- + ukui-qml-style-helper/KyIcon.cpp | 132 ++ + ukui-qml-style-helper/KyIcon.h | 114 ++ + ukui-qml-style-helper/kyquickpadding_p.h | 69 + + ukui-qml-style-helper/kyquickstyleitem.cpp | 1908 ++++++++++++++++++++ + ukui-qml-style-helper/kyquickstyleitem.h | 341 ++++ + ukui-qml-style-helper/kystylehelper.cpp | 53 + + ukui-qml-style-helper/kystylehelper.h | 154 ++ + ukui-qml-style-helper/qqc2styleplugin.cpp | 34 +- + ukui-qml-style-helper/qqc2styleplugin.h | 3 + + .../styleparameter/ appparameter.cpp | 149 -- + .../styleparameter/appparameter.cpp | 224 +++ + .../styleparameter/appparameter.h | 39 +- + ukui-qml-style-helper/styleparameter/icon.h | 2 +- + .../styleparameter/imageprovider.cpp | 32 +- + .../styleparameter/parsecolorinterface.cpp | 78 + + .../styleparameter/parsecolorinterface.h | 63 + + .../styleparameter/parsedtcolor.cpp | 53 - + .../styleparameter/parsedtcolor.h | 61 - + .../styleparameter/tokenparameter.cpp | 1 + + .../styleparameter/tokenparameter.h | 2 +- + .../styleparameter/ukuibutton.cpp | 371 +++- + ukui-qml-style-helper/styleparameter/ukuibutton.h | 288 ++- + .../styleparameter/ukuicheckbox.cpp | 109 +- + .../styleparameter/ukuicheckbox.h | 216 +-- + .../styleparameter/ukuicombobox.cpp | 46 +- + .../styleparameter/ukuicombobox.h | 82 +- + .../styleparameter/ukuiitemdelegate.cpp | 242 ++- + .../styleparameter/ukuiitemdelegate.h | 182 +- + ukui-qml-style-helper/styleparameter/ukuilabel.cpp | 15 +- + ukui-qml-style-helper/styleparameter/ukuilabel.h | 26 +- + ukui-qml-style-helper/styleparameter/ukuimenu.cpp | 54 +- + ukui-qml-style-helper/styleparameter/ukuimenu.h | 41 +- + .../styleparameter/ukuimenuitem.cpp | 51 +- + .../styleparameter/ukuimenuitem.h | 82 +- + ukui-qml-style-helper/styleparameter/ukuipopup.cpp | 23 +- + ukui-qml-style-helper/styleparameter/ukuipopup.h | 36 +- + .../styleparameter/ukuipopupwindowhandle.cpp | 613 +++++++ + .../styleparameter/ukuipopupwindowhandle.h | 94 + + .../styleparameter/ukuiprogressbar.cpp | 37 +- + .../styleparameter/ukuiprogressbar.h | 51 +- + .../styleparameter/ukuiradiobutton.cpp | 108 +- + .../styleparameter/ukuiradiobutton.h | 216 +-- + .../styleparameter/ukuiscrollbar.cpp | 19 +- + .../styleparameter/ukuiscrollbar.h | 34 +- + .../styleparameter/ukuislider.cpp | 96 +- + ukui-qml-style-helper/styleparameter/ukuislider.h | 145 +- + .../styleparameter/ukuispinbox.cpp | 93 +- + ukui-qml-style-helper/styleparameter/ukuispinbox.h | 186 +- + .../styleparameter/ukuiswitch.cpp | 374 ++++ + ukui-qml-style-helper/styleparameter/ukuiswitch.h | 235 +++ + .../styleparameter/ukuitabbar.cpp | 7 +- + ukui-qml-style-helper/styleparameter/ukuitabbar.h | 10 +- + .../styleparameter/ukuitabbutton.cpp | 41 +- + .../styleparameter/ukuitabbutton.h | 76 +- + .../styleparameter/ukuitextfiled.cpp | 78 +- + .../styleparameter/ukuitextfiled.h | 146 +- + .../styleparameter/ukuitooltip.cpp | 42 +- + ukui-qml-style-helper/styleparameter/ukuitooltip.h | 34 +- + ukui-qqc2-style/CMakeLists.txt | 13 +- + .../org.ukui.style/ApplicationWindow.qml | 14 +- + ukui-qqc2-style/org.ukui.style/Button.qml | 25 +- + ukui-qqc2-style/org.ukui.style/CheckBox.qml | 63 +- + ukui-qqc2-style/org.ukui.style/CheckDelegate.qml | 194 ++ + ukui-qqc2-style/org.ukui.style/ComboBox.qml | 303 +++- + ukui-qqc2-style/org.ukui.style/ItemDelegate.qml | 85 +- + ukui-qqc2-style/org.ukui.style/Label.qml | 17 +- + ukui-qqc2-style/org.ukui.style/Menu.qml | 471 +++-- + ukui-qqc2-style/org.ukui.style/MenuItem.qml | 135 +- + ukui-qqc2-style/org.ukui.style/Popup.qml | 34 +- + ukui-qqc2-style/org.ukui.style/ProgressBar.qml | 57 +- + ukui-qqc2-style/org.ukui.style/RadioButton.qml | 62 +- + ukui-qqc2-style/org.ukui.style/RadioDelegate.qml | 167 ++ + ukui-qqc2-style/org.ukui.style/RoundButton.qml | 12 +- + ukui-qqc2-style/org.ukui.style/ScrollBar.qml | 31 +- + ukui-qqc2-style/org.ukui.style/Slider.qml | 113 +- + ukui-qqc2-style/org.ukui.style/SpinBox.qml | 89 +- + ukui-qqc2-style/org.ukui.style/Switch.qml | 114 ++ + ukui-qqc2-style/org.ukui.style/SwitchDelegate.qml | 127 ++ + ukui-qqc2-style/org.ukui.style/TabBar.qml | 16 +- + ukui-qqc2-style/org.ukui.style/TabButton.qml | 28 +- + ukui-qqc2-style/org.ukui.style/TextField.qml | 36 +- + ukui-qqc2-style/org.ukui.style/ToolButton.qml | 8 +- + ukui-qqc2-style/org.ukui.style/ToolTip.qml | 127 +- + .../org.ukui.style/private/BackGroundRectangle.qml | 221 +++ + .../private/ButtonIconLabelContent.qml | 247 +++ + .../org.ukui.style/private/IconLabelContent.qml | 234 +++ + .../org.ukui.style/private/NormalControlColor.qml | 73 + + .../org.ukui.style/private/ParseInterface.qml | 72 + + .../org.ukui.style/private/RadiusRectangle.qml | 92 + + ukui-qqc2-style/org.ukui.style/private/qmldir | 5 - + ukui-qqc2-style/org.ukui.style/qmldir | 11 + + ukui-qqc2-style/qml.qrc | 40 +- + ukui-qqc2-style/qml/BackGroundRectangle.qml | 68 - + ukui-qqc2-style/qml/IconLabelContent.qml | 218 --- + ukui-qqc2-style/qml/NormalControlColor.qml | 77 - + ukui-qqc2-style/qml/ParseInterface.qml | 17 - + ukui-qqc2-style/qml/RadiusRectangle.qml | 92 - + ukui-qqc2-style/qmldir | 5 - + ukui-styles/CMakeLists.txt | 2 +- + .../qt5-config-style-ukui/ukui-config-style.cpp | 2 +- + ukui-styles/readconfig.cpp | 23 +- + ukui-styles/readconfig.h | 1 + + 108 files changed, 9489 insertions(+), 2568 deletions(-) + create mode 100644 ukui-qml-style-helper/KyIcon.cpp + create mode 100644 ukui-qml-style-helper/KyIcon.h + create mode 100644 ukui-qml-style-helper/kyquickpadding_p.h + create mode 100644 ukui-qml-style-helper/kyquickstyleitem.cpp + create mode 100644 ukui-qml-style-helper/kyquickstyleitem.h + create mode 100644 ukui-qml-style-helper/kystylehelper.cpp + create mode 100644 ukui-qml-style-helper/kystylehelper.h + delete mode 100644 ukui-qml-style-helper/styleparameter/ appparameter.cpp + create mode 100644 ukui-qml-style-helper/styleparameter/appparameter.cpp + create mode 100644 ukui-qml-style-helper/styleparameter/parsecolorinterface.cpp + create mode 100644 ukui-qml-style-helper/styleparameter/parsecolorinterface.h + delete mode 100644 ukui-qml-style-helper/styleparameter/parsedtcolor.cpp + delete mode 100644 ukui-qml-style-helper/styleparameter/parsedtcolor.h + create mode 100644 ukui-qml-style-helper/styleparameter/ukuipopupwindowhandle.cpp + create mode 100644 ukui-qml-style-helper/styleparameter/ukuipopupwindowhandle.h + create mode 100644 ukui-qml-style-helper/styleparameter/ukuiswitch.cpp + create mode 100644 ukui-qml-style-helper/styleparameter/ukuiswitch.h + create mode 100644 ukui-qqc2-style/org.ukui.style/CheckDelegate.qml + create mode 100644 ukui-qqc2-style/org.ukui.style/RadioDelegate.qml + create mode 100644 ukui-qqc2-style/org.ukui.style/Switch.qml + create mode 100644 ukui-qqc2-style/org.ukui.style/SwitchDelegate.qml + create mode 100644 ukui-qqc2-style/org.ukui.style/private/BackGroundRectangle.qml + create mode 100644 ukui-qqc2-style/org.ukui.style/private/ButtonIconLabelContent.qml + create mode 100644 ukui-qqc2-style/org.ukui.style/private/IconLabelContent.qml + create mode 100644 ukui-qqc2-style/org.ukui.style/private/NormalControlColor.qml + create mode 100644 ukui-qqc2-style/org.ukui.style/private/ParseInterface.qml + create mode 100644 ukui-qqc2-style/org.ukui.style/private/RadiusRectangle.qml + delete mode 100644 ukui-qqc2-style/org.ukui.style/private/qmldir + create mode 100644 ukui-qqc2-style/org.ukui.style/qmldir + delete mode 100644 ukui-qqc2-style/qml/BackGroundRectangle.qml + delete mode 100644 ukui-qqc2-style/qml/IconLabelContent.qml + delete mode 100644 ukui-qqc2-style/qml/NormalControlColor.qml + delete mode 100644 ukui-qqc2-style/qml/ParseInterface.qml + delete mode 100644 ukui-qqc2-style/qml/RadiusRectangle.qml + delete mode 100644 ukui-qqc2-style/qmldir + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cf4d83a..47ef06a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,6 +3,6 @@ add_subdirectory(ukui-styles) + add_subdirectory(libqt5-ukui-style) + add_subdirectory(qt5-ukui-filedialog) + add_subdirectory(qt5-ukui-platformtheme) +-#add_subdirectory(ukui-qqc2-style) +-#add_subdirectory(ukui-qml-style-helper) ++add_subdirectory(ukui-qqc2-style) ++add_subdirectory(ukui-qml-style-helper) + add_subdirectory(test) +diff --git a/libqt5-ukui-style/CMakeLists.txt b/libqt5-ukui-style/CMakeLists.txt +index c7be6c9..f92e286 100644 +--- a/libqt5-ukui-style/CMakeLists.txt ++++ b/libqt5-ukui-style/CMakeLists.txt +@@ -72,7 +72,7 @@ add_definitions(-DQT_MESSAGELOGCONTEXT) + + + if(UNIX) +- set(TARGET_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") ++ set(TARGET_PATH "/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}") + + install(TARGETS ${PROJECT_NAME} DESTINATION ${TARGET_PATH}) + +diff --git a/qt5-ukui-filedialog/CMakeLists.txt b/qt5-ukui-filedialog/CMakeLists.txt +index f6cbdde..c9ba325 100644 +--- a/qt5-ukui-filedialog/CMakeLists.txt ++++ b/qt5-ukui-filedialog/CMakeLists.txt +@@ -171,7 +171,7 @@ add_definitions(-DQT_DEPRECATED_WARNINGS) + add_definitions(-DQT_MESSAGELOGCONTEXT) + + if(UNIX) +- set(TARGET_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/qt5/plugins") ++ set(TARGET_PATH "/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/plugins") + + MESSAGE("libqt5-ukui-filedialog TARGET_PATH: ${TARGET_PATH}") + +diff --git a/qt5-ukui-platformtheme/CMakeLists.txt b/qt5-ukui-platformtheme/CMakeLists.txt +index 469332f..5feb97b 100644 +--- a/qt5-ukui-platformtheme/CMakeLists.txt ++++ b/qt5-ukui-platformtheme/CMakeLists.txt +@@ -164,7 +164,7 @@ add_definitions(-DQT5UKUIPLATFORMTHEME_LIBRARY) + add_definitions(-DQT_DEPRECATED_WARNINGS) + add_definitions(-DQT_MESSAGELOGCONTEXT) + +-set(TARGET_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/qt5/plugins") ++set(TARGET_PATH "/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/plugins") + + set(UKUIPLATFORMTHEME_DIR ${TARGET_PATH}) + target_compile_definitions(${PROJECT_NAME} PRIVATE UKUIPLATFORMTHEME_DIR="${UKUIPLATFORMTHEME_DIR}") +diff --git a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp +index 7898f6e..4f7ef9e 100644 +--- a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp ++++ b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp +@@ -175,7 +175,7 @@ Qt5UKUIPlatformTheme::Qt5UKUIPlatformTheme(const QStringList &args) + // if (QFile::exists(QString("%1/kf5/kirigami/org.kylin.style.so").arg(QT_PLUGIN_INSTALL_DIRS))) { + // QQuickStyle::setStyle("org.kylin.style"); + // } +- if(qApp->inherits("QApplication") == true && qAppName() != "cura") { ++ if((qApp->inherits("QApplication") == true || qApp->inherits("QGuiApplication") == true) && qAppName() != "cura") { + QQuickStyle::setStyle("org.ukui.style"); + } + +@@ -305,14 +305,16 @@ bool Qt5UKUIPlatformTheme::usePlatformNativeDialog(DialogType type) const + { + switch (type) { + case QPlatformTheme::FileDialog: ++ if(qApp->inherits("QApplication")) + return true; + case QPlatformTheme::FontDialog: + case QPlatformTheme::ColorDialog: + return false; + case QPlatformTheme::MessageDialog: ++ if(qApp->inherits("QApplication")) ++ return true; + // if (qAppName() == "ukui-control-center") + // return false; +- return true; + default: + break; + } +@@ -324,7 +326,6 @@ QPlatformDialogHelper *Qt5UKUIPlatformTheme::createPlatformDialogHelper(DialogTy + { + switch (type) { + case QPlatformTheme::FileDialog: +- + if (m_loader && m_loader->instance()) { + return qobject_cast<FileDialogInterface *>(m_loader->instance())->create(); + } +diff --git a/ukui-qml-style-helper/CMakeLists.txt b/ukui-qml-style-helper/CMakeLists.txt +index 22a7717..9eb9c5b 100644 +--- a/ukui-qml-style-helper/CMakeLists.txt ++++ b/ukui-qml-style-helper/CMakeLists.txt +@@ -1,5 +1,5 @@ + cmake_minimum_required(VERSION 3.16) +- ++include(GNUInstallDirs) + project(ukui-qml-style-helper) + + set(CMAKE_AUTOUIC ON) +@@ -17,9 +17,13 @@ find_package(Qt5Quick) + find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + Widgets + DBus ++ X11Extras ++ Gui + ) + find_package(KF5Kirigami2 CONFIG REQUIRED COMPONENTS) + find_package(KF5Config CONFIG REQUIRED COMPONENTS) ++find_package(KF5WindowSystem REQUIRED) ++find_package(KF5Wayland) + + find_package(PkgConfig REQUIRED) + pkg_check_modules(Qsettings REQUIRED gsettings-qt) +@@ -36,33 +40,86 @@ if (FONTCONFIG_FOUND) + endif() + + file(GLOB_RECURSE HEADER_FILES +-# "kyquickpadding_p.h" +-# "KyIcon.h" +-# "kyquickstyleitem.h" +-# "kystylehelper.h" ++ "kyquickpadding_p.h" ++ "KyIcon.h" ++ "kyquickstyleitem.h" ++ "kystylehelper.h" + "qqc2styleplugin.h" +- "styleparameter/*.h" + "../qt5-ukui-platformtheme/platform-theme-fontdata.h" + "../ukui-styles/readconfig.h" ++ "../qt5-ukui-platformtheme/xatom-helper.h" ++ "../../libqt5-ukui-style/settings/ukui-style-settings.h" ++# "styleparameter/tooltip/tooltip.h" ++# "styleparameter/tooltip/shared-qml-engine.h" ++# "styleparameter/tooltip/shared-engine-component.h" ++ "styleparameter/tokenparameter.h" ++ "styleparameter/appparameter.h" ++ "styleparameter/ukuilabel.h" ++ "styleparameter/ukuiprogressbar.h" ++ "styleparameter/ukuiswitch.h" ++ "styleparameter/icon.h" ++ "styleparameter/ukuibutton.h" ++ "styleparameter/ukuimenu.h" ++ "styleparameter/ukuiradiobutton.h" ++ "styleparameter/ukuitabbar.h" ++ "styleparameter/imageprovider.h" ++ "styleparameter/ukuicheckbox.h" ++ "styleparameter/ukuimenuitem.h" ++ "styleparameter/ukuiscrollbar.h" ++ "styleparameter/ukuitabbutton.h" ++ "styleparameter/parsecolorinterface.h" ++ "styleparameter/ukuipopupwindowhandle.h" ++ "styleparameter/ukuipopup.h" ++ "styleparameter/ukuicombobox.h" ++ "styleparameter/ukuislider.h" + ) + file(GLOB_RECURSE SRC_FILES +-# "KyIcon.cpp" +-# "kyquickstyleitem.cpp" +-# "kystylehelper.cpp" ++ "KyIcon.cpp" ++ "kyquickstyleitem.cpp" ++ "kystylehelper.cpp" + "qqc2styleplugin.cpp" +- "styleparameter/*.cpp" + "../qt5-ukui-platformtheme/platform-theme-fontdata.cpp" + "../ukui-styles/readconfig.cpp" ++ "../qt5-ukui-platformtheme/xatom-helper.cpp" ++# "styleparameter/tooltip/tooltip.cpp" ++# "styleparameter/tooltip/shared-qml-engine.cpp" ++# "styleparameter/tooltip/shared-engine-component.cpp" ++ "styleparameter/tokenparameter.cpp" ++ "styleparameter/appparameter.cpp" ++ "styleparameter/ukuilabel.cpp" ++ "styleparameter/ukuiprogressbar.cpp" ++ "styleparameter/ukuiswitch.cpp" ++ "styleparameter/icon.cpp" ++ "styleparameter/ukuibutton.cpp" ++ "styleparameter/ukuimenu.cpp" ++ "styleparameter/ukuiradiobutton.cpp" ++ "styleparameter/ukuitabbar.cpp" ++ "styleparameter/imageprovider.cpp" ++ "styleparameter/ukuicheckbox.cpp" ++ "styleparameter/ukuimenuitem.cpp" ++ "styleparameter/ukuiscrollbar.cpp" ++ "styleparameter/ukuitabbutton.cpp" ++ "styleparameter/ukuicombobox.cpp" ++ "styleparameter/ukuipopup.cpp" ++ "styleparameter/ukuislider.cpp" ++ "styleparameter/ukuitextfiled.cpp" ++ "styleparameter/parsecolorinterface.cpp" ++ "styleparameter/ukuitextfiled.h" ++ "styleparameter/ukuiitemdelegate.cpp" ++ "styleparameter/ukuipopupwindowhandle.cpp" ++ "styleparameter/ukuispinbox.cpp" ++ "styleparameter/ukuitooltip.cpp" + ) + file(GLOB_RECURSE OTHER_FILES qmldir) + + SOURCE_GROUP("Header Files" FILES ${HEADER_FILES}) + SOURCE_GROUP("Source Files" FILES ${SRC_FILES}) + SOURCE_GROUP("other files" FILES ${OTHER_FILES}) ++#set(QRC_FILES qml/qml.qrc) + + include_directories(../libqt5-ukui-style/) + +-add_library(ukui-qml-style-helper MODULE ${HEADER_FILES} ${SRC_FILES} ${OTHER_FILES}) ++add_library(ukui-qml-style-helper MODULE ${HEADER_FILES} ${SRC_FILES} ${OTHER_FILES} #[[${QRC_FILES}]]) + + target_link_libraries(ukui-qml-style-helper PRIVATE + KF5::ConfigCore +@@ -70,18 +127,25 @@ target_link_libraries(ukui-qml-style-helper PRIVATE + Qt5::Quick + Qt5::Widgets + Qt5::DBus ++ Qt5::X11Extras ++ Qt5::Gui ++ Qt::GuiPrivate + gsettings-qt + qt5-ukui-style + glib-2.0 + ${FONTCONFIG_LIBRARIES} + ${EXTERNAL_LIBS} ++ ++ KF5::WindowSystem ++ KF5::WaylandClient + ) + + if(UNIX) +- set(TARGET_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/qt5/qml/org/ukui/qqc2style/private/") ++ set(TARGET_PATH "/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/qml/org/ukui/qqc2style/private/") + + MESSAGE("libukui-qml-style-helper TARGET_PATH: ${TARGET_PATH}") + + install(TARGETS ${PROJECT_NAME} DESTINATION ${TARGET_PATH}) + install(FILES ${OTHER_FILES} DESTINATION "${TARGET_PATH}") ++# install(DIRECTORY "qml" DESTINATION "${TARGET_PATH}") + endif() +diff --git a/ukui-qml-style-helper/KyIcon.cpp b/ukui-qml-style-helper/KyIcon.cpp +new file mode 100644 +index 0000000..037fd51 +--- /dev/null ++++ b/ukui-qml-style-helper/KyIcon.cpp +@@ -0,0 +1,132 @@ ++/* ++ * Qt5-UKUI's Library ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 3 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this library. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Yan Wang <wangyan@kylinos.cn> ++ * ++ */ ++ ++#include "KyIcon.h" ++#include <QStyleOption> ++#include <QStyle> ++#include <QPainter> ++#include <QApplication> ++#include "effects/highlight-effect.h" ++#include <QGSettings/QGSettings> ++ ++QStyle *KyIcon::style() ++{ ++ return qApp->style(); ++} ++ ++KyIcon::KyIcon(QQuickPaintedItem *parent) ++ : QQuickPaintedItem(parent), ++ m_hover(false), ++ m_selected(false), ++ m_focus(false), ++ m_active(true), ++ m_sunken(false), ++ m_on(false), ++ m_icontype("default") ++{ ++ if (QGSettings::isSchemaInstalled("org.ukui.style")) { ++ QGSettings* styleSettings = new QGSettings("org.ukui.style", QByteArray(), this); ++ connect(styleSettings, &QGSettings::changed, this, [&](){ ++ emit hoverChanged(); ++ emit selectedChanged(); ++ emit hasFocusChanged(); ++ emit activeChanged(); ++ emit sunkenChanged(); ++ emit onChanged(); ++ emit icontypeChanged(); ++ emit iconNameChanged(); ++ update(); ++ }); ++ } ++ connect(this, &KyIcon::iconNameChanged, this, &KyIcon::updateItem); ++ connect(this, &KyIcon::hoverChanged, this, &KyIcon::updateItem); ++ connect(this, &KyIcon::selectedChanged, this, &KyIcon::updateItem); ++ connect(this, &KyIcon::hasFocusChanged, this, &KyIcon::updateItem); ++ connect(this, &KyIcon::activeChanged, this, &KyIcon::updateItem); ++ connect(this, &KyIcon::sunkenChanged, this, &KyIcon::updateItem); ++ connect(this, &KyIcon::onChanged, this, &KyIcon::updateItem); ++ connect(this, &KyIcon::icontypeChanged, this, &KyIcon::updateItem); ++ ++ ++} ++ ++ ++void KyIcon::setIcon(const QIcon &icon) ++{ ++ m_icon = icon; ++} ++ ++void KyIcon::setIconName(const QString &iconName) ++{ ++ m_iconName = iconName; ++ if(!QIcon::hasThemeIcon(m_iconName)) ++ { ++ m_icon = QIcon(); ++ qWarning() << "未找到名为 " << m_iconName << " 的图标!"; ++ return; ++ } ++ m_icon = QIcon::fromTheme(m_iconName); ++ emit iconNameChanged(); ++} ++ ++void KyIcon::paint(QPainter *painter) ++{ ++ ++ if(m_icon.isNull()) ++ return; ++ QWidget wid; ++ QStyleOption opt; ++ opt.state = {}; ++ if (isEnabled()) { ++ opt.state |= QStyle::State_Enabled; ++ } ++ if (m_hover) ++ opt.state |= QStyle::State_MouseOver; ++ if (m_selected) ++ opt.state |= QStyle::State_Selected; ++ if (m_focus) ++ opt.state |= QStyle::State_HasFocus; ++ if (m_active) ++ opt.state |= QStyle::State_Active; ++ if (m_sunken) ++ opt.state |= QStyle::State_Sunken; ++ if (m_on) ++ opt.state |= QStyle::State_On; ++ ++ QPixmap pixmap = m_icon.pixmap(QSize(width(), height())); ++ ++ if (m_icontype == "ordinary") { ++ pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, &opt, &wid); /* 主题切换做处理*/ ++ } ++ if (m_icontype == "hover") { ++ pixmap = HighLightEffect::hoverGeneratePixmap(pixmap, &opt, &wid); /* 选中点击做处理*/ ++ } ++ if (m_icontype == "filledSymbolicColor") { ++ pixmap = HighLightEffect::filledSymbolicColoredGeneratePixmap(pixmap, &opt, &wid); /* 非纯色图标主题切换且选中点击做处理*/ ++ } ++ else if (m_icontype == "default") { ++ pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, &opt, &wid); /* 主题切换且选中点击做处理*/ ++ } ++ ++ KyIcon::style()->drawItemPixmap(painter, boundingRect().toRect(), Qt::AlignCenter,pixmap); ++ ++} +diff --git a/ukui-qml-style-helper/KyIcon.h b/ukui-qml-style-helper/KyIcon.h +new file mode 100644 +index 0000000..de004e5 +--- /dev/null ++++ b/ukui-qml-style-helper/KyIcon.h +@@ -0,0 +1,114 @@ ++/* ++ * Qt5-UKUI's Library ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 3 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this library. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Yan Wang <wangyan@kylinos.cn> ++ * ++ */ ++ ++#ifndef KYICON_H ++#define KYICON_H ++#include <QQuickPaintedItem> ++#include <QIcon> ++#include <QStyle> ++#include <QPointer> ++ ++class QStyle; ++class KyIcon : public QQuickPaintedItem ++{ ++ Q_OBJECT ++ Q_PROPERTY(QString iconName READ iconName WRITE setIconName NOTIFY iconNameChanged) ++ Q_PROPERTY(QIcon icon READ icon WRITE setIcon) ++ Q_PROPERTY( bool hover READ hover WRITE setHover NOTIFY hoverChanged) ++ Q_PROPERTY( bool selected READ selected WRITE setSelected NOTIFY selectedChanged) ++ Q_PROPERTY( bool hasFocus READ hasFocus WRITE sethasFocus NOTIFY hasFocusChanged) ++ Q_PROPERTY( bool active READ active WRITE setActive NOTIFY activeChanged) ++ Q_PROPERTY( bool sunken READ sunken WRITE setSunken NOTIFY sunkenChanged) ++ Q_PROPERTY( bool on READ on WRITE setOn NOTIFY onChanged) ++ Q_PROPERTY( QString icontype READ icontype WRITE seticontype NOTIFY icontypeChanged) ++ ++ ++public: ++ KyIcon(QQuickPaintedItem *parent = nullptr); ++ ++ QIcon icon() { return m_icon; } ++ void setIcon(const QIcon &icon); ++ QString iconName(){ return m_iconName; } ++ void setIconName(const QString &iconName); ++ ++ bool hover() const { return m_hover; } ++ void setHover(bool hover) { if (m_hover != hover) {m_hover = hover ; emit hoverChanged();}} ++ ++ bool selected() const { return m_selected; } ++ void setSelected(bool selected) { ++ if (m_selected!= selected) { ++ m_selected = selected; ++ emit selectedChanged(); ++ } ++ } ++ ++ bool hasFocus() const { return m_focus; } ++ void sethasFocus(bool focus) { if (m_focus != focus) {m_focus = focus; emit hasFocusChanged();}} ++ ++ bool active() const { return m_active; } ++ void setActive(bool active) { if (m_active!= active) {m_active = active; emit activeChanged();}} ++ ++ bool sunken() const { return m_sunken; } ++ void setSunken(bool sunken) { if (m_sunken != sunken) {m_sunken = sunken; emit sunkenChanged();}} ++ ++ bool on() const { return m_on; } ++ void setOn(bool on) { if (m_on != on) {m_on = on ; emit onChanged();}} ++ ++ QString icontype() const { return m_icontype;} ++ void seticontype(QString icontype) { ++ m_icontype = icontype ; ++ emit icontypeChanged(); ++ } ++ ++ void paint(QPainter *painter); ++ ++ static QStyle *style(); ++ ++public Q_SLOTS: ++ void updateItem(){update();} ++ ++Q_SIGNALS: ++ void hoverChanged(); ++ void selectedChanged(); ++ void hasFocusChanged(); ++ void activeChanged(); ++ void sunkenChanged(); ++ void onChanged(); ++ void icontypeChanged(); ++ void iconNameChanged(); ++ ++protected: ++ bool m_hover; ++ bool m_selected; ++ bool m_focus; ++ bool m_active; ++ bool m_sunken; ++ bool m_on; ++ QString m_icontype; ++ ++private: ++ QIcon m_icon; ++ QString m_iconName; ++ ++}; ++ ++#endif // KYICON_H +diff --git a/ukui-qml-style-helper/kyquickpadding_p.h b/ukui-qml-style-helper/kyquickpadding_p.h +new file mode 100644 +index 0000000..774cfe5 +--- /dev/null ++++ b/ukui-qml-style-helper/kyquickpadding_p.h +@@ -0,0 +1,69 @@ ++/* ++ * Qt5-UKUI's Library ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 3 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this library. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Yan Wang <wangyan@kylinos.cn> ++ * ++ */ ++ ++#ifndef KYQUICKPADDING_P_H ++#define KYQUICKPADDING_P_H ++ ++#include <qobject.h> ++ ++class KyQuickPadding : public QObject ++{ ++ Q_OBJECT ++ ++ Q_PROPERTY(int left READ left WRITE setLeft NOTIFY leftChanged) ++ Q_PROPERTY(int top READ top WRITE setTop NOTIFY topChanged) ++ Q_PROPERTY(int right READ right WRITE setRight NOTIFY rightChanged) ++ Q_PROPERTY(int bottom READ bottom WRITE setBottom NOTIFY bottomChanged) ++ ++ int m_left; ++ int m_top; ++ int m_right; ++ int m_bottom; ++ ++public: ++ KyQuickPadding(QObject *parent = nullptr) : ++ QObject(parent), ++ m_left(0), ++ m_top(0), ++ m_right(0), ++ m_bottom(0) {} ++ ++ int left() const { return m_left; } ++ int top() const { return m_top; } ++ int right() const { return m_right; } ++ int bottom() const { return m_bottom; } ++ ++public Q_SLOTS: ++ void setLeft(int arg) { if (m_left != arg) {m_left = arg; emit leftChanged();}} ++ void setTop(int arg) { if (m_top != arg) {m_top = arg; emit topChanged();}} ++ void setRight(int arg) { if (m_right != arg) {m_right = arg; emit rightChanged();}} ++ void setBottom(int arg) {if (m_bottom != arg) {m_bottom = arg; emit bottomChanged();}} ++ ++Q_SIGNALS: ++ void leftChanged(); ++ void topChanged(); ++ void rightChanged(); ++ void bottomChanged(); ++}; ++ ++ ++#endif // KYQUICKPADDING_P_H +diff --git a/ukui-qml-style-helper/kyquickstyleitem.cpp b/ukui-qml-style-helper/kyquickstyleitem.cpp +new file mode 100644 +index 0000000..37a86a2 +--- /dev/null ++++ b/ukui-qml-style-helper/kyquickstyleitem.cpp +@@ -0,0 +1,1908 @@ ++/* ++ * Qt5-UKUI's Library ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 3 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this library. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Yan Wang <wangyan@kylinos.cn> ++ * ++ */ ++ ++#include "kyquickstyleitem.h" ++ ++#include <QStyle> ++#include <QStyleFactory> ++#include <QStyleOption> ++#include <QApplication> ++#include <QSGNinePatchNode> ++#include <QPainter> ++#include <QPixmapCache> ++#include <QStringBuilder> ++#include <QQuickWindow> ++ ++#include <KSharedConfig> ++#include <KConfigGroup> ++#include <QGSettings/QGSettings> ++#include <QApplication> ++ ++ ++QStyle *KyQuickStyleItem::s_style = nullptr; ++ ++QStyle *KyQuickStyleItem::style() ++{ ++ auto style = qApp->style(); ++ return style ? style : s_style; ++} ++ ++KyQuickStyleItem::KyQuickStyleItem(QQuickItem *parent) ++ : QQuickItem(parent), ++ m_styleoption(nullptr), ++ m_itemType(Undefined), ++ m_sunken(false), ++ m_raised(false), ++ m_active(true), ++ m_selected(false), ++ m_focus(false), ++ m_hover(false), ++ m_on(false), ++ m_horizontal(true), ++ m_transient(false), ++ m_sharedWidget(false), ++ m_minimum(0), ++ m_maximum(100), ++ m_value(0), ++ m_step(0), ++ m_paintMargins(0), ++ m_contentWidth(0), ++ m_contentHeight(0), ++ m_textureWidth(0), ++ m_textureHeight(0), ++ m_lastFocusReason(Qt::NoFocusReason) ++{ ++ // There is no styleChanged signal and QApplication sends QEvent::StyleChange only to all QWidgets ++ if (qApp->style()) { ++ connect(qApp->style(), &QObject::destroyed, this, &KyQuickStyleItem::styleChanged); ++ } else { ++ KSharedConfig::Ptr kdeglobals = KSharedConfig::openConfig(); ++ KConfigGroup cg(kdeglobals, "KDE"); ++ auto style = s_style; ++ s_style = QStyleFactory::create(cg.readEntry("widgetStyle", QStringLiteral("Fusion"))); ++ if (style) { ++ delete style; ++ } ++ } ++ ++ if (QGSettings::isSchemaInstalled("org.ukui.style")) { ++ QGSettings* styleSettings = new QGSettings("org.ukui.style", QByteArray(), this); ++ connect(styleSettings, &QGSettings::changed, this, [&](const QString &key){ ++ if (key == "systemFontSize" || key == "systemFont") { ++ emit fontChanged(); ++ updatePolish(); ++ } ++ if (key == "iconThemeName"){ ++ polish(); ++ } ++ }); ++ } ++ ++ m_font = qApp->font(); ++ setFlag(QQuickItem::ItemHasContents, true); ++ setSmooth(false); ++ ++ connect(this, &KyQuickStyleItem::visibleChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::widthChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::heightChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::enabledChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::infoChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::onChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::selectedChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::activeChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::textChanged, this, &KyQuickStyleItem::updateSizeHint); ++ connect(this, &KyQuickStyleItem::textChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::activeChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::raisedChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::sunkenChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::hoverChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::maximumChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::minimumChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::valueChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::horizontalChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::transientChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::activeControlChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::hasFocusChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::activeControlChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::hintChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::propertiesChanged, this, &KyQuickStyleItem::updateSizeHint); ++ connect(this, &KyQuickStyleItem::propertiesChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::elementTypeChanged, this, &KyQuickStyleItem::updateItem); ++ connect(this, &KyQuickStyleItem::contentWidthChanged, this, &KyQuickStyleItem::updateSizeHint); ++ connect(this, &KyQuickStyleItem::contentHeightChanged, this, &KyQuickStyleItem::updateSizeHint); ++ connect(this, &KyQuickStyleItem::widthChanged, this, &KyQuickStyleItem::updateRect); ++ connect(this, &KyQuickStyleItem::heightChanged, this, &KyQuickStyleItem::updateRect); ++ ++ connect(this, &KyQuickStyleItem::heightChanged, this, &KyQuickStyleItem::updateBaselineOffset); ++ connect(this, &KyQuickStyleItem::contentHeightChanged, this, &KyQuickStyleItem::updateBaselineOffset); ++ ++ connect(qApp, &QApplication::fontChanged, this, &KyQuickStyleItem::updateSizeHint, Qt::QueuedConnection); ++} ++ ++KyQuickStyleItem::~KyQuickStyleItem() ++{ ++ if (const QStyleOptionButton *aux = qstyleoption_cast<const QStyleOptionButton*>(m_styleoption)) ++ delete aux; ++ else if (const QStyleOptionViewItem *aux = qstyleoption_cast<const QStyleOptionViewItem*>(m_styleoption)) ++ delete aux; ++ else if (const QStyleOptionHeader *aux = qstyleoption_cast<const QStyleOptionHeader*>(m_styleoption)) ++ delete aux; ++ else if (const QStyleOptionToolButton *aux = qstyleoption_cast<const QStyleOptionToolButton*>(m_styleoption)) ++ delete aux; ++ else if (const QStyleOptionToolBar *aux = qstyleoption_cast<const QStyleOptionToolBar*>(m_styleoption)) ++ delete aux; ++ else if (const QStyleOptionTab *aux = qstyleoption_cast<const QStyleOptionTab*>(m_styleoption)) ++ delete aux; ++ else if (const QStyleOptionFrame *aux = qstyleoption_cast<const QStyleOptionFrame*>(m_styleoption)) ++ delete aux; ++ else if (const QStyleOptionFocusRect *aux = qstyleoption_cast<const QStyleOptionFocusRect*>(m_styleoption)) ++ delete aux; ++ else if (const QStyleOptionTabWidgetFrame *aux = qstyleoption_cast<const QStyleOptionTabWidgetFrame*>(m_styleoption)) ++ delete aux; ++ else if (const QStyleOptionMenuItem *aux = qstyleoption_cast<const QStyleOptionMenuItem*>(m_styleoption)) ++ delete aux; ++ else if (const QStyleOptionComboBox *aux = qstyleoption_cast<const QStyleOptionComboBox*>(m_styleoption)) ++ delete aux; ++ else if (const QStyleOptionSpinBox *aux = qstyleoption_cast<const QStyleOptionSpinBox*>(m_styleoption)) ++ delete aux; ++ else if (const QStyleOptionSlider *aux = qstyleoption_cast<const QStyleOptionSlider*>(m_styleoption)) ++ delete aux; ++ else if (const QStyleOptionProgressBar *aux = qstyleoption_cast<const QStyleOptionProgressBar*>(m_styleoption)) ++ delete aux; ++ else if (const QStyleOptionGroupBox *aux = qstyleoption_cast<const QStyleOptionGroupBox*>(m_styleoption)) ++ delete aux; ++ else ++ delete m_styleoption; ++ ++ m_styleoption = nullptr; ++} ++ ++void KyQuickStyleItem::initStyleOption() ++{ ++ if (m_styleoption) ++ m_styleoption->state = {}; ++ ++ QString sizeHint = m_hints.value(QStringLiteral("size")).toString(); ++ ++ bool needsResolvePalette = true; ++ update(); ++ ++ switch (m_itemType) { ++ case Button: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionButton(); ++ ++ QStyleOptionButton *opt = qstyleoption_cast<QStyleOptionButton*>(m_styleoption); ++ opt->text = text(); ++ ++ const QVariant icon = m_properties[QStringLiteral("icon")]; ++ if (icon.canConvert<QIcon>()) { ++ opt->icon = icon.value<QIcon>(); ++ } else if (icon.canConvert<QUrl>() && icon.value<QUrl>().isLocalFile()) { ++ opt->icon = QIcon(icon.value<QUrl>().toLocalFile()); ++ } else if (icon.canConvert<QString>()) { ++ opt->icon = QIcon::fromTheme(icon.value<QString>()); ++ } ++ auto iconSize = QSize(m_properties[QStringLiteral("iconWidth")].toInt(), ++ m_properties[QStringLiteral("iconHeight")].toInt()); ++ if (iconSize.isEmpty()) { ++ int e = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_ButtonIconSize, m_styleoption, nullptr); ++ if (iconSize.width() <= 0) { ++ iconSize.setWidth(e); ++ } ++ if (iconSize.height() <= 0) { ++ iconSize.setHeight(e); ++ } ++ } ++ opt->iconSize = iconSize; ++ opt->features = activeControl() == QLatin1String("default") ? ++ QStyleOptionButton::DefaultButton : ++ QStyleOptionButton::None; ++ if (m_properties[QStringLiteral("flat")].toBool()) { ++ opt->features |= QStyleOptionButton::Flat; ++ } ++ const QFont font = qApp->font("QPushButton"); ++ opt->fontMetrics = QFontMetrics(font); ++ QObject * menu = m_properties[QStringLiteral("menu")].value<QObject *>(); ++ if (menu) { ++ opt->features |= QStyleOptionButton::HasMenu; ++ } ++ } ++ break; ++ case ItemRow: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionViewItem(); ++ ++ QStyleOptionViewItem *opt = qstyleoption_cast<QStyleOptionViewItem*>(m_styleoption); ++ opt->features = {}; ++ if (activeControl() == QLatin1String("alternate")) ++ opt->features |= QStyleOptionViewItem::Alternate; ++ } ++ break; ++ ++ case Splitter: { ++ if (!m_styleoption) { ++ m_styleoption = new QStyleOption; ++ } ++ } ++ break; ++ ++ case Item: { ++ if (!m_styleoption) { ++ m_styleoption = new QStyleOptionViewItem(); ++ } ++ QStyleOptionViewItem *opt = qstyleoption_cast<QStyleOptionViewItem*>(m_styleoption); ++ opt->features = QStyleOptionViewItem::HasDisplay; ++ opt->text = text(); ++ opt->textElideMode = Qt::ElideRight; ++ opt->displayAlignment = Qt::AlignLeft | Qt::AlignVCenter; ++ opt->decorationAlignment = Qt::AlignCenter; ++ resolvePalette(); ++ needsResolvePalette = false; ++ QPalette pal = m_styleoption->palette; ++ pal.setBrush(QPalette::Base, Qt::NoBrush); ++ m_styleoption->palette = pal; ++ const QFont font = qApp->font("QAbstractItemView"); ++ opt->font = font; ++ opt->fontMetrics = QFontMetrics(font); ++ break; ++ } ++ case ItemBranchIndicator: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOption; ++ ++ m_styleoption->state = QStyle::State_Item; // We don't want to fully support Win 95 ++ if (m_properties.value(QStringLiteral("hasChildren")).toBool()) ++ m_styleoption->state |= QStyle::State_Children; ++ if (m_properties.value(QStringLiteral("hasSibling")).toBool()) // Even this one could go away ++ m_styleoption->state |= QStyle::State_Sibling; ++ if (m_on) ++ m_styleoption->state |= QStyle::State_Open; ++ } ++ break; ++ case Header: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionHeader(); ++ ++ QStyleOptionHeader *opt = qstyleoption_cast<QStyleOptionHeader*>(m_styleoption); ++ opt->text = text(); ++ opt->textAlignment = static_cast<Qt::AlignmentFlag>(m_properties.value(QStringLiteral("textalignment")).toInt()); ++ opt->sortIndicator = activeControl() == QLatin1String("down") ? ++ QStyleOptionHeader::SortDown ++ : activeControl() == QLatin1String("up") ? ++ QStyleOptionHeader::SortUp : QStyleOptionHeader::None; ++ QString headerpos = m_properties.value(QStringLiteral("headerpos")).toString(); ++ if (headerpos == QLatin1String("beginning")) ++ opt->position = QStyleOptionHeader::Beginning; ++ else if (headerpos == QLatin1String("end")) ++ opt->position = QStyleOptionHeader::End; ++ else if (headerpos == QLatin1String("only")) ++ opt->position = QStyleOptionHeader::OnlyOneSection; ++ else ++ opt->position = QStyleOptionHeader::Middle; ++ ++ const QFont font = qApp->font("QHeaderView"); ++ opt->fontMetrics = QFontMetrics(font); ++ } ++ break; ++ case ToolButton: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionToolButton(); ++ ++ QStyleOptionToolButton *opt = ++ qstyleoption_cast<QStyleOptionToolButton*>(m_styleoption); ++ opt->subControls = QStyle::SC_ToolButton; ++ opt->state |= QStyle::State_AutoRaise; ++ opt->activeSubControls = QStyle::SC_ToolButton; ++ opt->text = text(); ++ ++ const QVariant icon = m_properties[QStringLiteral("icon")]; ++ if (icon.canConvert<QIcon>()) { ++ opt->icon = icon.value<QIcon>(); ++ } else if (icon.canConvert<QUrl>() && icon.value<QUrl>().isLocalFile()) { ++ opt->icon = QIcon(icon.value<QUrl>().toLocalFile()); ++ } else if (icon.canConvert<QString>()) { ++ opt->icon = QIcon::fromTheme(icon.value<QString>()); ++ } ++ auto iconSize = QSize(m_properties[QStringLiteral("iconWidth")].toInt(), ++ m_properties[QStringLiteral("iconHeight")].toInt()); ++ if (iconSize.isEmpty()) { ++ int e = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_ToolBarIconSize, m_styleoption, nullptr); ++ if (iconSize.width() <= 0) { ++ iconSize.setWidth(e); ++ } ++ if (iconSize.height() <= 0) { ++ iconSize.setHeight(e); ++ } ++ } ++ opt->iconSize = iconSize; ++ ++ if (m_properties.value(QStringLiteral("menu")).toBool()) { ++ opt->subControls |= QStyle::SC_ToolButtonMenu; ++ opt->features = QStyleOptionToolButton::HasMenu; ++ } ++ ++ const int toolButtonStyle = m_properties.value(QStringLiteral("toolButtonStyle")).toInt(); ++ ++ switch (toolButtonStyle) { ++ case Qt::ToolButtonIconOnly: ++ case Qt::ToolButtonTextOnly: ++ case Qt::ToolButtonTextBesideIcon: ++ case Qt::ToolButtonTextUnderIcon: ++ case Qt::ToolButtonFollowStyle: ++ opt->toolButtonStyle = (Qt::ToolButtonStyle)toolButtonStyle; ++ break; ++ default: ++ opt->toolButtonStyle = Qt::ToolButtonFollowStyle; ++ } ++ ++ const QFont font = qApp->font("QToolButton"); ++ opt->font = font; ++ opt->fontMetrics = QFontMetrics(font); ++ } ++ break; ++ case ToolBar: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionToolBar(); ++ } ++ break; ++ case Tab: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionTab(); ++ ++ QStyleOptionTab *opt = qstyleoption_cast<QStyleOptionTab*>(m_styleoption); ++ opt->text = text(); ++ ++ const QVariant icon = m_properties[QStringLiteral("icon")]; ++ if (icon.canConvert<QIcon>()) { ++ opt->icon = icon.value<QIcon>(); ++ } else if (icon.canConvert<QUrl>() && icon.value<QUrl>().isLocalFile()) { ++ opt->icon = QIcon(icon.value<QUrl>().toLocalFile()); ++ } else if (icon.canConvert<QString>()) { ++ opt->icon = QIcon::fromTheme(icon.value<QString>()); ++ } ++ auto iconSize = QSize(m_properties[QStringLiteral("iconWidth")].toInt(), ++ m_properties[QStringLiteral("iconHeight")].toInt()); ++ if (iconSize.isEmpty()) { ++ int e = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_ButtonIconSize, m_styleoption, nullptr); ++ if (iconSize.width() <= 0) { ++ iconSize.setWidth(e); ++ } ++ if (iconSize.height() <= 0) { ++ iconSize.setHeight(e); ++ } ++ } ++ opt->iconSize = iconSize; ++ ++ if (m_properties.value(QStringLiteral("hasFrame")).toBool()) ++ opt->features |= QStyleOptionTab::HasFrame; ++ ++ QString orientation = m_properties.value(QStringLiteral("orientation")).toString(); ++ QString position = m_properties.value(QStringLiteral("tabpos")).toString(); ++ QString selectedPosition = m_properties.value(QStringLiteral("selectedpos")).toString(); ++ ++ opt->shape = orientation == QLatin1String("Bottom") ? QTabBar::RoundedSouth : QTabBar::RoundedNorth; ++ if (position == QLatin1String("beginning")) ++ opt->position = QStyleOptionTab::Beginning; ++ else if (position == QLatin1String("end")) ++ opt->position = QStyleOptionTab::End; ++ else if (position == QLatin1String("only")) ++ opt->position = QStyleOptionTab::OnlyOneTab; ++ else ++ opt->position = QStyleOptionTab::Middle; ++ ++ if (selectedPosition == QLatin1String("next")) ++ opt->selectedPosition = QStyleOptionTab::NextIsSelected; ++ else if (selectedPosition == QLatin1String("previous")) ++ opt->selectedPosition = QStyleOptionTab::PreviousIsSelected; ++ else ++ opt->selectedPosition = QStyleOptionTab::NotAdjacent; ++ ++ ++ } break; ++ ++ case Frame: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionFrame(); ++ ++ QStyleOptionFrame *opt = qstyleoption_cast<QStyleOptionFrame*>(m_styleoption); ++ opt->frameShape = QFrame::StyledPanel; ++ opt->lineWidth = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption, nullptr); ++ opt->midLineWidth = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption, nullptr); ++ } ++ break; ++ case FocusRect: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionFocusRect(); ++ // Needed on windows ++ m_styleoption->state |= QStyle::State_KeyboardFocusChange; ++ } ++ break; ++ case TabFrame: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionTabWidgetFrame(); ++ QStyleOptionTabWidgetFrame *opt = qstyleoption_cast<QStyleOptionTabWidgetFrame*>(m_styleoption); ++ ++ opt->selectedTabRect = m_properties[QStringLiteral("selectedTabRect")].toRect(); ++ opt->shape = m_properties[QStringLiteral("orientation")] == Qt::BottomEdge ? QTabBar::RoundedSouth : QTabBar::RoundedNorth; ++ if (minimum()) ++ opt->selectedTabRect = QRect(value(), 0, minimum(), height()); ++ opt->tabBarSize = QSize(minimum() , height()); ++ // oxygen style needs this hack ++ opt->leftCornerWidgetSize = QSize(value(), 0); ++ } ++ break; ++ case MenuBar: ++ if (!m_styleoption) { ++ QStyleOptionMenuItem *menuOpt = new QStyleOptionMenuItem(); ++ menuOpt->menuItemType = QStyleOptionMenuItem::EmptyArea; ++ m_styleoption = menuOpt; ++ } ++ ++ break; ++ case MenuBarItem: ++ { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionMenuItem(); ++ ++ QStyleOptionMenuItem *opt = qstyleoption_cast<QStyleOptionMenuItem*>(m_styleoption); ++ opt->text = text(); ++ opt->menuItemType = QStyleOptionMenuItem::Normal; ++ setProperty("_q_showUnderlined", m_hints[QStringLiteral("showUnderlined")].toBool()); ++ ++ const QFont font = qApp->font("QMenuBar"); ++ opt->font = font; ++ opt->fontMetrics = QFontMetrics(font); ++ m_font = opt->font; ++ } ++ break; ++ case Menu: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionMenuItem(); ++ } ++ break; ++ case MenuItem: ++ case ComboBoxItem: ++ { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionMenuItem(); ++ ++ QStyleOptionMenuItem *opt = qstyleoption_cast<QStyleOptionMenuItem*>(m_styleoption); ++ // For GTK style. See below, in setElementType() ++ setProperty("_q_isComboBoxPopupItem", m_itemType == ComboBoxItem); ++ ++ KyQuickStyleItem::MenuItemType type = ++ static_cast<KyQuickStyleItem::MenuItemType>(m_properties[QStringLiteral("type")].toInt()); ++ if (type == KyQuickStyleItem::ScrollIndicatorType) { ++ int scrollerDirection = m_properties[QStringLiteral("scrollerDirection")].toInt(); ++ opt->menuItemType = QStyleOptionMenuItem::Scroller; ++ opt->state |= scrollerDirection == Qt::UpArrow ? ++ QStyle::State_UpArrow : QStyle::State_DownArrow; ++ } else if (type == KyQuickStyleItem::SeparatorType) { ++ opt->menuItemType = QStyleOptionMenuItem::Separator; ++ } else { ++ opt->text = text(); ++ ++ if (type == KyQuickStyleItem::MenuType) { ++ opt->menuItemType = QStyleOptionMenuItem::SubMenu; ++ } else { ++ opt->menuItemType = QStyleOptionMenuItem::Normal; ++ ++ QString shortcut = m_properties[QStringLiteral("shortcut")].toString(); ++ if (!shortcut.isEmpty()) { ++ opt->text += QLatin1Char('\t') + shortcut; ++ opt->tabWidth = qMax(opt->tabWidth, qRound(textWidth(shortcut))); ++ } ++ ++ if (m_properties[QStringLiteral("checkable")].toBool()) { ++ opt->checked = on(); ++ QVariant exclusive = m_properties[QStringLiteral("exclusive")]; ++ opt->checkType = exclusive.toBool() ? QStyleOptionMenuItem::Exclusive : ++ QStyleOptionMenuItem::NonExclusive; ++ } ++ } ++ if (m_properties[QStringLiteral("icon")].canConvert<QIcon>()) ++ opt->icon = m_properties[QStringLiteral("icon")].value<QIcon>(); ++ setProperty("_q_showUnderlined", m_hints[QStringLiteral("showUnderlined")].toBool()); ++ ++ const QFont font = qApp->font(m_itemType == ComboBoxItem ?"QComboMenuItem" : "QMenu"); ++ opt->font = font; ++ opt->fontMetrics = QFontMetrics(font); ++ m_font = opt->font; ++ } ++ } ++ break; ++ case CheckBox: ++ case RadioButton: ++ { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionButton(); ++ ++ QStyleOptionButton *opt = qstyleoption_cast<QStyleOptionButton*>(m_styleoption); ++ if (!on()) ++ opt->state |= QStyle::State_Off; ++ if (m_properties.value(QStringLiteral("partiallyChecked")).toBool()) ++ opt->state |= QStyle::State_NoChange; ++ opt->text = text(); ++ } ++ break; ++ case Edit: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionFrame(); ++ ++ QStyleOptionFrame *opt = qstyleoption_cast<QStyleOptionFrame*>(m_styleoption); ++ opt->lineWidth = qMax(1, KyQuickStyleItem::style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption, nullptr)); //this must be non zero ++ } ++ break; ++ case ComboBox :{ ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionComboBox(); ++ ++ QStyleOptionComboBox *opt = qstyleoption_cast<QStyleOptionComboBox*>(m_styleoption); ++ ++ const QFont font = qApp->font("QPushButton"); //DAVE - QQC1 code does this, but if you look at QComboBox this doesn't make sense ++ opt->fontMetrics = QFontMetrics(font); ++ opt->currentText = text(); ++ opt->editable = m_properties[QStringLiteral("editable")].toBool(); ++ ++ const QVariant icon = m_properties[QStringLiteral("currentIcon")]; ++ if (icon.canConvert<QIcon>()) { ++ opt->currentIcon = icon.value<QIcon>(); ++ } else if (icon.canConvert<QString>()) { ++ opt->currentIcon = QIcon::fromTheme(icon.value<QString>()); ++ } ++ auto iconSize = QSize(m_properties[QStringLiteral("iconWidth")].toInt(), ++ m_properties[QStringLiteral("iconHeight")].toInt()); ++ if (iconSize.isEmpty()) { ++ int e = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_ButtonIconSize, m_styleoption, nullptr); ++ if (iconSize.width() <= 0) { ++ iconSize.setWidth(e); ++ } ++ if (iconSize.height() <= 0) { ++ iconSize.setHeight(e); ++ } ++ } ++ opt->iconSize = iconSize; ++ } ++ break; ++ case SpinBox: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionSpinBox(); ++ ++ QStyleOptionSpinBox *opt = qstyleoption_cast<QStyleOptionSpinBox*>(m_styleoption); ++ opt->frame = true; ++ opt->subControls = QStyle::SC_SpinBoxFrame | QStyle::SC_SpinBoxEditField; ++ if (value() & 0x1) ++ opt->activeSubControls = QStyle::SC_SpinBoxUp; ++ else if (value() & (1<<1)) ++ opt->activeSubControls = QStyle::SC_SpinBoxDown; ++ opt->subControls = QStyle::SC_All; ++ opt->stepEnabled = {}; ++ if (value() & (1<<2)) ++ opt->stepEnabled |= QAbstractSpinBox::StepUpEnabled; ++ if (value() & (1<<3)) ++ opt->stepEnabled |= QAbstractSpinBox::StepDownEnabled; ++ } ++ break; ++ case Slider: ++ case Dial: ++ { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionSlider(); ++ ++ QStyleOptionSlider *opt = qstyleoption_cast<QStyleOptionSlider*>(m_styleoption); ++ opt->orientation = horizontal() ? Qt::Horizontal : Qt::Vertical; ++ opt->upsideDown = !horizontal(); ++ ++ int min = minimum(); ++ int max = std::max(min, maximum()); ++ ++ opt->minimum = min; ++ opt->maximum = max; ++ opt->sliderPosition = value(); ++ opt->singleStep = step(); ++ ++ if (opt->singleStep) { ++ qreal numOfSteps = (opt->maximum - opt->minimum) / opt->singleStep; ++ // at least 5 pixels between tick marks ++ qreal extent = horizontal() ? width() : height(); ++ if (numOfSteps && (extent / numOfSteps < 5)) ++ opt->tickInterval = qRound((5 * numOfSteps / extent) + 0.5) * step(); ++ else ++ opt->tickInterval = opt->singleStep; ++ ++ } else // default Qt-components implementation ++ opt->tickInterval = opt->maximum != opt->minimum ? 1200 / (opt->maximum - opt->minimum) : 0; ++ ++ opt->sliderValue = value(); ++ opt->subControls = QStyle::SC_SliderGroove | QStyle::SC_SliderHandle; ++ opt->tickPosition = activeControl() == QLatin1String("ticks") ? ++ QSlider::TicksBelow : QSlider::NoTicks; ++ if (opt->tickPosition != QSlider::NoTicks) ++ opt->subControls |= QStyle::SC_SliderTickmarks; ++ ++ opt->activeSubControls = QStyle::SC_SliderHandle; ++ } ++ break; ++ case ProgressBar: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionProgressBar(); ++ ++ QStyleOptionProgressBar *opt = qstyleoption_cast<QStyleOptionProgressBar*>(m_styleoption); ++ opt->orientation = horizontal() ? Qt::Horizontal : Qt::Vertical; ++ opt->minimum = qMax(0, minimum()); ++ opt->maximum = qMax(0, maximum()); ++ opt->progress = value(); ++ } ++ break; ++ case GroupBox: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionGroupBox(); ++ ++ QStyleOptionGroupBox *opt = qstyleoption_cast<QStyleOptionGroupBox*>(m_styleoption); ++ opt->text = text(); ++ opt->lineWidth = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption, nullptr); ++ opt->subControls = QStyle::SC_GroupBoxLabel; ++ opt->features = {}; ++ if (m_properties[QStringLiteral("sunken")].toBool()) { // Qt draws an ugly line here so I ignore it ++ opt->subControls |= QStyle::SC_GroupBoxFrame; ++ } else { ++ opt->features |= QStyleOptionFrame::Flat; ++ } ++ if (m_properties[QStringLiteral("checkable")].toBool()) ++ opt->subControls |= QStyle::SC_GroupBoxCheckBox; ++ ++ } ++ break; ++ case ScrollBar: { ++ if (!m_styleoption) ++ m_styleoption = new QStyleOptionSlider(); ++ ++ QStyleOptionSlider *opt = qstyleoption_cast<QStyleOptionSlider*>(m_styleoption); ++ opt->minimum = qMax(0, minimum()); ++ opt->maximum = qMax(0, maximum()); ++ opt->pageStep = qMax(0, int(horizontal() ? width() : height())); ++ opt->orientation = horizontal() ? Qt::Horizontal : Qt::Vertical; ++ opt->sliderPosition = value(); ++ opt->sliderValue = value(); ++ opt->activeSubControls = (activeControl() == QLatin1String("up")) ++ ? QStyle::SC_ScrollBarSubLine : (activeControl() == QLatin1String("down")) ? ++ QStyle::SC_ScrollBarAddLine : ++ (activeControl() == QLatin1String("handle")) ? ++ QStyle::SC_ScrollBarSlider : hover() ? QStyle::SC_ScrollBarGroove : QStyle::SC_None; ++ if (raised()) ++ opt->state |= QStyle::State_On; ++ ++ opt->sliderValue = value(); ++ opt->subControls = QStyle::SC_All; ++ ++ setTransient(KyQuickStyleItem::style()->styleHint(QStyle::SH_ScrollBar_Transient, m_styleoption)); ++ break; ++ } ++ default: ++ break; ++ } ++ ++ if (!m_styleoption) ++ m_styleoption = new QStyleOption(); ++ ++ if (needsResolvePalette) ++ resolvePalette(); ++ ++ m_styleoption->styleObject = this; ++ m_styleoption->direction = qApp->layoutDirection(); ++ ++ int w = m_textureWidth > 0 ? m_textureWidth : width(); ++ int h = m_textureHeight > 0 ? m_textureHeight : height(); ++ ++ m_styleoption->rect = QRect(m_paintMargins, 0, w - 2* m_paintMargins, h); ++ ++ if (isEnabled()) { ++ m_styleoption->state |= QStyle::State_Enabled; ++ m_styleoption->palette.setCurrentColorGroup(QPalette::Active); ++ } else { ++ m_styleoption->palette.setCurrentColorGroup(QPalette::Disabled); ++ } ++ if (m_active) ++ m_styleoption->state |= QStyle::State_Active; ++ else ++ m_styleoption->palette.setCurrentColorGroup(QPalette::Inactive); ++ if (m_sunken) ++ m_styleoption->state |= QStyle::State_Sunken; ++ if (m_raised) ++ m_styleoption->state |= QStyle::State_Raised; ++ if (m_selected) ++ m_styleoption->state |= QStyle::State_Selected; ++ if (m_focus) ++ m_styleoption->state |= QStyle::State_HasFocus; ++ if (m_on) ++ m_styleoption->state |= QStyle::State_On; ++ if (m_hover) ++ m_styleoption->state |= QStyle::State_MouseOver; ++ if (m_horizontal) ++ m_styleoption->state |= QStyle::State_Horizontal; ++ ++ // some styles don't draw a focus rectangle if ++ // QStyle::State_KeyboardFocusChange is not set ++ if (window()) { ++ if (m_lastFocusReason == Qt::TabFocusReason || m_lastFocusReason == Qt::BacktabFocusReason) { ++ m_styleoption->state |= QStyle::State_KeyboardFocusChange; ++ } ++ } ++ ++ if (sizeHint == QLatin1String("mini")) { ++ m_styleoption->state |= QStyle::State_Mini; ++ } else if (sizeHint == QLatin1String("small")) { ++ m_styleoption->state |= QStyle::State_Small; ++ } ++ ++} ++ ++const char* KyQuickStyleItem::classNameForItem() const ++{ ++ switch(m_itemType) { ++ case Button: ++ return "QPushButton"; ++ case RadioButton: ++ return "QRadioButton"; ++ case CheckBox: ++ return "QCheckBox"; ++ case ComboBox: ++ return "QComboBox"; ++ case ComboBoxItem: ++ return "QComboMenuItem"; ++ case ToolBar: ++ return ""; ++ case ToolButton: ++ return "QToolButton"; ++ case Tab: ++ return "QTabButton"; ++ case TabFrame: ++ return "QTabBar"; ++ case Edit: ++ return "QTextEdit"; ++ case GroupBox: ++ return "QGroupBox"; ++ case Header: ++ return "QHeaderView"; ++ case Item: ++ case ItemRow: ++ return "QAbstractItemView"; ++ case Menu: ++ case MenuItem: ++ return "QMenu"; ++ case MenuBar: ++ case MenuBarItem: ++ return "QMenuBar"; ++ default: ++ return ""; ++ } ++ Q_UNREACHABLE(); ++} ++ ++void KyQuickStyleItem::resolvePalette() ++{ ++ if (QCoreApplication::testAttribute(Qt::AA_SetPalette)) ++ return; ++ ++ const QVariant controlPalette = m_control ? m_control->property("palette") : QVariant(); ++ if (controlPalette.isValid()) { ++ m_styleoption->palette = controlPalette.value<QPalette>(); ++ } else { ++// m_styleoption->palette = m_theme->palette(); ++ } ++} ++ ++int KyQuickStyleItem::leftPadding() const ++{ ++ switch (m_itemType) { ++ case Frame: { ++ const QRect cr = KyQuickStyleItem::style()->subElementRect(QStyle::SE_ShapedFrameContents, m_styleoption); ++ return cr.left() - m_styleoption->rect.left(); ++ } ++ default: ++ return 0; ++ } ++} ++ ++int KyQuickStyleItem::topPadding() const ++{ ++ switch (m_itemType) { ++ case Frame: { ++ const QRect cr = KyQuickStyleItem::style()->subElementRect(QStyle::SE_ShapedFrameContents, m_styleoption); ++ return cr.top() - m_styleoption->rect.top(); ++ } ++ default: ++ return 0; ++ } ++} ++ ++int KyQuickStyleItem::rightPadding() const ++{ ++ switch (m_itemType) { ++ case Frame: { ++ const QRect cr = KyQuickStyleItem::style()->subElementRect(QStyle::SE_ShapedFrameContents, m_styleoption); ++ return m_styleoption->rect.right() - cr.right(); ++ } ++ default: ++ return 0; ++ } ++} ++ ++int KyQuickStyleItem::bottomPadding() const ++{ ++ switch (m_itemType) { ++ case Frame: { ++ const QRect cr = KyQuickStyleItem::style()->subElementRect(QStyle::SE_ShapedFrameContents, m_styleoption); ++ return m_styleoption->rect.bottom() - cr.bottom(); ++ } ++ default: ++ return 0; ++ } ++} ++ ++/* ++ * Property style ++ * ++ * Returns a simplified style name. ++ * ++ * QMacStyle = "mac" ++ * QWindowsXPStyle = "windowsxp" ++ * QFusionStyle = "fusion" ++ */ ++ ++QString KyQuickStyleItem::styleName() const ++{ ++ QString style = QString::fromLatin1(KyQuickStyleItem::style()->metaObject()->className()); ++ style = style.toLower(); ++ if (style.startsWith(QLatin1Char('q'))) ++ style = style.right(style.length() - 1); ++ if (style.endsWith(QLatin1String("style"))) ++ style = style.left(style.length() - 5); ++ return style; ++} ++ ++QString KyQuickStyleItem::hitTest(int px, int py) ++{ ++ QStyle::SubControl subcontrol = QStyle::SC_All; ++ switch (m_itemType) { ++ case SpinBox :{ ++ subcontrol = KyQuickStyleItem::style()->hitTestComplexControl(QStyle::CC_SpinBox, ++ qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), ++ QPoint(px,py), nullptr); ++ if (subcontrol == QStyle::SC_SpinBoxUp) ++ return QStringLiteral("up"); ++ else if (subcontrol == QStyle::SC_SpinBoxDown) ++ return QStringLiteral("down"); ++ } ++ break; ++ ++ case Slider: { ++ subcontrol = KyQuickStyleItem::style()->hitTestComplexControl(QStyle::CC_Slider, ++ qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), ++ QPoint(px,py), nullptr); ++ if (subcontrol == QStyle::SC_SliderHandle) ++ return QStringLiteral("handle"); ++ } ++ break; ++ ++ case ScrollBar: { ++ subcontrol = KyQuickStyleItem::style()->hitTestComplexControl(QStyle::CC_ScrollBar, ++ qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), ++ QPoint(px,py), nullptr); ++ switch (subcontrol) { ++ case QStyle::SC_ScrollBarSlider: ++ return QStringLiteral("handle"); ++ ++ case QStyle::SC_ScrollBarSubLine: ++ return QStringLiteral("up"); ++ ++ case QStyle::SC_ScrollBarSubPage: ++ return QStringLiteral("upPage"); ++ ++ case QStyle::SC_ScrollBarAddLine: ++ return QStringLiteral("down"); ++ ++ case QStyle::SC_ScrollBarAddPage: ++ return QStringLiteral("downPage"); ++ ++ default: ++ break; ++ } ++ } ++ break; ++ ++ default: ++ break; ++ } ++ return QStringLiteral("none"); ++} ++ ++QSize KyQuickStyleItem::sizeFromContents(int width, int height) ++{ ++ initStyleOption(); ++ ++ QSize size; ++ switch (m_itemType) { ++ case RadioButton: ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_RadioButton, m_styleoption, QSize(width,height)); ++ break; ++ case CheckBox: ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_CheckBox, m_styleoption, QSize(width,height)); ++ break; ++ case ToolBar: ++ size = QSize(200, styleName().contains(QLatin1String("windows")) ? 30 : 42); ++ break; ++ case ToolButton: { ++ QStyleOptionToolButton *btn = qstyleoption_cast<QStyleOptionToolButton*>(m_styleoption); ++ int w = 0; ++ int h = 0; ++ if (btn->toolButtonStyle != Qt::ToolButtonTextOnly) { ++ QSize icon = btn->iconSize; ++ w = icon.width(); ++ h = icon.height(); ++ } ++ if (btn->toolButtonStyle != Qt::ToolButtonIconOnly) { ++ QSize textSize = btn->fontMetrics.size(Qt::TextShowMnemonic, btn->text); ++ textSize.setWidth(textSize.width() + btn->fontMetrics.horizontalAdvance(QLatin1Char(' '))*2); ++ if (btn->toolButtonStyle == Qt::ToolButtonTextUnderIcon) { ++ h += 4 + textSize.height(); ++ if (textSize.width() > w) ++ w = textSize.width(); ++ } else if (btn->toolButtonStyle == Qt::ToolButtonTextBesideIcon) { ++ w += 4 + textSize.width(); ++ if (textSize.height() > h) ++ h = textSize.height(); ++ } else { // TextOnly ++ w = textSize.width(); ++ h = textSize.height(); ++ } ++ } ++ btn->rect.setSize(QSize(w, h)); ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_ToolButton, m_styleoption, QSize(w, h)); } ++ break; ++ case Button: { ++ QStyleOptionButton *btn = qstyleoption_cast<QStyleOptionButton*>(m_styleoption); ++ ++ int contentWidth = btn->fontMetrics.boundingRect(btn->text).width(); ++ int contentHeight = btn->fontMetrics.height(); ++ ++ if (!btn->icon.isNull()) { ++ //+4 matches a hardcoded value in QStyle and acts as a margin between the icon and the text. ++ contentWidth += btn->iconSize.width() + 4; ++ contentHeight = qMax(btn->fontMetrics.height(), btn->iconSize.height()); ++ } ++ ++ int newWidth = qMax(width, contentWidth); ++ int newHeight = qMax(height, contentHeight); ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_PushButton, m_styleoption, QSize(newWidth, newHeight)); } ++ break; ++ case ComboBox: { ++ QStyleOptionComboBox *btn = qstyleoption_cast<QStyleOptionComboBox*>(m_styleoption); ++ int newWidth = qMax(width, btn->fontMetrics.boundingRect(btn->currentText).width()); ++ int newHeight = qMax(height, btn->fontMetrics.height()); ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_ComboBox, m_styleoption, QSize(newWidth, newHeight)); } ++ break; ++ case Tab: { ++ QStyleOptionTab *tab = qstyleoption_cast<QStyleOptionTab*>(m_styleoption); ++ ++ int contentWidth = tab->fontMetrics.boundingRect(tab->text).width(); ++ int contentHeight = tab->fontMetrics.height(); ++ ++ if (!tab->icon.isNull()) { ++ //+4 matches a hardcoded value in QStyle and acts as a margin between the icon and the text. ++ contentWidth += tab->iconSize.width() + 4; ++ contentHeight = qMax(contentHeight, tab->iconSize.height()); ++ } ++ ++ contentWidth += KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarTabHSpace, tab); ++ contentHeight += KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarTabVSpace, tab); ++ ++ const int newWidth = qMax(width, contentWidth); ++ const int newHeight = qMax(height, contentHeight); ++ ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_TabBarTab, m_styleoption, QSize(newWidth, newHeight)); ++ ++ break; ++ } ++ case Slider: ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_Slider, m_styleoption, QSize(width,height)); ++ break; ++ case ProgressBar: ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_ProgressBar, m_styleoption, QSize(width,height)); ++ break; ++ case SpinBox: ++ case Edit: ++ { ++ // We have to create a new style option since we might be calling with a QStyleOptionSpinBox ++ QStyleOptionFrame frame; ++ //+2 to be consistent with the hardcoded verticalmargin in QLineEdit ++ int contentHeight = frame.fontMetrics.height() + 2; ++ ++ frame.state = m_styleoption->state | QStyle::State_Sunken; ++ frame.lineWidth = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption, nullptr); ++ frame.rect = m_styleoption->rect; ++ frame.styleObject = this; ++ ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_LineEdit, ++ &frame, QSize(width, qMax(height, contentHeight)).expandedTo(QApplication::globalStrut())); ++ if (m_itemType == SpinBox) { ++ size.setWidth(KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_SpinBox, ++ m_styleoption, QSize(width + 2, height)).width()); ++ } ++ } ++ break; ++ case GroupBox: { ++ QStyleOptionGroupBox *box = qstyleoption_cast<QStyleOptionGroupBox*>(m_styleoption); ++ QFontMetrics metrics(box->fontMetrics); ++ int baseWidth = metrics.boundingRect(box->text + QLatin1Char(' ')).width(); ++ int baseHeight = metrics.height() + m_contentHeight; ++ if (box->subControls & QStyle::SC_GroupBoxCheckBox) { ++ baseWidth += KyQuickStyleItem::style()->pixelMetric(QStyle::PM_IndicatorWidth); ++ baseWidth += KyQuickStyleItem::style()->pixelMetric(QStyle::PM_CheckBoxLabelSpacing); ++ baseHeight = qMax(baseHeight, KyQuickStyleItem::style()->pixelMetric(QStyle::PM_IndicatorHeight)); ++ } ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_GroupBox, m_styleoption, QSize(qMax(baseWidth, m_contentWidth), baseHeight)); ++ } ++ break; ++ case Header: ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_HeaderSection, m_styleoption, QSize(width,height)); ++ break; ++ case ItemRow: ++ case Item: //fall through ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_ItemViewItem, m_styleoption, QSize(width,height)); ++ break; ++ case MenuBarItem: ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_MenuBarItem, m_styleoption, QSize(width,height)); ++ break; ++ case MenuBar: ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_MenuBar, m_styleoption, QSize(width,height)); ++ break; ++ case Menu: ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_Menu, m_styleoption, QSize(width,height)); ++ break; ++ case MenuItem: ++ case ComboBoxItem: ++ if (static_cast<QStyleOptionMenuItem *>(m_styleoption)->menuItemType == QStyleOptionMenuItem::Scroller) { ++ size.setHeight(qMax(QApplication::globalStrut().height(), ++ KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuScrollerHeight, nullptr, nullptr))); ++ } else { ++ size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_MenuItem, m_styleoption, QSize(width,height)); ++ } ++ break; ++ default: ++ break; ++ } ++ return size.expandedTo(QSize(m_contentWidth, m_contentHeight)); ++} ++ ++qreal KyQuickStyleItem::baselineOffset() ++{ ++ QRect r; ++ bool ceilResult = true; // By default baseline offset rounding is done upwards ++ switch (m_itemType) { ++ case RadioButton: ++ r = KyQuickStyleItem::style()->subElementRect(QStyle::SE_RadioButtonContents, m_styleoption); ++ break; ++ case Button: ++ r = KyQuickStyleItem::style()->subElementRect(QStyle::SE_PushButtonContents, m_styleoption); ++ break; ++ case CheckBox: ++ r = KyQuickStyleItem::style()->subElementRect(QStyle::SE_CheckBoxContents, m_styleoption); ++ break; ++ case Edit: ++ r = KyQuickStyleItem::style()->subElementRect(QStyle::SE_LineEditContents, m_styleoption); ++ break; ++ case ComboBox: ++ if (const QStyleOptionComboBox *combo = qstyleoption_cast<const QStyleOptionComboBox *>(m_styleoption)) { ++ r = KyQuickStyleItem::style()->subControlRect(QStyle::CC_ComboBox, combo, QStyle::SC_ComboBoxEditField); ++ if (styleName() != QLatin1String("mac")) ++ r.adjust(0,0,0,1); ++ } ++ break; ++ case SpinBox: ++ if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(m_styleoption)) { ++ r = KyQuickStyleItem::style()->subControlRect(QStyle::CC_SpinBox, spinbox, QStyle::SC_SpinBoxEditField); ++ ceilResult = false; ++ } ++ break; ++ default: ++ break; ++ } ++ if (r.height() > 0) { ++ const QFontMetrics &fm = m_styleoption->fontMetrics; ++ int surplus = r.height() - fm.height(); ++ if ((surplus & 1) && ceilResult) ++ surplus++; ++ int result = r.top() + surplus/2 + fm.ascent(); ++ return result; ++ } ++ ++ return 0.; ++} ++ ++void KyQuickStyleItem::updateBaselineOffset() ++{ ++ const qreal baseline = baselineOffset(); ++ if (baseline > 0) ++ setBaselineOffset(baseline); ++} ++ ++void KyQuickStyleItem::setContentWidth(int arg) ++{ ++ if (m_contentWidth != arg) { ++ m_contentWidth = arg; ++ emit contentWidthChanged(arg); ++ } ++} ++ ++void KyQuickStyleItem::setContentHeight(int arg) ++{ ++ if (m_contentHeight != arg) { ++ m_contentHeight = arg; ++ emit contentHeightChanged(arg); ++ } ++} ++ ++void KyQuickStyleItem::updateSizeHint() ++{ ++ QSize implicitSize = sizeFromContents(m_contentWidth, m_contentHeight); ++ setImplicitSize(implicitSize.width(), implicitSize.height()); ++} ++ ++void KyQuickStyleItem::updateRect() ++{ ++ initStyleOption(); ++ m_styleoption->rect.setWidth(width()); ++ m_styleoption->rect.setHeight(height()); ++} ++ ++int KyQuickStyleItem::pixelMetric(const QString &metric) ++{ ++ if (metric == QLatin1String("scrollbarExtent")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_ScrollBarExtent, nullptr); ++ else if (metric == QLatin1String("defaultframewidth")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption); ++ else if (metric == QLatin1String("taboverlap")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarTabOverlap, nullptr); ++ else if (metric == QLatin1String("tabbaseoverlap")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarBaseOverlap, m_styleoption); ++ else if (metric == QLatin1String("tabhspace")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarTabHSpace, nullptr); ++ else if (metric == QLatin1String("indicatorwidth")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_IndicatorWidth, nullptr); ++ else if (metric == QLatin1String("exclusiveindicatorwidth")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_ExclusiveIndicatorWidth, nullptr); ++ else if (metric == QLatin1String("checkboxlabelspacing")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_CheckBoxLabelSpacing, nullptr); ++ else if (metric == QLatin1String("ratiobuttonlabelspacing")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_RadioButtonLabelSpacing, nullptr); ++ else if (metric == QLatin1String("tabvspace")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarTabVSpace, nullptr); ++ else if (metric == QLatin1String("tabbaseheight")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarBaseHeight, nullptr); ++ else if (metric == QLatin1String("tabvshift")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarTabShiftVertical, nullptr); ++ else if (metric == QLatin1String("menubarhmargin")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuBarHMargin, nullptr); ++ else if (metric == QLatin1String("menubarvmargin")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuBarVMargin, nullptr); ++ else if (metric == QLatin1String("menubarpanelwidth")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, nullptr); ++ else if (metric == QLatin1String("menubaritemspacing")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuBarItemSpacing, nullptr); ++ else if (metric == QLatin1String("spacebelowmenubar")) ++ return KyQuickStyleItem::style()->styleHint(QStyle::SH_MainWindow_SpaceBelowMenuBar, m_styleoption); ++ else if (metric == QLatin1String("menuhmargin")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuHMargin, nullptr); ++ else if (metric == QLatin1String("menuvmargin")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuVMargin, nullptr); ++ else if (metric == QLatin1String("menupanelwidth")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuPanelWidth, nullptr); ++ else if (metric == QLatin1String("submenuoverlap")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_SubMenuOverlap, nullptr); ++ else if (metric == QLatin1String("splitterwidth")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_SplitterWidth, nullptr); ++ else if (metric == QLatin1String("scrollbarspacing")) ++ return abs(KyQuickStyleItem::style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing, nullptr)); ++ else if (metric == QLatin1String("treeviewindentation")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TreeViewIndentation, nullptr); ++ else if (metric == QLatin1String("layouthorizontalspacing")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing, nullptr); ++ else if (metric == QLatin1String("layoutverticalspacing")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing, nullptr); ++ else if (metric == QLatin1String("layoutleftmargin")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_LayoutLeftMargin, nullptr); ++ else if (metric == QLatin1String("layouttopmargin")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_LayoutTopMargin, nullptr); ++ else if (metric == QLatin1String("layoutrightmargin")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_LayoutRightMargin, nullptr); ++ else if (metric == QLatin1String("layoutbottommargin")) ++ return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_LayoutBottomMargin, nullptr); ++ return 0; ++} ++ ++QVariant KyQuickStyleItem::styleHint(const QString &metric) ++{ ++ initStyleOption(); ++ if (metric == QLatin1String("comboboxpopup")) { ++ return KyQuickStyleItem::style()->styleHint(QStyle::SH_ComboBox_Popup, m_styleoption); ++ } else if (metric == QLatin1String("highlightedTextColor")) { ++ return m_styleoption->palette.highlightedText().color().name(); ++ } else if (metric == QLatin1String("textColor")) { ++ QPalette pal = m_styleoption->palette; ++ pal.setCurrentColorGroup(active()? QPalette::Active : QPalette::Inactive); ++ return pal.text().color().name(); ++ } else if (metric == QLatin1String("focuswidget")) { ++ return KyQuickStyleItem::style()->styleHint(QStyle::SH_FocusFrame_AboveWidget); ++ } else if (metric == QLatin1String("tabbaralignment")) { ++ int result = KyQuickStyleItem::style()->styleHint(QStyle::SH_TabBar_Alignment); ++ if (result == Qt::AlignCenter) ++ return QStringLiteral("center"); ++ return QStringLiteral("left"); ++ } else if (metric == QLatin1String("externalScrollBars")) { ++ return KyQuickStyleItem::style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents); ++ } else if (metric == QLatin1String("scrollToClickPosition")) ++ return KyQuickStyleItem::style()->styleHint(QStyle::SH_ScrollBar_LeftClickAbsolutePosition); ++ else if (metric == QLatin1String("activateItemOnSingleClick")) ++ return KyQuickStyleItem::style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick); ++ else if (metric == QLatin1String("submenupopupdelay")) ++ return KyQuickStyleItem::style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, m_styleoption); ++ else if (metric == QLatin1String("wheelScrollLines")) ++ return qApp->wheelScrollLines(); ++ return 0; ++ ++ // Add SH_Menu_SpaceActivatesItem ++} ++ ++void KyQuickStyleItem::setHints(const QVariantMap &str) ++{ ++ if (m_hints != str) { ++ m_hints = str; ++ initStyleOption(); ++ updateSizeHint(); ++ if (m_styleoption->state & QStyle::State_Mini) { ++ m_font.setPointSize(9.); ++ emit fontChanged(); ++ } else if (m_styleoption->state & QStyle::State_Small) { ++ m_font.setPointSize(11.); ++ emit fontChanged(); ++ } else { ++ emit hintChanged(); ++ } ++ } ++} ++ ++void KyQuickStyleItem::resetHints() ++{ ++ m_hints.clear(); ++} ++ ++ ++void KyQuickStyleItem::setElementType(const QString &str) ++{ ++ if (m_type == str) ++ return; ++ ++ m_type = str; ++ ++ emit elementTypeChanged(); ++ if (m_styleoption) { ++ delete m_styleoption; ++ m_styleoption = nullptr; ++ } ++ ++ // Only enable visible if the widget can animate ++ if (str == QLatin1String("menu")) { ++ m_itemType = Menu; ++ } else if (str == QLatin1String("menuitem")) { ++ m_itemType = MenuItem; ++ } else if (str == QLatin1String("item") || str == QLatin1String("itemrow") || str == QLatin1String("header")) { ++ if (str == QLatin1String("header")) { ++ m_itemType = Header; ++ } else { ++ m_itemType = str == QLatin1String("item") ? Item : ItemRow; ++ } ++ } else if (str == QLatin1String("itembranchindicator")) { ++ m_itemType = ItemBranchIndicator; ++ } else if (str == QLatin1String("groupbox")) { ++ m_itemType = GroupBox; ++ } else if (str == QLatin1String("tab")) { ++ m_itemType = Tab; ++ } else if (str == QLatin1String("tabframe")) { ++ m_itemType = TabFrame; ++ } else if (str == QLatin1String("comboboxitem")) { ++ // Gtk uses qobject cast, hence we need to separate this from menuitem ++ // On mac, we temporarily use the menu item because it has more accurate ++ // palette. ++ m_itemType = ComboBoxItem; ++ } else if (str == QLatin1String("toolbar")) { ++ m_itemType = ToolBar; ++ } else if (str == QLatin1String("toolbutton")) { ++ m_itemType = ToolButton; ++ } else if (str == QLatin1String("slider")) { ++ m_itemType = Slider; ++ } else if (str == QLatin1String("frame")) { ++ m_itemType = Frame; ++ } else if (str == QLatin1String("combobox")) { ++ m_itemType = ComboBox; ++ } else if (str == QLatin1String("splitter")) { ++ m_itemType = Splitter; ++ } else if (str == QLatin1String("progressbar")) { ++ m_itemType = ProgressBar; ++ } else if (str == QLatin1String("button")) { ++ m_itemType = Button; ++ } else if (str == QLatin1String("checkbox")) { ++ m_itemType = CheckBox; ++ } else if (str == QLatin1String("radiobutton")) { ++ m_itemType = RadioButton; ++ } else if (str == QLatin1String("edit")) { ++ m_itemType = Edit; ++ } else if (str == QLatin1String("spinbox")) { ++ m_itemType = SpinBox; ++ } else if (str == QLatin1String("scrollbar")) { ++ m_itemType = ScrollBar; ++ } else if (str == QLatin1String("widget")) { ++ m_itemType = Widget; ++ } else if (str == QLatin1String("focusframe")) { ++ m_itemType = FocusFrame; ++ } else if (str == QLatin1String("focusrect")) { ++ m_itemType = FocusRect; ++ } else if (str == QLatin1String("dial")) { ++ m_itemType = Dial; ++ } else if (str == QLatin1String("statusbar")) { ++ m_itemType = StatusBar; ++ } else if (str == QLatin1String("machelpbutton")) { ++ m_itemType = MacHelpButton; ++ } else if (str == QLatin1String("scrollareacorner")) { ++ m_itemType = ScrollAreaCorner; ++ } else if (str == QLatin1String("menubar")) { ++ m_itemType = MenuBar; ++ } else if (str == QLatin1String("menubaritem")) { ++ m_itemType = MenuBarItem; ++ } else { ++ m_itemType = Undefined; ++ } ++ emit leftPaddingChanged(); ++ emit rightPaddingChanged(); ++ emit topPaddingChanged(); ++ emit bottomPaddingChanged(); ++ updateSizeHint(); ++} ++ ++QRectF KyQuickStyleItem::subControlRect(const QString &subcontrolString) ++{ ++ QStyle::SubControl subcontrol = QStyle::SC_None; ++ initStyleOption(); ++ switch (m_itemType) { ++ case SpinBox: ++ { ++ QStyle::ComplexControl control = QStyle::CC_SpinBox; ++ if (subcontrolString == QLatin1String("down")) ++ subcontrol = QStyle::SC_SpinBoxDown; ++ else if (subcontrolString == QLatin1String("up")) ++ subcontrol = QStyle::SC_SpinBoxUp; ++ else if (subcontrolString == QLatin1String("edit")){ ++ subcontrol = QStyle::SC_SpinBoxEditField; ++ } ++ return KyQuickStyleItem::style()->subControlRect(control, ++ qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), ++ subcontrol); ++ ++ } ++ break; ++ case Slider: ++ { ++ QStyle::ComplexControl control = QStyle::CC_Slider; ++ if (subcontrolString == QLatin1String("handle")) ++ subcontrol = QStyle::SC_SliderHandle; ++ else if (subcontrolString == QLatin1String("groove")) ++ subcontrol = QStyle::SC_SliderGroove; ++ return KyQuickStyleItem::style()->subControlRect(control, ++ qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), ++ subcontrol); ++ ++ } ++ break; ++ case ScrollBar: ++ { ++ QStyle::ComplexControl control = QStyle::CC_ScrollBar; ++ if (subcontrolString == QLatin1String("slider")) ++ subcontrol = QStyle::SC_ScrollBarSlider; ++ if (subcontrolString == QLatin1String("groove")) ++ subcontrol = QStyle::SC_ScrollBarGroove; ++ else if (subcontrolString == QLatin1String("handle")) ++ subcontrol = QStyle::SC_ScrollBarSlider; ++ else if (subcontrolString == QLatin1String("add")) ++ subcontrol = QStyle::SC_ScrollBarAddPage; ++ else if (subcontrolString == QLatin1String("sub")) ++ subcontrol = QStyle::SC_ScrollBarSubPage; ++ return KyQuickStyleItem::style()->subControlRect(control, ++ qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), ++ subcontrol); ++ } ++ break; ++ case ItemBranchIndicator: { ++ QStyleOption opt; ++ opt.rect = QRect(0, 0, implicitWidth(), implicitHeight()); ++ return KyQuickStyleItem::style()->subElementRect(QStyle::SE_TreeViewDisclosureItem, &opt, nullptr); ++ } ++ default: ++ break; ++ } ++ return QRectF(); ++} ++ ++namespace { ++class QHighDpiPixmapsEnabler1 { ++public: ++ QHighDpiPixmapsEnabler1() ++ :wasEnabled(false) ++ { ++ if (!qApp->testAttribute(Qt::AA_UseHighDpiPixmaps)) { ++ qApp->setAttribute(Qt::AA_UseHighDpiPixmaps); ++ wasEnabled = true; ++ } ++ } ++ ++ ~QHighDpiPixmapsEnabler1() ++ { ++ if (wasEnabled) ++ qApp->setAttribute(Qt::AA_UseHighDpiPixmaps, false); ++ } ++private: ++ bool wasEnabled; ++}; ++} ++ ++void KyQuickStyleItem::paint(QPainter *painter) ++{ ++ return ; ++ initStyleOption(); ++ if (QStyleOptionMenuItem *opt = qstyleoption_cast<QStyleOptionMenuItem*>(m_styleoption)) ++ painter->setFont(opt->font); ++ else { ++ QFont font; ++ if (m_styleoption->state & QStyle::State_Mini) { ++ font = qApp->font("QMiniFont"); ++ } else if (m_styleoption->state & QStyle::State_Small) { ++ font = qApp->font("QSmallFont"); ++ } ++ painter->setFont(font); ++ } ++ ++ // Set AA_UseHighDpiPixmaps when calling style code to make QIcon return ++ // "retina" pixmaps. The flag is controlled by the application so we can't ++ // set it unconditinally. ++ QHighDpiPixmapsEnabler1 enabler; ++ ++ switch (m_itemType) { ++ case Button:{ ++ QWidget wid; ++ if(m_buttonType == "MaxButton" || m_buttonType == "MinButton" || m_buttonType == "WindowButton") { ++ wid.setProperty("isWindowButton", QVariant(0x01)); ++ } else if(m_buttonType == "CloseButton") { ++ wid.setProperty("isWindowButton", QVariant(0x02)); ++ } ++ ++ if(m_buttonType == "BlueButton" || m_buttonType == "ImportantButton") { ++ wid.setProperty("isImportant", true); ++ } ++ if(m_roundButton == "RoundButton") { ++ wid.setProperty("isRoundButton", true); ++ } ++ KyQuickStyleItem::style()->drawControl(QStyle::CE_PushButton, m_styleoption, painter,&wid); ++} ++ break; ++ case ItemRow :{ ++ QPixmap pixmap; ++ // Only draw through style once ++ const QString pmKey = QLatin1String("itemrow") % QString::number(m_styleoption->state,16) % activeControl(); ++ if (!QPixmapCache::find(pmKey, &pixmap) || pixmap.width() < width() || height() != pixmap.height()) { ++ int newSize = width(); ++ pixmap = QPixmap(newSize, height()); ++ pixmap.fill(Qt::transparent); ++ QPainter pixpainter(&pixmap); ++ KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_PanelItemViewRow, m_styleoption, &pixpainter); ++ if ((styleName() == QLatin1String("mac") || !KyQuickStyleItem::style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected)) && selected()) { ++ QPalette pal = QApplication::palette("QAbstractItemView"); ++ pal.setCurrentColorGroup(m_styleoption->palette.currentColorGroup()); ++ pixpainter.fillRect(m_styleoption->rect, pal.highlight()); ++ } ++ QPixmapCache::insert(pmKey, pixmap); ++ } ++ painter->drawPixmap(0, 0, pixmap); ++ } ++ break; ++ case Item: ++ KyQuickStyleItem::style()->drawControl(QStyle::CE_ItemViewItem, m_styleoption, painter); ++ break; ++ case ItemBranchIndicator: ++ KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_IndicatorBranch, m_styleoption, painter); ++ break; ++ case Header: ++ KyQuickStyleItem::style()->drawControl(QStyle::CE_Header, m_styleoption, painter); ++ break; ++ case ToolButton: ++ KyQuickStyleItem::style()->drawComplexControl(QStyle::CC_ToolButton, qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), painter); ++ break; ++ case Tab: ++ { ++ if (m_lastFocusReason != Qt::TabFocusReason && m_lastFocusReason != Qt::BacktabFocusReason) { ++ m_styleoption->state &= ~QStyle::State_HasFocus; ++ } ++ KyQuickStyleItem::style()->drawControl(QStyle::CE_TabBarTab, m_styleoption, painter); ++ } ++ break; ++ case Frame: ++ m_styleoption->state |= QStyle::State_Sunken; ++ m_styleoption->state &= ~QStyle::State_Raised; ++ KyQuickStyleItem::style()->drawControl(QStyle::CE_ShapedFrame, m_styleoption, painter); ++ break; ++ case FocusFrame: ++ KyQuickStyleItem::style()->drawControl(QStyle::CE_FocusFrame, m_styleoption, painter); ++ break; ++ case FocusRect: ++ KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_FrameFocusRect, m_styleoption, painter); ++ break; ++ case TabFrame: ++ KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_FrameTabWidget, m_styleoption, painter); ++ break; ++ case MenuBar: ++ KyQuickStyleItem::style()->drawControl(QStyle::CE_MenuBarEmptyArea, m_styleoption, painter); ++ break; ++ case MenuBarItem: ++ KyQuickStyleItem::style()->drawControl(QStyle::CE_MenuBarItem, m_styleoption, painter); ++ break; ++ case MenuItem: ++ case ComboBoxItem: { // fall through ++ QStyle::ControlElement menuElement = ++ static_cast<QStyleOptionMenuItem *>(m_styleoption)->menuItemType == QStyleOptionMenuItem::Scroller ? ++ QStyle::CE_MenuScroller : QStyle::CE_MenuItem; ++ KyQuickStyleItem::style()->drawControl(menuElement, m_styleoption, painter); ++ } ++ break; ++ case CheckBox: ++ KyQuickStyleItem::style()->drawControl(QStyle::CE_CheckBox, m_styleoption, painter); ++ break; ++ case RadioButton: ++ KyQuickStyleItem::style()->drawControl(QStyle::CE_RadioButton, m_styleoption, painter); ++ break; ++ case Edit: ++ KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_PanelLineEdit, m_styleoption, painter); ++ break; ++ case MacHelpButton: ++ //Not managed as mac is not supported ++ break; ++ case Widget: ++ KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_Widget, m_styleoption, painter); ++ break; ++ case ScrollAreaCorner: ++ KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_PanelScrollAreaCorner, m_styleoption, painter); ++ break; ++ case Splitter: ++ if (m_styleoption->rect.width() == 1) ++ painter->fillRect(0, 0, width(), height(), m_styleoption->palette.dark().color()); ++ else ++ KyQuickStyleItem::style()->drawControl(QStyle::CE_Splitter, m_styleoption, painter); ++ break; ++ case ComboBox: ++ { ++ KyQuickStyleItem::style()->drawComplexControl(QStyle::CC_ComboBox, ++ qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), ++ painter); ++ // This is needed on mac as it will use the painter color and ignore the palette ++ QPen pen = painter->pen(); ++ painter->setPen(m_styleoption->palette.text().color()); ++ KyQuickStyleItem::style()->drawControl(QStyle::CE_ComboBoxLabel, m_styleoption, painter); ++ painter->setPen(pen); ++ } break; ++ case SpinBox: ++#ifdef Q_OS_MAC ++ // macstyle depends on the embedded qlineedit to fill the editfield background ++ if (styleName() == QLatin1String("mac")) { ++ QRect editRect = KyQuickStyleItem::style()->subControlRect(QStyle::CC_SpinBox, ++ qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), ++ QStyle::SC_SpinBoxEditField); ++ painter->fillRect(editRect.adjusted(-1, -1, 1, 1), m_styleoption->palette.base()); ++ } ++#endif ++ KyQuickStyleItem::style()->drawComplexControl(QStyle::CC_SpinBox, ++ qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), ++ painter); ++ break; ++ case Slider: ++ KyQuickStyleItem::style()->drawComplexControl(QStyle::CC_Slider, ++ qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), ++ painter); ++ break; ++ case Dial: ++ KyQuickStyleItem::style()->drawComplexControl(QStyle::CC_Dial, ++ qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), ++ painter); ++ break; ++ case ProgressBar: ++ KyQuickStyleItem::style()->drawControl(QStyle::CE_ProgressBar, m_styleoption, painter); ++ break; ++ case ToolBar: ++ painter->fillRect(m_styleoption->rect, m_styleoption->palette.window().color()); ++ KyQuickStyleItem::style()->drawControl(QStyle::CE_ToolBar, m_styleoption, painter); ++ painter->save(); ++ painter->setPen(styleName() != QLatin1String("fusion") ? m_styleoption->palette.dark().color().darker(120) : ++ m_styleoption->palette.window().color().lighter(107)); ++ painter->drawLine(m_styleoption->rect.bottomLeft(), m_styleoption->rect.bottomRight()); ++ painter->restore(); ++ break; ++ case StatusBar: ++ { ++ painter->fillRect(m_styleoption->rect, m_styleoption->palette.window().color()); ++ painter->setPen(m_styleoption->palette.dark().color().darker(120)); ++ painter->drawLine(m_styleoption->rect.topLeft(), m_styleoption->rect.topRight()); ++ KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_PanelStatusBar, m_styleoption, painter); ++ } ++ break; ++ case GroupBox: ++ KyQuickStyleItem::style()->drawComplexControl(QStyle::CC_GroupBox, qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), painter); ++ break; ++ case ScrollBar: ++ KyQuickStyleItem::style()->drawComplexControl(QStyle::CC_ScrollBar, qstyleoption_cast<QStyleOptionSlider *>(m_styleoption), painter); ++ break; ++ case Menu: { ++ QStyleHintReturnMask val; ++ KyQuickStyleItem::style()->styleHint(QStyle::SH_Menu_Mask, m_styleoption, nullptr, &val); ++ painter->save(); ++ painter->setClipRegion(val.region); ++ painter->fillRect(m_styleoption->rect, m_styleoption->palette.window()); ++ painter->restore(); ++ KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_PanelMenu, m_styleoption, painter); ++ ++ if (int fw = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuPanelWidth)) { ++ QStyleOptionFrame frame; ++ frame.state = QStyle::State_None; ++ frame.lineWidth = fw; ++ frame.midLineWidth = 0; ++ frame.rect = m_styleoption->rect; ++ frame.styleObject = this; ++ frame.palette = m_styleoption->palette; ++ KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_FrameMenu, &frame, painter); ++ } ++ } ++ break; ++ default: ++ break; ++ } ++} ++ ++qreal KyQuickStyleItem::textWidth(const QString &text) ++{ ++ QFontMetricsF fm = QFontMetricsF(m_styleoption->fontMetrics); ++ return fm.boundingRect(text).width(); ++} ++ ++qreal KyQuickStyleItem::textHeight(const QString &text) ++{ ++ QFontMetricsF fm = QFontMetricsF(m_styleoption->fontMetrics); ++ return text.isEmpty() ? fm.height() : ++ fm.boundingRect(text).height(); ++} ++ ++QString KyQuickStyleItem::elidedText(const QString &text, int elideMode, int width) ++{ ++ return m_styleoption->fontMetrics.elidedText(text, Qt::TextElideMode(elideMode), width); ++} ++ ++bool KyQuickStyleItem::hasThemeIcon(const QString &icon) const ++{ ++ return QIcon::hasThemeIcon(icon); ++} ++ ++bool KyQuickStyleItem::event(QEvent *ev) ++{ ++ if (ev->type() == QEvent::StyleAnimationUpdate) { ++ if (isVisible()) { ++ ev->accept(); ++ polish(); ++ } ++ return true; ++ } ++ return QQuickItem::event(ev); ++} ++ ++void KyQuickStyleItem::setTextureWidth(int w) ++{ ++ if (m_textureWidth == w) ++ return; ++ m_textureWidth = w; ++ emit textureWidthChanged(m_textureWidth); ++ update(); ++} ++ ++void KyQuickStyleItem::setTextureHeight(int h) ++{ ++ if (m_textureHeight == h) ++ return; ++ m_textureHeight = h; ++ emit textureHeightChanged(m_textureHeight); ++ update(); ++} ++ ++QQuickItem *KyQuickStyleItem::control() const ++{ ++ return m_control; ++} ++ ++void KyQuickStyleItem::setControl(QQuickItem *control) ++{ ++ if (control == m_control) { ++ return; ++ } ++ ++ if (m_control) { ++ m_control->removeEventFilter(this); ++ disconnect(m_control, nullptr, this, nullptr); ++ } ++ ++ m_control = control; ++ ++ if (m_control) { ++ m_control->installEventFilter(this); ++ ++ if (m_control->window()) { ++ m_window = m_control->window(); ++ m_window->installEventFilter(this); ++ } ++ connect(m_control, &QQuickItem::windowChanged, this, ++ [this](QQuickWindow *window) { ++ if (m_window) { ++ m_window->removeEventFilter(this); ++ } ++ m_window = window; ++ if (m_window) { ++ m_window->installEventFilter(this); ++ } ++ }); ++ } ++ ++ emit controlChanged(); ++} ++ ++QSGNode *KyQuickStyleItem::updatePaintNode(QSGNode *node, UpdatePaintNodeData *) ++{ ++ if (m_image.isNull()) { ++ delete node; ++ return nullptr; ++ } ++ ++ QSGNinePatchNode *styleNode = static_cast<QSGNinePatchNode *>(node); ++ if (!styleNode) ++ styleNode = window()->createNinePatchNode(); ++ ++#ifdef QSG_RUNTIME_DESCRIPTION ++ qsgnode_set_description(styleNode, ++ QString::fromLatin1("%1:%2, '%3'") ++ .arg(styleName()) ++ .arg(elementType()) ++ .arg(text())); ++#endif ++ ++ styleNode->setTexture(window()->createTextureFromImage(m_image, QQuickWindow::TextureCanUseAtlas)); ++ styleNode->setBounds(boundingRect()); ++ styleNode->setDevicePixelRatio(window()->devicePixelRatio()); ++ styleNode->setPadding(m_border.left(), m_border.top(), m_border.right(), m_border.bottom()); ++ styleNode->update(); ++ ++ return styleNode; ++} ++ ++void KyQuickStyleItem::updatePolish() ++{ ++ if (width() >= 1 && height() >= 1) { // Note these are reals so 1 pixel is minimum ++ float devicePixelRatio = window() ? window()->devicePixelRatio() : qApp->devicePixelRatio(); ++ int w = m_textureWidth > 0 ? m_textureWidth : width(); ++ int h = m_textureHeight > 0 ? m_textureHeight : height(); ++ m_image = QImage(w * devicePixelRatio, h * devicePixelRatio, QImage::Format_ARGB32_Premultiplied); ++ m_image.setDevicePixelRatio(devicePixelRatio); ++ m_image.fill(Qt::transparent); ++ QPainter painter(&m_image); ++ painter.setLayoutDirection(qApp->layoutDirection()); ++ paint(&painter); ++ QQuickItem::update(); ++ } else if (!m_image.isNull()) { ++ m_image = QImage(); ++ QQuickItem::update(); ++ } ++} ++ ++bool KyQuickStyleItem::eventFilter(QObject *watched, QEvent *event) ++{ ++ if (watched == m_control) { ++ if (event->type() == QEvent::FocusIn || event->type() == QEvent::FocusOut) { ++ QFocusEvent *fe = static_cast<QFocusEvent *>(event); ++ m_lastFocusReason = fe->reason(); ++ } ++ } else if (watched == m_window.data()) { ++ if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) { ++ QKeyEvent *ke = static_cast<QKeyEvent *>(event); ++ if (ke->key() == Qt::Key_Alt) { ++ updateItem(); ++ } ++ ++ } ++ } ++ ++ return QQuickItem::eventFilter(watched, event); ++} ++ ++void KyQuickStyleItem::styleChanged() ++{ ++ if (!qApp->style() || QApplication::closingDown()) { ++ return; ++ } ++ ++ Q_ASSERT(qApp->style() != sender()); ++ ++ connect(qApp->style(), &QObject::destroyed, this, &KyQuickStyleItem::styleChanged); ++ ++ updateSizeHint(); ++ updateItem(); ++} ++ ++QPixmap QQuickTableRowImageProvider1::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) ++{ ++ Q_UNUSED (requestedSize); ++ int width = 16; ++ int height = 16; ++ if (size) ++ *size = QSize(width, height); ++ ++ QPixmap pixmap(width, height); ++ ++ QStyleOptionViewItem opt; ++ opt.state |= QStyle::State_Enabled; ++ opt.rect = QRect(0, 0, width, height); ++ QString style = QString::fromLatin1(KyQuickStyleItem::style()->metaObject()->className()); ++ opt.features = {}; ++ ++ if (id.contains(QLatin1String("selected"))) ++ opt.state |= QStyle::State_Selected; ++ ++ if (id.contains(QLatin1String("active"))) { ++ opt.state |= QStyle::State_Active; ++ opt.palette.setCurrentColorGroup(QPalette::Active); ++ } else ++ opt.palette.setCurrentColorGroup(QPalette::Inactive); ++ ++ if (id.contains(QLatin1String("alternate"))) ++ opt.features |= QStyleOptionViewItem::Alternate; ++ ++ QPalette pal = QApplication::palette("QAbstractItemView"); ++ if (opt.state & QStyle::State_Selected && (style.contains(QLatin1String("Mac")) || ++ !KyQuickStyleItem::style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected))) { ++ pal.setCurrentColorGroup(opt.palette.currentColorGroup()); ++ pixmap.fill(pal.highlight().color()); ++ } else { ++ pixmap.fill(pal.base().color()); ++ QPainter pixpainter(&pixmap); ++ KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_PanelItemViewRow, &opt, &pixpainter); ++ } ++ return pixmap; ++} +diff --git a/ukui-qml-style-helper/kyquickstyleitem.h b/ukui-qml-style-helper/kyquickstyleitem.h +new file mode 100644 +index 0000000..b1324e6 +--- /dev/null ++++ b/ukui-qml-style-helper/kyquickstyleitem.h +@@ -0,0 +1,341 @@ ++/* ++ * Qt5-UKUI's Library ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 3 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this library. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Yan Wang <wangyan@kylinos.cn> ++ * ++ */ ++ ++#ifndef KYQUICKSTYLEITEM_H ++#define KYQUICKSTYLEITEM_H ++ ++#include "kyquickpadding_p.h" ++#include <PlatformTheme> ++ ++#include <QQuickItem> ++#include <QQuickImageProvider> ++ ++#include <QPixmap> ++#include <QPointer> ++#include <QImage> ++ ++ ++class QStyle; ++class QStyleOption; ++ ++class QQuickTableRowImageProvider1 : public QQuickImageProvider ++{ ++public: ++ QQuickTableRowImageProvider1() ++ : QQuickImageProvider(QQuickImageProvider::Pixmap) {} ++ QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override; ++}; ++ ++class KyQuickStyleItem: public QQuickItem ++{ ++ Q_OBJECT ++ ++ Q_PROPERTY(KyQuickPadding* border READ border CONSTANT) ++ ++ Q_PROPERTY( bool sunken READ sunken WRITE setSunken NOTIFY sunkenChanged) ++ Q_PROPERTY( bool raised READ raised WRITE setRaised NOTIFY raisedChanged) ++ Q_PROPERTY( bool active READ active WRITE setActive NOTIFY activeChanged) ++ Q_PROPERTY( bool selected READ selected WRITE setSelected NOTIFY selectedChanged) ++ Q_PROPERTY( bool hasFocus READ hasFocus WRITE sethasFocus NOTIFY hasFocusChanged) ++ Q_PROPERTY( bool on READ on WRITE setOn NOTIFY onChanged) ++ Q_PROPERTY( bool hover READ hover WRITE setHover NOTIFY hoverChanged) ++ Q_PROPERTY( bool horizontal READ horizontal WRITE setHorizontal NOTIFY horizontalChanged) ++ Q_PROPERTY( bool isTransient READ isTransient WRITE setTransient NOTIFY transientChanged) ++ ++ Q_PROPERTY( QString elementType READ elementType WRITE setElementType NOTIFY elementTypeChanged) ++ Q_PROPERTY( QString text READ text WRITE setText NOTIFY textChanged) ++ Q_PROPERTY( QString activeControl READ activeControl WRITE setActiveControl NOTIFY activeControlChanged) ++ Q_PROPERTY( QString styleName READ styleName NOTIFY styleNameChanged) ++ Q_PROPERTY( QVariantMap hints READ hints WRITE setHints NOTIFY hintChanged RESET resetHints) ++ Q_PROPERTY( QVariantMap properties READ properties WRITE setProperties NOTIFY propertiesChanged) ++ Q_PROPERTY( QFont font READ font NOTIFY fontChanged) ++ ++ // For range controls ++ Q_PROPERTY( int minimum READ minimum WRITE setMinimum NOTIFY minimumChanged) ++ Q_PROPERTY( int maximum READ maximum WRITE setMaximum NOTIFY maximumChanged) ++ Q_PROPERTY( int value READ value WRITE setValue NOTIFY valueChanged) ++ Q_PROPERTY( int step READ step WRITE setStep NOTIFY stepChanged) ++ Q_PROPERTY( int paintMargins READ paintMargins WRITE setPaintMargins NOTIFY paintMarginsChanged) ++ ++ Q_PROPERTY( int contentWidth READ contentWidth WRITE setContentWidth NOTIFY contentWidthChanged) ++ Q_PROPERTY( int contentHeight READ contentHeight WRITE setContentHeight NOTIFY contentHeightChanged) ++ ++ Q_PROPERTY( int textureWidth READ textureWidth WRITE setTextureWidth NOTIFY textureWidthChanged) ++ Q_PROPERTY( int textureHeight READ textureHeight WRITE setTextureHeight NOTIFY textureHeightChanged) ++ ++ Q_PROPERTY( int leftPadding READ leftPadding NOTIFY leftPaddingChanged) ++ Q_PROPERTY( int topPadding READ topPadding NOTIFY topPaddingChanged) ++ Q_PROPERTY( int rightPadding READ rightPadding NOTIFY rightPaddingChanged) ++ Q_PROPERTY( int bottomPadding READ bottomPadding NOTIFY bottomPaddingChanged) ++ ++ Q_PROPERTY( QString buttonType READ buttonType WRITE setbuttonType NOTIFY buttonTypeChanged) ++ Q_PROPERTY( QString roundButton READ roundButton WRITE setroundButton NOTIFY roundButtonChanged) ++ ++ Q_PROPERTY( QQuickItem *control READ control WRITE setControl NOTIFY controlChanged) ++ ++ KyQuickPadding* border() { return &m_border; } ++ ++public: ++ KyQuickStyleItem(QQuickItem *parent = nullptr); ++ ~KyQuickStyleItem() override; ++ ++ enum MenuItemType { ++ SeparatorType = 0, ++ ItemType, ++ MenuType, ++ ScrollIndicatorType ++ }; ++ ++ enum Type { ++ Undefined, ++ Button, ++ RadioButton, ++ CheckBox, ++ ComboBox, ++ ComboBoxItem, ++ Dial, ++ ToolBar, ++ ToolButton, ++ Tab, ++ TabFrame, ++ Frame, ++ FocusFrame, ++ FocusRect, ++ SpinBox, ++ Slider, ++ ScrollBar, ++ ProgressBar, ++ Edit, ++ GroupBox, ++ Header, ++ Item, ++ ItemRow, ++ ItemBranchIndicator, ++ Splitter, ++ Menu, ++ MenuItem, ++ Widget, ++ StatusBar, ++ ScrollAreaCorner, ++ MacHelpButton, ++ MenuBar, ++ MenuBarItem ++ }; ++ ++ void paint(QPainter *); ++ ++ bool sunken() const { return m_sunken; } ++ bool raised() const { return m_raised; } ++ bool active() const { return m_active; } ++ bool selected() const { return m_selected; } ++ bool hasFocus() const { return m_focus; } ++ bool on() const { return m_on; } ++ bool hover() const { return m_hover; } ++ bool horizontal() const { return m_horizontal; } ++ bool isTransient() const { return m_transient; } ++ ++ int minimum() const { return m_minimum; } ++ int maximum() const { return m_maximum; } ++ int step() const { return m_step; } ++ int value() const { return m_value; } ++ int paintMargins() const { return m_paintMargins; } ++ ++ QString elementType() const { return m_type; } ++ QString text() const { return m_text; } ++ QString activeControl() const { return m_activeControl; } ++ QVariantMap hints() const { return m_hints; } ++ QVariantMap properties() const { return m_properties; } ++ QFont font() const { return m_font;} ++ QString styleName() const; ++ ++ void setSunken(bool sunken) { if (m_sunken != sunken) {m_sunken = sunken; emit sunkenChanged();}} ++ void setRaised(bool raised) { if (m_raised!= raised) {m_raised = raised; emit raisedChanged();}} ++ void setActive(bool active) { if (m_active!= active) {m_active = active; emit activeChanged();}} ++ void setSelected(bool selected) { if (m_selected!= selected) {m_selected = selected; emit selectedChanged();}} ++ void sethasFocus(bool focus) { if (m_focus != focus) {m_focus = focus; emit hasFocusChanged();}} ++ void setOn(bool on) { if (m_on != on) {m_on = on ; emit onChanged();}} ++ void setHover(bool hover) { if (m_hover != hover) {m_hover = hover ; emit hoverChanged();}} ++ void setHorizontal(bool horizontal) { if (m_horizontal != horizontal) {m_horizontal = horizontal; emit horizontalChanged();}} ++ void setTransient(bool transient) { if (m_transient != transient) {m_transient = transient; emit transientChanged();}} ++ void setMinimum(int minimum) { if (m_minimum!= minimum) {m_minimum = minimum; emit minimumChanged();}} ++ void setMaximum(int maximum) { if (m_maximum != maximum) {m_maximum = maximum; emit maximumChanged();}} ++ void setValue(int value) { if (m_value!= value) {m_value = value; emit valueChanged();}} ++ void setStep(int step) { if (m_step != step) { m_step = step; emit stepChanged(); }} ++ void setPaintMargins(int value) { if (m_paintMargins!= value) {m_paintMargins = value; emit paintMarginsChanged(); } } ++ void setElementType(const QString &str); ++ void setText(const QString &str) { if (m_text != str) {m_text = str; emit textChanged();}} ++ void setActiveControl(const QString &str) { if (m_activeControl != str) {m_activeControl = str; emit activeControlChanged();}} ++ void setHints(const QVariantMap &str); ++ void setProperties(const QVariantMap &props) { if (m_properties != props) { m_properties = props; emit propertiesChanged(); } } ++ void resetHints(); ++ ++ int contentWidth() const { return m_contentWidth; } ++ void setContentWidth(int arg); ++ ++ int contentHeight() const { return m_contentHeight; } ++ void setContentHeight(int arg); ++ ++ virtual void initStyleOption (); ++ void resolvePalette(); ++ ++ int leftPadding() const; ++ int topPadding() const; ++ int rightPadding() const; ++ int bottomPadding() const; ++ ++ Q_INVOKABLE qreal textWidth(const QString &); ++ Q_INVOKABLE qreal textHeight(const QString &); ++ ++ int textureWidth() const { return m_textureWidth; } ++ void setTextureWidth(int w); ++ ++ int textureHeight() const { return m_textureHeight; } ++ void setTextureHeight(int h); ++ ++ QQuickItem *control() const; ++ void setControl(QQuickItem *control); ++ ++ static QStyle *style(); ++ ++ QString buttonType() const { return m_buttonType;} ++ void setbuttonType(QString buttonType) { ++ m_buttonType = buttonType ; ++ emit buttonTypeChanged(); ++ } ++ ++ QString roundButton() const { return m_roundButton;} ++ void setroundButton(QString roundButton) { ++ m_roundButton = roundButton ; ++ emit roundButtonChanged(); ++ } ++ ++public Q_SLOTS: ++ int pixelMetric(const QString&); ++ QVariant styleHint(const QString&); ++ void updateSizeHint(); ++ void updateRect(); ++ void updateBaselineOffset(); ++ void updateItem(){polish();} ++ QString hitTest(int x, int y); ++ QRectF subControlRect(const QString &subcontrolString); ++ QString elidedText(const QString &text, int elideMode, int width); ++ bool hasThemeIcon(const QString &) const; ++ ++Q_SIGNALS: ++ void elementTypeChanged(); ++ void textChanged(); ++ void sunkenChanged(); ++ void raisedChanged(); ++ void activeChanged(); ++ void selectedChanged(); ++ void hasFocusChanged(); ++ void onChanged(); ++ void hoverChanged(); ++ void horizontalChanged(); ++ void transientChanged(); ++ void minimumChanged(); ++ void maximumChanged(); ++ void stepChanged(); ++ void valueChanged(); ++ void activeControlChanged(); ++ void infoChanged(); ++ void styleNameChanged(); ++ void paintMarginsChanged(); ++ void hintChanged(); ++ void propertiesChanged(); ++ void fontChanged(); ++ void controlChanged(); ++ ++ void contentWidthChanged(int arg); ++ void contentHeightChanged(int arg); ++ ++ void textureWidthChanged(int w); ++ void textureHeightChanged(int h); ++ ++ void leftPaddingChanged(); ++ void topPaddingChanged(); ++ void rightPaddingChanged(); ++ void bottomPaddingChanged(); ++ ++ void buttonTypeChanged(); ++ void roundButtonChanged(); ++ ++protected: ++ bool event(QEvent *) override; ++ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; ++ void updatePolish() override; ++ bool eventFilter(QObject *watched, QEvent *event) override; ++ ++private: ++ const char* classNameForItem() const; ++ QSize sizeFromContents(int width, int height); ++ qreal baselineOffset(); ++ void styleChanged(); ++ ++protected: ++ QStyleOption *m_styleoption; ++ QPointer<QQuickItem> m_control; ++ QPointer<QWindow> m_window; ++ Type m_itemType; ++ ++ QString m_type; ++ QString m_text; ++ QString m_activeControl; ++ QVariantMap m_hints; ++ QVariantMap m_properties; ++ QFont m_font; ++ ++ bool m_sunken; ++ bool m_raised; ++ bool m_active; ++ bool m_selected; ++ bool m_focus; ++ bool m_hover; ++ bool m_on; ++ bool m_horizontal; ++ bool m_transient; ++ bool m_sharedWidget; ++ ++ int m_minimum; ++ int m_maximum; ++ int m_value; ++ int m_step; ++ int m_paintMargins; ++ ++ int m_contentWidth; ++ int m_contentHeight; ++ ++ int m_textureWidth; ++ int m_textureHeight; ++ ++ Qt::FocusReason m_lastFocusReason; ++ ++ QImage m_image; ++ KyQuickPadding m_border; ++ ++ static QStyle *s_style; ++ ++ QString m_buttonType; ++ QString m_roundButton; ++}; ++ ++#endif // KYQUICKSTYLEITEM_H +diff --git a/ukui-qml-style-helper/kystylehelper.cpp b/ukui-qml-style-helper/kystylehelper.cpp +new file mode 100644 +index 0000000..1c7b68d +--- /dev/null ++++ b/ukui-qml-style-helper/kystylehelper.cpp +@@ -0,0 +1,53 @@ ++/* ++ * Qt5-UKUI's Library ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 3 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this library. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Yan Wang <wangyan@kylinos.cn> ++ * ++ */ ++ ++#include "kystylehelper.h" ++ ++#include <QQuickWindow> ++#include <QGSettings/QGSettings> ++ ++#include <QWidget> ++ ++KyStyleHelper::KyStyleHelper(QQuickItem *parent) ++ : QQuickItem(parent) ++{ ++ if (QGSettings::isSchemaInstalled("org.ukui.style")) { ++ QGSettings* styleSettings = new QGSettings("org.ukui.style", QByteArray(), this); ++ connect(styleSettings, &QGSettings::changed, this, [&](const QString &key){ ++ if (key == "styleName" || key == "themeColor") { ++ emit paletteChanged(); ++ emit qcolorChanged(); ++ } ++ if (key == "systemFontSize" || key == "systemFont") { ++ emit fontChanged(); ++ } ++ }); ++ } ++} ++ ++KyStyleHelper::~KyStyleHelper() {} ++ ++KyStyleHelper* KyStyleHelper::qmlAttachedProperties(QObject *parent) ++{ ++ auto p = qobject_cast<QQuickItem*>(parent); ++ return new KyStyleHelper(p); ++} +diff --git a/ukui-qml-style-helper/kystylehelper.h b/ukui-qml-style-helper/kystylehelper.h +new file mode 100644 +index 0000000..6468dc0 +--- /dev/null ++++ b/ukui-qml-style-helper/kystylehelper.h +@@ -0,0 +1,154 @@ ++/* ++ * Qt5-UKUI's Library ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 3 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this library. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Yan Wang <wangyan@kylinos.cn> ++ * ++ */ ++ ++#ifndef KYSTYLEHELPER_H ++#define KYSTYLEHELPER_H ++ ++#include <QApplication> ++#include <QQuickItem> ++#include <QPalette> ++#include <QColor> ++ ++class KyStyleHelper : public QQuickItem ++{ ++ Q_OBJECT ++ Q_DISABLE_COPY(KyStyleHelper) ++ ++ Q_PROPERTY(QPalette palette READ palette NOTIFY paletteChanged) ++ Q_PROPERTY(QFont font READ font NOTIFY fontChanged) ++ ++ Q_PROPERTY(QColor windowtextcolorrole READ windowtextcolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor buttoncolorrole READ buttoncolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor lightcolorrole READ lightcolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor midlightcolorrole READ midlightcolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor darkcolorrole READ darkcolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor midcolorrole READ midcolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor textcolorrole READ textcolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor brighttextcolorrole READ brighttextcolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor buttontextcolorrole READ buttontextcolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor basecolorrole READ basecolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor windowcolorrole READ windowcolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor shadowcolorrole READ shadowcolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor highlightcolorrole READ highlightcolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor highlightedtextcolorrole READ highlightedtextcolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor linkcolorrole READ linkcolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor linkvisitedcolorrole READ linkvisitedcolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor alternatebasecolorrole READ alternatebasecolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor tooltipbasecolorrole READ tooltipbasecolor NOTIFY qcolorChanged) ++ Q_PROPERTY(QColor tooltiptextcolorrole READ tooltiptextcolor NOTIFY qcolorChanged) ++ ++ Q_PROPERTY( QString buttonType READ buttonType WRITE setbuttonType NOTIFY buttonTypeChanged) ++ ++public: ++ explicit KyStyleHelper(QQuickItem *parent = nullptr); ++ ~KyStyleHelper() override; ++ ++ static KyStyleHelper* qmlAttachedProperties(QObject* parent); ++ ++ QString buttonType() const { return m_buttonType;} ++ void setbuttonType(QString buttonType) { ++ m_buttonType = buttonType ; ++ emit buttonTypeChanged(); ++ } ++ ++ /* Get palette */ ++ QPalette palette() { ++ return qApp->palette(); ++ } ++ ++ /* Get font */ ++ QFont font() { ++ return qApp->font(); ++ } ++ ++ /* Get different type of color */ ++ QColor windowtextcolor() { ++ return qApp->palette().windowText().color(); ++ } ++ QColor buttoncolor() { ++ return qApp->palette().button().color(); ++ } ++ QColor lightcolor() { ++ return qApp->palette().light().color(); ++ } ++ QColor midlightcolor() { ++ return qApp->palette().midlight().color(); ++ } ++ QColor darkcolor() { ++ return qApp->palette().dark().color(); ++ } ++ QColor midcolor() { ++ return qApp->palette().mid().color(); ++ } ++ QColor textcolor() { ++ return qApp->palette().text().color(); ++ } ++ QColor brighttextcolor() { ++ return qApp->palette().brightText().color(); ++ } ++ QColor buttontextcolor() { ++ return qApp->palette().buttonText().color(); ++ } ++ QColor basecolor() { ++ return qApp->palette().base().color(); ++ } ++ QColor windowcolor() { ++ return qApp->palette().window().color(); ++ } ++ QColor shadowcolor() { ++ return qApp->palette().shadow().color(); ++ } ++ QColor highlightcolor() { ++ return qApp->palette().highlight().color(); ++ } ++ QColor highlightedtextcolor() { ++ return qApp->palette().highlightedText().color(); ++ } ++ QColor linkcolor() { ++ return qApp->palette().link().color(); ++ } ++ QColor linkvisitedcolor() { ++ return qApp->palette().linkVisited().color(); ++ } ++ QColor alternatebasecolor() { ++ return qApp->palette().alternateBase().color(); ++ } ++ QColor tooltipbasecolor() { ++ return qApp->palette().toolTipBase().color(); ++ } ++ QColor tooltiptextcolor() { ++ return qApp->palette().toolTipText().color(); ++ } ++ ++ ++signals: ++ void paletteChanged(); ++ void fontChanged(); ++ void qcolorChanged(); ++ void buttonTypeChanged(); ++ ++ protected: ++ QString m_buttonType; ++}; ++ ++QML_DECLARE_TYPEINFO(KyStyleHelper, QML_HAS_ATTACHED_PROPERTIES) ++#endif // KYSTYLEHELPER_H +diff --git a/ukui-qml-style-helper/qqc2styleplugin.cpp b/ukui-qml-style-helper/qqc2styleplugin.cpp +index 91ce73d..aa01947 100644 +--- a/ukui-qml-style-helper/qqc2styleplugin.cpp ++++ b/ukui-qml-style-helper/qqc2styleplugin.cpp +@@ -19,10 +19,13 @@ + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ ++#include <QQmlApplicationEngine> + + #include "qqc2styleplugin.h" ++#include "kyquickstyleitem.h" ++#include "kystylehelper.h" ++#include "KyIcon.h" + #include "qdebug.h" +-#include <QQmlApplicationEngine> + #include "styleparameter/ukuibutton.h" + #include "styleparameter/appparameter.h" + #include "styleparameter/imageprovider.h" +@@ -43,18 +46,38 @@ + #include "styleparameter/ukuislider.h" + #include "styleparameter/ukuispinbox.h" + #include "styleparameter/ukuitabbar.h" +-#include "styleparameter/parsedtcolor.h" ++#include "styleparameter/parsecolorinterface.h" ++#include "styleparameter/ukuiswitch.h" ++#include "styleparameter/ukuipopupwindowhandle.h" ++ + using namespace UKUIQQC2Style; + ++Qqc2StylePlugin::~Qqc2StylePlugin() ++{ ++ if(m_token){ ++ delete m_token; ++ m_token = nullptr; ++ } ++} ++ + void Qqc2StylePlugin::initializeEngine(QQmlEngine *engine, const char *uri) + { ++ m_token = new TokenParameter(); ++ ++ qApp->setProperty("qqc2-globaltoken", QVariant::fromValue(m_token)); ++ + engine->addImageProvider("imageProvider", new ImageProvider()); + } + + void Qqc2StylePlugin::registerTypes(const char *uri) + { + Q_ASSERT(QLatin1String(uri) == QLatin1String("org.ukui.qqc2style.private")); ++ + // @uri org.ukui.qqc2style.private ++ qmlRegisterType<KyStyleHelper>(uri, 1, 0, "StyleHelper"); ++ qmlRegisterType<KyIcon>(uri, 1, 0, "KyIcon"); ++ qmlRegisterType<UKUIButton>(uri, 1, 0, "UKUIButton"); ++ + qmlRegisterType<UKUIButton>(uri, 1, 0, "UKUIButton"); + qmlRegisterType<APPParameter>(uri, 1, 0, "APPParameter"); + qmlRegisterType<UKUILabel>(uri, 1, 0, "UKUILabel"); +@@ -73,11 +96,10 @@ void Qqc2StylePlugin::registerTypes(const char *uri) + qmlRegisterType<UKUISlider>(uri, 1, 0, "UKUISlider"); + qmlRegisterType<UKUISpinBox>(uri, 1, 0, "UKUISpinBox"); + qmlRegisterType<UKUITabBar>(uri, 1, 0, "UKUITabBar"); +- qmlRegisterType<ParseDTColor>(uri, 1, 0, "ParseDTColor"); +- ++ qmlRegisterType<UKUISwitch>(uri, 1, 0, "UKUISwitch"); + ++ qmlRegisterType<ParseColorInterface>(uri, 1, 0, "ParseColorInterface"); ++ qmlRegisterType<UKUIPopupWindowHandle>(uri, 1, 0, "PopupHandle"); + qRegisterMetaType<TokenParameter>("TokenParameter"); + +- TokenParameter *token = new TokenParameter(); +- qApp->setProperty("qqc2-globaltoken", QVariant::fromValue(token)); + } +diff --git a/ukui-qml-style-helper/qqc2styleplugin.h b/ukui-qml-style-helper/qqc2styleplugin.h +index 84a5930..6074532 100644 +--- a/ukui-qml-style-helper/qqc2styleplugin.h ++++ b/ukui-qml-style-helper/qqc2styleplugin.h +@@ -24,6 +24,7 @@ + #define QQC2STYLEPLUGIN_H + + #include <QQmlExtensionPlugin> ++#include "styleparameter/tokenparameter.h" + + class Qqc2StylePlugin : public QQmlExtensionPlugin + { +@@ -31,10 +32,12 @@ class Qqc2StylePlugin : public QQmlExtensionPlugin + Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) + + public: ++ ~Qqc2StylePlugin(); + void initializeEngine(QQmlEngine *engine, const char *uri) override; + void registerTypes(const char *uri) override; + + private: ++ UKUIQQC2Style::TokenParameter *m_token = nullptr; + }; + + #endif // QQC2STYLEPLUGIN_H +diff --git a/ukui-qml-style-helper/styleparameter/ appparameter.cpp b/ukui-qml-style-helper/styleparameter/ appparameter.cpp +deleted file mode 100644 +index d093c1c..0000000 +--- a/ukui-qml-style-helper/styleparameter/ appparameter.cpp ++++ /dev/null +@@ -1,149 +0,0 @@ +-#include "appparameter.h" +-#include <QDebug> +-#include <QApplication> +-#include <QGSettings> +-#include <QFontDatabase> +-#include <QIcon> +-#include <QDBusConnection> +- +-#include "settings/ukui-style-settings.h" +-#include "../../qt5-ukui-platformtheme/platform-theme-fontdata.h" +- +-using namespace UKUIQQC2Style; +-APPParameter::APPParameter(QQuickItem *parent) : QQuickItem(parent) +-{ +- if(!qApp) +- return; +- m_font = QApplication::font(); +- m_palette = QApplication::palette(); +- +- if (QGSettings::isSchemaInstalled("org.ukui.style")) { +- auto settings = UKUIStyleSettings::globalInstance(); +- +- //set font +- auto fontName = settings->get("systemFont").toString(); +- auto fontSize = settings->get("systemFontSize").toString().toDouble(); +- if (qApp->property("noChangeSystemFontSize").isValid() && qApp->property("noChangeSystemFontSize").toBool()) +- fontSize = 11; +- QFont tempFont = m_font; +- tempFont.setFamily(fontName); +- tempFont.setPointSizeF(fontSize); +- setFont(tempFont); +- /*! +- * \bug +- * if we set app font, qwizard title's font will +- * become very small. I handle the wizard title +- * in ProxyStyle::polish(). +- */ +- //Skip QGuiApplication avoid it crash when we setfont +- if (qApp->applicationName().toLower().contains(QLatin1String("kwin"))) { +- QDBusConnection::sessionBus().connect(QString(), +- QStringLiteral("/UKUIPlatformTheme"), +- QStringLiteral("org.ukui.UKUIPlatformTheme"), +- QStringLiteral("refreshFonts"), +- this, +- SLOT(slotChangeStyle(QString))); +- } +- +- connect(settings, &QGSettings::changed, this, &APPParameter::slotChangeStyle); +- } +- +-} +- +-APPParameter::~APPParameter() +-{ +- +-} +- +-APPParameter* APPParameter::qmlAttachedProperties(QObject* parent) +-{ +- auto p = qobject_cast<QQuickItem*>(parent); +- return new APPParameter(p); +-} +- +-const QFont &APPParameter::font() const +-{ +- return m_font; +-} +- +-void APPParameter::setFont(const QFont &newFont) +-{ +- if (m_font == newFont) +- return; +- m_font = newFont; +- emit fontChanged(); +-} +- +-void APPParameter::slotChangeStyle(const QString& key) +-{ +- auto settings = UKUIStyleSettings::globalInstance(); +-// if (key == "iconThemeName" || key == "icon-theme-name") { +-// QString icontheme = settings->get("icon-theme-name").toString(); +- +-// QIcon::setThemeName(icontheme); +- +-// QIcon icon = qApp->windowIcon(); +-// qApp->setWindowIcon(QIcon::fromTheme(icon.name())); +-// // update all widgets for repaint new themed icons. +-// for (auto widget : QApplication::allWidgets()) { +-// widget->update(); +-// } +-// } +- +- if (key == "systemFont" || key == "system-font") { +- //Skip QGuiApplication avoid it crash when we setfont +- auto *app = qobject_cast<QApplication *>(qApp); +- if(app == nullptr) +- return; +- +- QString font = settings->get("system-font").toString(); +- +- QFontDatabase db; +- int id = 0; +- if (!db.families().contains(font)) { +- PlatformThemeFontData fontData; +- QMap<QString, QString> fontMap = fontData.getAllFontInformation(); +- if(fontMap.contains(font)){ +- auto iter = fontMap.find(font); +- id = QFontDatabase::addApplicationFont(iter.value()); +- } +- } +- +- QFontDatabase newDb; +- if (newDb.families().contains(font)) { +- QFont tempFont = font; +- setFont(tempFont); +- } +- } +- if (key == "systemFontSize" || key == "system-font-size") { +- //Skip QGuiApplication avoid it crash when we setfont +- auto *app = qobject_cast<QApplication *>(qApp); +- if(app == nullptr) +- return; +- +- if (qApp->property("noChangeSystemFontSize").isValid() && qApp->property("noChangeSystemFontSize").toBool()) +- return; +- double fontSize = settings->get("system-font-size").toString().toDouble(); +- if (fontSize > 0) { +- QFont oldFont = QApplication::font(); +- +- QFont tempFont = m_font; +- tempFont.setPointSize(fontSize); +- setFont(tempFont); +- } +- } +-} +- +-const QPalette &APPParameter::palette() const +-{ +- return m_palette; +-} +- +- +-void APPParameter::setPalette(const QPalette &newPalette) +-{ +- if (m_palette == newPalette) +- return; +- m_palette = newPalette; +- emit paletteChanged(); +-} +diff --git a/ukui-qml-style-helper/styleparameter/appparameter.cpp b/ukui-qml-style-helper/styleparameter/appparameter.cpp +new file mode 100644 +index 0000000..6d3d483 +--- /dev/null ++++ b/ukui-qml-style-helper/styleparameter/appparameter.cpp +@@ -0,0 +1,224 @@ ++#include "appparameter.h" ++#include <QDebug> ++#include <QApplication> ++#include <QGSettings> ++#include <QFontDatabase> ++#include <QIcon> ++#include <QDBusConnection> ++ ++#include "settings/ukui-style-settings.h" ++#include "../../qt5-ukui-platformtheme/platform-theme-fontdata.h" ++ ++using namespace UKUIQQC2Style; ++APPParameter::APPParameter(QQuickItem *parent) : QQuickItem(parent) ++{ ++ if(!qApp) ++ return; ++ m_font = QApplication::font(); ++ m_palette = QApplication::palette(); ++ ++ ++ if (QGSettings::isSchemaInstalled("org.ukui.style")) { ++ auto settings = UKUIStyleSettings::globalInstance(); ++ ++ auto opacity = settings->get("menuTransparency").toInt()/100.0; ++ setMenuTransparency(opacity); ++ ++ //set font ++ auto fontName = settings->get("systemFont").toString(); ++ auto fontSize = settings->get("systemFontSize").toString().toDouble(); ++ if (qApp->property("noChangeSystemFontSize").isValid() && qApp->property("noChangeSystemFontSize").toBool()) ++ fontSize = 11; ++ QFont tempFont = m_font; ++ tempFont.setFamily(fontName); ++ tempFont.setPointSizeF(fontSize); ++ setFont(tempFont); ++ ++ auto styleName = settings->get("styleName").toString(); ++ ++ if (styleName == "ukui-default" || styleName == "ukui-light" || styleName == "ukui-white" || styleName == "ukui" || styleName == "ukui-config") ++ setIsDark(false); ++ else if(styleName == "ukui-black" || styleName == "ukui-dark" ) ++ { ++ setIsDark(true); ++ ++ } ++ ++ /*! ++ * \bug ++ * if we set app font, qwizard title's font will ++ * become very small. I handle the wizard title ++ * in ProxyStyle::polish(). ++ */ ++ //Skip QGuiApplication avoid it crash when we setfont ++ if (qApp->applicationName().toLower().contains(QLatin1String("kwin"))) { ++ QDBusConnection::sessionBus().connect(QString(), ++ QStringLiteral("/UKUIPlatformTheme"), ++ QStringLiteral("org.ukui.UKUIPlatformTheme"), ++ QStringLiteral("refreshFonts"), ++ this, ++ SLOT(slotChangeStyle(QString))); ++ } ++ ++ connect(settings, &QGSettings::changed, this, [&](const QString& key){ ++ slotChangeStyle(key); ++ setPalette(QApplication::palette()); ++ emit parametryChanged(); ++ }); ++ } ++ ++ connect(qApp, &QApplication::paletteChanged, [=](const QPalette &pal){ ++ setPalette(pal); ++ emit parametryChanged(); ++ }); ++ ++ if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) ++ return; ++ TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); ++ setWindowColor(token->getInstance()->windowActive()); ++ connect(token->getInstance(), &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ ++ setWindowColor(token->getInstance()->windowActive()); ++ emit parametryChanged(); ++ }); ++ ++} ++ ++APPParameter::~APPParameter() ++{ ++ ++} ++ ++APPParameter* APPParameter::qmlAttachedProperties(QObject* parent) ++{ ++ auto p = qobject_cast<QQuickItem*>(parent); ++ return new APPParameter(p); ++} ++ ++const QFont &APPParameter::font() const ++{ ++ return m_font; ++} ++ ++void APPParameter::setFont(const QFont &newFont) ++{ ++ if (m_font == newFont) ++ return; ++ m_font = newFont; ++ emit fontChanged(); ++} ++ ++void APPParameter::slotChangeStyle(const QString& key) ++{ ++ auto settings = UKUIStyleSettings::globalInstance(); ++ if(key == "menuTransparency"){ ++ auto opacity = settings->get("menuTransparency").toInt()/100.0; ++ setMenuTransparency(opacity); ++ } ++ ++// if (key == "iconThemeName" || key == "icon-theme-name") { ++// QString icontheme = settings->get("icon-theme-name").toString(); ++ ++// QIcon::setThemeName(icontheme); ++ ++// QIcon icon = qApp->windowIcon(); ++// qApp->setWindowIcon(QIcon::fromTheme(icon.name())); ++// // update all widgets for repaint new themed icons. ++// for (auto widget : QApplication::allWidgets()) { ++// widget->update(); ++// } ++// } ++ if(key == "styleName" || key == "style-name"){ ++ auto styleName = settings->get("styleName").toString(); ++ ++ if (styleName == "ukui-default" || styleName == "ukui-light" || styleName == "ukui-white" || styleName == "ukui" || styleName == "ukui-config") ++ setIsDark(false); ++ else if(styleName == "ukui-black" || styleName == "ukui-dark" ) ++ { ++ setIsDark(true); ++ ++ } ++ } ++ ++ if (key == "systemFont" || key == "system-font") { ++ //Skip QGuiApplication avoid it crash when we setfont ++ auto *app = qobject_cast<QApplication *>(qApp); ++ if(app == nullptr) ++ return; ++ ++ QString font = settings->get("system-font").toString(); ++ ++ QFontDatabase db; ++ int id = 0; ++ if (!db.families().contains(font)) { ++ PlatformThemeFontData fontData; ++ QMap<QString, QString> fontMap = fontData.getAllFontInformation(); ++ if(fontMap.contains(font)){ ++ auto iter = fontMap.find(font); ++ id = QFontDatabase::addApplicationFont(iter.value()); ++ } ++ } ++ ++ QFontDatabase newDb; ++ if (newDb.families().contains(font)) { ++ QFont tempFont = font; ++ setFont(tempFont); ++ } ++ } ++ if (key == "systemFontSize" || key == "system-font-size") { ++ //Skip QGuiApplication avoid it crash when we setfont ++ auto *app = qobject_cast<QApplication *>(qApp); ++ if(app == nullptr) ++ return; ++ ++ if (qApp->property("noChangeSystemFontSize").isValid() && qApp->property("noChangeSystemFontSize").toBool()) ++ return; ++ double fontSize = settings->get("system-font-size").toString().toDouble(); ++ if (fontSize > 0) { ++ QFont oldFont = QApplication::font(); ++ ++ QFont tempFont = m_font; ++ tempFont.setPointSize(fontSize); ++ setFont(tempFont); ++ } ++ } ++} ++ ++const QPalette &APPParameter::palette() const ++{ ++ return m_palette; ++} ++ ++ ++void APPParameter::setPalette(const QPalette &newPalette) ++{ ++ if (m_palette == newPalette) ++ return; ++ m_palette = newPalette; ++ emit paletteChanged(); ++} ++ ++double APPParameter::menuTransparency() const ++{ ++ return m_menuTransparency; ++} ++ ++void APPParameter::setMenuTransparency(double newMenuTransparency) ++{ ++ if (qFuzzyCompare(m_menuTransparency, newMenuTransparency)) ++ return; ++ m_menuTransparency = newMenuTransparency; ++ emit menuTransparencyChanged(); ++} ++ ++const QBrush &APPParameter::windowColor() const ++{ ++ return m_windowColor; ++} ++ ++void APPParameter::setWindowColor(const QBrush &newWindowColor) ++{ ++ if (m_windowColor == newWindowColor) ++ return; ++ m_windowColor = newWindowColor; ++ emit windowColorChanged(); ++} +diff --git a/ukui-qml-style-helper/styleparameter/appparameter.h b/ukui-qml-style-helper/styleparameter/appparameter.h +index d4dc67a..b27eac9 100644 +--- a/ukui-qml-style-helper/styleparameter/appparameter.h ++++ b/ukui-qml-style-helper/styleparameter/appparameter.h +@@ -28,6 +28,7 @@ + #include <QFont> + #include <QPalette> + #include <QQuickItem> ++#include "tokenparameter.h" + + namespace UKUIQQC2Style { + +@@ -39,6 +40,10 @@ class APPParameter : public QQuickItem + Q_PROPERTY(QPalette palette READ palette WRITE setPalette NOTIFY paletteChanged) + Q_PROPERTY(int iconWidth READ iconWidth WRITE setIconWidth NOTIFY iconWidthChanged) + Q_PROPERTY(int space READ space WRITE setSpace NOTIFY spaceChanged) ++ Q_PROPERTY(bool isDark READ isDark WRITE setIsDark NOTIFY isDarkChanged) ++ Q_PROPERTY(double menuTransparency READ menuTransparency WRITE setMenuTransparency NOTIFY menuTransparencyChanged) ++ Q_PROPERTY(QBrush windowColor READ windowColor WRITE setWindowColor NOTIFY windowColorChanged) ++ + + public: + explicit APPParameter(QQuickItem *parent = nullptr); +@@ -58,6 +63,15 @@ public: + int space() const; + void setSpace(int newSpace); + ++ bool isDark() const; ++ void setIsDark(bool newIsDark); ++ ++ double menuTransparency() const; ++ void setMenuTransparency(double newMenuTransparency); ++ ++ const QBrush &windowColor() const; ++ void setWindowColor(const QBrush &newWindowColor); ++ + public slots: + + void slotChangeStyle(const QString& key); +@@ -65,18 +79,28 @@ public slots: + signals: + void fontChanged(); + +- + void paletteChanged(); + + void iconWidthChanged(); + + void spaceChanged(); + ++ void isDarkChanged(); ++ ++ void parametryChanged(); ++ ++ void menuTransparencyChanged(); ++ ++ void windowColorChanged(); ++ + private: + QFont m_font; + QPalette m_palette; + int m_iconWidth = 16; + int m_space = 8; ++ bool m_isDark = false; ++ double m_menuTransparency; ++ QBrush m_windowColor; + }; + + inline int APPParameter::iconWidth() const +@@ -106,6 +130,19 @@ inline void APPParameter::setSpace(int newSpace) + emit spaceChanged(); + } + ++inline bool APPParameter::isDark() const ++{ ++ return m_isDark; ++} ++ ++inline void APPParameter::setIsDark(bool newIsDark) ++{ ++ if (m_isDark == newIsDark) ++ return; ++ m_isDark = newIsDark; ++ emit isDarkChanged(); ++} ++ + } + QML_DECLARE_TYPEINFO(UKUIQQC2Style::APPParameter, QML_HAS_ATTACHED_PROPERTIES) + +diff --git a/ukui-qml-style-helper/styleparameter/icon.h b/ukui-qml-style-helper/styleparameter/icon.h +index b1bab7b..294ee06 100644 +--- a/ukui-qml-style-helper/styleparameter/icon.h ++++ b/ukui-qml-style-helper/styleparameter/icon.h +@@ -39,7 +39,7 @@ class Icon : public QObject + public: + explicit Icon(QObject *parent = nullptr); + +- enum Mode { Normal, Disabled, Hovered, Selected }; ++ enum Mode { Normal, Disabled, Hovered, Selected, Highlight }; + + }; + } +diff --git a/ukui-qml-style-helper/styleparameter/imageprovider.cpp b/ukui-qml-style-helper/styleparameter/imageprovider.cpp +index dfb1f51..f389aca 100644 +--- a/ukui-qml-style-helper/styleparameter/imageprovider.cpp ++++ b/ukui-qml-style-helper/styleparameter/imageprovider.cpp +@@ -34,7 +34,7 @@ QIcon IconHelper::loadIcon(const QString &id) + + bool isOk = false; + QString path = toLocalPath(id); +- qDebug() << "path......" << id << path; ++ //qDebug() << "path......" << id << path; + if (!path.isEmpty()) { + QPixmap pixmap; + isOk = loadPixmap(path, pixmap); +@@ -43,6 +43,14 @@ QIcon IconHelper::loadIcon(const QString &id) + } + + } ++ if(!isOk) { ++ QString idStr = id; ++ if(idStr.startsWith("qrc:/")){ ++ idStr = idStr.remove(0,5); ++ } ++ isOk = loadThemeIcon(idStr, icon); ++ } ++ + if (!isOk) { + loadDefaultIcon(icon); + } +@@ -132,15 +140,20 @@ bool IconHelper::isLocalFile(const QUrl &url) + + QPixmap IconHelper::generatePixMap(const QString &id, Icon::Mode mode, const QSize &requestedSize, QSize defaultSize) + { ++ //qDebug() << "generatePixMap ......"; + QIcon icon = IconHelper::loadIcon(id); ++ //qDebug() << "model...." << mode; + QPixmap pixmap = icon.pixmap(requestedSize.isEmpty() ? defaultSize : requestedSize); ++ if(!HighLightEffect::isPixmapPureColor(pixmap) || !HighLightEffect::isSymbolicColor(pixmap)){ ++ //qDebug() << "not isSymbolicColor..." << HighLightEffect::isPixmapPureColor(pixmap) << HighLightEffect::isSymbolicColor(pixmap); ++ return pixmap; ++ } + if(mode == Icon::Disabled){ + // Icon *icon = new Icon(); +- qDebug() << "disable 000000000..............."; + pixmap = generatedDisablePixmap(pixmap); +- qDebug() << "disable 111111111111111..............."; + } +- else if(mode == Icon::Selected){ ++ else if(mode == Icon::Highlight){ ++ //qDebug() << "hightlight mode......."; + pixmap = generatedHightlightPixmap(pixmap); + + } +@@ -238,7 +251,7 @@ QPixmap IconHelper::generatedHightlightPixmap(QPixmap pixmap) + + ImageProvider::ImageProvider() : QQuickImageProvider(QQuickImageProvider::Pixmap) + { +- qDebug() << "ImageProvider............."; ++ //qDebug() << "ImageProvider............."; + } + + //requestPixmap函数的重写,在qml中使用source加载图片时会自动调用requestPixmap或requestImage函数(根据图片类型不同),返回QPixmap或QImage对象 +@@ -250,7 +263,12 @@ QPixmap ImageProvider::requestPixmap(const QString &id, QSize *size, const QSize + iconID = id.left(lastIndex); + model = id.right(id.length() - lastIndex - 1); + } +- qDebug() << "requestPixmap............model:" << model << "...iconID......." << iconID; ++ if(model != "normal" && model != "disenable" && model != "clicked" && model != "hover" && model != "highlight"){ ++ iconID = id; ++ model = ""; ++ } ++ //qDebug() << "requestPixmap...." << model << iconID; ++ + + Icon::Mode im = Icon::Mode::Normal; + if(model == "disenable") +@@ -259,6 +277,8 @@ QPixmap ImageProvider::requestPixmap(const QString &id, QSize *size, const QSize + im = Icon::Selected; + else if(model == "hover") + im = Icon::Hovered; ++ else if(model == "highlight") ++ im = Icon::Highlight; + + QPixmap pixmap = IconHelper::generatePixMap(iconID, im, requestedSize, defaultSize); + +diff --git a/ukui-qml-style-helper/styleparameter/parsecolorinterface.cpp b/ukui-qml-style-helper/styleparameter/parsecolorinterface.cpp +new file mode 100644 +index 0000000..3925658 +--- /dev/null ++++ b/ukui-qml-style-helper/styleparameter/parsecolorinterface.cpp +@@ -0,0 +1,78 @@ ++#include "parsecolorinterface.h" ++#include "qdebug.h" ++#include "qpixmap.h" ++#include "qimage.h" ++#include <QFile> ++#include <QSize> ++#include <QApplication> ++#include <QPalette> ++#include <QColor> ++#include <qmath.h> ++ ++using namespace UKUIQQC2Style; ++ ++ ++ParseColorInterface::ParseColorInterface(QObject *parent):QObject(parent) ++{ ++ ++} ++ ++ParseColorInterface* ParseColorInterface::qmlAttachedProperties(QObject* parent) ++{ ++ auto p = qobject_cast<QObject*>(parent); ++ return new ParseColorInterface(p); ++} ++ ++ ++bool ParseColorInterface::isSolidPattern(QVariant dtColor) ++{ ++ if(dtColor.canConvert<QBrush>()){ ++ QBrush c = dtColor.value<QBrush>(); ++ if(c.style() == Qt::SolidPattern || c.style() == Qt::NoBrush) ++ return true; ++ if(c.style() == Qt::LinearGradientPattern && c.gradient() && c.gradient()->stops().length() == 2){ ++ if(c.gradient()->stops().at(0).second != c.gradient()->stops().at(1).second) ++ return false; ++ } ++ return true; ++ } ++ return false; ++} ++ ++QColor ParseColorInterface::startColor(QVariant dtColor) ++{ ++ if(dtColor.canConvert<QBrush>()){ ++ QBrush c = dtColor.value<QBrush>(); ++ if(c.gradient() && c.gradient()->stops().length() >= 1) ++ return c.gradient()->stops().at(0).second; ++ else ++ return c.color(); ++ } ++ else if(dtColor.canConvert<QColor>()) ++ return dtColor.value<QColor>(); ++ return QColor(); ++} ++ ++QColor ParseColorInterface::endColor(QVariant dtColor) ++{ ++ if(dtColor.canConvert<QBrush>()){ ++ QBrush c = dtColor.value<QBrush>(); ++ if(c.gradient() && c.gradient()->stops().length() == 2) ++ return c.gradient()->stops().at(1).second; ++ else ++ return c.color(); ++ } ++ else if(dtColor.canConvert<QColor>()) ++ return dtColor.value<QColor>(); ++ return QColor(); ++} ++ ++QString ParseColorInterface::endString(QString s, QString lastS) ++{ ++ int lastIndex = s.lastIndexOf(lastS); ++ QString returnS; ++ if(lastIndex != -1){ ++ returnS = s.right(s.length() - lastIndex - 1); ++ } ++ return returnS; ++} +diff --git a/ukui-qml-style-helper/styleparameter/parsecolorinterface.h b/ukui-qml-style-helper/styleparameter/parsecolorinterface.h +new file mode 100644 +index 0000000..bf8244c +--- /dev/null ++++ b/ukui-qml-style-helper/styleparameter/parsecolorinterface.h +@@ -0,0 +1,63 @@ ++/* ++ * Qt5-UKUI's Library ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 3 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this library. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Yan Wang <wangyan@kylinos.cn> ++ * ++ */ ++ ++#ifndef PARSEDTCOLOR_H ++#define PARSEDTCOLOR_H ++ ++#include <QObject> ++#include "../../ukui-styles/readconfig.h" ++#include <QColor> ++#include <QPen> ++ ++using namespace UKUIGlobalDTConfig; ++namespace UKUIQQC2Style { ++ ++struct ColorStruct{ ++ bool isSolidPattern = true; ++ QColor startColor; ++ QColor endColor; ++}; ++ ++class ParseColorInterface : public QObject ++{ ++ Q_OBJECT ++ ++public: ++ explicit ParseColorInterface(QObject *parent = nullptr); ++ ++ static ParseColorInterface* qmlAttachedProperties(QObject* parent); ++ ++ Q_INVOKABLE bool isSolidPattern(QVariant dtColor); ++ ++ Q_INVOKABLE QColor startColor(QVariant dtColor); ++ ++ Q_INVOKABLE QColor endColor(QVariant dtColor); ++ ++ Q_INVOKABLE QString endString(QString s, QString lasts); ++ ++ ++}; ++} ++QML_DECLARE_TYPEINFO(UKUIQQC2Style::ParseColorInterface, QML_HAS_ATTACHED_PROPERTIES) ++QML_DECLARE_TYPEINFO(UKUIQQC2Style::ColorStruct, QML_HAS_ATTACHED_PROPERTIES) ++ ++#endif // PARSEDTCOLOR_H +diff --git a/ukui-qml-style-helper/styleparameter/parsedtcolor.cpp b/ukui-qml-style-helper/styleparameter/parsedtcolor.cpp +deleted file mode 100644 +index 8de14a8..0000000 +--- a/ukui-qml-style-helper/styleparameter/parsedtcolor.cpp ++++ /dev/null +@@ -1,53 +0,0 @@ +-#include "parsedtcolor.h" +-#include "qdebug.h" +-#include "qpixmap.h" +-#include "qimage.h" +-#include <QFile> +-#include <QSize> +-#include <QApplication> +-#include <QPalette> +-#include <QColor> +-#include <qmath.h> +- +-using namespace UKUIQQC2Style; +- +- +-ParseDTColor::ParseDTColor(QObject *parent):QObject(parent) +-{ +- +-} +- +-ParseDTColor* ParseDTColor::qmlAttachedProperties(QObject* parent) +-{ +- auto p = qobject_cast<QObject*>(parent); +- return new ParseDTColor(p); +-} +- +- +-bool ParseDTColor::isSolidPattern(QVariant dtColor) +-{ +- if(dtColor.canConvert<DTColor>()){ +- DTColor c = dtColor.value<DTColor>(); +- return (c.colorType() == Qt::SolidPattern); +- } +- return false; +-} +- +-QColor ParseDTColor::startColor(QVariant dtColor) +-{ +- if(dtColor.canConvert<DTColor>()){ +- DTColor c = dtColor.value<DTColor>(); +- return c.mixStartColor(); +- } +- return QColor(); +-} +- +-QColor ParseDTColor::endColor(QVariant dtColor) +-{ +- if(dtColor.canConvert<DTColor>()){ +- DTColor c = dtColor.value<DTColor>(); +- return c.mixEndColor(); +- } +- return QColor(); +-} +- +diff --git a/ukui-qml-style-helper/styleparameter/parsedtcolor.h b/ukui-qml-style-helper/styleparameter/parsedtcolor.h +deleted file mode 100644 +index cbaf47f..0000000 +--- a/ukui-qml-style-helper/styleparameter/parsedtcolor.h ++++ /dev/null +@@ -1,61 +0,0 @@ +-/* +- * Qt5-UKUI's Library +- * +- * Copyright (C) 2023, KylinSoft Co., Ltd. +- * +- * This library is free software; you can redistribute it and/or +- * modify it under the terms of the GNU Lesser General Public +- * License as published by the Free Software Foundation; either +- * version 3 of the License, or (at your option) any later version. +- * +- * This library is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Lesser General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this library. If not, see <https://www.gnu.org/licenses/>. +- * +- * Authors: Yan Wang <wangyan@kylinos.cn> +- * +- */ +- +-#ifndef PARSEDTCOLOR_H +-#define PARSEDTCOLOR_H +- +-#include <QObject> +-#include "../../ukui-styles/dt-tmp-readconfig.h" +-#include <QColor> +-#include <QPen> +- +-using namespace UKUIGlobalDTConfig; +-namespace UKUIQQC2Style { +- +-struct DTColorStruct{ +- bool isSolidPattern = true; +- QColor startColor; +- QColor endColor; +-}; +- +-class ParseDTColor : public QObject +-{ +- Q_OBJECT +- +-public: +- explicit ParseDTColor(QObject *parent = nullptr); +- +- static ParseDTColor* qmlAttachedProperties(QObject* parent); +- +- Q_INVOKABLE bool isSolidPattern(QVariant dtColor); +- +- Q_INVOKABLE QColor startColor(QVariant dtColor); +- +- Q_INVOKABLE QColor endColor(QVariant dtColor); +- +- +-}; +-} +-QML_DECLARE_TYPEINFO(UKUIQQC2Style::ParseDTColor, QML_HAS_ATTACHED_PROPERTIES) +-QML_DECLARE_TYPEINFO(UKUIQQC2Style::DTColorStruct, QML_HAS_ATTACHED_PROPERTIES) +- +-#endif // PARSEDTCOLOR_H +diff --git a/ukui-qml-style-helper/styleparameter/tokenparameter.cpp b/ukui-qml-style-helper/styleparameter/tokenparameter.cpp +index c8d7691..c37c134 100644 +--- a/ukui-qml-style-helper/styleparameter/tokenparameter.cpp ++++ b/ukui-qml-style-helper/styleparameter/tokenparameter.cpp +@@ -22,6 +22,7 @@ UKUIGlobalDTConfig::GlobalDTConfig* TokenParameter:: getInstance() + { + if(dt == nullptr) + dt = new UKUIGlobalDTConfig::GlobalDTConfig(); ++ + return dt; + } + +diff --git a/ukui-qml-style-helper/styleparameter/tokenparameter.h b/ukui-qml-style-helper/styleparameter/tokenparameter.h +index 5f29cb0..7e1742e 100644 +--- a/ukui-qml-style-helper/styleparameter/tokenparameter.h ++++ b/ukui-qml-style-helper/styleparameter/tokenparameter.h +@@ -51,7 +51,7 @@ public slots: + + private: + +- UKUIGlobalDTConfig::GlobalDTConfig* dt; ++ UKUIGlobalDTConfig::GlobalDTConfig* dt = nullptr; + // UKUIButton m_button; + }; + } +diff --git a/ukui-qml-style-helper/styleparameter/ukuibutton.cpp b/ukui-qml-style-helper/styleparameter/ukuibutton.cpp +index df773c2..6a2918d 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuibutton.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuibutton.cpp +@@ -6,18 +6,19 @@ using namespace UKUIQQC2Style; + UKUIButton::UKUIButton(QQuickItem *parent) : QQuickItem(parent) + { + { +- m_normalBC = DTColor(QColor("#E6E6E6")); +- m_clickedBC = DTColor(QColor("#B9B9B9")); +- m_hoveredBC = DTColor(QColor("#DCDCDC")); +- m_disableBC = DTColor(QColor("#EEEEEE")); +- m_disableTextColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.35)); +- m_normalTextColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.85)); +- m_normalHBC = DTColor(QColor("#3790FA")); +- m_clickedHBC = DTColor(QColor("#3790FA")); +- m_hoveredHBC = DTColor(QColor("#3790FA")); +- m_disableHBC = DTColor(QColor("#EEEEEE")); ++ m_normalBC = QBrush(QColor("#E6E6E6")); ++ m_clickedBC = QBrush(QColor("#B9B9B9")); ++ m_hoveredBC = QBrush(QColor("#DCDCDC")); ++ m_disableBC = QBrush(QColor("#EEEEEE")); ++ m_disableTextColor = QBrush(QColor::fromRgbF(0, 0, 0, 0.35)); ++ m_normalTextColor = QBrush(QColor::fromRgbF(0, 0, 0, 0.85)); ++ m_normalHBC = QBrush(QColor("#3790FA")); ++ m_clickedHBC = QBrush(QColor("#3790FA")); ++ m_hoveredHBC = QBrush(QColor("#3790FA")); ++ m_disableHBC = QBrush(QColor("#EEEEEE")); ++ m_highlightTextColor = QBrush(QColor("#FFFFFF")); ++ m_highlightTextDisableColor = QBrush(QColor::fromRgbF(0, 0, 0, 0.35)); + } +- qDebug() << "UKUIButton.............."; + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); +@@ -26,6 +27,10 @@ UKUIButton::UKUIButton(QQuickItem *parent) : QQuickItem(parent) + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); ++ ++ connect(qApp, &QApplication::paletteChanged, [=](const QPalette &pal){ ++ initParam(m_instance); ++ }); + } + + UKUIButton::~UKUIButton() +@@ -43,16 +48,24 @@ void UKUIButton::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + { + setNormalBC(instance->buttonActive()); + setClickedBC(instance->kComponentClick()); +- //setHoveredBC(instance->kComponentHover()); ++ setHoveredBC(instance->kComponentHover()); + setDisableBC(instance->buttonDisable()); + ++// qDebug() << "kComponentHover...." << instance->kComponentHover().gradient(); ++// if(instance->kComponentHover().gradient() && instance->kComponentHover().gradient()->stops().length() >= 2){ ++// qDebug() << "second0" << instance->kComponentHover().gradient()->stops().at(0).second; ++// qDebug() << "second1" << instance->kComponentHover().gradient()->stops().at(1).second; ++ ++// } + setNormalHBC(instance->highLightActive()); +- //setHoveredHBC(instance->kBrandHover()); ++ setHoveredHBC(instance->kBrandHover()); + setClickedHBC(instance->kBrandClick()); + setDisableHBC(instance->highLightDisable()); + + setNormalTextColor(instance->buttonTextActive()); + setDisableTextColor(instance->buttonTextDisable()); ++ setHighlightTextColor(instance->highLightedTextActive()); ++ setHighlightTextDisableColor(instance->highLightedTextDisable()); + + setBorderWidth(1); + setFocusBorderWidth(instance->focusline()); +@@ -66,7 +79,27 @@ void UKUIButton::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + setHoverBorderHColor(instance->kLineBrandHover()); + setDisableBorderHColor(instance->kLineBrandDisable()); + setFocusBorderColor(instance->kBrandFocus()); +- ++ setRadius(instance->kradiusNormal()); ++ ++ ++ setNormalCloseBC(instance->kGrayAlpha0()); ++ setClickedCloseBC(instance->kErrorClick()); ++ setHoveredClosedBC(instance->kErrorHover()); ++ setDisableCloseBC(instance->kGrayAlpha0()); ++ setNormalBorderCloseColor(instance->kLineComponentNormal()); ++ setHoverBorderCloseColor(instance->kLineComponentHover()); ++ setClickBorderCloseColor(instance->kLineComponentClick()); ++ setDisableBorderCloseColor(instance->kLineComponentDisable()); ++ ++ setNormalWindowBC(instance->kGrayAlpha0()); ++ setClickedWindowBC(instance->kComponentAlphaClick()); ++ setHoveredWindowdBC(instance->kComponentAlphaHover()); ++ setDisableWindowBC(instance->kGrayAlpha0()); ++ setNormalBorderWindowColor(instance->kLineComponentNormal()); ++ setHoverBorderWindowColor(instance->kLineComponentHover()); ++ setClickBorderWindowColor(instance->kLineComponentClick()); ++ setDisableBorderWindowColor(instance->kLineComponentDisable()); ++ emit parametryChanged(); + // qDebug() << "instance->highLightActive()..." << m_normalHBC.red() << m_normalHBC.green() << m_normalHBC.blue(); + // qDebug() << "instance->setHoveredHBC()..." << m_hoveredHBC.red() << m_hoveredHBC.green() << m_hoveredHBC.blue(); + } +@@ -150,12 +183,12 @@ void UKUIButton::setNormalHeight(int newNormalHeight) + emit normalHeightChanged(); + } + +-DTColor UKUIButton::normalBC() const ++QBrush UKUIButton::normalBC() const + { + return m_normalBC; + } + +-void UKUIButton::setNormalBC(DTColor newNormalBC) ++void UKUIButton::setNormalBC(QBrush newNormalBC) + { + if (m_normalBC != newNormalBC) + { +@@ -164,12 +197,12 @@ void UKUIButton::setNormalBC(DTColor newNormalBC) + } + } + +-DTColor UKUIButton::clickedBC() const ++QBrush UKUIButton::clickedBC() const + { + return m_clickedBC; + } + +-void UKUIButton::setClickedBC(DTColor newClickedBC) ++void UKUIButton::setClickedBC(QBrush newClickedBC) + { + if (m_clickedBC != newClickedBC){ + m_clickedBC = newClickedBC; +@@ -177,12 +210,12 @@ void UKUIButton::setClickedBC(DTColor newClickedBC) + } + } + +-DTColor UKUIButton::hoveredBC() const ++QBrush UKUIButton::hoveredBC() const + { + return m_hoveredBC; + } + +-void UKUIButton::setHoveredBC(DTColor newHoveredBC) ++void UKUIButton::setHoveredBC(QBrush newHoveredBC) + { + if (m_hoveredBC != newHoveredBC){ + m_hoveredBC = newHoveredBC; +@@ -190,12 +223,12 @@ void UKUIButton::setHoveredBC(DTColor newHoveredBC) + } + } + +-DTColor UKUIButton::disableBC() const ++QBrush UKUIButton::disableBC() const + { + return m_disableBC; + } + +-void UKUIButton::setDisableBC(DTColor newDisableBC) ++void UKUIButton::setDisableBC(QBrush newDisableBC) + { + if (m_disableBC != newDisableBC){ + m_disableBC = newDisableBC; +@@ -203,12 +236,12 @@ void UKUIButton::setDisableBC(DTColor newDisableBC) + } + } + +-DTColor UKUIButton::disableTextColor() const ++QBrush UKUIButton::disableTextColor() const + { + return m_disableTextColor; + } + +-void UKUIButton::setDisableTextColor(DTColor newDisableTextColor) ++void UKUIButton::setDisableTextColor(QBrush newDisableTextColor) + { + if (m_disableTextColor != newDisableTextColor){ + m_disableTextColor = newDisableTextColor; +@@ -216,12 +249,12 @@ void UKUIButton::setDisableTextColor(DTColor newDisableTextColor) + } + } + +-DTColor UKUIButton::normalTextColor() const ++QBrush UKUIButton::normalTextColor() const + { + return m_normalTextColor; + } + +-void UKUIButton::setNormalTextColor(DTColor newNormalTextColor) ++void UKUIButton::setNormalTextColor(QBrush newNormalTextColor) + { + if (m_normalTextColor != newNormalTextColor){ + m_normalTextColor = newNormalTextColor; +@@ -229,12 +262,12 @@ void UKUIButton::setNormalTextColor(DTColor newNormalTextColor) + } + } + +-DTColor UKUIButton::normalHBC() const ++QBrush UKUIButton::normalHBC() const + { + return m_normalHBC; + } + +-void UKUIButton::setNormalHBC(DTColor newNormalHBC) ++void UKUIButton::setNormalHBC(QBrush newNormalHBC) + { + if (m_normalHBC != newNormalHBC){ + m_normalHBC = newNormalHBC; +@@ -242,12 +275,12 @@ void UKUIButton::setNormalHBC(DTColor newNormalHBC) + } + } + +-DTColor UKUIButton::clickedHBC() const ++QBrush UKUIButton::clickedHBC() const + { + return m_clickedHBC; + } + +-void UKUIButton::setClickedHBC(DTColor newClickedHBC) ++void UKUIButton::setClickedHBC(QBrush newClickedHBC) + { + if (m_clickedHBC != newClickedHBC){ + m_clickedHBC = newClickedHBC; +@@ -255,12 +288,12 @@ void UKUIButton::setClickedHBC(DTColor newClickedHBC) + } + } + +-DTColor UKUIButton::hoveredHBC() ++QBrush UKUIButton::hoveredHBC() + { + return m_hoveredHBC; + } + +-void UKUIButton::setHoveredHBC(DTColor newHoveredHBC) ++void UKUIButton::setHoveredHBC(QBrush newHoveredHBC) + { + if (m_hoveredHBC != newHoveredHBC){ + m_hoveredHBC = newHoveredHBC; +@@ -268,12 +301,12 @@ void UKUIButton::setHoveredHBC(DTColor newHoveredHBC) + } + } + +-DTColor UKUIButton::disableHBC() const ++QBrush UKUIButton::disableHBC() const + { + return m_disableHBC; + } + +-void UKUIButton::setDisableHBC(DTColor newDisableHBC) ++void UKUIButton::setDisableHBC(QBrush newDisableHBC) + { + if (m_disableHBC != newDisableHBC){ + m_disableHBC = newDisableHBC; +@@ -294,12 +327,12 @@ void UKUIButton::setBorderWidth(int newBorderWidth) + emit borderWidthChanged(); + } + +-DTColor UKUIButton::normalBorderColor() const ++QBrush UKUIButton::normalBorderColor() const + { + return m_normalBorderColor; + } + +-void UKUIButton::setNormalBorderColor(DTColor newNormalBorderColor) ++void UKUIButton::setNormalBorderColor(QBrush newNormalBorderColor) + { + if (m_normalBorderColor != newNormalBorderColor){ + m_normalBorderColor = newNormalBorderColor; +@@ -307,12 +340,12 @@ void UKUIButton::setNormalBorderColor(DTColor newNormalBorderColor) + } + } + +-DTColor UKUIButton::hoverBorderColor() const ++QBrush UKUIButton::hoverBorderColor() const + { + return m_hoverBorderColor; + } + +-void UKUIButton::setHoverBorderColor(DTColor newHoverBorderColor) ++void UKUIButton::setHoverBorderColor(QBrush newHoverBorderColor) + { + if (m_hoverBorderColor != newHoverBorderColor){ + m_hoverBorderColor = newHoverBorderColor; +@@ -320,12 +353,12 @@ void UKUIButton::setHoverBorderColor(DTColor newHoverBorderColor) + } + } + +-DTColor UKUIButton::clickBorderColor() const ++QBrush UKUIButton::clickBorderColor() const + { + return m_clickBorderColor; + } + +-void UKUIButton::setClickBorderColor(DTColor newClickBorderColor) ++void UKUIButton::setClickBorderColor(QBrush newClickBorderColor) + { + if (m_clickBorderColor!= newClickBorderColor){ + m_clickBorderColor = newClickBorderColor; +@@ -333,12 +366,12 @@ void UKUIButton::setClickBorderColor(DTColor newClickBorderColor) + } + } + +-DTColor UKUIButton::disableBorderColor() const ++QBrush UKUIButton::disableBorderColor() const + { + return m_disableBorderColor; + } + +-void UKUIButton::setDisableBorderColor(DTColor newDisableBorderColor) ++void UKUIButton::setDisableBorderColor(QBrush newDisableBorderColor) + { + if (m_disableBorderColor != newDisableBorderColor){ + m_disableBorderColor = newDisableBorderColor; +@@ -346,12 +379,12 @@ void UKUIButton::setDisableBorderColor(DTColor newDisableBorderColor) + } + } + +-DTColor UKUIButton::normalBorderHColor() const ++QBrush UKUIButton::normalBorderHColor() const + { + return m_normalBorderHColor; + } + +-void UKUIButton::setNormalBorderHColor(DTColor newNormalBorderHColor) ++void UKUIButton::setNormalBorderHColor(QBrush newNormalBorderHColor) + { + if (m_normalBorderHColor != newNormalBorderHColor){ + m_normalBorderHColor = newNormalBorderHColor; +@@ -359,12 +392,12 @@ void UKUIButton::setNormalBorderHColor(DTColor newNormalBorderHColor) + } + } + +-DTColor UKUIButton::hoverBorderHColor() const ++QBrush UKUIButton::hoverBorderHColor() const + { + return m_hoverBorderHColor; + } + +-void UKUIButton::setHoverBorderHColor(DTColor newHoverBorderHColor) ++void UKUIButton::setHoverBorderHColor(QBrush newHoverBorderHColor) + { + if (m_hoverBorderHColor != newHoverBorderHColor){ + m_hoverBorderHColor = newHoverBorderHColor; +@@ -372,12 +405,12 @@ void UKUIButton::setHoverBorderHColor(DTColor newHoverBorderHColor) + } + } + +-DTColor UKUIButton::clickBorderHColor() const ++QBrush UKUIButton::clickBorderHColor() const + { + return m_clickBorderHColor; + } + +-void UKUIButton::setClickBorderHColor(DTColor newClickBorderHColor) ++void UKUIButton::setClickBorderHColor(QBrush newClickBorderHColor) + { + if (m_clickBorderHColor != newClickBorderHColor){ + m_clickBorderHColor = newClickBorderHColor; +@@ -385,12 +418,12 @@ void UKUIButton::setClickBorderHColor(DTColor newClickBorderHColor) + } + } + +-DTColor UKUIButton::disableBorderHColor() const ++QBrush UKUIButton::disableBorderHColor() const + { + return m_disableBorderHColor; + } + +-void UKUIButton::setDisableBorderHColor(DTColor newDisableBorderHColor) ++void UKUIButton::setDisableBorderHColor(QBrush newDisableBorderHColor) + { + if (m_disableBorderHColor != newDisableBorderHColor){ + m_disableBorderHColor = newDisableBorderHColor; +@@ -398,12 +431,12 @@ void UKUIButton::setDisableBorderHColor(DTColor newDisableBorderHColor) + } + } + +-DTColor UKUIButton::focusBorderColor() const ++QBrush UKUIButton::focusBorderColor() const + { + return m_focusBorderColor; + } + +-void UKUIButton::setFocusBorderColor(DTColor newFocusBorderColor) ++void UKUIButton::setFocusBorderColor(QBrush newFocusBorderColor) + { + if (m_focusBorderColor != newFocusBorderColor){ + m_focusBorderColor = newFocusBorderColor; +@@ -423,3 +456,237 @@ void UKUIButton::setFocusBorderWidth(int newFocusBorderWidth) + m_focusBorderWidth = newFocusBorderWidth; + emit focusBorderWidthChanged(); + } ++ ++QBrush UKUIButton::highlightTextColor() const ++{ ++ return m_highlightTextColor; ++} ++ ++void UKUIButton::setHighlightTextColor(QBrush newHighlightTextColor) ++{ ++ if (m_highlightTextColor == newHighlightTextColor) ++ return; ++ m_highlightTextColor = newHighlightTextColor; ++ emit highlightTextColorChanged(); ++} ++ ++QBrush UKUIButton::highlightTextDisableColor() const ++{ ++ return m_highlightTextDisableColor; ++} ++ ++void UKUIButton::setHighlightTextDisableColor(QBrush newHighlightTextDisableColor) ++{ ++ if (m_highlightTextDisableColor == newHighlightTextDisableColor) ++ return; ++ m_highlightTextDisableColor = newHighlightTextDisableColor; ++ emit highlightTextDisableColorChanged(); ++} ++ ++const QBrush &UKUIButton::normalCloseBC() const ++{ ++ return m_normalCloseBC; ++} ++ ++void UKUIButton::setNormalCloseBC(const QBrush &newNormalCloseBC) ++{ ++ if (m_normalCloseBC == newNormalCloseBC) ++ return; ++ m_normalCloseBC = newNormalCloseBC; ++ emit normalCloseBCChanged(); ++} ++ ++const QBrush &UKUIButton::clickedCloseBC() const ++{ ++ return m_clickedCloseBC; ++} ++ ++void UKUIButton::setClickedCloseBC(const QBrush &newClickedCloseBC) ++{ ++ if (m_clickedCloseBC == newClickedCloseBC) ++ return; ++ m_clickedCloseBC = newClickedCloseBC; ++ emit clickedCloseBCChanged(); ++} ++ ++const QBrush &UKUIButton::hoveredCloseBC() const ++{ ++ return m_hoveredCloseBC; ++} ++ ++void UKUIButton::setHoveredClosedBC(const QBrush &newHoveredCloseBC) ++{ ++ if (m_hoveredCloseBC == newHoveredCloseBC) ++ return; ++ m_hoveredCloseBC = newHoveredCloseBC; ++ emit hoveredCloseBCChanged(); ++} ++ ++const QBrush &UKUIButton::disableCloseBC() const ++{ ++ return m_disableCloseBC; ++} ++ ++void UKUIButton::setDisableCloseBC(const QBrush &newDisableCloseBC) ++{ ++ if (m_disableCloseBC == newDisableCloseBC) ++ return; ++ m_disableCloseBC = newDisableCloseBC; ++ emit disableCloseBCChanged(); ++} ++ ++const QBrush &UKUIButton::normalBorderCloseColor() const ++{ ++ return m_normalBorderCloseColor; ++} ++ ++void UKUIButton::setNormalBorderCloseColor(const QBrush &newNormalBorderCloseColor) ++{ ++ if (m_normalBorderCloseColor == newNormalBorderCloseColor) ++ return; ++ m_normalBorderCloseColor = newNormalBorderCloseColor; ++ emit normalBorderCloseColorChanged(); ++} ++ ++const QBrush &UKUIButton::hoverBorderCloseColor() const ++{ ++ return m_hoverBorderCloseColor; ++} ++ ++void UKUIButton::setHoverBorderCloseColor(const QBrush &newHoverBorderCloseColor) ++{ ++ if (m_hoverBorderCloseColor == newHoverBorderCloseColor) ++ return; ++ m_hoverBorderCloseColor = newHoverBorderCloseColor; ++ emit hoverBorderCloseColorChanged(); ++} ++ ++const QBrush &UKUIButton::clickBorderCloseColor() const ++{ ++ return m_clickBorderCloseColor; ++} ++ ++void UKUIButton::setClickBorderCloseColor(const QBrush &newClickBorderCloseColor) ++{ ++ if (m_clickBorderCloseColor == newClickBorderCloseColor) ++ return; ++ m_clickBorderCloseColor = newClickBorderCloseColor; ++ emit clickBorderCloseColorChanged(); ++} ++ ++const QBrush &UKUIButton::disableBorderCloseColor() const ++{ ++ return m_disableBorderCloseColor; ++} ++ ++void UKUIButton::setDisableBorderCloseColor(const QBrush &newDisableBorderCloseColor) ++{ ++ if (m_disableBorderCloseColor == newDisableBorderCloseColor) ++ return; ++ m_disableBorderCloseColor = newDisableBorderCloseColor; ++ emit disableBorderCloseColorChanged(); ++} ++ ++const QBrush &UKUIButton::normalWindowBC() const ++{ ++ return m_normalWindowBC; ++} ++ ++void UKUIButton::setNormalWindowBC(const QBrush &newNormalWindowBC) ++{ ++ if (m_normalWindowBC == newNormalWindowBC) ++ return; ++ m_normalWindowBC = newNormalWindowBC; ++ emit normalWindowBCChanged(); ++} ++ ++const QBrush &UKUIButton::clickedWindowBC() const ++{ ++ return m_clickedWindowBC; ++} ++ ++void UKUIButton::setClickedWindowBC(const QBrush &newClickedWindowBC) ++{ ++ if (m_clickedWindowBC == newClickedWindowBC) ++ return; ++ m_clickedWindowBC = newClickedWindowBC; ++ emit clickedWindowBCChanged(); ++} ++ ++const QBrush &UKUIButton::hoveredWindowBC() const ++{ ++ return m_hoveredWindowBC; ++} ++ ++void UKUIButton::setHoveredWindowdBC(const QBrush &newHoveredWindowBC) ++{ ++ if (m_hoveredWindowBC == newHoveredWindowBC) ++ return; ++ m_hoveredWindowBC = newHoveredWindowBC; ++ emit hoveredWindowBCChanged(); ++} ++ ++const QBrush &UKUIButton::disableWindowBC() const ++{ ++ return m_disableWindowBC; ++} ++ ++void UKUIButton::setDisableWindowBC(const QBrush &newDisableWindowBC) ++{ ++ if (m_disableWindowBC == newDisableWindowBC) ++ return; ++ m_disableWindowBC = newDisableWindowBC; ++ emit disableWindowBCChanged(); ++} ++ ++const QBrush &UKUIButton::normalBorderWindowColor() const ++{ ++ return m_normalBorderWindowColor; ++} ++ ++void UKUIButton::setNormalBorderWindowColor(const QBrush &newNormalBorderWindowColor) ++{ ++ if (m_normalBorderWindowColor == newNormalBorderWindowColor) ++ return; ++ m_normalBorderWindowColor = newNormalBorderWindowColor; ++ emit normalBorderWindowColorChanged(); ++} ++ ++const QBrush &UKUIButton::hoverBorderWindowColor() const ++{ ++ return m_hoverBorderWindowColor; ++} ++ ++void UKUIButton::setHoverBorderWindowColor(const QBrush &newHoverBorderWindowColor) ++{ ++ if (m_hoverBorderWindowColor == newHoverBorderWindowColor) ++ return; ++ m_hoverBorderWindowColor = newHoverBorderWindowColor; ++ emit hoverBorderWindowColorChanged(); ++} ++ ++const QBrush &UKUIButton::clickBorderWindowColor() const ++{ ++ return m_clickBorderWindowColor; ++} ++ ++void UKUIButton::setClickBorderWindowColor(const QBrush &newClickBorderWindowColor) ++{ ++ if (m_clickBorderWindowColor == newClickBorderWindowColor) ++ return; ++ m_clickBorderWindowColor = newClickBorderWindowColor; ++ emit clickBorderWindowColorChanged(); ++} ++ ++const QBrush &UKUIButton::disableBorderWindowColor() const ++{ ++ return m_disableBorderWindowColor; ++} ++ ++void UKUIButton::setDisableBorderWindowColor(const QBrush &newDisableBorderWindowColor) ++{ ++ if (m_disableBorderWindowColor == newDisableBorderWindowColor) ++ return; ++ m_disableBorderWindowColor = newDisableBorderWindowColor; ++ emit disableBorderWindowColorChanged(); ++} +diff --git a/ukui-qml-style-helper/styleparameter/ukuibutton.h b/ukui-qml-style-helper/styleparameter/ukuibutton.h +index ed830be..84a293f 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuibutton.h ++++ b/ukui-qml-style-helper/styleparameter/ukuibutton.h +@@ -28,7 +28,7 @@ + #include <QFont> + #include <QQuickItem> + #include "tokenparameter.h" +-#include "parsedtcolor.h" ++#include "parsecolorinterface.h" + + using namespace UKUIGlobalDTConfig; + namespace UKUIQQC2Style { +@@ -43,31 +43,53 @@ class UKUIButton : public QQuickItem + Q_PROPERTY(double space READ space WRITE setSpace NOTIFY spaceChanged) + Q_PROPERTY(int normalWidth READ normalWidth WRITE setNormalWidth NOTIFY normalWidthChanged) + Q_PROPERTY(int normalHeight READ normalHeight WRITE setNormalHeight NOTIFY normalHeightChanged) +- Q_PROPERTY(DTColor normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) +- Q_PROPERTY(DTColor clickedBC READ clickedBC WRITE setClickedBC NOTIFY clickedBCChanged) +- Q_PROPERTY(DTColor hoveredBC READ hoveredBC WRITE setHoveredBC NOTIFY hoveredBCChanged) +- Q_PROPERTY(DTColor disableBC READ disableBC WRITE setDisableBC NOTIFY disableBCChanged) +- Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) +- Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) ++ Q_PROPERTY(QBrush normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) ++ Q_PROPERTY(QBrush clickedBC READ clickedBC WRITE setClickedBC NOTIFY clickedBCChanged) ++ Q_PROPERTY(QBrush hoveredBC READ hoveredBC WRITE setHoveredBC NOTIFY hoveredBCChanged) ++ Q_PROPERTY(QBrush disableBC READ disableBC WRITE setDisableBC NOTIFY disableBCChanged) ++ Q_PROPERTY(QBrush disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) ++ Q_PROPERTY(QBrush normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) ++ Q_PROPERTY(QBrush highlightTextColor READ highlightTextColor WRITE setHighlightTextColor NOTIFY highlightTextColorChanged) ++ Q_PROPERTY(QBrush highlightTextDisableColor READ highlightTextDisableColor WRITE setHighlightTextDisableColor NOTIFY highlightTextDisableColorChanged) + + +- Q_PROPERTY(DTColor normalHBC READ normalHBC WRITE setNormalHBC NOTIFY normalHBCChanged) +- Q_PROPERTY(DTColor clickedHBC READ clickedHBC WRITE setClickedHBC NOTIFY clickedHBCChanged) +- Q_PROPERTY(DTColor hoveredHBC READ hoveredHBC WRITE setHoveredHBC NOTIFY hoveredHBCChanged) +- Q_PROPERTY(DTColor disableHBC READ disableHBC WRITE setDisableHBC NOTIFY disableHBCChanged) ++ Q_PROPERTY(QBrush normalHBC READ normalHBC WRITE setNormalHBC NOTIFY normalHBCChanged) ++ Q_PROPERTY(QBrush clickedHBC READ clickedHBC WRITE setClickedHBC NOTIFY clickedHBCChanged) ++ Q_PROPERTY(QBrush hoveredHBC READ hoveredHBC WRITE setHoveredHBC NOTIFY hoveredHBCChanged) ++ Q_PROPERTY(QBrush disableHBC READ disableHBC WRITE setDisableHBC NOTIFY disableHBCChanged) + + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) + Q_PROPERTY(int focusBorderWidth READ focusBorderWidth WRITE setFocusBorderWidth NOTIFY focusBorderWidthChanged) +- Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) +- Q_PROPERTY(DTColor hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) +- Q_PROPERTY(DTColor clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) +- Q_PROPERTY(DTColor disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) +- Q_PROPERTY(DTColor focusBorderColor READ focusBorderColor WRITE setFocusBorderColor NOTIFY focusBorderColorChanged) +- +- Q_PROPERTY(DTColor normalBorderHColor READ normalBorderHColor WRITE setNormalBorderHColor NOTIFY normalBorderHColorChanged) +- Q_PROPERTY(DTColor hoverBorderHColor READ hoverBorderHColor WRITE setHoverBorderHColor NOTIFY hoverBorderHColorChanged) +- Q_PROPERTY(DTColor clickBorderHColor READ clickBorderHColor WRITE setClickBorderHColor NOTIFY clickBorderHColorChanged) +- Q_PROPERTY(DTColor disableBorderHColor READ disableBorderHColor WRITE setDisableBorderHColor NOTIFY disableBorderHColorChanged) ++ Q_PROPERTY(QBrush normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) ++ Q_PROPERTY(QBrush hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) ++ Q_PROPERTY(QBrush clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) ++ Q_PROPERTY(QBrush disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) ++ Q_PROPERTY(QBrush focusBorderColor READ focusBorderColor WRITE setFocusBorderColor NOTIFY focusBorderColorChanged) ++ ++ Q_PROPERTY(QBrush normalBorderHColor READ normalBorderHColor WRITE setNormalBorderHColor NOTIFY normalBorderHColorChanged) ++ Q_PROPERTY(QBrush hoverBorderHColor READ hoverBorderHColor WRITE setHoverBorderHColor NOTIFY hoverBorderHColorChanged) ++ Q_PROPERTY(QBrush clickBorderHColor READ clickBorderHColor WRITE setClickBorderHColor NOTIFY clickBorderHColorChanged) ++ Q_PROPERTY(QBrush disableBorderHColor READ disableBorderHColor WRITE setDisableBorderHColor NOTIFY disableBorderHColorChanged) ++ ++ ++ Q_PROPERTY(QBrush normalCloseBC READ normalCloseBC WRITE setNormalCloseBC NOTIFY normalCloseBCChanged) ++ Q_PROPERTY(QBrush clickedCloseBC READ clickedCloseBC WRITE setClickedCloseBC NOTIFY clickedCloseBCChanged) ++ Q_PROPERTY(QBrush hoveredCloseBC READ hoveredCloseBC WRITE setHoveredClosedBC NOTIFY hoveredCloseBCChanged) ++ Q_PROPERTY(QBrush disableCloseBC READ disableCloseBC WRITE setDisableCloseBC NOTIFY disableCloseBCChanged) ++ Q_PROPERTY(QBrush normalBorderCloseColor READ normalBorderCloseColor WRITE setNormalBorderCloseColor NOTIFY normalBorderCloseColorChanged) ++ Q_PROPERTY(QBrush hoverBorderCloseColor READ hoverBorderCloseColor WRITE setHoverBorderCloseColor NOTIFY hoverBorderCloseColorChanged) ++ Q_PROPERTY(QBrush clickBorderCloseColor READ clickBorderCloseColor WRITE setClickBorderCloseColor NOTIFY clickBorderCloseColorChanged) ++ Q_PROPERTY(QBrush disableBorderCloseColor READ disableBorderCloseColor WRITE setDisableBorderCloseColor NOTIFY disableBorderCloseColorChanged) ++ ++ ++ Q_PROPERTY(QBrush normalWindowBC READ normalWindowBC WRITE setNormalWindowBC NOTIFY normalWindowBCChanged) ++ Q_PROPERTY(QBrush clickedWindowBC READ clickedWindowBC WRITE setClickedWindowBC NOTIFY clickedWindowBCChanged) ++ Q_PROPERTY(QBrush hoveredWindowBC READ hoveredWindowBC WRITE setHoveredWindowdBC NOTIFY hoveredWindowBCChanged) ++ Q_PROPERTY(QBrush disableWindowBC READ disableWindowBC WRITE setDisableWindowBC NOTIFY disableWindowBCChanged) ++ Q_PROPERTY(QBrush normalBorderWindowColor READ normalBorderWindowColor WRITE setNormalBorderWindowColor NOTIFY normalBorderWindowColorChanged) ++ Q_PROPERTY(QBrush hoverBorderWindowColor READ hoverBorderWindowColor WRITE setHoverBorderWindowColor NOTIFY hoverBorderWindowColorChanged) ++ Q_PROPERTY(QBrush clickBorderWindowColor READ clickBorderWindowColor WRITE setClickBorderWindowColor NOTIFY clickBorderWindowColorChanged) ++ Q_PROPERTY(QBrush disableBorderWindowColor READ disableBorderWindowColor WRITE setDisableBorderWindowColor NOTIFY disableBorderWindowColorChanged) + + public: + explicit UKUIButton(QQuickItem *parent = nullptr); +@@ -94,69 +116,123 @@ public: + int normalHeight() const; + void setNormalHeight(int newNormalHeight); + +- Q_INVOKABLE DTColor normalBC() const; +- void setNormalBC(DTColor newNormalBC); ++ Q_INVOKABLE QBrush normalBC() const; ++ void setNormalBC(QBrush newNormalBC); + +- Q_INVOKABLE DTColor clickedBC() const; +- void setClickedBC(DTColor newClickedBC); ++ Q_INVOKABLE QBrush clickedBC() const; ++ void setClickedBC(QBrush newClickedBC); + +- Q_INVOKABLE DTColor hoveredBC() const; +- void setHoveredBC(DTColor newHoveredBC); ++ Q_INVOKABLE QBrush hoveredBC() const; ++ void setHoveredBC(QBrush newHoveredBC); + +- Q_INVOKABLE DTColor disableBC() const; +- void setDisableBC(DTColor newDisableBC); ++ Q_INVOKABLE QBrush disableBC() const; ++ void setDisableBC(QBrush newDisableBC); + +- Q_INVOKABLE DTColor disableTextColor() const; +- void setDisableTextColor(DTColor newDisableTextColor); ++ Q_INVOKABLE QBrush disableTextColor() const; ++ void setDisableTextColor(QBrush newDisableTextColor); + +- Q_INVOKABLE DTColor normalTextColor() const; +- void setNormalTextColor(DTColor newNormalTextColor); ++ Q_INVOKABLE QBrush normalTextColor() const; ++ void setNormalTextColor(QBrush newNormalTextColor); + +- Q_INVOKABLE DTColor normalHBC() const; +- void setNormalHBC(DTColor newNormalHBC); ++ Q_INVOKABLE QBrush normalHBC() const; ++ void setNormalHBC(QBrush newNormalHBC); + +- Q_INVOKABLE DTColor clickedHBC() const; +- void setClickedHBC(DTColor newClickedHBC); ++ Q_INVOKABLE QBrush clickedHBC() const; ++ void setClickedHBC(QBrush newClickedHBC); + +- Q_INVOKABLE DTColor hoveredHBC(); +- void setHoveredHBC(DTColor newHoveredHBC); ++ Q_INVOKABLE QBrush hoveredHBC(); ++ void setHoveredHBC(QBrush newHoveredHBC); + +- Q_INVOKABLE DTColor disableHBC() const; +- void setDisableHBC(DTColor newDisableHBC); ++ Q_INVOKABLE QBrush disableHBC() const; ++ void setDisableHBC(QBrush newDisableHBC); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); + +- Q_INVOKABLE DTColor normalBorderColor() const; +- void setNormalBorderColor(DTColor newNormalBorderColor); ++ Q_INVOKABLE QBrush normalBorderColor() const; ++ void setNormalBorderColor(QBrush newNormalBorderColor); + +- Q_INVOKABLE DTColor hoverBorderColor() const; +- void setHoverBorderColor(DTColor newHoverBorderColor); ++ Q_INVOKABLE QBrush hoverBorderColor() const; ++ void setHoverBorderColor(QBrush newHoverBorderColor); + +- Q_INVOKABLE DTColor clickBorderColor() const; +- void setClickBorderColor(DTColor newClickBorderColor); ++ Q_INVOKABLE QBrush clickBorderColor() const; ++ void setClickBorderColor(QBrush newClickBorderColor); + +- Q_INVOKABLE DTColor disableBorderColor() const; +- void setDisableBorderColor(DTColor newDisableBorderColor); ++ Q_INVOKABLE QBrush disableBorderColor() const; ++ void setDisableBorderColor(QBrush newDisableBorderColor); + +- Q_INVOKABLE DTColor normalBorderHColor() const; +- void setNormalBorderHColor(DTColor newNormalBorderHColor); ++ Q_INVOKABLE QBrush normalBorderHColor() const; ++ void setNormalBorderHColor(QBrush newNormalBorderHColor); + +- Q_INVOKABLE DTColor hoverBorderHColor() const; +- void setHoverBorderHColor(DTColor newHoverBorderHColor); ++ Q_INVOKABLE QBrush hoverBorderHColor() const; ++ void setHoverBorderHColor(QBrush newHoverBorderHColor); + +- Q_INVOKABLE DTColor clickBorderHColor() const; +- void setClickBorderHColor(DTColor newClickBorderHColor); ++ Q_INVOKABLE QBrush clickBorderHColor() const; ++ void setClickBorderHColor(QBrush newClickBorderHColor); + +- Q_INVOKABLE DTColor disableBorderHColor() const; +- void setDisableBorderHColor(DTColor newDisableBorderHColor); ++ Q_INVOKABLE QBrush disableBorderHColor() const; ++ void setDisableBorderHColor(QBrush newDisableBorderHColor); + +- Q_INVOKABLE DTColor focusBorderColor() const; +- void setFocusBorderColor(DTColor newFocusBorderColor); ++ Q_INVOKABLE QBrush focusBorderColor() const; ++ void setFocusBorderColor(QBrush newFocusBorderColor); + + int focusBorderWidth() const; + void setFocusBorderWidth(int newFocusBorderWidth); + ++ Q_INVOKABLE QBrush highlightTextColor() const; ++ void setHighlightTextColor(QBrush newHighlightTextColor); ++ ++ Q_INVOKABLE QBrush highlightTextDisableColor() const; ++ void setHighlightTextDisableColor(QBrush newHighlightTextDisableColor); ++ ++ const QBrush &normalCloseBC() const; ++ void setNormalCloseBC(const QBrush &newNormalCloseBC); ++ ++ const QBrush &clickedCloseBC() const; ++ void setClickedCloseBC(const QBrush &newClickedCloseBC); ++ ++ const QBrush &hoveredCloseBC() const; ++ void setHoveredClosedBC(const QBrush &newHoveredCloseBC); ++ ++ const QBrush &disableCloseBC() const; ++ void setDisableCloseBC(const QBrush &newDisableCloseBC); ++ ++ const QBrush &normalBorderCloseColor() const; ++ void setNormalBorderCloseColor(const QBrush &newNormalBorderCloseColor); ++ ++ const QBrush &hoverBorderCloseColor() const; ++ void setHoverBorderCloseColor(const QBrush &newHoverBorderCloseColor); ++ ++ const QBrush &clickBorderCloseColor() const; ++ void setClickBorderCloseColor(const QBrush &newClickBorderCloseColor); ++ ++ const QBrush &disableBorderCloseColor() const; ++ void setDisableBorderCloseColor(const QBrush &newDisableBorderCloseColor); ++ ++ const QBrush &normalWindowBC() const; ++ void setNormalWindowBC(const QBrush &newNormalWindowBC); ++ ++ const QBrush &clickedWindowBC() const; ++ void setClickedWindowBC(const QBrush &newClickedWindowBC); ++ ++ const QBrush &hoveredWindowBC() const; ++ void setHoveredWindowdBC(const QBrush &newHoveredWindowBC); ++ ++ const QBrush &disableWindowBC() const; ++ void setDisableWindowBC(const QBrush &newDisableWindowBC); ++ ++ const QBrush &normalBorderWindowColor() const; ++ void setNormalBorderWindowColor(const QBrush &newNormalBorderWindowColor); ++ ++ const QBrush &hoverBorderWindowColor() const; ++ void setHoverBorderWindowColor(const QBrush &newHoverBorderWindowColor); ++ ++ const QBrush &clickBorderWindowColor() const; ++ void setClickBorderWindowColor(const QBrush &newClickBorderWindowColor); ++ ++ const QBrush &disableBorderWindowColor() const; ++ void setDisableBorderWindowColor(const QBrush &newDisableBorderWindowColor); ++ + signals: + void radiusChanged(); + +@@ -212,6 +288,44 @@ signals: + + void normalTextColorChanged(); + ++ void highlightTextColorChanged(); ++ ++ void highlightTextDisableColorChanged(); ++ ++ void parametryChanged(); ++ ++ void normalCloseBCChanged(); ++ ++ void clickedCloseBCChanged(); ++ ++ void hoveredCloseBCChanged(); ++ ++ void disableCloseBCChanged(); ++ ++ void normalBorderCloseColorChanged(); ++ ++ void hoverBorderCloseColorChanged(); ++ ++ void clickBorderCloseColorChanged(); ++ ++ void disableBorderCloseColorChanged(); ++ ++ void normalWindowBCChanged(); ++ ++ void clickedWindowBCChanged(); ++ ++ void hoveredWindowBCChanged(); ++ ++ void disableWindowBCChanged(); ++ ++ void normalBorderWindowColorChanged(); ++ ++ void hoverBorderWindowColorChanged(); ++ ++ void clickBorderWindowColorChanged(); ++ ++ void disableBorderWindowColorChanged(); ++ + private: + double m_radius = 6.0; + double m_leftRightMargin = 10.0; +@@ -222,27 +336,45 @@ private: + int m_borderWidth; + int m_focusBorderWidth; + +- DTColor m_normalBC ; +- DTColor m_clickedBC ; +- DTColor m_hoveredBC ; +- DTColor m_disableBC ; +- DTColor m_disableTextColor ; +- DTColor m_normalTextColor ; +- DTColor m_normalHBC ; +- DTColor m_clickedHBC ; +- DTColor m_hoveredHBC ; +- DTColor m_disableHBC ; +- DTColor m_normalBorderColor ; +- DTColor m_hoverBorderColor ; +- DTColor m_clickBorderColor ; +- DTColor m_disableBorderColor ; +- DTColor m_normalBorderHColor ; +- DTColor m_hoverBorderHColor ; +- DTColor m_clickBorderHColor ; +- DTColor m_disableBorderHColor ; +- DTColor m_focusBorderColor ; ++ QBrush m_normalBC ; ++ QBrush m_clickedBC ; ++ QBrush m_hoveredBC ; ++ QBrush m_disableBC ; ++ QBrush m_disableTextColor ; ++ QBrush m_normalTextColor ; ++ QBrush m_normalHBC ; ++ QBrush m_clickedHBC ; ++ QBrush m_hoveredHBC ; ++ QBrush m_disableHBC ; ++ QBrush m_normalBorderColor ; ++ QBrush m_hoverBorderColor ; ++ QBrush m_clickBorderColor ; ++ QBrush m_disableBorderColor ; ++ QBrush m_normalBorderHColor ; ++ QBrush m_hoverBorderHColor ; ++ QBrush m_clickBorderHColor ; ++ QBrush m_disableBorderHColor ; ++ QBrush m_focusBorderColor ; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance ; ++ QBrush m_highlightTextColor; ++ QBrush m_highlightTextDisableColor; ++ QBrush m_normalCloseBC; ++ QBrush m_clickedCloseBC; ++ QBrush m_hoveredCloseBC; ++ QBrush m_disableCloseBC; ++ QBrush m_normalBorderCloseColor; ++ QBrush m_hoverBorderCloseColor; ++ QBrush m_clickBorderCloseColor; ++ QBrush m_disableBorderCloseColor; ++ QBrush m_normalWindowBC; ++ QBrush m_clickedWindowBC; ++ QBrush m_hoveredWindowBC; ++ QBrush m_disableWindowBC; ++ QBrush m_normalBorderWindowColor; ++ QBrush m_hoverBorderWindowColor; ++ QBrush m_clickBorderWindowColor; ++ QBrush m_disableBorderWindowColor; + }; + } + QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUIButton, QML_HAS_ATTACHED_PROPERTIES) +diff --git a/ukui-qml-style-helper/styleparameter/ukuicheckbox.cpp b/ukui-qml-style-helper/styleparameter/ukuicheckbox.cpp +index ce591d1..c77545c 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuicheckbox.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuicheckbox.cpp +@@ -5,7 +5,6 @@ using namespace UKUIQQC2Style; + + UKUICheckBox::UKUICheckBox(QQuickItem *parent) : QQuickItem(parent) + { +- qDebug() << "UKUICheckBox.............."; + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); +@@ -59,6 +58,10 @@ void UKUICheckBox::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + setIndicatorWidth(16); + setChildrenWidth(8); + setRadius(instance->kradiusMin()); ++ setLeftRightMargin(0); ++ ++ emit parametryChanged(); ++ + } + + +@@ -102,12 +105,12 @@ void UKUICheckBox::setSpace(double newSpace) + emit spaceChanged(); + } + +-DTColor UKUICheckBox::disableTextColor() const ++QBrush UKUICheckBox::disableTextColor() const + { + return m_disableTextColor; + } + +-void UKUICheckBox::setDisableTextColor(DTColor newDisableTextColor) ++void UKUICheckBox::setDisableTextColor(QBrush newDisableTextColor) + { + if (m_disableTextColor != newDisableTextColor){ + m_disableTextColor = newDisableTextColor; +@@ -115,12 +118,12 @@ void UKUICheckBox::setDisableTextColor(DTColor newDisableTextColor) + } + } + +-DTColor UKUICheckBox::normalTextColor() const ++QBrush UKUICheckBox::normalTextColor() const + { + return m_normalTextColor; + } + +-void UKUICheckBox::setNormalTextColor(DTColor newNormalTextColor) ++void UKUICheckBox::setNormalTextColor(QBrush newNormalTextColor) + { + if (m_normalTextColor != newNormalTextColor){ + m_normalTextColor = newNormalTextColor; +@@ -128,12 +131,12 @@ void UKUICheckBox::setNormalTextColor(DTColor newNormalTextColor) + } + } + +-DTColor UKUICheckBox::normalIndicatorColor() const ++QBrush UKUICheckBox::normalIndicatorColor() const + { + return m_normalIndicatorColor; + } + +-void UKUICheckBox::setNormalIndicatorColor(DTColor newNormalIndicatorColor) ++void UKUICheckBox::setNormalIndicatorColor(QBrush newNormalIndicatorColor) + { + if (m_normalIndicatorColor != newNormalIndicatorColor){ + m_normalIndicatorColor = newNormalIndicatorColor; +@@ -141,12 +144,12 @@ void UKUICheckBox::setNormalIndicatorColor(DTColor newNormalIndicatorColor) + } + } + +-DTColor UKUICheckBox::hoverIndicatorColor() const ++QBrush UKUICheckBox::hoverIndicatorColor() const + { + return m_hoverIndicatorColor; + } + +-void UKUICheckBox::setHoverIndicatorColor(DTColor newHoverIndicatorColor) ++void UKUICheckBox::setHoverIndicatorColor(QBrush newHoverIndicatorColor) + { + if (m_hoverIndicatorColor != newHoverIndicatorColor){ + m_hoverIndicatorColor = newHoverIndicatorColor; +@@ -154,12 +157,12 @@ void UKUICheckBox::setHoverIndicatorColor(DTColor newHoverIndicatorColor) + } + } + +-DTColor UKUICheckBox::clickIndicatorColor() const ++QBrush UKUICheckBox::clickIndicatorColor() const + { + return m_clickIndicatorColor; + } + +-void UKUICheckBox::setClickIndicatorColor(DTColor newClickIndicatorColor) ++void UKUICheckBox::setClickIndicatorColor(QBrush newClickIndicatorColor) + { + if (m_clickIndicatorColor != newClickIndicatorColor){ + m_clickIndicatorColor = newClickIndicatorColor; +@@ -167,12 +170,12 @@ void UKUICheckBox::setClickIndicatorColor(DTColor newClickIndicatorColor) + } + } + +-DTColor UKUICheckBox::disableIndicatorColor() const ++QBrush UKUICheckBox::disableIndicatorColor() const + { + return m_disableIndicatorColor; + } + +-void UKUICheckBox::setDisableIndicatorColor(DTColor newDisableIndicatorColor) ++void UKUICheckBox::setDisableIndicatorColor(QBrush newDisableIndicatorColor) + { + if (m_disableIndicatorColor != newDisableIndicatorColor){ + m_disableIndicatorColor = newDisableIndicatorColor; +@@ -180,12 +183,12 @@ void UKUICheckBox::setDisableIndicatorColor(DTColor newDisableIndicatorColor) + } + } + +-DTColor UKUICheckBox::normalIndicatorBorderColor() const ++QBrush UKUICheckBox::normalIndicatorBorderColor() const + { + return m_normalIndicatorBorderColor; + } + +-void UKUICheckBox::setNormalIndicatorBorderColor(DTColor newNormalIndicatorBorderColor) ++void UKUICheckBox::setNormalIndicatorBorderColor(QBrush newNormalIndicatorBorderColor) + { + if (m_normalIndicatorBorderColor != newNormalIndicatorBorderColor){ + m_normalIndicatorBorderColor = newNormalIndicatorBorderColor; +@@ -193,12 +196,12 @@ void UKUICheckBox::setNormalIndicatorBorderColor(DTColor newNormalIndicatorBorde + } + } + +-DTColor UKUICheckBox::hoverIndicatorBorderColor() const ++QBrush UKUICheckBox::hoverIndicatorBorderColor() const + { + return m_hoverIndicatorBorderColor; + } + +-void UKUICheckBox::setHoverIndicatorBorderColor(DTColor newHoverIndicatorBorderColor) ++void UKUICheckBox::setHoverIndicatorBorderColor(QBrush newHoverIndicatorBorderColor) + { + if (m_hoverIndicatorBorderColor != newHoverIndicatorBorderColor){ + m_hoverIndicatorBorderColor = newHoverIndicatorBorderColor; +@@ -206,12 +209,12 @@ void UKUICheckBox::setHoverIndicatorBorderColor(DTColor newHoverIndicatorBorderC + } + } + +-DTColor UKUICheckBox::clickIndicatorBorderColor() const ++QBrush UKUICheckBox::clickIndicatorBorderColor() const + { + return m_clickIndicatorBorderColor; + } + +-void UKUICheckBox::setClickIndicatorBorderColor(DTColor newClickIndicatorBorderColor) ++void UKUICheckBox::setClickIndicatorBorderColor(QBrush newClickIndicatorBorderColor) + { + if (m_clickIndicatorBorderColor != newClickIndicatorBorderColor){ + m_clickIndicatorBorderColor = newClickIndicatorBorderColor; +@@ -219,12 +222,12 @@ void UKUICheckBox::setClickIndicatorBorderColor(DTColor newClickIndicatorBorderC + } + } + +-DTColor UKUICheckBox::disableIndicatorBorderColor() const ++QBrush UKUICheckBox::disableIndicatorBorderColor() const + { + return m_disableIndicatorBorderColor; + } + +-void UKUICheckBox::setDisableIndicatorBorderColor(DTColor newDisableIndicatorBorderColor) ++void UKUICheckBox::setDisableIndicatorBorderColor(QBrush newDisableIndicatorBorderColor) + { + if (m_disableIndicatorBorderColor != newDisableIndicatorBorderColor){ + m_disableIndicatorBorderColor = newDisableIndicatorBorderColor; +@@ -232,90 +235,90 @@ void UKUICheckBox::setDisableIndicatorBorderColor(DTColor newDisableIndicatorBor + } + } + +-DTColor UKUICheckBox::checked_normalIndicatorColor() const ++QBrush UKUICheckBox::checked_normalIndicatorColor() const + { + return m_checked_normalIndicatorColor; + } + +-DTColor UKUICheckBox::checked_hoverIndicatorColor() const ++QBrush UKUICheckBox::checked_hoverIndicatorColor() const + { + return m_checked_hoverIndicatorColor; + } + +-DTColor UKUICheckBox::checked_clickIndicatorColor() const ++QBrush UKUICheckBox::checked_clickIndicatorColor() const + { + return m_checked_clickIndicatorColor; + } + +-DTColor UKUICheckBox::checked_disableIndicatorColor() const ++QBrush UKUICheckBox::checked_disableIndicatorColor() const + { + return m_checked_disableIndicatorColor; + } + +-DTColor UKUICheckBox::checked_normalIndicatorBorderColor() const ++QBrush UKUICheckBox::checked_normalIndicatorBorderColor() const + { + return m_checked_normalIndicatorBorderColor; + } + +-DTColor UKUICheckBox::checked_hoverIndicatorBorderColor() const ++QBrush UKUICheckBox::checked_hoverIndicatorBorderColor() const + { + return m_checked_hoverIndicatorBorderColor; + } + +-DTColor UKUICheckBox::checked_clickIndicatorBorderColor() const ++QBrush UKUICheckBox::checked_clickIndicatorBorderColor() const + { + return m_checked_clickIndicatorBorderColor; + } + +-DTColor UKUICheckBox::checked_disableIndicatorBorderColor() const ++QBrush UKUICheckBox::checked_disableIndicatorBorderColor() const + { + return m_checked_disableIndicatorBorderColor; + } + +-DTColor UKUICheckBox::checked_normalChildrenColor() const ++QBrush UKUICheckBox::checked_normalChildrenColor() const + { + return m_checked_normalChildrenColor; + } + +-DTColor UKUICheckBox::checked_hoverChildrenColor() const ++QBrush UKUICheckBox::checked_hoverChildrenColor() const + { + return m_checked_hoverChildrenColor; + } + +-DTColor UKUICheckBox::checked_clickChildrenColor() const ++QBrush UKUICheckBox::checked_clickChildrenColor() const + { + return m_checked_clickChildrenColor; + } + + +-DTColor UKUICheckBox::checked_disableChildrenColor() const ++QBrush UKUICheckBox::checked_disableChildrenColor() const + { + return m_checked_disableChildrenColor; + } + +-DTColor UKUICheckBox::checked_normalChildrenBorderColor() const ++QBrush UKUICheckBox::checked_normalChildrenBorderColor() const + { + return m_checked_normalChildrenBorderColor; + } + +-DTColor UKUICheckBox::checked_hoverChildrenBorderColor() const ++QBrush UKUICheckBox::checked_hoverChildrenBorderColor() const + { + return m_checked_hoverChildrenBorderColor; + } + +-DTColor UKUICheckBox::checked_clickChildrenBorderColor() const ++QBrush UKUICheckBox::checked_clickChildrenBorderColor() const + { + return m_checked_clickChildrenBorderColor; + } + + +-DTColor UKUICheckBox::checked_disableChildrenBorderColor() const ++QBrush UKUICheckBox::checked_disableChildrenBorderColor() const + { + return m_checked_disableChildrenBorderColor; + } + + +-void UKUICheckBox::setChecked_NormalIndicatorColor(DTColor newChecked_normalIndicatorColor) ++void UKUICheckBox::setChecked_NormalIndicatorColor(QBrush newChecked_normalIndicatorColor) + { + if (m_checked_normalIndicatorColor != newChecked_normalIndicatorColor){ + m_checked_normalIndicatorColor = newChecked_normalIndicatorColor; +@@ -323,7 +326,7 @@ void UKUICheckBox::setChecked_NormalIndicatorColor(DTColor newChecked_normalIndi + } + } + +-void UKUICheckBox::setChecked_HoverIndicatorColor(DTColor newChecked_hoverIndicatorColor) ++void UKUICheckBox::setChecked_HoverIndicatorColor(QBrush newChecked_hoverIndicatorColor) + { + if (m_checked_hoverIndicatorColor != newChecked_hoverIndicatorColor){ + m_checked_hoverIndicatorColor = newChecked_hoverIndicatorColor; +@@ -331,7 +334,7 @@ void UKUICheckBox::setChecked_HoverIndicatorColor(DTColor newChecked_hoverIndica + } + } + +-void UKUICheckBox::setChecked_ClickIndicatorColor(DTColor newChecked_clickIndicatorColor) ++void UKUICheckBox::setChecked_ClickIndicatorColor(QBrush newChecked_clickIndicatorColor) + { + if (m_checked_clickIndicatorColor != newChecked_clickIndicatorColor){ + m_checked_clickIndicatorColor = newChecked_clickIndicatorColor; +@@ -339,7 +342,7 @@ void UKUICheckBox::setChecked_ClickIndicatorColor(DTColor newChecked_clickIndica + } + } + +-void UKUICheckBox::setChecked_DisableIndicatorColor(DTColor newChecked_disableIndicatorColor) ++void UKUICheckBox::setChecked_DisableIndicatorColor(QBrush newChecked_disableIndicatorColor) + { + if (m_checked_disableIndicatorColor != newChecked_disableIndicatorColor){ + m_checked_disableIndicatorColor = newChecked_disableIndicatorColor; +@@ -347,7 +350,7 @@ void UKUICheckBox::setChecked_DisableIndicatorColor(DTColor newChecked_disableIn + } + } + +-void UKUICheckBox::setChecked_NormalIndicatorBorderColor(DTColor newChecked_normalIndicatorBorderColor) ++void UKUICheckBox::setChecked_NormalIndicatorBorderColor(QBrush newChecked_normalIndicatorBorderColor) + { + if (m_checked_normalIndicatorBorderColor != newChecked_normalIndicatorBorderColor){ + m_checked_normalIndicatorBorderColor = newChecked_normalIndicatorBorderColor; +@@ -355,7 +358,7 @@ void UKUICheckBox::setChecked_NormalIndicatorBorderColor(DTColor newChecked_norm + } + } + +-void UKUICheckBox::setChecked_HoverIndicatorBorderColor(DTColor newChecked_hoverIndicatorBorderColor) ++void UKUICheckBox::setChecked_HoverIndicatorBorderColor(QBrush newChecked_hoverIndicatorBorderColor) + { + if (m_checked_hoverIndicatorBorderColor != newChecked_hoverIndicatorBorderColor){ + m_checked_hoverIndicatorBorderColor = newChecked_hoverIndicatorBorderColor; +@@ -363,7 +366,7 @@ void UKUICheckBox::setChecked_HoverIndicatorBorderColor(DTColor newChecked_hover + } + } + +-void UKUICheckBox::setChecked_ClickIndicatorBorderColor(DTColor newChecked_clickIndicatorBorderColor) ++void UKUICheckBox::setChecked_ClickIndicatorBorderColor(QBrush newChecked_clickIndicatorBorderColor) + { + if (m_checked_clickIndicatorBorderColor != newChecked_clickIndicatorBorderColor){ + m_checked_clickIndicatorBorderColor = newChecked_clickIndicatorBorderColor; +@@ -371,7 +374,7 @@ void UKUICheckBox::setChecked_ClickIndicatorBorderColor(DTColor newChecked_click + } + } + +-void UKUICheckBox::setChecked_DisableIndicatorBorderColor(DTColor newChecked_disableIndicatorBorderColor) ++void UKUICheckBox::setChecked_DisableIndicatorBorderColor(QBrush newChecked_disableIndicatorBorderColor) + { + if (m_checked_disableIndicatorBorderColor != newChecked_disableIndicatorBorderColor){ + m_checked_disableIndicatorBorderColor = newChecked_disableIndicatorBorderColor; +@@ -379,7 +382,7 @@ void UKUICheckBox::setChecked_DisableIndicatorBorderColor(DTColor newChecked_dis + } + } + +-void UKUICheckBox::setChecked_NormalChildrenColor(DTColor newChecked_normalChildrenColor) ++void UKUICheckBox::setChecked_NormalChildrenColor(QBrush newChecked_normalChildrenColor) + { + if (m_checked_normalChildrenColor != newChecked_normalChildrenColor){ + m_checked_normalChildrenColor = newChecked_normalChildrenColor; +@@ -387,7 +390,7 @@ void UKUICheckBox::setChecked_NormalChildrenColor(DTColor newChecked_normalChild + } + } + +-void UKUICheckBox::setChecked_HoverChildrenColor(DTColor newChecked_hoverChildrenColor) ++void UKUICheckBox::setChecked_HoverChildrenColor(QBrush newChecked_hoverChildrenColor) + { + if (m_checked_hoverChildrenColor != newChecked_hoverChildrenColor){ + m_checked_hoverChildrenColor = newChecked_hoverChildrenColor; +@@ -395,7 +398,7 @@ void UKUICheckBox::setChecked_HoverChildrenColor(DTColor newChecked_hoverChildre + } + } + +-void UKUICheckBox::setChecked_ClickChildrenColor(DTColor newChecked_clickChildrenColor) ++void UKUICheckBox::setChecked_ClickChildrenColor(QBrush newChecked_clickChildrenColor) + { + if (m_checked_clickChildrenColor != newChecked_clickChildrenColor){ + m_checked_clickChildrenColor = newChecked_clickChildrenColor; +@@ -403,7 +406,7 @@ void UKUICheckBox::setChecked_ClickChildrenColor(DTColor newChecked_clickChildre + } + } + +-void UKUICheckBox::setChecked_DisableChildrenColor(DTColor newChecked_disableChildrenColor) ++void UKUICheckBox::setChecked_DisableChildrenColor(QBrush newChecked_disableChildrenColor) + { + if (m_checked_disableChildrenColor != newChecked_disableChildrenColor){ + m_checked_disableChildrenColor = newChecked_disableChildrenColor; +@@ -411,7 +414,7 @@ void UKUICheckBox::setChecked_DisableChildrenColor(DTColor newChecked_disableChi + } + } + +-void UKUICheckBox::setChecked_NormalChildrenBorderColor(DTColor newChecked_normalChildrenBorderColor) ++void UKUICheckBox::setChecked_NormalChildrenBorderColor(QBrush newChecked_normalChildrenBorderColor) + { + if (m_checked_normalChildrenBorderColor != newChecked_normalChildrenBorderColor){ + m_checked_normalChildrenBorderColor = newChecked_normalChildrenBorderColor; +@@ -419,7 +422,7 @@ void UKUICheckBox::setChecked_NormalChildrenBorderColor(DTColor newChecked_norma + } + } + +-void UKUICheckBox::setChecked_HoverChildrenBorderColor(DTColor newChecked_hoverChildrenBorderColor) ++void UKUICheckBox::setChecked_HoverChildrenBorderColor(QBrush newChecked_hoverChildrenBorderColor) + { + if (m_checked_hoverChildrenBorderColor != newChecked_hoverChildrenBorderColor){ + m_checked_hoverChildrenBorderColor = newChecked_hoverChildrenBorderColor; +@@ -427,7 +430,7 @@ void UKUICheckBox::setChecked_HoverChildrenBorderColor(DTColor newChecked_hoverC + } + } + +-void UKUICheckBox::setChecked_ClickChildrenBorderColor(DTColor newChecked_clickChildrenBorderColor) ++void UKUICheckBox::setChecked_ClickChildrenBorderColor(QBrush newChecked_clickChildrenBorderColor) + { + if (m_checked_clickChildrenBorderColor != newChecked_clickChildrenBorderColor){ + m_checked_clickChildrenBorderColor = newChecked_clickChildrenBorderColor; +@@ -435,7 +438,7 @@ void UKUICheckBox::setChecked_ClickChildrenBorderColor(DTColor newChecked_clickC + } + } + +-void UKUICheckBox::setChecked_DisableChildrenBorderColor(DTColor newChecked_disableChildrenBorderColor) ++void UKUICheckBox::setChecked_DisableChildrenBorderColor(QBrush newChecked_disableChildrenBorderColor) + { + if (m_checked_disableChildrenBorderColor != newChecked_disableChildrenBorderColor){ + m_checked_disableChildrenBorderColor = newChecked_disableChildrenBorderColor; +diff --git a/ukui-qml-style-helper/styleparameter/ukuicheckbox.h b/ukui-qml-style-helper/styleparameter/ukuicheckbox.h +index ae25e3b..38e0594 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuicheckbox.h ++++ b/ukui-qml-style-helper/styleparameter/ukuicheckbox.h +@@ -41,35 +41,35 @@ class UKUICheckBox : public QQuickItem + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) + + +- Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) +- Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) +- +- Q_PROPERTY(DTColor normalIndicatorColor READ normalIndicatorColor WRITE setNormalIndicatorColor NOTIFY normalIndicatorColorChanged) +- Q_PROPERTY(DTColor hoverIndicatorColor READ hoverIndicatorColor WRITE setHoverIndicatorColor NOTIFY hoverIndicatorColorChanged) +- Q_PROPERTY(DTColor clickIndicatorColor READ clickIndicatorColor WRITE setClickIndicatorColor NOTIFY clickIndicatorColorChanged) +- Q_PROPERTY(DTColor disableIndicatorColor READ disableIndicatorColor WRITE setDisableIndicatorColor NOTIFY disableIndicatorColorChanged) +- Q_PROPERTY(DTColor normalIndicatorBorderColor READ normalIndicatorBorderColor WRITE setNormalIndicatorBorderColor NOTIFY normalIndicatorBorderColorChanged) +- Q_PROPERTY(DTColor hoverIndicatorBorderColor READ hoverIndicatorBorderColor WRITE setHoverIndicatorBorderColor NOTIFY hoverIndicatorBorderColorChanged) +- Q_PROPERTY(DTColor clickIndicatorBorderColor READ clickIndicatorBorderColor WRITE setClickIndicatorBorderColor NOTIFY clickIndicatorBorderColorChanged) +- Q_PROPERTY(DTColor disableIndicatorBorderColor READ disableIndicatorBorderColor WRITE setDisableIndicatorBorderColor NOTIFY disableIndicatorBorderColorChanged) +- +- Q_PROPERTY(DTColor checked_normalIndicatorColor READ checked_normalIndicatorColor WRITE setChecked_NormalIndicatorColor NOTIFY checked_normalIndicatorColorChanged) +- Q_PROPERTY(DTColor checked_hoverIndicatorColor READ checked_hoverIndicatorColor WRITE setChecked_HoverIndicatorColor NOTIFY checked_hoverIndicatorColorChanged) +- Q_PROPERTY(DTColor checked_clickIndicatorColor READ checked_clickIndicatorColor WRITE setChecked_ClickIndicatorColor NOTIFY checked_clickIndicatorColorChanged) +- Q_PROPERTY(DTColor checked_disableIndicatorColor READ checked_disableIndicatorColor WRITE setChecked_DisableIndicatorColor NOTIFY checked_disableIndicatorColorChanged) +- Q_PROPERTY(DTColor checked_normalIndicatorBorderColor READ checked_normalIndicatorBorderColor WRITE setChecked_NormalIndicatorBorderColor NOTIFY checked_normalIndicatorBorderColorChanged) +- Q_PROPERTY(DTColor checked_hoverIndicatorBorderColor READ checked_hoverIndicatorBorderColor WRITE setChecked_HoverIndicatorBorderColor NOTIFY checked_hoverIndicatorBorderColorChanged) +- Q_PROPERTY(DTColor checked_clickIndicatorBorderColor READ checked_clickIndicatorBorderColor WRITE setChecked_ClickIndicatorBorderColor NOTIFY checked_clickIndicatorBorderColorChanged) +- Q_PROPERTY(DTColor checked_disableIndicatorBorderColor READ checked_disableIndicatorBorderColor WRITE setChecked_DisableIndicatorBorderColor NOTIFY checked_disableIndicatorBorderColorChanged) +- +- Q_PROPERTY(DTColor checked_normalChildrenColor READ checked_normalChildrenColor WRITE setChecked_NormalChildrenColor NOTIFY checked_normalChildrenColorChanged) +- Q_PROPERTY(DTColor checked_hoverChildrenColor READ checked_hoverChildrenColor WRITE setChecked_HoverChildrenColor NOTIFY checked_hoverChildrenColorChanged) +- Q_PROPERTY(DTColor checked_clickChildrenColor READ checked_clickChildrenColor WRITE setChecked_ClickChildrenColor NOTIFY checked_clickChildrenColorChanged) +- Q_PROPERTY(DTColor checked_disableChildrenColor READ checked_disableChildrenColor WRITE setChecked_DisableChildrenColor NOTIFY checked_disableChildrenColorChanged) +- Q_PROPERTY(DTColor checked_normalChildrenBorderColor READ checked_normalChildrenBorderColor WRITE setChecked_NormalChildrenBorderColor NOTIFY checked_normalChildrenBorderColorChanged) +- Q_PROPERTY(DTColor checked_hoverChildrenBorderColor READ checked_hoverChildrenBorderColor WRITE setChecked_HoverChildrenBorderColor NOTIFY checked_hoverChildrenBorderColorChanged) +- Q_PROPERTY(DTColor checked_clickChildrenBorderColor READ checked_clickChildrenBorderColor WRITE setChecked_ClickChildrenBorderColor NOTIFY checked_clickChildrenBorderColorChanged) +- Q_PROPERTY(DTColor checked_disableChildrenBorderColor READ checked_disableChildrenBorderColor WRITE setChecked_DisableChildrenBorderColor NOTIFY checked_disableChildrenBorderColorChanged) ++ Q_PROPERTY(QBrush disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) ++ Q_PROPERTY(QBrush normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) ++ ++ Q_PROPERTY(QBrush normalIndicatorColor READ normalIndicatorColor WRITE setNormalIndicatorColor NOTIFY normalIndicatorColorChanged) ++ Q_PROPERTY(QBrush hoverIndicatorColor READ hoverIndicatorColor WRITE setHoverIndicatorColor NOTIFY hoverIndicatorColorChanged) ++ Q_PROPERTY(QBrush clickIndicatorColor READ clickIndicatorColor WRITE setClickIndicatorColor NOTIFY clickIndicatorColorChanged) ++ Q_PROPERTY(QBrush disableIndicatorColor READ disableIndicatorColor WRITE setDisableIndicatorColor NOTIFY disableIndicatorColorChanged) ++ Q_PROPERTY(QBrush normalIndicatorBorderColor READ normalIndicatorBorderColor WRITE setNormalIndicatorBorderColor NOTIFY normalIndicatorBorderColorChanged) ++ Q_PROPERTY(QBrush hoverIndicatorBorderColor READ hoverIndicatorBorderColor WRITE setHoverIndicatorBorderColor NOTIFY hoverIndicatorBorderColorChanged) ++ Q_PROPERTY(QBrush clickIndicatorBorderColor READ clickIndicatorBorderColor WRITE setClickIndicatorBorderColor NOTIFY clickIndicatorBorderColorChanged) ++ Q_PROPERTY(QBrush disableIndicatorBorderColor READ disableIndicatorBorderColor WRITE setDisableIndicatorBorderColor NOTIFY disableIndicatorBorderColorChanged) ++ ++ Q_PROPERTY(QBrush checked_normalIndicatorColor READ checked_normalIndicatorColor WRITE setChecked_NormalIndicatorColor NOTIFY checked_normalIndicatorColorChanged) ++ Q_PROPERTY(QBrush checked_hoverIndicatorColor READ checked_hoverIndicatorColor WRITE setChecked_HoverIndicatorColor NOTIFY checked_hoverIndicatorColorChanged) ++ Q_PROPERTY(QBrush checked_clickIndicatorColor READ checked_clickIndicatorColor WRITE setChecked_ClickIndicatorColor NOTIFY checked_clickIndicatorColorChanged) ++ Q_PROPERTY(QBrush checked_disableIndicatorColor READ checked_disableIndicatorColor WRITE setChecked_DisableIndicatorColor NOTIFY checked_disableIndicatorColorChanged) ++ Q_PROPERTY(QBrush checked_normalIndicatorBorderColor READ checked_normalIndicatorBorderColor WRITE setChecked_NormalIndicatorBorderColor NOTIFY checked_normalIndicatorBorderColorChanged) ++ Q_PROPERTY(QBrush checked_hoverIndicatorBorderColor READ checked_hoverIndicatorBorderColor WRITE setChecked_HoverIndicatorBorderColor NOTIFY checked_hoverIndicatorBorderColorChanged) ++ Q_PROPERTY(QBrush checked_clickIndicatorBorderColor READ checked_clickIndicatorBorderColor WRITE setChecked_ClickIndicatorBorderColor NOTIFY checked_clickIndicatorBorderColorChanged) ++ Q_PROPERTY(QBrush checked_disableIndicatorBorderColor READ checked_disableIndicatorBorderColor WRITE setChecked_DisableIndicatorBorderColor NOTIFY checked_disableIndicatorBorderColorChanged) ++ ++ Q_PROPERTY(QBrush checked_normalChildrenColor READ checked_normalChildrenColor WRITE setChecked_NormalChildrenColor NOTIFY checked_normalChildrenColorChanged) ++ Q_PROPERTY(QBrush checked_hoverChildrenColor READ checked_hoverChildrenColor WRITE setChecked_HoverChildrenColor NOTIFY checked_hoverChildrenColorChanged) ++ Q_PROPERTY(QBrush checked_clickChildrenColor READ checked_clickChildrenColor WRITE setChecked_ClickChildrenColor NOTIFY checked_clickChildrenColorChanged) ++ Q_PROPERTY(QBrush checked_disableChildrenColor READ checked_disableChildrenColor WRITE setChecked_DisableChildrenColor NOTIFY checked_disableChildrenColorChanged) ++ Q_PROPERTY(QBrush checked_normalChildrenBorderColor READ checked_normalChildrenBorderColor WRITE setChecked_NormalChildrenBorderColor NOTIFY checked_normalChildrenBorderColorChanged) ++ Q_PROPERTY(QBrush checked_hoverChildrenBorderColor READ checked_hoverChildrenBorderColor WRITE setChecked_HoverChildrenBorderColor NOTIFY checked_hoverChildrenBorderColorChanged) ++ Q_PROPERTY(QBrush checked_clickChildrenBorderColor READ checked_clickChildrenBorderColor WRITE setChecked_ClickChildrenBorderColor NOTIFY checked_clickChildrenBorderColorChanged) ++ Q_PROPERTY(QBrush checked_disableChildrenBorderColor READ checked_disableChildrenBorderColor WRITE setChecked_DisableChildrenBorderColor NOTIFY checked_disableChildrenBorderColorChanged) + + Q_PROPERTY(int indicatorWidth READ indicatorWidth WRITE setIndicatorWidth NOTIFY indicatorWidthChanged) + Q_PROPERTY(int childrenWidth READ childrenWidth WRITE setChildrenWidth NOTIFY childrenWidthChanged) +@@ -92,83 +92,83 @@ public: + double space() const; + void setSpace(double newSpace); + +- Q_INVOKABLE DTColor disableTextColor() const; +- void setDisableTextColor(DTColor newDisableTextColor); ++ Q_INVOKABLE QBrush disableTextColor() const; ++ void setDisableTextColor(QBrush newDisableTextColor); + +- Q_INVOKABLE DTColor normalTextColor() const; +- void setNormalTextColor(DTColor newNormalTextColor); ++ Q_INVOKABLE QBrush normalTextColor() const; ++ void setNormalTextColor(QBrush newNormalTextColor); + +- Q_INVOKABLE DTColor normalIndicatorColor() const; +- void setNormalIndicatorColor(DTColor newNormalIndicatorColor); ++ Q_INVOKABLE QBrush normalIndicatorColor() const; ++ void setNormalIndicatorColor(QBrush newNormalIndicatorColor); + +- Q_INVOKABLE DTColor hoverIndicatorColor() const; +- void setHoverIndicatorColor(DTColor newHoverIndicatorColor); ++ Q_INVOKABLE QBrush hoverIndicatorColor() const; ++ void setHoverIndicatorColor(QBrush newHoverIndicatorColor); + +- Q_INVOKABLE DTColor clickIndicatorColor() const; +- void setClickIndicatorColor(DTColor newClickIndicatorColor); ++ Q_INVOKABLE QBrush clickIndicatorColor() const; ++ void setClickIndicatorColor(QBrush newClickIndicatorColor); + +- Q_INVOKABLE DTColor disableIndicatorColor() const; +- void setDisableIndicatorColor(DTColor newDisableIndicatorColor); ++ Q_INVOKABLE QBrush disableIndicatorColor() const; ++ void setDisableIndicatorColor(QBrush newDisableIndicatorColor); + +- Q_INVOKABLE DTColor normalIndicatorBorderColor() const; +- void setNormalIndicatorBorderColor(DTColor newNormalIndicatorBorderColor); ++ Q_INVOKABLE QBrush normalIndicatorBorderColor() const; ++ void setNormalIndicatorBorderColor(QBrush newNormalIndicatorBorderColor); + +- Q_INVOKABLE DTColor hoverIndicatorBorderColor() const; +- void setHoverIndicatorBorderColor(DTColor newHoverIndicatorBorderColor); ++ Q_INVOKABLE QBrush hoverIndicatorBorderColor() const; ++ void setHoverIndicatorBorderColor(QBrush newHoverIndicatorBorderColor); + +- Q_INVOKABLE DTColor clickIndicatorBorderColor() const; +- void setClickIndicatorBorderColor(DTColor newClickIndicatorBorderColor); ++ Q_INVOKABLE QBrush clickIndicatorBorderColor() const; ++ void setClickIndicatorBorderColor(QBrush newClickIndicatorBorderColor); + +- Q_INVOKABLE DTColor disableIndicatorBorderColor() const; +- void setDisableIndicatorBorderColor(DTColor newDisableIndicatorBorderColor); ++ Q_INVOKABLE QBrush disableIndicatorBorderColor() const; ++ void setDisableIndicatorBorderColor(QBrush newDisableIndicatorBorderColor); + +- Q_INVOKABLE DTColor checked_normalIndicatorColor() const; +- void setChecked_NormalIndicatorColor(DTColor newChecked_normalIndicatorColor); ++ Q_INVOKABLE QBrush checked_normalIndicatorColor() const; ++ void setChecked_NormalIndicatorColor(QBrush newChecked_normalIndicatorColor); + +- Q_INVOKABLE DTColor checked_hoverIndicatorColor() const; +- void setChecked_HoverIndicatorColor(DTColor newChecked_hoverIndicatorColor); ++ Q_INVOKABLE QBrush checked_hoverIndicatorColor() const; ++ void setChecked_HoverIndicatorColor(QBrush newChecked_hoverIndicatorColor); + +- Q_INVOKABLE DTColor checked_clickIndicatorColor() const; +- void setChecked_ClickIndicatorColor(DTColor newChecked_clickIndicatorColor); ++ Q_INVOKABLE QBrush checked_clickIndicatorColor() const; ++ void setChecked_ClickIndicatorColor(QBrush newChecked_clickIndicatorColor); + +- Q_INVOKABLE DTColor checked_disableIndicatorColor() const; +- void setChecked_DisableIndicatorColor(DTColor newChecked_disableIndicatorColor); ++ Q_INVOKABLE QBrush checked_disableIndicatorColor() const; ++ void setChecked_DisableIndicatorColor(QBrush newChecked_disableIndicatorColor); + +- Q_INVOKABLE DTColor checked_normalIndicatorBorderColor() const; +- void setChecked_NormalIndicatorBorderColor(DTColor newChecked_normalIndicatorBorderColor); ++ Q_INVOKABLE QBrush checked_normalIndicatorBorderColor() const; ++ void setChecked_NormalIndicatorBorderColor(QBrush newChecked_normalIndicatorBorderColor); + +- Q_INVOKABLE DTColor checked_hoverIndicatorBorderColor() const; +- void setChecked_HoverIndicatorBorderColor(DTColor newChecked_hoverIndicatorBorderColor); ++ Q_INVOKABLE QBrush checked_hoverIndicatorBorderColor() const; ++ void setChecked_HoverIndicatorBorderColor(QBrush newChecked_hoverIndicatorBorderColor); + +- Q_INVOKABLE DTColor checked_clickIndicatorBorderColor() const; +- void setChecked_ClickIndicatorBorderColor(DTColor newChecked_clickIndicatorBorderColor); ++ Q_INVOKABLE QBrush checked_clickIndicatorBorderColor() const; ++ void setChecked_ClickIndicatorBorderColor(QBrush newChecked_clickIndicatorBorderColor); + +- Q_INVOKABLE DTColor checked_disableIndicatorBorderColor() const; +- void setChecked_DisableIndicatorBorderColor(DTColor newChecked_disableIndicatorBorderColor); ++ Q_INVOKABLE QBrush checked_disableIndicatorBorderColor() const; ++ void setChecked_DisableIndicatorBorderColor(QBrush newChecked_disableIndicatorBorderColor); + +- Q_INVOKABLE DTColor checked_normalChildrenColor() const; +- void setChecked_NormalChildrenColor(DTColor newChecked_normalChildrenColor); ++ Q_INVOKABLE QBrush checked_normalChildrenColor() const; ++ void setChecked_NormalChildrenColor(QBrush newChecked_normalChildrenColor); + +- Q_INVOKABLE DTColor checked_hoverChildrenColor() const; +- void setChecked_HoverChildrenColor(DTColor newChecked_hoverChildrenColor); ++ Q_INVOKABLE QBrush checked_hoverChildrenColor() const; ++ void setChecked_HoverChildrenColor(QBrush newChecked_hoverChildrenColor); + +- Q_INVOKABLE DTColor checked_clickChildrenColor() const; +- void setChecked_ClickChildrenColor(DTColor newChecked_clickChildrenColor); ++ Q_INVOKABLE QBrush checked_clickChildrenColor() const; ++ void setChecked_ClickChildrenColor(QBrush newChecked_clickChildrenColor); + +- Q_INVOKABLE DTColor checked_disableChildrenColor() const; +- void setChecked_DisableChildrenColor(DTColor newChecked_disableChildrenColor); ++ Q_INVOKABLE QBrush checked_disableChildrenColor() const; ++ void setChecked_DisableChildrenColor(QBrush newChecked_disableChildrenColor); + +- Q_INVOKABLE DTColor checked_normalChildrenBorderColor() const; +- void setChecked_NormalChildrenBorderColor(DTColor newChecked_normalChildrenBorderColor); ++ Q_INVOKABLE QBrush checked_normalChildrenBorderColor() const; ++ void setChecked_NormalChildrenBorderColor(QBrush newChecked_normalChildrenBorderColor); + +- Q_INVOKABLE DTColor checked_hoverChildrenBorderColor() const; +- void setChecked_HoverChildrenBorderColor(DTColor newChecked_hoverChildrenBorderColor); ++ Q_INVOKABLE QBrush checked_hoverChildrenBorderColor() const; ++ void setChecked_HoverChildrenBorderColor(QBrush newChecked_hoverChildrenBorderColor); + +- Q_INVOKABLE DTColor checked_clickChildrenBorderColor() const; +- void setChecked_ClickChildrenBorderColor(DTColor newChecked_clickChildrenBorderColor); ++ Q_INVOKABLE QBrush checked_clickChildrenBorderColor() const; ++ void setChecked_ClickChildrenBorderColor(QBrush newChecked_clickChildrenBorderColor); + +- Q_INVOKABLE DTColor checked_disableChildrenBorderColor() const; +- void setChecked_DisableChildrenBorderColor(DTColor newChecked_disableChildrenBorderColor); ++ Q_INVOKABLE QBrush checked_disableChildrenBorderColor() const; ++ void setChecked_DisableChildrenBorderColor(QBrush newChecked_disableChildrenBorderColor); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); +@@ -250,36 +250,38 @@ signals: + + void radiusChanged(); + ++ void parametryChanged(); ++ + private: + double m_leftRightMargin; + double m_upDownMargin; + double m_space; +- Q_INVOKABLE DTColor m_disableTextColor ; +- Q_INVOKABLE DTColor m_normalTextColor ; +- Q_INVOKABLE DTColor m_normalIndicatorColor ; +- Q_INVOKABLE DTColor m_hoverIndicatorColor ; +- Q_INVOKABLE DTColor m_clickIndicatorColor ; +- Q_INVOKABLE DTColor m_disableIndicatorColor ; +- Q_INVOKABLE DTColor m_normalIndicatorBorderColor ; +- Q_INVOKABLE DTColor m_hoverIndicatorBorderColor ; +- Q_INVOKABLE DTColor m_clickIndicatorBorderColor ; +- Q_INVOKABLE DTColor m_disableIndicatorBorderColor ; +- Q_INVOKABLE DTColor m_checked_normalIndicatorColor ; +- Q_INVOKABLE DTColor m_checked_hoverIndicatorColor ; +- Q_INVOKABLE DTColor m_checked_clickIndicatorColor ; +- Q_INVOKABLE DTColor m_checked_disableIndicatorColor ; +- Q_INVOKABLE DTColor m_checked_normalIndicatorBorderColor ; +- Q_INVOKABLE DTColor m_checked_hoverIndicatorBorderColor ; +- Q_INVOKABLE DTColor m_checked_clickIndicatorBorderColor ; +- Q_INVOKABLE DTColor m_checked_disableIndicatorBorderColor ; +- Q_INVOKABLE DTColor m_checked_normalChildrenColor ; +- Q_INVOKABLE DTColor m_checked_hoverChildrenColor ; +- Q_INVOKABLE DTColor m_checked_clickChildrenColor ; +- Q_INVOKABLE DTColor m_checked_disableChildrenColor ; +- Q_INVOKABLE DTColor m_checked_normalChildrenBorderColor ; +- Q_INVOKABLE DTColor m_checked_hoverChildrenBorderColor ; +- Q_INVOKABLE DTColor m_checked_clickChildrenBorderColor ; +- Q_INVOKABLE DTColor m_checked_disableChildrenBorderColor ; ++ Q_INVOKABLE QBrush m_disableTextColor ; ++ Q_INVOKABLE QBrush m_normalTextColor ; ++ Q_INVOKABLE QBrush m_normalIndicatorColor ; ++ Q_INVOKABLE QBrush m_hoverIndicatorColor ; ++ Q_INVOKABLE QBrush m_clickIndicatorColor ; ++ Q_INVOKABLE QBrush m_disableIndicatorColor ; ++ Q_INVOKABLE QBrush m_normalIndicatorBorderColor ; ++ Q_INVOKABLE QBrush m_hoverIndicatorBorderColor ; ++ Q_INVOKABLE QBrush m_clickIndicatorBorderColor ; ++ Q_INVOKABLE QBrush m_disableIndicatorBorderColor ; ++ Q_INVOKABLE QBrush m_checked_normalIndicatorColor ; ++ Q_INVOKABLE QBrush m_checked_hoverIndicatorColor ; ++ Q_INVOKABLE QBrush m_checked_clickIndicatorColor ; ++ Q_INVOKABLE QBrush m_checked_disableIndicatorColor ; ++ Q_INVOKABLE QBrush m_checked_normalIndicatorBorderColor ; ++ Q_INVOKABLE QBrush m_checked_hoverIndicatorBorderColor ; ++ Q_INVOKABLE QBrush m_checked_clickIndicatorBorderColor ; ++ Q_INVOKABLE QBrush m_checked_disableIndicatorBorderColor ; ++ Q_INVOKABLE QBrush m_checked_normalChildrenColor ; ++ Q_INVOKABLE QBrush m_checked_hoverChildrenColor ; ++ Q_INVOKABLE QBrush m_checked_clickChildrenColor ; ++ Q_INVOKABLE QBrush m_checked_disableChildrenColor ; ++ Q_INVOKABLE QBrush m_checked_normalChildrenBorderColor ; ++ Q_INVOKABLE QBrush m_checked_hoverChildrenBorderColor ; ++ Q_INVOKABLE QBrush m_checked_clickChildrenBorderColor ; ++ Q_INVOKABLE QBrush m_checked_disableChildrenBorderColor ; + int m_borderWidth; + int m_indicatorWidth; + int m_childrenWidth; +diff --git a/ukui-qml-style-helper/styleparameter/ukuicombobox.cpp b/ukui-qml-style-helper/styleparameter/ukuicombobox.cpp +index c892685..59b3118 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuicombobox.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuicombobox.cpp +@@ -5,7 +5,6 @@ using namespace UKUIQQC2Style; + + UKUIComboBox::UKUIComboBox(QQuickItem *parent) : QQuickItem(parent) + { +- qDebug() << "UKUIComboBox.............."; + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); +@@ -29,7 +28,7 @@ UKUIComboBox* UKUIComboBox::qmlAttachedProperties(QObject* parent) + + void UKUIComboBox::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + { +- setLeftRightPadding(instance->kmarginNormal()); ++ setLeftRightPadding(instance->tokenGap8()); + setRadius(instance->kradiusNormal()); + setBorderWidth(instance->normalline()); + setFocusBorderWidth(instance->focusline()); +@@ -41,6 +40,9 @@ void UKUIComboBox::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + setFocusBorderColor(instance->kBrandFocus()); + setNormalTextColor(instance->buttonTextActive()); + setDisableTextColor(instance->buttonTextDisable()); ++ ++ emit parametryChanged(); ++ + } + + double UKUIComboBox::radius() const +@@ -121,12 +123,12 @@ void UKUIComboBox::setNormalHeight(int newNormalHeight) + emit normalHeightChanged(); + } + +-DTColor UKUIComboBox::normalBC() const ++QBrush UKUIComboBox::normalBC() const + { + return m_normalBC; + } + +-void UKUIComboBox::setNormalBC(DTColor newNormalBC) ++void UKUIComboBox::setNormalBC(QBrush newNormalBC) + { + if (m_normalBC !=newNormalBC){ + m_normalBC = newNormalBC; +@@ -134,12 +136,12 @@ void UKUIComboBox::setNormalBC(DTColor newNormalBC) + } + } + +-DTColor UKUIComboBox::clickedBC() const ++QBrush UKUIComboBox::clickedBC() const + { + return m_clickedBC; + } + +-void UKUIComboBox::setClickedBC(DTColor newClickedBC) ++void UKUIComboBox::setClickedBC(QBrush newClickedBC) + { + if (m_clickedBC != newClickedBC){ + m_clickedBC = newClickedBC; +@@ -147,12 +149,12 @@ void UKUIComboBox::setClickedBC(DTColor newClickedBC) + } + } + +-DTColor UKUIComboBox::hoveredBC() const ++QBrush UKUIComboBox::hoveredBC() const + { + return m_hoveredBC; + } + +-void UKUIComboBox::setHoveredBC(DTColor newHoveredBC) ++void UKUIComboBox::setHoveredBC(QBrush newHoveredBC) + { + if (m_hoveredBC != newHoveredBC){ + m_hoveredBC = newHoveredBC; +@@ -160,12 +162,12 @@ void UKUIComboBox::setHoveredBC(DTColor newHoveredBC) + } + } + +-DTColor UKUIComboBox::disableBC() const ++QBrush UKUIComboBox::disableBC() const + { + return m_disableBC; + } + +-void UKUIComboBox::setDisableBC(DTColor newDisableBC) ++void UKUIComboBox::setDisableBC(QBrush newDisableBC) + { + if (m_disableBC != newDisableBC){ + m_disableBC = newDisableBC; +@@ -173,12 +175,12 @@ void UKUIComboBox::setDisableBC(DTColor newDisableBC) + } + } + +-DTColor UKUIComboBox::disableTextColor() const ++QBrush UKUIComboBox::disableTextColor() const + { + return m_disableTextColor; + } + +-void UKUIComboBox::setDisableTextColor(DTColor newDisableTextColor) ++void UKUIComboBox::setDisableTextColor(QBrush newDisableTextColor) + { + if (m_disableTextColor != newDisableTextColor){ + m_disableTextColor = newDisableTextColor; +@@ -186,12 +188,12 @@ void UKUIComboBox::setDisableTextColor(DTColor newDisableTextColor) + } + } + +-DTColor UKUIComboBox::normalTextColor() const ++QBrush UKUIComboBox::normalTextColor() const + { + return m_normalTextColor; + } + +-void UKUIComboBox::setNormalTextColor(DTColor newNormalTextColor) ++void UKUIComboBox::setNormalTextColor(QBrush newNormalTextColor) + { + if (m_normalTextColor != newNormalTextColor){ + m_normalTextColor = newNormalTextColor; +@@ -225,12 +227,12 @@ void UKUIComboBox::setFocusBorderWidth(int newFocusBorderWidth) + emit focusBorderWidthChanged(); + } + +-DTColor UKUIComboBox::normalBorderColor() const ++QBrush UKUIComboBox::normalBorderColor() const + { + return m_normalBorderColor; + } + +-void UKUIComboBox::setNormalBorderColor(DTColor newNormalBorderColor) ++void UKUIComboBox::setNormalBorderColor(QBrush newNormalBorderColor) + { + if (m_normalBorderColor != newNormalBorderColor){ + m_normalBorderColor = newNormalBorderColor; +@@ -238,12 +240,12 @@ void UKUIComboBox::setNormalBorderColor(DTColor newNormalBorderColor) + } + } + +-DTColor UKUIComboBox::clickBorderColor() const ++QBrush UKUIComboBox::clickBorderColor() const + { + return m_clickBorderColor; + } + +-void UKUIComboBox::setClickBorderColor(DTColor newClickBorderColor) ++void UKUIComboBox::setClickBorderColor(QBrush newClickBorderColor) + { + if (m_clickBorderColor != newClickBorderColor){ + m_clickBorderColor = newClickBorderColor; +@@ -251,12 +253,12 @@ void UKUIComboBox::setClickBorderColor(DTColor newClickBorderColor) + } + } + +-DTColor UKUIComboBox::disableBorderColor() const ++QBrush UKUIComboBox::disableBorderColor() const + { + return m_disableBorderColor; + } + +-void UKUIComboBox::setDisableBorderColor(DTColor newDisableBorderColor) ++void UKUIComboBox::setDisableBorderColor(QBrush newDisableBorderColor) + { + if (m_disableBorderColor != newDisableBorderColor){ + m_disableBorderColor = newDisableBorderColor; +@@ -264,12 +266,12 @@ void UKUIComboBox::setDisableBorderColor(DTColor newDisableBorderColor) + } + } + +-DTColor UKUIComboBox::focusBorderColor() const ++QBrush UKUIComboBox::focusBorderColor() const + { + return m_focusBorderColor; + } + +-void UKUIComboBox::setFocusBorderColor(DTColor newFocusBorderColor) ++void UKUIComboBox::setFocusBorderColor(QBrush newFocusBorderColor) + { + if (m_focusBorderColor != newFocusBorderColor){ + m_focusBorderColor = newFocusBorderColor; +diff --git a/ukui-qml-style-helper/styleparameter/ukuicombobox.h b/ukui-qml-style-helper/styleparameter/ukuicombobox.h +index 8af4af3..99521d9 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuicombobox.h ++++ b/ukui-qml-style-helper/styleparameter/ukuicombobox.h +@@ -42,19 +42,19 @@ class UKUIComboBox : public QQuickItem + + Q_PROPERTY(int normalWidth READ normalWidth WRITE setNormalWidth NOTIFY normalWidthChanged) + Q_PROPERTY(int normalHeight READ normalHeight WRITE setNormalHeight NOTIFY normalHeightChanged) +- Q_PROPERTY(DTColor normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) +- Q_PROPERTY(DTColor clickedBC READ clickedBC WRITE setClickedBC NOTIFY clickedBCChanged) +- Q_PROPERTY(DTColor hoveredBC READ hoveredBC WRITE setHoveredBC NOTIFY hoveredBCChanged) +- Q_PROPERTY(DTColor disableBC READ disableBC WRITE setDisableBC NOTIFY disableBCChanged) +- Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) +- Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) ++ Q_PROPERTY(QBrush normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) ++ Q_PROPERTY(QBrush clickedBC READ clickedBC WRITE setClickedBC NOTIFY clickedBCChanged) ++ Q_PROPERTY(QBrush hoveredBC READ hoveredBC WRITE setHoveredBC NOTIFY hoveredBCChanged) ++ Q_PROPERTY(QBrush disableBC READ disableBC WRITE setDisableBC NOTIFY disableBCChanged) ++ Q_PROPERTY(QBrush disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) ++ Q_PROPERTY(QBrush normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) + + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) + Q_PROPERTY(int focusBorderWidth READ focusBorderWidth WRITE setFocusBorderWidth NOTIFY focusBorderWidthChanged) +- Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) +- Q_PROPERTY(DTColor clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) +- Q_PROPERTY(DTColor disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) +- Q_PROPERTY(DTColor focusBorderColor READ focusBorderColor WRITE setFocusBorderColor NOTIFY focusBorderColorChanged) ++ Q_PROPERTY(QBrush normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) ++ Q_PROPERTY(QBrush clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) ++ Q_PROPERTY(QBrush disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) ++ Q_PROPERTY(QBrush focusBorderColor READ focusBorderColor WRITE setFocusBorderColor NOTIFY focusBorderColorChanged) + + + public: +@@ -84,23 +84,23 @@ public: + int normalHeight() const; + void setNormalHeight(int newNormalHeight); + +- Q_INVOKABLE DTColor normalBC() const; +- void setNormalBC(DTColor newNormalBC); ++ Q_INVOKABLE QBrush normalBC() const; ++ void setNormalBC(QBrush newNormalBC); + +- Q_INVOKABLE DTColor clickedBC() const; +- void setClickedBC(DTColor newClickedBC); ++ Q_INVOKABLE QBrush clickedBC() const; ++ void setClickedBC(QBrush newClickedBC); + +- Q_INVOKABLE DTColor hoveredBC() const; +- void setHoveredBC(DTColor newHoveredBC); ++ Q_INVOKABLE QBrush hoveredBC() const; ++ void setHoveredBC(QBrush newHoveredBC); + +- Q_INVOKABLE DTColor disableBC() const; +- void setDisableBC(DTColor newDisableBC); ++ Q_INVOKABLE QBrush disableBC() const; ++ void setDisableBC(QBrush newDisableBC); + +- Q_INVOKABLE DTColor disableTextColor() const; +- void setDisableTextColor(DTColor newDisableTextColor); ++ Q_INVOKABLE QBrush disableTextColor() const; ++ void setDisableTextColor(QBrush newDisableTextColor); + +- Q_INVOKABLE DTColor normalTextColor() const; +- void setNormalTextColor(DTColor newNormalTextColor); ++ Q_INVOKABLE QBrush normalTextColor() const; ++ void setNormalTextColor(QBrush newNormalTextColor); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); +@@ -108,17 +108,17 @@ public: + int focusBorderWidth() const; + void setFocusBorderWidth(int newFocusBorderWidth); + +- Q_INVOKABLE DTColor normalBorderColor() const; +- void setNormalBorderColor(DTColor newNormalBorderColor); ++ Q_INVOKABLE QBrush normalBorderColor() const; ++ void setNormalBorderColor(QBrush newNormalBorderColor); + +- Q_INVOKABLE DTColor clickBorderColor() const; +- void setClickBorderColor(DTColor newClickBorderColor); ++ Q_INVOKABLE QBrush clickBorderColor() const; ++ void setClickBorderColor(QBrush newClickBorderColor); + +- Q_INVOKABLE DTColor disableBorderColor() const; +- void setDisableBorderColor(DTColor newDisableBorderColor); ++ Q_INVOKABLE QBrush disableBorderColor() const; ++ void setDisableBorderColor(QBrush newDisableBorderColor); + +- Q_INVOKABLE DTColor focusBorderColor() const; +- void setFocusBorderColor(DTColor newFocusBorderColor); ++ Q_INVOKABLE QBrush focusBorderColor() const; ++ void setFocusBorderColor(QBrush newFocusBorderColor); + + signals: + +@@ -158,6 +158,8 @@ signals: + + void focusBorderColorChanged(); + ++ void parametryChanged(); ++ + private: + + double m_radius; +@@ -169,16 +171,16 @@ private: + int m_borderWidth; + int m_focusBorderWidth; + +- Q_INVOKABLE DTColor m_normalBC ; +- Q_INVOKABLE DTColor m_clickedBC ; +- Q_INVOKABLE DTColor m_hoveredBC ; +- Q_INVOKABLE DTColor m_disableBC ; +- Q_INVOKABLE DTColor m_disableTextColor ; +- Q_INVOKABLE DTColor m_normalTextColor ; +- Q_INVOKABLE DTColor m_normalBorderColor ; +- Q_INVOKABLE DTColor m_clickBorderColor ; +- Q_INVOKABLE DTColor m_disableBorderColor ; +- Q_INVOKABLE DTColor m_focusBorderColor ; ++ Q_INVOKABLE QBrush m_normalBC ; ++ Q_INVOKABLE QBrush m_clickedBC ; ++ Q_INVOKABLE QBrush m_hoveredBC ; ++ Q_INVOKABLE QBrush m_disableBC ; ++ Q_INVOKABLE QBrush m_disableTextColor ; ++ Q_INVOKABLE QBrush m_normalTextColor ; ++ Q_INVOKABLE QBrush m_normalBorderColor ; ++ Q_INVOKABLE QBrush m_clickBorderColor ; ++ Q_INVOKABLE QBrush m_disableBorderColor ; ++ Q_INVOKABLE QBrush m_focusBorderColor ; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance ; + +diff --git a/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.cpp b/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.cpp +index 8b09303..7cd409d 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.cpp +@@ -22,14 +22,15 @@ UKUIItemDelegate::~UKUIItemDelegate() + + void UKUIItemDelegate::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + { ++ setPadding(12); + setRadius(instance->kradiusNormal()); + setNormalTextColor(instance->textActive()); + setDisableTextColor(instance->textDisable()); + +- setNormalBC(DTColor(QColor(0,0,0,0))); ++ setNormalBC(QBrush(QColor(0,0,0,0))); + setClickedBC(instance->kContainClick()); + setHoveredBC(instance->kContainHover()); +- setDisableBC(DTColor(QColor(0,0,0,0))); ++ setDisableBC(QBrush(QColor(0,0,0,0))); + + setBorderWidth(1); + setNormalBorderColor(instance->kLineComponentNormal()); +@@ -37,6 +38,21 @@ void UKUIItemDelegate::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + setHoverBorderColor(instance->kLineComponentHover()); + setDisableBorderColor(instance->kLineComponentDisable()); + ++ setNormalHBC(instance->highLightActive()); ++ setNormalBorderHColor(instance->kLineBrandNormal()); ++ setHoveredHBC(instance->kBrandHover()); ++ setHoverBorderHColor(instance->kLineBrandHover()); ++ setClickedHBC(instance->kBrandClick()); ++ setClickBorderHColor(instance->kLineBrandClick()); ++ ++ setNormalCheckedBC(instance->buttonActive()); ++ setNormalBorderCheckedColor(instance->kLineComponentNormal()); ++ setHoveredCheckedBC(instance->kComponentHover()); ++ setHoverBorderCheckedColor(instance->kLineComponentNormal()); ++ setClickedCheckedBC(instance->kComponentClick()); ++ setClickBorderCheckedColor(instance->kLineComponentNormal()); ++ emit parametryChanged(); ++ + } + + +@@ -46,12 +62,12 @@ UKUIItemDelegate* UKUIItemDelegate::qmlAttachedProperties(QObject *parent) + return new UKUIItemDelegate(p); + } + +-DTColor UKUIItemDelegate::normalTextColor() const ++QBrush UKUIItemDelegate::normalTextColor() const + { + return m_normalTextColor; + } + +-void UKUIItemDelegate::setNormalTextColor(DTColor newNormalTextColor) ++void UKUIItemDelegate::setNormalTextColor(QBrush newNormalTextColor) + { + if (m_normalTextColor == newNormalTextColor) + return; +@@ -59,12 +75,12 @@ void UKUIItemDelegate::setNormalTextColor(DTColor newNormalTextColor) + emit normalTextColorChanged(); + } + +-DTColor UKUIItemDelegate::disableTextColor() const ++QBrush UKUIItemDelegate::disableTextColor() const + { + return m_disableTextColor; + } + +-void UKUIItemDelegate::setDisableTextColor(DTColor newDisableTextColor) ++void UKUIItemDelegate::setDisableTextColor(QBrush newDisableTextColor) + { + if (m_disableTextColor == newDisableTextColor) + return; +@@ -72,12 +88,12 @@ void UKUIItemDelegate::setDisableTextColor(DTColor newDisableTextColor) + emit disableTextColorChanged(); + } + +-DTColor UKUIItemDelegate::normalBC() const ++QBrush UKUIItemDelegate::normalBC() const + { + return m_normalBC; + } + +-void UKUIItemDelegate::setNormalBC(DTColor newNormalBC) ++void UKUIItemDelegate::setNormalBC(QBrush newNormalBC) + { + if (m_normalBC == newNormalBC) + return; +@@ -85,12 +101,12 @@ void UKUIItemDelegate::setNormalBC(DTColor newNormalBC) + emit normalBCChanged(); + } + +-DTColor UKUIItemDelegate::clickedBC() const ++QBrush UKUIItemDelegate::clickedBC() const + { + return m_clickedBC; + } + +-void UKUIItemDelegate::setClickedBC(DTColor newClickedBC) ++void UKUIItemDelegate::setClickedBC(QBrush newClickedBC) + { + if (m_clickedBC == newClickedBC) + return; +@@ -98,12 +114,12 @@ void UKUIItemDelegate::setClickedBC(DTColor newClickedBC) + emit clickedBCChanged(); + } + +-DTColor UKUIItemDelegate::hoveredBC() const ++QBrush UKUIItemDelegate::hoveredBC() const + { + return m_hoveredBC; + } + +-void UKUIItemDelegate::setHoveredBC(DTColor newHoveredBC) ++void UKUIItemDelegate::setHoveredBC(QBrush newHoveredBC) + { + if (m_hoveredBC == newHoveredBC) + return; +@@ -111,12 +127,12 @@ void UKUIItemDelegate::setHoveredBC(DTColor newHoveredBC) + emit hoveredBCChanged(); + } + +-DTColor UKUIItemDelegate::disableBC() const ++QBrush UKUIItemDelegate::disableBC() const + { + return m_disableBC; + } + +-void UKUIItemDelegate::setDisableBC(DTColor newDisableBC) ++void UKUIItemDelegate::setDisableBC(QBrush newDisableBC) + { + if (m_disableBC == newDisableBC) + return; +@@ -150,12 +166,12 @@ void UKUIItemDelegate::setBorderWidth(int newBorderWidth) + emit borderWidthChanged(); + } + +-DTColor UKUIItemDelegate::normalBorderColor() const ++QBrush UKUIItemDelegate::normalBorderColor() const + { + return m_normalBorderColor; + } + +-void UKUIItemDelegate::setNormalBorderColor(DTColor newNormalBorderColor) ++void UKUIItemDelegate::setNormalBorderColor(QBrush newNormalBorderColor) + { + if (m_normalBorderColor == newNormalBorderColor) + return; +@@ -163,12 +179,12 @@ void UKUIItemDelegate::setNormalBorderColor(DTColor newNormalBorderColor) + emit normalBorderColorChanged(); + } + +-DTColor UKUIItemDelegate::hoverBorderColor() const ++QBrush UKUIItemDelegate::hoverBorderColor() const + { + return m_hoverBorderColor; + } + +-void UKUIItemDelegate::setHoverBorderColor(DTColor newHoverBorderColor) ++void UKUIItemDelegate::setHoverBorderColor(QBrush newHoverBorderColor) + { + if (m_hoverBorderColor == newHoverBorderColor) + return; +@@ -176,12 +192,12 @@ void UKUIItemDelegate::setHoverBorderColor(DTColor newHoverBorderColor) + emit hoverBorderColorChanged(); + } + +-DTColor UKUIItemDelegate::clickBorderColor() const ++QBrush UKUIItemDelegate::clickBorderColor() const + { + return m_clickBorderColor; + } + +-void UKUIItemDelegate::setClickBorderColor(DTColor newClickBorderColor) ++void UKUIItemDelegate::setClickBorderColor(QBrush newClickBorderColor) + { + if (m_clickBorderColor == newClickBorderColor) + return; +@@ -189,15 +205,197 @@ void UKUIItemDelegate::setClickBorderColor(DTColor newClickBorderColor) + emit clickBorderColorChanged(); + } + +-DTColor UKUIItemDelegate::disableBorderColor() const ++QBrush UKUIItemDelegate::disableBorderColor() const + { + return m_disableBorderColor; + } + +-void UKUIItemDelegate::setDisableBorderColor(DTColor newDisableBorderColor) ++void UKUIItemDelegate::setDisableBorderColor(QBrush newDisableBorderColor) + { + if (m_disableBorderColor == newDisableBorderColor) + return; + m_disableBorderColor = newDisableBorderColor; + emit disableBorderColorChanged(); + } ++ ++const QBrush &UKUIItemDelegate::clickedHBC() const ++{ ++ return m_clickedHBC; ++} ++ ++void UKUIItemDelegate::setClickedHBC(const QBrush &newClickedHBC) ++{ ++ if (m_clickedHBC == newClickedHBC) ++ return; ++ m_clickedHBC = newClickedHBC; ++ emit clickedHBCChanged(); ++} ++ ++const QBrush &UKUIItemDelegate::hoveredHBC() const ++{ ++ return m_hoveredHBC; ++} ++ ++void UKUIItemDelegate::setHoveredHBC(const QBrush &newHoveredHBC) ++{ ++ if (m_hoveredHBC == newHoveredHBC) ++ return; ++ m_hoveredHBC = newHoveredHBC; ++ emit hoveredHBCChanged(); ++} ++ ++const QBrush &UKUIItemDelegate::hoverBorderHColor() const ++{ ++ return m_hoverBorderHColor; ++} ++ ++void UKUIItemDelegate::setHoverBorderHColor(const QBrush &newHoverBorderHColor) ++{ ++ if (m_hoverBorderHColor == newHoverBorderHColor) ++ return; ++ m_hoverBorderHColor = newHoverBorderHColor; ++ emit hoverBorderHColorChanged(); ++} ++ ++const QBrush &UKUIItemDelegate::clickBorderHColor() const ++{ ++ return m_clickBorderHColor; ++} ++ ++void UKUIItemDelegate::setClickBorderHColor(const QBrush &newClickBorderHColor) ++{ ++ if (m_clickBorderHColor == newClickBorderHColor) ++ return; ++ m_clickBorderHColor = newClickBorderHColor; ++ emit clickBorderHColorChanged(); ++} ++ ++const QBrush &UKUIItemDelegate::normalHBC() const ++{ ++ return m_normalHBC; ++} ++ ++void UKUIItemDelegate::setNormalHBC(const QBrush &newNormalHBC) ++{ ++ if (m_normalHBC == newNormalHBC) ++ return; ++ m_normalHBC = newNormalHBC; ++ emit normalHBCChanged(); ++} ++ ++const QBrush &UKUIItemDelegate::normalBorderHColor() const ++{ ++ return m_normalBorderHColor; ++} ++ ++void UKUIItemDelegate::setNormalBorderHColor(const QBrush &newNormalBorderHColor) ++{ ++ if (m_normalBorderHColor == newNormalBorderHColor) ++ return; ++ m_normalBorderHColor = newNormalBorderHColor; ++ emit normalBorderHColorChanged(); ++} ++ ++const QBrush &UKUIItemDelegate::normalCheckedBC() const ++{ ++ return m_normalCheckedBC; ++} ++ ++void UKUIItemDelegate::setNormalCheckedBC(const QBrush &newNormalCheckedBC) ++{ ++ if (m_normalCheckedBC == newNormalCheckedBC) ++ return; ++ m_normalCheckedBC = newNormalCheckedBC; ++ emit normalCheckedBCChanged(); ++} ++ ++const QBrush &UKUIItemDelegate::clickedCheckedBC() const ++{ ++ return m_clickedCheckedBC; ++} ++ ++void UKUIItemDelegate::setClickedCheckedBC(const QBrush &newClickedCheckedBC) ++{ ++ if (m_clickedCheckedBC == newClickedCheckedBC) ++ return; ++ m_clickedCheckedBC = newClickedCheckedBC; ++ emit clickedCheckedBCChanged(); ++} ++ ++const QBrush &UKUIItemDelegate::hoveredCheckedBC() const ++{ ++ return m_hoveredCheckedBC; ++} ++ ++void UKUIItemDelegate::setHoveredCheckedBC(const QBrush &newHoveredCheckedBC) ++{ ++ if (m_hoveredCheckedBC == newHoveredCheckedBC) ++ return; ++ m_hoveredCheckedBC = newHoveredCheckedBC; ++ emit hoveredCheckedBCChanged(); ++} ++ ++const QBrush &UKUIItemDelegate::normalBorderCheckedColor() const ++{ ++ return m_normalBorderCheckedColor; ++} ++ ++void UKUIItemDelegate::setNormalBorderCheckedColor(const QBrush &newNormalBorderCheckedColor) ++{ ++ if (m_normalBorderCheckedColor == newNormalBorderCheckedColor) ++ return; ++ m_normalBorderCheckedColor = newNormalBorderCheckedColor; ++ emit normalBorderCheckedColorChanged(); ++} ++ ++const QBrush &UKUIItemDelegate::hoverBorderCheckedColor() const ++{ ++ return m_hoverBorderCheckedColor; ++} ++ ++void UKUIItemDelegate::setHoverBorderCheckedColor(const QBrush &newHoverBorderCheckedColor) ++{ ++ if (m_hoverBorderCheckedColor == newHoverBorderCheckedColor) ++ return; ++ m_hoverBorderCheckedColor = newHoverBorderCheckedColor; ++ emit hoverBorderCheckedColorChanged(); ++} ++ ++const QBrush &UKUIItemDelegate::clickBorderCheckedColor() const ++{ ++ return m_clickBorderCheckedColor; ++} ++ ++void UKUIItemDelegate::setClickBorderCheckedColor(const QBrush &newClickBorderCheckedColor) ++{ ++ if (m_clickBorderCheckedColor == newClickBorderCheckedColor) ++ return; ++ m_clickBorderCheckedColor = newClickBorderCheckedColor; ++ emit clickBorderCheckedColorChanged(); ++} ++ ++int UKUIItemDelegate::implicitHeight() const ++{ ++ return m_implicitHeight; ++} ++ ++void UKUIItemDelegate::setImplicitHeight(int newImplicitHeight) ++{ ++ if (m_implicitHeight == newImplicitHeight) ++ return; ++ m_implicitHeight = newImplicitHeight; ++ emit implicitHeightChanged(); ++} ++ ++int UKUIItemDelegate::padding() const ++{ ++ return m_padding; ++} ++ ++void UKUIItemDelegate::setPadding(int newPadding) ++{ ++ if (m_padding == newPadding) ++ return; ++ m_padding = newPadding; ++ emit paddingChanged(); ++} +diff --git a/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.h b/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.h +index dab0f86..7019659 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.h ++++ b/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.h +@@ -39,19 +39,35 @@ class UKUIItemDelegate : public QQuickItem + Q_OBJECT + + Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY radiusChanged) ++ Q_PROPERTY(int padding READ padding WRITE setPadding NOTIFY paddingChanged) + +- Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) +- Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) +- Q_PROPERTY(DTColor normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) +- Q_PROPERTY(DTColor clickedBC READ clickedBC WRITE setClickedBC NOTIFY clickedBCChanged) +- Q_PROPERTY(DTColor hoveredBC READ hoveredBC WRITE setHoveredBC NOTIFY hoveredBCChanged) +- Q_PROPERTY(DTColor disableBC READ disableBC WRITE setDisableBC NOTIFY disableBCChanged) ++ Q_PROPERTY(QBrush normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) ++ Q_PROPERTY(QBrush disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) ++ Q_PROPERTY(QBrush normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) ++ Q_PROPERTY(QBrush clickedBC READ clickedBC WRITE setClickedBC NOTIFY clickedBCChanged) ++ Q_PROPERTY(QBrush hoveredBC READ hoveredBC WRITE setHoveredBC NOTIFY hoveredBCChanged) ++ Q_PROPERTY(QBrush disableBC READ disableBC WRITE setDisableBC NOTIFY disableBCChanged) + + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) +- Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) +- Q_PROPERTY(DTColor hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) +- Q_PROPERTY(DTColor clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) +- Q_PROPERTY(DTColor disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) ++ Q_PROPERTY(QBrush normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) ++ Q_PROPERTY(QBrush hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) ++ Q_PROPERTY(QBrush clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) ++ Q_PROPERTY(QBrush disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) ++ ++ Q_PROPERTY(QBrush normalHBC READ normalHBC WRITE setNormalHBC NOTIFY normalHBCChanged) ++ Q_PROPERTY(QBrush clickedHBC READ clickedHBC WRITE setClickedHBC NOTIFY clickedHBCChanged) ++ Q_PROPERTY(QBrush hoveredHBC READ hoveredHBC WRITE setHoveredHBC NOTIFY hoveredHBCChanged) ++ Q_PROPERTY(QBrush normalBorderHColor READ normalBorderHColor WRITE setNormalBorderHColor NOTIFY normalBorderHColorChanged) ++ Q_PROPERTY(QBrush hoverBorderHColor READ hoverBorderHColor WRITE setHoverBorderHColor NOTIFY hoverBorderHColorChanged) ++ Q_PROPERTY(QBrush clickBorderHColor READ clickBorderHColor WRITE setClickBorderHColor NOTIFY clickBorderHColorChanged) ++ ++ Q_PROPERTY(QBrush normalCheckedBC READ normalCheckedBC WRITE setNormalCheckedBC NOTIFY normalCheckedBCChanged) ++ Q_PROPERTY(QBrush clickedCheckedBC READ clickedCheckedBC WRITE setClickedCheckedBC NOTIFY clickedCheckedBCChanged) ++ Q_PROPERTY(QBrush hoveredCheckedBC READ hoveredCheckedBC WRITE setHoveredCheckedBC NOTIFY hoveredCheckedBCChanged) ++ Q_PROPERTY(QBrush normalBorderCheckedColor READ normalBorderCheckedColor WRITE setNormalBorderCheckedColor NOTIFY normalBorderCheckedColorChanged) ++ Q_PROPERTY(QBrush hoverBorderCheckedColor READ hoverBorderCheckedColor WRITE setHoverBorderCheckedColor NOTIFY hoverBorderCheckedColorChanged) ++ Q_PROPERTY(QBrush clickBorderCheckedColor READ clickBorderCheckedColor WRITE setClickBorderCheckedColor NOTIFY clickBorderCheckedColorChanged) ++ Q_PROPERTY(int implicitHeight READ implicitHeight WRITE setImplicitHeight NOTIFY implicitHeightChanged) + + public: + explicit UKUIItemDelegate(QQuickItem *parent = nullptr); +@@ -62,23 +78,23 @@ public: + static UKUIItemDelegate* qmlAttachedProperties(QObject* parent); + + +- Q_INVOKABLE DTColor normalTextColor() const; +- void setNormalTextColor(DTColor newNormalTextColor); ++ Q_INVOKABLE QBrush normalTextColor() const; ++ void setNormalTextColor(QBrush newNormalTextColor); + +- Q_INVOKABLE DTColor disableTextColor() const; +- void setDisableTextColor(DTColor newDisableTextColor); ++ Q_INVOKABLE QBrush disableTextColor() const; ++ void setDisableTextColor(QBrush newDisableTextColor); + +- Q_INVOKABLE DTColor normalBC() const; +- void setNormalBC(DTColor newNormalBC); ++ Q_INVOKABLE QBrush normalBC() const; ++ void setNormalBC(QBrush newNormalBC); + +- Q_INVOKABLE DTColor clickedBC() const; +- void setClickedBC(DTColor newClickedBC); ++ Q_INVOKABLE QBrush clickedBC() const; ++ void setClickedBC(QBrush newClickedBC); + +- Q_INVOKABLE DTColor hoveredBC() const; +- void setHoveredBC(DTColor newHoveredBC); ++ Q_INVOKABLE QBrush hoveredBC() const; ++ void setHoveredBC(QBrush newHoveredBC); + +- Q_INVOKABLE DTColor disableBC() const; +- void setDisableBC(DTColor newDisableBC); ++ Q_INVOKABLE QBrush disableBC() const; ++ void setDisableBC(QBrush newDisableBC); + + int radius() const; + void setRadius(int newRadius); +@@ -86,17 +102,59 @@ public: + int borderWidth() const; + void setBorderWidth(int newBorderWidth); + +- Q_INVOKABLE DTColor normalBorderColor() const; +- void setNormalBorderColor(DTColor newNormalBorderColor); ++ Q_INVOKABLE QBrush normalBorderColor() const; ++ void setNormalBorderColor(QBrush newNormalBorderColor); + +- Q_INVOKABLE DTColor hoverBorderColor() const; +- void setHoverBorderColor(DTColor newHoverBorderColor); ++ Q_INVOKABLE QBrush hoverBorderColor() const; ++ void setHoverBorderColor(QBrush newHoverBorderColor); + +- Q_INVOKABLE DTColor clickBorderColor() const; +- void setClickBorderColor(DTColor newClickBorderColor); ++ Q_INVOKABLE QBrush clickBorderColor() const; ++ void setClickBorderColor(QBrush newClickBorderColor); + +- Q_INVOKABLE DTColor disableBorderColor() const; +- void setDisableBorderColor(DTColor newDisableBorderColor); ++ Q_INVOKABLE QBrush disableBorderColor() const; ++ void setDisableBorderColor(QBrush newDisableBorderColor); ++ ++ const QBrush &clickedHBC() const; ++ void setClickedHBC(const QBrush &newClickedHBC); ++ ++ const QBrush &hoveredHBC() const; ++ void setHoveredHBC(const QBrush &newHoveredHBC); ++ ++ const QBrush &hoverBorderHColor() const; ++ void setHoverBorderHColor(const QBrush &newHoverBorderHColor); ++ ++ const QBrush &clickBorderHColor() const; ++ void setClickBorderHColor(const QBrush &newClickBorderHColor); ++ ++ const QBrush &normalHBC() const; ++ void setNormalHBC(const QBrush &newNormalHBC); ++ ++ const QBrush &normalBorderHColor() const; ++ void setNormalBorderHColor(const QBrush &newNormalBorderHColor); ++ ++ const QBrush &normalCheckedBC() const; ++ void setNormalCheckedBC(const QBrush &newNormalCheckedBC); ++ ++ const QBrush &clickedCheckedBC() const; ++ void setClickedCheckedBC(const QBrush &newClickedCheckedBC); ++ ++ const QBrush &hoveredCheckedBC() const; ++ void setHoveredCheckedBC(const QBrush &newHoveredCheckedBC); ++ ++ const QBrush &normalBorderCheckedColor() const; ++ void setNormalBorderCheckedColor(const QBrush &newNormalBorderCheckedColor); ++ ++ const QBrush &hoverBorderCheckedColor() const; ++ void setHoverBorderCheckedColor(const QBrush &newHoverBorderCheckedColor); ++ ++ const QBrush &clickBorderCheckedColor() const; ++ void setClickBorderCheckedColor(const QBrush &newClickBorderCheckedColor); ++ ++ int implicitHeight() const; ++ void setImplicitHeight(int newImplicitHeight); ++ ++ int padding() const; ++ void setPadding(int newPadding); + + signals: + +@@ -124,22 +182,66 @@ signals: + + void disableBorderColorChanged(); + ++ void parametryChanged(); ++ ++ void clickedHBCChanged(); ++ ++ void hoveredHBCChanged(); ++ ++ void hoverBorderHColorChanged(); ++ ++ void clickBorderHColorChanged(); ++ ++ void normalHBCChanged(); ++ ++ void normalBorderHColorChanged(); ++ ++ void normalCheckedBCChanged(); ++ ++ void clickedCheckedBCChanged(); ++ ++ void hoveredCheckedBCChanged(); ++ ++ void normalBorderCheckedColorChanged(); ++ ++ void hoverBorderCheckedColorChanged(); ++ ++ void clickBorderCheckedColorChanged(); ++ ++ void implicitHeightChanged(); ++ ++ void paddingChanged(); ++ + private: +- Q_INVOKABLE DTColor m_normalTextColor ; +- Q_INVOKABLE DTColor m_disableTextColor ; +- Q_INVOKABLE DTColor m_normalBC ; +- Q_INVOKABLE DTColor m_clickedBC ; +- Q_INVOKABLE DTColor m_hoveredBC ; +- Q_INVOKABLE DTColor m_disableBC ; +- Q_INVOKABLE DTColor m_normalBorderColor ; +- Q_INVOKABLE DTColor m_hoverBorderColor ; +- Q_INVOKABLE DTColor m_clickBorderColor ; +- Q_INVOKABLE DTColor m_disableBorderColor ; ++ Q_INVOKABLE QBrush m_normalTextColor ; ++ Q_INVOKABLE QBrush m_disableTextColor ; ++ Q_INVOKABLE QBrush m_normalBC ; ++ Q_INVOKABLE QBrush m_clickedBC ; ++ Q_INVOKABLE QBrush m_hoveredBC ; ++ Q_INVOKABLE QBrush m_disableBC ; ++ Q_INVOKABLE QBrush m_normalBorderColor ; ++ Q_INVOKABLE QBrush m_hoverBorderColor ; ++ Q_INVOKABLE QBrush m_clickBorderColor ; ++ Q_INVOKABLE QBrush m_disableBorderColor ; + int m_radius; + int m_borderWidth; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + ++ QBrush m_clickedHBC; ++ QBrush m_hoveredHBC; ++ QBrush m_hoverBorderHColor; ++ QBrush m_clickBorderHColor; ++ QBrush m_normalHBC; ++ QBrush m_normalBorderHColor; ++ QBrush m_normalCheckedBC; ++ QBrush m_clickedCheckedBC; ++ QBrush m_hoveredCheckedBC; ++ QBrush m_normalBorderCheckedColor; ++ QBrush m_hoverBorderCheckedColor; ++ QBrush m_clickBorderCheckedColor; ++ int m_implicitHeight = 36; ++ int m_padding; + }; + } + QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUIItemDelegate, QML_HAS_ATTACHED_PROPERTIES) +diff --git a/ukui-qml-style-helper/styleparameter/ukuilabel.cpp b/ukui-qml-style-helper/styleparameter/ukuilabel.cpp +index fdacb62..bc18f5a 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuilabel.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuilabel.cpp +@@ -24,6 +24,9 @@ void UKUILabel::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + { + setNormalColor(instance->textActive()); + setDisableColor(instance->textDisable()); ++ ++ emit parametryChanged(); ++ + } + + UKUILabel* UKUILabel::qmlAttachedProperties(QObject *parent) +@@ -32,12 +35,12 @@ UKUILabel* UKUILabel::qmlAttachedProperties(QObject *parent) + return new UKUILabel(p); + } + +-const DTColor &UKUILabel::normalColor() const ++const QBrush &UKUILabel::normalColor() const + { + return m_normalColor; + } + +-void UKUILabel::setNormalColor(const DTColor &newNormalColor) ++void UKUILabel::setNormalColor(const QBrush &newNormalColor) + { + if (m_normalColor == newNormalColor) + return; +@@ -45,12 +48,12 @@ void UKUILabel::setNormalColor(const DTColor &newNormalColor) + emit normalColorChanged(); + } + +-const DTColor &UKUILabel::linkColor() const ++const QBrush &UKUILabel::linkColor() const + { + return m_linkColor; + } + +-void UKUILabel::setLinkColor(const DTColor &newLinkColor) ++void UKUILabel::setLinkColor(const QBrush &newLinkColor) + { + if (m_linkColor == newLinkColor) + return; +@@ -59,12 +62,12 @@ void UKUILabel::setLinkColor(const DTColor &newLinkColor) + } + + +-const DTColor &UKUILabel::disableColor() const ++const QBrush &UKUILabel::disableColor() const + { + return m_disableColor; + } + +-void UKUILabel::setDisableColor(const DTColor &newDisableColor) ++void UKUILabel::setDisableColor(const QBrush &newDisableColor) + { + if (m_disableColor == newDisableColor) + return; +diff --git a/ukui-qml-style-helper/styleparameter/ukuilabel.h b/ukui-qml-style-helper/styleparameter/ukuilabel.h +index b292072..09c68f6 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuilabel.h ++++ b/ukui-qml-style-helper/styleparameter/ukuilabel.h +@@ -38,9 +38,9 @@ class UKUILabel : public QQuickItem + { + Q_OBJECT + +- Q_PROPERTY(DTColor normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) +- Q_PROPERTY(DTColor disableColor READ disableColor WRITE setDisableColor NOTIFY disableColorChanged) +- Q_PROPERTY(DTColor linkColor READ linkColor WRITE setLinkColor NOTIFY linkColorChanged) ++ Q_PROPERTY(QBrush normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) ++ Q_PROPERTY(QBrush disableColor READ disableColor WRITE setDisableColor NOTIFY disableColorChanged) ++ Q_PROPERTY(QBrush linkColor READ linkColor WRITE setLinkColor NOTIFY linkColorChanged) + + public: + explicit UKUILabel(QQuickItem *parent = nullptr); +@@ -50,14 +50,14 @@ public: + + static UKUILabel* qmlAttachedProperties(QObject* parent); + +- const DTColor &normalColor() const; +- void setNormalColor(const DTColor &newNormalColor); +- const DTColor &linkColor() const; +- void setLinkColor(const DTColor &newLinkColor); ++ const QBrush &normalColor() const; ++ void setNormalColor(const QBrush &newNormalColor); ++ const QBrush &linkColor() const; ++ void setLinkColor(const QBrush &newLinkColor); + + +- const DTColor &disableColor() const; +- void setDisableColor(const DTColor &newDisableColor); ++ const QBrush &disableColor() const; ++ void setDisableColor(const QBrush &newDisableColor); + + signals: + void normalColorChanged(); +@@ -66,11 +66,13 @@ signals: + + void disableColorChanged(); + ++ void parametryChanged(); ++ + private: +- Q_INVOKABLE DTColor m_normalColor = DTColor(QColor ::fromRgbF(0, 0, 0, 0.85)); ++ Q_INVOKABLE QBrush m_normalColor = QBrush(QColor ::fromRgbF(0, 0, 0, 0.85)); + +- Q_INVOKABLE DTColor m_linkColor = DTColor(Qt::blue); +- Q_INVOKABLE DTColor m_disableColor; ++ Q_INVOKABLE QBrush m_linkColor = QBrush(Qt::blue); ++ Q_INVOKABLE QBrush m_disableColor; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +diff --git a/ukui-qml-style-helper/styleparameter/ukuimenu.cpp b/ukui-qml-style-helper/styleparameter/ukuimenu.cpp +index 9abd42f..ad7e4fe 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuimenu.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuimenu.cpp +@@ -1,11 +1,11 @@ + #include "ukuimenu.h" + #include "qdebug.h" ++#include "settings/ukui-style-settings.h" + + using namespace UKUIQQC2Style; + + UKUIMenu::UKUIMenu(QQuickItem *parent) : QQuickItem(parent) + { +- qDebug() << "UKUIMenu.............."; + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); +@@ -14,6 +14,13 @@ UKUIMenu::UKUIMenu(QQuickItem *parent) : QQuickItem(parent) + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); ++ if (QGSettings::isSchemaInstalled("org.ukui.style")) { ++ auto settings = UKUIStyleSettings::globalInstance(); ++ connect(settings, &QGSettings::changed, this, [&](const QString& key){ ++ if(key == "menuTransparency" || key == "menu-transparency") ++ initParam(m_instance); ++ }); ++ } + } + + UKUIMenu::~UKUIMenu() +@@ -25,9 +32,19 @@ void UKUIMenu::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + { + setshadowNormalColor(instance->shadowActive()); + setshadowDisableColor(instance->shadowDisable()); +- setNormalBC(instance->baseActive()); +- setNormalBorderColor(instance->kLineWindowAcitive()); +- setBorder(1); ++ setNormalBorderColor(instance->kLineWindowActive()); ++ setBorder(instance->normalline()); ++ setRadius(instance->kradiusMenu()); ++ QColor c = instance->baseActive().color(); ++ if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { ++ auto opacity = UKUIStyleSettings::globalInstance()->get("menuTransparency").toInt()/100.0; ++ c.setAlphaF(opacity); ++ setBcColorAlpha(opacity); ++ } ++ setNormalBC(c); ++ ++ emit parametryChanged(); ++ + } + + UKUIMenu* UKUIMenu::qmlAttachedProperties(QObject* parent) +@@ -77,12 +94,12 @@ void UKUIMenu::setRadius(int newRadius) + } + + +-const DTColor &UKUIMenu::shadowNormalColor() const ++const QBrush &UKUIMenu::shadowNormalColor() const + { + return m_shadowNormalColor; + } + +-void UKUIMenu::setshadowNormalColor(const DTColor &newshadowNormalColor) ++void UKUIMenu::setshadowNormalColor(const QBrush &newshadowNormalColor) + { + if (m_shadowNormalColor == newshadowNormalColor) + return; +@@ -90,12 +107,12 @@ void UKUIMenu::setshadowNormalColor(const DTColor &newshadowNormalColor) + emit shadowNormalColorChanged(); + } + +-const DTColor &UKUIMenu::shadowDisableColor() const ++const QBrush &UKUIMenu::shadowDisableColor() const + { + return m_shadowDisableColor; + } + +-void UKUIMenu::setshadowDisableColor(const DTColor &newShadowDisableColor) ++void UKUIMenu::setshadowDisableColor(const QBrush &newShadowDisableColor) + { + if (m_shadowDisableColor == newShadowDisableColor) + return; +@@ -103,12 +120,12 @@ void UKUIMenu::setshadowDisableColor(const DTColor &newShadowDisableColor) + emit shadowDisableColorChanged(); + } + +-const DTColor &UKUIMenu::normalBC() const ++const QBrush &UKUIMenu::normalBC() const + { + return m_normalBC; + } + +-void UKUIMenu::setNormalBC(const DTColor &newNormalBC) ++void UKUIMenu::setNormalBC(const QBrush &newNormalBC) + { + if (m_normalBC == newNormalBC) + return; +@@ -116,12 +133,12 @@ void UKUIMenu::setNormalBC(const DTColor &newNormalBC) + emit normalBCChanged(); + } + +-const DTColor &UKUIMenu::normalBorderColor() const ++const QBrush &UKUIMenu::normalBorderColor() const + { + return m_normalBorderColor; + } + +-void UKUIMenu::setNormalBorderColor(const DTColor &newNormalBorderColor) ++void UKUIMenu::setNormalBorderColor(const QBrush &newNormalBorderColor) + { + if (m_normalBorderColor == newNormalBorderColor) + return; +@@ -141,3 +158,16 @@ void UKUIMenu::setBorder(int newBorder) + m_border = newBorder; + emit borderChanged(); + } ++ ++double UKUIMenu::bcColorAlpha() const ++{ ++ return m_bcColorAlpha; ++} ++ ++void UKUIMenu::setBcColorAlpha(double newBcColorAlpha) ++{ ++ if (qFuzzyCompare(m_bcColorAlpha, newBcColorAlpha)) ++ return; ++ m_bcColorAlpha = newBcColorAlpha; ++ emit bcColorAlphaChanged(); ++} +diff --git a/ukui-qml-style-helper/styleparameter/ukuimenu.h b/ukui-qml-style-helper/styleparameter/ukuimenu.h +index c04b183..b91c749 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuimenu.h ++++ b/ukui-qml-style-helper/styleparameter/ukuimenu.h +@@ -41,10 +41,11 @@ class UKUIMenu : public QQuickItem + Q_PROPERTY(int topBottomPadding READ topBottomPadding WRITE setTopBottomPadding NOTIFY topBottomPaddingChanged) + Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY radiusChanged) + Q_PROPERTY(int border READ border WRITE setBorder NOTIFY borderChanged) +- Q_PROPERTY(DTColor shadowNormalColor READ shadowNormalColor WRITE setshadowNormalColor NOTIFY shadowNormalColorChanged) +- Q_PROPERTY(DTColor shadowDisableColor READ shadowDisableColor WRITE setshadowDisableColor NOTIFY shadowDisableColorChanged) +- Q_PROPERTY(DTColor normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) +- Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) ++ Q_PROPERTY(QBrush shadowNormalColor READ shadowNormalColor WRITE setshadowNormalColor NOTIFY shadowNormalColorChanged) ++ Q_PROPERTY(QBrush shadowDisableColor READ shadowDisableColor WRITE setshadowDisableColor NOTIFY shadowDisableColorChanged) ++ Q_PROPERTY(QBrush normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) ++ Q_PROPERTY(QBrush normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) ++ Q_PROPERTY(double bcColorAlpha READ bcColorAlpha WRITE setBcColorAlpha NOTIFY bcColorAlphaChanged) + + public: + explicit UKUIMenu(QQuickItem *parent = nullptr); +@@ -62,21 +63,24 @@ public: + int radius() const; + void setRadius(int newRadius); + +- const DTColor &shadowNormalColor() const; +- void setshadowNormalColor(const DTColor &newshadowNormalColor); ++ const QBrush &shadowNormalColor() const; ++ void setshadowNormalColor(const QBrush &newshadowNormalColor); + +- const DTColor &shadowDisableColor() const; +- void setshadowDisableColor(const DTColor &newShadowDisableColor); ++ const QBrush &shadowDisableColor() const; ++ void setshadowDisableColor(const QBrush &newShadowDisableColor); + +- const DTColor &normalBC() const; +- void setNormalBC(const DTColor &newNormalBC); ++ const QBrush &normalBC() const; ++ void setNormalBC(const QBrush &newNormalBC); + +- const DTColor &normalBorderColor() const; +- void setNormalBorderColor(const DTColor &newNormalBorderColor); ++ const QBrush &normalBorderColor() const; ++ void setNormalBorderColor(const QBrush &newNormalBorderColor); + + int border() const; + void setBorder(int newBorder); + ++ double bcColorAlpha() const; ++ void setBcColorAlpha(double newBcColorAlpha); ++ + signals: + void leftRightPaddingChanged(); + +@@ -94,18 +98,23 @@ signals: + + void borderChanged(); + ++ void parametryChanged(); ++ ++ void bcColorAlphaChanged(); ++ + private: + int m_leftRightPadding = 8; + int m_topBottomPadding = 6; + int m_radius = 8; +- Q_INVOKABLE DTColor m_shadowNormalColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.3)); +- Q_INVOKABLE DTColor m_shadowDisableColor; +- Q_INVOKABLE DTColor m_normalBC; +- Q_INVOKABLE DTColor m_normalBorderColor; ++ Q_INVOKABLE QBrush m_shadowNormalColor = QBrush(QColor::fromRgbF(0, 0, 0, 0.3)); ++ Q_INVOKABLE QBrush m_shadowDisableColor; ++ Q_INVOKABLE QBrush m_normalBC; ++ Q_INVOKABLE QBrush m_normalBorderColor; + int m_border; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + ++ double m_bcColorAlpha; + }; + } + QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUIMenu, QML_HAS_ATTACHED_PROPERTIES) +diff --git a/ukui-qml-style-helper/styleparameter/ukuimenuitem.cpp b/ukui-qml-style-helper/styleparameter/ukuimenuitem.cpp +index 905514c..9497e54 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuimenuitem.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuimenuitem.cpp +@@ -23,16 +23,19 @@ UKUIMenuItem::~UKUIMenuItem() + void UKUIMenuItem::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + { + setBorderWidth(1); +- setNormalBC(DTColor(QColor(0,0,0,0))); ++ setNormalBC(QBrush(QColor(0,0,0,0))); + setHoveredBC(instance->kComponentHover()); + setClickedBC(instance->kComponentClick()); +- setDisableBC(DTColor(QColor(0,0,0,0))); +- setNormalBorderColor(DTColor(QColor(0,0,0,0))); ++ setDisableBC(QBrush(QColor(0,0,0,0))); ++ setNormalBorderColor(QBrush(QColor(0,0,0,0))); + setHoverBorderColor(instance->kLineComponentHover()); + setClickBorderColor(instance->kLineComponentClick()); +- setDisableBorderColor(DTColor(QColor(0,0,0,0))); ++ setDisableBorderColor(QBrush(QColor(0,0,0,0))); + setNormalTextColor(instance->kFontPrimary()); + setDisableTextColor(instance->kFontPrimaryDisable()); ++ ++ emit parametryChanged(); ++ + } + + UKUIMenuItem* UKUIMenuItem::qmlAttachedProperties(QObject* parent) +@@ -120,12 +123,12 @@ void UKUIMenuItem::setRadius(int newRadius) + } + + +-const DTColor &UKUIMenuItem::normalBC() const ++const QBrush &UKUIMenuItem::normalBC() const + { + return m_normalBC; + } + +-void UKUIMenuItem::setNormalBC(const DTColor &newNormalBC) ++void UKUIMenuItem::setNormalBC(const QBrush &newNormalBC) + { + if (m_normalBC == newNormalBC) + return; +@@ -133,12 +136,12 @@ void UKUIMenuItem::setNormalBC(const DTColor &newNormalBC) + emit normalBCChanged(); + } + +-const DTColor &UKUIMenuItem::clickedBC() const ++const QBrush &UKUIMenuItem::clickedBC() const + { + return m_clickedBC; + } + +-void UKUIMenuItem::setClickedBC(const DTColor &newClickedBC) ++void UKUIMenuItem::setClickedBC(const QBrush &newClickedBC) + { + if (m_clickedBC == newClickedBC) + return; +@@ -146,12 +149,12 @@ void UKUIMenuItem::setClickedBC(const DTColor &newClickedBC) + emit clickedBCChanged(); + } + +-const DTColor &UKUIMenuItem::hoveredBC() const ++const QBrush &UKUIMenuItem::hoveredBC() const + { + return m_hoveredBC; + } + +-void UKUIMenuItem::setHoveredBC(const DTColor &newHoveredBC) ++void UKUIMenuItem::setHoveredBC(const QBrush &newHoveredBC) + { + if (m_hoveredBC == newHoveredBC) + return; +@@ -159,12 +162,12 @@ void UKUIMenuItem::setHoveredBC(const DTColor &newHoveredBC) + emit hoveredBCChanged(); + } + +-const DTColor &UKUIMenuItem::disableBC() const ++const QBrush &UKUIMenuItem::disableBC() const + { + return m_disableBC; + } + +-void UKUIMenuItem::setDisableBC(const DTColor &newDisableBC) ++void UKUIMenuItem::setDisableBC(const QBrush &newDisableBC) + { + if (m_disableBC == newDisableBC) + return; +@@ -172,12 +175,12 @@ void UKUIMenuItem::setDisableBC(const DTColor &newDisableBC) + emit disableBCChanged(); + } + +-const DTColor &UKUIMenuItem::disableTextColor() const ++const QBrush &UKUIMenuItem::disableTextColor() const + { + return m_disableTextColor; + } + +-void UKUIMenuItem::setDisableTextColor(const DTColor &newDisableTextColor) ++void UKUIMenuItem::setDisableTextColor(const QBrush &newDisableTextColor) + { + if (m_disableTextColor == newDisableTextColor) + return; +@@ -185,12 +188,12 @@ void UKUIMenuItem::setDisableTextColor(const DTColor &newDisableTextColor) + emit disableTextColorChanged(); + } + +-const DTColor &UKUIMenuItem::normalTextColor() const ++const QBrush &UKUIMenuItem::normalTextColor() const + { + return m_normalTextColor; + } + +-void UKUIMenuItem::setNormalTextColor(const DTColor &newNormalTextColor) ++void UKUIMenuItem::setNormalTextColor(const QBrush &newNormalTextColor) + { + if (m_normalTextColor == newNormalTextColor) + return; +@@ -211,12 +214,12 @@ void UKUIMenuItem::setBorderWidth(int newBorderWidth) + emit borderWidthChanged(); + } + +-const DTColor &UKUIMenuItem::normalBorderColor() const ++const QBrush &UKUIMenuItem::normalBorderColor() const + { + return m_normalBorderColor; + } + +-void UKUIMenuItem::setNormalBorderColor(const DTColor &newNormalBorderColor) ++void UKUIMenuItem::setNormalBorderColor(const QBrush &newNormalBorderColor) + { + if (m_normalBorderColor == newNormalBorderColor) + return; +@@ -224,12 +227,12 @@ void UKUIMenuItem::setNormalBorderColor(const DTColor &newNormalBorderColor) + emit normalBorderColorChanged(); + } + +-const DTColor &UKUIMenuItem::hoverBorderColor() const ++const QBrush &UKUIMenuItem::hoverBorderColor() const + { + return m_hoverBorderColor; + } + +-void UKUIMenuItem::setHoverBorderColor(const DTColor &newHoverBorderColor) ++void UKUIMenuItem::setHoverBorderColor(const QBrush &newHoverBorderColor) + { + if (m_hoverBorderColor == newHoverBorderColor) + return; +@@ -237,12 +240,12 @@ void UKUIMenuItem::setHoverBorderColor(const DTColor &newHoverBorderColor) + emit hoverBorderColorChanged(); + } + +-const DTColor &UKUIMenuItem::clickBorderColor() const ++const QBrush &UKUIMenuItem::clickBorderColor() const + { + return m_clickBorderColor; + } + +-void UKUIMenuItem::setClickBorderColor(const DTColor &newClickBorderColor) ++void UKUIMenuItem::setClickBorderColor(const QBrush &newClickBorderColor) + { + if (m_clickBorderColor == newClickBorderColor) + return; +@@ -250,12 +253,12 @@ void UKUIMenuItem::setClickBorderColor(const DTColor &newClickBorderColor) + emit clickBorderColorChanged(); + } + +-const DTColor &UKUIMenuItem::disableBorderColor() const ++const QBrush &UKUIMenuItem::disableBorderColor() const + { + return m_disableBorderColor; + } + +-void UKUIMenuItem::setDisableBorderColor(const DTColor &newDisableBorderColor) ++void UKUIMenuItem::setDisableBorderColor(const QBrush &newDisableBorderColor) + { + if (m_disableBorderColor == newDisableBorderColor) + return; +diff --git a/ukui-qml-style-helper/styleparameter/ukuimenuitem.h b/ukui-qml-style-helper/styleparameter/ukuimenuitem.h +index b1d5a30..0e4035e 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuimenuitem.h ++++ b/ukui-qml-style-helper/styleparameter/ukuimenuitem.h +@@ -44,18 +44,18 @@ class UKUIMenuItem : public QQuickItem + Q_PROPERTY(int normalHeight READ normalHeight WRITE setNormalHeight NOTIFY normalHeightChanged) + Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY RadiusChanged) + +- Q_PROPERTY(DTColor normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) +- Q_PROPERTY(DTColor clickedBC READ clickedBC WRITE setClickedBC NOTIFY clickedBCChanged) +- Q_PROPERTY(DTColor hoveredBC READ hoveredBC WRITE setHoveredBC NOTIFY hoveredBCChanged) +- Q_PROPERTY(DTColor disableBC READ disableBC WRITE setDisableBC NOTIFY disableBCChanged) +- Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) +- Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY disableTextColorChanged) ++ Q_PROPERTY(QBrush normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) ++ Q_PROPERTY(QBrush clickedBC READ clickedBC WRITE setClickedBC NOTIFY clickedBCChanged) ++ Q_PROPERTY(QBrush hoveredBC READ hoveredBC WRITE setHoveredBC NOTIFY hoveredBCChanged) ++ Q_PROPERTY(QBrush disableBC READ disableBC WRITE setDisableBC NOTIFY disableBCChanged) ++ Q_PROPERTY(QBrush disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) ++ Q_PROPERTY(QBrush normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY disableTextColorChanged) + + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) +- Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) +- Q_PROPERTY(DTColor hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) +- Q_PROPERTY(DTColor clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) +- Q_PROPERTY(DTColor disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) ++ Q_PROPERTY(QBrush normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) ++ Q_PROPERTY(QBrush hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) ++ Q_PROPERTY(QBrush clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) ++ Q_PROPERTY(QBrush disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) + + public: + explicit UKUIMenuItem(QQuickItem *parent = nullptr); +@@ -83,38 +83,38 @@ public: + int radius() const; + void setRadius(int newRadius); + +- const DTColor &normalBC() const; +- void setNormalBC(const DTColor &newNormalBC); ++ const QBrush &normalBC() const; ++ void setNormalBC(const QBrush &newNormalBC); + +- const DTColor &clickedBC() const; +- void setClickedBC(const DTColor &newClickedBC); ++ const QBrush &clickedBC() const; ++ void setClickedBC(const QBrush &newClickedBC); + +- const DTColor &hoveredBC() const; +- void setHoveredBC(const DTColor &newHoveredBC); ++ const QBrush &hoveredBC() const; ++ void setHoveredBC(const QBrush &newHoveredBC); + +- const DTColor &disableBC() const; +- void setDisableBC(const DTColor &newDisableBC); ++ const QBrush &disableBC() const; ++ void setDisableBC(const QBrush &newDisableBC); + +- const DTColor &disableTextColor() const; +- void setDisableTextColor(const DTColor &newDisableTextColor); ++ const QBrush &disableTextColor() const; ++ void setDisableTextColor(const QBrush &newDisableTextColor); + +- const DTColor &normalTextColor() const; +- void setNormalTextColor(const DTColor &newNormalTextColor); ++ const QBrush &normalTextColor() const; ++ void setNormalTextColor(const QBrush &newNormalTextColor); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); + +- const DTColor &normalBorderColor() const; +- void setNormalBorderColor(const DTColor &newNormalBorderColor); ++ const QBrush &normalBorderColor() const; ++ void setNormalBorderColor(const QBrush &newNormalBorderColor); + +- const DTColor &hoverBorderColor() const; +- void setHoverBorderColor(const DTColor &newHoverBorderColor); ++ const QBrush &hoverBorderColor() const; ++ void setHoverBorderColor(const QBrush &newHoverBorderColor); + +- const DTColor &clickBorderColor() const; +- void setClickBorderColor(const DTColor &newClickBorderColor); ++ const QBrush &clickBorderColor() const; ++ void setClickBorderColor(const QBrush &newClickBorderColor); + +- const DTColor &disableBorderColor() const; +- void setDisableBorderColor(const DTColor &newDisableBorderColor); ++ const QBrush &disableBorderColor() const; ++ void setDisableBorderColor(const QBrush &newDisableBorderColor); + + signals: + void leftRightPaddingChanged(); +@@ -149,6 +149,8 @@ signals: + + void disableBorderColorChanged(); + ++ void parametryChanged(); ++ + private: + int m_leftRightPadding = 8; + int m_topBottomPadding = 6; +@@ -156,17 +158,17 @@ private: + int m_imageSpace = 4; + int m_normalHeight = 36; + int m_radius = 8; +- Q_INVOKABLE DTColor m_normalBC; +- Q_INVOKABLE DTColor m_clickedBC; +- Q_INVOKABLE DTColor m_hoveredBC; +- Q_INVOKABLE DTColor m_disableBC; +- Q_INVOKABLE DTColor m_disableTextColor; +- Q_INVOKABLE DTColor m_normalTextColor; ++ Q_INVOKABLE QBrush m_normalBC; ++ Q_INVOKABLE QBrush m_clickedBC; ++ Q_INVOKABLE QBrush m_hoveredBC; ++ Q_INVOKABLE QBrush m_disableBC; ++ Q_INVOKABLE QBrush m_disableTextColor; ++ Q_INVOKABLE QBrush m_normalTextColor; + int m_borderWidth; +- Q_INVOKABLE DTColor m_normalBorderColor; +- Q_INVOKABLE DTColor m_hoverBorderColor; +- Q_INVOKABLE DTColor m_clickBorderColor; +- Q_INVOKABLE DTColor m_disableBorderColor; ++ Q_INVOKABLE QBrush m_normalBorderColor; ++ Q_INVOKABLE QBrush m_hoverBorderColor; ++ Q_INVOKABLE QBrush m_clickBorderColor; ++ Q_INVOKABLE QBrush m_disableBorderColor; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +diff --git a/ukui-qml-style-helper/styleparameter/ukuipopup.cpp b/ukui-qml-style-helper/styleparameter/ukuipopup.cpp +index d03383f..3cee3df 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuipopup.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuipopup.cpp +@@ -1,5 +1,6 @@ + #include "ukuipopup.h" + #include "qdebug.h" ++#include "settings/ukui-style-settings.h" + + using namespace UKUIQQC2Style; + +@@ -23,9 +24,11 @@ UKUIPopup::~UKUIPopup() + void UKUIPopup::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + { + setBackColor(instance->baseActive()); +- setBackBorderColor(instance->kLineWindowAcitive()); ++ setBackBorderColor(instance->kLineWindowActive()); + setRadius(instance->kradiusMenu()); +- //setShadowColor(instance->kShadowMenu()); ++ setShadowColor(instance->shadowActive()); ++ emit parametryChanged(); ++ + } + + UKUIPopup* UKUIPopup::qmlAttachedProperties(QObject* parent) +@@ -34,12 +37,12 @@ UKUIPopup* UKUIPopup::qmlAttachedProperties(QObject* parent) + return new UKUIPopup(p); + } + +-const DTColor &UKUIPopup::normalColor() const ++const QBrush &UKUIPopup::normalColor() const + { + return m_normalColor; + } + +-void UKUIPopup::setNormalColor(const DTColor &newNormalColor) ++void UKUIPopup::setNormalColor(const QBrush &newNormalColor) + { + if (m_normalColor == newNormalColor) + return; +@@ -61,12 +64,12 @@ void UKUIPopup::setPadding(int newPadding) + emit paddingChanged(); + } + +-const DTColor &UKUIPopup::backColor() const ++const QBrush &UKUIPopup::backColor() const + { + return m_backColor; + } + +-void UKUIPopup::setBackColor(const DTColor &newBackColor) ++void UKUIPopup::setBackColor(const QBrush &newBackColor) + { + if (m_backColor == newBackColor) + return; +@@ -74,12 +77,12 @@ void UKUIPopup::setBackColor(const DTColor &newBackColor) + emit backColorChanged(); + } + +-const DTColor &UKUIPopup::backBorderColor() const ++const QBrush &UKUIPopup::backBorderColor() const + { + return m_backBorderColor; + } + +-void UKUIPopup::setBackBorderColor(const DTColor &newBackBorderColor) ++void UKUIPopup::setBackBorderColor(const QBrush &newBackBorderColor) + { + if (m_backBorderColor == newBackBorderColor) + return; +@@ -87,12 +90,12 @@ void UKUIPopup::setBackBorderColor(const DTColor &newBackBorderColor) + emit backBorderColorChanged(); + } + +-const DTColor &UKUIPopup::shadowColor() const ++const QBrush &UKUIPopup::shadowColor() const + { + return m_shadowColor; + } + +-void UKUIPopup::setShadowColor(const DTColor &newShadowColor) ++void UKUIPopup::setShadowColor(const QBrush &newShadowColor) + { + if (m_shadowColor == newShadowColor) + return; +diff --git a/ukui-qml-style-helper/styleparameter/ukuipopup.h b/ukui-qml-style-helper/styleparameter/ukuipopup.h +index 3d9d8f1..3ef12e0 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuipopup.h ++++ b/ukui-qml-style-helper/styleparameter/ukuipopup.h +@@ -40,11 +40,11 @@ class UKUIPopup : public QQuickItem + + Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY radiusChanged) + +- Q_PROPERTY(DTColor normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) ++ Q_PROPERTY(QBrush normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) + Q_PROPERTY(int padding READ padding WRITE setPadding NOTIFY paddingChanged) +- Q_PROPERTY(DTColor backColor READ backColor WRITE setBackColor NOTIFY backColorChanged) +- Q_PROPERTY(DTColor backBorderColor READ backBorderColor WRITE setBackBorderColor NOTIFY backBorderColorChanged) +- Q_PROPERTY(DTColor shadowColor READ shadowColor WRITE setShadowColor NOTIFY shadowColorChanged) ++ Q_PROPERTY(QBrush backColor READ backColor WRITE setBackColor NOTIFY backColorChanged) ++ Q_PROPERTY(QBrush backBorderColor READ backBorderColor WRITE setBackBorderColor NOTIFY backBorderColorChanged) ++ Q_PROPERTY(QBrush shadowColor READ shadowColor WRITE setShadowColor NOTIFY shadowColorChanged) + + public: + explicit UKUIPopup(QQuickItem *parent = nullptr); +@@ -54,20 +54,20 @@ public: + + static UKUIPopup* qmlAttachedProperties(QObject* parent); + +- const DTColor &normalColor() const; +- void setNormalColor(const DTColor &newNormalColor); ++ const QBrush &normalColor() const; ++ void setNormalColor(const QBrush &newNormalColor); + + int padding() const; + void setPadding(int newPadding); + +- const DTColor &backColor() const; +- void setBackColor(const DTColor &newBackColor); ++ const QBrush &backColor() const; ++ void setBackColor(const QBrush &newBackColor); + +- const DTColor &backBorderColor() const; +- void setBackBorderColor(const DTColor &newBackBorderColor); ++ const QBrush &backBorderColor() const; ++ void setBackBorderColor(const QBrush &newBackBorderColor); + +- const DTColor &shadowColor() const; +- void setShadowColor(const DTColor &newShadowColor); ++ const QBrush &shadowColor() const; ++ void setShadowColor(const QBrush &newShadowColor); + + int radius() const; + void setRadius(int newRadius); +@@ -85,13 +85,15 @@ signals: + + void radiusChanged(); + ++ void parametryChanged(); ++ + private: +- Q_INVOKABLE DTColor m_normalColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.85)); ++ Q_INVOKABLE QBrush m_normalColor = QBrush(QColor::fromRgbF(0, 0, 0, 0.85)); + +- int m_padding = 12; +- Q_INVOKABLE DTColor m_backColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.85)); +- Q_INVOKABLE DTColor m_backBorderColor = DTColor(QColor::fromRgbF(1, 1, 1)); +- Q_INVOKABLE DTColor m_shadowColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.3)); ++ int m_padding = 8; ++ Q_INVOKABLE QBrush m_backColor = QBrush(QColor::fromRgbF(0, 0, 0, 0.85)); ++ Q_INVOKABLE QBrush m_backBorderColor = QBrush(QColor::fromRgbF(1, 1, 1)); ++ Q_INVOKABLE QBrush m_shadowColor = QBrush(QColor::fromRgbF(0, 0, 0, 0.3)); + int m_radius; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; +diff --git a/ukui-qml-style-helper/styleparameter/ukuipopupwindowhandle.cpp b/ukui-qml-style-helper/styleparameter/ukuipopupwindowhandle.cpp +new file mode 100644 +index 0000000..e5a4313 +--- /dev/null ++++ b/ukui-qml-style-helper/styleparameter/ukuipopupwindowhandle.cpp +@@ -0,0 +1,613 @@ ++// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. ++// ++// SPDX-License-Identifier: LGPL-3.0-or-later ++ ++#define protected public ++#include "ukuipopupwindowhandle.h" ++ ++#include <QQuickItem> ++#include <QQuickWindow> ++#include <QDebug> ++#include <KWindowSystem> ++#include <KWindowEffects> ++#include <QCursor> ++#include <QApplication> ++#include <QScreen> ++#include <QPainter> ++#include <qpa/qplatformscreen.h> ++#include <qpa/qplatformcursor.h> ++#include <private/qhighdpiscaling_p.h> ++#include "../../qt5-ukui-platformtheme/xatom-helper.h" ++#include "../../libqt5-ukui-style/settings/ukui-style-settings.h" ++ ++#define INNERRECT_WIDTH 1 ++extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); ++ ++//// className prepend string of QT_NAMESPACE if existed. ++//bool inheritsTheClassType(QObject *object, QString className) { ++//#if defined(QT_NAMESPACE) ++//#define D_GET_NAMESPACE_STR_IMPL(M) #M "::" ++//#define D_GET_NAMESPACE_STR(M) D_GET_NAMESPACE_STR_IMPL(M) ++// className.prepend(D_GET_NAMESPACE_STR(QT_NAMESPACE)); ++//#undef D_GET_NAMESPACE_STR ++//#undef D_GET_NAMESPACE_STR_IMPL ++//#endif ++// return object && object->inherits(qPrintable(className)); ++//} ++ ++using namespace UKUIQQC2Style; ++UKUIPopupWindowHandle::UKUIPopupWindowHandle(QObject *parent) ++ : QObject (parent) ++{ ++} ++ ++UKUIPopupWindowHandle::~UKUIPopupWindowHandle() ++{ ++ if(m_windowShadow){ ++ m_windowShadow->deleteLater(); ++ m_windowShadow = nullptr; ++ } ++} ++ ++UKUIPopupWindowHandle *UKUIPopupWindowHandle::qmlAttachedProperties(QObject *object) ++{ ++ ++ if (!object || !object->inherits("QQuickPopup")) ++ return nullptr; ++ ++ return new UKUIPopupWindowHandle(object); ++} ++ ++QQmlComponent *UKUIPopupWindowHandle::delegate() const ++{ ++ return m_delegate; ++} ++ ++void UKUIPopupWindowHandle::setDelegate(QQmlComponent *delegate) ++{ ++ m_delegate = delegate; ++} ++ ++void UKUIPopupWindowHandle::open() ++{ ++ if(!m_window) ++ createHandle(); ++ ++// qDebug() << "open show 000...." << m_window << m_window->isVisible(); ++ if(m_window && !m_window->isVisible()){ ++ updateWindow(); ++// qDebug() << "open show 1111...." << m_window << m_window->isVisible(); ++ ++ m_window->show(); ++ } ++// qDebug() << "open show 2222...." << m_window << m_window->isVisible(); ++} ++ ++void UKUIPopupWindowHandle::close() ++{ ++ if(m_window && m_window->isVisible()){ ++// qDebug() << "close hide 000...." << m_window << m_window->isVisible(); ++ ++ m_window->hide(); ++// qDebug() << "close hide 111...." << m_window << m_window->isVisible(); ++ } ++} ++ ++void UKUIPopupWindowHandle::updateWindow() ++{ ++ // 获取鼠标所在屏幕,如果没有特别指定,这里通常会是主屏幕 ++ const QScreen *screen =QGuiApplication::screenAt(QCursor::pos()); ++ Q_ASSERT(screen); ++ if(!screen) ++ return; ++ ++ // 获取屏幕尺寸 ++ QRect screenGeometry = screen->geometry(); ++ int screenWidth = screenGeometry.width(); ++ int screenHeight = screenGeometry.height(); ++ ++// qDebug() << "updateWindow..." << m_y << m_height << screenGeometry.y() << screenHeight; ++ if(m_y + m_height > screenGeometry.y() + screenHeight) ++ { ++ m_height = screenGeometry.y() + screenHeight - m_y; ++ emit sizeChanged(m_width, m_height); ++ setOutScreen(true); ++ } ++ else ++ setOutScreen(false); ++// qDebug() << "updateWindow 00000" << m_y << m_height << screenGeometry.y() << screenHeight << m_outScreen; ++ if(m_x + m_width > screenGeometry.x() + screenWidth)//超出屏幕 ++ { ++ //todo 调整位置 ++ } ++ ++ if(m_window){ ++ if(m_width <= 0) ++ m_width = 1; ++ if(m_height <= 0) ++ m_height = 1; ++ m_window->setX(m_x); ++ m_window->setY(m_y); ++// qDebug() << "UKUIPopupWindowHandle..." << m_width; ++ m_window->setWidth(m_width); ++ m_window->setHeight(m_height); ++ ++ m_window->update(); ++ } ++} ++ ++void UKUIPopupWindowHandle::setSize(int width, int height) ++{ ++// qDebug() << "setsize..." << width << height; ++ m_width = width; ++ m_height = height; ++ if(m_window){ ++ updateWindow(); ++ } ++} ++ ++void UKUIPopupWindowHandle::setPosion(int x, int y) ++{ ++// qDebug() << "setPosion..." << x << y; ++ if(!posFollwMouse()){ ++ m_x = x; ++ m_y = y; ++ } ++ else{ ++ QPoint p = posByCursor(); ++ m_x = p.x(); ++ m_y = p.y(); ++ } ++// qDebug() << "posFollwMouse..." << posFollwMouse() << m_x << m_y; ++ if(m_window){ ++ updateWindow(); ++ } ++} ++ ++void UKUIPopupWindowHandle::createHandle() ++{ ++// qDebug() << "createHandle m_delegate...." << m_delegate; ++ ++ if(m_delegate){ ++ ++// qDebug() << "createHandle...." << m_delegate << m_delegate->creationContext() << m_delegate->creationContext()->children(); ++ auto window = qobject_cast<QQuickWindow *>(m_delegate->create(m_delegate->creationContext())); ++ Q_ASSERT(window); ++ QColor c = Qt::transparent; ++// if(m_backColor.canConvert<QBrush>()){ ++// QBrush b = m_backColor.value<QBrush>(); ++// c = b.color(); ++// c.setAlphaF(0.65); ++// } ++// qDebug() << "create window...." << window << c << c.red() << c.green() << c.blue() << c.alphaF(); ++ window->setColor(c); ++ window->setFlags(Qt::Popup | Qt::FramelessWindowHint); ++ ++ ++ MotifWmHints hints; ++ hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; ++ hints.functions = MWM_FUNC_ALL; ++ hints.decorations = MWM_DECOR_BORDER; ++ // XAtomHelper::getInstance()->setWindowMotifHint(this->winId(), hints); ++ KWindowSystem::setState(window->winId(), NET::KeepBelow); ++// KWindowEffects::enableBlurBehind(window->winId(), true); ++ m_window = window; ++ ++ ++ QPainterPath path; ++ int radius = 8; ++ if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { ++ auto settings = UKUIStyleSettings::globalInstance(); ++ if(settings->keys().contains("windowRadius")) ++ radius = settings->get("windowRadius").toInt(); ++ } ++ path.addRoundedRect(m_x, m_y, m_width, m_height, radius, radius);//设置这个path 没有毛玻璃效果 ++ KWindowEffects::enableBlurBehind(m_window->winId(), true/*, path.toFillPolygon().toPolygon()*/); ++ ++ ++ ++ connect(m_window, &QQuickWindow::visibleChanged, [=](bool arg){ ++// qDebug() << "m_window visible changed..." << arg << m_window->isVisible(); ++ emit visibleChanged(arg); ++ }); ++ } ++} ++ ++void UKUIPopupWindowHandle::createWindow(QObject *obj) ++{ ++// qDebug() << "createWindow...." << obj << qobject_cast<QQuickWindow *>(obj); ++ auto window = qobject_cast<QQuickWindow *>(obj); ++ Q_ASSERT(window); ++ QColor c = Qt::transparent; ++// if(m_backColor.canConvert<QBrush>()){ ++// QBrush b = m_backColor.value<QBrush>(); ++// c = b.color(); ++// c.setAlphaF(0.65); ++// } ++// qDebug() << "create window...." << window << c << c.red() << c.green() << c.blue() << c.alphaF(); ++ window->setColor(c); ++ window->setFlags(Qt::Popup | Qt::ToolTip); ++ ++ ++ MotifWmHints hints; ++ hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; ++ hints.functions = MWM_FUNC_ALL; ++ hints.decorations = MWM_DECOR_BORDER; ++ // XAtomHelper::getInstance()->setWindowMotifHint(this->winId(), hints); ++// KWindowSystem::setState(window->winId(), NET::KeepBelow); ++// KWindowEffects::enableBlurBehind(window->winId(), true); ++ m_window = window; ++ ++ ++ QPainterPath path; ++ int radius = 8; ++ if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { ++ auto settings = UKUIStyleSettings::globalInstance(); ++ if(settings->keys().contains("windowRadius")) ++ radius = settings->get("windowRadius").toInt(); ++ } ++ path.addRoundedRect(m_x, m_y, m_width, m_height, radius, radius);//设置这个path 没有毛玻璃效果 ++ KWindowEffects::enableBlurBehind(m_window->winId(), true/*, path.toFillPolygon().toPolygon()*/); ++ ++ ++ ++ connect(m_window, &QQuickWindow::visibleChanged, [=](bool arg){ ++ ++// qDebug() << "m_window visible changed..." << arg << m_window->isVisible(); ++ emit visibleChanged(arg); ++ }); ++ ++ ++} ++ ++bool UKUIPopupWindowHandle::outScreen() ++{ ++ return m_outScreen; ++} ++ ++void UKUIPopupWindowHandle::setOutScreen(bool newOutScreen) ++{ ++// qDebug() << "setOutScreen....." << newOutScreen; ++ if (m_outScreen == newOutScreen) ++ return; ++ m_outScreen = newOutScreen; ++ emit outScreenChanged(m_outScreen); ++} ++ ++QPoint UKUIPopupWindowHandle::posByCursor() ++{ ++ QPoint p = QCursor::pos(); ++ if(!m_window) ++ return p; ++ const QScreen *screen =QGuiApplication::screenAt(QCursor::pos()); ++ if (const QPlatformScreen *platformScreen = screen ? screen->handle() : nullptr) { ++ QPlatformCursor *cursor = platformScreen->cursor(); ++ const QSize nativeSize = cursor ? cursor->size() : QSize(16, 16); ++ const QSize cursorSize = QHighDpi::fromNativePixels(nativeSize, platformScreen); ++ QPoint offset(2, cursorSize.height()); ++ if (cursorSize.height() > 2 * m_window->height()) { ++ offset = QPoint(cursorSize.width() / 2, 0); ++ } ++ p += offset; ++ ++ QRect screenRect = screen->geometry(); ++ if (p.x() + m_window->width() > screenRect.x() + screenRect.width()) ++ p.rx() -= 4 + m_window->width(); ++ if (p.y() + m_window->height() > screenRect.y() + screenRect.height()) ++ p.ry() -= 24 + m_window->height(); ++ if (p.y() < screenRect.y()) ++ p.setY(screenRect.y()); ++ if (p.x() + m_window->width() > screenRect.x() + screenRect.width()) ++ p.setX(screenRect.x() + screenRect.width() - m_window->width()); ++ if (p.x() < screenRect.x()) ++ p.setX(screenRect.x()); ++ if (p.y() + m_window->height() > screenRect.y() + screenRect.height()) ++ p.setY(screenRect.y() + screenRect.height() - m_window->height()); ++ } ++ return p; ++} ++ ++bool UKUIPopupWindowHandle::posFollwMouse() const ++{ ++ return m_posFollwMouse; ++} ++ ++void UKUIPopupWindowHandle::setPosFollwMouse(bool newPosFollwMouse) ++{ ++ m_posFollwMouse = newPosFollwMouse; ++} ++ ++const QVariant &UKUIPopupWindowHandle::backColor() const ++{ ++ return m_backColor; ++} ++ ++void UKUIPopupWindowHandle::setBackColor(const QVariant &newBackColor) ++{ ++ m_backColor = newBackColor; ++} ++ ++void UKUIPopupWindowHandle::createShadow() ++{ ++ QColor c = Qt::transparent; ++ if(m_shadowColor.canConvert<QBrush>()){ ++ QBrush b = m_shadowColor.value<QBrush>(); ++ c = b.color(); ++ } ++ auto shadowColor = QColor(Qt::red); ++ ++ int shadowBorder = 20; ++ bool ok = false; ++ qreal darkness = 1.0; ++ if (!ok) { ++ darkness = 1.0; ++ } ++ QVector4D radius = QVector4D(1, 1, 1, 1); ++ QVector4D margins = QVector4D(20, 20, 20, 20); ++ ++ m_windowShadow = getShadow(shadowColor, shadowBorder, darkness, radius.x(), radius.y(), radius.z(), radius.w()); ++ ++ m_windowShadow->setPadding(QMargins(margins.x(), margins.y(), margins.z(), margins.w())); ++ m_windowShadow->setWindow(m_window); ++// qDebug() << "m_windowShadow create..." << m_windowShadow->create(); ++} ++ ++void UKUIPopupWindowHandle::destoryShadow() ++{ ++ if(m_windowShadow){ ++ m_windowShadow->destroy(); ++ m_windowShadow->deleteLater(); ++ m_windowShadow = nullptr; ++ } ++ ++} ++ ++const QVariant &UKUIPopupWindowHandle::shadowColor() const ++{ ++ return m_shadowColor; ++} ++ ++void UKUIPopupWindowHandle::setShadowColor(const QVariant &newShadowColor) ++{ ++ m_shadowColor = newShadowColor; ++} ++ ++ ++KWindowShadow *UKUIPopupWindowHandle::getShadow(QColor color, int shadow_border, qreal darkness, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight) ++{ ++ QPixmap shadowPixmap = getShadowPixmap(color, shadow_border, darkness, borderRadiusTopLeft, borderRadiusTopRight, borderRadiusBottomLeft, borderRadiusBottomRight); ++ qreal maxTopRadius = qMax(borderRadiusTopLeft, borderRadiusTopRight); ++ qreal maxBottomRadius = qMax(borderRadiusBottomLeft, borderRadiusBottomRight); ++ int maxRadius = qMax(maxTopRadius, maxBottomRadius); ++ maxRadius = qMax(12, maxRadius); ++ ++ QPixmap topLeftPixmap = shadowPixmap.copy(0, 0, maxRadius + shadow_border, maxRadius + shadow_border); ++ QPixmap topPixmap = shadowPixmap.copy(maxRadius + shadow_border, 0, INNERRECT_WIDTH, maxRadius + shadow_border); ++ QPixmap topRightPixmap = shadowPixmap.copy(maxRadius + shadow_border + INNERRECT_WIDTH, 0, maxRadius + shadow_border, maxRadius + shadow_border); ++ QPixmap leftPixmap = shadowPixmap.copy(0, maxRadius + shadow_border, maxRadius + shadow_border, INNERRECT_WIDTH); ++ QPixmap rightPixmap = shadowPixmap.copy(maxRadius + shadow_border + INNERRECT_WIDTH, maxRadius + shadow_border, maxRadius + shadow_border, INNERRECT_WIDTH); ++ QPixmap bottomLeftPixmap = shadowPixmap.copy(0, maxRadius + shadow_border + INNERRECT_WIDTH, maxRadius + shadow_border, maxRadius + shadow_border); ++ QPixmap bottomPixmap = shadowPixmap.copy(maxRadius + shadow_border, maxRadius + shadow_border + INNERRECT_WIDTH, INNERRECT_WIDTH, maxRadius + shadow_border); ++ QPixmap bottomRightPixmap = shadowPixmap.copy(maxRadius + shadow_border + INNERRECT_WIDTH, maxRadius + shadow_border + INNERRECT_WIDTH, maxRadius + shadow_border, maxRadius + shadow_border); ++ ++ KWindowShadow *shadow = new KWindowShadow; ++ KWindowShadowTile::Ptr topLeftTile = KWindowShadowTile::Ptr::create(); ++ topLeftTile.get()->setImage(topLeftPixmap.toImage()); ++ shadow->setTopLeftTile(topLeftTile); ++ KWindowShadowTile::Ptr topTile = KWindowShadowTile::Ptr::create(); ++ topTile.get()->setImage(topPixmap.toImage()); ++ shadow->setTopTile(topTile); ++ KWindowShadowTile::Ptr topRightTile = KWindowShadowTile::Ptr::create(); ++ topRightTile.get()->setImage(topRightPixmap.toImage()); ++ shadow->setTopRightTile(topRightTile); ++ KWindowShadowTile::Ptr leftTile = KWindowShadowTile::Ptr::create(); ++ leftTile.get()->setImage(leftPixmap.toImage()); ++ shadow->setLeftTile(leftTile); ++ KWindowShadowTile::Ptr rightTile = KWindowShadowTile::Ptr::create(); ++ rightTile.get()->setImage(rightPixmap.toImage()); ++ shadow->setRightTile(rightTile); ++ KWindowShadowTile::Ptr bottomLeftTile = KWindowShadowTile::Ptr::create(); ++ bottomLeftTile.get()->setImage(bottomLeftPixmap.toImage()); ++ shadow->setBottomLeftTile(bottomLeftTile); ++ KWindowShadowTile::Ptr bottomTile = KWindowShadowTile::Ptr::create(); ++ bottomTile.get()->setImage(bottomPixmap.toImage()); ++ shadow->setBottomTile(bottomTile); ++ KWindowShadowTile::Ptr bottomRightTile = KWindowShadowTile::Ptr::create(); ++ bottomRightTile.get()->setImage(bottomRightPixmap.toImage()); ++ shadow->setBottomRightTile(bottomRightTile); ++ ++ return shadow; ++} ++ ++ ++QPixmap UKUIPopupWindowHandle::getShadowPixmap(QColor color, /*ConfigShadowHelper::State state,*/ int shadow_border, qreal darkness, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight) ++{ ++ int maxTopRadius = qMax(borderRadiusTopLeft, borderRadiusTopRight); ++ int maxBottomRadius = qMax(borderRadiusBottomLeft, borderRadiusBottomRight); ++ int maxRadius = qMax(maxTopRadius, maxBottomRadius); ++ maxRadius = qMax(12, maxRadius); ++ QPixmap pix(QSize(2 * maxRadius + 2 * shadow_border + INNERRECT_WIDTH, 2 * maxRadius + 2 * shadow_border + INNERRECT_WIDTH)); ++ pix.fill(Qt::transparent); ++ ++ int squareWidth = 2 * maxRadius + INNERRECT_WIDTH; ++ ++ QPainterPath windowRelativePath; ++ windowRelativePath.setFillRule(Qt::WindingFill); ++ QPoint currentPos; ++ ++ int qAppMaxradius = maxRadius; ++ auto settings = UKUIStyleSettings::globalInstance(); ++ if(settings && settings->keys().contains("windowRadius")) ++ qAppMaxradius = settings->get("windowRadius").toInt(); ++ // move to top left arc start point ++ windowRelativePath.moveTo(borderRadiusTopLeft, 0); ++ // top left arc ++ auto topLeftBorderRadiusRect = QRect(0, 0, 2 * borderRadiusTopLeft, 2 * borderRadiusTopLeft); ++ if(qAppMaxradius > 0) ++ windowRelativePath.arcTo(topLeftBorderRadiusRect, 90, 90); ++ else ++ windowRelativePath.addRect(topLeftBorderRadiusRect); ++ // move to bottom left arc start point ++ currentPos = QPoint(0, maxRadius + INNERRECT_WIDTH + maxRadius - borderRadiusBottomLeft); ++ //windowRelativePath.moveTo(currentPos); ++ // bottom left arc ++ auto bottomLeftRect = QRect(0, currentPos.y() - borderRadiusBottomLeft, 2 * borderRadiusBottomLeft, 2 * borderRadiusBottomLeft); ++ if(qAppMaxradius > 0) ++ windowRelativePath.arcTo(bottomLeftRect, 180, 90); ++ else ++ windowRelativePath.addRect(bottomLeftRect); ++ ++ // move to bottom right arc start point ++ currentPos = QPoint(2 * maxRadius + INNERRECT_WIDTH - borderRadiusBottomRight, 2 * maxRadius + INNERRECT_WIDTH); ++ //windowRelativePath.moveTo(currentPos); ++ // bottom right arc ++ auto bottomRightRect = QRect(currentPos.x() - borderRadiusBottomRight, currentPos.y() - 2 * borderRadiusBottomRight, 2 * borderRadiusBottomRight, 2 * borderRadiusBottomRight); ++ if(qAppMaxradius > 0) ++ windowRelativePath.arcTo(bottomRightRect, 270, 90); ++ else ++ windowRelativePath.addRect(bottomRightRect); ++ ++ // move to top right arc start point ++ currentPos = QPoint(2 * maxRadius + INNERRECT_WIDTH, borderRadiusTopRight); ++ //windowRelativePath.moveTo(currentPos); ++ // top right arc ++ auto topRightRect = QRect(squareWidth - 2 * borderRadiusTopRight, 0, 2 * borderRadiusTopRight, 2 * borderRadiusTopRight); ++ if(qAppMaxradius > 0) ++ windowRelativePath.arcTo(topRightRect, 0, 90); ++ else ++ windowRelativePath.addRect(topRightRect); ++ ++ QPainter painter(&pix); ++ painter.save(); ++ painter.translate(shadow_border, shadow_border); ++ painter.fillPath(windowRelativePath, QColor(26,26,26)); ++ painter.restore(); ++ ++ QImage rawImg = pix.toImage(); ++ qt_blurImage(rawImg, shadow_border, true, true); ++ ++ QPixmap target = QPixmap::fromImage(rawImg); ++ QPainter painter2(&target); ++ painter2.save(); ++ painter2.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); ++ painter2.translate(shadow_border, shadow_border); ++ painter2.setCompositionMode(QPainter::CompositionMode_Clear); ++ painter2.fillPath(windowRelativePath, Qt::transparent); ++ painter2.restore(); ++ painter2.end(); ++ ++ // handle darkness ++ QImage newImg = target.toImage(); ++ for (int x = 0; x < newImg.width(); x++) { ++ for (int y = 0; y < newImg.height(); y++) { ++ auto color = newImg.pixelColor(x, y); ++ if (color.alpha() == 0) ++ continue; ++ color.setAlphaF(darkness * color.alphaF()); ++ newImg.setPixelColor(x, y, color); ++ } ++ } ++ ++ QPixmap darkerTarget = QPixmap::fromImage(newImg); ++ painter2.begin(&darkerTarget); ++ ++ auto borderPath = caculateRelativePainterPath(borderRadiusTopLeft + 0.5, borderRadiusTopRight + 0.5, borderRadiusBottomLeft + 0.5, borderRadiusBottomRight + 0.5); ++ painter2.setCompositionMode(QPainter::CompositionMode_DestinationOver); ++ painter2.setRenderHint(QPainter::HighQualityAntialiasing); ++ QColor borderColor = color; ++ borderColor.setAlphaF(0.05); ++ painter2.setPen(borderColor); ++ painter2.setBrush(Qt::NoBrush); ++ painter2.translate(shadow_border, shadow_border); ++ painter2.translate(-0.5, -0.5); ++// painter2.drawPath(borderPath); ++ ++ return darkerTarget; ++} ++ ++ ++QPainterPath UKUIPopupWindowHandle::caculateRelativePainterPath(qreal borderRadiusTopLeft, qreal borderRadiusTopRight, qreal borderRadiusBottomLeft, qreal borderRadiusBottomRight) ++{ ++ qreal maxTopRadius = qMax(borderRadiusTopLeft, borderRadiusTopRight); ++ qreal maxBottomRadius = qMax(borderRadiusBottomLeft, borderRadiusBottomRight); ++ qreal maxRadius = qMax(maxTopRadius, maxBottomRadius); ++ maxRadius = qMax(12.0, maxRadius); ++ ++ qreal squareWidth = 2 * maxRadius + INNERRECT_WIDTH; ++ ++ QPainterPath windowRelativePath; ++ windowRelativePath.setFillRule(Qt::WindingFill); ++ QPointF currentPos; ++ ++ int qAppMaxradius = maxRadius; ++ auto settings = UKUIStyleSettings::globalInstance(); ++ if(settings && settings->keys().contains("windowRadius")) ++ qAppMaxradius = settings->get("windowRadius").toInt(); ++ ++ // move to top left arc start point ++ windowRelativePath.moveTo(borderRadiusTopLeft, 0); ++ // top left arc ++ auto topLeftBorderRadiusRect = QRectF(0, 0, 2 * borderRadiusTopLeft, 2 * borderRadiusTopLeft); ++ if(qAppMaxradius > 0) ++ windowRelativePath.arcTo(topLeftBorderRadiusRect, 90, 90); ++ else ++ windowRelativePath.addRect(topLeftBorderRadiusRect); ++ ++ // move to bottom left arc start point ++ currentPos = QPointF(0, maxRadius + INNERRECT_WIDTH + maxRadius - borderRadiusBottomLeft); ++ //windowRelativePath.moveTo(currentPos); ++ // bottom left arc ++ auto bottomLeftRect = QRectF(0, currentPos.y() - borderRadiusBottomLeft, 2 * borderRadiusBottomLeft, 2 * borderRadiusBottomLeft); ++ if(qAppMaxradius > 0) ++ windowRelativePath.arcTo(bottomLeftRect, 180, 90); ++ else ++ windowRelativePath.addRect(bottomLeftRect); ++ ++ // move to bottom right arc start point ++ currentPos = QPointF(2 * maxRadius + INNERRECT_WIDTH - borderRadiusBottomRight, 2 * maxRadius + INNERRECT_WIDTH); ++ //windowRelativePath.moveTo(currentPos); ++ // bottom right arc ++ auto bottomRightRect = QRectF(currentPos.x() - borderRadiusBottomRight, currentPos.y() - 2 * borderRadiusBottomRight, 2 * borderRadiusBottomRight, 2 * borderRadiusBottomRight); ++ if(qAppMaxradius > 0) ++ windowRelativePath.arcTo(bottomRightRect, 270, 90); ++ else ++ windowRelativePath.addRect(bottomRightRect); ++ ++ // move to top right arc start point ++ currentPos = QPointF(2 * maxRadius + INNERRECT_WIDTH, borderRadiusTopRight); ++ //windowRelativePath.moveTo(currentPos); ++ // top right arc ++ auto topRightRect = QRectF(squareWidth - 2 * borderRadiusTopRight, 0, 2 * borderRadiusTopRight, 2 * borderRadiusTopRight); ++ if(qAppMaxradius > 0) ++ windowRelativePath.arcTo(topRightRect, 0, 90); ++ else ++ windowRelativePath.addRect(topRightRect); ++ ++ return windowRelativePath; ++} ++ ++bool UKUIPopupWindowHandle::visible() ++{ ++// qDebug() << "handle visible..." << m_visible; ++ if(m_window) ++ m_visible = m_window->isVisible(); ++ return m_visible; ++} ++ ++void UKUIPopupWindowHandle::setVisible(bool newVisible) ++{ ++// qDebug() << "handle setVisible..." << newVisible << m_visible; ++ ++ if (m_visible == newVisible) ++ return; ++ m_visible = newVisible; ++ if(m_window){ ++ if(m_visible) ++ updateWindow(); ++ m_window->setVisible(m_visible); ++ } ++ else{ ++ createHandle(); ++ m_window->setVisible(m_visible); ++ } ++} +diff --git a/ukui-qml-style-helper/styleparameter/ukuipopupwindowhandle.h b/ukui-qml-style-helper/styleparameter/ukuipopupwindowhandle.h +new file mode 100644 +index 0000000..7ea8bfc +--- /dev/null ++++ b/ukui-qml-style-helper/styleparameter/ukuipopupwindowhandle.h +@@ -0,0 +1,94 @@ ++#pragma once ++ ++ ++#include <QtQml> ++#include <QQuickWindow> ++#include <QQuickItem> ++#include <QColor> ++#include <QPainterPath> ++#include <QPixmap> ++#include <KWindowShadow> ++#include <KWindowShadowTile> ++#include "tokenparameter.h" ++ ++namespace UKUIQQC2Style { ++ ++class UKUIPopupWindowHandle : public QObject ++{ ++ Q_OBJECT ++ Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate) ++ Q_PROPERTY(bool outScreen READ outScreen WRITE setOutScreen NOTIFY outScreenChanged) ++ Q_PROPERTY(bool posFollwMouse READ posFollwMouse WRITE setPosFollwMouse) ++ ++ Q_PROPERTY(QVariant backColor READ backColor WRITE setBackColor) ++ Q_PROPERTY(QVariant shadowColor READ shadowColor WRITE setShadowColor) ++ Q_PROPERTY(bool visible READ visible WRITE setVisible NOTIFY visibleChanged) ++ ++ QML_NAMED_ELEMENT(PopupHandle) ++ QML_ATTACHED(UKUIPopupWindowHandle) ++ ++public: ++ explicit UKUIPopupWindowHandle(QObject *parent = nullptr); ++ ~UKUIPopupWindowHandle() override; ++ ++ UKUIPopupWindowHandle* qmlAttachedProperties(QObject *object); ++ ++ Q_INVOKABLE void open(); ++ Q_INVOKABLE void close(); ++ Q_INVOKABLE void setSize(int width, int height); ++ Q_INVOKABLE void setPosion(int x, int y); ++ Q_INVOKABLE QPoint posByCursor(); ++ Q_INVOKABLE void createWindow(QObject *obj); ++ bool outScreen(); ++ ++ void updateWindow(); ++ ++ QQmlComponent *delegate() const; ++ void setDelegate(QQmlComponent *newDelegate); ++ ++ void setOutScreen(bool newOutScreen); ++ ++ bool posFollwMouse() const; ++ void setPosFollwMouse(bool newPosFollwMouse); ++ ++ const QVariant &backColor() const; ++ void setBackColor(const QVariant &newBackColor); ++ ++ void createShadow(); ++ void destoryShadow(); ++ ++ const QVariant &shadowColor() const; ++ void setShadowColor(const QVariant &newShadowColor); ++ ++ QPainterPath caculateRelativePainterPath(qreal borderRadiusTopLeft, qreal borderRadiusTopRight, qreal borderRadiusBottomLeft, qreal borderRadiusBottomRight); ++ KWindowShadow *getShadow(QColor color, int shadow_border, qreal darkness, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight); ++ QPixmap getShadowPixmap(QColor color, /*ConfigShadowHelper::State state,*/ int shadow_border, qreal darkness, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight); ++ ++ bool visible(); ++ void setVisible(bool newVisible); ++ ++Q_SIGNALS: ++ void visibleChanged(bool visible); ++ void sizeChanged(int width, int height); ++ void outScreenChanged(bool outScreen); ++ ++private Q_SLOTS: ++ void createHandle(); ++ ++private: ++ QQmlComponent *m_delegate = nullptr; ++ QQuickWindow *m_window = nullptr; ++ int m_width = 0; ++ int m_height = 0; ++ int m_x = 0; ++ int m_y = 0; ++ bool m_outScreen = false; ++ bool m_posFollwMouse = false; ++ QVariant m_backColor; ++ QVariant m_shadowColor; ++ KWindowShadow *m_windowShadow = nullptr; ++ bool m_visible = false; ++}; ++} ++ ++QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUIPopupWindowHandle, QML_HAS_ATTACHED_PROPERTIES) +diff --git a/ukui-qml-style-helper/styleparameter/ukuiprogressbar.cpp b/ukui-qml-style-helper/styleparameter/ukuiprogressbar.cpp +index bc40950..55c399b 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuiprogressbar.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuiprogressbar.cpp +@@ -30,6 +30,10 @@ void UKUIProgressBar::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + setIndeterminateChildrenWidth(56); + setBorderWidth(1); + setBorderColor(instance->kLineComponentNormal()); ++ setHightlightTextColor(instance->highLightedTextActive()); ++ ++ emit parametryChanged(); ++ + + } + +@@ -39,12 +43,12 @@ UKUIProgressBar* UKUIProgressBar::qmlAttachedProperties(QObject *parent) + return new UKUIProgressBar(p); + } + +-const DTColor &UKUIProgressBar::normalColor() const ++const QBrush &UKUIProgressBar::normalColor() const + { + return m_normalColor; + } + +-void UKUIProgressBar::setNormalColor(const DTColor &newNormalColor) ++void UKUIProgressBar::setNormalColor(const QBrush &newNormalColor) + { + if (m_normalColor == newNormalColor) + return; +@@ -65,12 +69,12 @@ void UKUIProgressBar::setRadius(int newRadius) + emit radiusChanged(); + } + +-const DTColor &UKUIProgressBar::childrenColor() const ++const QBrush &UKUIProgressBar::childrenColor() const + { + return m_childrenColor; + } + +-void UKUIProgressBar::setChildrenColor(const DTColor &newChildrenColor) ++void UKUIProgressBar::setChildrenColor(const QBrush &newChildrenColor) + { + if (m_childrenColor == newChildrenColor) + return; +@@ -117,12 +121,12 @@ void UKUIProgressBar::setIndeterminateChildrenWidth(int newIndeterminateChildren + emit indeterminateChildrenWidthChanged(); + } + +-const DTColor &UKUIProgressBar::indeterminateChildrenStartColor() const ++const QBrush &UKUIProgressBar::indeterminateChildrenStartColor() const + { + return m_indeterminateChildrenStartColor; + } + +-void UKUIProgressBar::setIndeterminateChildrenStartColor(const DTColor &newIndeterminateChildrenStartColor) ++void UKUIProgressBar::setIndeterminateChildrenStartColor(const QBrush &newIndeterminateChildrenStartColor) + { + if (m_indeterminateChildrenStartColor == newIndeterminateChildrenStartColor) + return; +@@ -130,12 +134,12 @@ void UKUIProgressBar::setIndeterminateChildrenStartColor(const DTColor &newIndet + emit indeterminateChildrenStartColorChanged(); + } + +-const DTColor &UKUIProgressBar::indeterminateChildrenEndColor() const ++const QBrush &UKUIProgressBar::indeterminateChildrenEndColor() const + { + return m_indeterminateChildrenEndColor; + } + +-void UKUIProgressBar::setIndeterminateChildrenEndColor(const DTColor &newIndeterminateChildrenEndColor) ++void UKUIProgressBar::setIndeterminateChildrenEndColor(const QBrush &newIndeterminateChildrenEndColor) + { + if (m_indeterminateChildrenEndColor == newIndeterminateChildrenEndColor) + return; +@@ -156,15 +160,28 @@ void UKUIProgressBar::setBorderWidth(int newBorderWidth) + emit borderWidthChanged(); + } + +-const DTColor &UKUIProgressBar::borderColor() const ++const QBrush &UKUIProgressBar::borderColor() const + { + return m_borderColor; + } + +-void UKUIProgressBar::setBorderColor(const DTColor &newBorderColor) ++void UKUIProgressBar::setBorderColor(const QBrush &newBorderColor) + { + if (m_borderColor == newBorderColor) + return; + m_borderColor = newBorderColor; + emit borderColorChanged(); + } ++ ++const QBrush &UKUIProgressBar::hightlightTextColor() const ++{ ++ return m_hightlightTextColor; ++} ++ ++void UKUIProgressBar::setHightlightTextColor(const QBrush &newHightlightTextColor) ++{ ++ if (m_hightlightTextColor == newHightlightTextColor) ++ return; ++ m_hightlightTextColor = newHightlightTextColor; ++ emit hightlightTextColorChanged(); ++} +diff --git a/ukui-qml-style-helper/styleparameter/ukuiprogressbar.h b/ukui-qml-style-helper/styleparameter/ukuiprogressbar.h +index 2e20d74..f02ca68 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuiprogressbar.h ++++ b/ukui-qml-style-helper/styleparameter/ukuiprogressbar.h +@@ -39,16 +39,19 @@ class UKUIProgressBar : public QQuickItem + Q_OBJECT + + Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY radiusChanged) +- Q_PROPERTY(DTColor normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) +- Q_PROPERTY(DTColor childrenColor READ childrenColor WRITE setChildrenColor NOTIFY childrenColorChanged) ++ Q_PROPERTY(QBrush normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) ++ Q_PROPERTY(QBrush childrenColor READ childrenColor WRITE setChildrenColor NOTIFY childrenColorChanged) + Q_PROPERTY(int normalWidth READ normalWidth WRITE setNormalWidth NOTIFY normalWidthChanged) + Q_PROPERTY(int normalHeight READ normalHeight WRITE setNormalHeight NOTIFY normalHeightChanged) + Q_PROPERTY(int indeterminateChildrenWidth READ indeterminateChildrenWidth WRITE setIndeterminateChildrenWidth NOTIFY indeterminateChildrenWidthChanged) +- Q_PROPERTY(DTColor indeterminateChildrenStartColor READ indeterminateChildrenStartColor WRITE setIndeterminateChildrenStartColor NOTIFY indeterminateChildrenStartColorChanged) +- Q_PROPERTY(DTColor indeterminateChildrenEndColor READ indeterminateChildrenEndColor WRITE setIndeterminateChildrenEndColor NOTIFY indeterminateChildrenEndColorChanged) ++ Q_PROPERTY(QBrush indeterminateChildrenStartColor READ indeterminateChildrenStartColor WRITE setIndeterminateChildrenStartColor NOTIFY indeterminateChildrenStartColorChanged) ++ Q_PROPERTY(QBrush indeterminateChildrenEndColor READ indeterminateChildrenEndColor WRITE setIndeterminateChildrenEndColor NOTIFY indeterminateChildrenEndColorChanged) + + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) +- Q_PROPERTY(DTColor borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged) ++ Q_PROPERTY(QBrush borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged) ++ ++ Q_PROPERTY(QBrush hightlightTextColor READ hightlightTextColor WRITE setHightlightTextColor NOTIFY hightlightTextColorChanged) ++ + public: + explicit UKUIProgressBar(QQuickItem *parent = nullptr); + ~UKUIProgressBar(); +@@ -57,14 +60,14 @@ public: + + static UKUIProgressBar* qmlAttachedProperties(QObject* parent); + +- const DTColor &normalColor() const; +- void setNormalColor(const DTColor &newNormalColor); ++ const QBrush &normalColor() const; ++ void setNormalColor(const QBrush &newNormalColor); + + int radius() const; + void setRadius(int newRadius); + +- const DTColor &childrenColor() const; +- void setChildrenColor(const DTColor &newChildrenColor); ++ const QBrush &childrenColor() const; ++ void setChildrenColor(const QBrush &newChildrenColor); + + int normalWidth() const; + void setNormalWidth(int newNormalWidth); +@@ -75,17 +78,20 @@ public: + int indeterminateChildrenWidth() const; + void setIndeterminateChildrenWidth(int newIndeterminateChildrenWidth); + +- const DTColor &indeterminateChildrenStartColor() const; +- void setIndeterminateChildrenStartColor(const DTColor &newIndeterminateChildrenStartColor); ++ const QBrush &indeterminateChildrenStartColor() const; ++ void setIndeterminateChildrenStartColor(const QBrush &newIndeterminateChildrenStartColor); + +- const DTColor &indeterminateChildrenEndColor() const; +- void setIndeterminateChildrenEndColor(const DTColor &newIndeterminateChildrenEndColor); ++ const QBrush &indeterminateChildrenEndColor() const; ++ void setIndeterminateChildrenEndColor(const QBrush &newIndeterminateChildrenEndColor); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); + +- const DTColor &borderColor() const; +- void setBorderColor(const DTColor &newBorderColor); ++ const QBrush &borderColor() const; ++ void setBorderColor(const QBrush &newBorderColor); ++ ++ const QBrush &hightlightTextColor() const; ++ void setHightlightTextColor(const QBrush &newHightlightTextColor); + + signals: + void normalColorChanged(); +@@ -108,21 +114,26 @@ signals: + + void borderColorChanged(); + ++ void parametryChanged(); ++ ++ void hightlightTextColorChanged(); ++ + private: +- Q_INVOKABLE DTColor m_normalColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.85)); ++ Q_INVOKABLE QBrush m_normalColor = QBrush(QColor::fromRgbF(0, 0, 0, 0.85)); + + int m_radius; +- Q_INVOKABLE DTColor m_childrenColor; ++ Q_INVOKABLE QBrush m_childrenColor; + int m_normalWidth; + int m_normalHeight; + int m_indeterminateChildrenWidth; +- Q_INVOKABLE DTColor m_indeterminateChildrenStartColor; +- Q_INVOKABLE DTColor m_indeterminateChildrenEndColor; ++ Q_INVOKABLE QBrush m_indeterminateChildrenStartColor; ++ Q_INVOKABLE QBrush m_indeterminateChildrenEndColor; + int m_borderWidth; +- Q_INVOKABLE DTColor m_borderColor; ++ Q_INVOKABLE QBrush m_borderColor; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + ++ QBrush m_hightlightTextColor; + }; + } + QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUIProgressBar, QML_HAS_ATTACHED_PROPERTIES) +diff --git a/ukui-qml-style-helper/styleparameter/ukuiradiobutton.cpp b/ukui-qml-style-helper/styleparameter/ukuiradiobutton.cpp +index f0f1dac..14a3dcc 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuiradiobutton.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuiradiobutton.cpp +@@ -5,7 +5,6 @@ using namespace UKUIQQC2Style; + + UKUIRadioButton::UKUIRadioButton(QQuickItem *parent) : QQuickItem(parent) + { +- qDebug() << "UKUIRadioButton.............."; + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); +@@ -58,6 +57,9 @@ void UKUIRadioButton::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + setSpace(8); + setIndicatorWidth(16); + setChildrenWidth(8); ++ ++ emit parametryChanged(); ++ + } + + +@@ -101,12 +103,12 @@ void UKUIRadioButton::setSpace(double newSpace) + emit spaceChanged(); + } + +-const DTColor &UKUIRadioButton::disableTextColor() const ++const QBrush &UKUIRadioButton::disableTextColor() const + { + return m_disableTextColor; + } + +-void UKUIRadioButton::setDisableTextColor(const DTColor &newDisableTextColor) ++void UKUIRadioButton::setDisableTextColor(const QBrush &newDisableTextColor) + { + if (m_disableTextColor == newDisableTextColor) + return; +@@ -114,12 +116,12 @@ void UKUIRadioButton::setDisableTextColor(const DTColor &newDisableTextColor) + emit disableTextColorChanged(); + } + +-const DTColor &UKUIRadioButton::normalTextColor() const ++const QBrush &UKUIRadioButton::normalTextColor() const + { + return m_normalTextColor; + } + +-void UKUIRadioButton::setNormalTextColor(const DTColor &newNormalTextColor) ++void UKUIRadioButton::setNormalTextColor(const QBrush &newNormalTextColor) + { + if (m_normalTextColor == newNormalTextColor) + return; +@@ -127,12 +129,12 @@ void UKUIRadioButton::setNormalTextColor(const DTColor &newNormalTextColor) + emit normalTextColorChanged(); + } + +-const DTColor &UKUIRadioButton::normalIndicatorColor() const ++const QBrush &UKUIRadioButton::normalIndicatorColor() const + { + return m_normalIndicatorColor; + } + +-void UKUIRadioButton::setNormalIndicatorColor(const DTColor &newNormalIndicatorColor) ++void UKUIRadioButton::setNormalIndicatorColor(const QBrush &newNormalIndicatorColor) + { + if (m_normalIndicatorColor == newNormalIndicatorColor) + return; +@@ -140,12 +142,12 @@ void UKUIRadioButton::setNormalIndicatorColor(const DTColor &newNormalIndicatorC + emit normalIndicatorColorChanged(); + } + +-const DTColor &UKUIRadioButton::hoverIndicatorColor() const ++const QBrush &UKUIRadioButton::hoverIndicatorColor() const + { + return m_hoverIndicatorColor; + } + +-void UKUIRadioButton::setHoverIndicatorColor(const DTColor &newHoverIndicatorColor) ++void UKUIRadioButton::setHoverIndicatorColor(const QBrush &newHoverIndicatorColor) + { + if (m_hoverIndicatorColor == newHoverIndicatorColor) + return; +@@ -153,12 +155,12 @@ void UKUIRadioButton::setHoverIndicatorColor(const DTColor &newHoverIndicatorCol + emit hoverIndicatorColorChanged(); + } + +-const DTColor &UKUIRadioButton::clickIndicatorColor() const ++const QBrush &UKUIRadioButton::clickIndicatorColor() const + { + return m_clickIndicatorColor; + } + +-void UKUIRadioButton::setClickIndicatorColor(const DTColor &newClickIndicatorColor) ++void UKUIRadioButton::setClickIndicatorColor(const QBrush &newClickIndicatorColor) + { + if (m_clickIndicatorColor == newClickIndicatorColor) + return; +@@ -166,12 +168,12 @@ void UKUIRadioButton::setClickIndicatorColor(const DTColor &newClickIndicatorCol + emit clickIndicatorColorChanged(); + } + +-const DTColor &UKUIRadioButton::disableIndicatorColor() const ++const QBrush &UKUIRadioButton::disableIndicatorColor() const + { + return m_disableIndicatorColor; + } + +-void UKUIRadioButton::setDisableIndicatorColor(const DTColor &newDisableIndicatorColor) ++void UKUIRadioButton::setDisableIndicatorColor(const QBrush &newDisableIndicatorColor) + { + if (m_disableIndicatorColor == newDisableIndicatorColor) + return; +@@ -179,12 +181,12 @@ void UKUIRadioButton::setDisableIndicatorColor(const DTColor &newDisableIndicato + emit disableIndicatorColorChanged(); + } + +-const DTColor &UKUIRadioButton::normalIndicatorBorderColor() const ++const QBrush &UKUIRadioButton::normalIndicatorBorderColor() const + { + return m_normalIndicatorBorderColor; + } + +-void UKUIRadioButton::setNormalIndicatorBorderColor(const DTColor &newNormalIndicatorBorderColor) ++void UKUIRadioButton::setNormalIndicatorBorderColor(const QBrush &newNormalIndicatorBorderColor) + { + if (m_normalIndicatorBorderColor == newNormalIndicatorBorderColor) + return; +@@ -192,12 +194,12 @@ void UKUIRadioButton::setNormalIndicatorBorderColor(const DTColor &newNormalIndi + emit normalIndicatorBorderColorChanged(); + } + +-const DTColor &UKUIRadioButton::hoverIndicatorBorderColor() const ++const QBrush &UKUIRadioButton::hoverIndicatorBorderColor() const + { + return m_hoverIndicatorBorderColor; + } + +-void UKUIRadioButton::setHoverIndicatorBorderColor(const DTColor &newHoverIndicatorBorderColor) ++void UKUIRadioButton::setHoverIndicatorBorderColor(const QBrush &newHoverIndicatorBorderColor) + { + if (m_hoverIndicatorBorderColor == newHoverIndicatorBorderColor) + return; +@@ -205,12 +207,12 @@ void UKUIRadioButton::setHoverIndicatorBorderColor(const DTColor &newHoverIndica + emit hoverIndicatorBorderColorChanged(); + } + +-const DTColor &UKUIRadioButton::clickIndicatorBorderColor() const ++const QBrush &UKUIRadioButton::clickIndicatorBorderColor() const + { + return m_clickIndicatorBorderColor; + } + +-void UKUIRadioButton::setClickIndicatorBorderColor(const DTColor &newClickIndicatorBorderColor) ++void UKUIRadioButton::setClickIndicatorBorderColor(const QBrush &newClickIndicatorBorderColor) + { + if (m_clickIndicatorBorderColor == newClickIndicatorBorderColor) + return; +@@ -218,12 +220,12 @@ void UKUIRadioButton::setClickIndicatorBorderColor(const DTColor &newClickIndica + emit clickIndicatorBorderColorChanged(); + } + +-const DTColor &UKUIRadioButton::disableIndicatorBorderColor() const ++const QBrush &UKUIRadioButton::disableIndicatorBorderColor() const + { + return m_disableIndicatorBorderColor; + } + +-void UKUIRadioButton::setDisableIndicatorBorderColor(const DTColor &newDisableIndicatorBorderColor) ++void UKUIRadioButton::setDisableIndicatorBorderColor(const QBrush &newDisableIndicatorBorderColor) + { + if (m_disableIndicatorBorderColor == newDisableIndicatorBorderColor) + return; +@@ -231,90 +233,90 @@ void UKUIRadioButton::setDisableIndicatorBorderColor(const DTColor &newDisableIn + emit disableIndicatorBorderColorChanged(); + } + +-const DTColor &UKUIRadioButton::checked_normalIndicatorColor() const ++const QBrush &UKUIRadioButton::checked_normalIndicatorColor() const + { + return m_checked_normalIndicatorColor; + } + +-const DTColor &UKUIRadioButton::checked_hoverIndicatorColor() const ++const QBrush &UKUIRadioButton::checked_hoverIndicatorColor() const + { + return m_checked_hoverIndicatorColor; + } + +-const DTColor &UKUIRadioButton::checked_clickIndicatorColor() const ++const QBrush &UKUIRadioButton::checked_clickIndicatorColor() const + { + return m_checked_clickIndicatorColor; + } + +-const DTColor &UKUIRadioButton::checked_disableIndicatorColor() const ++const QBrush &UKUIRadioButton::checked_disableIndicatorColor() const + { + return m_checked_disableIndicatorColor; + } + +-const DTColor &UKUIRadioButton::checked_normalIndicatorBorderColor() const ++const QBrush &UKUIRadioButton::checked_normalIndicatorBorderColor() const + { + return m_checked_normalIndicatorBorderColor; + } + +-const DTColor &UKUIRadioButton::checked_hoverIndicatorBorderColor() const ++const QBrush &UKUIRadioButton::checked_hoverIndicatorBorderColor() const + { + return m_checked_hoverIndicatorBorderColor; + } + +-const DTColor &UKUIRadioButton::checked_clickIndicatorBorderColor() const ++const QBrush &UKUIRadioButton::checked_clickIndicatorBorderColor() const + { + return m_checked_clickIndicatorBorderColor; + } + +-const DTColor &UKUIRadioButton::checked_disableIndicatorBorderColor() const ++const QBrush &UKUIRadioButton::checked_disableIndicatorBorderColor() const + { + return m_checked_disableIndicatorBorderColor; + } + +-const DTColor &UKUIRadioButton::checked_normalChildrenColor() const ++const QBrush &UKUIRadioButton::checked_normalChildrenColor() const + { + return m_checked_normalChildrenColor; + } + +-const DTColor &UKUIRadioButton::checked_hoverChildrenColor() const ++const QBrush &UKUIRadioButton::checked_hoverChildrenColor() const + { + return m_checked_hoverChildrenColor; + } + +-const DTColor &UKUIRadioButton::checked_clickChildrenColor() const ++const QBrush &UKUIRadioButton::checked_clickChildrenColor() const + { + return m_checked_clickChildrenColor; + } + + +-const DTColor &UKUIRadioButton::checked_disableChildrenColor() const ++const QBrush &UKUIRadioButton::checked_disableChildrenColor() const + { + return m_checked_disableChildrenColor; + } + +-const DTColor &UKUIRadioButton::checked_normalChildrenBorderColor() const ++const QBrush &UKUIRadioButton::checked_normalChildrenBorderColor() const + { + return m_checked_normalChildrenBorderColor; + } + +-const DTColor &UKUIRadioButton::checked_hoverChildrenBorderColor() const ++const QBrush &UKUIRadioButton::checked_hoverChildrenBorderColor() const + { + return m_checked_hoverChildrenBorderColor; + } + +-const DTColor &UKUIRadioButton::checked_clickChildrenBorderColor() const ++const QBrush &UKUIRadioButton::checked_clickChildrenBorderColor() const + { + return m_checked_clickChildrenBorderColor; + } + + +-const DTColor &UKUIRadioButton::checked_disableChildrenBorderColor() const ++const QBrush &UKUIRadioButton::checked_disableChildrenBorderColor() const + { + return m_checked_disableChildrenBorderColor; + } + + +-void UKUIRadioButton::setChecked_NormalIndicatorColor(const DTColor &newChecked_normalIndicatorColor) ++void UKUIRadioButton::setChecked_NormalIndicatorColor(const QBrush &newChecked_normalIndicatorColor) + { + if (m_checked_normalIndicatorColor == newChecked_normalIndicatorColor) + return; +@@ -322,7 +324,7 @@ void UKUIRadioButton::setChecked_NormalIndicatorColor(const DTColor &newChecked_ + emit checked_normalIndicatorColorChanged(); + } + +-void UKUIRadioButton::setChecked_HoverIndicatorColor(const DTColor &newChecked_hoverIndicatorColor) ++void UKUIRadioButton::setChecked_HoverIndicatorColor(const QBrush &newChecked_hoverIndicatorColor) + { + if (m_checked_hoverIndicatorColor == newChecked_hoverIndicatorColor) + return; +@@ -330,7 +332,7 @@ void UKUIRadioButton::setChecked_HoverIndicatorColor(const DTColor &newChecked_h + emit checked_hoverIndicatorColorChanged(); + } + +-void UKUIRadioButton::setChecked_ClickIndicatorColor(const DTColor &newChecked_clickIndicatorColor) ++void UKUIRadioButton::setChecked_ClickIndicatorColor(const QBrush &newChecked_clickIndicatorColor) + { + if (m_checked_clickIndicatorColor == newChecked_clickIndicatorColor) + return; +@@ -338,7 +340,7 @@ void UKUIRadioButton::setChecked_ClickIndicatorColor(const DTColor &newChecked_c + emit checked_clickIndicatorColorChanged(); + } + +-void UKUIRadioButton::setChecked_DisableIndicatorColor(const DTColor &newChecked_disableIndicatorColor) ++void UKUIRadioButton::setChecked_DisableIndicatorColor(const QBrush &newChecked_disableIndicatorColor) + { + if (m_checked_disableIndicatorColor == newChecked_disableIndicatorColor) + return; +@@ -346,7 +348,7 @@ void UKUIRadioButton::setChecked_DisableIndicatorColor(const DTColor &newChecked + emit checked_disableIndicatorColorChanged(); + } + +-void UKUIRadioButton::setChecked_NormalIndicatorBorderColor(const DTColor &newChecked_normalIndicatorBorderColor) ++void UKUIRadioButton::setChecked_NormalIndicatorBorderColor(const QBrush &newChecked_normalIndicatorBorderColor) + { + if (m_checked_normalIndicatorBorderColor == newChecked_normalIndicatorBorderColor) + return; +@@ -354,7 +356,7 @@ void UKUIRadioButton::setChecked_NormalIndicatorBorderColor(const DTColor &newCh + emit checked_normalIndicatorBorderColorChanged(); + } + +-void UKUIRadioButton::setChecked_HoverIndicatorBorderColor(const DTColor &newChecked_hoverIndicatorBorderColor) ++void UKUIRadioButton::setChecked_HoverIndicatorBorderColor(const QBrush &newChecked_hoverIndicatorBorderColor) + { + if (m_checked_hoverIndicatorBorderColor == newChecked_hoverIndicatorBorderColor) + return; +@@ -362,7 +364,7 @@ void UKUIRadioButton::setChecked_HoverIndicatorBorderColor(const DTColor &newChe + emit checked_hoverIndicatorBorderColorChanged(); + } + +-void UKUIRadioButton::setChecked_ClickIndicatorBorderColor(const DTColor &newChecked_clickIndicatorBorderColor) ++void UKUIRadioButton::setChecked_ClickIndicatorBorderColor(const QBrush &newChecked_clickIndicatorBorderColor) + { + if (m_checked_clickIndicatorBorderColor == newChecked_clickIndicatorBorderColor) + return; +@@ -370,7 +372,7 @@ void UKUIRadioButton::setChecked_ClickIndicatorBorderColor(const DTColor &newChe + emit checked_clickIndicatorBorderColorChanged(); + } + +-void UKUIRadioButton::setChecked_DisableIndicatorBorderColor(const DTColor &newChecked_disableIndicatorBorderColor) ++void UKUIRadioButton::setChecked_DisableIndicatorBorderColor(const QBrush &newChecked_disableIndicatorBorderColor) + { + if (m_checked_disableIndicatorBorderColor == newChecked_disableIndicatorBorderColor) + return; +@@ -378,7 +380,7 @@ void UKUIRadioButton::setChecked_DisableIndicatorBorderColor(const DTColor &newC + emit checked_disableIndicatorBorderColorChanged(); + } + +-void UKUIRadioButton::setChecked_NormalChildrenColor(const DTColor &newChecked_normalChildrenColor) ++void UKUIRadioButton::setChecked_NormalChildrenColor(const QBrush &newChecked_normalChildrenColor) + { + if (m_checked_normalChildrenColor == newChecked_normalChildrenColor) + return; +@@ -386,7 +388,7 @@ void UKUIRadioButton::setChecked_NormalChildrenColor(const DTColor &newChecked_n + emit checked_normalChildrenColorChanged(); + } + +-void UKUIRadioButton::setChecked_HoverChildrenColor(const DTColor &newChecked_hoverChildrenColor) ++void UKUIRadioButton::setChecked_HoverChildrenColor(const QBrush &newChecked_hoverChildrenColor) + { + if (m_checked_hoverChildrenColor == newChecked_hoverChildrenColor) + return; +@@ -394,7 +396,7 @@ void UKUIRadioButton::setChecked_HoverChildrenColor(const DTColor &newChecked_ho + emit checked_hoverChildrenColorChanged(); + } + +-void UKUIRadioButton::setChecked_ClickChildrenColor(const DTColor &newChecked_clickChildrenColor) ++void UKUIRadioButton::setChecked_ClickChildrenColor(const QBrush &newChecked_clickChildrenColor) + { + if (m_checked_clickChildrenColor == newChecked_clickChildrenColor) + return; +@@ -402,7 +404,7 @@ void UKUIRadioButton::setChecked_ClickChildrenColor(const DTColor &newChecked_cl + emit checked_clickChildrenColorChanged(); + } + +-void UKUIRadioButton::setChecked_DisableChildrenColor(const DTColor &newChecked_disableChildrenColor) ++void UKUIRadioButton::setChecked_DisableChildrenColor(const QBrush &newChecked_disableChildrenColor) + { + if (m_checked_disableChildrenColor == newChecked_disableChildrenColor) + return; +@@ -410,7 +412,7 @@ void UKUIRadioButton::setChecked_DisableChildrenColor(const DTColor &newChecked_ + emit checked_disableChildrenColorChanged(); + } + +-void UKUIRadioButton::setChecked_NormalChildrenBorderColor(const DTColor &newChecked_normalChildrenBorderColor) ++void UKUIRadioButton::setChecked_NormalChildrenBorderColor(const QBrush &newChecked_normalChildrenBorderColor) + { + if (m_checked_normalChildrenBorderColor == newChecked_normalChildrenBorderColor) + return; +@@ -418,7 +420,7 @@ void UKUIRadioButton::setChecked_NormalChildrenBorderColor(const DTColor &newChe + emit checked_normalChildrenBorderColorChanged(); + } + +-void UKUIRadioButton::setChecked_HoverChildrenBorderColor(const DTColor &newChecked_hoverChildrenBorderColor) ++void UKUIRadioButton::setChecked_HoverChildrenBorderColor(const QBrush &newChecked_hoverChildrenBorderColor) + { + if (m_checked_hoverChildrenBorderColor == newChecked_hoverChildrenBorderColor) + return; +@@ -426,7 +428,7 @@ void UKUIRadioButton::setChecked_HoverChildrenBorderColor(const DTColor &newChec + emit checked_hoverChildrenBorderColorChanged(); + } + +-void UKUIRadioButton::setChecked_ClickChildrenBorderColor(const DTColor &newChecked_clickChildrenBorderColor) ++void UKUIRadioButton::setChecked_ClickChildrenBorderColor(const QBrush &newChecked_clickChildrenBorderColor) + { + if (m_checked_clickChildrenBorderColor == newChecked_clickChildrenBorderColor) + return; +@@ -434,7 +436,7 @@ void UKUIRadioButton::setChecked_ClickChildrenBorderColor(const DTColor &newChec + emit checked_clickChildrenBorderColorChanged(); + } + +-void UKUIRadioButton::setChecked_DisableChildrenBorderColor(const DTColor &newChecked_disableChildrenBorderColor) ++void UKUIRadioButton::setChecked_DisableChildrenBorderColor(const QBrush &newChecked_disableChildrenBorderColor) + { + if (m_checked_disableChildrenBorderColor == newChecked_disableChildrenBorderColor) + return; +diff --git a/ukui-qml-style-helper/styleparameter/ukuiradiobutton.h b/ukui-qml-style-helper/styleparameter/ukuiradiobutton.h +index 2f74cad..2b49da1 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuiradiobutton.h ++++ b/ukui-qml-style-helper/styleparameter/ukuiradiobutton.h +@@ -41,35 +41,35 @@ class UKUIRadioButton : public QQuickItem + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) + + +- Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) +- Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) +- +- Q_PROPERTY(DTColor normalIndicatorColor READ normalIndicatorColor WRITE setNormalIndicatorColor NOTIFY normalIndicatorColorChanged) +- Q_PROPERTY(DTColor hoverIndicatorColor READ hoverIndicatorColor WRITE setHoverIndicatorColor NOTIFY hoverIndicatorColorChanged) +- Q_PROPERTY(DTColor clickIndicatorColor READ clickIndicatorColor WRITE setClickIndicatorColor NOTIFY clickIndicatorColorChanged) +- Q_PROPERTY(DTColor disableIndicatorColor READ disableIndicatorColor WRITE setDisableIndicatorColor NOTIFY disableIndicatorColorChanged) +- Q_PROPERTY(DTColor normalIndicatorBorderColor READ normalIndicatorBorderColor WRITE setNormalIndicatorBorderColor NOTIFY normalIndicatorBorderColorChanged) +- Q_PROPERTY(DTColor hoverIndicatorBorderColor READ hoverIndicatorBorderColor WRITE setHoverIndicatorBorderColor NOTIFY hoverIndicatorBorderColorChanged) +- Q_PROPERTY(DTColor clickIndicatorBorderColor READ clickIndicatorBorderColor WRITE setClickIndicatorBorderColor NOTIFY clickIndicatorBorderColorChanged) +- Q_PROPERTY(DTColor disableIndicatorBorderColor READ disableIndicatorBorderColor WRITE setDisableIndicatorBorderColor NOTIFY disableIndicatorBorderColorChanged) +- +- Q_PROPERTY(DTColor checked_normalIndicatorColor READ checked_normalIndicatorColor WRITE setChecked_NormalIndicatorColor NOTIFY checked_normalIndicatorColorChanged) +- Q_PROPERTY(DTColor checked_hoverIndicatorColor READ checked_hoverIndicatorColor WRITE setChecked_HoverIndicatorColor NOTIFY checked_hoverIndicatorColorChanged) +- Q_PROPERTY(DTColor checked_clickIndicatorColor READ checked_clickIndicatorColor WRITE setChecked_ClickIndicatorColor NOTIFY checked_clickIndicatorColorChanged) +- Q_PROPERTY(DTColor checked_disableIndicatorColor READ checked_disableIndicatorColor WRITE setChecked_DisableIndicatorColor NOTIFY checked_disableIndicatorColorChanged) +- Q_PROPERTY(DTColor checked_normalIndicatorBorderColor READ checked_normalIndicatorBorderColor WRITE setChecked_NormalIndicatorBorderColor NOTIFY checked_normalIndicatorBorderColorChanged) +- Q_PROPERTY(DTColor checked_hoverIndicatorBorderColor READ checked_hoverIndicatorBorderColor WRITE setChecked_HoverIndicatorBorderColor NOTIFY checked_hoverIndicatorBorderColorChanged) +- Q_PROPERTY(DTColor checked_clickIndicatorBorderColor READ checked_clickIndicatorBorderColor WRITE setChecked_ClickIndicatorBorderColor NOTIFY checked_clickIndicatorBorderColorChanged) +- Q_PROPERTY(DTColor checked_disableIndicatorBorderColor READ checked_disableIndicatorBorderColor WRITE setChecked_DisableIndicatorBorderColor NOTIFY checked_disableIndicatorBorderColorChanged) +- +- Q_PROPERTY(DTColor checked_normalChildrenColor READ checked_normalChildrenColor WRITE setChecked_NormalChildrenColor NOTIFY checked_normalChildrenColorChanged) +- Q_PROPERTY(DTColor checked_hoverChildrenColor READ checked_hoverChildrenColor WRITE setChecked_HoverChildrenColor NOTIFY checked_hoverChildrenColorChanged) +- Q_PROPERTY(DTColor checked_clickChildrenColor READ checked_clickChildrenColor WRITE setChecked_ClickChildrenColor NOTIFY checked_clickChildrenColorChanged) +- Q_PROPERTY(DTColor checked_disableChildrenColor READ checked_disableChildrenColor WRITE setChecked_DisableChildrenColor NOTIFY checked_disableChildrenColorChanged) +- Q_PROPERTY(DTColor checked_normalChildrenBorderColor READ checked_normalChildrenBorderColor WRITE setChecked_NormalChildrenBorderColor NOTIFY checked_normalChildrenBorderColorChanged) +- Q_PROPERTY(DTColor checked_hoverChildrenBorderColor READ checked_hoverChildrenBorderColor WRITE setChecked_HoverChildrenBorderColor NOTIFY checked_hoverChildrenBorderColorChanged) +- Q_PROPERTY(DTColor checked_clickChildrenBorderColor READ checked_clickChildrenBorderColor WRITE setChecked_ClickChildrenBorderColor NOTIFY checked_clickChildrenBorderColorChanged) +- Q_PROPERTY(DTColor checked_disableChildrenBorderColor READ checked_disableChildrenBorderColor WRITE setChecked_DisableChildrenBorderColor NOTIFY checked_disableChildrenBorderColorChanged) ++ Q_PROPERTY(QBrush disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) ++ Q_PROPERTY(QBrush normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) ++ ++ Q_PROPERTY(QBrush normalIndicatorColor READ normalIndicatorColor WRITE setNormalIndicatorColor NOTIFY normalIndicatorColorChanged) ++ Q_PROPERTY(QBrush hoverIndicatorColor READ hoverIndicatorColor WRITE setHoverIndicatorColor NOTIFY hoverIndicatorColorChanged) ++ Q_PROPERTY(QBrush clickIndicatorColor READ clickIndicatorColor WRITE setClickIndicatorColor NOTIFY clickIndicatorColorChanged) ++ Q_PROPERTY(QBrush disableIndicatorColor READ disableIndicatorColor WRITE setDisableIndicatorColor NOTIFY disableIndicatorColorChanged) ++ Q_PROPERTY(QBrush normalIndicatorBorderColor READ normalIndicatorBorderColor WRITE setNormalIndicatorBorderColor NOTIFY normalIndicatorBorderColorChanged) ++ Q_PROPERTY(QBrush hoverIndicatorBorderColor READ hoverIndicatorBorderColor WRITE setHoverIndicatorBorderColor NOTIFY hoverIndicatorBorderColorChanged) ++ Q_PROPERTY(QBrush clickIndicatorBorderColor READ clickIndicatorBorderColor WRITE setClickIndicatorBorderColor NOTIFY clickIndicatorBorderColorChanged) ++ Q_PROPERTY(QBrush disableIndicatorBorderColor READ disableIndicatorBorderColor WRITE setDisableIndicatorBorderColor NOTIFY disableIndicatorBorderColorChanged) ++ ++ Q_PROPERTY(QBrush checked_normalIndicatorColor READ checked_normalIndicatorColor WRITE setChecked_NormalIndicatorColor NOTIFY checked_normalIndicatorColorChanged) ++ Q_PROPERTY(QBrush checked_hoverIndicatorColor READ checked_hoverIndicatorColor WRITE setChecked_HoverIndicatorColor NOTIFY checked_hoverIndicatorColorChanged) ++ Q_PROPERTY(QBrush checked_clickIndicatorColor READ checked_clickIndicatorColor WRITE setChecked_ClickIndicatorColor NOTIFY checked_clickIndicatorColorChanged) ++ Q_PROPERTY(QBrush checked_disableIndicatorColor READ checked_disableIndicatorColor WRITE setChecked_DisableIndicatorColor NOTIFY checked_disableIndicatorColorChanged) ++ Q_PROPERTY(QBrush checked_normalIndicatorBorderColor READ checked_normalIndicatorBorderColor WRITE setChecked_NormalIndicatorBorderColor NOTIFY checked_normalIndicatorBorderColorChanged) ++ Q_PROPERTY(QBrush checked_hoverIndicatorBorderColor READ checked_hoverIndicatorBorderColor WRITE setChecked_HoverIndicatorBorderColor NOTIFY checked_hoverIndicatorBorderColorChanged) ++ Q_PROPERTY(QBrush checked_clickIndicatorBorderColor READ checked_clickIndicatorBorderColor WRITE setChecked_ClickIndicatorBorderColor NOTIFY checked_clickIndicatorBorderColorChanged) ++ Q_PROPERTY(QBrush checked_disableIndicatorBorderColor READ checked_disableIndicatorBorderColor WRITE setChecked_DisableIndicatorBorderColor NOTIFY checked_disableIndicatorBorderColorChanged) ++ ++ Q_PROPERTY(QBrush checked_normalChildrenColor READ checked_normalChildrenColor WRITE setChecked_NormalChildrenColor NOTIFY checked_normalChildrenColorChanged) ++ Q_PROPERTY(QBrush checked_hoverChildrenColor READ checked_hoverChildrenColor WRITE setChecked_HoverChildrenColor NOTIFY checked_hoverChildrenColorChanged) ++ Q_PROPERTY(QBrush checked_clickChildrenColor READ checked_clickChildrenColor WRITE setChecked_ClickChildrenColor NOTIFY checked_clickChildrenColorChanged) ++ Q_PROPERTY(QBrush checked_disableChildrenColor READ checked_disableChildrenColor WRITE setChecked_DisableChildrenColor NOTIFY checked_disableChildrenColorChanged) ++ Q_PROPERTY(QBrush checked_normalChildrenBorderColor READ checked_normalChildrenBorderColor WRITE setChecked_NormalChildrenBorderColor NOTIFY checked_normalChildrenBorderColorChanged) ++ Q_PROPERTY(QBrush checked_hoverChildrenBorderColor READ checked_hoverChildrenBorderColor WRITE setChecked_HoverChildrenBorderColor NOTIFY checked_hoverChildrenBorderColorChanged) ++ Q_PROPERTY(QBrush checked_clickChildrenBorderColor READ checked_clickChildrenBorderColor WRITE setChecked_ClickChildrenBorderColor NOTIFY checked_clickChildrenBorderColorChanged) ++ Q_PROPERTY(QBrush checked_disableChildrenBorderColor READ checked_disableChildrenBorderColor WRITE setChecked_DisableChildrenBorderColor NOTIFY checked_disableChildrenBorderColorChanged) + + Q_PROPERTY(int indicatorWidth READ indicatorWidth WRITE setIndicatorWidth NOTIFY indicatorWidthChanged) + Q_PROPERTY(int childrenWidth READ childrenWidth WRITE setChildrenWidth NOTIFY childrenWidthChanged) +@@ -91,83 +91,83 @@ public: + double space() const; + void setSpace(double newSpace); + +- const DTColor &disableTextColor() const; +- void setDisableTextColor(const DTColor &newDisableTextColor); ++ const QBrush &disableTextColor() const; ++ void setDisableTextColor(const QBrush &newDisableTextColor); + +- const DTColor &normalTextColor() const; +- void setNormalTextColor(const DTColor &newNormalTextColor); ++ const QBrush &normalTextColor() const; ++ void setNormalTextColor(const QBrush &newNormalTextColor); + +- const DTColor &normalIndicatorColor() const; +- void setNormalIndicatorColor(const DTColor &newNormalIndicatorColor); ++ const QBrush &normalIndicatorColor() const; ++ void setNormalIndicatorColor(const QBrush &newNormalIndicatorColor); + +- const DTColor &hoverIndicatorColor() const; +- void setHoverIndicatorColor(const DTColor &newHoverIndicatorColor); ++ const QBrush &hoverIndicatorColor() const; ++ void setHoverIndicatorColor(const QBrush &newHoverIndicatorColor); + +- const DTColor &clickIndicatorColor() const; +- void setClickIndicatorColor(const DTColor &newClickIndicatorColor); ++ const QBrush &clickIndicatorColor() const; ++ void setClickIndicatorColor(const QBrush &newClickIndicatorColor); + +- const DTColor &disableIndicatorColor() const; +- void setDisableIndicatorColor(const DTColor &newDisableIndicatorColor); ++ const QBrush &disableIndicatorColor() const; ++ void setDisableIndicatorColor(const QBrush &newDisableIndicatorColor); + +- const DTColor &normalIndicatorBorderColor() const; +- void setNormalIndicatorBorderColor(const DTColor &newNormalIndicatorBorderColor); ++ const QBrush &normalIndicatorBorderColor() const; ++ void setNormalIndicatorBorderColor(const QBrush &newNormalIndicatorBorderColor); + +- const DTColor &hoverIndicatorBorderColor() const; +- void setHoverIndicatorBorderColor(const DTColor &newHoverIndicatorBorderColor); ++ const QBrush &hoverIndicatorBorderColor() const; ++ void setHoverIndicatorBorderColor(const QBrush &newHoverIndicatorBorderColor); + +- const DTColor &clickIndicatorBorderColor() const; +- void setClickIndicatorBorderColor(const DTColor &newClickIndicatorBorderColor); ++ const QBrush &clickIndicatorBorderColor() const; ++ void setClickIndicatorBorderColor(const QBrush &newClickIndicatorBorderColor); + +- const DTColor &disableIndicatorBorderColor() const; +- void setDisableIndicatorBorderColor(const DTColor &newDisableIndicatorBorderColor); ++ const QBrush &disableIndicatorBorderColor() const; ++ void setDisableIndicatorBorderColor(const QBrush &newDisableIndicatorBorderColor); + +- const DTColor &checked_normalIndicatorColor() const; +- void setChecked_NormalIndicatorColor(const DTColor &newChecked_normalIndicatorColor); ++ const QBrush &checked_normalIndicatorColor() const; ++ void setChecked_NormalIndicatorColor(const QBrush &newChecked_normalIndicatorColor); + +- const DTColor &checked_hoverIndicatorColor() const; +- void setChecked_HoverIndicatorColor(const DTColor &newChecked_hoverIndicatorColor); ++ const QBrush &checked_hoverIndicatorColor() const; ++ void setChecked_HoverIndicatorColor(const QBrush &newChecked_hoverIndicatorColor); + +- const DTColor &checked_clickIndicatorColor() const; +- void setChecked_ClickIndicatorColor(const DTColor &newChecked_clickIndicatorColor); ++ const QBrush &checked_clickIndicatorColor() const; ++ void setChecked_ClickIndicatorColor(const QBrush &newChecked_clickIndicatorColor); + +- const DTColor &checked_disableIndicatorColor() const; +- void setChecked_DisableIndicatorColor(const DTColor &newChecked_disableIndicatorColor); ++ const QBrush &checked_disableIndicatorColor() const; ++ void setChecked_DisableIndicatorColor(const QBrush &newChecked_disableIndicatorColor); + +- const DTColor &checked_normalIndicatorBorderColor() const; +- void setChecked_NormalIndicatorBorderColor(const DTColor &newChecked_normalIndicatorBorderColor); ++ const QBrush &checked_normalIndicatorBorderColor() const; ++ void setChecked_NormalIndicatorBorderColor(const QBrush &newChecked_normalIndicatorBorderColor); + +- const DTColor &checked_hoverIndicatorBorderColor() const; +- void setChecked_HoverIndicatorBorderColor(const DTColor &newChecked_hoverIndicatorBorderColor); ++ const QBrush &checked_hoverIndicatorBorderColor() const; ++ void setChecked_HoverIndicatorBorderColor(const QBrush &newChecked_hoverIndicatorBorderColor); + +- const DTColor &checked_clickIndicatorBorderColor() const; +- void setChecked_ClickIndicatorBorderColor(const DTColor &newChecked_clickIndicatorBorderColor); ++ const QBrush &checked_clickIndicatorBorderColor() const; ++ void setChecked_ClickIndicatorBorderColor(const QBrush &newChecked_clickIndicatorBorderColor); + +- const DTColor &checked_disableIndicatorBorderColor() const; +- void setChecked_DisableIndicatorBorderColor(const DTColor &newChecked_disableIndicatorBorderColor); ++ const QBrush &checked_disableIndicatorBorderColor() const; ++ void setChecked_DisableIndicatorBorderColor(const QBrush &newChecked_disableIndicatorBorderColor); + +- const DTColor &checked_normalChildrenColor() const; +- void setChecked_NormalChildrenColor(const DTColor &newChecked_normalChildrenColor); ++ const QBrush &checked_normalChildrenColor() const; ++ void setChecked_NormalChildrenColor(const QBrush &newChecked_normalChildrenColor); + +- const DTColor &checked_hoverChildrenColor() const; +- void setChecked_HoverChildrenColor(const DTColor &newChecked_hoverChildrenColor); ++ const QBrush &checked_hoverChildrenColor() const; ++ void setChecked_HoverChildrenColor(const QBrush &newChecked_hoverChildrenColor); + +- const DTColor &checked_clickChildrenColor() const; +- void setChecked_ClickChildrenColor(const DTColor &newChecked_clickChildrenColor); ++ const QBrush &checked_clickChildrenColor() const; ++ void setChecked_ClickChildrenColor(const QBrush &newChecked_clickChildrenColor); + +- const DTColor &checked_disableChildrenColor() const; +- void setChecked_DisableChildrenColor(const DTColor &newChecked_disableChildrenColor); ++ const QBrush &checked_disableChildrenColor() const; ++ void setChecked_DisableChildrenColor(const QBrush &newChecked_disableChildrenColor); + +- const DTColor &checked_normalChildrenBorderColor() const; +- void setChecked_NormalChildrenBorderColor(const DTColor &newChecked_normalChildrenBorderColor); ++ const QBrush &checked_normalChildrenBorderColor() const; ++ void setChecked_NormalChildrenBorderColor(const QBrush &newChecked_normalChildrenBorderColor); + +- const DTColor &checked_hoverChildrenBorderColor() const; +- void setChecked_HoverChildrenBorderColor(const DTColor &newChecked_hoverChildrenBorderColor); ++ const QBrush &checked_hoverChildrenBorderColor() const; ++ void setChecked_HoverChildrenBorderColor(const QBrush &newChecked_hoverChildrenBorderColor); + +- const DTColor &checked_clickChildrenBorderColor() const; +- void setChecked_ClickChildrenBorderColor(const DTColor &newChecked_clickChildrenBorderColor); ++ const QBrush &checked_clickChildrenBorderColor() const; ++ void setChecked_ClickChildrenBorderColor(const QBrush &newChecked_clickChildrenBorderColor); + +- const DTColor &checked_disableChildrenBorderColor() const; +- void setChecked_DisableChildrenBorderColor(const DTColor &newChecked_disableChildrenBorderColor); ++ const QBrush &checked_disableChildrenBorderColor() const; ++ void setChecked_DisableChildrenBorderColor(const QBrush &newChecked_disableChildrenBorderColor); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); +@@ -244,36 +244,38 @@ signals: + + void childrenWidthChanged(); + ++ void parametryChanged(); ++ + private: + double m_leftRightMargin; + double m_upDownMargin; + double m_space; +- Q_INVOKABLE DTColor m_disableTextColor; +- Q_INVOKABLE DTColor m_normalTextColor; +- Q_INVOKABLE DTColor m_normalIndicatorColor; +- Q_INVOKABLE DTColor m_hoverIndicatorColor; +- Q_INVOKABLE DTColor m_clickIndicatorColor; +- Q_INVOKABLE DTColor m_disableIndicatorColor; +- Q_INVOKABLE DTColor m_normalIndicatorBorderColor; +- Q_INVOKABLE DTColor m_hoverIndicatorBorderColor; +- Q_INVOKABLE DTColor m_clickIndicatorBorderColor; +- Q_INVOKABLE DTColor m_disableIndicatorBorderColor; +- Q_INVOKABLE DTColor m_checked_normalIndicatorColor; +- Q_INVOKABLE DTColor m_checked_hoverIndicatorColor; +- Q_INVOKABLE DTColor m_checked_clickIndicatorColor; +- Q_INVOKABLE DTColor m_checked_disableIndicatorColor; +- Q_INVOKABLE DTColor m_checked_normalIndicatorBorderColor; +- Q_INVOKABLE DTColor m_checked_hoverIndicatorBorderColor; +- Q_INVOKABLE DTColor m_checked_clickIndicatorBorderColor; +- Q_INVOKABLE DTColor m_checked_disableIndicatorBorderColor; +- Q_INVOKABLE DTColor m_checked_normalChildrenColor; +- Q_INVOKABLE DTColor m_checked_hoverChildrenColor; +- Q_INVOKABLE DTColor m_checked_clickChildrenColor; +- Q_INVOKABLE DTColor m_checked_disableChildrenColor; +- Q_INVOKABLE DTColor m_checked_normalChildrenBorderColor; +- Q_INVOKABLE DTColor m_checked_hoverChildrenBorderColor; +- Q_INVOKABLE DTColor m_checked_clickChildrenBorderColor; +- Q_INVOKABLE DTColor m_checked_disableChildrenBorderColor; ++ Q_INVOKABLE QBrush m_disableTextColor; ++ Q_INVOKABLE QBrush m_normalTextColor; ++ Q_INVOKABLE QBrush m_normalIndicatorColor; ++ Q_INVOKABLE QBrush m_hoverIndicatorColor; ++ Q_INVOKABLE QBrush m_clickIndicatorColor; ++ Q_INVOKABLE QBrush m_disableIndicatorColor; ++ Q_INVOKABLE QBrush m_normalIndicatorBorderColor; ++ Q_INVOKABLE QBrush m_hoverIndicatorBorderColor; ++ Q_INVOKABLE QBrush m_clickIndicatorBorderColor; ++ Q_INVOKABLE QBrush m_disableIndicatorBorderColor; ++ Q_INVOKABLE QBrush m_checked_normalIndicatorColor; ++ Q_INVOKABLE QBrush m_checked_hoverIndicatorColor; ++ Q_INVOKABLE QBrush m_checked_clickIndicatorColor; ++ Q_INVOKABLE QBrush m_checked_disableIndicatorColor; ++ Q_INVOKABLE QBrush m_checked_normalIndicatorBorderColor; ++ Q_INVOKABLE QBrush m_checked_hoverIndicatorBorderColor; ++ Q_INVOKABLE QBrush m_checked_clickIndicatorBorderColor; ++ Q_INVOKABLE QBrush m_checked_disableIndicatorBorderColor; ++ Q_INVOKABLE QBrush m_checked_normalChildrenColor; ++ Q_INVOKABLE QBrush m_checked_hoverChildrenColor; ++ Q_INVOKABLE QBrush m_checked_clickChildrenColor; ++ Q_INVOKABLE QBrush m_checked_disableChildrenColor; ++ Q_INVOKABLE QBrush m_checked_normalChildrenBorderColor; ++ Q_INVOKABLE QBrush m_checked_hoverChildrenBorderColor; ++ Q_INVOKABLE QBrush m_checked_clickChildrenBorderColor; ++ Q_INVOKABLE QBrush m_checked_disableChildrenBorderColor; + int m_borderWidth; + int m_indicatorWidth; + int m_childrenWidth; +diff --git a/ukui-qml-style-helper/styleparameter/ukuiscrollbar.cpp b/ukui-qml-style-helper/styleparameter/ukuiscrollbar.cpp +index eec07e1..9a35453 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuiscrollbar.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuiscrollbar.cpp +@@ -27,6 +27,9 @@ void UKUIScrollBar::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + setHoverColor(instance->kComponentHover()); + setClickColor(instance->kComponentClick()); + setDisableColor(instance->kGray3()); ++ ++ emit parametryChanged(); ++ + } + + UKUIScrollBar* UKUIScrollBar::qmlAttachedProperties(QObject* parent) +@@ -35,12 +38,12 @@ UKUIScrollBar* UKUIScrollBar::qmlAttachedProperties(QObject* parent) + return new UKUIScrollBar(p); + } + +-const DTColor &UKUIScrollBar::normalColor() const ++const QBrush &UKUIScrollBar::normalColor() const + { + return m_normalColor; + } + +-void UKUIScrollBar::setNormalColor(const DTColor &newNormalColor) ++void UKUIScrollBar::setNormalColor(const QBrush &newNormalColor) + { + if (m_normalColor == newNormalColor) + return; +@@ -62,12 +65,12 @@ void UKUIScrollBar::setPadding(int newPadding) + emit paddingChanged(); + } + +-const DTColor &UKUIScrollBar::hoverColor() const ++const QBrush &UKUIScrollBar::hoverColor() const + { + return m_hoverColor; + } + +-void UKUIScrollBar::setHoverColor(const DTColor &newHoverColor) ++void UKUIScrollBar::setHoverColor(const QBrush &newHoverColor) + { + if (m_hoverColor == newHoverColor) + return; +@@ -75,12 +78,12 @@ void UKUIScrollBar::setHoverColor(const DTColor &newHoverColor) + emit hoverColorChanged(); + } + +-const DTColor &UKUIScrollBar::clickColor() const ++const QBrush &UKUIScrollBar::clickColor() const + { + return m_clickColor; + } + +-void UKUIScrollBar::setClickColor(const DTColor &newClickColor) ++void UKUIScrollBar::setClickColor(const QBrush &newClickColor) + { + if (m_clickColor == newClickColor) + return; +@@ -88,12 +91,12 @@ void UKUIScrollBar::setClickColor(const DTColor &newClickColor) + emit clickColorChanged(); + } + +-const DTColor &UKUIScrollBar::disableColor() const ++const QBrush &UKUIScrollBar::disableColor() const + { + return m_disableColor; + } + +-void UKUIScrollBar::setDisableColor(const DTColor &newDisableColor) ++void UKUIScrollBar::setDisableColor(const QBrush &newDisableColor) + { + if (m_disableColor == newDisableColor) + return; +diff --git a/ukui-qml-style-helper/styleparameter/ukuiscrollbar.h b/ukui-qml-style-helper/styleparameter/ukuiscrollbar.h +index 2c60852..5ac6a12 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuiscrollbar.h ++++ b/ukui-qml-style-helper/styleparameter/ukuiscrollbar.h +@@ -38,10 +38,10 @@ class UKUIScrollBar : public QQuickItem + { + Q_OBJECT + +- Q_PROPERTY(DTColor normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) +- Q_PROPERTY(DTColor hoverColor READ hoverColor WRITE setHoverColor NOTIFY hoverColorChanged) +- Q_PROPERTY(DTColor clickColor READ clickColor WRITE setClickColor NOTIFY clickColorChanged) +- Q_PROPERTY(DTColor disableColor READ disableColor WRITE setDisableColor NOTIFY disableColorChanged) ++ Q_PROPERTY(QBrush normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) ++ Q_PROPERTY(QBrush hoverColor READ hoverColor WRITE setHoverColor NOTIFY hoverColorChanged) ++ Q_PROPERTY(QBrush clickColor READ clickColor WRITE setClickColor NOTIFY clickColorChanged) ++ Q_PROPERTY(QBrush disableColor READ disableColor WRITE setDisableColor NOTIFY disableColorChanged) + + Q_PROPERTY(int padding READ padding WRITE setPadding NOTIFY paddingChanged) + +@@ -53,20 +53,20 @@ public: + + static UKUIScrollBar* qmlAttachedProperties(QObject* parent); + +- const DTColor &normalColor() const; +- void setNormalColor(const DTColor &newNormalColor); ++ const QBrush &normalColor() const; ++ void setNormalColor(const QBrush &newNormalColor); + + int padding() const; + void setPadding(int newPadding); + +- const DTColor &hoverColor() const; +- void setHoverColor(const DTColor &newHoverColor); ++ const QBrush &hoverColor() const; ++ void setHoverColor(const QBrush &newHoverColor); + +- const DTColor &clickColor() const; +- void setClickColor(const DTColor &newClickColor); ++ const QBrush &clickColor() const; ++ void setClickColor(const QBrush &newClickColor); + +- const DTColor &disableColor() const; +- void setDisableColor(const DTColor &newDisableColor); ++ const QBrush &disableColor() const; ++ void setDisableColor(const QBrush &newDisableColor); + + signals: + void normalColorChanged(); +@@ -79,13 +79,15 @@ signals: + + void disableColorChanged(); + ++ void parametryChanged(); ++ + private: +- Q_INVOKABLE DTColor m_normalColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.85)); ++ Q_INVOKABLE QBrush m_normalColor = QBrush(QColor::fromRgbF(0, 0, 0, 0.85)); + + int m_padding = 2; +- Q_INVOKABLE DTColor m_hoverColor; +- Q_INVOKABLE DTColor m_clickColor; +- Q_INVOKABLE DTColor m_disableColor; ++ Q_INVOKABLE QBrush m_hoverColor; ++ Q_INVOKABLE QBrush m_clickColor; ++ Q_INVOKABLE QBrush m_disableColor; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +diff --git a/ukui-qml-style-helper/styleparameter/ukuislider.cpp b/ukui-qml-style-helper/styleparameter/ukuislider.cpp +index 8909ae4..34753ab 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuislider.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuislider.cpp +@@ -33,13 +33,8 @@ void UKUISlider::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + setGrooveHeight(4); + setHandleHeight(20); + setFocusBorderWidth(instance->focusline()); +- qDebug() << "newFocusBorderColor11111....." << m_focusBorderColor.mixStartColor().red() << +- m_focusBorderColor.mixStartColor().green() <<m_focusBorderColor.mixStartColor().blue(); + + setFocusBorderColor(instance->kBrandFocus()); +- qDebug() << "newFocusBorderColor22222....." << instance->kBrandFocus().mixStartColor().red() << +- instance->kBrandFocus().mixStartColor().green() <<instance->kBrandFocus().mixStartColor().blue(); +- + + setNormalGrooveColor(instance->kBrandClick()); + setDisableGrooveColor(instance->kGray12()); +@@ -50,10 +45,9 @@ void UKUISlider::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + setNormalUnGrooveColor(instance->buttonActive()); + setDisableUnGrooveColor(instance->buttonDisable()); + setNormalUnGrooveBorderColor(instance->kLineComponentNormal()); +- setDisableUnGrooveColor(instance->kLineComponentDisable()); ++ setDisableUnGrooveBorderColor(instance->kLineComponentDisable()); + + +- qDebug() << "handlehover....." << instance->kBrandHover().mixStartColor().red() << instance->kBrandHover().mixStartColor().green() << instance->kBrandHover().mixStartColor().blue(); + setNormalHandleColor(instance->highLightActive()); + setHoverHandleColor(instance->kBrandHover()); + setClickHandleColor(instance->kBrandClick()); +@@ -63,6 +57,10 @@ void UKUISlider::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + setClickHandleBorderColor(instance->kLineBrandNormal()); + setDisableHandleBorderColor(instance->kLineBrandDisable()); + setHandleBorderWidth(1); ++ setPadding(0); ++ ++ emit parametryChanged(); ++ + } + + UKUISlider* UKUISlider::qmlAttachedProperties(QObject *parent) +@@ -137,16 +135,13 @@ void UKUISlider::setFocusBorderWidth(int newFocusBorderWidth) + emit focusBorderWidthChanged(); + } + +-const DTColor &UKUISlider::focusBorderColor() const ++const QBrush &UKUISlider::focusBorderColor() const + { + return m_focusBorderColor; + } + +-void UKUISlider::setFocusBorderColor(const DTColor &newFocusBorderColor) ++void UKUISlider::setFocusBorderColor(const QBrush &newFocusBorderColor) + { +- qDebug() << "newFocusBorderColor00000....." << m_focusBorderColor.mixStartColor().red() << +- m_focusBorderColor.mixStartColor().green() <<m_focusBorderColor.mixStartColor().blue(); +- + if (m_focusBorderColor == newFocusBorderColor) + return; + m_focusBorderColor = newFocusBorderColor; +@@ -154,12 +149,12 @@ void UKUISlider::setFocusBorderColor(const DTColor &newFocusBorderColor) + + } + +-const DTColor &UKUISlider::normalGrooveColor() const ++const QBrush &UKUISlider::normalGrooveColor() const + { + return m_normalGrooveColor; + } + +-void UKUISlider::setNormalGrooveColor(const DTColor &newNormalGrooveColor) ++void UKUISlider::setNormalGrooveColor(const QBrush &newNormalGrooveColor) + { + if (m_normalGrooveColor == newNormalGrooveColor) + return; +@@ -167,12 +162,12 @@ void UKUISlider::setNormalGrooveColor(const DTColor &newNormalGrooveColor) + emit normalGrooveColorChanged(); + } + +-const DTColor &UKUISlider::disableGrooveColor() const ++const QBrush &UKUISlider::disableGrooveColor() const + { + return m_disableGrooveColor; + } + +-void UKUISlider::setDisableGrooveColor(const DTColor &newDisableGrooveColor) ++void UKUISlider::setDisableGrooveColor(const QBrush &newDisableGrooveColor) + { + if (m_disableGrooveColor == newDisableGrooveColor) + return; +@@ -180,12 +175,12 @@ void UKUISlider::setDisableGrooveColor(const DTColor &newDisableGrooveColor) + emit disableGrooveColorChanged(); + } + +-const DTColor &UKUISlider::normalHandleColor() const ++const QBrush &UKUISlider::normalHandleColor() const + { + return m_normalHandleColor; + } + +-void UKUISlider::setNormalHandleColor(const DTColor &newNormalHandleColor) ++void UKUISlider::setNormalHandleColor(const QBrush &newNormalHandleColor) + { + if (m_normalHandleColor == newNormalHandleColor) + return; +@@ -193,12 +188,12 @@ void UKUISlider::setNormalHandleColor(const DTColor &newNormalHandleColor) + emit normalHandleColorChanged(); + } + +-const DTColor &UKUISlider::disableHandleColor() const ++const QBrush &UKUISlider::disableHandleColor() const + { + return m_disableHandleColor; + } + +-void UKUISlider::setDisableHandleColor(const DTColor &newDisableHandleColor) ++void UKUISlider::setDisableHandleColor(const QBrush &newDisableHandleColor) + { + if (m_disableHandleColor == newDisableHandleColor) + return; +@@ -206,12 +201,12 @@ void UKUISlider::setDisableHandleColor(const DTColor &newDisableHandleColor) + emit DisableHandleColorChanged(); + } + +-const DTColor &UKUISlider::normalGrooveBorderColor() const ++const QBrush &UKUISlider::normalGrooveBorderColor() const + { + return m_normalGrooveBorderColor; + } + +-void UKUISlider::setNormalGrooveBorderColor(const DTColor &newNormalGrooveBorderColor) ++void UKUISlider::setNormalGrooveBorderColor(const QBrush &newNormalGrooveBorderColor) + { + if (m_normalGrooveBorderColor == newNormalGrooveBorderColor) + return; +@@ -219,12 +214,12 @@ void UKUISlider::setNormalGrooveBorderColor(const DTColor &newNormalGrooveBorder + emit normalGrooveBorderColorChanged(); + } + +-const DTColor &UKUISlider::disableGrooveBorderColor() const ++const QBrush &UKUISlider::disableGrooveBorderColor() const + { + return m_disableGrooveBorderColor; + } + +-void UKUISlider::setDisableGrooveBorderColor(const DTColor &newDisableGrooveBorderColor) ++void UKUISlider::setDisableGrooveBorderColor(const QBrush &newDisableGrooveBorderColor) + { + if (m_disableGrooveBorderColor == newDisableGrooveBorderColor) + return; +@@ -245,12 +240,12 @@ void UKUISlider::setGrooveBorderWidth(int newGrooveBorderWidth) + emit grooveBorderWidthChanged(); + } + +-const DTColor &UKUISlider::normalHandleBorderColor() const ++const QBrush &UKUISlider::normalHandleBorderColor() const + { + return m_normalHandleBorderColor; + } + +-void UKUISlider::setNormalHandleBorderColor(const DTColor &newNormalHandleBorderColor) ++void UKUISlider::setNormalHandleBorderColor(const QBrush &newNormalHandleBorderColor) + { + if (m_normalHandleBorderColor == newNormalHandleBorderColor) + return; +@@ -258,12 +253,12 @@ void UKUISlider::setNormalHandleBorderColor(const DTColor &newNormalHandleBorder + emit normalHandleBorderColorChanged(); + } + +-const DTColor &UKUISlider::disableHandleBorderColor() const ++const QBrush &UKUISlider::disableHandleBorderColor() const + { + return m_disableHandleBorderColor; + } + +-void UKUISlider::setDisableHandleBorderColor(const DTColor &newDisableHandleBorderColor) ++void UKUISlider::setDisableHandleBorderColor(const QBrush &newDisableHandleBorderColor) + { + if (m_disableHandleBorderColor == newDisableHandleBorderColor) + return; +@@ -284,12 +279,12 @@ void UKUISlider::setHandleBorderWidth(int newHandleBorderWidth) + emit handleBorderWidthChanged(); + } + +-const DTColor &UKUISlider::normalUnGrooveColor() const ++const QBrush &UKUISlider::normalUnGrooveColor() const + { + return m_normalUnGrooveColor; + } + +-void UKUISlider::setNormalUnGrooveColor(const DTColor &newNormalUnGrooveColor) ++void UKUISlider::setNormalUnGrooveColor(const QBrush &newNormalUnGrooveColor) + { + if (m_normalUnGrooveColor == newNormalUnGrooveColor) + return; +@@ -297,12 +292,12 @@ void UKUISlider::setNormalUnGrooveColor(const DTColor &newNormalUnGrooveColor) + emit normalUnGrooveColorChanged(); + } + +-const DTColor &UKUISlider::disableUnGrooveColor() const ++const QBrush &UKUISlider::disableUnGrooveColor() const + { + return m_disableUnGrooveColor; + } + +-void UKUISlider::setDisableUnGrooveColor(const DTColor &newDisableUnGrooveColor) ++void UKUISlider::setDisableUnGrooveColor(const QBrush &newDisableUnGrooveColor) + { + if (m_disableUnGrooveColor == newDisableUnGrooveColor) + return; +@@ -310,12 +305,12 @@ void UKUISlider::setDisableUnGrooveColor(const DTColor &newDisableUnGrooveColor) + emit disableUnGrooveColorChanged(); + } + +-const DTColor &UKUISlider::normalUnGrooveBorderColor() const ++const QBrush &UKUISlider::normalUnGrooveBorderColor() const + { + return m_normalUnGrooveBorderColor; + } + +-void UKUISlider::setNormalUnGrooveBorderColor(const DTColor &newNormalUnGrooveBorderColor) ++void UKUISlider::setNormalUnGrooveBorderColor(const QBrush &newNormalUnGrooveBorderColor) + { + if (m_normalUnGrooveBorderColor == newNormalUnGrooveBorderColor) + return; +@@ -323,12 +318,12 @@ void UKUISlider::setNormalUnGrooveBorderColor(const DTColor &newNormalUnGrooveBo + emit normalUnGrooveBorderColorChanged(); + } + +-const DTColor &UKUISlider::disableUnGrooveBorderColor() const ++const QBrush &UKUISlider::disableUnGrooveBorderColor() const + { + return m_disableUnGrooveBorderColor; + } + +-void UKUISlider::setDisableUnGrooveBorderColor(const DTColor &newDisableUnGrooveBorderColor) ++void UKUISlider::setDisableUnGrooveBorderColor(const QBrush &newDisableUnGrooveBorderColor) + { + if (m_disableUnGrooveBorderColor == newDisableUnGrooveBorderColor) + return; +@@ -336,12 +331,12 @@ void UKUISlider::setDisableUnGrooveBorderColor(const DTColor &newDisableUnGroove + emit disableUnGrooveBorderColorChanged(); + } + +-const DTColor &UKUISlider::hoverHandleColor() const ++const QBrush &UKUISlider::hoverHandleColor() const + { + return m_hoverHandleColor; + } + +-void UKUISlider::setHoverHandleColor(const DTColor &newHoverHandleColor) ++void UKUISlider::setHoverHandleColor(const QBrush &newHoverHandleColor) + { + if (m_hoverHandleColor == newHoverHandleColor) + return; +@@ -349,12 +344,12 @@ void UKUISlider::setHoverHandleColor(const DTColor &newHoverHandleColor) + emit hoverHandleColorChanged(); + } + +-const DTColor &UKUISlider::clickHandleColor() const ++const QBrush &UKUISlider::clickHandleColor() const + { + return m_clickHandleColor; + } + +-void UKUISlider::setClickHandleColor(const DTColor &newClickHandleColor) ++void UKUISlider::setClickHandleColor(const QBrush &newClickHandleColor) + { + if (m_clickHandleColor == newClickHandleColor) + return; +@@ -362,12 +357,12 @@ void UKUISlider::setClickHandleColor(const DTColor &newClickHandleColor) + emit clickHandleColorChanged(); + } + +-const DTColor &UKUISlider::hoverHandleBorderColor() const ++const QBrush &UKUISlider::hoverHandleBorderColor() const + { + return m_hoverHandleBorderColor; + } + +-void UKUISlider::setHoverHandleBorderColor(const DTColor &newHoverHandleBorderColor) ++void UKUISlider::setHoverHandleBorderColor(const QBrush &newHoverHandleBorderColor) + { + if (m_hoverHandleBorderColor == newHoverHandleBorderColor) + return; +@@ -375,15 +370,28 @@ void UKUISlider::setHoverHandleBorderColor(const DTColor &newHoverHandleBorderCo + emit hoverHandleBorderColorChanged(); + } + +-const DTColor &UKUISlider::clickHandleBorderColor() const ++const QBrush &UKUISlider::clickHandleBorderColor() const + { + return m_clickHandleBorderColor; + } + +-void UKUISlider::setClickHandleBorderColor(const DTColor &newClickHandleBorderColor) ++void UKUISlider::setClickHandleBorderColor(const QBrush &newClickHandleBorderColor) + { + if (m_clickHandleBorderColor == newClickHandleBorderColor) + return; + m_clickHandleBorderColor = newClickHandleBorderColor; + emit clickHandleBorderColorChanged(); + } ++ ++int UKUISlider::padding() const ++{ ++ return m_padding; ++} ++ ++void UKUISlider::setPadding(int newPadding) ++{ ++ if (m_padding == newPadding) ++ return; ++ m_padding = newPadding; ++ emit paddingChanged(); ++} +diff --git a/ukui-qml-style-helper/styleparameter/ukuislider.h b/ukui-qml-style-helper/styleparameter/ukuislider.h +index 76f41a8..dc0a7d8 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuislider.h ++++ b/ukui-qml-style-helper/styleparameter/ukuislider.h +@@ -43,29 +43,30 @@ class UKUISlider : public QQuickItem + Q_PROPERTY(int grooveHeight READ grooveHeight WRITE setGrooveHeight NOTIFY grooveHeightChanged) + Q_PROPERTY(int handleHeight READ handleHeight WRITE setHandleHeight NOTIFY handleHeightChanged) + Q_PROPERTY(int focusBorderWidth READ focusBorderWidth WRITE setFocusBorderWidth NOTIFY focusBorderWidthChanged) +- Q_PROPERTY(DTColor focusBorderColor READ focusBorderColor WRITE setFocusBorderColor NOTIFY focusBorderColorChanged) ++ Q_PROPERTY(QBrush focusBorderColor READ focusBorderColor WRITE setFocusBorderColor NOTIFY focusBorderColorChanged) + +- Q_PROPERTY(DTColor normalGrooveColor READ normalGrooveColor WRITE setNormalGrooveColor NOTIFY normalGrooveColorChanged) +- Q_PROPERTY(DTColor disableGrooveColor READ disableGrooveColor WRITE setDisableGrooveColor NOTIFY disableGrooveColorChanged) +- Q_PROPERTY(DTColor normalGrooveBorderColor READ normalGrooveBorderColor WRITE setNormalGrooveBorderColor NOTIFY normalGrooveBorderColorChanged) +- Q_PROPERTY(DTColor disableGrooveBorderColor READ disableGrooveBorderColor WRITE setDisableGrooveBorderColor NOTIFY disableGrooveBorderColorChanged) ++ Q_PROPERTY(QBrush normalGrooveColor READ normalGrooveColor WRITE setNormalGrooveColor NOTIFY normalGrooveColorChanged) ++ Q_PROPERTY(QBrush disableGrooveColor READ disableGrooveColor WRITE setDisableGrooveColor NOTIFY disableGrooveColorChanged) ++ Q_PROPERTY(QBrush normalGrooveBorderColor READ normalGrooveBorderColor WRITE setNormalGrooveBorderColor NOTIFY normalGrooveBorderColorChanged) ++ Q_PROPERTY(QBrush disableGrooveBorderColor READ disableGrooveBorderColor WRITE setDisableGrooveBorderColor NOTIFY disableGrooveBorderColorChanged) + Q_PROPERTY(int grooveBorderWidth READ grooveBorderWidth WRITE setGrooveBorderWidth NOTIFY grooveBorderWidthChanged) + +- Q_PROPERTY(DTColor normalUnGrooveColor READ normalUnGrooveColor WRITE setNormalUnGrooveColor NOTIFY normalUnGrooveColorChanged) +- Q_PROPERTY(DTColor disableUnGrooveColor READ disableUnGrooveColor WRITE setDisableUnGrooveColor NOTIFY disableUnGrooveColorChanged) +- Q_PROPERTY(DTColor normalUnGrooveBorderColor READ normalUnGrooveBorderColor WRITE setNormalUnGrooveBorderColor NOTIFY normalUnGrooveBorderColorChanged) +- Q_PROPERTY(DTColor disableUnGrooveBorderColor READ disableUnGrooveBorderColor WRITE setDisableUnGrooveBorderColor NOTIFY disableUnGrooveBorderColorChanged) ++ Q_PROPERTY(QBrush normalUnGrooveColor READ normalUnGrooveColor WRITE setNormalUnGrooveColor NOTIFY normalUnGrooveColorChanged) ++ Q_PROPERTY(QBrush disableUnGrooveColor READ disableUnGrooveColor WRITE setDisableUnGrooveColor NOTIFY disableUnGrooveColorChanged) ++ Q_PROPERTY(QBrush normalUnGrooveBorderColor READ normalUnGrooveBorderColor WRITE setNormalUnGrooveBorderColor NOTIFY normalUnGrooveBorderColorChanged) ++ Q_PROPERTY(QBrush disableUnGrooveBorderColor READ disableUnGrooveBorderColor WRITE setDisableUnGrooveBorderColor NOTIFY disableUnGrooveBorderColorChanged) + + +- Q_PROPERTY(DTColor normalHandleColor READ normalHandleColor WRITE setNormalHandleColor NOTIFY normalHandleColorChanged) +- Q_PROPERTY(DTColor hoverHandleColor READ hoverHandleColor WRITE setHoverHandleColor NOTIFY hoverHandleColorChanged) +- Q_PROPERTY(DTColor clickHandleColor READ clickHandleColor WRITE setClickHandleColor NOTIFY clickHandleColorChanged) +- Q_PROPERTY(DTColor disableHandleColor READ disableHandleColor WRITE setDisableHandleColor NOTIFY DisableHandleColorChanged) +- Q_PROPERTY(DTColor normalHandleBorderColor READ normalHandleBorderColor WRITE setNormalHandleBorderColor NOTIFY normalHandleBorderColorChanged) +- Q_PROPERTY(DTColor hoverHandleBorderColor READ hoverHandleBorderColor WRITE setHoverHandleBorderColor NOTIFY hoverHandleBorderColorChanged) +- Q_PROPERTY(DTColor clickHandleBorderColor READ clickHandleBorderColor WRITE setClickHandleBorderColor NOTIFY clickHandleBorderColorChanged) +- Q_PROPERTY(DTColor disableHandleBorderColor READ disableHandleBorderColor WRITE setDisableHandleBorderColor NOTIFY disableHandleBorderColorChanged) ++ Q_PROPERTY(QBrush normalHandleColor READ normalHandleColor WRITE setNormalHandleColor NOTIFY normalHandleColorChanged) ++ Q_PROPERTY(QBrush hoverHandleColor READ hoverHandleColor WRITE setHoverHandleColor NOTIFY hoverHandleColorChanged) ++ Q_PROPERTY(QBrush clickHandleColor READ clickHandleColor WRITE setClickHandleColor NOTIFY clickHandleColorChanged) ++ Q_PROPERTY(QBrush disableHandleColor READ disableHandleColor WRITE setDisableHandleColor NOTIFY DisableHandleColorChanged) ++ Q_PROPERTY(QBrush normalHandleBorderColor READ normalHandleBorderColor WRITE setNormalHandleBorderColor NOTIFY normalHandleBorderColorChanged) ++ Q_PROPERTY(QBrush hoverHandleBorderColor READ hoverHandleBorderColor WRITE setHoverHandleBorderColor NOTIFY hoverHandleBorderColorChanged) ++ Q_PROPERTY(QBrush clickHandleBorderColor READ clickHandleBorderColor WRITE setClickHandleBorderColor NOTIFY clickHandleBorderColorChanged) ++ Q_PROPERTY(QBrush disableHandleBorderColor READ disableHandleBorderColor WRITE setDisableHandleBorderColor NOTIFY disableHandleBorderColorChanged) + Q_PROPERTY(int handleBorderWidth READ handleBorderWidth WRITE setHandleBorderWidth NOTIFY handleBorderWidthChanged) ++ Q_PROPERTY(int padding READ padding WRITE setPadding NOTIFY paddingChanged) + + public: + explicit UKUISlider(QQuickItem *parent = nullptr); +@@ -90,62 +91,65 @@ public: + int focusBorderWidth() const; + void setFocusBorderWidth(int newFocusBorderWidth); + +- const DTColor &focusBorderColor() const; +- void setFocusBorderColor(const DTColor &newFocusBorderColor); ++ const QBrush &focusBorderColor() const; ++ void setFocusBorderColor(const QBrush &newFocusBorderColor); + +- const DTColor &normalGrooveColor() const; +- void setNormalGrooveColor(const DTColor &newNormalGrooveColor); ++ const QBrush &normalGrooveColor() const; ++ void setNormalGrooveColor(const QBrush &newNormalGrooveColor); + +- const DTColor &disableGrooveColor() const; +- void setDisableGrooveColor(const DTColor &newDisableGrooveColor); ++ const QBrush &disableGrooveColor() const; ++ void setDisableGrooveColor(const QBrush &newDisableGrooveColor); + +- const DTColor &normalHandleColor() const; +- void setNormalHandleColor(const DTColor &newNormalHandleColor); ++ const QBrush &normalHandleColor() const; ++ void setNormalHandleColor(const QBrush &newNormalHandleColor); + +- const DTColor &disableHandleColor() const; +- void setDisableHandleColor(const DTColor &newDisableHandleColor); ++ const QBrush &disableHandleColor() const; ++ void setDisableHandleColor(const QBrush &newDisableHandleColor); + +- const DTColor &normalGrooveBorderColor() const; +- void setNormalGrooveBorderColor(const DTColor &newNormalGrooveBorderColor); ++ const QBrush &normalGrooveBorderColor() const; ++ void setNormalGrooveBorderColor(const QBrush &newNormalGrooveBorderColor); + +- const DTColor &disableGrooveBorderColor() const; +- void setDisableGrooveBorderColor(const DTColor &newDisableGrooveBorderColor); ++ const QBrush &disableGrooveBorderColor() const; ++ void setDisableGrooveBorderColor(const QBrush &newDisableGrooveBorderColor); + + int grooveBorderWidth() const; + void setGrooveBorderWidth(int newGrooveBorderWidth); + +- const DTColor &normalHandleBorderColor() const; +- void setNormalHandleBorderColor(const DTColor &newNormalHandleBorderColor); ++ const QBrush &normalHandleBorderColor() const; ++ void setNormalHandleBorderColor(const QBrush &newNormalHandleBorderColor); + +- const DTColor &disableHandleBorderColor() const; +- void setDisableHandleBorderColor(const DTColor &newDisableHandleBorderColor); ++ const QBrush &disableHandleBorderColor() const; ++ void setDisableHandleBorderColor(const QBrush &newDisableHandleBorderColor); + + int handleBorderWidth() const; + void setHandleBorderWidth(int newHandleBorderWidth); + +- const DTColor &normalUnGrooveColor() const; +- void setNormalUnGrooveColor(const DTColor &newNormalUnGrooveColor); ++ const QBrush &normalUnGrooveColor() const; ++ void setNormalUnGrooveColor(const QBrush &newNormalUnGrooveColor); + +- const DTColor &disableUnGrooveColor() const; +- void setDisableUnGrooveColor(const DTColor &newDisableUnGrooveColor); ++ const QBrush &disableUnGrooveColor() const; ++ void setDisableUnGrooveColor(const QBrush &newDisableUnGrooveColor); + +- const DTColor &normalUnGrooveBorderColor() const; +- void setNormalUnGrooveBorderColor(const DTColor &newNormalUnGrooveBorderColor); ++ const QBrush &normalUnGrooveBorderColor() const; ++ void setNormalUnGrooveBorderColor(const QBrush &newNormalUnGrooveBorderColor); + +- const DTColor &disableUnGrooveBorderColor() const; +- void setDisableUnGrooveBorderColor(const DTColor &newDisableUnGrooveBorderColor); ++ const QBrush &disableUnGrooveBorderColor() const; ++ void setDisableUnGrooveBorderColor(const QBrush &newDisableUnGrooveBorderColor); + +- const DTColor &hoverHandleColor() const; +- void setHoverHandleColor(const DTColor &newHoverHandleColor); ++ const QBrush &hoverHandleColor() const; ++ void setHoverHandleColor(const QBrush &newHoverHandleColor); + +- const DTColor &clickHandleColor() const; +- void setClickHandleColor(const DTColor &newClickHandleColor); ++ const QBrush &clickHandleColor() const; ++ void setClickHandleColor(const QBrush &newClickHandleColor); + +- const DTColor &hoverHandleBorderColor() const; +- void setHoverHandleBorderColor(const DTColor &newHoverHandleBorderColor); ++ const QBrush &hoverHandleBorderColor() const; ++ void setHoverHandleBorderColor(const QBrush &newHoverHandleBorderColor); + +- const DTColor &clickHandleBorderColor() const; +- void setClickHandleBorderColor(const DTColor &newClickHandleBorderColor); ++ const QBrush &clickHandleBorderColor() const; ++ void setClickHandleBorderColor(const QBrush &newClickHandleBorderColor); ++ ++ int padding() const; ++ void setPadding(int newPadding); + + signals: + void normalWidthChanged(); +@@ -196,34 +200,39 @@ signals: + + void clickHandleBorderColorChanged(); + ++ void parametryChanged(); ++ ++ void paddingChanged(); ++ + private: + int m_normalWidth; + int m_normalHeight; + int m_grooveHeight; + int m_handleHeight; + int m_focusBorderWidth; +- Q_INVOKABLE DTColor m_focusBorderColor; +- Q_INVOKABLE DTColor m_normalGrooveColor; +- Q_INVOKABLE DTColor m_disableGrooveColor; +- Q_INVOKABLE DTColor m_normalHandleColor; +- Q_INVOKABLE DTColor m_disableHandleColor; +- Q_INVOKABLE DTColor m_normalGrooveBorderColor; +- Q_INVOKABLE DTColor m_disableGrooveBorderColor; ++ Q_INVOKABLE QBrush m_focusBorderColor; ++ Q_INVOKABLE QBrush m_normalGrooveColor; ++ Q_INVOKABLE QBrush m_disableGrooveColor; ++ Q_INVOKABLE QBrush m_normalHandleColor; ++ Q_INVOKABLE QBrush m_disableHandleColor; ++ Q_INVOKABLE QBrush m_normalGrooveBorderColor; ++ Q_INVOKABLE QBrush m_disableGrooveBorderColor; + int m_grooveBorderWidth; +- Q_INVOKABLE DTColor m_normalHandleBorderColor; +- Q_INVOKABLE DTColor m_disableHandleBorderColor; ++ Q_INVOKABLE QBrush m_normalHandleBorderColor; ++ Q_INVOKABLE QBrush m_disableHandleBorderColor; + int m_handleBorderWidth; +- Q_INVOKABLE DTColor m_normalUnGrooveColor; +- Q_INVOKABLE DTColor m_disableUnGrooveColor; +- Q_INVOKABLE DTColor m_normalUnGrooveBorderColor; +- Q_INVOKABLE DTColor m_disableUnGrooveBorderColor; +- Q_INVOKABLE DTColor m_hoverHandleColor; +- Q_INVOKABLE DTColor m_clickHandleColor; +- Q_INVOKABLE DTColor m_hoverHandleBorderColor; +- Q_INVOKABLE DTColor m_clickHandleBorderColor; ++ Q_INVOKABLE QBrush m_normalUnGrooveColor; ++ Q_INVOKABLE QBrush m_disableUnGrooveColor; ++ Q_INVOKABLE QBrush m_normalUnGrooveBorderColor; ++ Q_INVOKABLE QBrush m_disableUnGrooveBorderColor; ++ Q_INVOKABLE QBrush m_hoverHandleColor; ++ Q_INVOKABLE QBrush m_clickHandleColor; ++ Q_INVOKABLE QBrush m_hoverHandleBorderColor; ++ Q_INVOKABLE QBrush m_clickHandleBorderColor; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + ++ int m_padding; + }; + } + QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUISlider, QML_HAS_ATTACHED_PROPERTIES) +diff --git a/ukui-qml-style-helper/styleparameter/ukuispinbox.cpp b/ukui-qml-style-helper/styleparameter/ukuispinbox.cpp +index b3e08df..c3f80c4 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuispinbox.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuispinbox.cpp +@@ -51,8 +51,11 @@ void UKUISpinBox::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + setRadius(instance->kradiusNormal()); + setNormalBorderWidth(instance->normalline()); + setFocusBorderWidth(instance->focusline()); +- setPadding(instance->kmarginNormal()); ++ setPadding(instance->tokenGap8()); + setBtnBorderWidth(instance->normalline()); ++ ++ emit parametryChanged(); ++ + } + + UKUISpinBox* UKUISpinBox::qmlAttachedProperties(QObject *parent) +@@ -61,12 +64,12 @@ UKUISpinBox* UKUISpinBox::qmlAttachedProperties(QObject *parent) + return new UKUISpinBox(p); + } + +-const DTColor &UKUISpinBox::normalColor() const ++const QBrush &UKUISpinBox::normalColor() const + { + return m_normalColor; + } + +-void UKUISpinBox::setNormalColor(const DTColor &newNormalColor) ++void UKUISpinBox::setNormalColor(const QBrush &newNormalColor) + { + if (m_normalColor == newNormalColor) + return; +@@ -74,12 +77,12 @@ void UKUISpinBox::setNormalColor(const DTColor &newNormalColor) + emit normalColorChanged(); + } + +-const DTColor &UKUISpinBox::disableColor() const ++const QBrush &UKUISpinBox::disableColor() const + { + return m_disableColor; + } + +-void UKUISpinBox::setDisableColor(const DTColor &newDisableColor) ++void UKUISpinBox::setDisableColor(const QBrush &newDisableColor) + { + if (m_disableColor == newDisableColor) + return; +@@ -87,12 +90,12 @@ void UKUISpinBox::setDisableColor(const DTColor &newDisableColor) + emit disableColorChanged(); + } + +-const DTColor &UKUISpinBox::hoverColor() const ++const QBrush &UKUISpinBox::hoverColor() const + { + return m_hoverColor; + } + +-void UKUISpinBox::setHoverColor(const DTColor &newHoverColor) ++void UKUISpinBox::setHoverColor(const QBrush &newHoverColor) + { + if (m_hoverColor == newHoverColor) + return; +@@ -100,12 +103,12 @@ void UKUISpinBox::setHoverColor(const DTColor &newHoverColor) + emit hoverColorChanged(); + } + +-const DTColor &UKUISpinBox::clickColor() const ++const QBrush &UKUISpinBox::clickColor() const + { + return m_clickColor; + } + +-void UKUISpinBox::setClickColor(const DTColor &newClickColor) ++void UKUISpinBox::setClickColor(const QBrush &newClickColor) + { + if (m_clickColor == newClickColor) + return; +@@ -113,12 +116,12 @@ void UKUISpinBox::setClickColor(const DTColor &newClickColor) + emit clickColorChanged(); + } + +-const DTColor &UKUISpinBox::normalTextColor() const ++const QBrush &UKUISpinBox::normalTextColor() const + { + return m_normalTextColor; + } + +-void UKUISpinBox::setNormalTextColor(const DTColor &newNormalTextColor) ++void UKUISpinBox::setNormalTextColor(const QBrush &newNormalTextColor) + { + if (m_normalTextColor == newNormalTextColor) + return; +@@ -126,12 +129,12 @@ void UKUISpinBox::setNormalTextColor(const DTColor &newNormalTextColor) + emit normalTextColorChanged(); + } + +-const DTColor &UKUISpinBox::disableTextColor() const ++const QBrush &UKUISpinBox::disableTextColor() const + { + return m_disableTextColor; + } + +-void UKUISpinBox::setDisableTextColor(const DTColor &newDisableTextColor) ++void UKUISpinBox::setDisableTextColor(const QBrush &newDisableTextColor) + { + if (m_disableTextColor == newDisableTextColor) + return; +@@ -204,12 +207,12 @@ void UKUISpinBox::setBtnNormalHeight(int newBtnNormalHeight) + emit btnNormalHeightChanged(); + } + +-const DTColor &UKUISpinBox::normalBorderColor() const ++const QBrush &UKUISpinBox::normalBorderColor() const + { + return m_normalBorderColor; + } + +-void UKUISpinBox::setNormalBorderColor(const DTColor &newNormalBorderColor) ++void UKUISpinBox::setNormalBorderColor(const QBrush &newNormalBorderColor) + { + if (m_normalBorderColor == newNormalBorderColor) + return; +@@ -217,12 +220,12 @@ void UKUISpinBox::setNormalBorderColor(const DTColor &newNormalBorderColor) + emit normalBorderColorChanged(); + } + +-const DTColor &UKUISpinBox::hoverBorderColor() const ++const QBrush &UKUISpinBox::hoverBorderColor() const + { + return m_hoverBorderColor; + } + +-void UKUISpinBox::setHoverBorderColor(const DTColor &newHoverBorderColor) ++void UKUISpinBox::setHoverBorderColor(const QBrush &newHoverBorderColor) + { + if (m_hoverBorderColor == newHoverBorderColor) + return; +@@ -230,12 +233,12 @@ void UKUISpinBox::setHoverBorderColor(const DTColor &newHoverBorderColor) + emit hoverColorBorderChanged(); + } + +-const DTColor &UKUISpinBox::clickBorderColor() const ++const QBrush &UKUISpinBox::clickBorderColor() const + { + return m_clickBorderColor; + } + +-void UKUISpinBox::setClickBorderColor(const DTColor &newClickBorderColor) ++void UKUISpinBox::setClickBorderColor(const QBrush &newClickBorderColor) + { + if (m_clickBorderColor == newClickBorderColor) + return; +@@ -243,12 +246,12 @@ void UKUISpinBox::setClickBorderColor(const DTColor &newClickBorderColor) + emit clickColorBorderChanged(); + } + +-const DTColor &UKUISpinBox::disableBorderColor() const ++const QBrush &UKUISpinBox::disableBorderColor() const + { + return m_disableBorderColor; + } + +-void UKUISpinBox::setDisableBorderColor(const DTColor &newDisableBorderColor) ++void UKUISpinBox::setDisableBorderColor(const QBrush &newDisableBorderColor) + { + if (m_disableBorderColor == newDisableBorderColor) + return; +@@ -256,12 +259,12 @@ void UKUISpinBox::setDisableBorderColor(const DTColor &newDisableBorderColor) + emit disableBorderColorChanged(); + } + +-const DTColor &UKUISpinBox::focusBorderColor() const ++const QBrush &UKUISpinBox::focusBorderColor() const + { + return m_focusBorderColor; + } + +-void UKUISpinBox::setFocusBorderColor(const DTColor &newFocusBorderColor) ++void UKUISpinBox::setFocusBorderColor(const QBrush &newFocusBorderColor) + { + if (m_focusBorderColor == newFocusBorderColor) + return; +@@ -295,12 +298,12 @@ void UKUISpinBox::setNormalBorderWidth(int newNormalBorderWidth) + emit normalBorderWidthChanged(); + } + +-const DTColor &UKUISpinBox::focusColor() const ++const QBrush &UKUISpinBox::focusColor() const + { + return m_focusColor; + } + +-void UKUISpinBox::setFocusColor(const DTColor &newFocusColor) ++void UKUISpinBox::setFocusColor(const QBrush &newFocusColor) + { + if (m_focusColor == newFocusColor) + return; +@@ -321,12 +324,12 @@ void UKUISpinBox::setPadding(int newPadding) + emit paddingChanged(); + } + +-const DTColor &UKUISpinBox::btnNormalColor() const ++const QBrush &UKUISpinBox::btnNormalColor() const + { + return m_btnNormalColor; + } + +-void UKUISpinBox::setBtnNormalColor(const DTColor &newBtnNormalColor) ++void UKUISpinBox::setBtnNormalColor(const QBrush &newBtnNormalColor) + { + if (m_btnNormalColor == newBtnNormalColor) + return; +@@ -334,12 +337,12 @@ void UKUISpinBox::setBtnNormalColor(const DTColor &newBtnNormalColor) + emit btnNormalColorChanged(); + } + +-const DTColor &UKUISpinBox::btnHoverColor() const ++const QBrush &UKUISpinBox::btnHoverColor() const + { + return m_btnHoverColor; + } + +-void UKUISpinBox::setBtnHoverColor(const DTColor &newBtnHoverColor) ++void UKUISpinBox::setBtnHoverColor(const QBrush &newBtnHoverColor) + { + if (m_btnHoverColor == newBtnHoverColor) + return; +@@ -347,12 +350,12 @@ void UKUISpinBox::setBtnHoverColor(const DTColor &newBtnHoverColor) + emit btnHoverColorChanged(); + } + +-const DTColor &UKUISpinBox::btnClickColor() const ++const QBrush &UKUISpinBox::btnClickColor() const + { + return m_btnClickColor; + } + +-void UKUISpinBox::setBtnClickColor(const DTColor &newBtnClickColor) ++void UKUISpinBox::setBtnClickColor(const QBrush &newBtnClickColor) + { + if (m_btnClickColor == newBtnClickColor) + return; +@@ -360,12 +363,12 @@ void UKUISpinBox::setBtnClickColor(const DTColor &newBtnClickColor) + emit btnClickColorChanged(); + } + +-const DTColor &UKUISpinBox::btnDisableColor() const ++const QBrush &UKUISpinBox::btnDisableColor() const + { + return m_btnDisableColor; + } + +-void UKUISpinBox::setBtnDisableColor(const DTColor &newBtnDisableColor) ++void UKUISpinBox::setBtnDisableColor(const QBrush &newBtnDisableColor) + { + if (m_btnDisableColor == newBtnDisableColor) + return; +@@ -373,12 +376,12 @@ void UKUISpinBox::setBtnDisableColor(const DTColor &newBtnDisableColor) + emit btnDisableColorChanged(); + } + +-const DTColor &UKUISpinBox::btnFocusColor() const ++const QBrush &UKUISpinBox::btnFocusColor() const + { + return m_btnFocusColor; + } + +-void UKUISpinBox::setBtnFocusColor(const DTColor &newBtnFocusColor) ++void UKUISpinBox::setBtnFocusColor(const QBrush &newBtnFocusColor) + { + if (m_btnFocusColor == newBtnFocusColor) + return; +@@ -386,12 +389,12 @@ void UKUISpinBox::setBtnFocusColor(const DTColor &newBtnFocusColor) + emit btnFocusColorChanged(); + } + +-const DTColor &UKUISpinBox::btnNormalBorderColor() const ++const QBrush &UKUISpinBox::btnNormalBorderColor() const + { + return m_btnNormalBorderColor; + } + +-void UKUISpinBox::setBtnNormalBorderColor(const DTColor &newBtnNormalBorderColor) ++void UKUISpinBox::setBtnNormalBorderColor(const QBrush &newBtnNormalBorderColor) + { + if (m_btnNormalBorderColor == newBtnNormalBorderColor) + return; +@@ -399,12 +402,12 @@ void UKUISpinBox::setBtnNormalBorderColor(const DTColor &newBtnNormalBorderColor + emit btnNormalBorderColorChanged(); + } + +-const DTColor &UKUISpinBox::btnHoverBorderColor() const ++const QBrush &UKUISpinBox::btnHoverBorderColor() const + { + return m_btnHoverBorderColor; + } + +-void UKUISpinBox::setBtnHoverBorderColor(const DTColor &newBtnHoverBorderColor) ++void UKUISpinBox::setBtnHoverBorderColor(const QBrush &newBtnHoverBorderColor) + { + if (m_btnHoverBorderColor == newBtnHoverBorderColor) + return; +@@ -412,12 +415,12 @@ void UKUISpinBox::setBtnHoverBorderColor(const DTColor &newBtnHoverBorderColor) + emit btnHoverBorderColorChanged(); + } + +-const DTColor &UKUISpinBox::btnClickBorderColor() const ++const QBrush &UKUISpinBox::btnClickBorderColor() const + { + return m_btnClickBorderColor; + } + +-void UKUISpinBox::setBtnClickBorderColor(const DTColor &newBtnClickBorderColor) ++void UKUISpinBox::setBtnClickBorderColor(const QBrush &newBtnClickBorderColor) + { + if (m_btnClickBorderColor == newBtnClickBorderColor) + return; +@@ -425,12 +428,12 @@ void UKUISpinBox::setBtnClickBorderColor(const DTColor &newBtnClickBorderColor) + emit btnClickBorderColorChanged(); + } + +-const DTColor &UKUISpinBox::btnDisableBorderColor() const ++const QBrush &UKUISpinBox::btnDisableBorderColor() const + { + return m_btnDisableBorderColor; + } + +-void UKUISpinBox::setBtnDisableBorderColor(const DTColor &newBtnDisableBorderColor) ++void UKUISpinBox::setBtnDisableBorderColor(const QBrush &newBtnDisableBorderColor) + { + if (m_btnDisableBorderColor == newBtnDisableBorderColor) + return; +@@ -438,12 +441,12 @@ void UKUISpinBox::setBtnDisableBorderColor(const DTColor &newBtnDisableBorderCol + emit btnDisableBorderColorChanged(); + } + +-const DTColor &UKUISpinBox::btnFocusBorderColor() const ++const QBrush &UKUISpinBox::btnFocusBorderColor() const + { + return m_btnFocusBorderColor; + } + +-void UKUISpinBox::setBtnFocusBorderColor(const DTColor &newBtnFocusBorderColor) ++void UKUISpinBox::setBtnFocusBorderColor(const QBrush &newBtnFocusBorderColor) + { + if (m_btnFocusBorderColor == newBtnFocusBorderColor) + return; +diff --git a/ukui-qml-style-helper/styleparameter/ukuispinbox.h b/ukui-qml-style-helper/styleparameter/ukuispinbox.h +index efab416..ab706bb 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuispinbox.h ++++ b/ukui-qml-style-helper/styleparameter/ukuispinbox.h +@@ -38,32 +38,32 @@ class UKUISpinBox : public QQuickItem + { + Q_OBJECT + +- Q_PROPERTY(DTColor normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) +- Q_PROPERTY(DTColor hoverColor READ hoverColor WRITE setHoverColor NOTIFY hoverColorChanged) +- Q_PROPERTY(DTColor clickColor READ clickColor WRITE setClickColor NOTIFY clickColorChanged) +- Q_PROPERTY(DTColor disableColor READ disableColor WRITE setDisableColor NOTIFY disableColorChanged) +- Q_PROPERTY(DTColor focusColor READ focusColor WRITE setFocusColor NOTIFY focusColorChanged) +- +- Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) +- Q_PROPERTY(DTColor hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverColorBorderChanged) +- Q_PROPERTY(DTColor clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickColorBorderChanged) +- Q_PROPERTY(DTColor disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) +- Q_PROPERTY(DTColor focusBorderColor READ focusBorderColor WRITE setFocusBorderColor NOTIFY focusBorderColorChanged) +- +- Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) +- Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) +- +- Q_PROPERTY(DTColor btnNormalColor READ btnNormalColor WRITE setBtnNormalColor NOTIFY btnNormalColorChanged) +- Q_PROPERTY(DTColor btnHoverColor READ btnHoverColor WRITE setBtnHoverColor NOTIFY btnHoverColorChanged) +- Q_PROPERTY(DTColor btnClickColor READ btnClickColor WRITE setBtnClickColor NOTIFY btnClickColorChanged) +- Q_PROPERTY(DTColor btnDisableColor READ btnDisableColor WRITE setBtnDisableColor NOTIFY btnDisableColorChanged) +- Q_PROPERTY(DTColor btnFocusColor READ btnFocusColor WRITE setBtnFocusColor NOTIFY btnFocusColorChanged) +- +- Q_PROPERTY(DTColor btnNormalBorderColor READ btnNormalBorderColor WRITE setBtnNormalBorderColor NOTIFY btnNormalBorderColorChanged) +- Q_PROPERTY(DTColor btnHoverBorderColor READ btnHoverBorderColor WRITE setBtnHoverBorderColor NOTIFY btnHoverBorderColorChanged) +- Q_PROPERTY(DTColor btnClickBorderColor READ btnClickBorderColor WRITE setBtnClickBorderColor NOTIFY btnClickBorderColorChanged) +- Q_PROPERTY(DTColor btnDisableBorderColor READ btnDisableBorderColor WRITE setBtnDisableBorderColor NOTIFY btnDisableBorderColorChanged) +- Q_PROPERTY(DTColor btnFocusBorderColor READ btnFocusBorderColor WRITE setBtnFocusBorderColor NOTIFY btnFocusBorderColorChanged) ++ Q_PROPERTY(QBrush normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) ++ Q_PROPERTY(QBrush hoverColor READ hoverColor WRITE setHoverColor NOTIFY hoverColorChanged) ++ Q_PROPERTY(QBrush clickColor READ clickColor WRITE setClickColor NOTIFY clickColorChanged) ++ Q_PROPERTY(QBrush disableColor READ disableColor WRITE setDisableColor NOTIFY disableColorChanged) ++ Q_PROPERTY(QBrush focusColor READ focusColor WRITE setFocusColor NOTIFY focusColorChanged) ++ ++ Q_PROPERTY(QBrush normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) ++ Q_PROPERTY(QBrush hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverColorBorderChanged) ++ Q_PROPERTY(QBrush clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickColorBorderChanged) ++ Q_PROPERTY(QBrush disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) ++ Q_PROPERTY(QBrush focusBorderColor READ focusBorderColor WRITE setFocusBorderColor NOTIFY focusBorderColorChanged) ++ ++ Q_PROPERTY(QBrush normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) ++ Q_PROPERTY(QBrush disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) ++ ++ Q_PROPERTY(QBrush btnNormalColor READ btnNormalColor WRITE setBtnNormalColor NOTIFY btnNormalColorChanged) ++ Q_PROPERTY(QBrush btnHoverColor READ btnHoverColor WRITE setBtnHoverColor NOTIFY btnHoverColorChanged) ++ Q_PROPERTY(QBrush btnClickColor READ btnClickColor WRITE setBtnClickColor NOTIFY btnClickColorChanged) ++ Q_PROPERTY(QBrush btnDisableColor READ btnDisableColor WRITE setBtnDisableColor NOTIFY btnDisableColorChanged) ++ Q_PROPERTY(QBrush btnFocusColor READ btnFocusColor WRITE setBtnFocusColor NOTIFY btnFocusColorChanged) ++ ++ Q_PROPERTY(QBrush btnNormalBorderColor READ btnNormalBorderColor WRITE setBtnNormalBorderColor NOTIFY btnNormalBorderColorChanged) ++ Q_PROPERTY(QBrush btnHoverBorderColor READ btnHoverBorderColor WRITE setBtnHoverBorderColor NOTIFY btnHoverBorderColorChanged) ++ Q_PROPERTY(QBrush btnClickBorderColor READ btnClickBorderColor WRITE setBtnClickBorderColor NOTIFY btnClickBorderColorChanged) ++ Q_PROPERTY(QBrush btnDisableBorderColor READ btnDisableBorderColor WRITE setBtnDisableBorderColor NOTIFY btnDisableBorderColorChanged) ++ Q_PROPERTY(QBrush btnFocusBorderColor READ btnFocusBorderColor WRITE setBtnFocusBorderColor NOTIFY btnFocusBorderColorChanged) + + + Q_PROPERTY(int normalWidth READ normalWidth WRITE setNormalWidth NOTIFY normalWidthChanged) +@@ -86,23 +86,23 @@ public: + + static UKUISpinBox* qmlAttachedProperties(QObject* parent); + +- const DTColor &normalColor() const; +- void setNormalColor(const DTColor &newNormalColor); ++ const QBrush &normalColor() const; ++ void setNormalColor(const QBrush &newNormalColor); + +- const DTColor &disableColor() const; +- void setDisableColor(const DTColor &newDisableColor); ++ const QBrush &disableColor() const; ++ void setDisableColor(const QBrush &newDisableColor); + +- const DTColor &hoverColor() const; +- void setHoverColor(const DTColor &newHoverColor); ++ const QBrush &hoverColor() const; ++ void setHoverColor(const QBrush &newHoverColor); + +- const DTColor &clickColor() const; +- void setClickColor(const DTColor &newClickColor); ++ const QBrush &clickColor() const; ++ void setClickColor(const QBrush &newClickColor); + +- const DTColor &normalTextColor() const; +- void setNormalTextColor(const DTColor &newNormalTextColor); ++ const QBrush &normalTextColor() const; ++ void setNormalTextColor(const QBrush &newNormalTextColor); + +- const DTColor &disableTextColor() const; +- void setDisableTextColor(const DTColor &newDisableTextColor); ++ const QBrush &disableTextColor() const; ++ void setDisableTextColor(const QBrush &newDisableTextColor); + + int normalWidth() const; + void setNormalWidth(int newNormalWidth); +@@ -119,20 +119,20 @@ public: + int btnNormalHeight() const; + void setBtnNormalHeight(int newBtnNormalHeight); + +- const DTColor &normalBorderColor() const; +- void setNormalBorderColor(const DTColor &newNormalBorderColor); ++ const QBrush &normalBorderColor() const; ++ void setNormalBorderColor(const QBrush &newNormalBorderColor); + +- const DTColor &hoverBorderColor() const; +- void setHoverBorderColor(const DTColor &newHoverBorderColor); ++ const QBrush &hoverBorderColor() const; ++ void setHoverBorderColor(const QBrush &newHoverBorderColor); + +- const DTColor &clickBorderColor() const; +- void setClickBorderColor(const DTColor &newClickBorderColor); ++ const QBrush &clickBorderColor() const; ++ void setClickBorderColor(const QBrush &newClickBorderColor); + +- const DTColor &disableBorderColor() const; +- void setDisableBorderColor(const DTColor &newDisableBorderColor); ++ const QBrush &disableBorderColor() const; ++ void setDisableBorderColor(const QBrush &newDisableBorderColor); + +- const DTColor &focusBorderColor() const; +- void setFocusBorderColor(const DTColor &newFocusBorderColor); ++ const QBrush &focusBorderColor() const; ++ void setFocusBorderColor(const QBrush &newFocusBorderColor); + + int focusBorderWidth() const; + void setFocusBorderWidth(int newFocusBorderWidth); +@@ -140,41 +140,41 @@ public: + int normalBorderWidth() const; + void setNormalBorderWidth(int newNormalBorderWidth); + +- const DTColor &focusColor() const; +- void setFocusColor(const DTColor &newFocusColor); ++ const QBrush &focusColor() const; ++ void setFocusColor(const QBrush &newFocusColor); + + int padding() const; + void setPadding(int newPadding); + +- const DTColor &btnNormalColor() const; +- void setBtnNormalColor(const DTColor &newBtnNormalColor); ++ const QBrush &btnNormalColor() const; ++ void setBtnNormalColor(const QBrush &newBtnNormalColor); + +- const DTColor &btnHoverColor() const; +- void setBtnHoverColor(const DTColor &newBtnHoverColor); ++ const QBrush &btnHoverColor() const; ++ void setBtnHoverColor(const QBrush &newBtnHoverColor); + +- const DTColor &btnClickColor() const; +- void setBtnClickColor(const DTColor &newBtnClickColor); ++ const QBrush &btnClickColor() const; ++ void setBtnClickColor(const QBrush &newBtnClickColor); + +- const DTColor &btnDisableColor() const; +- void setBtnDisableColor(const DTColor &newBtnDisableColor); ++ const QBrush &btnDisableColor() const; ++ void setBtnDisableColor(const QBrush &newBtnDisableColor); + +- const DTColor &btnFocusColor() const; +- void setBtnFocusColor(const DTColor &newBtnFocusColor); ++ const QBrush &btnFocusColor() const; ++ void setBtnFocusColor(const QBrush &newBtnFocusColor); + +- const DTColor &btnNormalBorderColor() const; +- void setBtnNormalBorderColor(const DTColor &newBtnNormalBorderColor); ++ const QBrush &btnNormalBorderColor() const; ++ void setBtnNormalBorderColor(const QBrush &newBtnNormalBorderColor); + +- const DTColor &btnHoverBorderColor() const; +- void setBtnHoverBorderColor(const DTColor &newBtnHoverBorderColor); ++ const QBrush &btnHoverBorderColor() const; ++ void setBtnHoverBorderColor(const QBrush &newBtnHoverBorderColor); + +- const DTColor &btnClickBorderColor() const; +- void setBtnClickBorderColor(const DTColor &newBtnClickBorderColor); ++ const QBrush &btnClickBorderColor() const; ++ void setBtnClickBorderColor(const QBrush &newBtnClickBorderColor); + +- const DTColor &btnDisableBorderColor() const; +- void setBtnDisableBorderColor(const DTColor &newBtnDisableBorderColor); ++ const QBrush &btnDisableBorderColor() const; ++ void setBtnDisableBorderColor(const QBrush &newBtnDisableBorderColor); + +- const DTColor &btnFocusBorderColor() const; +- void setBtnFocusBorderColor(const DTColor &newBtnFocusBorderColor); ++ const QBrush &btnFocusBorderColor() const; ++ void setBtnFocusBorderColor(const QBrush &newBtnFocusBorderColor); + + int btnBorderWidth() const; + void setBtnBorderWidth(int newBtnBorderWidth); +@@ -244,40 +244,42 @@ signals: + + void btnBorderWidthChanged(); + ++ void parametryChanged(); ++ + private: +- Q_INVOKABLE DTColor m_normalColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.85)); +- Q_INVOKABLE DTColor m_disableColor; ++ Q_INVOKABLE QBrush m_normalColor = QBrush(QColor::fromRgbF(0, 0, 0, 0.85)); ++ Q_INVOKABLE QBrush m_disableColor; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +- Q_INVOKABLE DTColor m_hoverColor; +- Q_INVOKABLE DTColor m_clickColor; +- Q_INVOKABLE DTColor m_normalTextColor; +- Q_INVOKABLE DTColor m_disableTextColor; ++ Q_INVOKABLE QBrush m_hoverColor; ++ Q_INVOKABLE QBrush m_clickColor; ++ Q_INVOKABLE QBrush m_normalTextColor; ++ Q_INVOKABLE QBrush m_disableTextColor; + int m_normalWidth; + int m_normalHeight; + int m_radius; + int m_btnNormalWidth; + int m_btnNormalHeight; +- Q_INVOKABLE DTColor m_normalBorderColor; +- Q_INVOKABLE DTColor m_hoverBorderColor; +- Q_INVOKABLE DTColor m_clickBorderColor; +- Q_INVOKABLE DTColor m_disableBorderColor; +- Q_INVOKABLE DTColor m_focusBorderColor; ++ Q_INVOKABLE QBrush m_normalBorderColor; ++ Q_INVOKABLE QBrush m_hoverBorderColor; ++ Q_INVOKABLE QBrush m_clickBorderColor; ++ Q_INVOKABLE QBrush m_disableBorderColor; ++ Q_INVOKABLE QBrush m_focusBorderColor; + int m_focusBorderWidth; + int m_normalBorderWidth; +- Q_INVOKABLE DTColor m_focusColor; ++ Q_INVOKABLE QBrush m_focusColor; + int m_padding; +- Q_INVOKABLE DTColor m_btnNormalColor; +- Q_INVOKABLE DTColor m_btnHoverColor; +- Q_INVOKABLE DTColor m_btnClickColor; +- Q_INVOKABLE DTColor m_btnDisableColor; +- Q_INVOKABLE DTColor m_btnFocusColor; +- Q_INVOKABLE DTColor m_btnNormalBorderColor; +- Q_INVOKABLE DTColor m_btnHoverBorderColor; +- Q_INVOKABLE DTColor m_btnClickBorderColor; +- Q_INVOKABLE DTColor m_btnDisableBorderColor; +- Q_INVOKABLE DTColor m_btnFocusBorderColor; ++ Q_INVOKABLE QBrush m_btnNormalColor; ++ Q_INVOKABLE QBrush m_btnHoverColor; ++ Q_INVOKABLE QBrush m_btnClickColor; ++ Q_INVOKABLE QBrush m_btnDisableColor; ++ Q_INVOKABLE QBrush m_btnFocusColor; ++ Q_INVOKABLE QBrush m_btnNormalBorderColor; ++ Q_INVOKABLE QBrush m_btnHoverBorderColor; ++ Q_INVOKABLE QBrush m_btnClickBorderColor; ++ Q_INVOKABLE QBrush m_btnDisableBorderColor; ++ Q_INVOKABLE QBrush m_btnFocusBorderColor; + int m_btnBorderWidth; + }; + } +diff --git a/ukui-qml-style-helper/styleparameter/ukuiswitch.cpp b/ukui-qml-style-helper/styleparameter/ukuiswitch.cpp +new file mode 100644 +index 0000000..e4a7811 +--- /dev/null ++++ b/ukui-qml-style-helper/styleparameter/ukuiswitch.cpp +@@ -0,0 +1,374 @@ ++#include "ukuiswitch.h" ++#include "qdebug.h" ++ ++using namespace UKUIQQC2Style; ++ ++UKUISwitch::UKUISwitch(QQuickItem *parent) : QQuickItem(parent) ++{ ++ if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) ++ return; ++ TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); ++ m_instance = token->getInstance(); ++ initParam(m_instance); ++ connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ ++ initParam(m_instance); ++ }); ++ ++} ++ ++UKUISwitch::~UKUISwitch() ++{ ++ ++} ++ ++void UKUISwitch::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) ++{ ++ setNormalColor(instance->buttonActive()); ++ setHoverColor(instance->kComponentHover()); ++ setClickColor(instance->kComponentClick()); ++ setDisableColor(instance->buttonDisable()); ++ setNormalBorderColor(instance->kLineComponentNormal()); ++ setHoverBorderColor(instance->kLineComponentHover()); ++ setClickBorderColor(instance->kLineComponentClick()); ++ setDisableBorderColor(instance->kLineComponentDisable()); ++ ++ setCheckedNormalColor(instance->highLightActive()); ++ setCheckedHoverColor(instance->kBrandHover()); ++ setCheckedClickColor(instance->kBrandClick()); ++ setCheckedDisableColor(instance->highLightDisable()); ++ setCheckedNormalBorderColor(instance->kLineBrandNormal()); ++ setCheckedHoverBorderColor(instance->kLineBrandHover()); ++ setCheckedClickBorderColor(instance->kLineBrandClick()); ++ setCheckedDisableBorderColor(instance->kLineBrandDisable()); ++ ++ setNormalIndicatorColor(instance->highLightedTextActive()); ++ setDisableIndicatorColor(instance->buttonTextDisable()); ++ ++ setRecWidth(50); ++ setRecHeight(24); ++ setIndicatorWidth(16); ++ setPadding(4); ++ setBorderWidth(instance->normalline()); ++ setIndicatorLeftRightPadding(4); ++ emit parametryChanged(); ++ ++} ++ ++UKUISwitch* UKUISwitch::qmlAttachedProperties(QObject* parent) ++{ ++ auto p = qobject_cast<QQuickItem*>(parent); ++ return new UKUISwitch(p); ++} ++ ++const QBrush &UKUISwitch::normalColor() const ++{ ++ return m_normalColor; ++} ++ ++void UKUISwitch::setNormalColor(const QBrush &newNormalColor) ++{ ++ if (m_normalColor == newNormalColor) ++ return; ++ m_normalColor = newNormalColor; ++ emit normalColorChanged(); ++} ++ ++ ++int UKUISwitch::padding() const ++{ ++ return m_padding; ++} ++ ++void UKUISwitch::setPadding(int newPadding) ++{ ++ if (m_padding == newPadding) ++ return; ++ m_padding = newPadding; ++ emit paddingChanged(); ++} ++ ++const QBrush &UKUISwitch::hoverColor() const ++{ ++ return m_hoverColor; ++} ++ ++void UKUISwitch::setHoverColor(const QBrush &newHoverColor) ++{ ++ if (m_hoverColor == newHoverColor) ++ return; ++ m_hoverColor = newHoverColor; ++ emit hoverColorChanged(); ++} ++ ++const QBrush &UKUISwitch::clickColor() const ++{ ++ return m_clickColor; ++} ++ ++void UKUISwitch::setClickColor(const QBrush &newClickColor) ++{ ++ if (m_clickColor == newClickColor) ++ return; ++ m_clickColor = newClickColor; ++ emit clickColorChanged(); ++} ++ ++const QBrush &UKUISwitch::disableColor() const ++{ ++ return m_disableColor; ++} ++ ++void UKUISwitch::setDisableColor(const QBrush &newDisableColor) ++{ ++ if (m_disableColor == newDisableColor) ++ return; ++ m_disableColor = newDisableColor; ++ emit disableColorChanged(); ++} ++ ++const QBrush &UKUISwitch::checkedNormalColor() const ++{ ++ return m_checkedNormalColor; ++} ++ ++void UKUISwitch::setCheckedNormalColor(const QBrush &newCheckedNormalColor) ++{ ++ if (m_checkedNormalColor == newCheckedNormalColor) ++ return; ++ m_checkedNormalColor = newCheckedNormalColor; ++ emit checkedNormalColorChanged(); ++} ++ ++const QBrush &UKUISwitch::checkedHoverColor() const ++{ ++ return m_checkedHoverColor; ++} ++ ++void UKUISwitch::setCheckedHoverColor(const QBrush &newCheckedHoverColor) ++{ ++ if (m_checkedHoverColor == newCheckedHoverColor) ++ return; ++ m_checkedHoverColor = newCheckedHoverColor; ++ emit checkedHoverColorChanged(); ++} ++ ++const QBrush &UKUISwitch::checkedClickColor() const ++{ ++ return m_checkedClickColor; ++} ++ ++void UKUISwitch::setCheckedClickColor(const QBrush &newCheckedClickColor) ++{ ++ if (m_checkedClickColor == newCheckedClickColor) ++ return; ++ m_checkedClickColor = newCheckedClickColor; ++ emit checkedClickColorChanged(); ++} ++ ++const QBrush &UKUISwitch::checkedDisableColor() const ++{ ++ return m_checkedDisableColor; ++} ++ ++void UKUISwitch::setCheckedDisableColor(const QBrush &newCheckedDisableColor) ++{ ++ if (m_checkedDisableColor == newCheckedDisableColor) ++ return; ++ m_checkedDisableColor = newCheckedDisableColor; ++ emit checkedDisableColorChanged(); ++} ++ ++const QBrush &UKUISwitch::normalBorderColor() const ++{ ++ return m_normalBorderColor; ++} ++ ++void UKUISwitch::setNormalBorderColor(const QBrush &newNormalBorderColor) ++{ ++ if (m_normalBorderColor == newNormalBorderColor) ++ return; ++ m_normalBorderColor = newNormalBorderColor; ++ emit normalBorderColorChanged(); ++} ++ ++const QBrush &UKUISwitch::hoverBorderColor() const ++{ ++ return m_hoverBorderColor; ++} ++ ++void UKUISwitch::setHoverBorderColor(const QBrush &newHoverBorderColor) ++{ ++ if (m_hoverBorderColor == newHoverBorderColor) ++ return; ++ m_hoverBorderColor = newHoverBorderColor; ++ emit hoverBorderColorChanged(); ++} ++ ++const QBrush &UKUISwitch::clickBorderColor() const ++{ ++ return m_clickBorderColor; ++} ++ ++void UKUISwitch::setClickBorderColor(const QBrush &newClickBorderColor) ++{ ++ if (m_clickBorderColor == newClickBorderColor) ++ return; ++ m_clickBorderColor = newClickBorderColor; ++ emit clickBorderColorChanged(); ++} ++ ++const QBrush &UKUISwitch::disableBorderColor() const ++{ ++ return m_disableBorderColor; ++} ++ ++void UKUISwitch::setDisableBorderColor(const QBrush &newDisableBorderColor) ++{ ++ if (m_disableBorderColor == newDisableBorderColor) ++ return; ++ m_disableBorderColor = newDisableBorderColor; ++ emit disableBorderColorChanged(); ++} ++ ++const QBrush &UKUISwitch::checkedNormalBorderColor() const ++{ ++ return m_checkedNormalBorderColor; ++} ++ ++void UKUISwitch::setCheckedNormalBorderColor(const QBrush &newCheckedNormalBorderColor) ++{ ++ if (m_checkedNormalBorderColor == newCheckedNormalBorderColor) ++ return; ++ m_checkedNormalBorderColor = newCheckedNormalBorderColor; ++ emit checkedNormalBorderColorChanged(); ++} ++ ++const QBrush &UKUISwitch::checkedHoverBorderColor() const ++{ ++ return m_checkedHoverBorderColor; ++} ++ ++void UKUISwitch::setCheckedHoverBorderColor(const QBrush &newCheckedHoverBorderColor) ++{ ++ if (m_checkedHoverBorderColor == newCheckedHoverBorderColor) ++ return; ++ m_checkedHoverBorderColor = newCheckedHoverBorderColor; ++ emit checkedHoverBorderColorChanged(); ++} ++ ++const QBrush &UKUISwitch::checkedClickBorderColor() const ++{ ++ return m_checkedClickBorderColor; ++} ++ ++void UKUISwitch::setCheckedClickBorderColor(const QBrush &newCheckedClickBorderColor) ++{ ++ if (m_checkedClickBorderColor == newCheckedClickBorderColor) ++ return; ++ m_checkedClickBorderColor = newCheckedClickBorderColor; ++ emit checkedClickBorderColorChanged(); ++} ++ ++const QBrush &UKUISwitch::checkedDisableBorderColor() const ++{ ++ return m_checkedDisableBorderColor; ++} ++ ++void UKUISwitch::setCheckedDisableBorderColor(const QBrush &newCheckedDisableBorderColor) ++{ ++ if (m_checkedDisableBorderColor == newCheckedDisableBorderColor) ++ return; ++ m_checkedDisableBorderColor = newCheckedDisableBorderColor; ++ emit checkedDisableBorderColorChanged(); ++} ++ ++int UKUISwitch::borderWidth() const ++{ ++ return m_borderWidth; ++} ++ ++void UKUISwitch::setBorderWidth(int newBorderWidth) ++{ ++ if (m_borderWidth == newBorderWidth) ++ return; ++ m_borderWidth = newBorderWidth; ++ emit borderWidthChanged(); ++} ++ ++const QBrush &UKUISwitch::normalIndicatorColor() const ++{ ++ return m_normalIndicatorColor; ++} ++ ++void UKUISwitch::setNormalIndicatorColor(const QBrush &newNormalIndicatorColor) ++{ ++ if (m_normalIndicatorColor == newNormalIndicatorColor) ++ return; ++ m_normalIndicatorColor = newNormalIndicatorColor; ++ emit normalIndicatorColorChanged(); ++} ++ ++const QBrush &UKUISwitch::disableIndicatorColor() const ++{ ++ return m_disableIndicatorColor; ++} ++ ++void UKUISwitch::setDisableIndicatorColor(const QBrush &newDisableIndicatorColor) ++{ ++ if (m_disableIndicatorColor == newDisableIndicatorColor) ++ return; ++ m_disableIndicatorColor = newDisableIndicatorColor; ++ emit disableIndicatorColorChanged(); ++} ++ ++int UKUISwitch::indicatorWidth() const ++{ ++ return m_indicatorWidth; ++} ++ ++void UKUISwitch::setIndicatorWidth(int newIndicatorWidth) ++{ ++ if (m_indicatorWidth == newIndicatorWidth) ++ return; ++ m_indicatorWidth = newIndicatorWidth; ++ emit indicatorWidthChanged(); ++} ++ ++int UKUISwitch::recWidth() const ++{ ++ return m_recWidth; ++} ++ ++void UKUISwitch::setRecWidth(int newRecWidth) ++{ ++ if (m_recWidth == newRecWidth) ++ return; ++ m_recWidth = newRecWidth; ++ emit recWidthHChanged(); ++} ++ ++int UKUISwitch::recHeight() const ++{ ++ return m_recHeight; ++} ++ ++void UKUISwitch::setRecHeight(int newRecHeight) ++{ ++ if (m_recHeight == newRecHeight) ++ return; ++ m_recHeight = newRecHeight; ++ emit recHeightChanged(); ++} ++ ++int UKUISwitch::indicatorLeftRightPadding() const ++{ ++ return m_indicatorLeftRightPadding; ++} ++ ++void UKUISwitch::setIndicatorLeftRightPadding(int newIndicatorLeftRightPadding) ++{ ++ if (m_indicatorLeftRightPadding == newIndicatorLeftRightPadding) ++ return; ++ m_indicatorLeftRightPadding = newIndicatorLeftRightPadding; ++ emit indicatorLeftRightPaddingChanged(); ++} +diff --git a/ukui-qml-style-helper/styleparameter/ukuiswitch.h b/ukui-qml-style-helper/styleparameter/ukuiswitch.h +new file mode 100644 +index 0000000..f2c324a +--- /dev/null ++++ b/ukui-qml-style-helper/styleparameter/ukuiswitch.h +@@ -0,0 +1,235 @@ ++/* ++ * Qt5-UKUI's Library ++ * ++ * Copyright (C) 2023, KylinSoft Co., Ltd. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 3 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this library. If not, see <https://www.gnu.org/licenses/>. ++ * ++ * Authors: Yan Wang <wangyan@kylinos.cn> ++ * ++ */ ++ ++#ifndef UKUISWITCH_H ++#define UKUISWITCH_H ++ ++#include <QObject> ++#include <QColor> ++#include <QFont> ++#include <QApplication> ++#include <QPalette> ++#include <QtQml/qqml.h> ++#include <QQuickItem> ++#include "tokenparameter.h" ++ ++namespace UKUIQQC2Style { ++ ++class UKUISwitch : public QQuickItem ++{ ++ Q_OBJECT ++ ++ Q_PROPERTY(QBrush normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) ++ Q_PROPERTY(QBrush hoverColor READ hoverColor WRITE setHoverColor NOTIFY hoverColorChanged) ++ Q_PROPERTY(QBrush clickColor READ clickColor WRITE setClickColor NOTIFY clickColorChanged) ++ Q_PROPERTY(QBrush disableColor READ disableColor WRITE setDisableColor NOTIFY disableColorChanged) ++ ++ Q_PROPERTY(QBrush checkedNormalColor READ checkedNormalColor WRITE setCheckedNormalColor NOTIFY checkedNormalColorChanged) ++ Q_PROPERTY(QBrush checkedHoverColor READ checkedHoverColor WRITE setCheckedHoverColor NOTIFY checkedHoverColorChanged) ++ Q_PROPERTY(QBrush checkedClickColor READ checkedClickColor WRITE setCheckedClickColor NOTIFY checkedClickColorChanged) ++ Q_PROPERTY(QBrush checkedDisableColor READ checkedDisableColor WRITE setCheckedDisableColor NOTIFY checkedDisableColorChanged) ++ ++ Q_PROPERTY(QBrush normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) ++ Q_PROPERTY(QBrush hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) ++ Q_PROPERTY(QBrush clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) ++ Q_PROPERTY(QBrush disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) ++ ++ Q_PROPERTY(QBrush checkedNormalBorderColor READ checkedNormalBorderColor WRITE setCheckedNormalBorderColor NOTIFY checkedNormalBorderColorChanged) ++ Q_PROPERTY(QBrush checkedHoverBorderColor READ checkedHoverBorderColor WRITE setCheckedHoverBorderColor NOTIFY checkedHoverBorderColorChanged) ++ Q_PROPERTY(QBrush checkedClickBorderColor READ checkedClickBorderColor WRITE setCheckedClickBorderColor NOTIFY checkedClickBorderColorChanged) ++ Q_PROPERTY(QBrush checkedDisableBorderColor READ checkedDisableBorderColor WRITE setCheckedDisableBorderColor NOTIFY checkedDisableBorderColorChanged) ++ ++ Q_PROPERTY(QBrush normalIndicatorColor READ normalIndicatorColor WRITE setNormalIndicatorColor NOTIFY normalIndicatorColorChanged) ++ Q_PROPERTY(QBrush disableIndicatorColor READ disableIndicatorColor WRITE setDisableIndicatorColor NOTIFY disableIndicatorColorChanged) ++ ++ Q_PROPERTY(int padding READ padding WRITE setPadding NOTIFY paddingChanged) ++ Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) ++ Q_PROPERTY(int recWidth READ recWidth WRITE setRecWidth NOTIFY recWidthHChanged) ++ Q_PROPERTY(int recHeight READ recHeight WRITE setRecHeight NOTIFY recHeightChanged) ++ Q_PROPERTY(int indicatorWidth READ indicatorWidth WRITE setIndicatorWidth NOTIFY indicatorWidthChanged) ++ Q_PROPERTY(int indicatorLeftRightPadding READ indicatorLeftRightPadding WRITE setIndicatorLeftRightPadding NOTIFY indicatorLeftRightPaddingChanged) ++ ++public: ++ explicit UKUISwitch(QQuickItem *parent = nullptr); ++ ~UKUISwitch(); ++ ++ void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); ++ ++ static UKUISwitch* qmlAttachedProperties(QObject* parent); ++ ++ const QBrush &normalColor() const; ++ void setNormalColor(const QBrush &newNormalColor); ++ ++ int padding() const; ++ void setPadding(int newPadding); ++ ++ const QBrush &hoverColor() const; ++ void setHoverColor(const QBrush &newHoverColor); ++ ++ const QBrush &clickColor() const; ++ void setClickColor(const QBrush &newClickColor); ++ ++ const QBrush &disableColor() const; ++ void setDisableColor(const QBrush &newDisableColor); ++ ++ const QBrush &checkedNormalColor() const; ++ void setCheckedNormalColor(const QBrush &newCheckedNormalColor); ++ ++ const QBrush &checkedHoverColor() const; ++ void setCheckedHoverColor(const QBrush &newCheckedHoverColor); ++ ++ const QBrush &checkedClickColor() const; ++ void setCheckedClickColor(const QBrush &newCheckedClickColor); ++ ++ const QBrush &checkedDisableColor() const; ++ void setCheckedDisableColor(const QBrush &newCheckedDisableColor); ++ ++ const QBrush &normalBorderColor() const; ++ void setNormalBorderColor(const QBrush &newNormalBorderColor); ++ ++ const QBrush &hoverBorderColor() const; ++ void setHoverBorderColor(const QBrush &newHoverBorderColor); ++ ++ const QBrush &clickBorderColor() const; ++ void setClickBorderColor(const QBrush &newClickBorderColor); ++ ++ const QBrush &disableBorderColor() const; ++ void setDisableBorderColor(const QBrush &newDisableBorderColor); ++ ++ const QBrush &checkedNormalBorderColor() const; ++ void setCheckedNormalBorderColor(const QBrush &newCheckedNormalBorderColor); ++ ++ const QBrush &checkedHoverBorderColor() const; ++ void setCheckedHoverBorderColor(const QBrush &newCheckedHoverBorderColor); ++ ++ const QBrush &checkedClickBorderColor() const; ++ void setCheckedClickBorderColor(const QBrush &newCheckedClickBorderColor); ++ ++ const QBrush &checkedDisableBorderColor() const; ++ void setCheckedDisableBorderColor(const QBrush &newCheckedDisableBorderColor); ++ ++ int borderWidth() const; ++ void setBorderWidth(int newBorderWidth); ++ ++ const QBrush &normalIndicatorColor() const; ++ void setNormalIndicatorColor(const QBrush &newNormalIndicatorColor); ++ ++ const QBrush &disableIndicatorColor() const; ++ void setDisableIndicatorColor(const QBrush &newDisableIndicatorColor); ++ ++ int indicatorWidth() const; ++ void setIndicatorWidth(int newIndicatorWidth); ++ ++ int recWidth() const; ++ void setRecWidth(int newRecWidth); ++ ++ int recHeight() const; ++ void setRecHeight(int newRecHeight); ++ ++ int indicatorLeftRightPadding() const; ++ void setIndicatorLeftRightPadding(int newIndicatorLeftRightPadding); ++ ++signals: ++ void normalColorChanged(); ++ ++ void paddingChanged(); ++ ++ void hoverColorChanged(); ++ ++ void clickColorChanged(); ++ ++ void disableColorChanged(); ++ ++ void parametryChanged(); ++ ++ void checkedNormalColorChanged(); ++ ++ void checkedHoverColorChanged(); ++ ++ void checkedClickColorChanged(); ++ ++ void checkedDisableColorChanged(); ++ ++ void normalBorderColorChanged(); ++ ++ void hoverBorderColorChanged(); ++ ++ void clickBorderColorChanged(); ++ ++ void disableBorderColorChanged(); ++ ++ void checkedNormalBorderColorChanged(); ++ ++ void checkedHoverBorderColorChanged(); ++ ++ void checkedClickBorderColorChanged(); ++ ++ void checkedDisableBorderColorChanged(); ++ ++ void borderWidthChanged(); ++ ++ void normalIndicatorColorChanged(); ++ ++ void disableIndicatorColorChanged(); ++ ++ void indicatorWidthChanged(); ++ ++ void recWidthHChanged(); ++ ++ void recHeightChanged(); ++ ++ void indicatorLeftRightPaddingChanged(); ++ ++private: ++ Q_INVOKABLE QBrush m_normalColor = QBrush(QColor::fromRgbF(0, 0, 0, 0.85)); ++ ++ int m_padding = 2; ++ Q_INVOKABLE QBrush m_hoverColor; ++ Q_INVOKABLE QBrush m_clickColor; ++ Q_INVOKABLE QBrush m_disableColor; ++ ++ UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; ++ ++ QBrush m_checkedNormalColor; ++ QBrush m_checkedHoverColor; ++ QBrush m_checkedClickColor; ++ QBrush m_checkedDisableColor; ++ QBrush m_normalBorderColor; ++ QBrush m_hoverBorderColor; ++ QBrush m_clickBorderColor; ++ QBrush m_disableBorderColor; ++ QBrush m_checkedNormalBorderColor; ++ QBrush m_checkedHoverBorderColor; ++ QBrush m_checkedClickBorderColor; ++ QBrush m_checkedDisableBorderColor; ++ int m_borderWidth; ++ QBrush m_normalIndicatorColor; ++ QBrush m_disableIndicatorColor; ++ int m_indicatorWidth; ++ int m_recWidth; ++ int m_recHeight; ++ int m_indicatorLeftRightPadding; ++}; ++} ++QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUISwitch, QML_HAS_ATTACHED_PROPERTIES) ++ ++#endif // UKUISWITCH_H +diff --git a/ukui-qml-style-helper/styleparameter/ukuitabbar.cpp b/ukui-qml-style-helper/styleparameter/ukuitabbar.cpp +index 7a3e512..614a2ec 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuitabbar.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuitabbar.cpp +@@ -23,6 +23,9 @@ UKUITabBar::~UKUITabBar() + void UKUITabBar::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + { + setNormalColor(instance->kContainSecondaryNormal()); ++ ++ emit parametryChanged(); ++ + } + + UKUITabBar* UKUITabBar::qmlAttachedProperties(QObject* parent) +@@ -31,12 +34,12 @@ UKUITabBar* UKUITabBar::qmlAttachedProperties(QObject* parent) + return new UKUITabBar(p); + } + +-const DTColor &UKUITabBar::normalColor() const ++const QBrush &UKUITabBar::normalColor() const + { + return m_normalColor; + } + +-void UKUITabBar::setNormalColor(const DTColor &newNormalColor) ++void UKUITabBar::setNormalColor(const QBrush &newNormalColor) + { + if (m_normalColor == newNormalColor) + return; +diff --git a/ukui-qml-style-helper/styleparameter/ukuitabbar.h b/ukui-qml-style-helper/styleparameter/ukuitabbar.h +index 224a3a6..f6ee23d 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuitabbar.h ++++ b/ukui-qml-style-helper/styleparameter/ukuitabbar.h +@@ -38,7 +38,7 @@ class UKUITabBar : public QQuickItem + { + Q_OBJECT + +- Q_PROPERTY(DTColor normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) ++ Q_PROPERTY(QBrush normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) + + public: + explicit UKUITabBar(QQuickItem *parent = nullptr); +@@ -48,14 +48,16 @@ public: + + static UKUITabBar* qmlAttachedProperties(QObject* parent); + +- const DTColor &normalColor() const; +- void setNormalColor(const DTColor &newNormalColor); ++ const QBrush &normalColor() const; ++ void setNormalColor(const QBrush &newNormalColor); + + signals: + void normalColorChanged(); + ++ void parametryChanged(); ++ + private: +- Q_INVOKABLE DTColor m_normalColor = DTColor(QColor("#FFFFFF")); ++ Q_INVOKABLE QBrush m_normalColor = QBrush(QColor("#FFFFFF")); + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +diff --git a/ukui-qml-style-helper/styleparameter/ukuitabbutton.cpp b/ukui-qml-style-helper/styleparameter/ukuitabbutton.cpp +index 6a67878..8590859 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuitabbutton.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuitabbutton.cpp +@@ -22,7 +22,7 @@ UKUITabButton::~UKUITabButton() + + void UKUITabButton::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + { +- setNormalColor(DTColor(QColor(0,0,0,0))); ++ setNormalColor(QBrush(QColor(0,0,0,0))); + setHoverColor(instance->kContainHover()); + setClickedColor(instance->kContainClick()); + setCheckedColor(instance->kContainGeneralNormal()); +@@ -32,6 +32,9 @@ void UKUITabButton::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + setClickBorderColor(instance->kLineComponentClick()); + setCheckedBorderColor(instance->kLineComponentNormal()); + setNormalTextColor(instance->kFontPrimary()); ++ ++ emit parametryChanged(); ++ + } + + UKUITabButton* UKUITabButton::qmlAttachedProperties(QObject* parent) +@@ -40,12 +43,12 @@ UKUITabButton* UKUITabButton::qmlAttachedProperties(QObject* parent) + return new UKUITabButton(p); + } + +-const DTColor &UKUITabButton::normalColor() const ++const QBrush &UKUITabButton::normalColor() const + { + return m_normalColor; + } + +-void UKUITabButton::setNormalColor(const DTColor &newNormalColor) ++void UKUITabButton::setNormalColor(const QBrush &newNormalColor) + { + if (m_normalColor == newNormalColor) + return; +@@ -53,12 +56,12 @@ void UKUITabButton::setNormalColor(const DTColor &newNormalColor) + emit normalColorChanged(); + } + +-const DTColor &UKUITabButton::hoverColor() const ++const QBrush &UKUITabButton::hoverColor() const + { + return m_hoverColor; + } + +-void UKUITabButton::setHoverColor(const DTColor &newHoverColor) ++void UKUITabButton::setHoverColor(const QBrush &newHoverColor) + { + if (m_hoverColor == newHoverColor) + return; +@@ -66,12 +69,12 @@ void UKUITabButton::setHoverColor(const DTColor &newHoverColor) + emit hoverColorChanged(); + } + +-const DTColor &UKUITabButton::checkedColor() const ++const QBrush &UKUITabButton::checkedColor() const + { + return m_checkedColor; + } + +-void UKUITabButton::setCheckedColor(const DTColor &newCheckedColor) ++void UKUITabButton::setCheckedColor(const QBrush &newCheckedColor) + { + if (m_checkedColor == newCheckedColor) + return; +@@ -79,12 +82,12 @@ void UKUITabButton::setCheckedColor(const DTColor &newCheckedColor) + emit checkedColorChanged(); + } + +-const DTColor &UKUITabButton::clickedColor() const ++const QBrush &UKUITabButton::clickedColor() const + { + return m_clickedColor; + } + +-void UKUITabButton::setClickedColor(const DTColor &newClickedColor) ++void UKUITabButton::setClickedColor(const QBrush &newClickedColor) + { + if (m_clickedColor == newClickedColor) + return; +@@ -105,12 +108,12 @@ void UKUITabButton::setBorderWidth(int newBorderWidth) + emit borderWidthChanged(); + } + +-const DTColor &UKUITabButton::normalBorderColor() const ++const QBrush &UKUITabButton::normalBorderColor() const + { + return m_normalBorderColor; + } + +-void UKUITabButton::setNormalBorderColor(const DTColor &newNormalBorderColor) ++void UKUITabButton::setNormalBorderColor(const QBrush &newNormalBorderColor) + { + if (m_normalBorderColor == newNormalBorderColor) + return; +@@ -118,12 +121,12 @@ void UKUITabButton::setNormalBorderColor(const DTColor &newNormalBorderColor) + emit normalBorderColorChanged(); + } + +-const DTColor &UKUITabButton::hoverBorderColor() const ++const QBrush &UKUITabButton::hoverBorderColor() const + { + return m_hoverBorderColor; + } + +-void UKUITabButton::setHoverBorderColor(const DTColor &newHoverBorderColor) ++void UKUITabButton::setHoverBorderColor(const QBrush &newHoverBorderColor) + { + if (m_hoverBorderColor == newHoverBorderColor) + return; +@@ -131,12 +134,12 @@ void UKUITabButton::setHoverBorderColor(const DTColor &newHoverBorderColor) + emit hoverBorderColorChanged(); + } + +-const DTColor &UKUITabButton::clickBorderColor() const ++const QBrush &UKUITabButton::clickBorderColor() const + { + return m_clickBorderColor; + } + +-void UKUITabButton::setClickBorderColor(const DTColor &newClickBorderColor) ++void UKUITabButton::setClickBorderColor(const QBrush &newClickBorderColor) + { + if (m_clickBorderColor == newClickBorderColor) + return; +@@ -144,12 +147,12 @@ void UKUITabButton::setClickBorderColor(const DTColor &newClickBorderColor) + emit clickBorderColorChanged(); + } + +-const DTColor &UKUITabButton::checkedBorderColor() const ++const QBrush &UKUITabButton::checkedBorderColor() const + { + return m_checkedBorderColor; + } + +-void UKUITabButton::setCheckedBorderColor(const DTColor &newCheckedBorderColor) ++void UKUITabButton::setCheckedBorderColor(const QBrush &newCheckedBorderColor) + { + if (m_checkedBorderColor == newCheckedBorderColor) + return; +@@ -157,12 +160,12 @@ void UKUITabButton::setCheckedBorderColor(const DTColor &newCheckedBorderColor) + emit checkedBorderColorChanged(); + } + +-const DTColor &UKUITabButton::normalTextColor() const ++const QBrush &UKUITabButton::normalTextColor() const + { + return m_normalTextColor; + } + +-void UKUITabButton::setNormalTextColor(const DTColor &newNormalTextColor) ++void UKUITabButton::setNormalTextColor(const QBrush &newNormalTextColor) + { + if (m_normalTextColor == newNormalTextColor) + return; +diff --git a/ukui-qml-style-helper/styleparameter/ukuitabbutton.h b/ukui-qml-style-helper/styleparameter/ukuitabbutton.h +index 8ccc450..9bb01b1 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuitabbutton.h ++++ b/ukui-qml-style-helper/styleparameter/ukuitabbutton.h +@@ -38,19 +38,19 @@ class UKUITabButton : public QQuickItem + { + Q_OBJECT + +- Q_PROPERTY(DTColor normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) +- Q_PROPERTY(DTColor hoverColor READ hoverColor WRITE setHoverColor NOTIFY hoverColorChanged) +- Q_PROPERTY(DTColor checkedColor READ checkedColor WRITE setCheckedColor NOTIFY checkedColorChanged) +- Q_PROPERTY(DTColor clickedColor READ clickedColor WRITE setClickedColor NOTIFY clickedColorChanged) +- Q_PROPERTY(DTColor checkedColor READ checkedColor WRITE setCheckedColor NOTIFY checkedColorColorChanged) ++ Q_PROPERTY(QBrush normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) ++ Q_PROPERTY(QBrush hoverColor READ hoverColor WRITE setHoverColor NOTIFY hoverColorChanged) ++ Q_PROPERTY(QBrush checkedColor READ checkedColor WRITE setCheckedColor NOTIFY checkedColorChanged) ++ Q_PROPERTY(QBrush clickedColor READ clickedColor WRITE setClickedColor NOTIFY clickedColorChanged) ++ Q_PROPERTY(QBrush checkedColor READ checkedColor WRITE setCheckedColor NOTIFY checkedColorColorChanged) + + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) +- Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) +- Q_PROPERTY(DTColor hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) +- Q_PROPERTY(DTColor clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) +- Q_PROPERTY(DTColor checkedBorderColor READ checkedBorderColor WRITE setCheckedBorderColor NOTIFY checkedBorderColorChanged) ++ Q_PROPERTY(QBrush normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) ++ Q_PROPERTY(QBrush hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) ++ Q_PROPERTY(QBrush clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) ++ Q_PROPERTY(QBrush checkedBorderColor READ checkedBorderColor WRITE setCheckedBorderColor NOTIFY checkedBorderColorChanged) + +- Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY disableTextColorChanged) ++ Q_PROPERTY(QBrush normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY disableTextColorChanged) + + public: + explicit UKUITabButton(QQuickItem *parent = nullptr); +@@ -60,35 +60,35 @@ public: + + static UKUITabButton* qmlAttachedProperties(QObject* parent); + +- const DTColor &normalColor() const; +- void setNormalColor(const DTColor &newNormalColor); ++ const QBrush &normalColor() const; ++ void setNormalColor(const QBrush &newNormalColor); + +- const DTColor &hoverColor() const; +- void setHoverColor(const DTColor &newHoverColor); ++ const QBrush &hoverColor() const; ++ void setHoverColor(const QBrush &newHoverColor); + +- const DTColor &checkedColor() const; +- void setCheckedColor(const DTColor &newCheckedColor); ++ const QBrush &checkedColor() const; ++ void setCheckedColor(const QBrush &newCheckedColor); + +- const DTColor &clickedColor() const; +- void setClickedColor(const DTColor &newClickedColor); ++ const QBrush &clickedColor() const; ++ void setClickedColor(const QBrush &newClickedColor); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); + +- const DTColor &normalBorderColor() const; +- void setNormalBorderColor(const DTColor &newNormalBorderColor); ++ const QBrush &normalBorderColor() const; ++ void setNormalBorderColor(const QBrush &newNormalBorderColor); + +- const DTColor &hoverBorderColor() const; +- void setHoverBorderColor(const DTColor &newHoverBorderColor); ++ const QBrush &hoverBorderColor() const; ++ void setHoverBorderColor(const QBrush &newHoverBorderColor); + +- const DTColor &clickBorderColor() const; +- void setClickBorderColor(const DTColor &newClickBorderColor); ++ const QBrush &clickBorderColor() const; ++ void setClickBorderColor(const QBrush &newClickBorderColor); + +- const DTColor &checkedBorderColor() const; +- void setCheckedBorderColor(const DTColor &newCheckedBorderColor); ++ const QBrush &checkedBorderColor() const; ++ void setCheckedBorderColor(const QBrush &newCheckedBorderColor); + +- const DTColor &normalTextColor() const; +- void setNormalTextColor(const DTColor &newNormalTextColor); ++ const QBrush &normalTextColor() const; ++ void setNormalTextColor(const QBrush &newNormalTextColor); + + signals: + void normalColorChanged(); +@@ -113,17 +113,19 @@ signals: + + void disableTextColorChanged(); + ++ void parametryChanged(); ++ + private: +- Q_INVOKABLE DTColor m_normalColor = DTColor("#FFFFFF"); +- Q_INVOKABLE DTColor m_hoverColor = DTColor("#F2F2F2"); +- Q_INVOKABLE DTColor m_checkedColor = DTColor("#F2F2F2"); +- Q_INVOKABLE DTColor m_clickedColor = DTColor("#EEEEEE"); ++ Q_INVOKABLE QBrush m_normalColor = QBrush("#FFFFFF"); ++ Q_INVOKABLE QBrush m_hoverColor = QBrush("#F2F2F2"); ++ Q_INVOKABLE QBrush m_checkedColor = QBrush("#F2F2F2"); ++ Q_INVOKABLE QBrush m_clickedColor = QBrush("#EEEEEE"); + int m_borderWidth; +- Q_INVOKABLE DTColor m_normalBorderColor; +- Q_INVOKABLE DTColor m_hoverBorderColor; +- Q_INVOKABLE DTColor m_clickBorderColor; +- Q_INVOKABLE DTColor m_checkedBorderColor; +- Q_INVOKABLE DTColor m_normalTextColor; ++ Q_INVOKABLE QBrush m_normalBorderColor; ++ Q_INVOKABLE QBrush m_hoverBorderColor; ++ Q_INVOKABLE QBrush m_clickBorderColor; ++ Q_INVOKABLE QBrush m_checkedBorderColor; ++ Q_INVOKABLE QBrush m_normalTextColor; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +diff --git a/ukui-qml-style-helper/styleparameter/ukuitextfiled.cpp b/ukui-qml-style-helper/styleparameter/ukuitextfiled.cpp +index d00cf2b..a468dc4 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuitextfiled.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuitextfiled.cpp +@@ -5,7 +5,6 @@ using namespace UKUIQQC2Style; + + UKUITextFiled::UKUITextFiled(QQuickItem *parent) : QQuickItem(parent) + { +- qDebug() << "UKUITextFiled.............."; + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); +@@ -29,7 +28,7 @@ UKUITextFiled* UKUITextFiled::qmlAttachedProperties(QObject* parent) + + void UKUITextFiled::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + { +- setLeftRightPadding(instance->kmarginNormal()); ++ setLeftRightPadding(instance->tokenGap8()); + setRadius(instance->kradiusNormal()); + setBorderWidth(instance->normalline()); + setFocusBorderWidth(instance->focusline()); +@@ -51,6 +50,9 @@ void UKUITextFiled::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + setPlaceHolderDisableTextColor(instance->placeholderTextDisable()); + setNormalTextColor(instance->buttonTextActive()); + setDisableTextColor(instance->placeholderTextDisable()); ++ ++ emit parametryChanged(); ++ + } + + double UKUITextFiled::radius() const +@@ -131,12 +133,12 @@ void UKUITextFiled::setNormalHeight(int newNormalHeight) + emit normalHeightChanged(); + } + +-const DTColor &UKUITextFiled::normalBC() const ++const QBrush &UKUITextFiled::normalBC() const + { + return m_normalBC; + } + +-void UKUITextFiled::setNormalBC(const DTColor &newNormalBC) ++void UKUITextFiled::setNormalBC(const QBrush &newNormalBC) + { + if (m_normalBC == newNormalBC) + return; +@@ -144,12 +146,12 @@ void UKUITextFiled::setNormalBC(const DTColor &newNormalBC) + emit normalBCChanged(); + } + +-const DTColor &UKUITextFiled::clickedBC() const ++const QBrush &UKUITextFiled::clickedBC() const + { + return m_clickedBC; + } + +-void UKUITextFiled::setClickedBC(const DTColor &newClickedBC) ++void UKUITextFiled::setClickedBC(const QBrush &newClickedBC) + { + if (m_clickedBC == newClickedBC) + return; +@@ -157,12 +159,12 @@ void UKUITextFiled::setClickedBC(const DTColor &newClickedBC) + emit clickedBCChanged(); + } + +-const DTColor &UKUITextFiled::hoveredBC() const ++const QBrush &UKUITextFiled::hoveredBC() const + { + return m_hoveredBC; + } + +-void UKUITextFiled::setHoveredBC(const DTColor &newHoveredBC) ++void UKUITextFiled::setHoveredBC(const QBrush &newHoveredBC) + { + if (m_hoveredBC == newHoveredBC) + return; +@@ -170,12 +172,12 @@ void UKUITextFiled::setHoveredBC(const DTColor &newHoveredBC) + emit hoveredBCChanged(); + } + +-const DTColor &UKUITextFiled::disableBC() const ++const QBrush &UKUITextFiled::disableBC() const + { + return m_disableBC; + } + +-void UKUITextFiled::setDisableBC(const DTColor &newDisableBC) ++void UKUITextFiled::setDisableBC(const QBrush &newDisableBC) + { + if (m_disableBC == newDisableBC) + return; +@@ -183,12 +185,12 @@ void UKUITextFiled::setDisableBC(const DTColor &newDisableBC) + emit disableBCChanged(); + } + +-const DTColor &UKUITextFiled::disableTextColor() const ++const QBrush &UKUITextFiled::disableTextColor() const + { + return m_disableTextColor; + } + +-void UKUITextFiled::setDisableTextColor(const DTColor &newDisableTextColor) ++void UKUITextFiled::setDisableTextColor(const QBrush &newDisableTextColor) + { + if (m_disableTextColor == newDisableTextColor) + return; +@@ -196,12 +198,12 @@ void UKUITextFiled::setDisableTextColor(const DTColor &newDisableTextColor) + emit disableTextColorChanged(); + } + +-const DTColor &UKUITextFiled::normalTextColor() const ++const QBrush &UKUITextFiled::normalTextColor() const + { + return m_normalTextColor; + } + +-void UKUITextFiled::setNormalTextColor(const DTColor &newNormalTextColor) ++void UKUITextFiled::setNormalTextColor(const QBrush &newNormalTextColor) + { + if (m_normalTextColor == newNormalTextColor) + return; +@@ -235,12 +237,12 @@ void UKUITextFiled::setFocusBorderWidth(int newFocusBorderWidth) + emit focusBorderWidthChanged(); + } + +-const DTColor &UKUITextFiled::normalBorderColor() const ++const QBrush &UKUITextFiled::normalBorderColor() const + { + return m_normalBorderColor; + } + +-void UKUITextFiled::setNormalBorderColor(const DTColor &newNormalBorderColor) ++void UKUITextFiled::setNormalBorderColor(const QBrush &newNormalBorderColor) + { + if (m_normalBorderColor == newNormalBorderColor) + return; +@@ -248,12 +250,12 @@ void UKUITextFiled::setNormalBorderColor(const DTColor &newNormalBorderColor) + emit normalBorderColorChanged(); + } + +-const DTColor &UKUITextFiled::clickBorderColor() const ++const QBrush &UKUITextFiled::clickBorderColor() const + { + return m_clickBorderColor; + } + +-void UKUITextFiled::setClickBorderColor(const DTColor &newClickBorderColor) ++void UKUITextFiled::setClickBorderColor(const QBrush &newClickBorderColor) + { + if (m_clickBorderColor == newClickBorderColor) + return; +@@ -261,12 +263,12 @@ void UKUITextFiled::setClickBorderColor(const DTColor &newClickBorderColor) + emit clickBorderColorChanged(); + } + +-const DTColor &UKUITextFiled::disableBorderColor() const ++const QBrush &UKUITextFiled::disableBorderColor() const + { + return m_disableBorderColor; + } + +-void UKUITextFiled::setDisableBorderColor(const DTColor &newDisableBorderColor) ++void UKUITextFiled::setDisableBorderColor(const QBrush &newDisableBorderColor) + { + if (m_disableBorderColor == newDisableBorderColor) + return; +@@ -274,12 +276,12 @@ void UKUITextFiled::setDisableBorderColor(const DTColor &newDisableBorderColor) + emit disableBorderColorChanged(); + } + +-const DTColor &UKUITextFiled::focusBorderColor() const ++const QBrush &UKUITextFiled::focusBorderColor() const + { + return m_focusBorderColor; + } + +-void UKUITextFiled::setFocusBorderColor(const DTColor &newFocusBorderColor) ++void UKUITextFiled::setFocusBorderColor(const QBrush &newFocusBorderColor) + { + if (m_focusBorderColor == newFocusBorderColor) + return; +@@ -287,12 +289,12 @@ void UKUITextFiled::setFocusBorderColor(const DTColor &newFocusBorderColor) + emit focusBorderColorChanged(); + } + +-const DTColor &UKUITextFiled::hoverBorderColor() const ++const QBrush &UKUITextFiled::hoverBorderColor() const + { + return m_hoverBorderColor; + } + +-void UKUITextFiled::setHoverBorderColor(const DTColor &newHoverBorderColor) ++void UKUITextFiled::setHoverBorderColor(const QBrush &newHoverBorderColor) + { + if (m_hoverBorderColor == newHoverBorderColor) + return; +@@ -300,12 +302,12 @@ void UKUITextFiled::setHoverBorderColor(const DTColor &newHoverBorderColor) + emit hoverBorderColorChanged(); + } + +-const DTColor &UKUITextFiled::placeHolderNormalTextColor() const ++const QBrush &UKUITextFiled::placeHolderNormalTextColor() const + { + return m_placeHolderNormalTextColor; + } + +-void UKUITextFiled::setPlaceHolderNormalTextColor(const DTColor &newPlaceHolderNormalTextColor) ++void UKUITextFiled::setPlaceHolderNormalTextColor(const QBrush &newPlaceHolderNormalTextColor) + { + if (m_placeHolderNormalTextColor == newPlaceHolderNormalTextColor) + return; +@@ -313,12 +315,12 @@ void UKUITextFiled::setPlaceHolderNormalTextColor(const DTColor &newPlaceHolderN + emit placeHolderNormalTextColorChanged(); + } + +-const DTColor &UKUITextFiled::placeHolderDisableTextColor() const ++const QBrush &UKUITextFiled::placeHolderDisableTextColor() const + { + return m_placeHolderDisableTextColor; + } + +-void UKUITextFiled::setPlaceHolderDisableTextColor(const DTColor &newPlaceHolderDisableTextColor) ++void UKUITextFiled::setPlaceHolderDisableTextColor(const QBrush &newPlaceHolderDisableTextColor) + { + if (m_placeHolderDisableTextColor == newPlaceHolderDisableTextColor) + return; +@@ -326,12 +328,12 @@ void UKUITextFiled::setPlaceHolderDisableTextColor(const DTColor &newPlaceHolder + emit placeHolderDisableTextColorChanged(); + } + +-const DTColor &UKUITextFiled::placeHolderNormalBC() const ++const QBrush &UKUITextFiled::placeHolderNormalBC() const + { + return m_placeHolderNormalBC; + } + +-void UKUITextFiled::setPlaceHolderNormalBC(const DTColor &newPlaceHolderNormalBC) ++void UKUITextFiled::setPlaceHolderNormalBC(const QBrush &newPlaceHolderNormalBC) + { + if (m_placeHolderNormalBC == newPlaceHolderNormalBC) + return; +@@ -339,12 +341,12 @@ void UKUITextFiled::setPlaceHolderNormalBC(const DTColor &newPlaceHolderNormalBC + emit placeHolderNormalBCChanged(); + } + +-const DTColor &UKUITextFiled::placeHolderClickedBC() const ++const QBrush &UKUITextFiled::placeHolderClickedBC() const + { + return m_placeHolderClickedBC; + } + +-void UKUITextFiled::setPlaceHolderClickedBC(const DTColor &newPlaceHolderClickedBC) ++void UKUITextFiled::setPlaceHolderClickedBC(const QBrush &newPlaceHolderClickedBC) + { + if (m_placeHolderClickedBC == newPlaceHolderClickedBC) + return; +@@ -352,12 +354,12 @@ void UKUITextFiled::setPlaceHolderClickedBC(const DTColor &newPlaceHolderClicked + emit placeHolderClickedBCChanged(); + } + +-const DTColor &UKUITextFiled::placeHolderHoveredBC() const ++const QBrush &UKUITextFiled::placeHolderHoveredBC() const + { + return m_placeHolderHoveredBC; + } + +-void UKUITextFiled::setPlaceHolderHoveredBC(const DTColor &newPlaceHolderHoveredBC) ++void UKUITextFiled::setPlaceHolderHoveredBC(const QBrush &newPlaceHolderHoveredBC) + { + if (m_placeHolderHoveredBC == newPlaceHolderHoveredBC) + return; +@@ -365,12 +367,12 @@ void UKUITextFiled::setPlaceHolderHoveredBC(const DTColor &newPlaceHolderHovered + emit placeHolderHoveredBCChanged(); + } + +-const DTColor &UKUITextFiled::placeHolderDisableBC() const ++const QBrush &UKUITextFiled::placeHolderDisableBC() const + { + return m_placeHolderDisableBC; + } + +-void UKUITextFiled::setPlaceHolderDisableBC(const DTColor &newPlaceHolderDisableBC) ++void UKUITextFiled::setPlaceHolderDisableBC(const QBrush &newPlaceHolderDisableBC) + { + if (m_placeHolderDisableBC == newPlaceHolderDisableBC) + return; +@@ -378,12 +380,12 @@ void UKUITextFiled::setPlaceHolderDisableBC(const DTColor &newPlaceHolderDisable + emit placeHolderDisableBCChanged(); + } + +-const DTColor &UKUITextFiled::inputNormalBC() const ++const QBrush &UKUITextFiled::inputNormalBC() const + { + return m_inputNormalBC; + } + +-void UKUITextFiled::setInputNormalBC(const DTColor &newInputNormalBC) ++void UKUITextFiled::setInputNormalBC(const QBrush &newInputNormalBC) + { + if (m_inputNormalBC == newInputNormalBC) + return; +diff --git a/ukui-qml-style-helper/styleparameter/ukuitextfiled.h b/ukui-qml-style-helper/styleparameter/ukuitextfiled.h +index a4966bf..4bde590 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuitextfiled.h ++++ b/ukui-qml-style-helper/styleparameter/ukuitextfiled.h +@@ -42,31 +42,31 @@ class UKUITextFiled : public QQuickItem + + Q_PROPERTY(int normalWidth READ normalWidth WRITE setNormalWidth NOTIFY normalWidthChanged) + Q_PROPERTY(int normalHeight READ normalHeight WRITE setNormalHeight NOTIFY normalHeightChanged) +- Q_PROPERTY(DTColor normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) +- Q_PROPERTY(DTColor inputNormalBC READ inputNormalBC WRITE setInputNormalBC NOTIFY inputNormalBCChanged) ++ Q_PROPERTY(QBrush normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) ++ Q_PROPERTY(QBrush inputNormalBC READ inputNormalBC WRITE setInputNormalBC NOTIFY inputNormalBCChanged) + +- Q_PROPERTY(DTColor clickedBC READ clickedBC WRITE setClickedBC NOTIFY clickedBCChanged) +- Q_PROPERTY(DTColor hoveredBC READ hoveredBC WRITE setHoveredBC NOTIFY hoveredBCChanged) +- Q_PROPERTY(DTColor disableBC READ disableBC WRITE setDisableBC NOTIFY disableBCChanged) ++ Q_PROPERTY(QBrush clickedBC READ clickedBC WRITE setClickedBC NOTIFY clickedBCChanged) ++ Q_PROPERTY(QBrush hoveredBC READ hoveredBC WRITE setHoveredBC NOTIFY hoveredBCChanged) ++ Q_PROPERTY(QBrush disableBC READ disableBC WRITE setDisableBC NOTIFY disableBCChanged) + +- Q_PROPERTY(DTColor placeHolderNormalBC READ placeHolderNormalBC WRITE setPlaceHolderNormalBC NOTIFY placeHolderNormalBCChanged) +- Q_PROPERTY(DTColor placeHolderClickedBC READ placeHolderClickedBC WRITE setPlaceHolderClickedBC NOTIFY placeHolderClickedBCChanged) +- Q_PROPERTY(DTColor placeHolderHoveredBC READ placeHolderHoveredBC WRITE setPlaceHolderHoveredBC NOTIFY placeHolderHoveredBCChanged) +- Q_PROPERTY(DTColor placeHolderDisableBC READ placeHolderDisableBC WRITE setPlaceHolderDisableBC NOTIFY placeHolderDisableBCChanged) ++ Q_PROPERTY(QBrush placeHolderNormalBC READ placeHolderNormalBC WRITE setPlaceHolderNormalBC NOTIFY placeHolderNormalBCChanged) ++ Q_PROPERTY(QBrush placeHolderClickedBC READ placeHolderClickedBC WRITE setPlaceHolderClickedBC NOTIFY placeHolderClickedBCChanged) ++ Q_PROPERTY(QBrush placeHolderHoveredBC READ placeHolderHoveredBC WRITE setPlaceHolderHoveredBC NOTIFY placeHolderHoveredBCChanged) ++ Q_PROPERTY(QBrush placeHolderDisableBC READ placeHolderDisableBC WRITE setPlaceHolderDisableBC NOTIFY placeHolderDisableBCChanged) + +- Q_PROPERTY(DTColor placeHolderNormalTextColor READ placeHolderNormalTextColor WRITE setPlaceHolderNormalTextColor NOTIFY placeHolderNormalTextColorChanged) +- Q_PROPERTY(DTColor placeHolderDisableTextColor READ placeHolderDisableTextColor WRITE setPlaceHolderDisableTextColor NOTIFY placeHolderDisableTextColorChanged) +- Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) +- Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) ++ Q_PROPERTY(QBrush placeHolderNormalTextColor READ placeHolderNormalTextColor WRITE setPlaceHolderNormalTextColor NOTIFY placeHolderNormalTextColorChanged) ++ Q_PROPERTY(QBrush placeHolderDisableTextColor READ placeHolderDisableTextColor WRITE setPlaceHolderDisableTextColor NOTIFY placeHolderDisableTextColorChanged) ++ Q_PROPERTY(QBrush disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) ++ Q_PROPERTY(QBrush normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) + + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) + Q_PROPERTY(int focusBorderWidth READ focusBorderWidth WRITE setFocusBorderWidth NOTIFY focusBorderWidthChanged) +- Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) +- Q_PROPERTY(DTColor hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) ++ Q_PROPERTY(QBrush normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) ++ Q_PROPERTY(QBrush hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) + +- Q_PROPERTY(DTColor clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) +- Q_PROPERTY(DTColor disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) +- Q_PROPERTY(DTColor focusBorderColor READ focusBorderColor WRITE setFocusBorderColor NOTIFY focusBorderColorChanged) ++ Q_PROPERTY(QBrush clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) ++ Q_PROPERTY(QBrush disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) ++ Q_PROPERTY(QBrush focusBorderColor READ focusBorderColor WRITE setFocusBorderColor NOTIFY focusBorderColorChanged) + + + public: +@@ -96,23 +96,23 @@ public: + int normalHeight() const; + void setNormalHeight(int newNormalHeight); + +- const DTColor &normalBC() const; +- void setNormalBC(const DTColor &newNormalBC); ++ const QBrush &normalBC() const; ++ void setNormalBC(const QBrush &newNormalBC); + +- const DTColor &clickedBC() const; +- void setClickedBC(const DTColor &newClickedBC); ++ const QBrush &clickedBC() const; ++ void setClickedBC(const QBrush &newClickedBC); + +- const DTColor &hoveredBC() const; +- void setHoveredBC(const DTColor &newHoveredBC); ++ const QBrush &hoveredBC() const; ++ void setHoveredBC(const QBrush &newHoveredBC); + +- const DTColor &disableBC() const; +- void setDisableBC(const DTColor &newDisableBC); ++ const QBrush &disableBC() const; ++ void setDisableBC(const QBrush &newDisableBC); + +- const DTColor &disableTextColor() const; +- void setDisableTextColor(const DTColor &newDisableTextColor); ++ const QBrush &disableTextColor() const; ++ void setDisableTextColor(const QBrush &newDisableTextColor); + +- const DTColor &normalTextColor() const; +- void setNormalTextColor(const DTColor &newNormalTextColor); ++ const QBrush &normalTextColor() const; ++ void setNormalTextColor(const QBrush &newNormalTextColor); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); +@@ -120,41 +120,41 @@ public: + int focusBorderWidth() const; + void setFocusBorderWidth(int newFocusBorderWidth); + +- const DTColor &normalBorderColor() const; +- void setNormalBorderColor(const DTColor &newNormalBorderColor); ++ const QBrush &normalBorderColor() const; ++ void setNormalBorderColor(const QBrush &newNormalBorderColor); + +- const DTColor &clickBorderColor() const; +- void setClickBorderColor(const DTColor &newClickBorderColor); ++ const QBrush &clickBorderColor() const; ++ void setClickBorderColor(const QBrush &newClickBorderColor); + +- const DTColor &disableBorderColor() const; +- void setDisableBorderColor(const DTColor &newDisableBorderColor); ++ const QBrush &disableBorderColor() const; ++ void setDisableBorderColor(const QBrush &newDisableBorderColor); + +- const DTColor &focusBorderColor() const; +- void setFocusBorderColor(const DTColor &newFocusBorderColor); ++ const QBrush &focusBorderColor() const; ++ void setFocusBorderColor(const QBrush &newFocusBorderColor); + +- const DTColor &hoverBorderColor() const; +- void setHoverBorderColor(const DTColor &newHoverBorderColor); ++ const QBrush &hoverBorderColor() const; ++ void setHoverBorderColor(const QBrush &newHoverBorderColor); + +- const DTColor &placeHolderNormalTextColor() const; +- void setPlaceHolderNormalTextColor(const DTColor &newPlaceHolderNormalTextColor); ++ const QBrush &placeHolderNormalTextColor() const; ++ void setPlaceHolderNormalTextColor(const QBrush &newPlaceHolderNormalTextColor); + +- const DTColor &placeHolderDisableTextColor() const; +- void setPlaceHolderDisableTextColor(const DTColor &newPlaceHolderDisableTextColor); ++ const QBrush &placeHolderDisableTextColor() const; ++ void setPlaceHolderDisableTextColor(const QBrush &newPlaceHolderDisableTextColor); + +- const DTColor &placeHolderNormalBC() const; +- void setPlaceHolderNormalBC(const DTColor &newPlaceHolderNormalBC); ++ const QBrush &placeHolderNormalBC() const; ++ void setPlaceHolderNormalBC(const QBrush &newPlaceHolderNormalBC); + +- const DTColor &placeHolderClickedBC() const; +- void setPlaceHolderClickedBC(const DTColor &newPlaceHolderClickedBC); ++ const QBrush &placeHolderClickedBC() const; ++ void setPlaceHolderClickedBC(const QBrush &newPlaceHolderClickedBC); + +- const DTColor &placeHolderHoveredBC() const; +- void setPlaceHolderHoveredBC(const DTColor &newPlaceHolderHoveredBC); ++ const QBrush &placeHolderHoveredBC() const; ++ void setPlaceHolderHoveredBC(const QBrush &newPlaceHolderHoveredBC); + +- const DTColor &placeHolderDisableBC() const; +- void setPlaceHolderDisableBC(const DTColor &newPlaceHolderDisableBC); ++ const QBrush &placeHolderDisableBC() const; ++ void setPlaceHolderDisableBC(const QBrush &newPlaceHolderDisableBC); + +- const DTColor &inputNormalBC() const; +- void setInputNormalBC(const DTColor &newInputNormalBC); ++ const QBrush &inputNormalBC() const; ++ void setInputNormalBC(const QBrush &newInputNormalBC); + + signals: + +@@ -210,6 +210,8 @@ signals: + + void inputNormalBCChanged(); + ++ void parametryChanged(); ++ + private: + + double m_radius; +@@ -218,26 +220,26 @@ private: + double m_space; + int m_normalWidth; + int m_normalHeight; +- Q_INVOKABLE DTColor m_normalBC; +- Q_INVOKABLE DTColor m_clickedBC; +- Q_INVOKABLE DTColor m_hoveredBC; +- Q_INVOKABLE DTColor m_disableBC; +- Q_INVOKABLE DTColor m_disableTextColor; +- Q_INVOKABLE DTColor m_normalTextColor; ++ Q_INVOKABLE QBrush m_normalBC; ++ Q_INVOKABLE QBrush m_clickedBC; ++ Q_INVOKABLE QBrush m_hoveredBC; ++ Q_INVOKABLE QBrush m_disableBC; ++ Q_INVOKABLE QBrush m_disableTextColor; ++ Q_INVOKABLE QBrush m_normalTextColor; + int m_borderWidth; + int m_focusBorderWidth; +- Q_INVOKABLE DTColor m_normalBorderColor; +- Q_INVOKABLE DTColor m_clickBorderColor; +- Q_INVOKABLE DTColor m_disableBorderColor; +- Q_INVOKABLE DTColor m_focusBorderColor; +- Q_INVOKABLE DTColor m_hoverBorderColor; +- Q_INVOKABLE DTColor m_placeHolderNormalTextColor; +- Q_INVOKABLE DTColor m_placeHolderDisableTextColor; +- Q_INVOKABLE DTColor m_placeHolderNormalBC; +- Q_INVOKABLE DTColor m_placeHolderClickedBC; +- Q_INVOKABLE DTColor m_placeHolderHoveredBC; +- Q_INVOKABLE DTColor m_placeHolderDisableBC; +- Q_INVOKABLE DTColor m_inputNormalBC; ++ Q_INVOKABLE QBrush m_normalBorderColor; ++ Q_INVOKABLE QBrush m_clickBorderColor; ++ Q_INVOKABLE QBrush m_disableBorderColor; ++ Q_INVOKABLE QBrush m_focusBorderColor; ++ Q_INVOKABLE QBrush m_hoverBorderColor; ++ Q_INVOKABLE QBrush m_placeHolderNormalTextColor; ++ Q_INVOKABLE QBrush m_placeHolderDisableTextColor; ++ Q_INVOKABLE QBrush m_placeHolderNormalBC; ++ Q_INVOKABLE QBrush m_placeHolderClickedBC; ++ Q_INVOKABLE QBrush m_placeHolderHoveredBC; ++ Q_INVOKABLE QBrush m_placeHolderDisableBC; ++ Q_INVOKABLE QBrush m_inputNormalBC; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +diff --git a/ukui-qml-style-helper/styleparameter/ukuitooltip.cpp b/ukui-qml-style-helper/styleparameter/ukuitooltip.cpp +index 44ae5b7..d776942 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuitooltip.cpp ++++ b/ukui-qml-style-helper/styleparameter/ukuitooltip.cpp +@@ -1,5 +1,6 @@ + #include "ukuitooltip.h" + #include "qdebug.h" ++#include "settings/ukui-style-settings.h" + + using namespace UKUIQQC2Style; + +@@ -13,6 +14,16 @@ UKUIToolTip::UKUIToolTip(QQuickItem *parent) : QQuickItem(parent) + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); ++ if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { ++ auto settings = UKUIStyleSettings::globalInstance(); ++ connect(settings, &UKUIStyleSettings::changed, this, [=](const QString &key) { ++ if (key == "menuTransparency" || key == "menu-transparency") { ++ initParam(m_instance); ++ return; ++ } ++ } ++ ); ++ } + } + + UKUIToolTip::~UKUIToolTip() +@@ -23,11 +34,20 @@ UKUIToolTip::~UKUIToolTip() + void UKUIToolTip::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) + { + setPadding(12); +- setBackColor(instance->baseActive()); +- setBackBorderColor(instance->kLineWindowAcitive()); ++ setBackBorderColor(instance->kLineWindowActive()); + //setShadowColor(instance->kShadowMin()); + setTextColor(instance->windowTextActive()); +- setRadius(6); ++ setRadius(instance->kradiusNormal()); ++ QColor c = instance->baseActive().color(); ++ ++ if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { ++ auto opacity = UKUIStyleSettings::globalInstance()->get("menuTransparency").toInt()/100.0; ++ c.setAlphaF(opacity); ++ } ++ setBackColor(c); ++ ++ emit parametryChanged(); ++ + } + + UKUIToolTip* UKUIToolTip::qmlAttachedProperties(QObject* parent) +@@ -49,12 +69,12 @@ void UKUIToolTip::setPadding(int newPadding) + emit paddingChanged(); + } + +-const DTColor &UKUIToolTip::backColor() const ++const QBrush &UKUIToolTip::backColor() const + { + return m_backColor; + } + +-void UKUIToolTip::setBackColor(const DTColor &newBackColor) ++void UKUIToolTip::setBackColor(const QBrush &newBackColor) + { + if (m_backColor == newBackColor) + return; +@@ -62,12 +82,12 @@ void UKUIToolTip::setBackColor(const DTColor &newBackColor) + emit backColorChanged(); + } + +-const DTColor &UKUIToolTip::backBorderColor() const ++const QBrush &UKUIToolTip::backBorderColor() const + { + return m_backBorderColor; + } + +-void UKUIToolTip::setBackBorderColor(const DTColor &newBackBorderColor) ++void UKUIToolTip::setBackBorderColor(const QBrush &newBackBorderColor) + { + if (m_backBorderColor == newBackBorderColor) + return; +@@ -75,12 +95,12 @@ void UKUIToolTip::setBackBorderColor(const DTColor &newBackBorderColor) + emit backBorderColorChanged(); + } + +-const DTColor &UKUIToolTip::shadowColor() const ++const QBrush &UKUIToolTip::shadowColor() const + { + return m_shadowColor; + } + +-void UKUIToolTip::setShadowColor(const DTColor &newShadowColor) ++void UKUIToolTip::setShadowColor(const QBrush &newShadowColor) + { + if (m_shadowColor == newShadowColor) + return; +@@ -88,12 +108,12 @@ void UKUIToolTip::setShadowColor(const DTColor &newShadowColor) + emit shadowColorChanged(); + } + +-const DTColor &UKUIToolTip::textColor() const ++const QBrush &UKUIToolTip::textColor() const + { + return m_textColor; + } + +-void UKUIToolTip::setTextColor(const DTColor &newTextColor) ++void UKUIToolTip::setTextColor(const QBrush &newTextColor) + { + if (m_textColor == newTextColor) + return; +diff --git a/ukui-qml-style-helper/styleparameter/ukuitooltip.h b/ukui-qml-style-helper/styleparameter/ukuitooltip.h +index 29ceeec..2371695 100644 +--- a/ukui-qml-style-helper/styleparameter/ukuitooltip.h ++++ b/ukui-qml-style-helper/styleparameter/ukuitooltip.h +@@ -39,10 +39,10 @@ class UKUIToolTip : public QQuickItem + Q_OBJECT + + Q_PROPERTY(int padding READ padding WRITE setPadding NOTIFY paddingChanged) +- Q_PROPERTY(DTColor backColor READ backColor WRITE setBackColor NOTIFY backColorChanged) +- Q_PROPERTY(DTColor backBorderColor READ backBorderColor WRITE setBackBorderColor NOTIFY backBorderColorChanged) +- Q_PROPERTY(DTColor shadowColor READ shadowColor WRITE setShadowColor NOTIFY shadowColorChanged) +- Q_PROPERTY(DTColor textColor READ textColor WRITE setTextColor NOTIFY textColorChanged) ++ Q_PROPERTY(QBrush backColor READ backColor WRITE setBackColor NOTIFY backColorChanged) ++ Q_PROPERTY(QBrush backBorderColor READ backBorderColor WRITE setBackBorderColor NOTIFY backBorderColorChanged) ++ Q_PROPERTY(QBrush shadowColor READ shadowColor WRITE setShadowColor NOTIFY shadowColorChanged) ++ Q_PROPERTY(QBrush textColor READ textColor WRITE setTextColor NOTIFY textColorChanged) + Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY radiusChanged) + Q_PROPERTY(int margins READ margins WRITE setMargins NOTIFY marginsChanged) + +@@ -57,17 +57,17 @@ public: + int padding() const; + void setPadding(int newPadding); + +- const DTColor &backColor() const; +- void setBackColor(const DTColor &newBackColor); ++ const QBrush &backColor() const; ++ void setBackColor(const QBrush &newBackColor); + +- const DTColor &backBorderColor() const; +- void setBackBorderColor(const DTColor &newBackBorderColor); ++ const QBrush &backBorderColor() const; ++ void setBackBorderColor(const QBrush &newBackBorderColor); + +- const DTColor &shadowColor() const; +- void setShadowColor(const DTColor &newShadowColor); ++ const QBrush &shadowColor() const; ++ void setShadowColor(const QBrush &newShadowColor); + +- const DTColor &textColor() const; +- void setTextColor(const DTColor &newTextColor); ++ const QBrush &textColor() const; ++ void setTextColor(const QBrush &newTextColor); + + int radius() const; + void setRadius(int newRadius); +@@ -90,12 +90,14 @@ signals: + + void marginsChanged(); + ++ void parametryChanged(); ++ + private: + int m_padding = 12; +- Q_INVOKABLE DTColor m_backColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.85)); +- Q_INVOKABLE DTColor m_backBorderColor = DTColor(QColor::fromRgbF(1, 1, 1)); +- Q_INVOKABLE DTColor m_shadowColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.3)); +- Q_INVOKABLE DTColor m_textColor; ++ Q_INVOKABLE QBrush m_backColor = QBrush(QColor::fromRgbF(0, 0, 0, 0.85)); ++ Q_INVOKABLE QBrush m_backBorderColor = QBrush(QColor::fromRgbF(1, 1, 1)); ++ Q_INVOKABLE QBrush m_shadowColor = QBrush(QColor::fromRgbF(0, 0, 0, 0.3)); ++ Q_INVOKABLE QBrush m_textColor; + int m_radius = 6; + int m_margins = 6; + +diff --git a/ukui-qqc2-style/CMakeLists.txt b/ukui-qqc2-style/CMakeLists.txt +index afc942f..eb4d2b2 100644 +--- a/ukui-qqc2-style/CMakeLists.txt ++++ b/ukui-qqc2-style/CMakeLists.txt +@@ -11,12 +11,11 @@ find_package(Qt5 CONFIG REQUIRED COMPONENTS + Gui + ) + +-file(GLOB QML_UKUIFILES "org.ukui.style/*.qml") +-file(GLOB QML_FILES "qml/*.qml") ++file(GLOB QML_UKUIFILES "org.ukui.style/*.qml" "org.ukui.style/qmldir") + file(GLOB PRIVATE_FILES "org.ukui.style/private/*") +-file(GLOB_RECURSE OTHER_FILES qmldir qml.qrc) ++file(GLOB_RECURSE OTHER_FILES qml.qrc) + +-SOURCE_GROUP("QMLFiles" FILES ${QML_FILES} ${QML_UKUIFILES}) ++SOURCE_GROUP("QMLFiles" FILES ${QML_UKUIFILES}) + SOURCE_GROUP("QMLPrivateFiles" FILES ${PRIVATE_FILES}) + SOURCE_GROUP("other files" FILES ${OTHER_FILES}) + +@@ -26,12 +25,12 @@ message("cmake_install_libdir..." , ${CMAKE_INSTALL_LIBDIR}) + + if(UNIX) + # file(GLOB_RECURSE sources ${CMAKE_CURRENT_SOURCE_DIR}/org.ukui.style/*.qml) ++message("CMAKE_LIBRARY_ARCHITECTURE123....." "/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/qml/QtQuick/Controls.2/org.ukui.style/") + +- set(TARGET_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/qt5/qml/QtQuick/Controls.2/org.ukui.style/") ++ ++ set(TARGET_PATH "/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/qml/QtQuick/Controls.2/org.ukui.style/") + message("qqc2 targetpath", ${TARGET_PATH}) +- set(TARGET_FILES ${QML_FILES}) + set(TARGET_UKUIFILES ${QML_UKUIFILES}) +- install(FILES ${TARGET_FILES} DESTINATION ${TARGET_PATH}) + install(FILES ${TARGET_UKUIFILES} DESTINATION ${TARGET_PATH}) + install(FILES ${PRIVATE_FILES} DESTINATION "${TARGET_PATH}/private") + endif() +diff --git a/ukui-qqc2-style/org.ukui.style/ApplicationWindow.qml b/ukui-qqc2-style/org.ukui.style/ApplicationWindow.qml +index fed4d1e..24c496b 100644 +--- a/ukui-qqc2-style/org.ukui.style/ApplicationWindow.qml ++++ b/ukui-qqc2-style/org.ukui.style/ApplicationWindow.qml +@@ -9,8 +9,8 @@ import org.ukui.qqc2style.private 1.0 as StylePrivate + T.ApplicationWindow { + id: window + +- color: palette.window +- palette: StylePrivate.StyleHelper.palette ++ color: app.windowColor ++ palette: app.palette + overlay.modal: Rectangle { + color: Color.transparent(window.palette.shadow, 0.5) + } +@@ -18,5 +18,13 @@ T.ApplicationWindow { + overlay.modeless: Rectangle { + color: Color.transparent(window.palette.shadow, 0.12) + } +- ++ StylePrivate.APPParameter{ ++ id: app ++ onParametryChanged: { ++ window.update() ++ } ++ onPaletteChanged: { ++ window.update() ++ } ++ } + } +diff --git a/ukui-qqc2-style/org.ukui.style/Button.qml b/ukui-qqc2-style/org.ukui.style/Button.qml +index bf11a5f..8a9fd18 100644 +--- a/ukui-qqc2-style/org.ukui.style/Button.qml ++++ b/ukui-qqc2-style/org.ukui.style/Button.qml +@@ -9,10 +9,10 @@ T.Button { + implicitWidth: { + var contentwidth = implicitContentWidth + leftPadding + rightPadding + return Math.max(implicitBackgroundWidth + leftInset + rightInset, +- contentwidth) ++ contentwidth, btn.normalWidth) + } + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, +- implicitContentHeight + topPadding + bottomPadding) ++ implicitContentHeight + topPadding + bottomPadding, btn.normalHeight) + + leftPadding: StylePrivate.UKUIButton.margin + rightPadding: StylePrivate.UKUIButton.margin +@@ -22,33 +22,28 @@ T.Button { + + font: StylePrivate.APPParameter.font + +- NormalControlColor{ +- id:ncColor +-// onControlColorChanged:{ +-// console.log("onControlColorChanged...........", controlRoot.text, ncColor.controlColor) +-// } +- } +- +-// StylePrivate.UKUIButton{ +-// id: btn ++ StylePrivate.UKUIButton{ ++ id: btn + // Component.onCompleted: console.log("UKUIButton 1122333", btn.normalHBC) + +-// } ++ } + // StylePrivate.APPParameter{ + // id: appP + + // Component.onCompleted: console.log("APPParameter 1122333") + // } +- contentItem: IconLabelContent { ++ contentItem: ButtonIconLabelContent { + controlRoot: controlRoot + anchors.centerIn: controlRoot + //onWidthChanged: console.log(controlRoot.text, width) + } + background: BackGroundRectangle{ ++ implicitWidth: btn.normalWidth ++ implicitHeight: btn.normalHeight + controlRoot: controlRoot +- _radius: 6;//StylePrivate.UKUIButton.radius ++ _radius: btn.radius + //Component.onCompleted: console.log("BackGroundRectangle radius", StylePrivate.UKUIButton.radius, StylePrivate.UKUIButton.normalBC) + } +- //Component.onCompleted: console.log("Button radius", StylePrivate.UKUIButton.radius, StylePrivate.UKUIButton.normalBC, StylePrivate.UKUIPopup.shadowColor) ++// Component.onCompleted: console.log("Button radius", btn.radius) + + } +diff --git a/ukui-qqc2-style/org.ukui.style/CheckBox.qml b/ukui-qqc2-style/org.ukui.style/CheckBox.qml +index 191af64..96f55d3 100644 +--- a/ukui-qqc2-style/org.ukui.style/CheckBox.qml ++++ b/ukui-qqc2-style/org.ukui.style/CheckBox.qml +@@ -14,21 +14,22 @@ T.CheckBox { + implicitIndicatorHeight + topPadding + bottomPadding) + + padding: 6 +- spacing: StylePrivate.UKUICheckBox.space +- +- property var borderColor: control.checked ? (!control.enabled ? StylePrivate.UKUICheckBox.checked_disableIndicatorBorderColor : +- control.pressed ? StylePrivate.UKUICheckBox.checked_clickIndicatorBorderColor : control.hovered ? +- StylePrivate.UKUICheckBox.checked_hoverIndicatorBorderColor : StylePrivate.UKUICheckBox.checked_normalIndicatorBorderColor) : +- (!control.enabled ? StylePrivate.UKUICheckBox.disableIndicatorBorderColor : control.pressed ? +- StylePrivate.UKUICheckBox.clickIndicatorBorderColor : control.hovered ? +- StylePrivate.UKUICheckBox.hoverIndicatorBorderColor : StylePrivate.UKUICheckBox.normalIndicatorBorderColor) +- +- property var checkBoxColor: control.checked ? (!control.enabled ? StylePrivate.UKUICheckBox.checked_disableIndicatorColor : +- control.pressed ? StylePrivate.UKUICheckBox.checked_clickIndicatorColor : control.hovered ? +- StylePrivate.UKUICheckBox.checked_hoverIndicatorColor : StylePrivate.UKUICheckBox.checked_normalIndicatorColor) : +- (!control.enabled ? StylePrivate.UKUICheckBox.disableIndicatorColor : control.pressed ? +- StylePrivate.UKUICheckBox.clickIndicatorColor : control.hovered ? +- StylePrivate.UKUICheckBox.hoverIndicatorColor : StylePrivate.UKUICheckBox.normalIndicatorColor) ++ spacing: checkbox.space ++ hoverEnabled: true ++ ++ property var borderColor: control.checked ? (!control.enabled ? checkbox.checked_disableIndicatorBorderColor : ++ control.pressed ? checkbox.checked_clickIndicatorBorderColor : control.hovered ? ++ checkbox.checked_hoverIndicatorBorderColor : checkbox.checked_normalIndicatorBorderColor) : ++ (!control.enabled ? checkbox.disableIndicatorBorderColor : control.pressed ? ++ checkbox.clickIndicatorBorderColor : control.hovered ? ++ checkbox.hoverIndicatorBorderColor : checkbox.normalIndicatorBorderColor) ++ ++ property var checkBoxColor: control.checked ? (!control.enabled ? checkbox.checked_disableIndicatorColor : ++ control.pressed ? checkbox.checked_clickIndicatorColor : control.hovered ? ++ checkbox.checked_hoverIndicatorColor : checkbox.checked_normalIndicatorColor) : ++ (!control.enabled ? checkbox.disableIndicatorColor : control.pressed ? ++ checkbox.clickIndicatorColor : control.hovered ? ++ checkbox.hoverIndicatorColor : checkbox.normalIndicatorColor) + ParseInterface{ + id: parseInterface + } +@@ -44,14 +45,14 @@ T.CheckBox { + + // keep in sync with CheckDelegate.qml (shared CheckIndicator.qml was removed for performance reasons) + indicator: Rectangle { +- implicitWidth: StylePrivate.UKUICheckBox.indicatorWidth +- implicitHeight: StylePrivate.UKUICheckBox.indicatorWidth ++ implicitWidth: checkbox.indicatorWidth ++ implicitHeight: checkbox.indicatorWidth + + x: control.text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2 + y: control.topPadding + (control.availableHeight - height) / 2 +- radius: StylePrivate.UKUICheckBox.radius ++ radius: checkbox.radius + +- border.width: StylePrivate.UKUICheckBox.borderWidth ++ border.width: checkbox.borderWidth + border.color: getStartColor(borderColor) + color: gradientRec.visible ? "transparent" : getStartColor(checkBoxColor) + +@@ -78,7 +79,7 @@ T.CheckBox { + // defaultColor: "#353637" + // color: control.palette.text + source: { +- var model = !control.enabled ? "disenable" : control.checked ? "clicked" : "normal" ++ var model = !control.enabled ? "disenable" : control.checked ? "highlight" : "normal" + return "image://imageProvider/" + "object-select-symbolic" + "/" + model; + } + visible: control.checkState === Qt.Checked +@@ -90,10 +91,10 @@ T.CheckBox { + width: 9 + height: 1 + color: { +- getStartColor(!control.enabled ? StylePrivate.UKUICheckBox.checked_disableChildrenColor : +- control.pressed ? StylePrivate.UKUICheckBox.checked_clickChildrenColor: +- control.hovered ? StylePrivate.UKUICheckBox.checked_hoverChildrenColor: +- StylePrivate.UKUICheckBox.checked_normalChildrenColor) ++ getStartColor(!control.enabled ? checkbox.checked_disableChildrenColor : ++ control.pressed ? checkbox.checked_clickChildrenColor: ++ control.hovered ? checkbox.checked_hoverChildrenColor: ++ checkbox.checked_normalChildrenColor) + } + visible: control.checkState === Qt.PartiallyChecked + } +@@ -104,7 +105,17 @@ T.CheckBox { + rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0 + + text: control.text +- font: StylePrivate.APPParameter.font +- color: getStartColor(control.enabled ? StylePrivate.UKUICheckBox.normalTextColor : StylePrivate.UKUICheckBox.disableTextColor) ++ font: app.font ++ color: getStartColor(control.enabled ? checkbox.normalTextColor : checkbox.disableTextColor) ++ } ++ ++ StylePrivate.APPParameter{ ++ id: app ++ onParametryChanged:{ ++ control.update(); ++ } ++ } ++ StylePrivate.UKUICheckBox{ ++ id: checkbox + } + } +diff --git a/ukui-qqc2-style/org.ukui.style/CheckDelegate.qml b/ukui-qqc2-style/org.ukui.style/CheckDelegate.qml +new file mode 100644 +index 0000000..200499d +--- /dev/null ++++ b/ukui-qqc2-style/org.ukui.style/CheckDelegate.qml +@@ -0,0 +1,194 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2017 The Qt Company Ltd. ++** Contact: http://www.qt.io/licensing/ ++** ++** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL3$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and The Qt Company. For licensing terms ++** and conditions see http://www.qt.io/terms-conditions. For further ++** information use the contact form at http://www.qt.io/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 3 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPLv3 included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 3 requirements ++** will be met: https://www.gnu.org/licenses/lgpl.html. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or later as published by the Free ++** Software Foundation and appearing in the file LICENSE.GPL included in ++** the packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 2.0 requirements will be ++** met: http://www.gnu.org/licenses/gpl-2.0.html. ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++import QtQuick 2.12 ++import QtQuick.Templates 2.12 as T ++import QtQuick.Controls 2.12 ++import QtQuick.Controls.impl 2.12 ++import org.ukui.qqc2style.private 1.0 as StylePrivate ++ ++T.CheckDelegate { ++ id: control ++ ++ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, ++ implicitContentWidth + spacing + leftPadding + rightPadding) ++ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, ++ implicitContentHeight + topPadding + bottomPadding, ++ implicitIndicatorHeight + topPadding + bottomPadding) ++ ++ padding: checkbox.upDownMargin ++ spacing: checkbox.space ++ leftPadding: checkbox.leftRightMargin ++ ++ icon.width: app.iconWidth ++ icon.height: app.iconWidth ++ icon.color: control.palette.text ++ hoverEnabled: true ++ ++ property var borderColor: control.checked ? (!control.enabled ? checkbox.checked_disableIndicatorBorderColor : ++ control.pressed ? checkbox.checked_clickIndicatorBorderColor : control.hovered ? ++ checkbox.checked_hoverIndicatorBorderColor : checkbox.checked_normalIndicatorBorderColor) : ++ (!control.enabled ? checkbox.disableIndicatorBorderColor : control.pressed ? ++ checkbox.clickIndicatorBorderColor : control.hovered ? ++ checkbox.hoverIndicatorBorderColor : checkbox.normalIndicatorBorderColor) ++ ++ property var checkBoxColor: control.checked ? (!control.enabled ? checkbox.checked_disableIndicatorColor : ++ control.pressed ? checkbox.checked_clickIndicatorColor : control.hovered ? ++ checkbox.checked_hoverIndicatorColor : checkbox.checked_normalIndicatorColor) : ++ (!control.enabled ? checkbox.disableIndicatorColor : control.pressed ? ++ checkbox.clickIndicatorColor : control.hovered ? ++ checkbox.hoverIndicatorColor : checkbox.normalIndicatorColor) ++ ParseInterface{ ++ id: parseInterface ++ } ++ ++ function getStartColor(dtcolor) ++ { ++ return parseInterface.pStartColor(dtcolor) ++ } ++ function getEndColor(dtcolor) ++ { ++ return parseInterface.pEndColor(dtcolor) ++ } ++ StylePrivate.APPParameter{ ++ id: app ++ onParametryChanged:{ ++ control.update(); ++ } ++ } ++ StylePrivate.UKUICheckBox{ ++ id: checkbox ++ } ++ ++ onWidthChanged: { ++ indicator.update() ++ contentItem.update() ++ control.update() ++ } ++ ++// contentItem: IconLabel { ++// leftPadding: control.mirrored ? control.indicator.width + control.spacing : control.leftPadding ++// rightPadding: !control.mirrored ? control.indicator.width + control.spacing : control.rightPadding ++// //x: control.text ? (control.mirrored ? control.leftPadding :control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2 ++ ++// spacing: control.spacing ++// mirrored: control.mirrored ++// display: control.display ++// alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft ++ ++// icon: control.icon ++// text: control.text ++// font: app.font ++// color: getStartColor(control.enabled ? checkbox.normalTextColor : checkbox.disableTextColor) ++// Rectangle{ ++// anchors.fill: parent ++// color: "red" ++// } ++// } ++ ++ contentItem: IconLabelContent { ++ id: iconLabel ++ controlRoot: control ++ anchors.left: control.left ++ leftSpace: control.mirrored ? control.indicator.width + control.spacing : control.leftPadding ++ //x: 0// control.text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2 ++ //anchors.centerIn: control ++ implicitWidth: iconLabel.adjustWidth(control.leftPadding + control.rightPadding) + indicator.implicitWidth + control.spacing ++ } ++ ++ // keep in sync with CheckDelegate.qml (shared CheckIndicator.qml was removed for performance reasons) ++ indicator: Rectangle { ++ implicitWidth: checkbox.indicatorWidth ++ implicitHeight: checkbox.indicatorWidth ++ ++ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding ++ y: control.topPadding + (control.availableHeight - height) / 2 ++ radius: checkbox.radius ++ ++ border.width: checkbox.borderWidth ++ border.color: getStartColor(borderColor) ++ color: gradientRec.visible ? "transparent" : getStartColor(checkBoxColor) ++ ++ Rectangle{ ++ id: gradientRec ++ anchors.fill: parent ++ radius: parent.radius ++ border.width: parent.border.width ++ border.color: parent.border.color ++ gradient: Gradient { ++ id:gradient ++ GradientStop { position: 0.0; color: getStartColor(checkBoxColor) } ++ ++ GradientStop { position: 1.0; color: getEndColor(checkBoxColor)} ++ } ++ visible: !parseInterface.isSolidPattern(checkBoxColor) ++ } ++ ++ Image { ++ x: (parent.width - width) / 2 ++ y: (parent.height - height) / 2 ++ width: 14 ++ height: 12 ++// defaultColor: "#353637" ++// color: control.palette.text ++ source: { ++ var model = !control.enabled ? "disenable" : control.checked ? "highlight" : "normal" ++ return "image://imageProvider/" + "object-select-symbolic" + "/" + model; ++ } ++ visible: control.checkState === Qt.Checked ++ } ++ ++ Rectangle { ++ x: (parent.width - width) / 2 ++ y: (parent.height - height) / 2 ++ width: 9 ++ height: 1 ++ color: { ++ getStartColor(!control.enabled ? checkbox.checked_disableChildrenColor : ++ control.pressed ? checkbox.checked_clickChildrenColor: ++ control.hovered ? checkbox.checked_hoverChildrenColor: ++ checkbox.checked_normalChildrenColor) ++ } ++ visible: control.checkState === Qt.PartiallyChecked ++ } ++ } ++ background: Rectangle { ++ implicitWidth: parent.implicitWidth ++ implicitHeight: 36 ++ visible: control.down || control.highlighted ++ color: control.down ? control.palette.midlight : control.palette.light ++ } ++} +diff --git a/ukui-qqc2-style/org.ukui.style/ComboBox.qml b/ukui-qqc2-style/org.ukui.style/ComboBox.qml +index 81191d2..bc7d453 100644 +--- a/ukui-qqc2-style/org.ukui.style/ComboBox.qml ++++ b/ukui-qqc2-style/org.ukui.style/ComboBox.qml +@@ -1,6 +1,7 @@ + import QtQuick 2.15 + import QtQuick.Window 2.15 + import QtQuick.Controls 2.15 ++import QtGraphicalEffects 1.0 + import QtQuick.Controls.impl 2.15 + import QtQuick.Templates 2.15 as T + import org.ukui.qqc2style.private 1.0 as StylePrivate +@@ -13,9 +14,9 @@ T.ComboBox { + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding, + implicitIndicatorHeight + topPadding + bottomPadding) +- padding: StylePrivate.UKUIComboBox.leftRightPadding ++ padding: combobox.leftRightPadding + leftPadding: padding + (!control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing) +- rightPadding: 0//padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing) ++ rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing) + hoverEnabled: true + + ParseInterface{ +@@ -31,25 +32,20 @@ T.ComboBox { + return parseInterface.pEndColor(dtcolor) + } + +- delegate: ItemDelegate { +- width: ListView.view.width - scrollbar.width ++ property var scrollbarWidth : 0 ++ delegate: MenuItem { ++ id: menuitem ++ implicitWidth: control.width - control.leftPadding - control.rightPadding - scrollbarWidth + text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData ++ icon.name: (control.iconNameRole && model[control.iconNameRole] !== undefined) ? model[control.iconNameRole] : null ++ highlighted: control.highlightedIndex === index + hoverEnabled: control.hoverEnabled +- } +- +- indicator: Image { +- x: control.mirrored ? control.padding : control.width - width - control.padding +- y: control.topPadding + (control.availableHeight - height) / 2 +- width: StylePrivate.APPParameter.iconWidth +- height: width +- source: { +- var model = !control.enabled ? "disenable" : "normal" +- +- if(!popup.visible){ +- return "image://imageProvider/" + "ukui-down-symbolic" + "/" + model; +- } +- else{ +- return "image://imageProvider/" + "ukui-up-symbolic" + "/" + model; ++ autoExclusive: true ++ checked: control.currentIndex === index ++ Component.onCompleted: { ++// console.log("delegate menuitem......", control.width, control.leftPadding, control.rightPadding, scrollbarWidth) ++ if(menuitem.hasOwnProperty("itemHasChecked")){ ++ itemHasChecked = true + } + } + } +@@ -68,22 +64,55 @@ T.ComboBox { + validator: control.validator + selectByMouse: control.selectTextByMouse + +- font: StylePrivate.APPParameter.font +- color: getStartColor(!control.enabled ? StylePrivate.UKUIComboBox.disableTextColor : StylePrivate.UKUIComboBox.normalTextColor) ++ font: app.font ++ color: getStartColor(!control.enabled ? combobox.disableTextColor : combobox.normalTextColor) + selectionColor: control.palette.highlight + selectedTextColor: control.palette.highlightedText + verticalAlignment: Text.AlignVCenter + } + ++ indicator: Image { ++ id: indicatorImage ++ x: control.mirrored ? control.padding : control.width - width - control.padding ++ y: control.topPadding + (control.availableHeight - height) / 2 ++ z: 10 ++ width: app.iconWidth ++ height: width ++ source: { ++ var model = !control.enabled ? "disenable" : "normal" ++ ++ if(!pop.visible){ ++ return "image://imageProvider/" + "ukui-down-symbolic" + "/" + model; ++ } ++ else{ ++ return "image://imageProvider/" + "ukui-up-symbolic" + "/" + model; ++ } ++ } ++ MouseArea{ ++ anchors.fill: parent ++ onClicked: ++ { ++// popHandle.setPosion(parent.mapToGlobal(control.x, control.y + control.height).x, parent.mapToGlobal(control.x, control.y + control.height).y) ++ ++// if(popHandle && !popHandle.isVisible()){ ++// popHandle.open() ++// } ++// else if(popHandle && popHandle.isVisible()) ++// popHandle.close() ++ pop.visible = !pop.visible; ++ } ++ } ++ } ++ + background: Rectangle { +- implicitWidth: StylePrivate.UKUIComboBox.normalWidth +- implicitHeight: StylePrivate.UKUIComboBox.normalHeight +- radius: StylePrivate.UKUIComboBox.radius ++ implicitWidth: combobox.normalWidth ++ implicitHeight: combobox.normalHeight ++ radius: combobox.radius + +- color: gradientRec.visible ? "transparent" : getStartColor(StylePrivate.UKUIComboBox.normalBC) +- border.color: getStartColor(!control.enabled ? StylePrivate.UKUIComboBox.disableBorderColor : +- control.focus ? StylePrivate.UKUIComboBox.focusBorderColor : StylePrivate.UKUIComboBox.normalBorderColor) +- border.width: control.focus ? StylePrivate.UKUIComboBox.focusBorderWidth : StylePrivate.UKUIComboBox.borderWidth; ++ color: gradientRec.visible ? "transparent" : getStartColor(combobox.normalBC) ++ border.color: getStartColor(!control.enabled ? combobox.disableBorderColor : ++ control.focus ? combobox.focusBorderColor : combobox.normalBorderColor) ++ border.width: control.focus ? combobox.focusBorderWidth : combobox.borderWidth; + + + Rectangle{ +@@ -94,44 +123,214 @@ T.ComboBox { + border.color: parent.border.color + gradient: Gradient { + id:gradient +- GradientStop { position: 0.0; color: getStartColor(StylePrivate.UKUIComboBox.normalBC) } ++ GradientStop { position: 0.0; color: getStartColor(combobox.normalBC) } + +- GradientStop { position: 1.0; color: getEndColor(StylePrivate.UKUIComboBox.normalBC)} ++ GradientStop { position: 1.0; color: getEndColor(combobox.normalBC)} + } +- visible: !parseInterface.isSolidPattern(StylePrivate.UKUIComboBox.normalBC) ++ visible: !parseInterface.isSolidPattern(combobox.normalBC) + } + } + + ++ + popup: Popup { + id: pop + y: control.height + width: control.width +- height: Math.min(contentItem.implicitHeight, control.Window.height - topMargin - bottomMargin) ++// height: Math.min(contentItem.implicitHeight + topMargin + bottomMargin, control.Window.height - topMargin - bottomMargin) + topMargin: 6 + bottomMargin: 6 +- contentItem: ListView { +- clip: true +- implicitHeight: contentHeight +- model: control.delegateModel +- //delegate: control.delegate +- currentIndex: control.highlightedIndex +- highlightMoveDuration: 0 +- interactive: true +- +- ScrollBar.vertical: ScrollBar { +- anchors.right: parent.right +- id: scrollbar +- active: hovered || pressed ++ background: Item{} ++ ++ onVisibleChanged: { ++ if(popHandle && parent) ++ { ++ popHandle.setPosion(mapToGlobal(x, y).x, mapToGlobal(x, y).y) ++ } ++ if(visible && popHandle && !popHandle.visible){ ++ popHandle.open() ++ } ++ else if(!visible && popHandle && popHandle.visible) ++ popHandle.close() ++ } ++ onYChanged: { ++ if(popHandle && parent) ++ { ++ popHandle.setPosion(mapToGlobal(x, y).x, mapToGlobal(x, y).y) ++ } ++ } ++ onXChanged: { ++ if(popHandle && parent) ++ { ++ popHandle.setPosion(mapToGlobal(x, y).x, mapToGlobal(x, y).y) + } +-// onImplicitHeightChanged: { +-// console.log("listview implicitHeight changedddd", pop.height, implicitHeight, control.Window.height - topMargin - bottomMargin, visible, pop.visible) +-// pop.height = contentItem.implicitHeight >= (control.Window.height - topMargin - bottomMargin) ? +-// (control.Window.height - topMargin - bottomMargin) : contentItem.implicitHeight; +-// console.log("listview implicitHeight 111111111", pop.height, implicitHeight, control.Window.height - topMargin - bottomMargin, visible) ++ } + +-// } +-// onHeightChanged: console.log("listview height changed", height) ++ StylePrivate.PopupHandle{ ++ id: popHandle ++ onVisibleChanged: { ++ // popupwindow.visible = visible ++ if(pop.visible !== visible){ ++ pop.visible = visible ++ } ++ } ++ backColor: ukuiPopup.backColor ++ shadowColor: ukuiPopup.shadowColor ++ ++ delegate: Window { ++ id: popupwindow ++ // width: windowLabel ? windowLabel.width : 0 ++ // height: windowLabel ? windowLabel.height : 0 ++ // blurControl: control ++ flags: Qt.ToolTip ++ ++ ++ Component.onCompleted: { ++ scrollbar.visible = popHandle.outScreen ++ } ++ ++ Rectangle{ ++ id: popRec ++ anchors.fill: parent ++ visible: true ++ radius: ukuiPopup.radius ++ color: getStartColor(ukuiPopup.backColor) ++ //border.color: StylePrivate.ParseColorInterface.startColor(ukuiPopup.backBorderColor) ++ opacity: app.menuTransparency ++ layer.enabled: true ++ ++ ScrollBar { ++ id: scrollbar ++ active: visible ++ orientation: Qt.Vertical ++ visible: popHandle.outScreen ++ anchors.top: parent.top ++ anchors.topMargin: pop.topPadding ++ anchors.right: parent.right ++ height: listview.height ++ position: listview.visibleArea.yPosition ++ size: listview.visibleArea.heightRatio ++ ++ onPositionChanged: { ++ if (active && listview.visibleArea.yPosition != position) { ++ vscrollbar.position = position; ++ } ++ } ++ // onHeightChanged: console.log("scrollbar height chanedddd", height) ++ onVisibleChanged:{ ++ if(visible) ++ scrollbarWidth = scrollbar.width ++ } ++ ++// onHeightChanged: console.log("scrollbar height changedddd", height) ++ ++ } ++ layer.effect: DropShadow { ++ transparentBorder: true ++ radius: ukuiPopup.radius ++ samples: 16 ++ horizontalOffset: 0 ++ verticalOffset: 0 ++ width: popRec.width + 8 ++ height: popRec.height + 8 ++ color: StylePrivate.ParseColorInterface.startColor(ukuiPopup.shadowColor) ++ } ++ } ++ ++ ++ Connections { ++ target: popHandle ++ function onVisibleChanged(visible) { ++ if(visible){ ++ listview.visible = true ++ popupwindow.show() ++ } ++ else{ ++ listview.visible = false ++ popupwindow.hide() ++ } ++ } ++ function onSizeChanged(width, height){ ++ // pop.implicitWidth = width ++ listview.implicitHeight = height ++ } ++ ++ } ++ ++ ListView { ++ id: listview ++ clip: popHandle.outScreen ++ implicitHeight: contentHeight ++ implicitWidth: control.width - 2 * ukuiPopup.padding - scrollbarWidth ++ model: control.delegateModel ++ currentIndex: control.highlightedIndex ++ highlightMoveDuration: 0 ++ interactive: popHandle.outScreen ++ anchors.centerIn: parent ++ onVisibleChanged: { ++ popHandle.setSize(control.width, listview.contentHeight + 2 * 6) ++ ++ } ++ onWidthChanged: { ++ // pop.height = listview.implicitHeight + 2 * 6 ++ ++ popHandle.setSize(control.width, listview.contentHeight + 2 * 6) ++ } ++ onHeightChanged: { ++ // pop.height = listview.implicitHeight + 2 * 6 ++ ++ popHandle.setSize(control.width, listview.contentHeight + 2 * 6) ++ } ++ Component.onCompleted: { ++ // pop.height = listview.implicitHeight + 2 * 6 ++ popHandle.setSize(control.width, listview.contentHeight + 2 * 6) ++ } ++ ++ ++ ScrollBar.vertical: ScrollBar { ++ id: vscrollbar ++ active: visible ++ visible: popHandle ? popHandle.outScreen : false ++ width: 0 ++ } ++ ++ ++ Connections{ ++ target: popHandle ++ function onOutScreenChanged() ++ { ++ listview.interactive = popHandle.outScreen ? true : false; ++ listview.clip = listview.interactive; ++ scrollbar.visible = popHandle.outScreen; ++ } ++ } ++ } ++ } + } ++// contentItem: ListView { ++// id: listview1 ++// clip: true ++// implicitHeight: contentHeight ++// model: control.delegateModel ++// currentIndex: control.highlightedIndex ++// highlightMoveDuration: 0 ++// interactive: true ++// } ++ ++ ++ + } ++ ++ StylePrivate.UKUIPopup{ ++ id: ukuiPopup ++ } ++ ++ StylePrivate.UKUIComboBox{ ++ id: combobox ++ } ++ ++ StylePrivate.APPParameter{ ++ id: app ++ } ++ + } +diff --git a/ukui-qqc2-style/org.ukui.style/ItemDelegate.qml b/ukui-qqc2-style/org.ukui.style/ItemDelegate.qml +index eb17e01..fee644a 100644 +--- a/ukui-qqc2-style/org.ukui.style/ItemDelegate.qml ++++ b/ukui-qqc2-style/org.ukui.style/ItemDelegate.qml +@@ -11,19 +11,33 @@ T.ItemDelegate { + implicitContentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding, +- implicitIndicatorHeight + topPadding + bottomPadding) ++ implicitIndicatorHeight + topPadding + bottomPadding, ++ itemdelegate.implicitHeight + topInset + bottomInset) + +- padding: 12 +- spacing: StylePrivate.APPParameter.space ++ padding: itemdelegate.padding ++ spacing: app.space ++ ++ icon.width: app.iconWidth ++ icon.height: app.iconWidth ++ hoverEnabled: true ++ font: app.font//appP.font + +- icon.width: StylePrivate.APPParameter.iconWidth +- icon.height: StylePrivate.APPParameter.iconWidth + // icon.color: control.palette.text + +- property var borderColor: !control.enabled ? StylePrivate.UKUIItemDelegate.disableBorderColor : control.pressed ? StylePrivate.UKUIItemDelegate.clickBorderColor : +- control.hovered ? StylePrivate.UKUIItemDelegate.hoverBorderColor : StylePrivate.UKUIItemDelegate.normalBorderColor +- property var backColor: !control.enabled ? StylePrivate.UKUIItemDelegate.disableBC : control.pressed ? StylePrivate.UKUIItemDelegate.clickedBC : +- control.hovered ? StylePrivate.UKUIItemDelegate.hoveredBC : StylePrivate.UKUIItemDelegate.normalBC ++ property var borderHColor: !control.enabled ? itemdelegate.disableBorderColor : control.pressed ? itemdelegate.clickBorderHColor : ++ control.hovered ? itemdelegate.hoverBorderHColor : itemdelegate.normalBorderHColor ++ property var backHColor: !control.enabled ? itemdelegate.disableBC : control.pressed ? itemdelegate.clickedHBC : ++ control.hovered ? itemdelegate.hoveredHBC : itemdelegate.normalHBC ++ ++ property var borderColor: !control.enabled ? itemdelegate.disableBorderColor : control.pressed ? itemdelegate.clickBorderColor : ++ control.hovered ? itemdelegate.hoverBorderColor : itemdelegate.normalBorderColor ++ property var backColor: !control.enabled ? itemdelegate.disableBC : control.pressed ? itemdelegate.clickedBC : ++ control.hovered ? itemdelegate.hoveredBC : itemdelegate.normalBC ++ ++ property var borderCheckedColor: !control.enabled ? itemdelegate.disableBorderColor : control.pressed ? itemdelegate.clickBorderCheckedColor : ++ control.hovered ? itemdelegate.hoverBorderCheckedColor : itemdelegate.normalBorderCheckedColor ++ property var backCheckedColor: !control.enabled ? itemdelegate.disableBC : control.pressed ? itemdelegate.clickedCheckedBC : ++ control.hovered ? itemdelegate.hoveredCheckedBC : itemdelegate.normalCheckedBC + + ParseInterface{ + id: parseInterface +@@ -38,27 +52,38 @@ T.ItemDelegate { + return parseInterface.pEndColor(dtcolor) + } + +- contentItem: IconLabel { +- spacing: control.spacing +- mirrored: control.mirrored +- display: control.display +- alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft ++// contentItem: IconLabel { ++// spacing: control.spacing ++// mirrored: control.mirrored ++// display: control.display ++// alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft ++ ++// icon: control.icon ++// text: control.text ++// font: app.font ++// color: getStartColor(control.enabled ? itemdelegate.normalTextColor : itemdelegate.disableTextColor) ++// } + +- icon: control.icon +- text: control.text +- font: StylePrivate.APPParameter.font +- color: getStartColor(control.enabled ? StylePrivate.UKUIItemDelegate.normalTextColor : StylePrivate.UKUIItemDelegate.disableTextColor) ++ contentItem: IconLabelContent { ++ id: iconLabel ++ controlRoot: control ++ anchors.left: control.left ++ anchors.verticalCenter: control.verticalCenter ++ leftSpace: control.mirrored ? control.indicator.width + control.spacing : control.leftPadding ++ //x: 0// control.text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2 ++ //anchors.centerIn: control ++ implicitWidth: iconLabel.adjustWidth(control.leftPadding + control.rightPadding) + indicator.implicitWidth + control.spacing + } + + background: Rectangle { + anchors.fill: control +- radius: StylePrivate.UKUIItemDelegate.radius +- border.width: StylePrivate.UKUIItemDelegate.borderWidth +- border.color: getStartColor(borderColor) ++ radius: itemdelegate.radius ++ border.width: itemdelegate.borderWidth ++ border.color: getStartColor((control.highlighted && control.checked) ? borderHColor : control.checked ? borderCheckedColor : borderColor) + // implicitWidth: 100 + // implicitHeight: 40 +-// visible: control.down || control.highlighted || control.visualFocus +- color: gradientRec.visible ? "transparent" : getStartColor(backColor) ++// visible: control.down || (control.highlighted && control.checked) || control.visualFocus ++ color: gradientRec.visible ? "transparent" : getStartColor((control.highlighted && control.checked) ? backHColor : control.checked ? backCheckedColor : backColor) + + Rectangle{ + id: gradientRec +@@ -68,11 +93,19 @@ T.ItemDelegate { + border.color: parent.border.color + gradient: Gradient { + id:gradient +- GradientStop { position: 0.0; color: getStartColor(backColor) } ++ GradientStop { position: 0.0; color: getStartColor((control.highlighted && control.checked) ? backHColor : control.checked ? backCheckedColor : backColor) } + +- GradientStop { position: 1.0; color: getEndColor(backColor)} ++ GradientStop { position: 1.0; color: getEndColor((control.highlighted && control.checked) ? backHColor : control.checked ? backCheckedColor : backColor)} + } +- visible: !parseInterface.isSolidPattern(backColor) ++ visible: !parseInterface.isSolidPattern((control.highlighted && control.checked) ? backHColor : control.checked ? backCheckedColor : backColor) + } + } ++ ++ StylePrivate.UKUIItemDelegate{ ++ id: itemdelegate ++ } ++ ++ StylePrivate.APPParameter{ ++ id: app ++ } + } +diff --git a/ukui-qqc2-style/org.ukui.style/Label.qml b/ukui-qqc2-style/org.ukui.style/Label.qml +index 44c9aea..e2ca1ba 100644 +--- a/ukui-qqc2-style/org.ukui.style/Label.qml ++++ b/ukui-qqc2-style/org.ukui.style/Label.qml +@@ -14,8 +14,19 @@ T.Label { + } + + +- color: parseInterface.pStartColor(enabled ? StylePrivate.UKUILabel.normalColor : StylePrivate.UKUILabel.disableColor)//StylePrivate.UKUILable.normalColor +- linkColor: parseInterface.pStartColor(StylePrivate.UKUILabel.linkColor) ++ color: parseInterface.pStartColor(enabled ? label.normalColor : label.disableColor)//StylePrivate.UKUILable.normalColor ++ linkColor: parseInterface.pStartColor(label.linkColor) + +- font: StylePrivate.APPParameter.font//appP.font ++ font: app.font//appP.font ++ ++ StylePrivate.UKUILabel{ ++ id: label ++ onParametryChanged:{ ++ control.update(); ++ } ++ } ++ ++ StylePrivate.APPParameter{ ++ id: app ++ } + } +diff --git a/ukui-qqc2-style/org.ukui.style/Menu.qml b/ukui-qqc2-style/org.ukui.style/Menu.qml +index 4b06362..e056417 100644 +--- a/ukui-qqc2-style/org.ukui.style/Menu.qml ++++ b/ukui-qqc2-style/org.ukui.style/Menu.qml +@@ -1,19 +1,19 @@ +- + import QtQuick 2.7 + import QtQuick.Window 2.15 + import QtQuick.Layouts 1.2 + import QtGraphicalEffects 1.0 +-import QtQuick.Controls 2.5 as Controls ++import QtQuick.Controls 2.5 + import QtQuick.Templates 2.5 as T + import org.ukui.qqc2style.private 1.0 as StylePrivate + ++ + T.Menu { + id: control + // StylePrivate.APPParameter{ + // id: appP + // } +- palette: StylePrivate.APPParameter.palette +- font: StylePrivate.APPParameter.font ++// palette: app.palette ++// font: app.font + + implicitWidth: Math.max(background ? background.implicitWidth : 0, + contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0) +@@ -22,15 +22,60 @@ T.Menu { + + margins: 0 + +- leftPadding: StylePrivate.UKUIMenu.leftRightPadding +- rightPadding: StylePrivate.UKUIMenu.leftRightPadding +- topPadding: StylePrivate.UKUIMenu.topBottomPadding +- bottomPadding: StylePrivate.UKUIMenu.topBottomPadding ++ property var scrollbarWidth: 0 ++// leftPadding: menu.leftRightPadding ++// rightPadding: menu.leftRightPadding ++// topPadding: menu.topBottomPadding ++// bottomPadding: menu.topBottomPadding ++ property var maxW: 0 ++ onVisibleChanged: { ++// console.log("DTK onvisible changed...", control.contentModel.count, visible, width, height, x, y, parent, parent.x, parent.y) ++ if(visible && popHandle && parent) ++ { ++// console.log("maptoglobale...", parent.mapToGlobal(x, y)) ++ popHandle.setPosion(parent.mapToGlobal(x, y).x, parent.mapToGlobal(x, y).y) ++ } ++ if(visible && popHandle && !popHandle.visible){ ++ popHandle.open() ++ } ++ else if(!visible && popHandle && popHandle.visible) ++ popHandle.close() ++ } + +-// StylePrivate.UKUIMenu{ +-// id: uMenu ++ onYChanged: { ++// console.log("menu y changedddd", y, control.contentModel.count) ++ if(popHandle && parent) ++ { ++// console.log("maptoglobale...", parent.mapToGlobal(x, y)) ++ popHandle.setPosion(parent.mapToGlobal(x, y).x, parent.mapToGlobal(x, y).y) ++ } ++ } ++ ++ onXChanged: { ++ if(popHandle && parent) ++ { ++// console.log("maptoglobale...", parent.mapToGlobal(x, y)) ++ popHandle.setPosion(parent.mapToGlobal(x, y).x, parent.mapToGlobal(x, y).y) ++ } ++ } ++// onCountChanged: ++// { ++// if(control1){ ++// for(var i = 0; i < control1.contentModel.count; i++) ++// { ++// control1.removeItem(control1.itemAt(i)); ++// } ++// for(var j = 0; j < control.contentModel.count; j++) ++// { ++// control1.addItem(control.itemAt(j)); ++// } ++// } + // } + ++ StylePrivate.UKUIMenu{ ++ id: menu ++ } ++ + + ParseInterface{ + id: parseInterface +@@ -44,134 +89,318 @@ T.Menu { + { + return parseInterface.pEndColor(dtcolor) + } +- +- delegate: MenuItem { +- id: item ++ StylePrivate.APPParameter{ ++ id: app + } +- contentItem: ListView { +- implicitHeight: contentHeight +- property bool hasCheckables: false +- property bool hasIcons: false +- model: control.contentModel +- +- implicitWidth: { +- var maxWidth = 0; +- for (var i = 0; i < contentItem.children.length; ++i) { +- if(!(contentItem.children[i] instanceof Controls.MenuSeparator)) +- maxWidth = Math.max(maxWidth, contentItem.children[i].width); +- //console.log("maxwidth..... iiiii,,,", contentItem.children[i].text, contentItem.children[i], contentItem.children[i].width, contentItem.children[i].implicitWidth) ++ ++ ++ StylePrivate.PopupHandle{ ++ id: popHandle ++ onVisibleChanged: { ++// console.log("popupHandle visible changedddd", visible, control.visible) ++// popupwindow.visible = visible ++ if(control.visible !== visible){ ++ control.visible = visible + } +- return maxWidth + scrollbar.width; + } ++ delegate: Window { ++ id: popupwindow + +- //todo why ApplicationWindow.window is null +- interactive: true//ApplicationWindow.window ? contentHeight > ApplicationWindow.window.height : false +- clip: true//interactive +- currentIndex: control.currentIndex || 0 +- keyNavigationEnabled: true +- keyNavigationWraps: true ++ width: control1 ? control1.width : 0 ++ height: control1 ? control1.height : 0 ++ // blurControl: control ++ flags: Qt.ToolTip + +- //Component.onCompleted: console.log("listview......", ApplicationWindow.window.height) ++ Connections { ++ target: popHandle ++ function onVisibleChanged(visible) { ++// console.log("connections pophandle visible changeddddd", visible) ++ if(visible) ++ popupwindow.show() ++ else ++ popupwindow.hide() ++ } ++ function onSizeChanged(width, height){ ++ control1.contentItem.implicitWidth = width ++ control1.contentItem.implicitHeight = height ++ } + +- ScrollBar.vertical: ScrollBar { +- id: scrollbar +- active: hovered || pressed +- } +- } ++ } + +- Connections { +- target: control.contentItem.contentItem +- function onChildrenChanged() { +- var checkable = false; +- var needIcon = false; +- for (var i in control.contentItem.contentItem.children) { +- var child = control.contentItem.contentItem.children[i]; +- if (child.checkable) { +- control.contentItem.hasCheckables = true; +- checkable = true; +- } +- if (child.icon && child.icon.hasOwnProperty("name") && (child.icon.name.length > 0 || child.icon.source.toString().length > 0)) { +- control.contentItem.hasIcons = true; +- needIcon = true; ++ // rootWindow: control ++ // visible: control.visible ++ //Component.onCompleted: console.log("popupwindow visible...", visible) ++ onVisibleChanged: { ++// console.log("popupwindow onvisiblechanged 0000", visible, control1.visible, popHandle.isVisible(), control.contentModel, control1.contentModel) ++ if(visible !== control1.visible) ++ control1.visible = visible ++ // if(visible && !control1.visible) ++// control1.open() ++// else if(!visible && control1.visible) ++// control1.close() ++// console.log("popupwindow onvisiblechanged 1111", visible, control1.visible, popHandle.isVisible(), control.contentModel, control1.contentModel) ++ } ++ Component.onCompleted: { ++ for(var i = 0; i < control.contentModel.count; i++) ++ { ++ control1.addItem(control.itemAt(i)); + } + } +- if(checkable){ +- for (var k in control.contentItem.contentItem.children) { +- var childk = control.contentItem.contentItem.children[k]; +- if(childk.hasOwnProperty("itemLeftSpace")){ +- childk.itemLeftSpace = 20 + childk.leftPadding; +- console.log("itemLeftSpace........", childk.text, childk.itemLeftSpace) ++ ++ T.Menu { ++ id: control1 ++ ++ visible: parent.visible ++ ++ palette: app.palette ++ font: app.font ++ ++// implicitWidth: Math.max(background ? background.implicitWidth : 0, ++// contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0) ++ //Math.max(background ? background.implicitHeight : 0, ++ // contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding ++ ++ margins: 0 ++ ++ leftPadding: menu.leftRightPadding ++ rightPadding: menu.leftRightPadding ++ topPadding: menu.topBottomPadding ++ bottomPadding: menu.topBottomPadding ++ contentData: control.contentData ++ onVisibleChanged: { ++// console.log("window menu visible 000", visible, parent, parent.visible, popupwindow, popupwindow.visible, contentItem.visible, implicitWidth, implicitHeight) ++ ++ if(visible === false && visible !== popHandle.visible) ++ popHandle.close(); ++// console.log("window menu visible 111", visible, parent, parent.visible, popupwindow, popupwindow.visible, contentItem.visible, implicitWidth, implicitHeight) ++// console.log("window menu onVisibleChanged", control1.contentModel.count, width, height, implicitWidth, implicitHeight) ++ ++ popHandle.setSize(implicitWidth, implicitHeight) ++ ++ } ++ onImplicitWidthChanged: { ++// console.log("window menu onwidthchangedddd", control1.contentModel.count, width, height, implicitWidth, implicitHeight) ++ ++ popHandle.setSize(implicitWidth, implicitHeight) ++ } ++ onImplicitHeightChanged: { ++// console.log("window menu onheightchangeddddd", control1.contentModel.count, width, height, implicitWidth, implicitHeight) ++ popHandle.setSize(implicitWidth, implicitHeight) ++ } ++ Component.onCompleted: { ++ ++// console.log("window menu component size", control1.contentModel.count, width, height, implicitWidth, implicitHeight) ++ popHandle.setSize(implicitWidth, implicitHeight) ++ } ++ Connections { ++ target: control ++ function onCountChanged(count) { ++ if(control1 != null){ ++ for(var i = 0; i < control1.contentModel.count; i++) ++ { ++ control1.removeItem(control1.itemAt(i)); ++ } ++ for(var j = 0; j < control.contentModel.count; j++) ++ { ++ control1.addItem(control.itemAt(j)); ++ } ++ } + } ++ + } +- } +- if(needIcon){ +- for (var j in control.contentItem.contentItem.children) { +- var childj = control.contentItem.contentItem.children[j]; +- var b = childj.icon && childj.icon.hasOwnProperty("name") && (childj.icon.name.length > 0 || childj.icon.source.toString().length > 0); +- if(childj.hasOwnProperty("labelLeftSpace")) +- childj.labelLeftSpace = b ? 4 : 20; ++ ++ delegate: MenuItem { ++ id: menuitem ++// width: listview.width - scrollbarWidth ++ Component.onCompleted: { ++// console.log("delegate menuitem......") ++ if(menuitem.hasOwnProperty("itemHasChecked")){ ++ itemHasChecked = true ++ } ++ } ++ + } +- } +- var maxWidth = 0; +- for (var l in control.contentItem.contentItem.children) { +- maxWidth = Math.max(maxWidth, control.contentItem.contentItem.children[l].width) +- } +- for (var m in control.contentItem.contentItem.children) { +- control.contentItem.contentItem.children[m].width = maxWidth; +- } +- } +- } ++ contentItem: ListView { ++ id: listview ++ implicitHeight: contentHeight ++ model: control1.contentModel ++ visible: parent.visible ++ onImplicitHeightChanged: control1.implicitHeight = listview.implicitHeight + control1.topPadding + control1.bottomPadding + +- enter: Transition { +- NumberAnimation { +- property: "opacity" +- from: 0 +- to: 1 +- easing.type: Easing.InOutQuad +- duration: 150 +- } +- } + +- exit: Transition { +- NumberAnimation { +- property: "opacity" +- from: 1 +- to: 0 +- easing.type: Easing.InOutQuad +- duration: 150 +- } +- } ++// implicitWidth: contentWidth ++ /*{ ++ var maxWidth = 0; ++ for (var l in control1.contentItem.contentItem.children) { ++ if(!(control1.contentItem.contentItem.children[l] instanceof MenuSeparator)) ++ maxWidth = Math.max(maxWidth, control1.contentItem.contentItem.children[l].implicitWidth) ++ } + +- background: Rectangle { +- radius: StylePrivate.UKUIMenu.radius +- +- color: gradientRec.visible ? "transparent" : getStartColor(StylePrivate.UKUIMenu.normalBC) +- border.color: getStartColor(StylePrivate.UKUIMenu.normalBorderColor) +- border.width: StylePrivate.UKUIMenu.border +- layer.enabled: true +- +- Rectangle{ +- id: gradientRec +- anchors.fill: parent +- radius: parent.radius +- border.width: parent.border.width +- border.color: parent.border.color +- gradient: Gradient { +- id:gradient +- GradientStop { position: 0.0; color: getStartColor(StylePrivate.UKUIMenu.normalBC) } +- +- GradientStop { position: 1.0; color: getEndColor(StylePrivate.UKUIMenu.normalBC)} ++ if(maxW === 0) ++ maxW = maxWidth ++ ++ // control1.implicitWidth = Math.max(background ? background.implicitWidth : 0, ++ // contentItem ? maxW + control1.leftPadding + control1.rightPadding : 0) ++ ++ return maxWidth; ++ }*/ ++ ++ //todo why ApplicationWindow.window is null ++ currentIndex: control1.currentIndex || 0 ++ keyNavigationEnabled: true ++ keyNavigationWraps: true ++ ScrollBar.vertical: ScrollBar {//会与menuitem重叠 所以宽度设为0 单独使背景里的scrollbar,在position改变时 listview滚动到下面的时候有点奇怪 ++ id: vscrollbar ++ active: visible ++ visible: popHandle ? popHandle.outScreen : false ++ width: 0 ++ } ++ ++ property bool hasCheckables: false ++ property bool hasIcons: false ++// onContentYChanged: { ++// if (!scrollbar.active) { ++// if(scrollbar.visible){ ++// if(contentY/(contentHeight - height) >= 1.0) ++// scrollbar.position = 1.0 ++// else if(contentY/(contentHeight - height) <= 0.0) ++// scrollbar.position = 0.0 ++// else ++// scrollbar.position = contentY/(contentHeight - height) ++// } ++// } ++// } ++ ++// onContentHeightChanged: { ++// scrollbar.size = Math.min(height / contentHeight, 1); ++// } ++ ++ ++ Connections{ ++ target: popHandle ++ function onOutScreenChanged() ++ { ++// console.log("onOutScreenChanged....", popHandle.outScreen) ++ listview.interactive = popHandle.outScreen ? true : false; ++ listview.clip = listview.interactive; ++ scrollbar.visible = listview.interactive; ++ } ++ } ++ } ++ ++ Connections { ++ target: control1.contentItem.contentItem ++ function onChildrenChanged() { ++ var checkable = false; ++ var needIcon = false; ++ for (var i in control1.contentItem.contentItem.children) { ++ var child = control1.contentItem.contentItem.children[i]; ++ if (child.checkable) { ++ control1.contentItem.hasCheckables = true; ++ checkable = true; ++ } ++ if (child.icon && child.icon.hasOwnProperty("name") && (child.icon.name.length > 0 || child.icon.source.toString().length > 0)) { ++ control1.contentItem.hasIcons = true; ++ needIcon = true; ++ } ++ } ++ if(checkable){ ++ for (var k in control1.contentItem.contentItem.children) { ++ var childk = control1.contentItem.contentItem.children[k]; ++ if(childk.hasOwnProperty("itemLeftSpace")){ ++ childk.itemLeftSpace = 20 + childk.leftPadding; ++ } ++ } ++ } ++ if(needIcon){ ++ for (var j in control1.contentItem.contentItem.children) { ++ var childj = control1.contentItem.contentItem.children[j]; ++ var b = childj.icon && childj.icon.hasOwnProperty("name") && (childj.icon.name.length > 0 || childj.icon.source.toString().length > 0); ++ if(childj.hasOwnProperty("labelLeftSpace")) ++ childj.labelLeftSpace = b ? 4 : 20; ++ } ++ } ++ var maxWidth = 0; ++ for (var l in control1.contentItem.contentItem.children) { ++ if(!(control1.contentItem.contentItem.children[l] instanceof MenuSeparator)) ++ maxWidth = Math.max(maxWidth, control1.contentItem.contentItem.children[l].implicitWidth) ++ } ++ for (var m in control1.contentItem.contentItem.children) { ++ control1.contentItem.contentItem.children[m].implicitWidth = maxWidth; ++ } ++ ++ ++ if(maxW === 0) ++ maxW = maxWidth ++ ++ listview.implicitWidth = maxWidth; ++ control1.implicitWidth = listview.implicitWidth + scrollbarWidth + control1.leftPadding + control1.rightPadding ++ // control1.implicitWidth = Math.max(background ? background.implicitWidth : 0, ++ // contentItem ? maxW + control1.leftPadding + control1.rightPadding : 0) ++ ++ } ++ } ++ ++ background: Rectangle { ++ id: backRec ++ anchors.fill: parent ++ radius: menu.radius ++ ++ color: gradientRec.visible ? "transparent" : getStartColor(menu.normalBC) ++ opacity: menu.bcColorAlpha ++ border.color: getStartColor(menu.normalBorderColor) ++ border.width: menu.border ++ // layer.enabled: true ++// Component.onCompleted: console.log("menu back opacity...", opacity, menu.bcColorAlpha) ++ ScrollBar { ++ id: scrollbar ++ active: visible ++ orientation: Qt.Vertical ++ visible: false ++ anchors.top: parent.top ++ anchors.topMargin: control1.topPadding ++ anchors.right: parent.right ++ height: listview.height ++ position: listview.visibleArea.yPosition ++ size: listview.visibleArea.heightRatio ++ ++ onPositionChanged: { ++ if (active && listview.visibleArea.yPosition != position) { ++ vscrollbar.position = position; ++ } ++ } ++ onVisibleChanged:{ ++ scrollbarWidth = scrollbar.width ++ } ++ } ++ Rectangle{ ++ id: gradientRec ++ anchors.fill: parent ++ radius: parent.radius ++ border.width: parent.border.width ++ border.color: parent.border.color ++ opacity: menu.bcColorAlpha ++ gradient: Gradient { ++ id:gradient ++ GradientStop { position: 0.0; color: getStartColor(menu.normalBC) } ++ ++ GradientStop { position: 1.0; color: getEndColor(menu.normalBC)} ++ } ++ visible: !parseInterface.isSolidPattern(menu.normalBC) ++ } ++ ++ ++ } + } +- visible: !parseInterface.isSolidPattern(StylePrivate.UKUIMenu.normalBC) + } ++ } + +- layer.effect: DropShadow { +- transparentBorder: true +- radius: StylePrivate.UKUIMenu.radius +- samples: StylePrivate.UKUIMenu.radius +- horizontalOffset: 0 +- verticalOffset: 2 +- color: getStartColor(enabled ? StylePrivate.UKUIMenu.shadowNormalColor : StylePrivate.UKUIMenu.shadowDisableColor) +- } ++ delegate: MenuItem { + } ++// contentItem: ListView { ++// implicitHeight: contentHeight ++// property bool hasCheckables: false ++// property bool hasIcons: false ++// model: control.contentModel ++// } + } +diff --git a/ukui-qqc2-style/org.ukui.style/MenuItem.qml b/ukui-qqc2-style/org.ukui.style/MenuItem.qml +index d9a9ec7..530abbb 100644 +--- a/ukui-qqc2-style/org.ukui.style/MenuItem.qml ++++ b/ukui-qqc2-style/org.ukui.style/MenuItem.qml +@@ -8,46 +8,45 @@ import QtQuick.Controls 2.5 + T.MenuItem { + id: controlRoot + +- palette: StylePrivate.APPParameter.palette +- font: StylePrivate.APPParameter.font ++ palette: app.palette ++ font: app.font + + +- width: Math.max(implicitBackgroundWidth + leftInset + rightInset, ++ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + image.width + label.width + labelLeftSpace + leftPadding + rightPadding + +- (controlRoot.checkable ? /*arrow.implicitWidth*/StylePrivate.UKUIMenuItem.imageWidth + StylePrivate.UKUIMenuItem.imageSpace : 0) + +- (controlRoot.subMenu ? /*indicator.implicitWidth*/StylePrivate.UKUIMenuItem.imageWidth + StylePrivate.UKUIMenuItem.imageSpace : 0) + itemLeftSpace) ++ (controlRoot.checkable ? /*arrow.implicitWidth*/menuItem.imageWidth + menuItem.imageSpace : 0) + ++ (controlRoot.subMenu != null ? /*indicator.implicitWidth*/menuItem.imageWidth + menuItem.imageSpace : 0) + itemLeftSpace) + implicitHeight: visible ? Math.max(implicitBackgroundHeight + topInset + bottomInset, +- Math.max(contentItem.height, +- controlRoot.subMenu ? indicator.implicitHeight : 0) + topPadding + bottomPadding, StylePrivate.UKUIMenuItem.normalHeight) : 0 ++ Math.max(implicitContentHeight, ++ (controlRoot.subMenu ? indicator.implicitHeight : 0) + topPadding + bottomPadding), menuItem.normalHeight) : 0 + + baselineOffset: contentItem.y + contentItem.baselineOffset + +-// Layout.fillWidth: true +- padding: StylePrivate.UKUIMenuItem.topBottomPadding ++ padding: menuItem.topBottomPadding ++ ++ property bool itemHasChecked: false + + property int gridUnit: fontMetrics.height + property int labelLeftSpace: 0 +- property int itemLeftSpace: (!controlRoot.checkable/* && !controlRoot.subMenu*/) ? controlRoot.leftPadding : 20 + controlRoot.leftPadding +- property alias backColor: backrect.color ++ property int itemLeftSpace: (!(itemHasChecked)/* && !controlRoot.subMenu*/) ? controlRoot.leftPadding : indicatorImage.width + 4 + controlRoot.leftPadding + +- property var bacDtColor: !controlRoot.enabled ? StylePrivate.UKUIMenuItem.disableBC : +- controlRoot.pressed ? StylePrivate.UKUIMenuItem.clickedBC : +- controlRoot.hovered ? StylePrivate.UKUIMenuItem.hoveredBC : StylePrivate.UKUIMenuItem.normalBC ++ property var bacDtColor: !controlRoot.enabled ? menuItem.disableBC : ++ controlRoot.pressed ? menuItem.clickedBC : ++ controlRoot.hovered ? menuItem.hoveredBC : menuItem.normalBC + +- leftPadding: StylePrivate.UKUIMenuItem.leftRightPadding/* : Math.floor(gridUnit/4)*2*/ +- rightPadding: StylePrivate.UKUIMenuItem.leftRightPadding// Math.floor(gridUnit/4)*2 ++ leftPadding: menuItem.leftRightPadding/* : Math.floor(gridUnit/4)*2*/ ++ rightPadding: menuItem.leftRightPadding// Math.floor(gridUnit/4)*2 + hoverEnabled: true + ++ onItemHasCheckedChanged: { ++ itemLeftSpace = (!(itemHasChecked)/* && !controlRoot.subMenu*/) ? controlRoot.leftPadding : indicatorImage.width + 4 + controlRoot.leftPadding ++ ++ } ++ ++ StylePrivate.APPParameter{ ++ id: appP ++ } + +-// StylePrivate.APPParameter{ +-// id: appP +-// } +-// StylePrivate.UKUIButton{ +-// id: btn +-// } +-// StylePrivate.UKUIMenuItem{ +-// id: mItem +-// } + NormalControlColor{ + id:ncColor + } +@@ -81,6 +80,7 @@ T.MenuItem { + anchors.leftMargin: itemLeftSpace + anchors.right: parent.right + anchors.rightMargin: controlRoot.rightPadding ++ implicitHeight: Math.max(image.height, label.height) + Image { + id: image + source: //controlRoot.icon.source +@@ -88,20 +88,20 @@ T.MenuItem { + if((controlRoot.icon.source.toString() === "" && controlRoot.icon.name.toString() === "")) + return controlRoot.icon.source + +- var model = !controlRoot.enabled ? "disenable" : controlRoot.pressed ? "clicked" : controlRoot.hovered ? "hover" : "normal" ++ var model = !controlRoot.enabled ? "disenable" : appP.isDark ? "highlight" : /*controlRoot.pressed ? "highlight" : controlRoot.hovered ? "highlight" :*/ "normal" + + let s = controlRoot.icon.source.toString() + return "image://imageProvider/" + s + "/" + model; + } + anchors.verticalCenter: parent.verticalCenter +- width: (controlRoot.display !== AbstractButton.TextOnly && source !== "" && status != Image.Null) ? StylePrivate.UKUIMenuItem.imageWidth : 0 ++ width: (controlRoot.display !== AbstractButton.TextOnly && source !== "" && status != Image.Null) ? menuItem.imageWidth : 0 + visible: controlRoot.display !== AbstractButton.TextOnly && source !== "" && status != Image.Null + } + Label { + id:label + text: controlRoot.text + font:controlRoot.font +- color: getStartColor(controlRoot.enabled ? StylePrivate.UKUIMenuItem.normalTextColor : StylePrivate.UKUIMenuItem.disableTextColor) ++ color: getStartColor(controlRoot.enabled ? menuItem.normalTextColor : menuItem.disableTextColor) + visible: controlRoot.display !== AbstractButton.IconOnly && text !== "" + + anchors.verticalCenter: parent.verticalCenter +@@ -113,25 +113,48 @@ T.MenuItem { + } + + indicator: Image { +- x: controlRoot.mirrored ? controlRoot.width - width - controlRoot.rightPadding : controlRoot.leftPadding +- y: controlRoot.topPadding + (controlRoot.availableHeight - height) / 2 ++ id:indicatorImage ++ anchors.left: controlRoot.mirrored ?controlRoot.right : controlRoot.left ++ anchors.leftMargin: controlRoot.mirrored ? - controlRoot.rightPadding - menuItem.imageWidth : controlRoot.leftPadding ++ ++ anchors.verticalCenter: controlRoot.verticalCenter + + visible: controlRoot.checked +- source: controlRoot.checkable ? "image://imageProvider/object-select-symbolic" : "" ++ source: { ++ ++ var model = "normal" ++ if(controlRoot.checkable) ++ if( appP.isDark /*|| controlRoot.pressed || controlRoot.hovered*/) ++ return "image://imageProvider/object-select-symbolic/highlight" + +- width: StylePrivate.UKUIMenuItem.imageWidth +- height: StylePrivate.UKUIMenuItem.imageWidth ++ else ++ return "image://imageProvider/object-select-symbolic/normal" ++ return "" ++ } ++ width: menuItem.imageWidth ++ height: menuItem.imageWidth + } + + arrow: Image { +- x: controlRoot.mirrored ? controlRoot.leftPadding : controlRoot.width - width - controlRoot.rightPadding ++ id: arrowImage ++ anchors.left: controlRoot.mirrored ?controlRoot.left : controlRoot.right ++ anchors.leftMargin: controlRoot.mirrored ? controlRoot.leftPadding : - controlRoot.rightPadding - menuItem.imageWidth + anchors.verticalCenter: parent.verticalCenter +- width: StylePrivate.UKUIMenuItem.imageWidth +- height: StylePrivate.UKUIMenuItem.imageWidth ++ width: menuItem.imageWidth ++ height: menuItem.imageWidth + + visible: controlRoot.subMenu + mirror: controlRoot.mirrored +- source: controlRoot.subMenu ? "image://imageProvider/ukui-end-symbolic" : "" ++ source: { ++ var model = "normal" ++ if(controlRoot.subMenu) ++ if( appP.isDark /*|| controlRoot.pressed || controlRoot.hovered*/) ++ return "image://imageProvider/ukui-end-symbolic/highlight" ++ else ++ return "image://imageProvider/ukui-end-symbolic/normal" ++ ++ return "" ++ } + } + + background: +@@ -139,9 +162,10 @@ T.MenuItem { + id: backrect + width: controlRoot.width + height: controlRoot.height +- radius: StylePrivate.UKUIMenuItem.radius ++ radius: menuItem.radius + //opacity: (controlRoot.highlighted || controlRoot.hovered || controlRoot.pressed || controlRoot.checked) ? 1 : 0 + border.width: 1 ++ color: getStartColor(bacDtColor) + + Rectangle{ + id: gradientRec +@@ -169,28 +193,17 @@ T.MenuItem { + Component.onCompleted: { + stateChange() + } +- + function stateChange() + { +- //controlColor = !enable ? StylePrivate.UKUIButton.disableHBC : click ? StylePrivate.UKUIButton.clickedHBC : hover ? StylePrivate.UKUIButton.hoveredHBC : StylePrivate.UKUIButton.normalHBC +- +- backColor = gradientRec.visible ? "transparent" : getStartColor(bacDtColor); +- +- backrect.border.color = getStartColor(!controlRoot.enabled ? StylePrivate.UKUIMenuItem.disableBorderColor : +- controlRoot.pressed ? StylePrivate.UKUIMenuItem.clickBorderColor : +- controlRoot.hovered ? StylePrivate.UKUIMenuItem.hoverBorderColor : StylePrivate.UKUIMenuItem.normalBorderColor); ++ bacDtColor = !controlRoot.enabled ? menuItem.disableBC : ++ controlRoot.pressed ? menuItem.clickedBC : ++ controlRoot.hovered ? menuItem.hoveredBC : menuItem.normalBC ++ ++ backrect.border.color = getStartColor(!controlRoot.enabled ? menuItem.disableBorderColor : ++ controlRoot.pressed ? menuItem.clickBorderColor : ++ controlRoot.hovered ? menuItem.hoverBorderColor : menuItem.normalBorderColor); ++ controlRoot.update() + } +-// onVisibleChanged: { +-// if(visible){ +-// var backWidth = implicitBackgroundWidth + leftInset + rightInset; +-// var itemWidth = iconLabel.width + leftPadding + rightPadding + +-// (arrow.visible ? arrow.implicitWidth : 0) + +-// (indicator.visible ? indicator.implicitWidth : 0) +-// width = Math.max(backWidth, itemWidth) +-// console.log("menuitem visible..........", controlRoot.text, width, backWidth, itemWidth, iconLabel.width, implicitBackgroundWidth) +- +-// } +-// } + property variant fontMetrics: TextMetrics { + text: "M" + function roundedIconSize(size) { +@@ -209,6 +222,14 @@ T.MenuItem { + } + } + } ++ ++ StylePrivate.UKUIMenuItem{ ++ id: menuItem ++ } ++ ++ StylePrivate.APPParameter{ ++ id: app ++ } + } + + +diff --git a/ukui-qqc2-style/org.ukui.style/Popup.qml b/ukui-qqc2-style/org.ukui.style/Popup.qml +index 8ea12c2..1f17df4 100644 +--- a/ukui-qqc2-style/org.ukui.style/Popup.qml ++++ b/ukui-qqc2-style/org.ukui.style/Popup.qml +@@ -7,8 +7,8 @@ import org.ukui.qqc2style.private 1.0 as StylePrivate + T.Popup { + id: control + +- palette: StylePrivate.APPParameter.palette +- font: StylePrivate.APPParameter.font ++ palette: app.palette ++ font: app.font + + implicitWidth: Math.max(background ? background.implicitWidth : 0, + contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0) +@@ -18,7 +18,7 @@ T.Popup { + contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) + contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) + +- padding: StylePrivate.UKUIPopup.padding ++ padding: popup.padding + clip: false + + // StylePrivate.APPParameter{ +@@ -63,9 +63,9 @@ T.Popup { + contentItem: Item { } + + background: Rectangle { +- radius: StylePrivate.UKUIPopup.radius +- color: gradientRec.visible ? "transparent" : StylePrivate.ParseDTColor.startColor(StylePrivate.UKUIPopup.backColor) +- border.color: StylePrivate.ParseDTColor.startColor(StylePrivate.UKUIPopup.backBorderColor) ++ radius: popup.radius ++ color: gradientRec.visible ? "transparent" : StylePrivate.ParseColorInterface.startColor(popup.backColor) ++ border.color: StylePrivate.ParseColorInterface.startColor(popup.backBorderColor) + layer.enabled: true + + Rectangle{ +@@ -76,23 +76,31 @@ T.Popup { + border.color: parent.border.color + gradient: Gradient { + id:gradient +- GradientStop { position: 0.0; color: StylePrivate.ParseDTColor.startColor(StylePrivate.UKUIPopup.backColor) } ++ GradientStop { position: 0.0; color: StylePrivate.ParseColorInterface.startColor(popup.backColor) } + +- GradientStop { position: 1.0; color: StylePrivate.ParseDTColor.endColor(StylePrivate.UKUIPopup.backColor)} ++ GradientStop { position: 1.0; color: StylePrivate.ParseColorInterface.endColor(popup.backColor)} + } +- visible: !StylePrivate.ParseDTColor.isSolidPattern(StylePrivate.UKUIPopup.backColor) ++ visible: !StylePrivate.ParseColorInterface.isSolidPattern(popup.backColor) + } + + + layer.effect: DropShadow { + transparentBorder: true +- radius: StylePrivate.UKUIPopup.radius ++ radius: popup.radius + samples: 16 +- horizontalOffset: -4 +- verticalOffset: -4 ++ horizontalOffset: 0 ++ verticalOffset: 0 + width: background.width + 8 + height: background.height + 8 +- color: StylePrivate.ParseDTColor.startColor(StylePrivate.UKUIPopup.shadowColor) ++ color: StylePrivate.ParseColorInterface.startColor(popup.shadowColor) + } + } ++ ++ StylePrivate.UKUIPopup{ ++ id: popup ++ } ++ ++ StylePrivate.APPParameter{ ++ id: app ++ } + } +diff --git a/ukui-qqc2-style/org.ukui.style/ProgressBar.qml b/ukui-qqc2-style/org.ukui.style/ProgressBar.qml +index b82d9c5..29a6fa2 100644 +--- a/ukui-qqc2-style/org.ukui.style/ProgressBar.qml ++++ b/ukui-qqc2-style/org.ukui.style/ProgressBar.qml +@@ -26,15 +26,15 @@ T.ProgressBar { + } + + background: Rectangle { +- radius: StylePrivate.UKUIProgressBar.radius +- implicitWidth: StylePrivate.UKUIProgressBar.normalWidth +- implicitHeight: StylePrivate.UKUIProgressBar.normalHeight ++ radius: progressbar.radius ++ implicitWidth: progressbar.normalWidth ++ implicitHeight: progressbar.normalHeight + +- height: StylePrivate.UKUIProgressBar.normalHeight ++ height: progressbar.normalHeight + +- color: gradientRec.visible ? "transparent" : getStartColor(StylePrivate.UKUIProgressBar.normalColor) +- border.width: StylePrivate.UKUIProgressBar.borderWidth +- border.color: getStartColor(StylePrivate.UKUIProgressBar.borderColor) ++ color: gradientRec.visible ? "transparent" : getStartColor(progressbar.normalColor) ++ border.width: progressbar.borderWidth ++ border.color: getStartColor(progressbar.borderColor) + + Rectangle{ + id: gradientRec +@@ -43,11 +43,11 @@ T.ProgressBar { + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { +- GradientStop { position: 0.0; color: getStartColor(StylePrivate.UKUIProgressBar.normalColor) } ++ GradientStop { position: 0.0; color: getStartColor(progressbar.normalColor) } + +- GradientStop { position: 1.0; color: getEndColor(StylePrivate.UKUIProgressBar.normalColor)} ++ GradientStop { position: 1.0; color: getEndColor(progressbar.normalColor)} + } +- visible: !parseInterface.isSolidPattern(StylePrivate.UKUIProgressBar.normalColor) ++ visible: !parseInterface.isSolidPattern(progressbar.normalColor) + } + + +@@ -58,12 +58,12 @@ T.ProgressBar { + implicitWidth: background.width + Rectangle { + x: !control.mirrored ? 0 : (control.width * (1.0 - control.position)) +- implicitHeight: StylePrivate.UKUIProgressBar.normalHeight ++ implicitHeight: progressbar.normalHeight + implicitWidth: control.width * control.position + visible: !control.indeterminate + //indeterminate: control.visible && control.indeterminate +- color: gradientItem.visible ? "transparent" : getStartColor(StylePrivate.UKUIProgressBar.childrenColor) +- radius: StylePrivate.UKUIProgressBar.radius ++ color: gradientItem.visible ? "transparent" : getStartColor(progressbar.childrenColor) ++ radius: progressbar.radius + + Rectangle{ + id: gradientItem +@@ -72,26 +72,28 @@ T.ProgressBar { + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { +- GradientStop { position: 0.0; color: getStartColor(StylePrivate.UKUIProgressBar.childrenColor) } ++ GradientStop { position: 0.0; color: getStartColor(progressbar.childrenColor) } + +- GradientStop { position: 1.0; color: getEndColor(StylePrivate.UKUIProgressBar.childrenColor)} ++ GradientStop { position: 1.0; color: getEndColor(progressbar.childrenColor)} + } +- visible: !parseInterface.isSolidPattern(StylePrivate.UKUIProgressBar.childrenColor) ++ visible: !parseInterface.isSolidPattern(progressbar.childrenColor) + } + } + Label{ + visible: !control.indeterminate + anchors.centerIn: parent + text: (control.position * 100).toString() + "%" ++ color: control.value > (control.from + (control.to - control.from) * 1.0 / 2.0 ) ? getStartColor(progressbar.hightlightTextColor) : ++ getStartColor(StylePrivate.UKUILabel.normalColor) + } + Rectangle { + id:rec +- implicitHeight: StylePrivate.UKUIProgressBar.normalHeight +- implicitWidth: StylePrivate.UKUIProgressBar.indeterminateChildrenWidth ++ implicitHeight: progressbar.normalHeight ++ implicitWidth: progressbar.indeterminateChildrenWidth + visible: control.indeterminate + //indeterminate: control.visible && control.indeterminate +- color: gradientInterminate.visible ? "transparent" : getStartColor(StylePrivate.UKUIProgressBar.childrenColor) +- radius: StylePrivate.UKUIProgressBar.radius ++ color: gradientInterminate.visible ? "transparent" : getStartColor(progressbar.childrenColor) ++ radius: progressbar.radius + + Rectangle{ + id: gradientInterminate +@@ -100,11 +102,11 @@ T.ProgressBar { + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { +- GradientStop { position: 0.0; color: getStartColor(StylePrivate.UKUIProgressBar.childrenColor) } ++ GradientStop { position: 0.0; color: getStartColor(progressbar.childrenColor) } + +- GradientStop { position: 1.0; color: getEndColor(StylePrivate.UKUIProgressBar.childrenColor)} ++ GradientStop { position: 1.0; color: getEndColor(progressbar.childrenColor)} + } +- visible: !parseInterface.isSolidPattern(StylePrivate.UKUIProgressBar.childrenColor) ++ visible: !parseInterface.isSolidPattern(progressbar.childrenColor) + } + } + +@@ -127,4 +129,13 @@ T.ProgressBar { + easing.type: Easing.InOutQuad + } + } ++ ++ ++ StylePrivate.UKUIProgressBar{ ++ id: progressbar ++ } ++ ++ StylePrivate.APPParameter{ ++ id: app ++ } + } +diff --git a/ukui-qqc2-style/org.ukui.style/RadioButton.qml b/ukui-qqc2-style/org.ukui.style/RadioButton.qml +index 8a2caf3..b582f48 100644 +--- a/ukui-qqc2-style/org.ukui.style/RadioButton.qml ++++ b/ukui-qqc2-style/org.ukui.style/RadioButton.qml +@@ -8,32 +8,33 @@ T.RadioButton { + id: control + + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, +- implicitContentWidth + leftPadding + rightPadding) ++ implicitContentWidth + implicitIndicatorWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding, + implicitIndicatorHeight + topPadding + bottomPadding) ++ hoverEnabled: true + + property alias indicatorColor: indicatorRec.color + property alias childrenColor: childrenRec.color + +- property var borderColor: control.checked ? (!control.enabled ? StylePrivate.UKUIRadioButton.checked_disableIndicatorBorderColor : +- control.pressed ? StylePrivate.UKUIRadioButton.checked_clickIndicatorBorderColor : control.hovered ? +- StylePrivate.UKUIRadioButton.checked_hoverIndicatorBorderColor : StylePrivate.UKUIRadioButton.checked_normalIndicatorBorderColor) : +- (!control.enabled ? StylePrivate.UKUIRadioButton.disableIndicatorBorderColor : control.pressed ? +- StylePrivate.UKUIRadioButton.clickIndicatorBorderColor : control.hovered ? +- StylePrivate.UKUIRadioButton.hoverIndicatorBorderColor : StylePrivate.UKUIRadioButton.normalIndicatorBorderColor) +- +- property var backColor: control.checked ? (!control.enabled ? StylePrivate.UKUIRadioButton.checked_disableIndicatorColor : +- control.pressed ? StylePrivate.UKUIRadioButton.checked_clickIndicatorColor : control.hovered ? +- StylePrivate.UKUIRadioButton.checked_hoverIndicatorColor : StylePrivate.UKUIRadioButton.checked_normalIndicatorColor) : +- (!control.enabled ? StylePrivate.UKUIRadioButton.disableIndicatorColor : control.pressed ? +- StylePrivate.UKUIRadioButton.clickIndicatorColor : control.hovered ? +- StylePrivate.UKUIRadioButton.hoverIndicatorColor : StylePrivate.UKUIRadioButton.normalIndicatorColor) +- +- property var childrenDtColor: !control.enabled ? StylePrivate.UKUIRadioButton.checked_disableChildrenColor : +- control.pressed ? StylePrivate.UKUIRadioButton.checked_clickChildrenColor: +- control.hovered ? StylePrivate.UKUIRadioButton.checked_hoverChildrenColor: +- StylePrivate.UKUIRadioButton.checked_normalChildrenColor ++ property var borderColor: control.checked ? (!control.enabled ? radiobutton.checked_disableIndicatorBorderColor : ++ control.pressed ? radiobutton.checked_clickIndicatorBorderColor : control.hovered ? ++ radiobutton.checked_hoverIndicatorBorderColor : radiobutton.checked_normalIndicatorBorderColor) : ++ (!control.enabled ? radiobutton.disableIndicatorBorderColor : control.pressed ? ++ radiobutton.clickIndicatorBorderColor : control.hovered ? ++ radiobutton.hoverIndicatorBorderColor : radiobutton.normalIndicatorBorderColor) ++ ++ property var backColor: control.checked ? (!control.enabled ? radiobutton.checked_disableIndicatorColor : ++ control.pressed ? radiobutton.checked_clickIndicatorColor : control.hovered ? ++ radiobutton.checked_hoverIndicatorColor : radiobutton.checked_normalIndicatorColor) : ++ (!control.enabled ? radiobutton.disableIndicatorColor : control.pressed ? ++ radiobutton.clickIndicatorColor : control.hovered ? ++ radiobutton.hoverIndicatorColor : radiobutton.normalIndicatorColor) ++ ++ property var childrenDtColor: !control.enabled ? radiobutton.checked_disableChildrenColor : ++ control.pressed ? radiobutton.checked_clickChildrenColor: ++ control.hovered ? radiobutton.checked_hoverChildrenColor: ++ radiobutton.checked_normalChildrenColor + + ParseInterface{ + id: parseInterface +@@ -49,19 +50,18 @@ T.RadioButton { + } + + padding: 6 +- spacing: StylePrivate.UKUIRadioButton.space ++ spacing: radiobutton.space + + // keep in sync with RadioDelegate.qml (shared RadioIndicator.qml was removed for performance reasons) + indicator: Rectangle { + id: indicatorRec +- implicitWidth: StylePrivate.UKUIRadioButton.indicatorWidth +- implicitHeight: implicitWidth +- ++ width: radiobutton.indicatorWidth ++ height: width + x: control.text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2 + y: control.topPadding + (control.availableHeight - height) / 2 + + radius: width / 2 +- border.width: StylePrivate.UKUIRadioButton.borderWidth ++ border.width: radiobutton.borderWidth + border.color: getStartColor(borderColor) + color: gradientRec.visible ? "transparent" : getStartColor(backColor) + Rectangle{ +@@ -80,7 +80,7 @@ T.RadioButton { + + Rectangle { + id:childrenRec +- width: StylePrivate.UKUIRadioButton.childrenWidth ++ width: radiobutton.childrenWidth + height: width + anchors.centerIn: parent + radius: width / 2 +@@ -108,7 +108,15 @@ T.RadioButton { + rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0 + + text: control.text +- font: StylePrivate.APPParameter.font +- color: getStartColor(control.enabled ? StylePrivate.UKUIRadioButton.normalTextColor : StylePrivate.UKUIRadioButton.disableTextColor) ++ font: app.font ++ color: getStartColor(control.enabled ? radiobutton.normalTextColor : radiobutton.disableTextColor) ++ } ++ ++ StylePrivate.UKUIRadioButton{ ++ id: radiobutton ++ } ++ ++ StylePrivate.APPParameter{ ++ id: app + } + } +diff --git a/ukui-qqc2-style/org.ukui.style/RadioDelegate.qml b/ukui-qqc2-style/org.ukui.style/RadioDelegate.qml +new file mode 100644 +index 0000000..9a51174 +--- /dev/null ++++ b/ukui-qqc2-style/org.ukui.style/RadioDelegate.qml +@@ -0,0 +1,167 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2017 The Qt Company Ltd. ++** Contact: http://www.qt.io/licensing/ ++** ++** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL3$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and The Qt Company. For licensing terms ++** and conditions see http://www.qt.io/terms-conditions. For further ++** information use the contact form at http://www.qt.io/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 3 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPLv3 included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 3 requirements ++** will be met: https://www.gnu.org/licenses/lgpl.html. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or later as published by the Free ++** Software Foundation and appearing in the file LICENSE.GPL included in ++** the packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 2.0 requirements will be ++** met: http://www.gnu.org/licenses/gpl-2.0.html. ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++import QtQuick 2.12 ++import QtQuick.Controls 2.12 ++import QtQuick.Controls.impl 2.12 ++import QtQuick.Templates 2.12 as T ++import org.ukui.qqc2style.private 1.0 as StylePrivate ++ ++T.RadioDelegate { ++ id: control ++ ++ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, ++ implicitContentWidth + leftPadding + rightPadding) ++ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, ++ implicitContentHeight + topPadding + bottomPadding, ++ implicitIndicatorHeight + topPadding + bottomPadding) ++ hoverEnabled: true ++ ++ property alias indicatorColor: indicatorRec.color ++ property alias childrenColor: childrenRec.color ++ ++ property var borderColor: control.checked ? (!control.enabled ? radiobutton.checked_disableIndicatorBorderColor : ++ control.pressed ? radiobutton.checked_clickIndicatorBorderColor : control.hovered ? ++ radiobutton.checked_hoverIndicatorBorderColor : radiobutton.checked_normalIndicatorBorderColor) : ++ (!control.enabled ? radiobutton.disableIndicatorBorderColor : control.pressed ? ++ radiobutton.clickIndicatorBorderColor : control.hovered ? ++ radiobutton.hoverIndicatorBorderColor : radiobutton.normalIndicatorBorderColor) ++ ++ property var backColor: control.checked ? (!control.enabled ? radiobutton.checked_disableIndicatorColor : ++ control.pressed ? radiobutton.checked_clickIndicatorColor : control.hovered ? ++ radiobutton.checked_hoverIndicatorColor : radiobutton.checked_normalIndicatorColor) : ++ (!control.enabled ? radiobutton.disableIndicatorColor : control.pressed ? ++ radiobutton.clickIndicatorColor : control.hovered ? ++ radiobutton.hoverIndicatorColor : radiobutton.normalIndicatorColor) ++ ++ property var childrenDtColor: !control.enabled ? radiobutton.checked_disableChildrenColor : ++ control.pressed ? radiobutton.checked_clickChildrenColor: ++ control.hovered ? radiobutton.checked_hoverChildrenColor: ++ radiobutton.checked_normalChildrenColor ++ ++ ParseInterface{ ++ id: parseInterface ++ } ++ StylePrivate.UKUIRadioButton{ ++ id: radiobutton ++ } ++ ++ StylePrivate.APPParameter{ ++ id: app ++ } ++ ++ function getStartColor(dtcolor) ++ { ++ return parseInterface.pStartColor(dtcolor) ++ } ++ function getEndColor(dtcolor) ++ { ++ return parseInterface.pEndColor(dtcolor) ++ } ++ ++ padding: 6 ++ spacing: radiobutton.space ++ ++ contentItem: IconLabelContent { ++ id: iconLabel ++ controlRoot: control ++ anchors.left: control.left ++ leftSpace: control.mirrored ? control.indicator.width + control.spacing : control.leftPadding ++ //x: control.text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2 ++ //anchors.centerIn: control ++ implicitWidth: iconLabel.adjustWidth(control.leftPadding + control.rightPadding) + indicator.implicitWidth + control.spacing ++ ++ } ++ ++ // keep in sync with RadioButton.qml (shared RadioIndicator.qml was removed for performance reasons) ++ indicator: Rectangle { ++ id: indicatorRec ++ implicitWidth: radiobutton.indicatorWidth ++ implicitHeight: implicitWidth ++ ++ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding ++ y: control.topPadding + (control.availableHeight - height) / 2 ++ ++ radius: width / 2 ++ border.width: radiobutton.borderWidth ++ border.color: getStartColor(borderColor) ++ color: gradientRec.visible ? "transparent" : getStartColor(backColor) ++ Rectangle{ ++ id: gradientRec ++ anchors.fill: parent ++ radius: parent.radius ++ border.width: parent.border.width ++ border.color: parent.border.color ++ gradient: Gradient { ++ GradientStop { position: 0.0; color: getStartColor(backColor) } ++ ++ GradientStop { position: 1.0; color: getEndColor(backColor)} ++ } ++ visible: !parseInterface.isSolidPattern(backColor) ++ } ++ ++ Rectangle { ++ id:childrenRec ++ width: radiobutton.childrenWidth ++ height: width ++ anchors.centerIn: parent ++ radius: width / 2 ++ color: gradientChildrenRec.visible ? "transparent" : getStartColor(childrenDtColor) ++ visible: control.checked ++ ++ Rectangle{ ++ id: gradientChildrenRec ++ anchors.fill: parent ++ radius: parent.radius ++ border.width: parent.border.width ++ border.color: parent.border.color ++ gradient: Gradient { ++ GradientStop { position: 0.0; color: getStartColor(childrenDtColor) } ++ ++ GradientStop { position: 1.0; color: getEndColor(childrenDtColor)} ++ } ++ visible: !parseInterface.isSolidPattern(childrenDtColor) ++ } ++ } ++ } ++ ++ background: Rectangle { ++ implicitWidth: parent.implicitWidth ++ implicitHeight: 36 ++ visible: control.down || control.highlighted ++ color: control.down ? control.palette.midlight : control.palette.light ++ } ++} +diff --git a/ukui-qqc2-style/org.ukui.style/RoundButton.qml b/ukui-qqc2-style/org.ukui.style/RoundButton.qml +index 91c7bdd..d1f0db4 100644 +--- a/ukui-qqc2-style/org.ukui.style/RoundButton.qml ++++ b/ukui-qqc2-style/org.ukui.style/RoundButton.qml +@@ -26,19 +26,15 @@ T.RoundButton { + id:ncColor + } + +-// StylePrivate.UKUIButton{ +-// id: btn +-// } +-// StylePrivate.APPParameter{ +-// id: appP +-// } +- contentItem: IconLabelContent { ++ contentItem: ButtonIconLabelContent { + controlRoot: controlRoot + anchors.centerIn: controlRoot +- onWidthChanged: console.log(controlRoot.text, width) ++// onWidthChanged: console.log(controlRoot.text, width) + } + background: BackGroundRectangle{ + controlRoot: controlRoot + _radius: controlRoot.height/2 ++ anchors.fill: parent ++ + } + } +diff --git a/ukui-qqc2-style/org.ukui.style/ScrollBar.qml b/ukui-qqc2-style/org.ukui.style/ScrollBar.qml +index 4435aeb..1c03fdb 100644 +--- a/ukui-qqc2-style/org.ukui.style/ScrollBar.qml ++++ b/ukui-qqc2-style/org.ukui.style/ScrollBar.qml +@@ -8,8 +8,8 @@ import org.ukui.qqc2style.private 1.0 as StylePrivate + T.ScrollBar { + id: control + +- palette: StylePrivate.APPParameter.palette +- font: StylePrivate.APPParameter.font ++ palette: app.palette ++ font: app.font + + + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, +@@ -19,19 +19,11 @@ T.ScrollBar { + + hoverEnabled: true + +- padding: StylePrivate.UKUIScrollBar.padding ++ padding: scrollbar.padding + visible: control.policy !== ScrollBar.AlwaysOff + +-// StylePrivate.APPParameter{ +-// id: appP +-// } +- +-// StylePrivate.UKUIScrollBar{ +-// id: scrollbar +-// } +- +- property var itemColor: !control.enabled ? StylePrivate.UKUIScrollBar.disableColor : control.pressed ? StylePrivate.UKUIScrollBar.clickColor : +- control.hovered ? StylePrivate.UKUIScrollBar.hoverColor : StylePrivate.UKUIScrollBar.normalColor ++ property var itemColor: !control.enabled ? scrollbar.disableColor : control.pressed ? scrollbar.clickColor : ++ control.hovered ? scrollbar.hoverColor : scrollbar.normalColor + ParseInterface{ + id: parseInterface + } +@@ -71,16 +63,15 @@ T.ScrollBar { + when: control.policy === ScrollBar.AlwaysOn || (control.active && control.size < 1.0) + PropertyChanges { target: control.contentItem; implicitWidth:8; implicitHeight:8} + } ++ } + +-// transitions: Transition { +-// from: "active" +-// SequentialAnimation { +-// PauseAnimation { duration: 200 } +-// NumberAnimation { target: control.contentItem; duration: 80; property: "opacity"; to: 0.3} +-// } +-// } ++ StylePrivate.UKUIScrollBar{ ++ id: scrollbar + } + ++ StylePrivate.APPParameter{ ++ id: app ++ } + } + + +diff --git a/ukui-qqc2-style/org.ukui.style/Slider.qml b/ukui-qqc2-style/org.ukui.style/Slider.qml +index 653cf33..4011f14 100644 +--- a/ukui-qqc2-style/org.ukui.style/Slider.qml ++++ b/ukui-qqc2-style/org.ukui.style/Slider.qml +@@ -12,17 +12,17 @@ T.Slider { + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitHandleHeight + topPadding + bottomPadding) + +- padding: 6 ++ padding: slider.padding + + hoverEnabled: true + +- property var handleColor: !control.enabled ? StylePrivate.UKUISlider.disableHandleColor : handleClick ? StylePrivate.UKUISlider.clickHandleColor : +- handleHover ?StylePrivate.UKUISlider.hoverHandleColor : StylePrivate.UKUISlider.normalHandleColor +- property var handleBorderColor: !control.enabled ? StylePrivate.UKUISlider.disableHandleBorderColor : handleClick ? StylePrivate.UKUISlider.clickHandleBorderColor : +- handleHover ? StylePrivate.UKUISlider.hoverHandleBorderColor : StylePrivate.UKUISlider.normalHandleBorderColor ++// property var handleColor: !control.enabled ? slider.disableHandleColor : handleClick ? slider.clickHandleColor : ++// handleHover ?slider.hoverHandleColor : slider.normalHandleColor ++// property var handleBorderColor: !control.enabled ? slider.disableHandleBorderColor : handleClick ? slider.clickHandleBorderColor : ++// handleHover ? slider.hoverHandleBorderColor : slider.normalHandleBorderColor + +- property bool handleClick: false +- property bool handleHover: false ++// property bool handleClick: control.handle.pressed ++// property bool handleHover: control.handle.hovered + ParseInterface{ + id: parseInterface + } +@@ -40,14 +40,14 @@ T.Slider { + id: handleRec + x: control.leftPadding + (control.horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2) + y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height)) +- implicitWidth: StylePrivate.UKUISlider.handleHeight +- implicitHeight: StylePrivate.UKUISlider.handleHeight ++ implicitWidth: slider.handleHeight ++ implicitHeight: slider.handleHeight + radius: width / 2 +- color: gradientHandleRec.visible ? "transparent" : getStartColor(handleColor) +- border.width: StylePrivate.UKUISlider.handleBorderWidth +- border.color: getStartColor(handleBorderColor) +- +- ++ color: gradientHandleRec.visible ? "transparent" : getStartColor(!control.enabled ? slider.disableHandleColor : pressed ? slider.clickHandleColor : ++ hovered ?slider.hoverHandleColor : slider.normalHandleColor) ++ border.width: slider.handleBorderWidth ++ border.color: getStartColor(!control.enabled ? slider.disableHandleBorderColor : pressed ? slider.clickHandleBorderColor : ++ hovered ? slider.hoverHandleBorderColor : slider.normalHandleBorderColor) + + Rectangle{ + id: gradientHandleRec +@@ -56,50 +56,43 @@ T.Slider { + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { +- GradientStop { position: 0.0; color: getStartColor(handleBorderColor) } ++ GradientStop { position: 0.0; color: getStartColor(!control.enabled ? slider.disableHandleColor : pressed ? slider.clickHandleColor : ++ hovered ?slider.hoverHandleColor : slider.normalHandleColor) } + +- GradientStop { position: 1.0; color: getEndColor(handleBorderColor)} ++ GradientStop { position: 1.0; color: getEndColor(!control.enabled ? slider.disableHandleColor : pressed ? slider.clickHandleColor : ++ hovered ?slider.hoverHandleColor : slider.normalHandleColor)} + } +- visible: !parseInterface.isSolidPattern(handleBorderColor) ++ visible: !parseInterface.isSolidPattern(!control.enabled ? slider.disableHandleColor : pressed ? slider.clickHandleColor : ++ hovered ?slider.hoverHandleColor : slider.normalHandleColor) + } + +- MouseArea{ +- id: mouseArea +- anchors.fill: parent +- hoverEnabled: true +- onPressed: handleClick = true +- onReleased: handleClick = false +- onEntered: handleHover = true +- onExited: handleHover = false + +- } + } + + background: Item{ + id: item + +-// x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2) +-// y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0) +- implicitWidth: control.horizontal ? (StylePrivate.UKUISlider.normalWidth + handle.width) : StylePrivate.UKUISlider.normalHeight +- implicitHeight: control.horizontal ? StylePrivate.UKUISlider.normalHeight : (StylePrivate.UKUISlider.normalWidth + handle.height) ++ implicitWidth: control.horizontal ? (slider.normalWidth + handle.width) : slider.normalHeight ++ implicitHeight: control.horizontal ? slider.normalHeight : (slider.normalWidth + handle.height) + + Rectangle { + width: item.width + height: item.height +- border.color: getStartColor(StylePrivate.UKUISlider.focusBorderColor) +- border.width: control.activeFocus ? StylePrivate.UKUISlider.focusBorderWidth : 0 ++ border.color: getStartColor(slider.focusBorderColor) ++ border.width: control.activeFocus ? slider.focusBorderWidth : 0 + scale: control.horizontal && control.mirrored ? -1 : 1 ++ color: "transparent" + + Rectangle{ + id: unGroove + x: (control.horizontal ? handle.width / 2 : ((item.width - width) / 2)) + y:(control.horizontal ? ((item.height - height) / 2) : handle.height / 2) +- width: control.horizontal ? (item.width - handle.width) : StylePrivate.UKUISlider.grooveHeight +- height: control.horizontal ? StylePrivate.UKUISlider.grooveHeight : (item.height - handle.height) ++ width: control.horizontal ? (item.width - handle.width) : slider.grooveHeight ++ height: control.horizontal ? slider.grooveHeight : (item.height - handle.height) + radius: control.horizontal ? height/2 : width/2 +- border.width: StylePrivate.UKUISlider.grooveBorderWidth +- border.color: getStartColor(!control.enabled ? StylePrivate.UKUISlider.disableUnGrooveBorderColor : StylePrivate.UKUISlider.normalUnGrooveBorderColor) +- color: gradientUNGrooveRec.visible ? "transparent" : getStartColor(!control.enabled ? StylePrivate.UKUISlider.disableUnGrooveColor : StylePrivate.UKUISlider.normalUnGrooveColor) ++ border.width: slider.grooveBorderWidth ++ border.color: getStartColor(!control.enabled ? slider.disableUnGrooveBorderColor : slider.normalUnGrooveBorderColor) ++ color: gradientUNGrooveRec.visible ? "transparent" : getStartColor(!control.enabled ? slider.disableUnGrooveColor : slider.normalUnGrooveColor) + + Rectangle{ + id: gradientUNGrooveRec +@@ -108,24 +101,24 @@ T.Slider { + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { +- GradientStop { position: 0.0; color: getStartColor(!control.enabled ? StylePrivate.UKUISlider.disableUnGrooveColor : StylePrivate.UKUISlider.normalUnGrooveColor) } ++ GradientStop { position: 0.0; color: getStartColor(!control.enabled ? slider.disableUnGrooveColor : slider.normalUnGrooveColor) } + +- GradientStop { position: 1.0; color: getEndColor(!control.enabled ? StylePrivate.UKUISlider.disableUnGrooveColor : StylePrivate.UKUISlider.normalUnGrooveColor)} ++ GradientStop { position: 1.0; color: getEndColor(!control.enabled ? slider.disableUnGrooveColor : slider.normalUnGrooveColor)} + } +- visible: !parseInterface.isSolidPattern(!control.enabled ? StylePrivate.UKUISlider.disableUnGrooveColor : StylePrivate.UKUISlider.normalUnGrooveColor) ++ visible: !parseInterface.isSolidPattern(!control.enabled ? slider.disableUnGrooveColor : slider.normalUnGrooveColor) + } + } + + Rectangle{ + id:groove + x: (control.horizontal ? handle.width / 2 : ((item.width - width) / 2)) +- y: (control.horizontal ? ((item.height - height) / 2) : handle.height / 2) +- width: control.horizontal ? control.position * unGroove.width : StylePrivate.UKUISlider.grooveHeight +- height: control.horizontal ? StylePrivate.UKUISlider.grooveHeight : control.position * unGroove.height +- radius: StylePrivate.UKUISlider.grooveHeight / 2 +- border.width: StylePrivate.UKUISlider.grooveBorderWidth +- border.color: getStartColor(!control.enabled ? StylePrivate.UKUISlider.disableGrooveBorderColor : StylePrivate.UKUISlider.normalGrooveBorderColor) +- color: gradientGrooveRec.visible ? "transparent" : getStartColor(!control.enabled ? StylePrivate.UKUISlider.disableGrooveColor : StylePrivate.UKUISlider.normalGrooveColor) ++ y: (control.horizontal ? ((item.height - height) / 2) : handle.y + handle.height / 2) ++ width: control.horizontal ? control.position * unGroove.width : slider.grooveHeight ++ height: control.horizontal ? slider.grooveHeight : control.position * unGroove.height ++ radius: control.horizontal ? height/2 : width/2 ++ border.width: slider.grooveBorderWidth ++ border.color: getStartColor(!control.enabled ? slider.disableGrooveBorderColor : slider.normalGrooveBorderColor) ++ color: gradientGrooveRec.visible ? "transparent" : getStartColor(!control.enabled ? slider.disableGrooveColor : slider.normalGrooveColor) + Rectangle{ + id: gradientGrooveRec + anchors.fill: parent +@@ -133,11 +126,11 @@ T.Slider { + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { +- GradientStop { position: 0.0; color: getStartColor(!control.enabled ? StylePrivate.UKUISlider.disableGrooveColor : StylePrivate.UKUISlider.normalGrooveColor) } ++ GradientStop { position: 0.0; color: getStartColor(!control.enabled ? slider.disableGrooveColor : slider.normalGrooveColor) } + +- GradientStop { position: 1.0; color: getEndColor(!control.enabled ? StylePrivate.UKUISlider.disableGrooveColor : StylePrivate.UKUISlider.normalGrooveColor)} ++ GradientStop { position: 1.0; color: getEndColor(!control.enabled ? slider.disableGrooveColor : slider.normalGrooveColor)} + } +- visible: !parseInterface.isSolidPattern(!control.enabled ? StylePrivate.UKUISlider.disableGrooveColor : StylePrivate.UKUISlider.normalGrooveColor) ++ visible: !parseInterface.isSolidPattern(!control.enabled ? slider.disableGrooveColor : slider.normalGrooveColor) + } + } + +@@ -145,14 +138,22 @@ T.Slider { + // id: handle + // x: control.horizontal ? (control.position * control.width - width/2) : ((item.width - width) / 2) + // y: control.horizontal ? ((item.height - height) / 2) : (control.position * parent.height - height/2) +-// width: StylePrivate.UKUISlider.grooveHeight +-// height: StylePrivate.UKUISlider.grooveHeight ++// width: slider.grooveHeight ++// height: slider.grooveHeight + +-// radius: StylePrivate.UKUISlider.grooveHeight / 2 +-// color: !control.enabled ? StylePrivate.UKUISlider.disableHandleColor : StylePrivate.UKUISlider.normalHandleColor +-// border.width: StylePrivate.UKUISlider.handleBorderWidth +-// border.color: !control.enabled ? StylePrivate.UKUISlider.disableHandleBorderColor : StylePrivate.UKUISlider.normalHandleBorderColor ++// radius: slider.grooveHeight / 2 ++// color: !control.enabled ? slider.disableHandleColor : slider.normalHandleColor ++// border.width: slider.handleBorderWidth ++// border.color: !control.enabled ? slider.disableHandleBorderColor : slider.normalHandleBorderColor + // } + } + } ++ ++ StylePrivate.UKUISlider{ ++ id: slider ++ } ++ ++ StylePrivate.APPParameter{ ++ id: app ++ } + } +diff --git a/ukui-qqc2-style/org.ukui.style/SpinBox.qml b/ukui-qqc2-style/org.ukui.style/SpinBox.qml +index 212236f..a1f5ca6 100644 +--- a/ukui-qqc2-style/org.ukui.style/SpinBox.qml ++++ b/ukui-qqc2-style/org.ukui.style/SpinBox.qml +@@ -11,25 +11,26 @@ T.SpinBox { + implicitWidth: implicitBackgroundWidth + leftInset + rightInset//Math.max(implicitBackgroundWidth + leftInset + rightInset, + // contentItem.implicitWidth + 2 * padding + + // up.implicitIndicatorWidth) +- implicitHeight: Math.max(implicitContentHeight + topPadding + bottomPadding, +- implicitBackgroundHeight, +- up.implicitIndicatorHeight + down.implicitIndicatorHeight) ++ implicitHeight: implicitContentHeight + topPadding + bottomPadding//Math.max(implicitContentHeight + topPadding + bottomPadding, ++ // implicitBackgroundHeight, ++ // up.implicitIndicatorHeight + down.implicitIndicatorHeight) + +- padding: StylePrivate.UKUISpinBox.padding ++ padding: spinbox.padding + // leftPadding: padding + (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0)) + rightPadding: padding + (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0)) + +- font: StylePrivate.APPParameter.font ++ font: app.font + + property bool upHover: control.up.hovered + property bool upClick: control.up.pressed + property bool downHover: control.down.hovered + property bool downClick: control.down.pressed +- property var backColor: !control.enabled ? StylePrivate.UKUISpinBox.disableColor : control.activeFocus ? StylePrivate.UKUISpinBox.focusColor : +- control.hovered ? StylePrivate.UKUISpinBox.hoverColor : StylePrivate.UKUISpinBox.normalColor ++ property bool controlPress: false ++ property var backColor: !control.enabled ? spinbox.disableColor : !control.editable ? spinbox.normalColor : controlPress ? spinbox.clickColor : control.activeFocus ? spinbox.focusColor : ++ control.hovered ? spinbox.hoverColor : spinbox.normalColor + +- property var backBorderColor: !control.enabled ? StylePrivate.UKUISpinBox.disableBorderColor : control.activeFocus ? StylePrivate.UKUISpinBox.focusBorderColor : +- control.hovered ? StylePrivate.UKUISpinBox.hoverBorderColor : StylePrivate.UKUISpinBox.normalBorderColor ++ property var backBorderColor: !control.enabled ? spinbox.disableBorderColor : control.activeFocus ? spinbox.focusBorderColor : ++ control.hovered ? spinbox.hoverBorderColor : spinbox.normalBorderColor + + ParseInterface{ + id: parseInterface +@@ -56,6 +57,7 @@ T.SpinBox { + downRadiusRec.canvas.requestPaint(); + } + ++ + validator: IntValidator { + locale: control.locale.name + bottom: Math.min(control.from, control.to) +@@ -67,7 +69,7 @@ T.SpinBox { + z: 2 + text: control.displayText + font: control.font +- color: getStartColor(!control.enabled ? StylePrivate.UKUISpinBox.disableTextColor : StylePrivate.UKUISpinBox.normalTextColor) ++ color: getStartColor(!control.enabled ? spinbox.disableTextColor : spinbox.normalTextColor) + selectionColor: control.palette.highlight + selectedTextColor: control.palette.highlightedText + horizontalAlignment: Qt.AlignLeft +@@ -81,24 +83,25 @@ T.SpinBox { + up.indicator: RadiusRectangle { + id:upRadiusRec + z:3 +- implicitWidth: StylePrivate.UKUISpinBox.btnNormalWidth +- implicitHeight: StylePrivate.UKUISpinBox.btnNormalHeight ++ implicitWidth: spinbox.btnNormalWidth ++ //implicitHeight: control.height/2.0 + anchors.right: control.right + anchors.top: parent.top ++ anchors.bottom: control.verticalCenter + +- leftTopRadius: StylePrivate.UKUISpinBox.radius +- rightTopRadius: StylePrivate.UKUISpinBox.radius ++ leftTopRadius: spinbox.radius ++ rightTopRadius: spinbox.radius + leftBottomRadius: 0 + rightBottomRadius: 0 +- backColor: !control.enabled ? StylePrivate.UKUISpinBox.btnDisableColor : control.up.pressed ? StylePrivate.UKUISpinBox.btnClickColor : +- control.up.hovered ? StylePrivate.UKUISpinBox.btnHoverColor : StylePrivate.UKUISpinBox.btnNormalColor +- borderColor: !control.enabled ? StylePrivate.UKUISpinBox.btnDisableBorderColor : upClick ? StylePrivate.UKUISpinBox.btnClickBorderColor : +- upHover ? StylePrivate.UKUISpinBox.btnHoverBorderColor : StylePrivate.UKUISpinBox.btnNormalBorderColor +- borderWidth: StylePrivate.UKUISpinBox.btnBorderWidth ++ backColor: (!upRadiusRec.enabled || !control.enabled) ? spinbox.btnDisableColor : control.up.pressed ? spinbox.btnClickColor : ++ control.up.hovered ? spinbox.btnHoverColor : spinbox.btnNormalColor ++ borderColor: (!upRadiusRec.enabled || !control.enabled) ? spinbox.btnDisableBorderColor : upClick ? spinbox.btnClickBorderColor : ++ upHover ? spinbox.btnHoverBorderColor : spinbox.btnNormalBorderColor ++ borderWidth: spinbox.btnBorderWidth + Image { + anchors.centerIn: parent + source: { +- var model = !control.enabled ? "disenable" : control.checked ? "clicked" : "normal" ++ var model = (!upRadiusRec.enabled || !control.enabled) ? "disenable" : (app.isDark) ? "highlight" : "normal" + return "image://imageProvider/" + "ukui-up-symbolic" + "/" + model; + } + } +@@ -107,38 +110,39 @@ T.SpinBox { + down.indicator: RadiusRectangle { + id: downRadiusRec + z:3 +- implicitWidth: StylePrivate.UKUISpinBox.btnNormalWidth +- implicitHeight: StylePrivate.UKUISpinBox.btnNormalHeight ++ implicitWidth: spinbox.btnNormalWidth ++ //implicitHeight: control.height/2.0 + ++ anchors.top: control.verticalCenter + anchors.right: control.right + anchors.bottom: parent.bottom + leftTopRadius: 0 + rightTopRadius: 0 +- leftBottomRadius: StylePrivate.UKUISpinBox.radius +- rightBottomRadius: StylePrivate.UKUISpinBox.radius ++ leftBottomRadius: spinbox.radius ++ rightBottomRadius: spinbox.radius + +- backColor: !control.enabled ? StylePrivate.UKUISpinBox.btnDisableColor : control.down.pressed ? StylePrivate.UKUISpinBox.btnClickColor : +- control.down.hovered ? StylePrivate.UKUISpinBox.btnHoverColor : StylePrivate.UKUISpinBox.btnNormalColor +- borderColor: !control.enabled ? StylePrivate.UKUISpinBox.btnDisableBorderColor : downClick ? StylePrivate.UKUISpinBox.btnClickBorderColor : +- downHover ? StylePrivate.UKUISpinBox.btnHoverBorderColor : StylePrivate.UKUISpinBox.btnNormalBorderColor +- borderWidth: StylePrivate.UKUISpinBox.btnBorderWidth ++ backColor: (!downRadiusRec.enabled || !control.enabled) ? spinbox.btnDisableColor : control.down.pressed ? spinbox.btnClickColor : ++ control.down.hovered ? spinbox.btnHoverColor : spinbox.btnNormalColor ++ borderColor: (!downRadiusRec.enabled || !control.enabled) ? spinbox.btnDisableBorderColor : downClick ? spinbox.btnClickBorderColor : ++ downHover ? spinbox.btnHoverBorderColor : spinbox.btnNormalBorderColor ++ borderWidth: spinbox.btnBorderWidth + + + Image { + anchors.centerIn: parent + source: { +- var model = !control.enabled ? "disenable" : control.checked ? "clicked" : "normal" ++ var model = (!downRadiusRec.enabled || !control.enabled) ? "disenable" : (app.isDark) ? "highlight" : "normal" + return "image://imageProvider/" + "ukui-down-symbolic" + "/" + model; + } + } + } + + background: Rectangle { +- implicitWidth: StylePrivate.UKUISpinBox.normalWidth +- implicitHeight: StylePrivate.UKUISpinBox.normalHeight +- radius: StylePrivate.UKUISpinBox.radius +- border.width: control.activeFocus ? StylePrivate.UKUISpinBox.focusBorderWidth : StylePrivate.UKUISpinBox.normalBorderWidth +- color: gradientRec.visible ? "transparent" : getStartColor(backColor) ++ implicitWidth: spinbox.normalWidth ++ implicitHeight: spinbox.normalHeight ++ radius: spinbox.radius ++ border.width: control.activeFocus ? spinbox.focusBorderWidth : spinbox.normalBorderWidth ++ color: !parseInterface.isSolidPattern(backColor) ? "transparent" : getStartColor(backColor) + border.color: getStartColor(backBorderColor) + Rectangle{ + id: gradientRec +@@ -153,5 +157,20 @@ T.SpinBox { + } + visible: !parseInterface.isSolidPattern(backColor) + } ++// MouseArea{ ++// id: mouseArea ++// anchors.fill: parent ++// onPressed: controlPress = true ++// onReleased: controlPress = false ++// } ++ } ++ ++ StylePrivate.UKUISpinBox{ ++ id: spinbox ++ } ++ ++ StylePrivate.APPParameter{ ++ id: app + } ++ + } +diff --git a/ukui-qqc2-style/org.ukui.style/Switch.qml b/ukui-qqc2-style/org.ukui.style/Switch.qml +new file mode 100644 +index 0000000..595f8c7 +--- /dev/null ++++ b/ukui-qqc2-style/org.ukui.style/Switch.qml +@@ -0,0 +1,114 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2017 The Qt Company Ltd. ++** Contact: http://www.qt.io/licensing/ ++** ++** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL3$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and The Qt Company. For licensing terms ++** and conditions see http://www.qt.io/terms-conditions. For further ++** information use the contact form at http://www.qt.io/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 3 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPLv3 included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 3 requirements ++** will be met: https://www.gnu.org/licenses/lgpl.html. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or later as published by the Free ++** Software Foundation and appearing in the file LICENSE.GPL included in ++** the packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 2.0 requirements will be ++** met: http://www.gnu.org/licenses/gpl-2.0.html. ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++import QtQuick 2.12 ++import QtQuick.Templates 2.12 as T ++import QtQuick.Controls 2.12 ++import QtQuick.Controls.impl 2.12 ++import org.ukui.qqc2style.private 1.0 as StylePrivate ++ ++T.Switch { ++ id: control ++ ++ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, ++ implicitContentWidth + leftPadding + rightPadding) ++ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, ++ implicitContentHeight + topPadding + bottomPadding, ++ implicitIndicatorHeight + topPadding + bottomPadding) ++ ++ padding: ukuiSwitch.padding ++ spacing: 6 ++ ++ StylePrivate.UKUISwitch{ ++ id: ukuiSwitch ++ } ++ ParseInterface{ ++ id: parseInterface ++ } ++ ++ function getStartColor(dtcolor) ++ { ++ return parseInterface.pStartColor(dtcolor) ++ } ++ function getEndColor(dtcolor) ++ { ++ return parseInterface.pEndColor(dtcolor) ++ } ++ ++ indicator: Rectangle { ++ implicitWidth: ukuiSwitch.recWidth ++ implicitHeight: ukuiSwitch.recHeight ++ ++ x: control.text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2 ++ y: control.topPadding + (control.availableHeight - height) / 2 ++ ++ radius: implicitHeight/2 ++// leftPadding: 0 ++// rightPadding: 0 ++// padding: ukuiSwitch.padding ++ color: getStartColor(control.checked ? (!control.enabled ? ukuiSwitch.checkedDisableColor : control.pressed ? ukuiSwitch.checkedClickColor : control.hovered ? ukuiSwitch.checkedHoverColor : ukuiSwitch.checkedNormalColor) ++ : (!control.enabled ? ukuiSwitch.disableColor : control.pressed ? ukuiSwitch.clickColor : control.hovered ? ukuiSwitch.hoverColor : ukuiSwitch.normalColor)) ++ ++ border.color: getStartColor(control.checked ? (!control.enabled ? ukuiSwitch.checkedDisableBorderColor : control.pressed ? ukuiSwitch.checkedClickBorderColor : control.hovered ? ukuiSwitch.checkedHoverBorderColor : ukuiSwitch.checkedNormalBorderColor) ++ : (!control.enabled ? ukuiSwitch.disableBorderColor : control.pressed ? ukuiSwitch.clickBorderColor : control.hovered ? ukuiSwitch.hoverColor : ukuiSwitch.normalBorderColor)) ++ ++ border.width: ukuiSwitch.borderWidth ++ Rectangle { ++ x: Math.max(ukuiSwitch.indicatorLeftRightPadding, Math.min(parent.width - width - ukuiSwitch.indicatorLeftRightPadding, control.visualPosition * parent.width - (width / 2) - ukuiSwitch.indicatorLeftRightPadding)) ++ y: (parent.height - height) / 2 ++ width: ukuiSwitch.indicatorWidth ++ height: ukuiSwitch.indicatorWidth ++ radius: height/2 ++ color: getStartColor(!control.enabled ? ukuiSwitch.disableIndicatorColor : ukuiSwitch.normalIndicatorColor) ++// border.width: control.visualFocus ? 2 : 1 ++// border.color: control.visualFocus ? control.palette.highlight : control.enabled ? control.palette.mid : control.palette.midlight ++ ++ Behavior on x { ++ enabled: !control.down ++ SmoothedAnimation { velocity: 200 } ++ } ++ } ++ } ++ ++ contentItem: Label { ++ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0 ++ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0 ++ ++ text: control.text ++// font: control.font ++// color: control.palette.windowText ++ } ++} +diff --git a/ukui-qqc2-style/org.ukui.style/SwitchDelegate.qml b/ukui-qqc2-style/org.ukui.style/SwitchDelegate.qml +new file mode 100644 +index 0000000..c95a0cc +--- /dev/null ++++ b/ukui-qqc2-style/org.ukui.style/SwitchDelegate.qml +@@ -0,0 +1,127 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2017 The Qt Company Ltd. ++** Contact: http://www.qt.io/licensing/ ++** ++** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL3$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and The Qt Company. For licensing terms ++** and conditions see http://www.qt.io/terms-conditions. For further ++** information use the contact form at http://www.qt.io/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 3 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPLv3 included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 3 requirements ++** will be met: https://www.gnu.org/licenses/lgpl.html. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or later as published by the Free ++** Software Foundation and appearing in the file LICENSE.GPL included in ++** the packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 2.0 requirements will be ++** met: http://www.gnu.org/licenses/gpl-2.0.html. ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++import QtQuick 2.12 ++import QtQuick.Templates 2.12 as T ++import QtQuick.Controls 2.12 ++import QtQuick.Controls.impl 2.12 ++import org.ukui.qqc2style.private 1.0 as StylePrivate ++ ++T.SwitchDelegate { ++ id: control ++ ++ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, ++ implicitContentWidth + leftPadding + rightPadding) ++ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, ++ implicitContentHeight + topPadding + bottomPadding, ++ implicitIndicatorHeight + topPadding + bottomPadding) ++ ++ padding: ukuiSwitch.padding ++ spacing: 12 ++ ++// icon.width: 24 ++// icon.height: 24 ++// icon.color: control.palette.text ++ ++ StylePrivate.UKUISwitch{ ++ id: ukuiSwitch ++ } ++ ParseInterface{ ++ id: parseInterface ++ } ++ ++ function getStartColor(dtcolor) ++ { ++ return parseInterface.pStartColor(dtcolor) ++ } ++ function getEndColor(dtcolor) ++ { ++ return parseInterface.pEndColor(dtcolor) ++ } ++ ++ indicator: Rectangle { ++ implicitWidth: ukuiSwitch.recWidth ++ implicitHeight: ukuiSwitch.recHeight ++ ++ x: control.text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2 ++ y: control.topPadding + (control.availableHeight - height) / 2 ++ ++ radius: implicitHeight/2 ++// leftPadding: 0 ++// rightPadding: 0 ++// padding: (height - 16) / 2 ++ color: getStartColor(control.checked ? (!control.enabled ? ukuiSwitch.checkedDisableColor : control.pressed ? ukuiSwitch.checkedClickColor : control.hovered ? ukuiSwitch.checkedHoverColor : ukuiSwitch.checkedNormalColor) ++ : (!control.enabled ? ukuiSwitch.disableColor : control.pressed ? ukuiSwitch.clickColor : control.hovered ? ukuiSwitch.hoverColor : ukuiSwitch.normalColor)) ++ ++ border.color: getStartColor(control.checked ? (!control.enabled ? ukuiSwitch.checkedDisableBorderColor : control.pressed ? ukuiSwitch.checkedClickBorderColor : control.hovered ? ukuiSwitch.checkedHoverBorderColor : ukuiSwitch.checkedNormalBorderColor) ++ : (!control.enabled ? ukuiSwitch.disableBorderColor : control.pressed ? ukuiSwitch.clickBorderColor : control.hovered ? ukuiSwitch.hoverColor : ukuiSwitch.normalBorderColor)) ++ ++ border.width: ukuiSwitch.borderWidth ++ Rectangle { ++ x: Math.max(ukuiSwitch.indicatorLeftRightPadding, Math.min(parent.width - width - ukuiSwitch.indicatorLeftRightPadding, control.visualPosition * parent.width - (width / 2) - ukuiSwitch.indicatorLeftRightPadding)) ++ y: (parent.height - height) / 2 ++ width: ukuiSwitch.indicatorWidth ++ height: ukuiSwitch.indicatorWidth ++ radius: height/2 ++ color: getStartColor(!control.enabled ? ukuiSwitch.disableIndicatorColor : ukuiSwitch.normalIndicatorColor) ++// border.width: control.visualFocus ? 2 : 1 ++// border.color: control.visualFocus ? control.palette.highlight : control.enabled ? control.palette.mid : control.palette.midlight ++ ++ Behavior on x { ++ enabled: !control.down ++ SmoothedAnimation { velocity: 200 } ++ } ++ } ++ } ++ ++ contentItem: IconLabelContent { ++ id: iconLabel ++ ++ controlRoot: control ++ ++ anchors.left: control.left ++ leftSpace: control.mirrored ? control.indicator.width + control.spacing : control.leftPadding ++ ++ implicitWidth: iconLabel.adjustWidth(control.leftPadding + control.rightPadding) + indicator.implicitWidth + control.spacing ++ } ++ ++ background: Rectangle { ++ implicitWidth: parent.implicitWidth ++ implicitHeight: parent.implicitHeight ++ visible: control.down || control.highlighted ++ color: control.down ? control.palette.midlight : control.palette.light ++ } ++} +diff --git a/ukui-qqc2-style/org.ukui.style/TabBar.qml b/ukui-qqc2-style/org.ukui.style/TabBar.qml +index 4817302..bd6b561 100644 +--- a/ukui-qqc2-style/org.ukui.style/TabBar.qml ++++ b/ukui-qqc2-style/org.ukui.style/TabBar.qml +@@ -44,7 +44,7 @@ T.TabBar { + implicitHeight: contentHeight + implicitWidth: contentWidth + //anchors.fill: control +- color: gradientRec.visible ? "transparent" : getStartColor(StylePrivate.UKUITabBar.normalColor) ++ color: gradientRec.visible ? "transparent" : getStartColor(tabbar.normalColor) + Rectangle{ + id: gradientRec + anchors.fill: parent +@@ -52,11 +52,19 @@ T.TabBar { + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { +- GradientStop { position: 0.0; color: getStartColor(StylePrivate.UKUITabBar.normalColor)} ++ GradientStop { position: 0.0; color: getStartColor(tabbar.normalColor)} + +- GradientStop { position: 1.0; color: getEndColor(StylePrivate.UKUITabBar.normalColor)} ++ GradientStop { position: 1.0; color: getEndColor(tabbar.normalColor)} + } +- visible: !parseInterface.isSolidPattern(StylePrivate.UKUITabBar.normalColor) ++ visible: !parseInterface.isSolidPattern(tabbar.normalColor) + } + } ++ ++ StylePrivate.UKUITabBar{ ++ id: tabbar ++ } ++ ++ StylePrivate.APPParameter{ ++ id: app ++ } + } +diff --git a/ukui-qqc2-style/org.ukui.style/TabButton.qml b/ukui-qqc2-style/org.ukui.style/TabButton.qml +index ff777bc..09300de 100644 +--- a/ukui-qqc2-style/org.ukui.style/TabButton.qml ++++ b/ukui-qqc2-style/org.ukui.style/TabButton.qml +@@ -21,15 +21,15 @@ T.TabButton { + hoverEnabled: true //Qt.styleHints.useHoverEffects TODO: how to make this work in 5.7? + + +- font: StylePrivate.APPParameter.font ++ font: app.font + +- property var borderColor: controlRoot.checked ? StylePrivate.UKUITabButton.checkedBorderColor : controlRoot.pressed ? +- StylePrivate.UKUITabButton.clickBorderColor : controlRoot.hovered ? +- StylePrivate.UKUITabButton.hoverBorderColor : StylePrivate.UKUITabButton.normalBorderColor ++ property var borderColor: controlRoot.checked ? tabbutton.checkedBorderColor : controlRoot.pressed ? ++ tabbutton.clickBorderColor : controlRoot.hovered ? ++ tabbutton.hoverBorderColor : tabbutton.normalBorderColor + +- property var backColor: controlRoot.checked ? StylePrivate.UKUITabButton.checkedColor : controlRoot.pressed ? +- StylePrivate.UKUITabButton.clickedColor : controlRoot.hovered ? +- StylePrivate.UKUITabButton.hoverColor : StylePrivate.UKUITabButton.normalColor ++ property var backColor: controlRoot.checked ? tabbutton.checkedColor : controlRoot.pressed ? ++ tabbutton.clickedColor : controlRoot.hovered ? ++ tabbutton.hoverColor : tabbutton.normalColor + // property var backcolor: checked ? "blue" : pressed ? "green" : hovered ? "red" : "yellow" + + ParseInterface{ +@@ -44,12 +44,12 @@ T.TabButton { + { + return parseInterface.pEndColor(dtcolor) + } +- contentItem: IconLabelContent { ++ contentItem: ButtonIconLabelContent { + controlRoot: controlRoot + anchors.centerIn: controlRoot + layout: "left" + leftSpace: 10 +- labelColor: StylePrivate.UKUITabButton.normalTextColor ++// labelColor: tabbutton.normalTextColor + // onWidthChanged: console.log(controlRoot.text, width) + } + background: Canvas{ +@@ -106,7 +106,7 @@ T.TabButton { + ctx.fill(); + + if(getStartColor(borderColor).alpha >= 0.0){ +- ctx.lineWidth = StylePrivate.UKUITabButton.borderWidth; ++ ctx.lineWidth = tabbutton.borderWidth; + ctx.strokenStyle = getStartColor(borderColor); + + ctx.stroke(); +@@ -123,4 +123,12 @@ T.TabButton { + onCheckedChanged: { + canvas.requestPaint() + } ++ ++ StylePrivate.UKUITabButton{ ++ id: tabbutton ++ } ++ ++ StylePrivate.APPParameter{ ++ id: app ++ } + } +diff --git a/ukui-qqc2-style/org.ukui.style/TextField.qml b/ukui-qqc2-style/org.ukui.style/TextField.qml +index 7691180..3d1b656 100644 +--- a/ukui-qqc2-style/org.ukui.style/TextField.qml ++++ b/ukui-qqc2-style/org.ukui.style/TextField.qml +@@ -13,22 +13,22 @@ T.TextField { + contentHeight + topPadding + bottomPadding, + placeholder.implicitHeight + topPadding + bottomPadding) + +- padding: StylePrivate.UKUITextFiled.leftRightPadding ++ padding: textfield.leftRightPadding + leftPadding: padding + 4 + +- color: getStartColor(!control.enabled ? StylePrivate.UKUITextFiled.disableTextColor : StylePrivate.UKUITextFiled.normalTextColor) ++ color: getStartColor(!control.enabled ? textfield.disableTextColor : textfield.normalTextColor) + selectionColor: control.palette.highlight + selectedTextColor: control.palette.highlightedText +- placeholderTextColor: getStartColor(!control.enabled ? StylePrivate.UKUITextFiled.placeHolderDisableTextColor : StylePrivate.UKUITextFiled.placeHolderNormalTextColor) ++ placeholderTextColor: getStartColor(!control.enabled ? textfield.placeHolderDisableTextColor : textfield.placeHolderNormalTextColor) + verticalAlignment: TextInput.AlignVCenter +- font: StylePrivate.APPParameter.font ++ font: app.font + hoverEnabled: true + +- property var backColor: !control.enabled ? StylePrivate.UKUITextFiled.placeHolderDisableBC : control.activeFocus ? StylePrivate.UKUITextFiled.inputNormalBC : +- click ? StylePrivate.UKUITextFiled.placeHolderClickedBC : +- control.hovered ? StylePrivate.UKUITextFiled.placeHolderHoveredBC : StylePrivate.UKUITextFiled.normalBC +- property var backBorderColor: !control.enabled ? StylePrivate.UKUITextFiled.disableBorderColor : control.activeFocus ? StylePrivate.UKUITextFiled.focusBorderColor : +- control.hovered ? StylePrivate.UKUITextFiled.hoverBorderColor : StylePrivate.UKUITextFiled.normalBorderColor ++ property var backColor: !control.enabled ? textfield.placeHolderDisableBC : control.activeFocus ? textfield.inputNormalBC : ++ click ? textfield.placeHolderClickedBC : ++ control.hovered ? textfield.placeHolderHoveredBC : textfield.normalBC ++ property var backBorderColor: !control.enabled ? textfield.disableBorderColor : control.activeFocus ? textfield.focusBorderColor : ++ control.hovered ? textfield.hoverBorderColor : textfield.normalBorderColor + + // property bool hover: false + property bool click: false +@@ -54,7 +54,7 @@ T.TextField { + + text: control.placeholderText + font: control.font +- color: getStartColor(!control.enabled ? StylePrivate.UKUITextFiled.placeHolderDisableTextColor : StylePrivate.UKUITextFiled.placeHolderNormalTextColor) ++ color: getStartColor(!control.enabled ? textfield.placeHolderDisableTextColor : textfield.placeHolderNormalTextColor) + verticalAlignment: control.verticalAlignment + visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter) + elide: Text.ElideRight +@@ -63,10 +63,10 @@ T.TextField { + + background: Rectangle { + id: backrec +- radius: StylePrivate.UKUITextFiled.radius +- implicitWidth: StylePrivate.UKUITextFiled.normalWidth +- implicitHeight: StylePrivate.UKUITextFiled.normalHeight +- border.width: control.activeFocus ? StylePrivate.UKUITextFiled.focusBorderWidth : StylePrivate.UKUITextFiled.normalWidth ++ radius: textfield.radius ++ implicitWidth: textfield.normalWidth ++ implicitHeight: textfield.normalHeight ++ border.width: control.activeFocus ? textfield.focusBorderWidth : textfield.normalWidth + color: gradientRec.visible ? "transparent" : getStartColor(backColor) + border.color: getStartColor(backBorderColor) + +@@ -85,6 +85,14 @@ T.TextField { + } + } + ++ StylePrivate.UKUITextFiled{ ++ id: textfield ++ } ++ ++ StylePrivate.APPParameter{ ++ id: app ++ } ++ + onPressed: { + click = true; + } +diff --git a/ukui-qqc2-style/org.ukui.style/ToolButton.qml b/ukui-qqc2-style/org.ukui.style/ToolButton.qml +index 0cffc0c..91a315f 100644 +--- a/ukui-qqc2-style/org.ukui.style/ToolButton.qml ++++ b/ukui-qqc2-style/org.ukui.style/ToolButton.qml +@@ -9,10 +9,10 @@ T.ToolButton { + implicitWidth: { + var contentwidth = implicitContentWidth + leftPadding + rightPadding + return Math.max(implicitBackgroundWidth + leftInset + rightInset, +- contentwidth) ++ contentwidth, btn.normalWidth) + } + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, +- implicitContentHeight + topPadding + bottomPadding) ++ implicitContentHeight + topPadding + bottomPadding, btn.normalHeight) + + leftPadding: btn.margin + rightPadding: btn.margin +@@ -33,10 +33,10 @@ T.ToolButton { + StylePrivate.APPParameter{ + id: appP + } +- contentItem: IconLabelContent { ++ contentItem: ButtonIconLabelContent { + controlRoot: controlRoot + anchors.centerIn: controlRoot +- onWidthChanged: console.log(controlRoot.text, width) ++// onWidthChanged: console.log(controlRoot.text, width) + } + background: BackGroundRectangle{ + controlRoot: controlRoot +diff --git a/ukui-qqc2-style/org.ukui.style/ToolTip.qml b/ukui-qqc2-style/org.ukui.style/ToolTip.qml +index 94f3b67..abef2c8 100644 +--- a/ukui-qqc2-style/org.ukui.style/ToolTip.qml ++++ b/ukui-qqc2-style/org.ukui.style/ToolTip.qml +@@ -3,14 +3,15 @@ import QtQuick 2.6 + import QtGraphicalEffects 1.0 + import QtQuick.Controls 2.5 as Controls + import QtQuick.Templates 2.5 as T ++import QtQuick.Window 2.15 + import org.ukui.qqc2style.private 1.0 as StylePrivate + + + T.ToolTip { + id: controlRoot + +- palette: StylePrivate.APPParameter.palette +- font: StylePrivate.APPParameter.font ++ palette: appP.palette ++ font: appP.font + + + x: parent ? Math.round((parent.width - implicitWidth) / 2) : 0 +@@ -19,15 +20,16 @@ T.ToolTip { + // Always show the tooltip on top of everything else + z: 999 + +- implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding +- implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding ++// implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding ++// implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding + +- margins: StylePrivate.UKUIToolTip.margins +- padding: StylePrivate.UKUIToolTip.padding ++ margins: tooltip.margins ++ padding: tooltip.padding + + + // Timeout based on text length, from QTipLabel::restartExpireTimer +- timeout: 10000 + 40 * Math.max(0, text.length - 100) ++ timeout: 4000 ++ delay: 10 + + closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent + +@@ -43,43 +45,100 @@ T.ToolTip { + { + return parseInterface.pEndColor(dtcolor) + } +- contentItem: Controls.Label { +- text: controlRoot.text +- wrapMode: Text.WordWrap +- font: controlRoot.font +- color: getStartColor(StylePrivate.UKUIToolTip.textColor) ++ ++ onVisibleChanged: { ++ if(popHandle && parent) ++ { ++ popHandle.setPosion(windowLabel.mapToGlobal(x, y).x, windowLabel.mapToGlobal(x, y).y) ++ } ++// popHandle.visible = visible ++// if(visible && popHandle && !popHandle.visible){ ++// popHandle.open() ++// } ++// else if(!visible && popHandle && popHandle.visible) ++// popHandle.close() + } + ++ StylePrivate.APPParameter{ ++ id: appP ++ } + +- background: Rectangle { +- radius: StylePrivate.UKUIToolTip.radius ++ StylePrivate.UKUIToolTip{ ++ id: tooltip ++ } + +- //border.color: controlRoot.palette.dark +- color: gradientRec.visible ? "transparent" : getStartColor(StylePrivate.UKUIToolTip.backColor) ++ background: Item{ ++ Window { ++ id: popupwindow ++ width: windowLabel ? windowLabel.width : 0 ++ height: windowLabel ? windowLabel.height : 0 ++ visible: controlRoot.visible ++ x: controlRoot.x ++ y: controlRoot.y ++// blurControl: control ++ flags: Qt.ToolTip ++ // margins: tooltip.margins ++ //padding: tooltip.padding ++ ++ Connections { ++ target: popHandle ++ function onSizeChanged(width, height){ ++ windowLabel.implicitWidth = width ++ windowLabel.implicitHeight = height ++ } + +- layer.enabled: true ++ } + + Rectangle{ +- id: gradientRec ++ visible: parent.visible + anchors.fill: parent +- radius: parent.radius +- border.width: parent.border.width +- border.color: parent.border.color +- gradient: Gradient { +- GradientStop { position: 0.0; color: getStartColor(StylePrivate.UKUIToolTip.backColor) } +- +- GradientStop { position: 1.0; color: getEndColor(StylePrivate.UKUIToolTip.backColor)} ++ radius: tooltip.radius ++ color: getStartColor(tooltip.backColor) ++ opacity: appP.menuTransparency ++ ++ Label { ++ id: windowLabel ++ anchors.centerIn: parent ++ visible: parent.visible ++ text: controlRoot.text ++ wrapMode: Text.WordWrap ++ font: controlRoot.font ++ color: getStartColor(tooltip.textColor) ++ onWidthChanged: { ++ controlRoot.implicitWidth = windowLabel.implicitWidth + 2 * controlRoot.padding ++ controlRoot.implicitHeight = windowLabel.implicitHeight+ 2 * controlRoot.padding ++ popHandle.setSize(windowLabel.implicitWidth + 2 * controlRoot.padding, windowLabel.implicitHeight+ 2 * controlRoot.padding) ++ } ++ onHeightChanged: { ++ controlRoot.implicitWidth = windowLabel.implicitWidth + 2 * controlRoot.padding ++ controlRoot.implicitHeight = windowLabel.implicitHeight+ 2 * controlRoot.padding ++ popHandle.setSize(windowLabel.implicitWidth + 2 * controlRoot.padding, windowLabel.implicitHeight + 2 * controlRoot.padding) ++ } ++ Component.onCompleted: { ++ controlRoot.implicitWidth = windowLabel.implicitWidth + 2 * controlRoot.padding ++ controlRoot.implicitHeight = windowLabel.implicitHeight+ 2 * controlRoot.padding ++ popHandle.setSize(windowLabel.implicitWidth + 2 * controlRoot.padding, windowLabel.implicitHeight + 2 * controlRoot.padding) ++ } + } +- visible: !parseInterface.isSolidPattern(StylePrivate.UKUIToolTip.backColor) + } +- layer.effect: DropShadow { +- transparentBorder: true +- radius: 4 +- samples: 8 +- horizontalOffset: 0 +- verticalOffset: 0 +- color: getStartColor(StylePrivate.UKUIToolTip.shadowColor) ++ } ++ } + +- } ++ ++ StylePrivate.PopupHandle{ ++ id: popHandle ++ Component.onCompleted: popHandle.createWindow(popupwindow) ++ posFollwMouse: true + } ++ ++ ++ // contentItem: Controls.Label { ++// text: controlRoot.text ++// wrapMode: Text.WordWrap ++// font: controlRoot.font ++// color: getStartColor(tooltip.textColor) ++// //visible: false ++// } ++ ++ + } +diff --git a/ukui-qqc2-style/org.ukui.style/private/BackGroundRectangle.qml b/ukui-qqc2-style/org.ukui.style/private/BackGroundRectangle.qml +new file mode 100644 +index 0000000..141c583 +--- /dev/null ++++ b/ukui-qqc2-style/org.ukui.style/private/BackGroundRectangle.qml +@@ -0,0 +1,221 @@ ++import QtQuick 2.0 ++import QtQuick.Templates 2.5 as T ++import QtQuick.Layouts 1.3 ++import QtQuick.Controls 2.0 ++import QtGraphicalEffects 1.0 ++import org.ukui.qqc2style.private 1.0 as StylePrivate ++ ++ ++ ++Rectangle { ++ id:root ++ ++ property T.AbstractButton controlRoot: root.parent ++ property int _radius : 6 ++ property bool useGradient: (controlStartColor !== controlEndColor) ++ property color controlStartColor ++ property color controlEndColor ++ property color borderColor ++ ++ color: /*gradientRec.visible ? "transparent" :*/controlStartColor ++ opacity: (controlRoot.flat && !controlRoot.pressed && !controlRoot.hovered) ? 0 : 1 ++ radius: _radius // 可选:设置圆角半径 ++ border.width: controlRoot.focus ? btn.focusBorderWidth : btn.borderWidth ++ border.color: borderColor ++ ++ Rectangle { ++ id: gradientRec ++ anchors.fill: parent ++ radius: _radius // 可选:设置圆角半径 ++ border.width: parent.border.width ++ border.color: parent.border.color ++ ++ gradient: Gradient { ++ id:gradient ++ GradientStop { position: 0.0; color: controlStartColor } ++ ++ GradientStop { position: 1.0; color: controlEndColor } ++ } ++ visible: useGradient ++ } ++ ++ NormalControlColor{ ++ id:ncColor ++ } ++ ++ ParseInterface{ ++ id: parseInterface ++ } ++ StylePrivate.UKUIButton { ++ id: btn ++ onParametryChanged:{ ++ changeColor(controlRoot.highlighted, controlRoot.enabled, controlRoot.pressed, controlRoot.hovered, controlRoot.focus) ++ //root.color = "red" ++ root.update(); ++ } ++ //property alias lRMargin: leftRightMargin ++ } ++ StylePrivate.APPParameter{ ++ id: app ++ onParametryChanged:{ ++ changeColor(controlRoot.highlighted, controlRoot.enabled, controlRoot.pressed, controlRoot.hovered, controlRoot.focus) ++ //root.color = "blue" ++ ++ root.update(); ++ ++ } ++ } ++ function changeColor(highlighted, enable, click, hover, focus){ ++ var closeBtn = false; ++ var windowBtn = false; ++ var importBtn = false; ++ if(controlRoot.hasOwnProperty("buttonType")){ ++ closeBtn = (controlRoot.buttonType === "closeButton"); ++ windowBtn = (controlRoot.buttonType === "windowButton"); ++ importBtn = (controlRoot.buttonType === "importButton"); ++ } ++ ++ if(highlighted || importBtn){ ++ controlStartColor = !enable ? parseInterface.pStartColor(btn.disableHBC) : ++ click ? parseInterface.pStartColor(btn.clickedHBC) : ++ hover ? parseInterface.pStartColor(btn.hoveredHBC) : ++ parseInterface.pStartColor(btn.normalHBC) ++ controlEndColor = !enable ? parseInterface.pEndColor(btn.disableHBC) : ++ click ? parseInterface.pEndColor(btn.clickedHBC) : ++ hover ? parseInterface.pEndColor(btn.hoveredHBC) : ++ parseInterface.pEndColor(btn.normalHBC) ++ ++ borderColor = !enable ? parseInterface.pStartColor(btn.disableBorderHColor) : ++ focus ? parseInterface.pStartColor(btn.focusBorderColor) : ++ click ? parseInterface.pStartColor(btn.clickBorderHColor) : ++ hover ? parseInterface.pStartColor(btn.hoverBorderHColor) : ++ parseInterface.pStartColor(btn.normalBorderHColor) ++ } ++ else if(closeBtn){ ++ controlStartColor = !enable ? parseInterface.pStartColor(btn.disableCloseBC) : ++ click ? parseInterface.pStartColor(btn.clickedCloseBC) : ++ hover ? parseInterface.pStartColor(btn.hoveredCloseBC) : ++ parseInterface.pStartColor(btn.normalCloseBC) ++ ++ controlEndColor = !enable ? parseInterface.pEndColor(btn.disableCloseBC) : ++ click ? parseInterface.pEndColor(btn.clickedCloseBC) : ++ hover ? parseInterface.pEndColor(btn.hoveredCloseBC) : ++ parseInterface.pEndColor(btn.normalCloseBC) ++ ++ borderColor = !enable ? parseInterface.pStartColor(btn.disableBorderCloseColor) : ++ click ? parseInterface.pStartColor(btn.clickBorderCloseColor) : ++ focus ? parseInterface.pStartColor(btn.focusBorderColor) : ++ hover ? parseInterface.pStartColor(btn.hoverBorderCloseColor) : ++ parseInterface.pStartColor(btn.normalBorderCloseColor) ++ } ++ else if(windowBtn){ ++ controlStartColor = !enable ? parseInterface.pStartColor(btn.disableWindowBC) : ++ click ? parseInterface.pStartColor(btn.clickedWindowBC) : ++ hover ? parseInterface.pStartColor(btn.hoveredWindowBC) : ++ parseInterface.pStartColor(btn.normalWindowBC) ++ ++ controlEndColor = !enable ? parseInterface.pEndColor(btn.disableWindowBC) : ++ click ? parseInterface.pEndColor(btn.clickedWindowBC) : ++ hover ? parseInterface.pEndColor(btn.hoveredWindowBC) : ++ parseInterface.pEndColor(btn.normalWindowBC) ++ ++ borderColor = !enable ? parseInterface.pStartColor(btn.disableBorderWindowColor) : ++ click ? parseInterface.pStartColor(btn.clickBorderWindowColor) : ++ focus ? parseInterface.pStartColor(btn.focusBorderColor) : ++ hover ? parseInterface.pStartColor(btn.hoverBorderWindowColor) : ++ parseInterface.pStartColor(btn.normalBorderWindowColor) ++ } ++ else{ ++ var disableStartColor = parseInterface.pStartColor(btn.disableBC); ++ var disableEndColor = parseInterface.pEndColor(btn.disableBC); ++ ++ var clickStartColor = parseInterface.pStartColor(btn.clickedBC); ++ var clickEndColor = parseInterface.pEndColor(btn.clickedBC); ++ ++ var normalStartColor = (controlRoot.flat ? "transparent" : parseInterface.pStartColor(btn.normalBC)); ++ var normalEndColor = (controlRoot.flat ? "transparent" : parseInterface.pEndColor(btn.normalBC)); ++ ++ var hoverStartColor = parseInterface.pStartColor(btn.hoveredBC); ++ var hoverEndColor = parseInterface.pEndColor(btn.hoveredBC); ++ ++ var disableBorderColor = parseInterface.pStartColor(btn.disableBorderColor); ++ var focusBorderColor = parseInterface.pStartColor(btn.focusBorderColor ); ++ var clickBorderColor = parseInterface.pStartColor(btn.clickBorderColor ); ++ var hoverBorderColor = parseInterface.pStartColor(btn.hoverBorderColor ); ++ var normalBorderColor = parseInterface.pStartColor(btn.normalBorderColor ); ++ ++ if(controlRoot.hasOwnProperty("disableStartColor")) ++ disableStartColor = controlRoot.disableStartColor ++ if(controlRoot.hasOwnProperty("disableEndColor")) ++ disableEndColor = controlRoot.disableEndColor ++ if(controlRoot.hasOwnProperty("clickStartColor")) ++ clickStartColor = controlRoot.clickStartColor ++ if(controlRoot.hasOwnProperty("clickEndColor")) ++ clickEndColor = controlRoot.clickEndColor ++ ++ if(controlRoot.hasOwnProperty("normalStartColor")) ++ normalStartColor = controlRoot.normalStartColor ++ if(controlRoot.hasOwnProperty("normalEndColor")) ++ normalEndColor = controlRoot.normalEndColor ++ ++ if(controlRoot.hasOwnProperty("hoverStartColor")) ++ hoverStartColor = controlRoot.hoverStartColor ++ if(controlRoot.hasOwnProperty("hoverEndColor")) ++ hoverEndColor = controlRoot.hoverEndColor ++ ++ if(controlRoot.hasOwnProperty("disableBorderColor")) ++ disableBorderColor = controlRoot.disableBorderColor ++ ++ if(controlRoot.hasOwnProperty("focusBorderColor")) ++ focusBorderColor = controlRoot.focusBorderColor ++ if(controlRoot.hasOwnProperty("clickBorderColor")) ++ clickBorderColor = controlRoot.clickBorderColor ++ ++ if(controlRoot.hasOwnProperty("hoverBorderColor")) ++ hoverBorderColor = controlRoot.hoverBorderColor ++ if(controlRoot.hasOwnProperty("normalBorderColor")) ++ normalBorderColor = controlRoot.normalBorderColor ++ ++ ++ controlStartColor = !enable ? disableStartColor : ++ click ? clickStartColor : ++ hover ? hoverStartColor : ++ normalStartColor ++ ++ controlEndColor = !enable ? disableEndColor : ++ click ? clickEndColor : ++ hover ? hoverEndColor : ++ normalEndColor ++ ++ borderColor = !enable ? disableBorderColor : ++ focus ? focusBorderColor : ++ click ? clickBorderColor : ++ hover ? hoverBorderColor : ++ normalBorderColor ++ } ++ ++ } ++ ++ ++ Component.onCompleted: { ++ changeColor(controlRoot.highlighted, controlRoot.enabled, false, false, false); ++ } ++ ++ Connections { ++ target: controlRoot ++ function onPressedChanged() { ++ changeColor(controlRoot.highlighted, controlRoot.enabled, controlRoot.pressed, controlRoot.hovered, controlRoot.focus) ++ } ++ function onHoveredChanged() { ++ // if(controlRoot.hovered) ++ // grad.visible = true; ++ // else ++ // grad.visible = false; ++ changeColor(controlRoot.highlighted, controlRoot.enabled, false, controlRoot.hovered, controlRoot.focus) ++ } ++ function onFocusChanged(){ ++ changeColor(controlRoot.highlighted, controlRoot.enabled, controlRoot.pressed, controlRoot.hovered, controlRoot.focus) ++ } ++ } ++} ++ +diff --git a/ukui-qqc2-style/org.ukui.style/private/ButtonIconLabelContent.qml b/ukui-qqc2-style/org.ukui.style/private/ButtonIconLabelContent.qml +new file mode 100644 +index 0000000..e51db1d +--- /dev/null ++++ b/ukui-qqc2-style/org.ukui.style/private/ButtonIconLabelContent.qml +@@ -0,0 +1,247 @@ ++import QtQuick 2.6 ++import QtQuick.Templates 2.5 as T ++import QtQuick.Layouts 1.3 ++import QtQuick.Controls 2.0 ++import org.ukui.qqc2style.private 1.0 as StylePrivate ++ ++Item{ ++ id:root ++ property T.AbstractButton controlRoot: root.parent ++ ++ property int normalWidth: btn.normalWidth ++ property int normalHeight: btn.normalHeight ++ ++ property string layout: "center" ++ property int leftSpace: 0 ++ property int labelSpace: 0 ++ ++// property var labelColor: controlRoot.enabled ? btn.normalTextColor : btn.disableTextColor ++ ++ property bool imageVisible : image.visible || image1.visible ++ property var space: { ++ if(controlRoot.display === AbstractButton.TextOnly || controlRoot.display === AbstractButton.IconOnly) ++ return 0 ++ return (label.text != "" && imageVisible) ? btn.space : 0 ++ } ++ ++ ParseInterface{ ++ id: parseInterface ++ } ++ function getStartColor(dtcolor) ++ { ++ return parseInterface.pStartColor(dtcolor) ++ } ++ function getEndColor(dtcolor) ++ { ++ return parseInterface.pEndColor(dtcolor) ++ } ++ ++ function adjustWidth(margin){//margin表示边距 ++ if(controlRoot.display !== AbstractButton.TextUnderIcon){ ++ var textwidth = (label.text !== "" && controlRoot.display !== AbstractButton.IconOnly) ? label.width : 0 ++ var imagewidth = (!imageVisible) ? 0 : image.width ++ if(controlRoot.display === AbstractButton.IconOnly || label.text === "") ++ return imagewidth + margin; ++ if(controlRoot.display !== AbstractButton.TextBesideIcon) ++ return Math.max(textwidth + margin, imagewidth + margin, normalWidth) ++ return Math.max(normalWidth, textwidth + imagewidth + space + margin) ++ } ++ var textwidth1 = label1.text != "" ? label1.width : 0 ++ var imagewidth1 = imageVisible ? 0 : image1.width ++ ++ return Math.max(normalWidth, textwidth1 + imagewidth1 + space + margin) ++ ++ } ++ ++ function adjustHeight(margin){//margin表示边距 ++ if(controlRoot.display !== AbstractButton.TextUnderIcon) { ++ var textheight = label1.text != "" ? label1.height : 0 ++ var imageheight = !imageVisible ? 0 : image1.height ++ if(controlRoot.display !== AbstractButton.TextBesideIcon) ++ return Math.max(textheight + margin, imageheight + margin, normalHeight) ++ return Math.max(normalHeight, textheight + space + margin, imageheight + space + margin) ++ } ++ var textheight1 = label1.text != "" ? label1.height : 0 ++ var imageheight1 = !imageVisible ? 0 : image1.height ++ ++ var h = Math.max(normalHeight, textheight1 + imageheight1 + space + margin) ++// console.log("heigh0000000000....", controlRoot.text, textheight1, imageheight1, h, space, margin) ++ ++ return h ++ } ++ ++ function labelColor(){ ++ if(controlRoot.hasOwnProperty("disableLabelColor") && !controlRoot.enabled) ++ return controlRoot.disableLabelColor ++ else if(controlRoot.hasOwnProperty("clickedLabelColor") && controlRoot.enabled) ++ return controlRoot.clickedLabelColor ++ else if(controlRoot.hasOwnProperty("hoverLabelColor") && controlRoot.enabled) ++ return controlRoot.hoverLabelColor ++ else if(controlRoot.hasOwnProperty("normalLabelColor") && controlRoot.enabled) ++ return controlRoot.normalLabelColor ++ ++ ++ var closeBtn = false; ++ var windowBtn = false; ++ var importBtn = false; ++ if(controlRoot.hasOwnProperty("buttonType")){ ++ closeBtn = (controlRoot.buttonType === "closeButton"); ++ windowBtn = (controlRoot.buttonType === "windowButton"); ++ importBtn = (controlRoot.buttonType === "importButton"); ++ } ++ ++ if(windowBtn){ ++// if(controlRoot.pressed) ++// labelColor = appP.highlightedTextColor ++// else if(controlRoot.hovered) ++// labelColor = appP.brightTextColor ++// else ++ return (controlRoot.enabled ? btn.normalTextColor : btn.disableTextColor) ++ ++ } ++ else if(closeBtn &&(controlRoot.pressed || controlRoot.hovered)){ ++ return btn.highlightTextColor; ++ } ++ else if(importBtn){ ++ if(controlRoot.flat) ++ return (controlRoot.enabled ? btn.normalTextColor : btn.disableTextColor) ++ else ++ return (controlRoot.enabled ? btn.highlightTextColor : btn.highlightTextDisableColor) ++ ++ } ++ else{ ++ return (controlRoot.enabled ? btn.normalTextColor : btn.disableTextColor) ++ } ++ ++ } ++ ++ ++ StylePrivate.UKUIButton{ ++ id: btn ++ ++ } ++ StylePrivate.APPParameter{ ++ id: appP ++ onFontChanged:{ ++ controlRoot.implicitWidth = adjustWidth(2 * btn.leftRightMargin) ++ controlRoot.implicitHeight = adjustHeight(2 * btn.upDownMargin) ++ } ++ } ++ anchors.centerIn: controlRoot ++ ++ Item{ ++ id:item ++ visible: controlRoot.display !== AbstractButton.TextUnderIcon ++ implicitWidth: { ++ var textwidth = (controlRoot.display !== AbstractButton.IconOnly && label.text !== "") ? label.width : 0 ++ var imagewidth = imageVisible ? image.width : 0 ++ if(controlRoot.display === AbstractButton.IconOnly || label.text === "") ++ return imagewidth; ++ ++ if(controlRoot.display !== AbstractButton.TextBesideIcon) ++ return Math.max(textwidth, imagewidth) ++ return Math.max( textwidth + imagewidth + space) ++ } ++ ++ implicitHeight: { ++ var textheight = label.visible ? (label.text != "" ? label.height : 0) : 0 ++ var imageheight = imageVisible ? image.height : 0 ++ if(controlRoot.display === AbstractButton.IconOnly || label.text === "") ++ return imageheight; ++ ++ if(controlRoot.display === AbstractButton.TextUnderIcon) ++ return Math.max(textheight + imageheight + space, normalHeight); ++ return Math.max(textheight, imageheight, normalHeight) ++ ++ } ++ anchors.left: parent.left ++ anchors.leftMargin: { ++ if(layout == "left"){ ++ space += leftSpace; ++ return leftSpace; ++ } ++ else ++ return (parent.width - width) / 2 ++ } ++ anchors.verticalCenter: parent.verticalCenter ++ ++ ++ Image { ++ id: image ++ source: parseInterface.iconSource(controlRoot)//controlRoot.icon.source ++ anchors.verticalCenter: parent.verticalCenter ++ width: (controlRoot.display !== AbstractButton.TextOnly && source !== "" && status != Image.Null) ? 16 : 0 ++ visible: controlRoot.display !== AbstractButton.TextOnly && source !== "" && status != Image.Null ++ ++ } ++ Label { ++ id:label ++ text: controlRoot.text ++ font: controlRoot.font ++ color: getStartColor(labelColor()) ++ visible: controlRoot.display !== AbstractButton.IconOnly && text !== "" ++ ++ anchors.verticalCenter: parent.verticalCenter ++ verticalAlignment: Text.AlignVCenter ++ ++ anchors.left: image.right ++ anchors.leftMargin: (image.visible && image.status !== Image.Null) ? labelSpace : 0 ++ } ++ ++ } ++ Item{ ++ id:item1 ++ visible: controlRoot.display === AbstractButton.TextUnderIcon ++ implicitWidth: { ++ var textwidth1 = label1.text != "" ? label1.width : 0 ++ var imagewidth1 = controlRoot.icon.source === "" ? 0 : image1.width ++ if(controlRoot.display === AbstractButton.TextUnderIcon) ++ return Math.max(textwidth1, imagewidth1, normalWidth); ++ if(controlRoot.display !== AbstractButton.TextBesideIcon) ++ return Math.max(textwidth1, imagewidth1, normalWidth) ++ return Math.max( textwidth1 + imagewidth1 + space, normalWidth) ++ } ++ implicitHeight: { ++ var textheight1 = label1.text != "" ? label1.height : 0 ++ var imageheight1 = controlRoot.icon.source === "" ? 0 : image1.height ++ if(display === AbstractButton.TextUnderIcon) ++ return Math.max(textheight1 + imageheight1 + space, normalHeight); ++ return Math.max(textheight1, imageheight1, normalHeight) ++ ++ } ++ anchors.centerIn: parent ++ Image { ++ id: image1 ++ source: parseInterface.iconSource(controlRoot)//controlRoot.icon.source ++ anchors.horizontalCenter: parent.horizontalCenter ++ width: visible ? 16 : 0 ++ height: visible ? 16 : 0 ++ visible: controlRoot.display !== AbstractButton.TextOnly && source !== "" /*&& status != Image.Null*/ ++ } ++ Label { ++ id:label1 ++ text: controlRoot.text ++ font:controlRoot.font ++ color: getStartColor(labelColor()) ++ visible: controlRoot.display !== AbstractButton.IconOnly && text !== "" ++ ++ anchors.horizontalCenter: parent.horizontalCenter ++ anchors.top: image1.bottom ++ anchors.topMargin: space ++ } ++ ++ } ++ Component.onCompleted: { ++ implicitWidth = adjustWidth(0); ++ implicitHeight = adjustHeight(0); ++ controlRoot.implicitWidth = adjustWidth(2 * btn.leftRightMargin) ++ controlRoot.implicitHeight = adjustHeight(2 * btn.upDownMargin) ++ } ++ ++ onVisibleChanged: { ++ implicitWidth = adjustWidth(0); ++ implicitHeight = adjustHeight(0); ++ controlRoot.implicitWidth = adjustWidth(2 * btn.leftRightMargin) ++ controlRoot.implicitHeight = adjustHeight(2 * btn.upDownMargin) ++ } ++} +diff --git a/ukui-qqc2-style/org.ukui.style/private/IconLabelContent.qml b/ukui-qqc2-style/org.ukui.style/private/IconLabelContent.qml +new file mode 100644 +index 0000000..77533a8 +--- /dev/null ++++ b/ukui-qqc2-style/org.ukui.style/private/IconLabelContent.qml +@@ -0,0 +1,234 @@ ++import QtQuick 2.6 ++import QtQuick.Templates 2.5 as T ++import QtQuick.Layouts 1.3 ++import QtQuick.Controls 2.0 ++import org.ukui.qqc2style.private 1.0 as StylePrivate ++ ++Item{ ++ id:root ++ property T.AbstractButton controlRoot: root.parent ++ ++ property int normalWidth: btn.normalWidth ++ property int normalHeight: btn.normalHeight ++ ++ property string layout: "center" ++ property int leftSpace: 0 ++ property int labelSpace: 0 ++ ++// property var labelColor: controlRoot.enabled ? btn.normalTextColor : btn.disableTextColor ++ ++ property bool imageVisible : image.visible || image1.visible ++ property var space: { ++ if(controlRoot.display === AbstractButton.TextOnly || controlRoot.display === AbstractButton.IconOnly) ++ return 0 ++ return (label.text != "" && imageVisible) ? btn.space : 0 ++ } ++ ++ ParseInterface{ ++ id: parseInterface ++ } ++ function getStartColor(dtcolor) ++ { ++ return parseInterface.pStartColor(dtcolor) ++ } ++ function getEndColor(dtcolor) ++ { ++ return parseInterface.pEndColor(dtcolor) ++ } ++ ++ function adjustWidth(margin){//margin表示边距 ++ if(controlRoot.display !== AbstractButton.TextUnderIcon){ ++ var textwidth = (label.text !== "" && controlRoot.display !== AbstractButton.IconOnly) ? label.width : 0 ++ var imagewidth = (!imageVisible) ? 0 : image.width ++ if(controlRoot.display === AbstractButton.IconOnly || label.text === "") ++ return imagewidth + margin; ++ if(controlRoot.display !== AbstractButton.TextBesideIcon) ++ return Math.max(textwidth + margin, imagewidth + margin) ++ return textwidth + imagewidth + space + margin ++ } ++ var textwidth1 = label1.text != "" ? label1.width : 0 ++ var imagewidth1 = imageVisible ? 0 : image1.width ++ ++ return textwidth1 + imagewidth1 + space + margin ++ ++ } ++ ++ function adjustHeight(margin){//margin表示边距 ++ if(controlRoot.display !== AbstractButton.TextUnderIcon) { ++ var textheight = label1.text != "" ? label1.height : 0 ++ var imageheight = !imageVisible ? 0 : image1.height ++ if(controlRoot.display !== AbstractButton.TextBesideIcon) ++ return Math.max(textheight + margin, imageheight + margin) ++ return textheight + space + margin, imageheight + space + margin ++ } ++ var textheight1 = label1.text != "" ? label1.height : 0 ++ var imageheight1 = !imageVisible ? 0 : image1.height ++ ++ var h = textheight1 + imageheight1 + space + margin ++// console.log("heigh0000000000....", controlRoot.text, textheight1, imageheight1, h, space, margin) ++ ++ return h ++ } ++ ++ function labelColor(){ ++ var closeBtn = false; ++ var windowBtn = false; ++ var importBtn = false; ++ if(controlRoot.hasOwnProperty("buttonType")){ ++ closeBtn = (controlRoot.buttonType === "closeButton"); ++ windowBtn = (controlRoot.buttonType === "windowButton"); ++ importBtn = (controlRoot.buttonType === "importButton"); ++ } ++ if(windowBtn){ ++// if(controlRoot.pressed) ++// labelColor = appP.highlightedTextColor ++// else if(controlRoot.hovered) ++// labelColor = appP.brightTextColor ++// else ++ return (controlRoot.enabled ? btn.normalTextColor : btn.disableTextColor) ++ ++ } ++ else if(closeBtn &&(controlRoot.pressed || controlRoot.hovered)){ ++ return btn.highlightTextColor; ++ } ++ else if(importBtn){ ++ if(controlRoot.flat) ++ return (controlRoot.enabled ? btn.normalTextColor : btn.disableTextColor) ++ else ++ return (controlRoot.enabled ? btn.highlightTextColor : btn.highlightTextDisableColor) ++ ++ } ++ else{ ++ return (controlRoot.enabled ? btn.normalTextColor : btn.disableTextColor) ++ } ++ ++ } ++ ++ function iconSource() ++ { ++ return parseInterface.iconSource(controlRoot) ++ } ++ ++ ++ StylePrivate.UKUIButton{ ++ id: btn ++ ++ } ++ StylePrivate.APPParameter{ ++ id: appP ++ onFontChanged:{ ++// controlRoot.width = adjustWidth(2 * btn.leftRightMargin) ++// controlRoot.height = adjustHeight(2 * btn.upDownMargin) ++ } ++ } ++// anchors.centerIn: controlRoot ++ ++ Item{ ++ id:item ++ visible: controlRoot.display !== AbstractButton.TextUnderIcon ++ implicitWidth: { ++ var textwidth = (controlRoot.display !== AbstractButton.IconOnly && label.text !== "") ? label.width : 0 ++ var imagewidth = imageVisible ? image.width : 0 ++ if(controlRoot.display === AbstractButton.IconOnly || label.text === "") ++ return imagewidth; ++ ++ if(controlRoot.display !== AbstractButton.TextBesideIcon) ++ return Math.max(textwidth, imagewidth) ++ return Math.max( textwidth + imagewidth + space) ++ } ++ ++ implicitHeight: { ++ var textheight = label.visible ? (label.text != "" ? label.height : 0) : 0 ++ var imageheight = imageVisible ? image.height : 0 ++ if(controlRoot.display === AbstractButton.IconOnly || label.text === "") ++ return imageheight; ++ ++ if(controlRoot.display === AbstractButton.TextUnderIcon) ++ return Math.max(textheight + imageheight + space, normalHeight); ++ return Math.max(textheight, imageheight, normalHeight) ++ ++ } ++ anchors.left: parent.left ++ anchors.leftMargin: { ++ ++ return leftSpace; ++ ++ } ++ anchors.verticalCenter: parent.verticalCenter ++ ++ Image { ++ id: image ++ source: iconSource()//controlRoot.icon.source ++ anchors.verticalCenter: parent.verticalCenter ++ width: (controlRoot.display !== AbstractButton.TextOnly && source !== "" && status != Image.Null) ? 16 : 0 ++ visible: controlRoot.display !== AbstractButton.TextOnly && source !== "" && status != Image.Null ++ ++ } ++ Label { ++ id:label ++ text: controlRoot.text ++ font: controlRoot.font ++ color: labelColor() ++ visible: controlRoot.display !== AbstractButton.IconOnly && text !== "" ++ ++ anchors.verticalCenter: parent.verticalCenter ++ ++ anchors.left: image.right ++ anchors.leftMargin: (image.visible && image.status !== Image.Null) ? labelSpace : 0 ++ } ++ ++ } ++ Item{ ++ id:item1 ++ visible: controlRoot.display === AbstractButton.TextUnderIcon ++ implicitWidth: { ++ var textwidth1 = label1.text != "" ? label1.width : 0 ++ var imagewidth1 = controlRoot.icon.source === "" ? 0 : image1.width ++ if(controlRoot.display === AbstractButton.TextUnderIcon) ++ return Math.max(textwidth1, imagewidth1); ++ if(controlRoot.display !== AbstractButton.TextBesideIcon) ++ return Math.max(textwidth1, imagewidth1) ++ return textwidth1 + imagewidth1 + space ++ } ++ implicitHeight: { ++ var textheight1 = label1.text != "" ? label1.height : 0 ++ var imageheight1 = controlRoot.icon.source === "" ? 0 : image1.height ++ if(display === AbstractButton.TextUnderIcon) ++ return textheight1 + imageheight1 + space ++ return Math.max(textheight1, imageheight1); ++ ++ } ++ anchors.centerIn: parent ++ Image { ++ id: image1 ++ source: iconSource()//controlRoot.icon.source ++ anchors.horizontalCenter: parent.horizontalCenter ++ width: visible ? 16 : 0 ++ height: visible ? 16 : 0 ++ visible: controlRoot.display !== AbstractButton.TextOnly && source !== "" /*&& status != Image.Null*/ ++ } ++ Label { ++ id:label1 ++ text: controlRoot.text ++ font:controlRoot.font ++ color: labelColor() ++ visible: controlRoot.display !== AbstractButton.IconOnly && text !== "" ++ ++ anchors.horizontalCenter: parent.horizontalCenter ++ anchors.top: image1.bottom ++ anchors.topMargin: space ++ } ++ ++ } ++ Component.onCompleted: { ++ implicitWidth = adjustWidth(0); ++ implicitHeight = adjustHeight(0); ++ } ++ ++ onVisibleChanged: { ++ implicitWidth = adjustWidth(0); ++ implicitHeight = adjustHeight(0); ++ } ++ ++ ++} +diff --git a/ukui-qqc2-style/org.ukui.style/private/NormalControlColor.qml b/ukui-qqc2-style/org.ukui.style/private/NormalControlColor.qml +new file mode 100644 +index 0000000..ebf3c74 +--- /dev/null ++++ b/ukui-qqc2-style/org.ukui.style/private/NormalControlColor.qml +@@ -0,0 +1,73 @@ ++import QtQuick 2.0 ++import org.ukui.qqc2style.private 1.0 as StylePrivate ++ ++Item { ++ id: root ++// StylePrivate.UKUIButton{ ++// id: btn ++// } ++// StylePrivate.APPParameter{ ++// id: appP ++//// onFontChanged:{ ++//// console.log("onFontChanged.......", StylePrivate.APPParameter.font) ++//// } ++// } ++// StylePrivate.ParseColorInterface{ ++// id:pDTColor ++// } ++// StylePrivate.UKUIButton{ ++// id:uBtn ++// } ++ property color controlStartColor// : StylePrivate.UKUIButton.normalBC ++ property color controlEndColor: controlStartColor ++ property color borderColor ++ ++ ParseInterface{ ++ id: parseInterface ++ } ++ ++ function changeColor(highlighted, enable, click, hover, focus){ ++ var closeBtn = false; ++ var windowBtn = false; ++ var importBtn = false; ++ if(controlRoot.hasOwnProperty("buttonType")){ ++ closeBtn = (controlRoot.buttonType === "closeButton"); ++ windowBtn = (controlRoot.buttonType === "windowButton"); ++ importBtn = (controlRoot.buttonType === "importButton"); ++ } ++ ++ if(highlighted || importBtn){ ++ controlStartColor = !enable ? parseInterface.pStartColor(StylePrivate.UKUIButton.disableHBC) : ++ click ? parseInterface.pStartColor(StylePrivate.UKUIButton.clickedHBC) : ++ hover ? parseInterface.pStartColor(StylePrivate.UKUIButton.hoveredHBC) : ++ parseInterface.pStartColor(StylePrivate.UKUIButton.normalHBC) ++ controlEndColor = !enable ? parseInterface.pEndColor(StylePrivate.UKUIButton.disableHBC) : ++ click ? parseInterface.pEndColor(StylePrivate.UKUIButton.clickedHBC) : ++ hover ? parseInterface.pEndColor(StylePrivate.UKUIButton.hoveredHBC) : ++ parseInterface.pEndColor(StylePrivate.UKUIButton.normalHBC) ++ ++ borderColor = !enable ? parseInterface.pStartColor(StylePrivate.UKUIButton.disableBorderHColor) : ++ focus ? parseInterface.pStartColor(StylePrivate.UKUIButton.focusBorderColor) : ++ click ? parseInterface.pStartColor(StylePrivate.UKUIButton.clickBorderHColor) : ++ hover ? parseInterface.pStartColor(StylePrivate.UKUIButton.hoverBorderHColor) : ++ parseInterface.pStartColor(StylePrivate.UKUIButton.normalBorderHColor) ++ } ++ else{ ++ controlStartColor = !enable ? parseInterface.pStartColor(StylePrivate.UKUIButton.disableBC) : ++ click ? parseInterface.pStartColor(StylePrivate.UKUIButton.clickedBC) : ++ hover ? parseInterface.pStartColor(StylePrivate.UKUIButton.hoveredBC) : ++ parseInterface.pStartColor(StylePrivate.UKUIButton.normalBC) ++ ++ controlEndColor = !enable ? parseInterface.pEndColor(StylePrivate.UKUIButton.disableBC) : ++ click ? parseInterface.pEndColor(StylePrivate.UKUIButton.clickedBC) : ++ hover ? parseInterface.pEndColor(StylePrivate.UKUIButton.hoveredBC) : ++ parseInterface.pEndColor(StylePrivate.UKUIButton.normalBC) ++ ++ borderColor = !enable ? parseInterface.pStartColor(StylePrivate.UKUIButton.disableBorderColor) : ++ focus ? parseInterface.pStartColor(StylePrivate.UKUIButton.focusBorderColor) : ++ click ? parseInterface.pStartColor(StylePrivate.UKUIButton.clickBorderColor) : ++ hover ? parseInterface.pStartColor(StylePrivate.UKUIButton.hoverBorderColor) : ++ parseInterface.pStartColor(StylePrivate.UKUIButton.normalBorderColor) ++ } ++ } ++} +diff --git a/ukui-qqc2-style/org.ukui.style/private/ParseInterface.qml b/ukui-qqc2-style/org.ukui.style/private/ParseInterface.qml +new file mode 100644 +index 0000000..67dbee5 +--- /dev/null ++++ b/ukui-qqc2-style/org.ukui.style/private/ParseInterface.qml +@@ -0,0 +1,72 @@ ++import QtQuick 2.0 ++import org.ukui.qqc2style.private 1.0 as StylePrivate ++ ++Item { ++ StylePrivate.ParseColorInterface ++ { ++ id: pf ++ } ++ ++ function pStartColor(dtColor) ++ { ++ return pf.startColor(dtColor) ++ } ++ function pEndColor(dtColor) ++ { ++ return pf.endColor(dtColor) ++ } ++ function isSolidPattern(dtColor) ++ { ++ return pf.isSolidPattern(dtColor) ++ } ++ ++ function iconSource(controlRoot) ++ { ++ if((controlRoot.icon.source.toString() === "" && controlRoot.icon.name.toString() === "")){ ++ return controlRoot.icon.source ++ } ++ var closeBtn = false; ++ var windowBtn = false; ++ var importBtn = false; ++ if(controlRoot.hasOwnProperty("buttonType")){ ++ closeBtn = (controlRoot.buttonType === "closeButton"); ++ windowBtn = (controlRoot.buttonType === "windowButton"); ++ importBtn = (controlRoot.buttonType === "importButton"); ++ } ++ var model = ""; ++ if(!controlRoot.enabled) ++ model = "/disenable" ++ if(importBtn || controlRoot.highlighted || appP.isDark) ++ model = "/highlight" ++ else if(closeBtn &&(controlRoot.pressed || controlRoot.hovered)) ++ { ++ model = "/highlight" ++ } ++ else ++ model = "/normal" ++// } ++ ++ let s = controlRoot.icon.source.toString(); ++ if(s === "") ++ s = controlRoot.icon.name.toString(); ++ var lastS =pf.endString(s, "/"); ++ if(lastS == "disenable" || lastS == "highlight" || lastS == "normal") ++ model = ""; ++ ++ //var prefix = /^image:///imageProvider///i; ++ var prefixStr = "image://imageProvider/"; ++// var qrcStr = "qrc:/"; ++// console.log("start width...", s.slice(0, 5), s.slice(0, prefixStr.length)) ++ if(s.slice(0, 5) === "qrc:/" || s.slice(0, 5) === "file:") ++ { ++ return prefixStr + s; ++ } ++ ++ if(s.slice(0, prefixStr.length).toLowerCase() === prefixStr.toLowerCase()){ ++ prefixStr = ""; ++ } ++// console.log("buttoniconlabel...", prefixStr + s + model) ++ return prefixStr + s + model; ++ } ++ ++} +diff --git a/ukui-qqc2-style/org.ukui.style/private/RadiusRectangle.qml b/ukui-qqc2-style/org.ukui.style/private/RadiusRectangle.qml +new file mode 100644 +index 0000000..8f50eeb +--- /dev/null ++++ b/ukui-qqc2-style/org.ukui.style/private/RadiusRectangle.qml +@@ -0,0 +1,92 @@ ++import QtQuick 2.6 ++import QtQuick.Templates 2.5 as T ++import QtQuick.Controls 2.0 ++import org.ukui.qqc2style.private 1.0 as StylePrivate ++ ++Item{ ++ id:control ++// property Rectangle controlRoot: control.parent ++ ++ property int leftTopRadius: 6 ++ property int rightTopRadius: 6 ++ property int leftBottomRadius: 6 ++ property int rightBottomRadius: 6 ++ ++ property var borderColor ++ property var backColor ++ property int borderWidth ++ ++ property alias canvas : customButtonCanvas ++ ++ ParseInterface{ ++ id: parseInterface ++ } ++ ++ function getStartColor(dtcolor) ++ { ++ return parseInterface.pStartColor(dtcolor) ++ } ++ function getEndColor(dtcolor) ++ { ++ return parseInterface.pEndColor(dtcolor) ++ } ++ Canvas { ++ id: customButtonCanvas ++ width: control.width ++ height: control.height ++ anchors.centerIn: parent ++ ++ onPaint: { ++ var ctx = getContext("2d"); ++ ctx.reset(); ++ var gradient = ctx.createLinearGradient(customButtonCanvas.x, customButtonCanvas.y, customButtonCanvas.width, customButtonCanvas.height) ++ ++ gradient.addColorStop(0, getStartColor(backColor)); ++ gradient.addColorStop(1, getEndColor(backColor)); ++ ++ // 填充颜色 ++ ctx.fillStyle = gradient; ++ ++ // 开始绘制路径 ++ ctx.beginPath(); ++ ++ // 绘制圆角矩形,只有左上角和右上角有圆角 ++ // 绘制第一段圆弧路径 ++ ctx.moveTo(0, leftTopRadius); ++ ctx.arc(leftTopRadius, leftTopRadius, leftTopRadius, Math.PI, Math.PI * 3 / 2); ++ // 绘制第一段直线路径 ++ ctx.lineTo(width - rightTopRadius, 0); ++ // 绘制第二段圆弧路径 ++ ctx.arc(width - rightTopRadius, rightTopRadius, rightTopRadius, Math.PI * 3 / 2, Math.PI * 2); ++ // 绘制第二段直线路径 ++ ctx.lineTo(width, height - rightBottomRadius); ++ // 绘制第三段圆弧路径 ++ ctx.arc(width - rightBottomRadius, height - rightBottomRadius, rightBottomRadius, 0, Math.PI * 1 / 2); ++ // 绘制第三段直线路径 ++ ctx.lineTo(leftBottomRadius, height); ++ // 绘制第四段圆弧路径 ++ ctx.arc(leftBottomRadius, height - leftBottomRadius, leftBottomRadius, Math.PI * 1 / 2, Math.PI); ++ // 绘制第四段直线路径 ++ ctx.lineTo(leftTopRadius); ++ ++ // 填充路径 ++ ctx.closePath(); ++ ctx.clip(); ++ ctx.fill(); ++ ++ // 绘制边框 ++ ctx.strokeStyle = getStartColor(borderColor); ++ ctx.lineWidth = borderWidth; ++ ctx.stroke(); ++ } ++ ++ // 鼠标点击事件(模拟按钮点击) ++// MouseArea { ++// anchors.fill: parent ++// onClicked: { ++// canvas.requestPaint() ++ ++// } ++// } ++ } ++} +diff --git a/ukui-qqc2-style/org.ukui.style/private/qmldir b/ukui-qqc2-style/org.ukui.style/private/qmldir +deleted file mode 100644 +index 57c12f5..0000000 +--- a/ukui-qqc2-style/org.ukui.style/private/qmldir ++++ /dev/null +@@ -1,5 +0,0 @@ +- +-singleton MobileTextActionsToolBar 1.0 MobileTextActionsToolBar.qml +-DefaultListItemBackground 1.0 DefaultListItemBackground.qml +-MobileCursor 1.0 MobileCursor.qml +-FocusRect 1.0 FocusRect.qml +diff --git a/ukui-qqc2-style/org.ukui.style/qmldir b/ukui-qqc2-style/org.ukui.style/qmldir +new file mode 100644 +index 0000000..3559f3a +--- /dev/null ++++ b/ukui-qqc2-style/org.ukui.style/qmldir +@@ -0,0 +1,11 @@ ++ ++singleton MobileTextActionsToolBar 1.0 private/MobileTextActionsToolBar.qml ++DefaultListItemBackground 1.0 private/DefaultListItemBackground.qml ++MobileCursor 1.0 private/MobileCursor.qml ++FocusRect 1.0 private/FocusRect.qml ++RadiusRectangle 1.0 private/RadiusRectangle.qml ++ParseInterface 1.0 private/ParseInterface.qml ++NormalControlColor 1.0 private/NormalControlColor.qml ++ButtonIconLabelContent 1.0 private/ButtonIconLabelContent.qml ++BackGroundRectangle 1.0 private/BackGroundRectangle.qml ++IconLabelContent 1.0 private/IconLabelContent.qml +diff --git a/ukui-qqc2-style/qml.qrc b/ukui-qqc2-style/qml.qrc +index 43eca30..33bafab 100644 +--- a/ukui-qqc2-style/qml.qrc ++++ b/ukui-qqc2-style/qml.qrc +@@ -1,9 +1,39 @@ + <RCC> + <qresource prefix="/"> +- <file alias="NormalControlColor">qml/NormalControlColor.qml</file> +- <file alias="IconLabelContent">qml/IconLabelContent.qml</file> +- <file>qml/BackGroundRectangle.qml</file> +- <file>qml/RadiusRectangle.qml</file> +- <file>qml/ParseInterface.qml</file> ++ <file>org.ukui.style/Menu.qml</file> ++ <file>org.ukui.style/Slider.qml</file> ++ <file>org.ukui.style/ApplicationWindow.qml</file> ++ <file>org.ukui.style/MenuItem.qml</file> ++ <file>org.ukui.style/ComboBox.qml</file> ++ <file>org.ukui.style/TabBar.qml</file> ++ <file>org.ukui.style/CheckBox.qml</file> ++ <file>org.ukui.style/ItemDelegate.qml</file> ++ <file>org.ukui.style/ScrollBar.qml</file> ++ <file>org.ukui.style/Popup.qml</file> ++ <file>org.ukui.style/TabButton.qml</file> ++ <file>org.ukui.style/TextField.qml</file> ++ <file>org.ukui.style/Button.qml</file> ++ <file>org.ukui.style/ProgressBar.qml</file> ++ <file>org.ukui.style/RadioButton.qml</file> ++ <file>org.ukui.style/Label.qml</file> ++ <file>org.ukui.style/SpinBox.qml</file> ++ <file>org.ukui.style/ToolButton.qml</file> ++ <file>org.ukui.style/RoundButton.qml</file> ++ <file>org.ukui.style/ToolTip.qml</file> ++ <file>org.ukui.style/ScrollView.qml</file> ++ <file>org.ukui.style/CheckDelegate.qml</file> ++ <file>org.ukui.style/RadioDelegate.qml</file> ++ <file>org.ukui.style/Switch.qml</file> ++ <file>org.ukui.style/SwitchDelegate.qml</file> ++ <file>org.ukui.style/private/RadiusRectangle.qml</file> ++ <file>org.ukui.style/private/ParseInterface.qml</file> ++ <file>org.ukui.style/private/NormalControlColor.qml</file> ++ <file>org.ukui.style/private/MobileTextActionsToolBar.qml</file> ++ <file>org.ukui.style/private/MobileCursor.qml</file> ++ <file>org.ukui.style/private/IconLabelContent.qml</file> ++ <file>org.ukui.style/private/FocusRect.qml</file> ++ <file>org.ukui.style/private/DefaultListItemBackground.qml</file> ++ <file>org.ukui.style/private/ButtonIconLabelContent.qml</file> ++ <file>org.ukui.style/private/BackGroundRectangle.qml</file> + </qresource> + </RCC> +diff --git a/ukui-qqc2-style/qml/BackGroundRectangle.qml b/ukui-qqc2-style/qml/BackGroundRectangle.qml +deleted file mode 100644 +index 66b4c49..0000000 +--- a/ukui-qqc2-style/qml/BackGroundRectangle.qml ++++ /dev/null +@@ -1,68 +0,0 @@ +-import QtQuick 2.0 +-import QtQuick.Templates 2.5 as T +-import QtQuick.Layouts 1.3 +-import QtQuick.Controls 2.0 +-import QtGraphicalEffects 1.0 +-import org.ukui.qqc2style.private 1.0 as StylePrivate +- +- +- +-Rectangle { +- id:rect1 +- implicitWidth: controlRoot.width +- +- implicitHeight: controlRoot.height +- property T.AbstractButton controlRoot: root.parent +- property int _radius : 6 +- property bool useGradient: (ncColor.controlStartColor !== ncColor.controlEndColor) +- +- color: gradientRec.visible ? "transparent" : ncColor.controlStartColor +- opacity: (controlRoot.flat && !controlRoot.pressed && !controlRoot.hovered) ? 0 : 1 +- radius: _radius // 可选:设置圆角半径 +- border.width: controlRoot.focus ? StylePrivate.UKUIButton.focusBorderWidth : StylePrivate.UKUIButton.borderWidth +- border.color: ncColor.borderColor +- +- +- +- Rectangle { +- id: gradientRec +- anchors.fill: parent +- radius: _radius // 可选:设置圆角半径 +- border.width: parent.border.width +- border.color: parent.border.color +- +- gradient: Gradient { +- id:gradient +- GradientStop { position: 0.0; color: ncColor.controlStartColor } +- +- GradientStop { position: 1.0; color: ncColor.controlEndColor } +- } +- visible: useGradient +- } +- +- NormalControlColor{ +- id:ncColor +- } +- +- Component.onCompleted: { +- ncColor.changeColor(controlRoot.highlighted, controlRoot.enabled, false, false, false); +- } +- +- Connections { +- target: controlRoot +- function onPressedChanged() { +- ncColor.changeColor(controlRoot.highlighted, controlRoot.enabled, controlRoot.pressed, controlRoot.hovered, controlRoot.focus) +- } +- function onHoveredChanged() { +- // if(controlRoot.hovered) +- // grad.visible = true; +- // else +- // grad.visible = false; +- ncColor.changeColor(controlRoot.highlighted, controlRoot.enabled, false, controlRoot.hovered, controlRoot.focus) +- } +- function onFocusChanged(){ +- ncColor.changeColor(controlRoot.highlighted, controlRoot.enabled, controlRoot.pressed, controlRoot.hovered, controlRoot.focus) +- } +- } +-} +- +diff --git a/ukui-qqc2-style/qml/IconLabelContent.qml b/ukui-qqc2-style/qml/IconLabelContent.qml +deleted file mode 100644 +index 4665f65..0000000 +--- a/ukui-qqc2-style/qml/IconLabelContent.qml ++++ /dev/null +@@ -1,218 +0,0 @@ +-import QtQuick 2.6 +-import QtQuick.Templates 2.5 as T +-import QtQuick.Layouts 1.3 +-import QtQuick.Controls 2.0 +-import org.ukui.qqc2style.private 1.0 as StylePrivate +- +-Item{ +- id:root +- property T.AbstractButton controlRoot: root.parent +- +- property int normalWidth: btn.normalWidth +- property int normalHeight: btn.normalHeight +- +- property string layout: "center" +- property int leftSpace: 0 +- property int labelSpace: 0 +- +- property var labelColor: controlRoot.enabled ? btn.normalTextColor : btn.disableTextColor +- +- property bool imageVisible : image.visible || image1.visible +- property var space: { +- if(controlRoot.display === AbstractButton.TextOnly || controlRoot.display === AbstractButton.IconOnly) +- return 0 +- return (label.text != "" && imageVisible) ? btn.space : 0 +- } +- +- ParseInterface{ +- id: parseInterface +- } +- function getStartColor(dtcolor) +- { +- return parseInterface.pStartColor(dtcolor) +- } +- function getEndColor(dtcolor) +- { +- return parseInterface.pEndColor(dtcolor) +- } +- +- function adjustWidth(margin){//margin表示边距 +- if(controlRoot.display !== AbstractButton.TextUnderIcon){ +- var textwidth = (label.text !== "" && controlRoot.display !== AbstractButton.IconOnly) ? label.width : 0 +- var imagewidth = (!imageVisible) ? 0 : image.width +- if(controlRoot.display === AbstractButton.IconOnly || label.text === "") +- return imagewidth + margin; +- if(controlRoot.display !== AbstractButton.TextBesideIcon) +- return Math.max(textwidth + margin, imagewidth + margin, normalWidth) +- return Math.max(normalWidth, textwidth + imagewidth + space + margin) +- } +- var textwidth1 = label1.text != "" ? label1.width : 0 +- var imagewidth1 = imageVisible ? 0 : image1.width +- +- return Math.max(normalWidth, textwidth1 + imagewidth1 + space + margin) +- +- } +- +- function adjustHeight(margin){//margin表示边距 +- if(controlRoot.display !== AbstractButton.TextUnderIcon) { +- var textheight = label1.text != "" ? label1.height : 0 +- var imageheight = !imageVisible ? 0 : image1.height +- if(controlRoot.display !== AbstractButton.TextBesideIcon) +- return Math.max(textheight + margin, imageheight + margin, normalHeight) +- return Math.max(normalHeight, textheight + space + margin, imageheight + space + margin) +- } +- var textheight1 = label1.text != "" ? label1.height : 0 +- var imageheight1 = !imageVisible ? 0 : image1.height +- +- var h = Math.max(normalHeight, textheight1 + imageheight1 + space + margin) +-// console.log("heigh0000000000....", controlRoot.text, textheight1, imageheight1, h, space, margin) +- +- return h +- } +- +- StylePrivate.UKUIButton{ +- id: btn +- +- } +- StylePrivate.APPParameter{ +- id: appP +- onFontChanged:{ +- controlRoot.width = adjustWidth(2 * btn.leftRightMargin) +- controlRoot.height = adjustHeight(2 * btn.upDownMargin) +- } +- } +- anchors.centerIn: controlRoot +- +- Item{ +- id:item +- visible: controlRoot.display !== AbstractButton.TextUnderIcon +- implicitWidth: { +- var textwidth = (controlRoot.display !== AbstractButton.IconOnly && label.text !== "") ? label.width : 0 +- var imagewidth = imageVisible ? image.width : 0 +- if(controlRoot.display === AbstractButton.IconOnly || label.text === "") +- return imagewidth; +- +- if(controlRoot.display !== AbstractButton.TextBesideIcon) +- return Math.max(textwidth, imagewidth) +- return Math.max( textwidth + imagewidth + space) +- } +- +- implicitHeight: { +- var textheight = label.visible ? (label.text != "" ? label.height : 0) : 0 +- var imageheight = imageVisible ? image.height : 0 +- if(controlRoot.display === AbstractButton.IconOnly || label.text === "") +- return imageheight; +- +- if(controlRoot.display === AbstractButton.TextUnderIcon) +- return Math.max(textheight + imageheight + space, normalHeight); +- return Math.max(textheight, imageheight, normalHeight) +- +- } +- anchors.left: parent.left +- anchors.leftMargin: { +- if(layout == "left"){ +- space += leftSpace; +- return leftSpace; +- } +- else +- return (parent.width - width) / 2 +- } +- anchors.verticalCenter: parent.verticalCenter +- +- Image { +- id: image +- source: //controlRoot.icon.source +- { +- if((controlRoot.icon.source.toString() === "" && controlRoot.icon.name.toString() === "")) +- return controlRoot.icon.source +- +- var model = !controlRoot.enabled ? "disenable" : controlRoot.pressed ? "clicked" : controlRoot.hovered ? "hover" : "normal" +- +- let s = controlRoot.icon.source.toString() +- return "image://imageProvider/" + s + "/" + model; +- } +- anchors.verticalCenter: parent.verticalCenter +- width: (controlRoot.display !== AbstractButton.TextOnly && source !== "" && status != Image.Null) ? 16 : 0 +- visible: controlRoot.display !== AbstractButton.TextOnly && source !== "" && status != Image.Null +- +- } +- Label { +- id:label +- text: controlRoot.text +- font: controlRoot.font +- color: getStartColor(labelColor) +- visible: controlRoot.display !== AbstractButton.IconOnly && text !== "" +- +- anchors.verticalCenter: parent.verticalCenter +- +- anchors.left: image.right +- anchors.leftMargin: (image.visible && image.status !== Image.Null) ? 0 : labelSpace +- +- } +- +- } +- Item{ +- id:item1 +- visible: controlRoot.display === AbstractButton.TextUnderIcon +- implicitWidth: { +- var textwidth1 = label1.text != "" ? label1.width : 0 +- var imagewidth1 = controlRoot.icon.source === "" ? 0 : image1.width +- if(controlRoot.display === AbstractButton.TextUnderIcon) +- return Math.max(textwidth1, imagewidth1, normalWidth); +- if(controlRoot.display !== AbstractButton.TextBesideIcon) +- return Math.max(textwidth1, imagewidth1, normalWidth) +- return Math.max( textwidth1 + imagewidth1 + space, normalWidth) +- } +- implicitHeight: { +- var textheight1 = label1.text != "" ? label1.height : 0 +- var imageheight1 = controlRoot.icon.source === "" ? 0 : image1.height +- if(display === AbstractButton.TextUnderIcon) +- return Math.max(textheight1 + imageheight1 + space, normalHeight); +- return Math.max(textheight1, imageheight1, normalHeight) +- +- } +- anchors.centerIn: parent +- Image { +- id: image1 +- source: //controlRoot.icon.source +- { +- if((controlRoot.icon.source.toString() === "" && controlRoot.icon.name.toString() === "")) +- return controlRoot.icon.source +- +- var model = !controlRoot.enabled ? "disenable" : controlRoot.pressed ? "clicked" : controlRoot.hovered ? "hover" : "normal" +- +- let s = controlRoot.icon.source.toString() +- return "image://imageProvider/" + s + "/" + model; +- } +- anchors.horizontalCenter: parent.horizontalCenter +- width: visible ? 16 : 0 +- height: visible ? 16 : 0 +- visible: controlRoot.display !== AbstractButton.TextOnly && source !== "" /*&& status != Image.Null*/ +- } +- Label { +- id:label1 +- text: controlRoot.text +- font: controlRoot.font +- color: getStartColor(labelColor) +- visible: controlRoot.display !== AbstractButton.IconOnly && text !== "" +- +- anchors.horizontalCenter: parent.horizontalCenter +- anchors.top: image1.bottom +- anchors.topMargin: space +- } +- +- } +- Component.onCompleted: { +- width = adjustWidth(0); +- height = adjustHeight(0); +- controlRoot.width = adjustWidth(2 * btn.leftRightMargin) +- controlRoot.height = adjustHeight(2 * btn.upDownMargin) +- } +- +- onVisibleChanged: { +- width = adjustWidth(0); +- height = adjustHeight(0); +- controlRoot.width = adjustWidth(2 * btn.leftRightMargin) +- controlRoot.height = adjustHeight(2 * btn.upDownMargin) +- } +-} +diff --git a/ukui-qqc2-style/qml/NormalControlColor.qml b/ukui-qqc2-style/qml/NormalControlColor.qml +deleted file mode 100644 +index 027cc13..0000000 +--- a/ukui-qqc2-style/qml/NormalControlColor.qml ++++ /dev/null +@@ -1,77 +0,0 @@ +-import QtQuick 2.0 +-import org.ukui.qqc2style.private 1.0 as StylePrivate +- +-Item { +- id: root +-// StylePrivate.UKUIButton{ +-// id: btn +-// } +-// StylePrivate.APPParameter{ +-// id: appP +-//// onFontChanged:{ +-//// console.log("onFontChanged.......", StylePrivate.APPParameter.font) +-//// } +-// } +-// StylePrivate.ParseDTColor{ +-// id:pDTColor +-// } +-// StylePrivate.UKUIButton{ +-// id:uBtn +-// } +- property color controlStartColor// : StylePrivate.UKUIButton.normalBC +- property color controlEndColor: controlStartColor +- property color borderColor +- +- ParseInterface{ +- id: parseInterface +- } +- +- function changeColor(highlighted, enable, click, hover, focus){ +-// var test = uBtn.hoveredBC; +-// console.log("ParseDTColor 00000000", test); +-// console.log("ParseDTColor 00000000", test.colorType()); +-// console.log("ParseDTColor 00000000", test.mixStartColor()); +- +-// var test1 = uBtn.normalBC +-// console.log("ParseDTColor 111111", test1); +-// console.log("ParseDTColor 111111", pDTColor.isSolidPattern(test1)); +-// console.log("ParseDTColor 111111", pDTColor.startColor(test1)); +-// console.log("ParseDTColor 111111", pDTColor.endColor(test1)); +- +-// console.log("ParseDTColor 222222", parseInterface.pEndColor(test1)); +- +- if(highlighted){ +- controlStartColor = !enable ? parseInterface.pStartColor(StylePrivate.UKUIButton.disableHBC) : +- click ? parseInterface.pStartColor(StylePrivate.UKUIButton.clickedHBC) : +- hover ? parseInterface.pStartColor(StylePrivate.UKUIButton.hoveredHBC) : +- parseInterface.pStartColor(StylePrivate.UKUIButton.normalHBC) +- controlEndColor = !enable ? parseInterface.pEndColor(StylePrivate.UKUIButton.disableHBC) : +- click ? parseInterface.pEndColor(StylePrivate.UKUIButton.clickedHBC) : +- hover ? parseInterface.pEndColor(StylePrivate.UKUIButton.hoveredHBC) : +- parseInterface.pEndColor(StylePrivate.UKUIButton.normalHBC) +- +- borderColor = !enable ? parseInterface.pStartColor(StylePrivate.UKUIButton.disableBorderHColor) : +- focus ? parseInterface.pStartColor(StylePrivate.UKUIButton.focusBorderColor) : +- click ? parseInterface.pStartColor(StylePrivate.UKUIButton.clickBorderHColor) : +- hover ? parseInterface.pStartColor(StylePrivate.UKUIButton.hoverBorderHColor) : +- parseInterface.pStartColor(StylePrivate.UKUIButton.normalBorderHColor) +- } +- else{ +- controlStartColor = !enable ? parseInterface.pStartColor(StylePrivate.UKUIButton.disableBC) : +- click ? parseInterface.pStartColor(StylePrivate.UKUIButton.clickedBC) : +- hover ? parseInterface.pStartColor(StylePrivate.UKUIButton.hoveredBC) : +- parseInterface.pStartColor(StylePrivate.UKUIButton.normalBC) +- +- controlEndColor = !enable ? parseInterface.pEndColor(StylePrivate.UKUIButton.disableBC) : +- click ? parseInterface.pEndColor(StylePrivate.UKUIButton.clickedBC) : +- hover ? parseInterface.pEndColor(StylePrivate.UKUIButton.hoveredBC) : +- parseInterface.pEndColor(StylePrivate.UKUIButton.normalBC) +- +- borderColor = !enable ? parseInterface.pStartColor(StylePrivate.UKUIButton.disableBorderColor) : +- focus ? parseInterface.pStartColor(StylePrivate.UKUIButton.focusBorderColor) : +- click ? parseInterface.pStartColor(StylePrivate.UKUIButton.clickBorderColor) : +- hover ? parseInterface.pStartColor(StylePrivate.UKUIButton.hoverBorderColor) : +- parseInterface.pStartColor(StylePrivate.UKUIButton.normalBorderColor) +- } +- } +-} +diff --git a/ukui-qqc2-style/qml/ParseInterface.qml b/ukui-qqc2-style/qml/ParseInterface.qml +deleted file mode 100644 +index e50f963..0000000 +--- a/ukui-qqc2-style/qml/ParseInterface.qml ++++ /dev/null +@@ -1,17 +0,0 @@ +-import QtQuick 2.0 +-import org.ukui.qqc2style.private 1.0 as StylePrivate +- +-Item { +- function pStartColor(dtColor) +- { +- return StylePrivate.ParseDTColor.startColor(dtColor) +- } +- function pEndColor(dtColor) +- { +- return StylePrivate.ParseDTColor.startColor(dtColor) +- } +- function isSolidPattern(dtColor) +- { +- return StylePrivate.ParseDTColor.isSolidPattern(dtColor) +- } +-} +diff --git a/ukui-qqc2-style/qml/RadiusRectangle.qml b/ukui-qqc2-style/qml/RadiusRectangle.qml +deleted file mode 100644 +index 8f50eeb..0000000 +--- a/ukui-qqc2-style/qml/RadiusRectangle.qml ++++ /dev/null +@@ -1,92 +0,0 @@ +-import QtQuick 2.6 +-import QtQuick.Templates 2.5 as T +-import QtQuick.Controls 2.0 +-import org.ukui.qqc2style.private 1.0 as StylePrivate +- +-Item{ +- id:control +-// property Rectangle controlRoot: control.parent +- +- property int leftTopRadius: 6 +- property int rightTopRadius: 6 +- property int leftBottomRadius: 6 +- property int rightBottomRadius: 6 +- +- property var borderColor +- property var backColor +- property int borderWidth +- +- property alias canvas : customButtonCanvas +- +- ParseInterface{ +- id: parseInterface +- } +- +- function getStartColor(dtcolor) +- { +- return parseInterface.pStartColor(dtcolor) +- } +- function getEndColor(dtcolor) +- { +- return parseInterface.pEndColor(dtcolor) +- } +- Canvas { +- id: customButtonCanvas +- width: control.width +- height: control.height +- anchors.centerIn: parent +- +- onPaint: { +- var ctx = getContext("2d"); +- ctx.reset(); +- var gradient = ctx.createLinearGradient(customButtonCanvas.x, customButtonCanvas.y, customButtonCanvas.width, customButtonCanvas.height) +- +- gradient.addColorStop(0, getStartColor(backColor)); +- gradient.addColorStop(1, getEndColor(backColor)); +- +- // 填充颜色 +- ctx.fillStyle = gradient; +- +- // 开始绘制路径 +- ctx.beginPath(); +- +- // 绘制圆角矩形,只有左上角和右上角有圆角 +- // 绘制第一段圆弧路径 +- ctx.moveTo(0, leftTopRadius); +- ctx.arc(leftTopRadius, leftTopRadius, leftTopRadius, Math.PI, Math.PI * 3 / 2); +- // 绘制第一段直线路径 +- ctx.lineTo(width - rightTopRadius, 0); +- // 绘制第二段圆弧路径 +- ctx.arc(width - rightTopRadius, rightTopRadius, rightTopRadius, Math.PI * 3 / 2, Math.PI * 2); +- // 绘制第二段直线路径 +- ctx.lineTo(width, height - rightBottomRadius); +- // 绘制第三段圆弧路径 +- ctx.arc(width - rightBottomRadius, height - rightBottomRadius, rightBottomRadius, 0, Math.PI * 1 / 2); +- // 绘制第三段直线路径 +- ctx.lineTo(leftBottomRadius, height); +- // 绘制第四段圆弧路径 +- ctx.arc(leftBottomRadius, height - leftBottomRadius, leftBottomRadius, Math.PI * 1 / 2, Math.PI); +- // 绘制第四段直线路径 +- ctx.lineTo(leftTopRadius); +- +- // 填充路径 +- ctx.closePath(); +- ctx.clip(); +- ctx.fill(); +- +- // 绘制边框 +- ctx.strokeStyle = getStartColor(borderColor); +- ctx.lineWidth = borderWidth; +- ctx.stroke(); +- } +- +- // 鼠标点击事件(模拟按钮点击) +-// MouseArea { +-// anchors.fill: parent +-// onClicked: { +-// canvas.requestPaint() +- +-// } +-// } +- } +-} +diff --git a/ukui-qqc2-style/qmldir b/ukui-qqc2-style/qmldir +deleted file mode 100644 +index 10b9729..0000000 +--- a/ukui-qqc2-style/qmldir ++++ /dev/null +@@ -1,5 +0,0 @@ +-IconLabelContent 1.0 qml/IconLabelContent.qml +-NormalControlColor 1.0 qml/NormalControlColor.qml +-BackGroundRectangle 1.0 qml/BackGroundRectangle.qml +-RadiusRectangle 1.0 qml/RadiusRectangle.qml +-ParseInterface 1.0 qml/ParseInterface.qml +diff --git a/ukui-styles/CMakeLists.txt b/ukui-styles/CMakeLists.txt +index e6552c1..51b52c3 100644 +--- a/ukui-styles/CMakeLists.txt ++++ b/ukui-styles/CMakeLists.txt +@@ -89,7 +89,7 @@ add_definitions(-DQT_DEPRECATED_WARNINGS) + add_definitions(-DQT_MESSAGELOGCONTEXT) + + if(UNIX) +- set(TARGET_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/qt5/plugins/styles") ++ set(TARGET_PATH "/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/plugins/styles") + + MESSAGE("libukui-styles TARGET_PATH: ${TARGET_PATH}") + +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 58a3e1c..05db10b 100644 +--- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp ++++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp +@@ -32,8 +32,8 @@ + #include <QWidget> + #include <QPainter> + #include <QPainterPath> +- + #include <QPaintDevice> ++#include <QPixmap> + + #include "animations/config-tab-widget-animation-helper.h" + #include "animations/config-scrollbar-animation-helper.h" +diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp +index a34227f..7db68d4 100644 +--- a/ukui-styles/readconfig.cpp ++++ b/ukui-styles/readconfig.cpp +@@ -192,6 +192,16 @@ GlobalDTConfigPrivate::GlobalDTConfigPrivate() + kFontPrimary = QBrush(Qt::NoBrush); + kBrandNormal = QBrush(Qt::NoBrush); + } ++ init(); ++} ++ ++GlobalDTConfigPrivate::~GlobalDTConfigPrivate() ++{ ++ ++} ++ ++void GlobalDTConfigPrivate::init() ++{ + if (QGSettings::isSchemaInstalled("org.ukui.style")) { + QGSettings *settings = new QGSettings("org.ukui.style"); + +@@ -203,6 +213,7 @@ GlobalDTConfigPrivate::GlobalDTConfigPrivate() + } + + m_widgetThemeName = settings->get("widgetThemeName").toString(); ++ + } + qDebug() << "===========> m_widgetThemeName = " << m_widgetThemeName; + QString path = ThemeConfigPath; +@@ -216,10 +227,6 @@ GlobalDTConfigPrivate::GlobalDTConfigPrivate() + initUKUIGlobalThemeParameters(); + } + +-GlobalDTConfigPrivate::~GlobalDTConfigPrivate() +-{ +- +-} + + QColor GlobalDTConfigPrivate::composeColor(QColor foreColor, QColor backColor) + { +@@ -350,10 +357,6 @@ inline bool GlobalDTConfigPrivate::getColorValue(QBrush &dtBrush, const QString + + dtBrush = QBrush(stringToColor(colorStr.mid(start_index, end_index - start_index))); + +- if (key == "kfont-primary") { +- qDebug()<<"parse kfont-primary"<<colorStr.mid(start_index, end_index - start_index); +- } +- + } else if (colorStr.contains(": linear-gradient(0deg, ")) { + //mix solidcolor + start_index = colorStr.indexOf(": linear-gradient(0deg, "); +@@ -437,7 +440,6 @@ inline bool GlobalDTConfigPrivate::getColorValue(QBrush &dtBrush, const QString + + gradient.setColorAt(0, startColor); + gradient.setColorAt(1, endColor); +- + dtBrush = QBrush(gradient); + } else { + cDebug << "Config file format error! " << key << "colorStr" << colorStr; +@@ -889,7 +891,7 @@ void GlobalDTConfigPrivate::updateColorsBasedOnAccentColor(const QColor &accentC + + kLineBrandNormal = accentColorBrush; + kLineBrandHover = accentColorBrush; +- kLineBrandDisable = accentColorBrush; ++// kLineBrandDisable = accentColorBrush; + kLineBrandClick = accentColorBrush; + kBrand1 = accentColorBrush; + +@@ -981,6 +983,7 @@ GlobalDTConfig::GlobalDTConfig() : d(new GlobalDTConfigPrivate()) + connect(settings, &QGSettings::changed, this, [=](const QString &key) { + if (key == "styleName" || key == "widgetThemeName" || key == "themeColor" || + key == "style-name" || key == "widget-theme-name" || key == "theme-color") { ++ d->init(); + emit tokenChanged(); + } + }); +diff --git a/ukui-styles/readconfig.h b/ukui-styles/readconfig.h +index 1aee0a3..b2a16f8 100644 +--- a/ukui-styles/readconfig.h ++++ b/ukui-styles/readconfig.h +@@ -51,6 +51,7 @@ public: + void updateColorsBasedOnAccentColor(const QColor& accentColor); + QColor stringToColor(const QString& colorStr); + QColor processCSSColor(const QString& cssString, const QColor& replacementColor); ++ void init(); + + //qt palette + QBrush windowTextActive ; diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0008-commit-2c7dbff6-fixbug145709.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0008-commit-2c7dbff6-fixbug145709.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0008-commit-2c7dbff6-fixbug145709.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0008-commit-2c7dbff6-fixbug145709.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,6655 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Wed, 25 Oct 2023 11:36:02 +0800 -Subject: =?utf-8?b?Y29tbWl0IzJjN2RiZmY2IGZpeGJ1ZzE0NTcwOSDmlofku7blr7nor50=?= - =?utf-8?b?5qGG5Yid5aeL5YyW5pe25Lya6Lez6L2s6Lev5b6E5LyY5YyW?= - ---- - libqt5-ukui-style/settings/black-list.h | 12 + - .../settings/org.ukui.style.gschema.xml | 7 +- - qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro | 4 +- - .../translations/qt5-ukui-platformtheme_zh_CN.ts | 297 +- - .../translations/qt5-ukui-platformtheme_zh_HK.ts | 258 ++ - .../widget/filedialog/kyfiledialog.cpp | 133 +- - .../widget/filedialog/kyfiledialog.h | 12 +- - ukui-qml-style-helper/kystylehelper.h | 78 +- - ukui-styles/blur-helper.cpp | 4 +- - .../qt5-config-style-ukui/config-shadow-helper.cpp | 8 +- - .../themeconfig/classical.json | 2 +- - .../qt5-config-style-ukui/themeconfig/default.json | 2 +- - .../qt5-config-style-ukui/themeconfig/fashion.json | 2 +- - .../ukui-config-style-parameters.cpp | 331 +- - .../ukui-config-style-parameters.h | 2 +- - .../qt5-config-style-ukui/ukui-config-style.cpp | 172 +- - .../qt5-config-style-ukui/ukui-config-style.h | 2 +- - .../qt5-style-ukui/kabstract-style-parameters.cpp | 3953 -------------------- - .../qt5-style-ukui/kabstract-style-parameters.h | 311 -- - ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp | 55 +- - .../themeconfig/style-ukui-classical.json | 2 +- - ukui-styles/qt5-style-ukui/ukui-style-parameters.h | 2 +- - ukui-styles/readconfig.cpp | 2 +- - ukui-styles/themeinformation.h | 2 +- - ukui-styles/ukui-style-plugin.cpp | 42 +- - ukui-styles/window-manager.cpp | 5 + - 26 files changed, 1100 insertions(+), 4600 deletions(-) - create mode 100644 qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts - delete mode 100644 ukui-styles/qt5-style-ukui/kabstract-style-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/kabstract-style-parameters.h - -diff --git a/libqt5-ukui-style/settings/black-list.h b/libqt5-ukui-style/settings/black-list.h -index a1a8825..e3166b1 100644 ---- a/libqt5-ukui-style/settings/black-list.h -+++ b/libqt5-ukui-style/settings/black-list.h -@@ -106,4 +106,16 @@ static const QStringList focusStateActiveList() { - return l; - } - -+static const QStringList windowManageBlackList() { -+ QStringList l; -+ l << "iflyime-spe-sym"; -+ l << "iflyime-qimpanel"; -+ l << "iflyime-setw"; -+ l << "iflyime-sett"; -+ l << "iflyime-qim"; -+ l << "iflyime-hw"; -+ l << "SpecificSymbol"; -+ return l; -+} -+ - #endif // BLACKLIST_H -diff --git a/libqt5-ukui-style/settings/org.ukui.style.gschema.xml b/libqt5-ukui-style/settings/org.ukui.style.gschema.xml -index 5232ba1..1b777a5 100644 ---- a/libqt5-ukui-style/settings/org.ukui.style.gschema.xml -+++ b/libqt5-ukui-style/settings/org.ukui.style.gschema.xml -@@ -63,7 +63,7 @@ - <key type="s" name="theme-color"> - <default>"daybreakBlue"</default> - <summary> theme color</summary> -- <description>Set theme color for UKUI desktop environment.include default,daybreakBlue,jamPurple,magenta,sunRed,sunsetOrange,dustGold,polarGreen</description> -+ <description>Set theme color for UKUI desktop environment.include default,daybreakBlue,jamPurple,magenta,sunRed,sunsetOrange,dustGold,polarGreen, and using rgba for example "(125,125,125)" </description> - </key> - <key type="b" name="cursor-blink"> - <default>true</default> -@@ -87,5 +87,10 @@ - <summary>Custom highlight color</summary> - <description>Set custom highlight color for UKUI desktop environment.Now is to compatible with third party application</description> - </key> -+ <key type="i" name="window-radius"> -+ <default>8</default> -+ <summary>Window Radius</summary> -+ <description>Set the rounded corner size of the window</description> -+ </key> - </schema> - </schemalist> -diff --git a/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro b/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro -index 846d03c..90842aa 100644 ---- a/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro -+++ b/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro -@@ -64,8 +64,8 @@ TRANSLATIONS += \ - $$PWD/translations/qt5-ukui-platformtheme_mn.ts \ - $$PWD/translations/qt5-ukui-platformtheme_kk.ts \ - $$PWD/translations/qt5-ukui-platformtheme_ky.ts \ -- $$PWD/translations/qt5-ukui-platformtheme_ug.ts -- -+ $$PWD/translations/qt5-ukui-platformtheme_ug.ts \ -+ $$PWD/translations/qt5-ukui-platformtheme_zh_HK.ts - - unix { - target.path = $$[QT_INSTALL_PLUGINS]/platformthemes -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts -index ac74561..7c6289d 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts -@@ -2,262 +2,257 @@ - <!DOCTYPE TS> - <TS version="2.1" language="zh_CN"> - <context> -- <name>MessageBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="96"/> -- <source>Close</source> -- <translation>关闭</translation> -- </message> --</context> --<context> -- <name>QApplication</name> -- <message> -- <location filename="../widget/messagebox/message-box.h" line="272"/> -- <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.h" line="274"/> -- <source>Incompatible Qt Library Error</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>QDialogButtonBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="361"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1089"/> -- <source>OK</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>QMessageBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="417"/> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -- <source>Show Details...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -- <source>Hide Details...</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>QObject</name> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> -- <source>File Name</source> -- <translation>文件名称</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> -- <source>Modified Date</source> -- <translation>修改日期</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> -- <source>File Type</source> -- <translation>文件类型</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> -- <source>File Size</source> -- <translation>文件大小</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> -- <source>Original Path</source> -- <translation>原始路径</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> -- <source>Descending</source> -- <translation>降序</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> -- <source>Ascending</source> -- <translation>升序</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> -- <source>Use global sorting</source> -- <translation>使用全局排序</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> -- <source>List View</source> -- <translation>列表视图</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> -- <source>Icon View</source> -- <translation>图标视图</translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="729"/> -- <source>Close</source> -- <translation>关闭</translation> -- </message> --</context> --<context> -- <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -- <source>Default Slide</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -- <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <name>KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2524"/> - <source>Open File</source> - <translation>打开</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2525"/> - <source>Save File</source> - <translation>保存</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2538"/> - <source>All Files (*)</source> - <translation>所有(*)</translation> - </message> - </context> - <context> -- <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <name>KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="192"/> - <source>Go Back</source> - <translation>后退</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="199"/> - <source>Go Forward</source> - <translation>前进</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="205"/> - <source>Cd Up</source> - <translation>向上</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="212"/> - <source>Search</source> - <translation>搜索</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="220"/> - <source>View Type</source> - <translation>视图类型</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="231"/> - <source>Sort Type</source> - <translation>排序类型</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="348"/> - <source>Maximize</source> - <translation>最大化</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="250"/> - <source>Close</source> - <translation>关闭</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="345"/> - <source>Restore</source> - <translation>还原</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="941"/> - <source>Name</source> - <translation>文件名</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="944"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1532"/> - <source>Open</source> - <translation>打开</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="945"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="954"/> - <source>Cancel</source> - <translation>取消</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="949"/> - <source>Save as</source> - <translation>另存为</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> - <source>New Folder</source> - <translation>新建文件夹</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="953"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1536"/> - <source>Save</source> - <translation>保存</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="989"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="992"/> - <source>Directories</source> - <translation>目录</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> - <source>Warning</source> - <translation>警告</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> - <source>exist, are you sure replace?</source> - <translation>已存在,是否替换?</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1858"/> - <source>NewFolder</source> - <translation>新建文件夹</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2146"/> - <source>Undo</source> - <translation>撤销</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2153"/> - <source>Redo</source> - <translation>重做</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> - <source>warn</source> - <translation>警告</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> - <source>This operation is not supported.</source> - <translation>不支持此操作。</translation> - </message> - </context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="166"/> -+ <source>Close</source> -+ <translation>关闭</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="190"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>可执行文件“%1”需要数量%2,找到数量%3。</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="192"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>不兼容的Qt库错误</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="423"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1106"/> -+ <source>OK</source> -+ <translation>确认</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="479"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="897"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <source>Show Details...</source> -+ <translation>显示细节……</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="897"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <source>Hide Details...</source> -+ <translation>隐藏细节……</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="19"/> -+ <source>File Name</source> -+ <translation>文件名称</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="23"/> -+ <source>Modified Date</source> -+ <translation>修改日期</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="27"/> -+ <source>File Type</source> -+ <translation>文件类型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="31"/> -+ <source>File Size</source> -+ <translation>文件大小</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="35"/> -+ <source>Original Path</source> -+ <translation>原始路径</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="44"/> -+ <source>Descending</source> -+ <translation>降序</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="49"/> -+ <source>Ascending</source> -+ <translation>升序</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="55"/> -+ <source>Use global sorting</source> -+ <translation>使用全局排序</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="75"/> -+ <source>List View</source> -+ <translation>列表视图</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="76"/> -+ <source>Icon View</source> -+ <translation>图标视图</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>默认slide</translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>让选项卡小部件切换为幻灯片动画。</translation> -+ </message> -+</context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts -new file mode 100644 -index 0000000..f39f694 ---- /dev/null -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts -@@ -0,0 +1,258 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="zh_HK"> -+<context> -+ <name>KyFileDialogHelper</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2524"/> -+ <source>Open File</source> -+ <translation>打開</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2525"/> -+ <source>Save File</source> -+ <translation>保存</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2538"/> -+ <source>All Files (*)</source> -+ <translation>所有(*)</translation> -+ </message> -+</context> -+<context> -+ <name>KyNativeFileDialog</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="192"/> -+ <source>Go Back</source> -+ <translation>後退</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="199"/> -+ <source>Go Forward</source> -+ <translation>前進</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="205"/> -+ <source>Cd Up</source> -+ <translation>向上</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="212"/> -+ <source>Search</source> -+ <translation>搜索</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="220"/> -+ <source>View Type</source> -+ <translation>視圖類型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="231"/> -+ <source>Sort Type</source> -+ <translation>排序類型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="348"/> -+ <source>Maximize</source> -+ <translation>最大化</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="250"/> -+ <source>Close</source> -+ <translation>關閉</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="345"/> -+ <source>Restore</source> -+ <translation>還原</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="941"/> -+ <source>Name</source> -+ <translation>檔名</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="944"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1532"/> -+ <source>Open</source> -+ <translation>打開</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="945"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="954"/> -+ <source>Cancel</source> -+ <translation>取消</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="949"/> -+ <source>Save as</source> -+ <translation>另存為</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -+ <source>New Folder</source> -+ <translation>新建資料夾</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="953"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1536"/> -+ <source>Save</source> -+ <translation>保存</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="989"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="992"/> -+ <source>Directories</source> -+ <translation>目錄</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -+ <source>Warning</source> -+ <translation>警告</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -+ <source>exist, are you sure replace?</source> -+ <translation>已存在,是否替換?</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1858"/> -+ <source>NewFolder</source> -+ <translation>新建資料夾</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2146"/> -+ <source>Undo</source> -+ <translation>撤銷</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2153"/> -+ <source>Redo</source> -+ <translation>重做</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -+ <source>warn</source> -+ <translation>警告</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -+ <source>This operation is not supported.</source> -+ <translation>不支援此操作。</translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="166"/> -+ <source>Close</source> -+ <translation>關閉</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="190"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>可執行檔「%1」 需要數量%2,找到數量%3。</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="192"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>不相容的Qt庫錯誤</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="423"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1106"/> -+ <source>OK</source> -+ <translation>確認</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="479"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="897"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <source>Show Details...</source> -+ <translation>顯示細節......</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="897"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <source>Hide Details...</source> -+ <translation>隱藏細節......</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="19"/> -+ <source>File Name</source> -+ <translation>檔名稱</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="23"/> -+ <source>Modified Date</source> -+ <translation>修改日期</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="27"/> -+ <source>File Type</source> -+ <translation>檔案類型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="31"/> -+ <source>File Size</source> -+ <translation>檔大小</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="35"/> -+ <source>Original Path</source> -+ <translation>原始路徑</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="44"/> -+ <source>Descending</source> -+ <translation>降序</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="49"/> -+ <source>Ascending</source> -+ <translation>升序</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="55"/> -+ <source>Use global sorting</source> -+ <translation>使用全域排序</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="75"/> -+ <source>List View</source> -+ <translation>清單檢視</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="76"/> -+ <source>Icon View</source> -+ <translation>圖示檢視</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>默認slide</translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>讓選項卡小部件切換為幻燈片動畫。</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -index 546f535..9361d33 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -+++ b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -@@ -72,25 +72,16 @@ KyNativeFileDialog::KyNativeFileDialog(QWidget *parent) - : QDialog(parent), - d_ptr(new KyNativeFileDialogPrivate) - { -- const QString locale = QLocale::system().name(); -- QTranslator *translator = new QTranslator(this); -- pDebug << "local: " << locale; -- if (translator->load("/usr/share/qt5-ukui-platformtheme/qt5-ukui-platformtheme_" + QLocale::system().name())) { -- pDebug << "Load translations file success!"; -- QApplication::installTranslator(translator); -- } else { -- pDebug << "Load translations file failed!"; -- } -+ QString locale = QLocale::system().name(); - -- QTranslator *t = new QTranslator(this); -- pDebug << "QTranslator t load" << t->load("/usr/share/libpeony-qt/libpeony-qt_"+QLocale::system().name()); -- QApplication::installTranslator(t); -- QTranslator *t2 = new QTranslator(this); -- pDebug << "QTranslator t2 load" << t2->load("/usr/share/peony-qt-desktop/peony-qt-desktop_"+QLocale::system().name()); -- QApplication::installTranslator(t2); -- QTranslator *t3 = new QTranslator(this); -- pDebug << "QTranslator t3 load" << t3->load("/usr/share/qt5/translations/qt_"+QLocale::system().name()); -- QApplication::installTranslator(t3); -+ if(qApp->property("Language").isValid()) -+ { -+ QString language = qApp->property("Language").toString(); -+ QFile file("/usr/share/qt5-ukui-platformtheme/qt5-ukui-platformtheme_" + language + ".qm"); -+ if(file.exists()) -+ locale = language; -+ } -+ installTranslate(locale); - - mKyFileDialogUi = new Ui_KyFileDialog(this); - -@@ -671,10 +662,23 @@ void KyNativeFileDialog::goToUri(const QString &uri, bool addToHistory, bool for - - if(uri.isEmpty() || uri == getCurrentUri()) - return; -- -+ QString nUri = uri, nCurrentUri = getCurrentUri(); -+ pDebug << "nUri000..." << nUri << "nCurrentUri...." << nCurrentUri; -+ if(nUri.endsWith("/")){ -+ if((nUri.length() >= 2 && nUri[nUri.length() - 2] != "/") || nUri.length() <2) -+ nUri = nUri.remove(nUri.length() - 1, 1); -+ } -+ if(nCurrentUri.endsWith("/")){ -+ if((nCurrentUri.length() >= 2 && nCurrentUri[nCurrentUri.length() - 2] != "/") || nCurrentUri.length() <2) -+ nCurrentUri = nCurrentUri.remove(nCurrentUri.length() - 1, 1); -+ } -+ pDebug << "nUri..." << nUri << "nCurrentUri...." << nCurrentUri; -+ if(nUri == nCurrentUri) { -+ return; -+ } - pDebug << "getCurrentUri....,,,,:" << getCurrentUri(); - pDebug << "isShow......:" << (m_fileDialogHelper == nullptr) << m_fileDialogHelper->isShow() << isInitialGoToUriNum; -- if(isInitialGoToUriNum || (m_fileDialogHelper != nullptr && m_fileDialogHelper->isShow())) -+ if(true)//(isInitialGoToUriNum || (m_fileDialogHelper != nullptr && m_fileDialogHelper->isShow())) - { - isInitialGoToUriNum = false; - getCurrentPage()->stopLoading(); -@@ -1680,8 +1684,8 @@ void KyNativeFileDialog::paintEvent(QPaintEvent *e) - // sidebarPath.addRect(adjustedRect.adjusted(6, 0, 0, 0)); - QPainter p(this); - QPainterPath contentPath; -- if(this && this->property("maxRadius").isValid()) -- radius = this->property("maxRadius").toInt(); -+ if(this && this->property("windowRadius").isValid()) -+ radius = this->property("windowRadius").toInt(); - // qDebug() << "KyNativeFileDialog radius........" << radius; - contentPath.addRoundedRect(this->rect(), radius, radius); - auto bgPath = contentPath - sidebarPath; -@@ -2508,6 +2512,28 @@ void KyNativeFileDialog::updateSearchProgressBar() - // } - } - -+void KyNativeFileDialog::installTranslate(QString locale) -+{ -+ m_translator0 = new QTranslator(this); -+ pDebug << "local: " << locale; -+ if (m_translator0->load("/usr/share/qt5-ukui-platformtheme/qt5-ukui-platformtheme_" + locale)) { -+ pDebug << "Load translations file success!"; -+ QApplication::installTranslator(m_translator0); -+ } else { -+ pDebug << "Load translations file failed!"; -+ } -+ -+ m_translator1 = new QTranslator(this); -+ pDebug << "QTranslator t load" << m_translator1->load("/usr/share/libpeony-qt/libpeony-qt_" + locale); -+ QApplication::installTranslator(m_translator1); -+ m_translator2 = new QTranslator(this); -+ pDebug << "QTranslator t2 load" << m_translator2->load("/usr/share/peony-qt-desktop/peony-qt-desktop_" + locale); -+ QApplication::installTranslator(m_translator2); -+ m_translator3 = new QTranslator(this); -+ pDebug << "QTranslator t3 load" << m_translator3->load("/usr/share/qt5/translations/qt_" + locale); -+ QApplication::installTranslator(m_translator3); -+} -+ - KyFileDialogHelper::KyFileDialogHelper() : QPlatformFileDialogHelper(), mKyFileDialog(new KyNativeFileDialog) - { - mKyFileDialog->setHelper(this); -@@ -2551,7 +2577,17 @@ void KyFileDialogHelper::hide() - - bool KyFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) - { -+ if(m_isShow){ -+ mKyFileDialog->delayShow(); -+ return true; -+ } - pDebug << "show........." << (options() == nullptr); -+ pDebug << "option initialselectfiles..." << options()->initiallySelectedFiles(); -+ pDebug << "option initialDirectory..." << options()->initialDirectory(); -+ -+ m_initialDirectory = options()->initialDirectory(); -+ m_initialSelectFiles = options()->initiallySelectedFiles(); -+ - if(parent != nullptr) - pDebug << "window....:" << parent->x() << parent->y() << parent->width() << parent->height(); - else -@@ -2575,9 +2611,17 @@ bool KyFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality wi - pDebug << "filedialog select000....." << fd->selectedFiles(); - pDebug << "filedialog selectUrls000....." << fd->selectedUrls(); - pDebug << "filedialog directoryUrl000....." << fd->directoryUrl(); -- if(fd->directory().exists()) -- mKyFileDialog->setDirectory(fd->directory()); -+ if(m_initialSelectFiles.length() > 0 && QFile::exists(m_initialSelectFiles.value(0).path())){ -+ QDir dir(m_initialSelectFiles.value(0).path()); -+ dir.cdUp(); -+ pDebug <<"dirrrrr..." << dir.path(); -+ mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(dir.absolutePath()).toString()); -+ mKyFileDialog->setDirectory(dir); -+ } else if(fd->directory().exists()){ -+ mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(fd->directory().absolutePath()).toString()); - -+ mKyFileDialog->setDirectory(fd->directory()); -+ } - // if(fd->directoryUrl().) - - // for(QPushButton *btn : mKyFileDialog->findChildren<QPushButton*>()) -@@ -2596,11 +2640,23 @@ bool KyFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality wi - for(QWidget *widget : qApp->allWidgets()){ - if(QFileDialog *fd = qobject_cast<QFileDialog *>(widget)){ - if(options()->windowTitle() == fd->windowTitle()){ -- pDebug << "parent us null filedoalog set parent...." << fd->geometry(); -+ pDebug << "parent us null filedoalog set parent...." << fd->geometry() << options()->windowTitle() << fd->objectName(); - if(mKyFileDialog->parentWidget() != fd){ - mKyFileDialog->setParent(fd, windowFlags); - } -- if(fd->directory().exists()){ -+ pDebug << "parent us null filedoalog directory...." << fd->directory(); -+ pDebug << "parent us null filedoalog selectedFiles...." << m_initialSelectFiles.value(0).path() << QFile::exists(m_initialSelectFiles.value(0).path()); -+ if(m_initialSelectFiles.length() > 0 && QFile::exists(m_initialSelectFiles.value(0).path())){ -+ QDir dir(m_initialSelectFiles.value(0).path()); -+ dir.cdUp(); -+ pDebug <<"dirrrrr..." << dir.path(); -+ mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(dir.absolutePath()).toString()); -+ -+ mKyFileDialog->setDirectory(dir); -+ } -+ else if(fd->directory().exists()){ -+ mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(fd->directory().absolutePath()).toString()); -+ - mKyFileDialog->setDirectory(fd->directory()); - } - break; -@@ -2622,12 +2678,13 @@ bool KyFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality wi - } - - mKyFileDialog->delayShow(); -- m_isShow = true; -+ viewInitialFinished(); - return true; - } - - void KyFileDialogHelper::initDialog() - { -+ m_isShow = true; - - pDebug << "initDialog filter...." << options()->filter() << options()->nameFilters() << options()->mimeTypeFilters() << options()->viewMode(); - if (options()->windowTitle().isEmpty()) { -@@ -2697,15 +2754,17 @@ void KyFileDialogHelper::viewInitialFinished() - - QTimer::singleShot(500, this, [this](){ - -- auto selectirectory = options()->initialDirectory(); -- auto selectedFiles = options()->initiallySelectedFiles(); -+ auto selectirectory = m_initialDirectory;// options()->initialDirectory(); -+ auto selectedFiles = m_initialSelectFiles; //options()->initiallySelectedFiles(); - QStringList strList; - - pDebug << "m_viewInitialFinished:" << m_viewInitialFinished; - pDebug << "viewInitialFinished selectirectory:" << selectirectory; - pDebug << "viewInitialFinished selectedFiles:" << selectedFiles; - -- if(selectedFiles.length() > 0 && !m_viewInitialFinished) -+ if(m_viewInitialFinished) -+ return; -+ if(selectedFiles.length() > 0) - { - pDebug << "initiallySelectedFiles:" << selectedFiles; - -@@ -2723,8 +2782,10 @@ void KyFileDialogHelper::viewInitialFinished() - if(strList.length() > 0){ - QString path; - QUrl url(strList[0]); -- if(mKyFileDialog->isDir(url.path())) -+ if(mKyFileDialog->isDir(url.path()) && options()->fileMode() != QFileDialog::Directory && -+ options()->fileMode() != QFileDialog::DirectoryOnly){ - path = url.path(); -+ } - else{ - QDir dir(url.path()); - dir.cdUp(); -@@ -2853,6 +2914,8 @@ QList<QUrl> KyFileDialogHelper::selectedFiles() const - else if(urlList.length() == 0) - { - QString path = mKyFileDialog->getCurrentUri(); -+ if(path.isEmpty()) -+ return urlList; - if(!path.endsWith("/")) - path += "/"; - pDebug << "selected filesss...:" << path + mKyFileDialog->copyEditText(); -@@ -2864,6 +2927,8 @@ QList<QUrl> KyFileDialogHelper::selectedFiles() const - { - QList<QUrl> urls; - QString path = mKyFileDialog->getCurrentUri(); -+ if(path.isEmpty()) -+ return urls; - if(!path.endsWith("/")) - path += "/"; - path += mKyFileDialog->copyEditText(); -@@ -2909,7 +2974,13 @@ QString KyFileDialogHelper::selectedMimeTypeFilter() const - - bool KyFileDialogHelper::isSupportedUrl(const QUrl &url) const - { -+ pDebug << "options initialdirectory...." << options()->initialDirectory(); -+ pDebug << "options selectfiles..." << options()->initiallySelectedFiles(); - pDebug << "isSupportedUrl..." << url << url.isLocalFile(); -+ pDebug << "options windowTitle" << options()->windowTitle(); -+ if(!mKyFileDialog->isVisible()){ -+ return false; -+ } - // return false; - return url.isLocalFile(); - -diff --git a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h -index 3710fb1..20368bd 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h -+++ b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h -@@ -30,6 +30,7 @@ - #include <QCompleter> - #include <QListView> - #include <QStringListModel> -+#include <QTranslator> - #include "qpa/qplatformdialoghelper.h" - #include <peony-qt/FMWindowIface.h> - -@@ -180,6 +181,8 @@ public: - - QString copyEditText(); - -+ void installTranslate(QString local); -+ - Q_SIGNALS: - void switchViewRequest(const QString &viewId); - -@@ -216,7 +219,6 @@ protected: - - private: - Ui_KyFileDialog *mKyFileDialogUi = nullptr; -- KyNativeFileDialog *mKyFileDialog = nullptr; - QScopedPointer<KyNativeFileDialogPrivate> d_ptr; - Q_DECLARE_PRIVATE_D(qGetPtrHelper(d_ptr), KyNativeFileDialog) - void onAcceptButtonClicked(); -@@ -244,6 +246,12 @@ private: - QMap<int, QString> m_nameFilterMap; - QStringList m_uris_to_edit; - bool m_needSearch = false; -+ -+ QTranslator *m_translator0 = nullptr; -+ QTranslator *m_translator1 = nullptr; -+ QTranslator *m_translator2 = nullptr; -+ QTranslator *m_translator3 = nullptr; -+ - }; - - class KyFileDialogHelper : public QPlatformFileDialogHelper -@@ -292,6 +300,8 @@ private: - QUrl m_selectedFiles; - bool m_viewInitialFinished = false; - bool m_isShow = false; -+ QUrl m_initialDirectory; -+ QList<QUrl> m_initialSelectFiles; - - private: - void initDialog(); -diff --git a/ukui-qml-style-helper/kystylehelper.h b/ukui-qml-style-helper/kystylehelper.h -index 45a39a6..6468dc0 100644 ---- a/ukui-qml-style-helper/kystylehelper.h -+++ b/ukui-qml-style-helper/kystylehelper.h -@@ -36,24 +36,25 @@ class KyStyleHelper : public QQuickItem - Q_PROPERTY(QPalette palette READ palette NOTIFY paletteChanged) - Q_PROPERTY(QFont font READ font NOTIFY fontChanged) - -+ Q_PROPERTY(QColor windowtextcolorrole READ windowtextcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor buttoncolorrole READ buttoncolor NOTIFY qcolorChanged) -- Q_PROPERTY(QColor windowcolorrole READ windowcolor NOTIFY qcolorChanged) -+ Q_PROPERTY(QColor lightcolorrole READ lightcolor NOTIFY qcolorChanged) -+ Q_PROPERTY(QColor midlightcolorrole READ midlightcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor darkcolorrole READ darkcolor NOTIFY qcolorChanged) -- Q_PROPERTY(QColor windowtextcolorrole READ windowtextcolor NOTIFY qcolorChanged) -- Q_PROPERTY(QColor basecolorrole READ basecolor NOTIFY qcolorChanged) -+ Q_PROPERTY(QColor midcolorrole READ midcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor textcolorrole READ textcolor NOTIFY qcolorChanged) -+ Q_PROPERTY(QColor brighttextcolorrole READ brighttextcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor buttontextcolorrole READ buttontextcolor NOTIFY qcolorChanged) -+ Q_PROPERTY(QColor basecolorrole READ basecolor NOTIFY qcolorChanged) -+ Q_PROPERTY(QColor windowcolorrole READ windowcolor NOTIFY qcolorChanged) -+ Q_PROPERTY(QColor shadowcolorrole READ shadowcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor highlightcolorrole READ highlightcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor highlightedtextcolorrole READ highlightedtextcolor NOTIFY qcolorChanged) -- Q_PROPERTY(QColor tooltipbasecolorrole READ tooltipbasecolor NOTIFY qcolorChanged) -- Q_PROPERTY(QColor tooltiptextcolorrole READ tooltiptextcolor NOTIFY qcolorChanged) -- Q_PROPERTY(QColor lightcolorrole READ lightcolor NOTIFY qcolorChanged) -- Q_PROPERTY(QColor midlightcolorrole READ midlightcolor NOTIFY qcolorChanged) -- Q_PROPERTY(QColor midcolorrole READ midcolor NOTIFY qcolorChanged) -- Q_PROPERTY(QColor shadowcolorrole READ shadowcolor NOTIFY qcolorChanged) -- Q_PROPERTY(QColor alternatebasecolorrole READ alternatebasecolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor linkcolorrole READ linkcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor linkvisitedcolorrole READ linkvisitedcolor NOTIFY qcolorChanged) -+ Q_PROPERTY(QColor alternatebasecolorrole READ alternatebasecolor NOTIFY qcolorChanged) -+ Q_PROPERTY(QColor tooltipbasecolorrole READ tooltipbasecolor NOTIFY qcolorChanged) -+ Q_PROPERTY(QColor tooltiptextcolorrole READ tooltiptextcolor NOTIFY qcolorChanged) - - Q_PROPERTY( QString buttonType READ buttonType WRITE setbuttonType NOTIFY buttonTypeChanged) - -@@ -80,59 +81,62 @@ public: - } - - /* Get different type of color */ -+ QColor windowtextcolor() { -+ return qApp->palette().windowText().color(); -+ } - QColor buttoncolor() { - return qApp->palette().button().color(); - } -- QColor windowcolor() { -- return qApp->palette().window().color(); -+ QColor lightcolor() { -+ return qApp->palette().light().color(); -+ } -+ QColor midlightcolor() { -+ return qApp->palette().midlight().color(); - } - QColor darkcolor() { - return qApp->palette().dark().color(); - } -- QColor windowtextcolor() { -- return qApp->palette().windowText().color(); -- } -- QColor basecolor() { -- return qApp->palette().base().color(); -+ QColor midcolor() { -+ return qApp->palette().mid().color(); - } - QColor textcolor() { - return qApp->palette().text().color(); - } -+ QColor brighttextcolor() { -+ return qApp->palette().brightText().color(); -+ } - QColor buttontextcolor() { - return qApp->palette().buttonText().color(); - } -+ QColor basecolor() { -+ return qApp->palette().base().color(); -+ } -+ QColor windowcolor() { -+ return qApp->palette().window().color(); -+ } -+ QColor shadowcolor() { -+ return qApp->palette().shadow().color(); -+ } - QColor highlightcolor() { - return qApp->palette().highlight().color(); - } - QColor highlightedtextcolor() { - return qApp->palette().highlightedText().color(); - } -- QColor tooltipbasecolor() { -- return qApp->palette().toolTipBase().color(); -- } -- QColor tooltiptextcolor() { -- return qApp->palette().toolTipText().color(); -- } -- QColor lightcolor() { -- return qApp->palette().light().color(); -- } -- QColor midlightcolor() { -- return qApp->palette().midlight().color(); -- } -- QColor midcolor() { -- return qApp->palette().mid().color(); -+ QColor linkcolor() { -+ return qApp->palette().link().color(); - } -- QColor shadowcolor() { -- return qApp->palette().shadow().color(); -+ QColor linkvisitedcolor() { -+ return qApp->palette().linkVisited().color(); - } - QColor alternatebasecolor() { - return qApp->palette().alternateBase().color(); - } -- QColor linkcolor() { -- return qApp->palette().link().color(); -+ QColor tooltipbasecolor() { -+ return qApp->palette().toolTipBase().color(); - } -- QColor linkvisitedcolor() { -- return qApp->palette().linkVisited().color(); -+ QColor tooltiptextcolor() { -+ return qApp->palette().toolTipText().color(); - } - - -diff --git a/ukui-styles/blur-helper.cpp b/ukui-styles/blur-helper.cpp -index 7028ac9..60c0248 100644 ---- a/ukui-styles/blur-helper.cpp -+++ b/ukui-styles/blur-helper.cpp -@@ -282,8 +282,8 @@ void BlurHelper::delayUpdate(QWidget *w, bool updateBlurRegionOnly) - } - QPainterPath path; - int radius = 8; -- if(widget->property("maxRadius").isValid()) -- radius = widget->property("maxRadius").toInt(); -+ if(widget->property("windowRadius").isValid()) -+ radius = widget->property("windowRadius").toInt(); - path.addRoundedRect(widget->rect(), radius, radius); - KWindowEffects::enableBlurBehind(widget->winId(), true, path.toFillPolygon().toPolygon()); - if (!updateBlurRegionOnly) -diff --git a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -index c586f7a..e62526d 100644 ---- a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -@@ -155,8 +155,8 @@ QPixmap ConfigShadowHelper::getShadowPixmap(QColor color, /*ConfigShadowHelper:: - QPoint currentPos; - - int qAppMaxradius = maxRadius; -- if(widget && widget->property("maxRadius").isValid()){ -- qAppMaxradius = widget->property("maxRadius").toInt(); -+ if(widget && widget->property("windowRadius").isValid()){ -+ qAppMaxradius = widget->property("windowRadius").toInt(); - // qDebug() << "radius...." << qAppMaxradius; - } - // move to top left arc start point -@@ -259,8 +259,8 @@ QPainterPath ConfigShadowHelper::caculateRelativePainterPath(QWidget *widget, qr - QPointF currentPos; - - int qAppMaxradius = maxRadius; -- if(widget && widget->property("maxRadius").isValid()){ -- qAppMaxradius = widget->property("maxRadius").toInt(); -+ if(widget && widget->property("windowRadius").isValid()){ -+ qAppMaxradius = widget->property("windowRadius").toInt(); - //qDebug() << "radius...." << qAppMaxradius; - } - -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json b/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -index f1c3388..b2587b2 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -@@ -1,6 +1,6 @@ - { - "Radius":{ -- "Max_Radius" : {"value": "0", "type": "int"}, -+ "Window_Radius" : {"value": "0", "type": "int"}, - "Normal_Radius" : {"value": "0", "type": "int"}, - "Min_Radius" : {"value": "0", "type": "int"} - }, -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/default.json b/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -index ed9e456..f72a3dc 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -@@ -1,6 +1,6 @@ - { - "Radius":{ -- "Max_Radius" : {"value": "8", "type": "int"}, -+ "Window_Radius" : {"value": "8", "type": "int"}, - "Normal_Radius" : {"value": "6", "type": "int"}, - "Min_Radius" : {"value": "4", "type": "int"} - }, -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json b/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -index 44da586..141b63f 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -@@ -1,6 +1,6 @@ - { - "Radius":{ -- "Max_Radius" : {"value": "8", "type": "int"}, -+ "Window_Radius" : {"value": "8", "type": "int"}, - "Normal_Radius" : {"value": "6", "type": "int"}, - "Min_Radius" : {"value": "4", "type": "int"} - }, -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index 285918f..213ca36 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -258,8 +258,6 @@ void UKUIConfigStyleParameters::initRadiusCfg() - m_adjustColorRules = m_readCfg->getColorValueAdjustRules() == "HSL" ? AdjustColorRules::HSL : AdjustColorRules::DefaultRGB; - } - m_radiusStruct = m_readCfg->getRadiusStruct(UKUI_Radius); -- radius = m_radiusStruct.normalRadius; -- cDebug << "min:" << m_radiusStruct.minRadius << "normal:" << m_radiusStruct.normalRadius << "max:" << m_radiusStruct.maxRadius; - } - - QPalette UKUIConfigStyleParameters::setPalette(QPalette &palette) -@@ -708,7 +706,7 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - if (isImportant) - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); - -- int radius = m_radiusStruct.normalRadius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - - QBrush defaultBrush = QBrush(buttonColorCfg.defaultBrush); - QBrush disableBrush = QBrush(buttonColorCfg.disableBrush); -@@ -905,6 +903,28 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - checkClickBrush = clickBrush; - checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_radius", radius); -+ w->setProperty("ukui_defaultBrush", defaultBrush); -+ w->setProperty("ukui_clickBrush", clickBrush); -+ w->setProperty("ukui_hoverBrush", hoverBrush); -+ w->setProperty("ukui_disableBrush", disableBrush); -+ w->setProperty("ukui_checkBrush", checkBrush); -+ w->setProperty("ukui_checkHoverBrush", checkHoverBrush); -+ w->setProperty("ukui_checkClickBrush", checkClickBrush); -+ w->setProperty("ukui_checkDisableBrush", checkDisableBrush); -+ w->setProperty("ukui_defaultPen", defaultPen); -+ w->setProperty("ukui_clickPen", clickPen); -+ w->setProperty("ukui_hoverPen", hoverPen); -+ w->setProperty("ukui_disablePen", disablePen); -+ w->setProperty("ukui_checkPen", checkPen); -+ w->setProperty("ukui_checkHoverPen", checkHoverPen); -+ w->setProperty("ukui_checkClickPen", checkClickPen); -+ w->setProperty("ukui_checkDisablePen", checkDisablePen); -+ w->setProperty("ukui_focusPen", focusPen); -+ } -+ - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); -@@ -1051,6 +1071,13 @@ void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, - textColor = buttonColorCfg.textHoverColor; - } - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_iconHighlight", iconHighlight); -+ w->setProperty("ukui_textHighlight", textHighlight); -+ w->setProperty("ukui_textColor", textColor); -+ } -+ - if (widget) { - if(!widget->isEnabled()) - textColor = option->palette.color(QPalette::Disabled, QPalette::ButtonText); -@@ -1114,7 +1141,8 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - if (isImportant) - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); - -- int radius = m_radiusStruct.normalRadius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ - QBrush defaultBrush = QBrush(buttonColorCfg.defaultBrush); - QBrush disableBrush = QBrush(buttonColorCfg.disableBrush); - QBrush clickBrush = QBrush(buttonColorCfg.clickBrush); -@@ -1308,6 +1336,28 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - checkClickBrush = clickBrush; - checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_radius", radius); -+ w->setProperty("ukui_defaultBrush", defaultBrush); -+ w->setProperty("ukui_clickBrush", clickBrush); -+ w->setProperty("ukui_hoverBrush", hoverBrush); -+ w->setProperty("ukui_disableBrush", disableBrush); -+ w->setProperty("ukui_checkBrush", checkBrush); -+ w->setProperty("ukui_checkHoverBrush", checkHoverBrush); -+ w->setProperty("ukui_checkClickBrush", checkClickBrush); -+ w->setProperty("ukui_checkDisableBrush", checkDisableBrush); -+ w->setProperty("ukui_defaultPen", defaultPen); -+ w->setProperty("ukui_clickPen", clickPen); -+ w->setProperty("ukui_hoverPen", hoverPen); -+ w->setProperty("ukui_disablePen", disablePen); -+ w->setProperty("ukui_checkPen", checkPen); -+ w->setProperty("ukui_checkHoverPen", checkHoverPen); -+ w->setProperty("ukui_checkClickPen", checkClickPen); -+ w->setProperty("ukui_checkDisablePen", checkDisablePen); -+ w->setProperty("ukui_focusPen", focusPen); -+ } -+ - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); -@@ -1453,6 +1503,12 @@ void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, - textColor = buttonColorCfg.textHoverColor; - } - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_iconHighlight", iconHighlight); -+ w->setProperty("ukui_textHighlight", textHighlight); -+ w->setProperty("ukui_textColor", textColor); -+ } - if (widget) { - if(!widget->isEnabled()) - textColor = option->palette.color(QPalette::Disabled, QPalette::ButtonText); -@@ -1475,7 +1531,8 @@ void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, - - void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int radius = m_radiusStruct.normalRadius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ qDebug() << "initConfigLineEditParameters....." << widget->property("normalRadius").isValid() << radius; - bool needTranslucent = false; - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); -@@ -1560,6 +1617,19 @@ void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const - break; - } - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_radius", radius); -+ w->setProperty("ukui_defaultBrush", defaultBrush); -+ w->setProperty("ukui_focusBrush", focusBrush); -+ w->setProperty("ukui_hoverBrush", hoverBrush); -+ w->setProperty("ukui_disableBrush", disableBrush); -+ w->setProperty("ukui_defaultPen", defaultPen); -+ w->setProperty("ukui_hoverPen", hoverPen); -+ w->setProperty("ukui_disablePen", disablePen); -+ w->setProperty("ukui_focusPen", focusPen); -+ } -+ - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); -@@ -1603,7 +1673,8 @@ void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const - - void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout) - { -- int radius = m_radiusStruct.normalRadius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ - - UKUIColorTheme::SpinBoxColorCfg spinBoxColorCfg = - readCfg()->spinBoxColorCfg(option->palette, C_SpinBox_Default, isHorizonLayout ? C_SpinBox_HorizonLayout : C_SpinBox_DefaultLayout); -@@ -1906,6 +1977,36 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - break; - } - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_radius", radius); -+ w->setProperty("ukui_defaultBrush", defaultBrush); -+ w->setProperty("ukui_focusBrush", focusBrush); -+ w->setProperty("ukui_hoverBrush", hoverBrush); -+ w->setProperty("ukui_disableBrush", disableBrush); -+ w->setProperty("ukui_defaultPen", defaultPen); -+ w->setProperty("ukui_hoverPen", hoverPen); -+ w->setProperty("ukui_disablePen", disablePen); -+ w->setProperty("ukui_focusPen", focusPen); -+ w->setProperty("ukui_upDefaultBrush", upDefaultBrush); -+ w->setProperty("ukui_upFocusHoverBrush", upFocusHoverBrush); -+ w->setProperty("ukui_upClickBrush", upClickBrush); -+ w->setProperty("ukui_upHoverBrush", upHoverBrush); -+ w->setProperty("ukui_downDefaultBrush", downDefaultBrush); -+ w->setProperty("ukui_downHoverBrush", downHoverBrush); -+ w->setProperty("ukui_downFocusHoverBrush", downFocusHoverBrush); -+ w->setProperty("ukui_downClickBrush", downClickBrush); -+ w->setProperty("ukui_upDefaultPen", upDefaultPen); -+ w->setProperty("ukui_upHoverPen", upHoverPen); -+ w->setProperty("ukui_upFocusHoverPen", upFocusHoverPen); -+ w->setProperty("ukui_upClickPen", upClickPen); -+ w->setProperty("ukui_upDisablePen", upDisablePen); -+ w->setProperty("ukui_downDefaultPen", downDefaultPen); -+ w->setProperty("ukui_downHoverPen", downHoverPen); -+ w->setProperty("ukui_downFocusHoverPen", downFocusHoverPen); -+ w->setProperty("ukui_downClickPen", downClickPen); -+ w->setProperty("ukui_downDisablePen", downDisablePen); -+ } - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); -@@ -2028,7 +2129,8 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - - void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int radius = m_radiusStruct.normalRadius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ - - UKUIColorTheme::ComboBoxColorCfg comboBoxColorCfg = readCfg()->comboBoxColorCfg(option->palette, C_ComboBox_Default); - -@@ -2065,6 +2167,21 @@ void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const - break; - } - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_radius", radius); -+ w->setProperty("ukui_defaultBrush", defaultBrush); -+ w->setProperty("ukui_onBrush", onBrush); -+ w->setProperty("ukui_hoverBrush", hoverBrush); -+ w->setProperty("ukui_disableBrush", disableBrush); -+ w->setProperty("ukui_editBrush", editBrush); -+ w->setProperty("ukui_defaultPen", defaultPen); -+ w->setProperty("ukui_hoverPen", hoverPen); -+ w->setProperty("ukui_disablePen", disablePen); -+ w->setProperty("ukui_onPen", onPen); -+ w->setProperty("ukui_editPen", editPen); -+ } -+ - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); -@@ -2118,7 +2235,8 @@ void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const - - void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int radius = m_radiusStruct.normalRadius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ - - bool needTranslucent = false; - bool highlightMode = false; -@@ -2216,6 +2334,18 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - break; - } - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_radius", radius); -+ w->setProperty("ukui_defaultBrush", defaultBrush); -+ w->setProperty("ukui_hoverBrush", hoverBrush); -+ w->setProperty("ukui_disableBrush", disableBrush); -+ w->setProperty("ukui_selectBrush", selectBrush); -+ w->setProperty("ukui_textHoverPen", textHoverPen); -+ w->setProperty("ukui_textSelectPen", textSelectPen); -+ w->setProperty("ukui_hoverPen", hoverPen); -+ w->setProperty("ukui_selectPen", selectPen); -+ } - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); -@@ -2259,7 +2389,8 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - - void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int radius = m_radiusStruct.normalRadius;; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+; - - bool highlightMode = false; - if (widget && widget->property("highlightMode").isValid()) { -@@ -2342,8 +2473,23 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - branchSelectBrush = selectBrush; - branchDisableBrush = disableBrush; - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_radius", radius); -+ w->setProperty("ukui_defaultBrush", defaultBrush); -+ w->setProperty("ukui_hoverBrush", hoverBrush); -+ w->setProperty("ukui_disableBrush", disableBrush); -+ w->setProperty("ukui_selectBrush", selectBrush); -+ w->setProperty("ukui_branchDefaultBrush", branchDefaultBrush); -+ w->setProperty("ukui_branchHoverBrush", branchHoverBrush); -+ w->setProperty("ukui_branchSelectBrush", branchSelectBrush); -+ w->setProperty("ukui_branchDisableBrush", branchDisableBrush); -+ w->setProperty("ukui_textHoverPen", textHoverPen); -+ w->setProperty("ukui_textSelectPen", textSelectPen); -+ w->setProperty("ukui_hoverPen", hoverPen); -+ w->setProperty("ukui_selectPen", selectPen); -+ } - if (widget) { -- - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); - } -@@ -2404,7 +2550,8 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - - void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int radius = m_radiusStruct.normalRadius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ - - bool highlightMode = false; - if (widget && widget->property("highlightMode").isValid()) { -@@ -2473,6 +2620,19 @@ void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QSt - default: - break; - } -+ -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_radius", radius); -+ w->setProperty("ukui_defaultBrush", defaultBrush); -+ w->setProperty("ukui_hoverBrush", hoverBrush); -+ w->setProperty("ukui_disableBrush", disableBrush); -+ w->setProperty("ukui_selectBrush", selectBrush); -+ w->setProperty("ukui_textHoverPen", textHoverPen); -+ w->setProperty("ukui_textSelectPen", textSelectPen); -+ w->setProperty("ukui_hoverPen", hoverPen); -+ w->setProperty("ukui_selectPen", selectPen); -+ } - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); -@@ -2524,7 +2684,7 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - - UKUIColorTheme::CheckBoxColorCfg checkboxColorCfg = readCfg()->checkBoxColorCfg(option->palette, needTranslucent ? C_CheckBox_Translucent : C_CheckBox_Default); - -- int radius = m_radiusStruct.minRadius; -+ int radius = (widget && widget->property("minRadius").isValid()) ? widget->property("minRadius").toInt() : m_radiusStruct.minRadius; - - QPen defaultPen = QPen(checkboxColorCfg.defaultPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen hoverPen = QPen(checkboxColorCfg.hoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -2710,6 +2870,29 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - break; - } - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_radius", radius); -+ w->setProperty("ukui_defaultBrush", defaultBrush); -+ w->setProperty("ukui_hoverBrush", hoverBrush); -+ w->setProperty("ukui_clickBrush", clickBrush); -+ w->setProperty("ukui_disableBrush", disableBrush); -+ w->setProperty("ukui_onDefaultBrush", onDefaultBrush); -+ w->setProperty("ukui_onHoverBrush", onHoverBrush); -+ w->setProperty("ukui_onClickBrush", onClickBrush); -+ w->setProperty("ukui_pathDisableBrush", pathDisableBrush); -+ w->setProperty("ukui_pathBrush", pathBrush); -+ w->setProperty("ukui_contentPen", contentPen); -+ w->setProperty("ukui_defaultPen", defaultPen); -+ w->setProperty("ukui_disablePen", disablePen); -+ w->setProperty("ukui_hoverPen", hoverPen); -+ w->setProperty("ukui_clickPen", clickPen); -+ w->setProperty("ukui_onDefaultPen", onDefaultPen); -+ w->setProperty("ukui_onHoverPen", onHoverPen); -+ w->setProperty("ukui_onClickPen", onClickPen); -+ w->setProperty("ukui_onHoverBrushIslinearGradient", onHoverBrushIslinearGradient); -+ } -+ - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); -@@ -2770,6 +2953,9 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - } - } - -+// qDebug() << "defaultpen..." << defaultPen.color().red() << defaultPen.color().green() << defaultPen.color().blue(); -+ -+// qDebug() << "defaultbrush..." << defaultBrush.color().red() << defaultBrush.color().green() << defaultBrush.color().blue(); - m_CheckBoxParameters.radius = radius; - m_CheckBoxParameters.checkBoxDefaultPen = defaultPen; - m_CheckBoxParameters.checkBoxHoverPen = hoverPen; -@@ -2795,7 +2981,7 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - - void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- m_RadioButtonParameters.radius = m_radiusStruct.normalRadius; -+ m_RadioButtonParameters.radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - - UKUIColorTheme::RadioButtonColorCfg radioButtonColorCfg = readCfg()->radioButtonColorCfg(option->palette, C_RadioButton_Default); - QPen defaultPen = QPen(radioButtonColorCfg.defaultPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -2911,6 +3097,29 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - break; - } - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_radius", radius); -+ w->setProperty("ukui_defaultBrush", defaultBrush); -+ w->setProperty("ukui_hoverBrush", hoverBrush); -+ w->setProperty("ukui_clickBrush", clickBrush); -+ w->setProperty("ukui_disableBrush", disableBrush); -+ w->setProperty("ukui_onDefaultBrush", onDefaultBrush); -+ w->setProperty("ukui_onHoverBrush", onHoverBrush); -+ w->setProperty("ukui_onClickBrush", onClickBrush); -+ w->setProperty("ukui_childrenOnDefaultBrush", childrenOnDefaultBrush); -+ w->setProperty("ukui_childrenOnHoverBrush", childrenOnHoverBrush); -+ w->setProperty("ukui_childrenOnClickBrush", childrenOnClickBrush); -+ w->setProperty("ukui_childrenOnDisableBrush", childrenOnDisableBrush); -+ w->setProperty("ukui_defaultPen", defaultPen); -+ w->setProperty("ukui_disablePen", disablePen); -+ w->setProperty("ukui_hoverPen", hoverPen); -+ w->setProperty("ukui_clickPen", clickPen); -+ w->setProperty("ukui_onDefaultPen", onDefaultPen); -+ w->setProperty("ukui_onHoverPen", onHoverPen); -+ w->setProperty("ukui_onClickPen", onClickPen); -+ } -+ - //if set property - if (widget) { - if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { -@@ -3160,6 +3369,26 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - break; - } - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_grooveRadius", grooveRadius); -+ w->setProperty("ukui_handleDefaultBrush", handleDefaultBrush); -+ w->setProperty("ukui_handleHoverBrush", handleHoverBrush); -+ w->setProperty("ukui_handleClickBrush", handleClickBrush); -+ w->setProperty("ukui_handleDisableBrush", handleDisableBrush); -+ w->setProperty("ukui_grooveValueDefaultBrush", grooveValueDefaultBrush); -+ w->setProperty("ukui_grooveValueHoverBrush", grooveValueHoverBrush); -+ w->setProperty("ukui_grooveValueDisableBrush", grooveValueDisableBrush); -+ w->setProperty("ukui_grooveUnvalueDefaultBrush", grooveUnvalueDefaultBrush); -+ w->setProperty("ukui_grooveUnvalueHoverBrush", grooveUnvalueHoverBrush); -+ w->setProperty("ukui_grooveUnvalueDisableBrush", grooveUnvalueDisableBrush); -+ w->setProperty("ukui_handleDefaultPen", handleDefaultPen); -+ w->setProperty("ukui_handleHoverPen", handleHoverPen); -+ w->setProperty("ukui_handleClickPen", handleClickPen); -+ w->setProperty("ukui_handleDisablePen", handleDisablePen); -+ w->setProperty("ukui_sliderGroovePen; ", sliderGroovePen); -+ } -+ - if (widget) { - if (widget->property("setGrooveRadius").isValid() && widget->property("setGrooveRadius").canConvert<int>()) { - grooveRadius = widget->property("setGrooveRadius").value<int>(); -@@ -3220,25 +3449,26 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - m_SliderParameters.sliderHandleDisableBrush = handleDisableBrush; - - m_SliderParameters.sliderGrooveValueDefaultBrush = grooveValueDefaultBrush; -- m_SliderParameters.sliderGrooveValueHoverBrush = grooveValueHoverBrush; -+ m_SliderParameters.sliderGrooveValueHoverBrush = grooveValueHoverBrush; - m_SliderParameters.sliderGrooveValueDisableBrush = grooveValueDisableBrush; - - m_SliderParameters.sliderGrooveUnvalueDefaultBrush = grooveUnvalueDefaultBrush; -- m_SliderParameters.sliderGrooveUnvalueHoverBrush = grooveUnvalueHoverBrush; -+ m_SliderParameters.sliderGrooveUnvalueHoverBrush = grooveUnvalueHoverBrush; - m_SliderParameters.sliderGrooveUnvalueDisableBrush = grooveUnvalueDisableBrush; - - m_SliderParameters.sliderHandleDefaultPen = handleDefaultPen; -- m_SliderParameters.sliderHandleHoverPen = handleHoverPen; -- m_SliderParameters.sliderHandleClickPen = handleClickPen; -+ m_SliderParameters.sliderHandleHoverPen = handleHoverPen; -+ m_SliderParameters.sliderHandleClickPen = handleClickPen; - m_SliderParameters.sliderHandleDisablePen = handleDisablePen; -- m_SliderParameters.sliderGroovePen = sliderGroovePen; -+ m_SliderParameters.sliderGroovePen = sliderGroovePen; - - m_SliderParameters.sliderHandlePath = handlePath; - } - - void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int radius = widget ? (widget->height() / 2 > m_radiusStruct.normalRadius ? m_radiusStruct.normalRadius : widget->height() / 2) : m_radiusStruct.normalRadius; -+ int normalRadius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ int radius = widget ? (widget->height() / 2 > normalRadius ? normalRadius : widget->height() / 2) : normalRadius; - - bool needTranslucent = false; - if (widget && widget->property("needTranslucent").isValid()) { -@@ -3318,6 +3548,19 @@ void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, con - break; - } - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_radius", radius); -+ w->setProperty("ukui_contentPen", contentPen); -+ w->setProperty("ukui_grooveDefaultPen", grooveDefaultPen); -+ w->setProperty("ukui_grooveDisablePen", grooveDisablePen); -+ w->setProperty("ukui_contentBrush", contentBrush); -+ w->setProperty("ukui_grooveDefaultBrush", grooveDefaultBrush); -+ w->setProperty("ukui_grooveDisableBrush", grooveDisableBrush); -+ w->setProperty("ukui_endColor", endColor); -+ w->setProperty("ukui_= startColor", startColor); -+ } -+ - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); -@@ -3379,7 +3622,8 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option); - - //radius -- if(m_radiusStruct.normalRadius != 0){ -+ int normalRadius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ if(normalRadius != 0){ - if (bar->orientation == Qt::Horizontal) { - sliderRadius = (bar->rect.height()) / 4; - } else { -@@ -3390,7 +3634,8 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - ScroolBar_LineLength = 0; - } - else{ -- sliderRadius = m_radiusStruct.normalRadius; -+ int normalRadius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ sliderRadius = normalRadius; - m_ScrollBarParameters.grooveWidthAnimation = false; - ScrooBar_ShowLine = true; - ScroolBar_LineLength = 16; -@@ -3462,6 +3707,16 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - break; - } - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_radius", sliderRadius); -+ w->setProperty("ukui_grooveDefaultBrush", grooveDefaultBrush); -+ w->setProperty("ukui_grooveInactiveBrush", grooveInactiveBrush); -+ w->setProperty("ukui_sliderDefaultBrush", sliderDefaultBrush); -+ w->setProperty("ukui_sliderHoverBrush", sliderHoverBrush); -+ w->setProperty("ukui_sliderClickBrush", sliderClickBrush); -+ w->setProperty("ukui_sliderDisableBrush", sliderDisableBrush); -+ } - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); -@@ -3525,7 +3780,7 @@ void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const Q - } - QBrush backgroundBrush = color; - -- int radius = m_radiusStruct.normalRadius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -@@ -3539,6 +3794,12 @@ void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const Q - } - } - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_radius", radius); -+ w->setProperty("ukui_backgroundBrush", backgroundBrush); -+ w->setProperty("ukui_backgroundPen", backgroundPen); -+ } - m_ToolTipParameters.radius = radius; - m_ToolTipParameters.toolTipBackgroundBrush = backgroundBrush; - m_ToolTipParameters.toolTipBackgroundPen = backgroundPen; -@@ -3546,7 +3807,7 @@ void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const Q - - void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int tabradius = m_radiusStruct.normalRadius; -+ int tabradius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - UKUIColorTheme::TabWidgetColorCfg tabWidgetColorCfg = readCfg()->tabWidgetColorCfg(option->palette, C_TabWidget_Default); - - QBrush widgetBackgroundBrush = tabWidgetColorCfg.widgetBackgroundBrush; -@@ -3624,6 +3885,17 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - break; - } - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_radius", tabradius); -+ w->setProperty("ukui_widgetBackgroundBrush", widgetBackgroundBrush); -+ w->setProperty("ukui_tabBarBackgroundBrush", tabBarBackgroundBrush); -+ w->setProperty("ukui_tabBarDefaultBrush", tabBarDefaultBrush); -+ w->setProperty("ukui_tabBarHoverBrush", tabBarHoverBrush); -+ w->setProperty("ukui_tabBarClickBrush", tabBarClickBrush); -+ w->setProperty("ukui_tabBarSelectBrush", tabBarSelectBrush); -+ w->setProperty("ukui_tabBarPen", tabBarPen); -+ } - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - tabradius = widget->property("setRadius").value<int>(); -@@ -3663,8 +3935,8 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - - void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int frameradius = m_radiusStruct.maxRadius; -- int itemradius = m_radiusStruct.normalRadius; -+ int frameradius = (widget && widget->property("windowRadius").isValid()) ? widget->property("windowRadius").toInt() : m_radiusStruct.maxRadius; -+ int itemradius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - // QPixmap framePixmap(option->rect.size()); - UKUIColorTheme::MenuColorCfg menuColorCfg = readCfg()->menuColorCfg(C_Menu_Default); - -@@ -3708,6 +3980,15 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - } - QBrush menuBackgroundBrush = color; - -+ auto *w = const_cast<QWidget *>(widget); -+ if(w){ -+ w->setProperty("ukui_frameradius", frameradius); -+ w->setProperty("ukui_itemradius", itemradius); -+ w->setProperty("ukui_menuBackgroundBrush", menuBackgroundBrush); -+ w->setProperty("ukui_menuBackgroundPen", menuBackgroundPen); -+ w->setProperty("ukui_itemSelectBrush", itemSelectBrush); -+ w->setProperty("ukui_menuHoverPen", menuHoverPen); -+ } - - if(widget){ - if (widget->property("setFrameRadius").isValid() && widget->property("setFrameRadius").canConvert<int>()) { -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -index 585c166..7f90729 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -@@ -284,7 +284,7 @@ public: - bool TabBar_SplitLine = true; - - // tooltip -- int ToolTip_DefaultMargin = 8; -+ int ToolTip_DefaultMargin = 10; - int ToolTip_Height = 36; - int ToolTip_Height_origin = 36; - -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 d07001e..e5150a9 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -202,8 +202,8 @@ UKUIConfigStyle::UKUIConfigStyle(bool dark, bool useDefault, QString type) : QPr - } else { - qWarning("org.ukui.peripherals-mouse no doubleClick keys!"); - } -- settings->deleteLater(); -- settings = nullptr; -+// settings->deleteLater(); -+// settings = nullptr; - } else { - qWarning("org.ukui.peripherals-mouse is null!"); - } -@@ -265,7 +265,13 @@ UKUIConfigStyle::UKUIConfigStyle(bool dark, bool useDefault, QString type) : QPr - - sp = new UKUIConfigStyleParameters(this, isUseDarkPalette(), m_widget_theme); - -- setProperty("maxRadius", sp->radiusProperty().maxRadius); -+ if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -+ auto settings = UKUIStyleSettings::globalInstance(); -+ if(settings->keys().contains("windowRadius")) -+ setProperty("windowRadius", settings->get("windowRadius").toInt()); -+ else -+ setProperty("windowRadius", sp->radiusProperty().maxRadius); -+ } - setProperty("normalRadius", sp->radiusProperty().normalRadius); - setProperty("minRadius", sp->radiusProperty().minRadius); - } -@@ -362,6 +368,7 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - // } - // return false; - // } -+ - if (obj != nullptr && obj->inherits("QTipLabel")) - { - auto label = qobject_cast<QLabel *>(obj); -@@ -635,6 +642,16 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - - } - -+ -+ if (qobject_cast<QMenu *>(obj)) { -+ if (e->type() == QEvent::Show) { -+ if (QMenu *w = qobject_cast<QMenu *>(obj)) { -+ if (!KWindowSystem::compositingActive()) { -+ w->setProperty("useSystemStyleBlur", false); -+ } -+ } -+ } -+ } - return false; - } - -@@ -718,7 +735,61 @@ QPalette UKUIConfigStyle::standardPalette() const - if (auto settings = UKUIStyleSettings::globalInstance()) { - QString themeColor = settings->get("themeColor").toString(); - themeColor = settings->get("theme-color").toString(); -- setThemeColor(themeColor, palette); -+ -+ QColor color = palette.color(QPalette::Active, QPalette::Highlight); -+ if (themeColor == "default") { -+ -+ } else if (themeColor == "daybreakBlue") { -+ color = QColor(55, 144, 250); -+ } else if (themeColor == "jamPurple") { -+ color = QColor(120, 115, 245); -+ } else if (themeColor == "magenta") { -+ color = QColor(235, 48, 150); -+ } else if (themeColor == "sunRed") { -+ color = QColor(243, 34, 45); -+ } else if (themeColor == "sunsetOrange") { -+ color = QColor(246, 140, 39); -+ } else if (themeColor == "dustGold") { -+ color = QColor(249, 197, 61); -+ } else if (themeColor == "polarGreen") { -+ color = QColor(82, 196, 41); -+ } -+ else if(!themeColor.isEmpty() && themeColor.startsWith("(") && themeColor.endsWith(")")){ -+ QColor c = color; -+ QString colorStr = themeColor; -+ colorStr = colorStr.remove(colorStr.length() - 1, 1); -+ colorStr = colorStr.remove(0, 1); -+ QStringList list = colorStr.split(","); -+ if (list.length() == 3 || list.length() == 4) { -+ c.setRed(list[0].toInt()); -+ c.setGreen(list[1].toInt()); -+ c.setBlue(list[2].toInt()); -+ if (list.length() == 4) { -+ QStringList alphaList = QString(list[3]).split("*"); -+ if (alphaList.length() == 2) { -+ if (alphaList[0].toFloat() == 255.0) -+ c.setAlphaF(alphaList[1].toFloat()); -+ else if (alphaList[1].toFloat() == 255.0) -+ c.setAlphaF(alphaList[0].toFloat()); -+ else -+ c.setAlphaF(alphaList[0].toFloat() * alphaList[1].toFloat() / 255.0); -+ -+ } else if (alphaList.length() == 1) { -+ if(alphaList[0].toFloat() <= 1.0) -+ c.setAlphaF(alphaList[0].toFloat()); -+ else -+ c.setAlpha(alphaList[0].toInt()); -+ } else -+ c.setAlphaF(1.0); -+ } -+ }/* else if (list.length() == 1 && list[0].startsWith("#")) { -+ c = list[0]; -+ }*/ -+ -+ color = c; -+ } -+ -+ setThemeColor(color, palette); - sp->setUKUIThemeColor(themeColor); - } - -@@ -817,32 +888,10 @@ QColor UKUIConfigStyle::highLight_Hover(const QStyleOption *option) const - - - --void UKUIConfigStyle::setThemeColor(QString themeColor, QPalette &palette) const -+void UKUIConfigStyle::setThemeColor(QColor color, QPalette &palette) const - { -- if (themeColor == "default") { -- -- } else if (themeColor == "daybreakBlue") { -- palette.setColor(QPalette::Active, QPalette::Highlight, QColor(55, 144, 250)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(55, 144, 250)); -- } else if (themeColor == "jamPurple") { -- palette.setColor(QPalette::Active, QPalette::Highlight, QColor(120, 115, 245)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(120, 115, 245)); -- } else if (themeColor == "magenta") { -- palette.setColor(QPalette::Active, QPalette::Highlight, QColor(235, 48, 150)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(235, 48, 150)); -- } else if (themeColor == "sunRed") { -- palette.setColor(QPalette::Active, QPalette::Highlight, QColor(243, 34, 45)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(243, 34, 45)); -- } else if (themeColor == "sunsetOrange") { -- palette.setColor(QPalette::Active, QPalette::Highlight, QColor(246, 140, 39)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(246, 140, 39)); -- } else if (themeColor == "dustGold") { -- palette.setColor(QPalette::Active, QPalette::Highlight, QColor(249, 197, 61)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(249, 197, 61)); -- } else if (themeColor == "polarGreen") { -- palette.setColor(QPalette::Active, QPalette::Highlight, QColor(82, 196, 41)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(82, 196, 41)); -- } -+ palette.setColor(QPalette::Active, QPalette::Highlight, color); -+ palette.setColor(QPalette::Inactive, QPalette::Highlight, color); - } - - void UKUIConfigStyle::updateTabletModeValue(bool isTabletMode) -@@ -921,9 +970,28 @@ void UKUIConfigStyle::polish(QWidget *widget) - if(!widget) - return; - -- widget->setProperty("maxRadius", sp->radiusProperty().maxRadius); -- widget->setProperty("normalRadius", sp->radiusProperty().normalRadius); -- widget->setProperty("minRadius", sp->radiusProperty().minRadius); -+ if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -+ auto settings = UKUIStyleSettings::globalInstance(); -+ if(settings->keys().contains("windowRadius")) -+ widget->setProperty("windowRadius", settings->get("windowRadius").toInt()); -+ else -+ widget->setProperty("windowRadius", sp->radiusProperty().maxRadius); -+ } -+ -+// if(settings->keys().contains("normalRadius")) -+// widget->setProperty("normalRadius", settings->get("normalRadius").toInt()); -+// else -+// widget->setProperty("normalRadius", sp->radiusProperty().normalRadius); -+ -+// if(settings->keys().contains("minRadius")) -+// widget->setProperty("minRadius", settings->get("minRadius").toInt()); -+// else -+// widget->setProperty("minRadius", sp->radiusProperty().minRadius); -+// } -+// else{ -+ widget->setProperty("normalRadius", sp->radiusProperty().normalRadius); -+ widget->setProperty("minRadius", sp->radiusProperty().minRadius); -+// } - - - Style::polish(widget); -@@ -5391,15 +5459,17 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - bool hasIcon = false; - if(isComboBox) - { -- auto *comboBox = qobject_cast<const QComboBox*>(widget); -- int column = comboBox->count(); -- for(int i = 0; i < column; i++) -- { -- if(!comboBox->itemIcon(i).isNull()){ -- hasIcon = true; -- break; -- } -- } -+ if(!menuItem->icon.isNull()) -+ hasIcon = true; -+// auto *comboBox = qobject_cast<const QComboBox*>(widget); -+// int column = comboBox->count(); -+// for(int i = 0; i < column; i++) -+// { -+// if(!comboBox->itemIcon(i).isNull()){ -+// hasIcon = true; -+// break; -+// } -+// } - } - else if(menuItem->maxIconWidth != 0) - hasIcon = true; -@@ -7167,15 +7237,17 @@ QSize UKUIConfigStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt - bool hasIcon = false; - if(isComboBox) - { -- auto *comboBox = qobject_cast<const QComboBox*>(widget); -- int column = comboBox->count(); -- for(int i = 0; i < column; i++) -- { -- if(!comboBox->itemIcon(i).isNull()){ -- hasIcon = true; -- break; -- } -- } -+ if(!menuItem->icon.isNull()) -+ hasIcon = true; -+// auto *comboBox = qobject_cast<const QComboBox*>(widget); -+// int column = comboBox->count(); -+// for(int i = 0; i < column; i++) -+// { -+// if(!comboBox->itemIcon(i).isNull()){ -+// hasIcon = true; -+// break; -+// } -+// } - } - else if(menuItem->maxIconWidth != 0) - { -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -index dbf330b..18f4c11 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -@@ -159,7 +159,7 @@ private: - QColor highLight_Click(const QStyleOption *option) const; - QColor highLight_Hover(const QStyleOption *option) const; - -- void setThemeColor(QString themeColor, QPalette &palette) const; -+ void setThemeColor(QColor color, QPalette &palette) const; - - // view - QString calculateElidedText(const QString &text, const QTextOption &textOption, -diff --git a/ukui-styles/qt5-style-ukui/kabstract-style-parameters.cpp b/ukui-styles/qt5-style-ukui/kabstract-style-parameters.cpp -deleted file mode 100644 -index ccbdebb..0000000 ---- a/ukui-styles/qt5-style-ukui/kabstract-style-parameters.cpp -+++ /dev/null -@@ -1,3953 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <xibowen@kylinos.cn> -- * -- */ -- -- --#include <QPushButton> --#include <QToolButton> --#include <QApplication> --#include <QPainter> --#include <KWindowEffects> --#include <QPainterPath> --#include <QDebug> --#include <QObject> --#include <QGSettings> --#include <QDBusMessage> --#include <QDBusArgument> --#include <QDBusConnection> -- --#include "ukui-style-settings.h" --#include "kabstract-style-parameters.h" --#include "black-list.h" -- --extern QColor mixColor(const QColor &c1, const QColor &c2, qreal bias); --extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); -- --KAbstractStyleParameters::KAbstractStyleParameters(QObject *parent, bool isDark) --{ -- QDBusMessage message = QDBusMessage::createMethodCall("com.kylin.statusmanager.interface", -- "/", -- "com.kylin.statusmanager.interface", -- "get_current_tabletmode"); -- QDBusMessage ret = QDBusConnection::sessionBus().call(message); -- if (ret.type() != QDBusMessage::ReplyMessage) -- { -- //从返回参数获取返回值 -- qDebug() << "complex type failed!"; -- } -- else -- { -- m_isTableMode = ret.arguments()[0].value<bool>(); -- } -- -- updateParameters(m_isTableMode); -- auto settings = UKUIStyleSettings::globalInstance(); -- auto styleName = settings->get("styleName").toString(); -- --} -- --QPalette KAbstractStyleParameters::setPalette(QPalette &palette) --{ -- palette.setColor(QPalette::Active, QPalette::WindowText, defaultPalette.color(QPalette::Active, QPalette::WindowText)); -- palette.setColor(QPalette::Inactive, QPalette::WindowText, defaultPalette.color(QPalette::Inactive, QPalette::WindowText)); -- palette.setColor(QPalette::Disabled, QPalette::WindowText, defaultPalette.color(QPalette::Disabled, QPalette::WindowText)); -- -- palette.setColor(QPalette::Active, QPalette::Button, defaultPalette.color(QPalette::Active, QPalette::Button)); -- palette.setColor(QPalette::Inactive, QPalette::Button, defaultPalette.color(QPalette::Inactive, QPalette::Button)); -- palette.setColor(QPalette::Disabled, QPalette::Button, defaultPalette.color(QPalette::Disabled, QPalette::Button)); -- -- palette.setColor(QPalette::Active, QPalette::Light, defaultPalette.color(QPalette::Active, QPalette::Light)); -- palette.setColor(QPalette::Inactive, QPalette::Light, defaultPalette.color(QPalette::Inactive, QPalette::Light)); -- palette.setColor(QPalette::Disabled, QPalette::Light, defaultPalette.color(QPalette::Disabled, QPalette::Light)); -- -- palette.setColor(QPalette::Active, QPalette::Midlight, defaultPalette.color(QPalette::Active, QPalette::Midlight)); -- palette.setColor(QPalette::Inactive, QPalette::Midlight, defaultPalette.color(QPalette::Inactive, QPalette::Midlight)); -- palette.setColor(QPalette::Disabled, QPalette::Midlight, defaultPalette.color(QPalette::Disabled, QPalette::Midlight)); -- -- palette.setColor(QPalette::Active, QPalette::Dark, defaultPalette.color(QPalette::Active, QPalette::Dark)); -- palette.setColor(QPalette::Inactive, QPalette::Dark, defaultPalette.color(QPalette::Inactive, QPalette::Dark)); -- palette.setColor(QPalette::Disabled, QPalette::Dark, defaultPalette.color(QPalette::Disabled, QPalette::Dark)); -- -- palette.setColor(QPalette::Active, QPalette::Mid, defaultPalette.color(QPalette::Active, QPalette::Mid)); -- palette.setColor(QPalette::Inactive, QPalette::Mid, defaultPalette.color(QPalette::Inactive, QPalette::Mid)); -- palette.setColor(QPalette::Disabled, QPalette::Mid, defaultPalette.color(QPalette::Disabled, QPalette::Mid)); -- -- palette.setColor(QPalette::Active, QPalette::Text, defaultPalette.color(QPalette::Active, QPalette::Text)); -- palette.setColor(QPalette::Inactive, QPalette::Text, defaultPalette.color(QPalette::Inactive, QPalette::Text)); -- palette.setColor(QPalette::Disabled, QPalette::Text, defaultPalette.color(QPalette::Disabled, QPalette::Text)); -- -- palette.setColor(QPalette::Active, QPalette::BrightText, defaultPalette.color(QPalette::Active, QPalette::BrightText)); -- palette.setColor(QPalette::Inactive, QPalette::BrightText, defaultPalette.color(QPalette::Inactive, QPalette::BrightText)); -- palette.setColor(QPalette::Disabled, QPalette::BrightText, defaultPalette.color(QPalette::Disabled, QPalette::BrightText)); -- -- palette.setColor(QPalette::Active, QPalette::ButtonText, defaultPalette.color(QPalette::Active, QPalette::ButtonText)); -- palette.setColor(QPalette::Inactive, QPalette::ButtonText, defaultPalette.color(QPalette::Inactive, QPalette::ButtonText)); -- palette.setColor(QPalette::Disabled, QPalette::ButtonText, defaultPalette.color(QPalette::Disabled, QPalette::ButtonText)); -- -- palette.setColor(QPalette::Active, QPalette::Base, defaultPalette.color(QPalette::Active, QPalette::Base)); -- palette.setColor(QPalette::Inactive, QPalette::Base, defaultPalette.color(QPalette::Inactive, QPalette::Base)); -- palette.setColor(QPalette::Disabled, QPalette::Base, defaultPalette.color(QPalette::Disabled, QPalette::Base)); -- -- palette.setColor(QPalette::Active, QPalette::Window, defaultPalette.color(QPalette::Active, QPalette::Window)); -- palette.setColor(QPalette::Inactive, QPalette::Window, defaultPalette.color(QPalette::Inactive, QPalette::Window)); -- palette.setColor(QPalette::Disabled, QPalette::Window, defaultPalette.color(QPalette::Disabled, QPalette::Window)); -- -- palette.setColor(QPalette::Active, QPalette::Shadow, defaultPalette.color(QPalette::Active, QPalette::Shadow)); -- palette.setColor(QPalette::Inactive, QPalette::Shadow, defaultPalette.color(QPalette::Inactive, QPalette::Shadow)); -- palette.setColor(QPalette::Disabled, QPalette::Shadow, defaultPalette.color(QPalette::Disabled, QPalette::Shadow)); -- -- palette.setColor(QPalette::Active, QPalette::Highlight, defaultPalette.color(QPalette::Active, QPalette::Highlight)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, defaultPalette.color(QPalette::Inactive, QPalette::Highlight)); -- palette.setColor(QPalette::Disabled, QPalette::Highlight, defaultPalette.color(QPalette::Disabled, QPalette::Highlight)); -- -- palette.setColor(QPalette::Active, QPalette::HighlightedText, defaultPalette.color(QPalette::Active, QPalette::HighlightedText)); -- palette.setColor(QPalette::Inactive, QPalette::HighlightedText, defaultPalette.color(QPalette::Inactive, QPalette::HighlightedText)); -- palette.setColor(QPalette::Disabled, QPalette::HighlightedText, defaultPalette.color(QPalette::Disabled, QPalette::HighlightedText)); -- -- palette.setColor(QPalette::Active, QPalette::Link, defaultPalette.color(QPalette::Active, QPalette::Link)); -- palette.setColor(QPalette::Inactive, QPalette::Link, defaultPalette.color(QPalette::Inactive, QPalette::Link)); -- palette.setColor(QPalette::Disabled, QPalette::Link, defaultPalette.color(QPalette::Disabled, QPalette::Link)); -- -- palette.setColor(QPalette::Active, QPalette::LinkVisited, defaultPalette.color(QPalette::Active, QPalette::LinkVisited)); -- palette.setColor(QPalette::Inactive, QPalette::LinkVisited, defaultPalette.color(QPalette::Inactive, QPalette::LinkVisited)); -- palette.setColor(QPalette::Disabled, QPalette::LinkVisited, defaultPalette.color(QPalette::Disabled, QPalette::LinkVisited)); -- -- palette.setColor(QPalette::Active, QPalette::AlternateBase, defaultPalette.color(QPalette::Active, QPalette::AlternateBase)); -- palette.setColor(QPalette::Inactive, QPalette::AlternateBase, defaultPalette.color(QPalette::Inactive, QPalette::AlternateBase)); -- palette.setColor(QPalette::Disabled, QPalette::AlternateBase, defaultPalette.color(QPalette::Disabled, QPalette::AlternateBase)); -- -- palette.setColor(QPalette::Active, QPalette::NoRole, defaultPalette.color(QPalette::Active, QPalette::NoRole)); -- palette.setColor(QPalette::Inactive, QPalette::NoRole, defaultPalette.color(QPalette::Inactive, QPalette::NoRole)); -- palette.setColor(QPalette::Disabled, QPalette::NoRole, defaultPalette.color(QPalette::Disabled, QPalette::NoRole)); -- -- palette.setColor(QPalette::Active, QPalette::ToolTipBase, defaultPalette.color(QPalette::Active, QPalette::ToolTipBase)); -- palette.setColor(QPalette::Inactive, QPalette::ToolTipBase, defaultPalette.color(QPalette::Inactive, QPalette::ToolTipBase)); -- palette.setColor(QPalette::Disabled, QPalette::ToolTipBase, defaultPalette.color(QPalette::Disabled, QPalette::ToolTipBase)); -- -- palette.setColor(QPalette::Active, QPalette::ToolTipText, defaultPalette.color(QPalette::Active, QPalette::ToolTipText)); -- palette.setColor(QPalette::Inactive, QPalette::ToolTipText, defaultPalette.color(QPalette::Inactive, QPalette::ToolTipText)); -- palette.setColor(QPalette::Disabled, QPalette::ToolTipText, defaultPalette.color(QPalette::Disabled, QPalette::ToolTipText)); -- --#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) -- palette.setColor(QPalette::Active, QPalette::PlaceholderText, defaultPalette.color(QPalette::Active, QPalette::PlaceholderText)); -- palette.setColor(QPalette::Inactive, QPalette::PlaceholderText, defaultPalette.color(QPalette::Inactive, QPalette::PlaceholderText)); -- palette.setColor(QPalette::Disabled, QPalette::PlaceholderText, defaultPalette.color(QPalette::Disabled, QPalette::PlaceholderText)); --#endif -- -- return palette; --} -- --int KAbstractStyleParameters::getSpinBoxControlLayout() --{ -- return m_spinBoxControlLayout; --} -- --void KAbstractStyleParameters::updateParameters(bool isTabletMode) --{ -- if(isTabletMode){//styleName == "ukui-dark"){// -- m_scaleRatio4_3 = (4 * 1.0) / 3.0; -- m_scaleRatio3_2 = (3 * 1.0) / 2.0; -- m_scaleRatio2_1 = (2 * 1.0) / 1.0; -- m_scaleSliderDefaultLength = (241 * 1.0) / (94 * 1.0); -- m_ScaleComboBoxDefaultLength = (49 * 1.0) / (40 * 1.0); -- m_ScaleLineEditDefaultLength = (49 * 1.0) / (40 * 1.0); -- m_scaleTabBarHeight6_5 = (6 *1.0) / (5 * 1.0); -- -- m_isTableMode = true; -- m_spinBoxControlLayout = SpinBoxControlLayout::Horizontal; -- m_headerDefaultSectionSizeVertical = m_headerDefaultSectionSizeVertical4_3; -- } -- else{ -- m_scaleRatio4_3 = 1.0; -- m_scaleRatio3_2 = 1.0; -- m_scaleRatio2_1 = 1.0; -- m_scaleSliderDefaultLength = 1.0; -- m_ScaleComboBoxDefaultLength = 1.0; -- m_ScaleLineEditDefaultLength = 1.0; -- m_scaleTabBarHeight6_5 = 1.0; -- -- m_isTableMode = false; -- m_spinBoxControlLayout = SpinBoxControlLayout::Vertical; -- m_headerDefaultSectionSizeVertical = m_headerDefaultSectionSizeVertical1_1; -- } -- -- ComboBox_DefaultMenuItemHeight = ComboBox_DefaultMenuItemHeight_original * m_scaleRatio4_3; -- MenuItem_DefaultHeight = MenuItem_DefaultHeight_origin * m_scaleRatio4_3; -- MenuItemSeparator_MarginHeight = MenuItemSeparator_MarginHeight_origin * m_scaleRatio4_3; -- LineEdit_DefaultHeight = LineEdit_DefaultHeight_origin * m_scaleRatio4_3; -- IconButton_DefaultWidth = IconButton_DefaultWidth_origin * m_scaleRatio4_3; -- Button_DefaultHeight = Button_DefaultHeight_origin * m_scaleRatio4_3; -- SpinBox_DefaultHeight = SpinBox_DefaultHeight_origin * m_scaleRatio4_3; -- ComboBox_DefaultHeight = ComboBox_DefaultHeight_origin * m_scaleRatio4_3; -- RadioButton_DefaultHeight = RadioButton_DefaultHeight_origin * m_scaleRatio4_3; -- CheckBox_DefaultHeight = CheckBox_DefaultHeight_origin * m_scaleRatio4_3; -- Table_HeaderHeight = Table_HeaderHeight_origin * m_scaleRatio4_3; -- ScroolBar_Width = ScroolBar_Width_origin * m_scaleRatio3_2; -- Slider_Length = Slider_Length_origin * m_scaleRatio2_1; -- Slider_GrooveLength = Slider_GrooveLength_origin * m_scaleRatio2_1; -- Slider_DefaultLength = Slider_DefaultLength_origin * m_scaleSliderDefaultLength; -- LineEdit_DefaultWidth = LineEdit_DefaultWidth_origin * m_ScaleLineEditDefaultLength; -- TabBar_DefaultHeight = TabBar_DefaultHeight_origin * m_scaleTabBarHeight6_5; -- ViewItem_DefaultHeight = ViewItem_DefaultHeight_origin * m_scaleRatio4_3; -- ToolTip_Height = ToolTip_Height_origin * m_scaleRatio4_3; -- qDebug() << "updateParameters......... "; --} -- --//Default widget theme --KDefaultStyleParameters::KDefaultStyleParameters(QObject *parent, bool isDark) : KAbstractStyleParameters(parent, isDark) --{ -- radius = 6; -- -- ColoseButtonColor = QColor(204, 18, 34); -- -- -- initPalette(isDark); --} -- --void KDefaultStyleParameters::initPalette(bool isDark) --{ -- //ukui-light palette UKUI3.1 -- QColor windowText_at(38, 38, 38), -- windowText_iat(0, 0, 0, 255 * 0.55), -- windowText_dis(0, 0, 0, 255 * 0.3), -- button_at(230, 230, 230), -- button_iat(230, 230, 230), -- button_dis(233, 233, 233), -- light_at(255, 255, 255), -- light_iat(255, 255, 255), -- light_dis(242, 242, 242), -- midlight_at(218, 218, 218), -- midlight_iat(218, 218, 218), -- midlight_dis(230, 230, 230), -- dark_at(77, 77, 77), -- dark_iat(77, 77, 77), -- dark_dis(64, 64, 64), -- mid_at(115, 115, 115), -- mid_iat(115, 115, 115), -- mid_dis(102, 102, 102), -- text_at(38, 38, 38), -- text_iat(38, 38, 38), -- text_dis(0, 0, 0, 255 * 0.3), -- brightText_at(0, 0, 0), -- brightText_iat(0, 0, 0), -- brightText_dis(0, 0, 0), -- buttonText_at(38, 38, 38), -- buttonText_iat(38, 38, 38), -- buttonText_dis(0, 0, 0, 255 * 0.3), -- base_at(255, 255, 255), -- base_iat(245, 245, 245), -- base_dis(237, 237, 237), -- window_at(245, 245, 245), -- window_iat(237, 237, 237), -- window_dis(230, 230, 230), -- shadow_at(0, 0, 0, 255 * 0.16), -- shadow_iat(0, 0, 0, 255 * 0.16), -- shadow_dis(0, 0, 0, 255 * 0.21), --// shadow_at(214, 214, 214), --// shadow_iat(214, 214, 214), --// shadow_dis(201, 201, 201), -- highLight_at(55, 144, 250), -- highLight_iat(55, 144, 250), -- highLight_dis(233, 233, 233), -- highLightText_at(255, 255, 255), -- highLightText_iat(255, 255, 255), -- highLightText_dis(179, 179, 179), -- link_at(55, 144, 250), -- link_iat(55, 144, 250), -- link_dis(55, 144, 250), -- linkVisited_at(114, 46, 209), -- linkVisited_iat(114, 46, 209), -- linkVisited_dis(114, 46, 209), -- alternateBase_at(245, 245, 245), -- alternateBase_iat(245, 245, 245), -- alternateBase_dis(245, 245, 245), -- noRale_at(240, 240, 240), -- noRole_iat(240, 240, 240), -- noRole_dis(217, 217, 217), -- toolTipBase_at(255, 255, 255), -- toolTipBase_iat(255, 255, 255), -- toolTipBase_dis(255, 255, 255), -- toolTipText_at(38, 38, 38), -- toolTipText_iat(38, 38, 38), -- toolTipText_dis(38, 38, 38), -- placeholderText_at(0, 0, 0, 255 * 0.35), -- placeholderText_iat(0, 0, 0, 255 * 0.35), -- placeholderText_dis(0, 0, 0, 255 * 0.3); -- -- //ukui-dark -- if (isDark) { -- windowText_at.setRgb(217, 217, 217); -- windowText_iat.setRgb(255, 255, 255, 255 * 0.55); -- windowText_dis.setRgb(255, 255, 255, 255 * 0.3); -- button_at.setRgb(55, 55, 59); -- button_iat.setRgb(55, 55, 59); -- button_dis.setRgb(46, 46, 46); -- light_at.setRgb(255, 255, 255); -- light_iat.setRgb(255, 255, 255); -- light_dis.setRgb(242, 242, 242); -- midlight_at.setRgb(95, 95, 98); -- midlight_iat.setRgb(95, 95, 98); -- midlight_dis.setRgb(79, 79, 82); -- dark_at.setRgb(38, 38, 38); -- dark_iat.setRgb(38, 38, 38); -- dark_dis.setRgb(26, 26, 26); -- mid_at.setRgb(115, 115, 115); -- mid_iat.setRgb(115, 115, 115); -- mid_dis.setRgb(102, 102, 102); -- text_at.setRgb(217, 217, 217); -- text_iat.setRgb(217, 217, 217); -- text_dis.setRgb(255, 255, 255, 255 * 0.3); -- brightText_at.setRgb(255, 255, 255); -- brightText_iat.setRgb(255, 255, 255); -- brightText_dis.setRgb(255, 255, 255); -- buttonText_at.setRgb(217, 217, 217); -- buttonText_iat.setRgb(217, 217, 217); -- buttonText_dis.setRgb(255, 255, 255, 255 * 0.3); -- base_at.setRgb(29, 29, 29); -- base_iat.setRgb(28, 28, 28); -- base_dis.setRgb(36, 36, 36); -- window_at.setRgb(35, 36, 38); -- window_iat.setRgb(26, 26, 26); -- window_dis.setRgb(18, 18, 18); -- shadow_at.setRgb(0, 0, 0, 255 * 0.16); -- shadow_iat.setRgb(0, 0, 0, 255 * 0.16); -- shadow_dis.setRgb(0, 0, 0, 255 * 0.21); --// shadow_at.setRgb(214, 214, 214); --// shadow_iat.setRgb(214, 214, 214); --// shadow_dis.setRgb(201, 201, 201); -- highLight_at.setRgb(55, 144, 250); -- highLight_iat.setRgb(55, 144, 250); -- highLight_dis.setRgb(46, 46, 46); -- highLightText_at.setRgb(255, 255, 255); -- highLightText_iat.setRgb(255, 255, 255); -- highLightText_dis.setRgb(77, 77, 77); -- link_at.setRgb(55, 144, 250); -- link_iat.setRgb(55, 144, 250); -- link_dis.setRgb(55, 144, 250); -- linkVisited_at.setRgb(114, 46, 209); -- linkVisited_iat.setRgb(114, 46, 209); -- linkVisited_dis.setRgb(114, 46, 209); -- alternateBase_at.setRgb(38, 38, 38); -- alternateBase_iat.setRgb(38, 38, 38); -- alternateBase_dis.setRgb(38, 38, 38); -- noRale_at.setRgb(51, 51, 51); -- noRole_iat.setRgb(51, 51, 51); -- noRole_dis.setRgb(60, 60, 60); -- toolTipBase_at.setRgb(38, 38, 38); -- toolTipBase_iat.setRgb(38, 38, 38); -- toolTipBase_dis.setRgb(38, 38, 38); -- toolTipText_at.setRgb(217, 217, 217); -- toolTipText_iat.setRgb(217, 217, 217); -- toolTipText_dis.setRgb(217, 217, 217); -- placeholderText_at.setRgb(255, 255, 255, 255 * 0.35); -- placeholderText_iat.setRgb(255, 255, 255, 255 * 0.35); -- placeholderText_dis.setRgb(255, 255, 255, 255 * 0.3); -- } -- -- defaultPalette.setColor(QPalette::Active, QPalette::WindowText, windowText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::WindowText, windowText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::WindowText, windowText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Button, button_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Button, button_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Button, button_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Light, light_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Light, light_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Light, light_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Midlight, midlight_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Midlight, midlight_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Midlight, midlight_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Dark, dark_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Dark, dark_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Dark, dark_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Mid, mid_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Mid, mid_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Mid, mid_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Text, text_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Text, text_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Text, text_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::BrightText, brightText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::BrightText, brightText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::BrightText, brightText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::ButtonText, buttonText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::ButtonText, buttonText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::ButtonText, buttonText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Base, base_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Base, base_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Base, base_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Window, window_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Window, window_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Window, window_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Shadow, shadow_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Shadow, shadow_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Shadow, shadow_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Highlight, highLight_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Highlight, highLight_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Highlight, highLight_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::HighlightedText, highLightText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::HighlightedText, highLightText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::HighlightedText, highLightText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Link, link_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Link, link_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Link, link_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::LinkVisited, linkVisited_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::LinkVisited, linkVisited_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::LinkVisited, linkVisited_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::AlternateBase, alternateBase_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::AlternateBase, alternateBase_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::AlternateBase, alternateBase_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::NoRole, noRale_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::NoRole, noRole_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::NoRole, noRole_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::ToolTipBase, toolTipBase_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipBase, toolTipBase_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipBase, toolTipBase_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::ToolTipText, toolTipText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipText, toolTipText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipText, toolTipText_dis); -- --#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) -- defaultPalette.setColor(QPalette::Active, QPalette::PlaceholderText, placeholderText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::PlaceholderText, placeholderText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::PlaceholderText, placeholderText_dis); --#endif --} -- -- --void KDefaultStyleParameters::initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- pushButtonParameters.radius = 6; -- -- QBrush defaultBrush; -- QBrush clickBrush; -- QBrush hoverBrush; -- QBrush disableBrush; -- -- QBrush checkBrush; -- QBrush checkHoverBrush; -- QBrush checkClickBrush; -- QBrush checkDisableBrush; -- -- QPen focusPen; -- -- QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- if (isDark) { -- hoverBrush = QBrush(mixColor(highlight, mix, 0.2)); -- } else { -- hoverBrush = QBrush(mixColor(highlight, mix, 0.05)); -- } -- if (isDark) { -- clickBrush = QBrush(mixColor(highlight, mix, 0.05)); -- } else { -- clickBrush = QBrush(mixColor(highlight, mix, 0.2)); -- } -- -- defaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- -- checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -- checkHoverBrush = hoverBrush; -- checkClickBrush = clickBrush; -- checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); -- -- focusPen = QPen(QBrush(mixColor(highlight, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- if (widget) { -- bool isWindowButton = false; -- bool isWindowColoseButton = false; -- bool isImportant = false; -- bool useButtonPalette = false; -- bool needTranslucent = false; -- -- if (widget->property("isWindowButton").isValid()) { -- if (widget->property("isWindowButton").toInt() == 0x01) { -- isWindowButton = true; -- } -- if (widget->property("isWindowButton").toInt() == 0x02) { -- isWindowColoseButton = true; -- } -- } -- if (widget->property("isImportant").isValid()) { -- isImportant = widget->property("isImportant").toBool(); -- } -- -- if (widget->property("useButtonPalette").isValid()) { -- useButtonPalette = widget->property("useButtonPalette").toBool(); -- } -- -- if (widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- if (isWindowColoseButton) { -- QColor ColoseButton = ColoseButtonColor; -- -- hoverBrush = QBrush(QColor(243, 34, 45)); -- clickBrush = QBrush(ColoseButton); -- -- focusPen = QPen(QBrush(mixColor(ColoseButton, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- } else if (isWindowButton && useTransparentButtonList().contains(qAppName())) { -- if (isDark) { -- mix.setAlphaF(0.28); -- hoverBrush = QBrush(mix); -- mix.setAlphaF(0.15); -- clickBrush = QBrush(mix); -- } else { -- mix.setAlphaF(0.15); -- hoverBrush = QBrush(mix); -- mix.setAlphaF(0.28); -- clickBrush = QBrush(mix); -- } -- } else if (useButtonPalette || isWindowButton) { -- if (needTranslucent) -- { -- QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- hoverColor.setAlphaF(isDark ? 0.20 : 0.16); -- hoverBrush.setColor(hoverColor); -- -- QColor clickColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- clickColor.setAlphaF(isDark ? 0.30 : 0.21); -- clickBrush.setColor(clickColor); -- } -- else -- { -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- -- if (isDark) { -- hoverBrush = QBrush(mixColor(button, mix, 0.2)); -- clickBrush = QBrush(mixColor(button, mix, 0.05)); -- } else { -- hoverBrush = QBrush(mixColor(button, mix, 0.05)); -- clickBrush = QBrush(mixColor(button, mix, 0.2)); -- } -- } -- } -- -- if (needTranslucent) { -- QColor defaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- defaultColor.setAlphaF(0.1); -- defaultBrush.setColor(defaultColor); -- -- QColor disableColor = option->palette.color(QPalette::Disabled, QPalette::BrightText); -- disableColor.setAlphaF(0.1); -- disableBrush.setColor(disableColor); -- } -- -- if (isImportant) { -- defaultBrush = highlight; -- } -- } -- -- pushButtonParameters.pushButtonDefaultBrush = defaultBrush; -- pushButtonParameters.pushButtonClickBrush = clickBrush; -- pushButtonParameters.pushButtonHoverBrush = hoverBrush; -- pushButtonParameters.pushButtonDisableBrush = disableBrush; -- pushButtonParameters.pushButtonCheckBrush = checkBrush; -- pushButtonParameters.pushButtonCheckHoverBrush = checkHoverBrush; -- pushButtonParameters.pushButtonCheckClickBrush = checkClickBrush; -- pushButtonParameters.pushButtonCheckDisableBrush = checkDisableBrush; -- pushButtonParameters.pushButtonFocusPen = focusPen; --} -- --void KDefaultStyleParameters::initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- toolButtonParameters.radius = 6; -- -- QBrush defaultBrush; -- QBrush clickBrush; -- QBrush hoverBrush; -- QBrush disableBrush; -- -- QBrush checkBrush; -- QBrush checkHoverBrush; -- QBrush checkClickBrush; -- QBrush checkDisableBrush; -- -- QPen focusPen; -- -- -- QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- if (isDark) { -- hoverBrush = QBrush(mixColor(highlight, mix, 0.2)); -- clickBrush = QBrush(mixColor(highlight, mix, 0.05)); -- } else { -- hoverBrush = QBrush(mixColor(highlight, mix, 0.05)); -- clickBrush = QBrush(mixColor(highlight, mix, 0.2)); -- } -- defaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- -- checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -- checkHoverBrush = hoverBrush; -- checkClickBrush = clickBrush; -- checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); -- -- focusPen = QPen(QBrush(mixColor(highlight, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- if (widget) { -- bool isWindowButton = false; -- bool isWindowColoseButton = false; -- bool useButtonPalette = false; -- bool needTranslucent = false; -- -- if (widget->property("isWindowButton").isValid()) { -- if (widget->property("isWindowButton").toInt() == 0x01) { -- isWindowButton = true; -- } -- if (widget->property("isWindowButton").toInt() == 0x02) { -- isWindowColoseButton = true; -- } -- } -- -- if (widget->property("useButtonPalette").isValid()) { -- useButtonPalette = widget->property("useButtonPalette").toBool(); -- } -- -- if (widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- if (isWindowColoseButton) { -- QColor ColoseButton = ColoseButtonColor; -- -- hoverBrush = QBrush(QColor(243, 34, 45)); -- clickBrush = QBrush(ColoseButton); -- -- focusPen = QPen(QBrush(mixColor(ColoseButton, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- } else if (isWindowButton && useTransparentButtonList().contains(qAppName())) { -- if (isDark) { -- mix.setAlphaF(0.28); -- hoverBrush = QBrush(mix); -- mix.setAlphaF(0.15); -- clickBrush = QBrush(mix); -- } else { -- mix.setAlphaF(0.15); -- hoverBrush = QBrush(mix); -- mix.setAlphaF(0.28); -- clickBrush = QBrush(mix); -- } -- } else if (useButtonPalette || isWindowButton) { -- if(needTranslucent) -- { -- QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- hoverColor.setAlphaF(isDark ? 0.20 : 0.16); -- hoverBrush.setColor(hoverColor); -- -- QColor clickColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- clickColor.setAlphaF(isDark ? 0.30 : 0.21); -- clickBrush.setColor(clickColor); -- } -- else -- { -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- -- if (isDark) { -- hoverBrush = QBrush(mixColor(button, mix, 0.2)); -- clickBrush = QBrush(mixColor(button, mix, 0.05)); -- } else { -- hoverBrush = QBrush(mixColor(button, mix, 0.05)); -- clickBrush = QBrush(mixColor(button, mix, 0.2)); -- } -- } -- } -- -- if (needTranslucent) { -- QColor defaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- defaultColor.setAlphaF(0.1); -- defaultBrush.setColor(defaultColor); -- -- QColor disableColor = option->palette.color(QPalette::Disabled, QPalette::BrightText); -- disableColor.setAlphaF(0.1); -- disableBrush.setColor(disableColor); -- } -- } -- -- toolButtonParameters.toolButtonDefaultBrush = defaultBrush; -- toolButtonParameters.toolButtonClickBrush = clickBrush; -- toolButtonParameters.toolButtonHoverBrush = hoverBrush; -- toolButtonParameters.toolButtonDisableBrush = disableBrush; -- toolButtonParameters.toolButtonCheckBrush = checkBrush; -- toolButtonParameters.toolButtonCheckHoverBrush = checkHoverBrush; -- toolButtonParameters.toolButtonCheckClickBrush = checkClickBrush; -- toolButtonParameters.toolButtonCheckDisableBrush = checkDisableBrush; -- toolButtonParameters.toolButtonFocusPen = focusPen; --} -- --void KDefaultStyleParameters::initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- lineEditParameters.radius = 6; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush focusBrush; -- QBrush disableBrush; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen focusPen; -- QPen disablePen; -- -- bool needTranslucent = false; -- -- if (widget && widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- //default state -- defaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- defaultPen = QPen(Qt::NoPen); -- defaultPen.setWidth(0); -- -- //hover state -- hoverBrush = defaultBrush; -- hoverPen = defaultPen; -- -- //focus state -- focusBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- focusPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), -- 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- //disable state -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- disablePen = QPen(Qt::NoPen); -- disablePen.setWidth(0); -- -- if(needTranslucent) -- { -- QColor defaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- defaultColor.setAlphaF(isDark ? 0.08 : 0.04); -- defaultBrush.setColor(defaultColor); -- -- QColor focusColor = option->palette.color(QPalette::Active, QPalette::Base); -- focusColor.setAlphaF(isDark ? 0.45 : 0.65); -- focusBrush.setColor(focusColor); -- QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- hoverColor.setAlphaF(isDark ? 0.20 : 0.10); -- hoverBrush.setColor(hoverColor); -- } -- -- lineEditParameters.lineEditDefaultBrush = defaultBrush; -- lineEditParameters.lineEditHoverBrush = hoverBrush; -- lineEditParameters.lineEditFocusBrush = focusBrush; -- lineEditParameters.lineEditDisableBrush = disableBrush; -- -- lineEditParameters.lineEditDefaultPen = defaultPen; -- lineEditParameters.lineEditHoverPen = hoverPen; -- lineEditParameters.lineEditFocusPen = focusPen; -- lineEditParameters.lineEditDisablePen = disablePen; --} -- --void KDefaultStyleParameters::initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout) --{ -- spinBoxParameters.radius = 6; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush focusBrush; -- QBrush disableBrush; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen focusPen; -- QPen disablePen; -- -- QBrush upHoverBrush; -- QBrush upFocusHoverBrush; -- QBrush upClickBrush; -- QBrush upDefaultBrush; -- QBrush downHoverBrush; -- QBrush downFocusHoverBrush; -- QBrush downClickBrush; -- QBrush downDefaultBrush; -- -- -- //default state -- if(!isHorizonLayout) -- defaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- else -- defaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- defaultPen = QPen(Qt::NoPen); -- defaultPen.setWidth(0); -- -- //hover state -- hoverBrush = defaultBrush; -- hoverPen = defaultPen; -- if(isHorizonLayout) -- hoverPen.setWidth(2); -- -- //focus state -- focusBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- focusPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), -- 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- //disable state -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- disablePen = QPen(Qt::NoPen); -- defaultPen.setWidth(0); -- -- if(isHorizonLayout) -- { -- upDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- downDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- } -- else -- { -- upDefaultBrush = QBrush(Qt::NoBrush); -- downDefaultBrush = QBrush(Qt::NoBrush); -- } -- -- QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- //up hover -- if (isDark) { -- upHoverBrush = QBrush(mixColor(button, mix, 0.2)); -- } else { -- upHoverBrush = QBrush(mixColor(button, mix, 0.05)); -- } -- -- //up focus hover -- if (isDark) { -- upFocusHoverBrush = QBrush(mixColor(highlight, mix, 0.2)); -- } else { -- upFocusHoverBrush = QBrush(mixColor(highlight, mix, 0.05)); -- } -- -- //up click -- if (isDark) { -- if(isHorizonLayout) -- upClickBrush = QBrush(mixColor(button, mix, 0.05)); -- else -- upClickBrush = QBrush(mixColor(highlight, mix, 0.05)); -- } else { -- if(isHorizonLayout) -- upClickBrush = QBrush(mixColor(button, mix, 0.2)); -- else -- upClickBrush = QBrush(mixColor(highlight, mix, 0.2)); -- } -- -- //down hover -- if (isDark) { -- downHoverBrush = QBrush(mixColor(button, mix, 0.2)); -- } else { -- downHoverBrush = QBrush(mixColor(button, mix, 0.05)); -- } -- -- //down focus hover -- if (isDark) { -- downFocusHoverBrush = QBrush(mixColor(highlight, mix, 0.2)); -- } else { -- downFocusHoverBrush = QBrush(mixColor(highlight, mix, 0.05)); -- } -- -- //down click -- if (isDark) { -- if(isHorizonLayout) -- downClickBrush = QBrush(mixColor(button, mix, 0.05)); -- else -- downClickBrush = QBrush(mixColor(highlight, mix, 0.05)); -- } else { -- if(isHorizonLayout) -- downClickBrush = QBrush(mixColor(button, mix, 0.2)); -- else -- downClickBrush = QBrush(mixColor(highlight, mix, 0.2)); -- } -- -- -- spinBoxParameters.spinBoxDefaultBrush = defaultBrush; -- spinBoxParameters.spinBoxHoverBrush = hoverBrush; -- spinBoxParameters.spinBoxFocusBrush = focusBrush; -- spinBoxParameters.spinBoxDisableBrush = disableBrush; -- -- spinBoxParameters.spinBoxDefaultPen = defaultPen; -- spinBoxParameters.spinBoxHoverPen = hoverPen; -- spinBoxParameters.spinBoxFocusPen = focusPen; -- spinBoxParameters.spinBoxDisablePen = disablePen; -- -- spinBoxParameters.spinBoxUpHoverBrush = upHoverBrush; -- spinBoxParameters.spinBoxUpFocusHoverBrush = upFocusHoverBrush; -- spinBoxParameters.spinBoxUpClickBrush = upClickBrush; -- spinBoxParameters.spinBoxUpDefaultBrush = upDefaultBrush; -- -- spinBoxParameters.spinBoxDownHoverBrush = downHoverBrush; -- spinBoxParameters.spinBoxDownFocusHoverBrush = downFocusHoverBrush; -- spinBoxParameters.spinBoxDownClickBrush = downClickBrush; -- spinBoxParameters.spinBoxDownDefaultBrush = downDefaultBrush; -- --} -- --void KDefaultStyleParameters::initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- comboBoxParameters.radius = 6; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush onBrush; -- QBrush editBrush; -- QBrush disableBrush; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen onPen; -- QPen editPen; -- QPen disablePen; -- -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- //default state -- defaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- defaultPen = QPen(Qt::NoPen); -- defaultPen.setWidth(0); -- -- //hover state -- if (isDark) { -- hoverBrush = QBrush(mixColor(button, mix, 0.2)); -- } else { -- hoverBrush = QBrush(mixColor(button, mix, 0.05)); -- } -- hoverPen = QPen(Qt::NoPen); -- hoverPen.setWidth(0); -- -- //on state -- if (isDark) { -- onBrush = QBrush(mixColor(button, mix, 0.05)); -- } else { -- onBrush = QBrush(mixColor(button, mix, 0.2)); -- } -- onPen = QPen(Qt::NoPen); -- onPen.setWidth(0); -- -- //focus and on state,edit mode -- editBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- editPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), -- 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- //disable state -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- disablePen = QPen(Qt::NoPen); -- disablePen.setWidth(0); -- -- comboBoxParameters.comboBoxDefaultBrush = defaultBrush; -- comboBoxParameters.comboBoxHoverBrush = hoverBrush; -- comboBoxParameters.comboBoxOnBrush = onBrush; -- comboBoxParameters.comboBoxEditBrush = editBrush; -- comboBoxParameters.comboBoxDisableBrush = disableBrush; -- -- comboBoxParameters.comboBoxDefaultPen = defaultPen; -- comboBoxParameters.comboBoxHoverPen = hoverPen; -- comboBoxParameters.comboBoxOnPen = onPen; -- comboBoxParameters.comboBoxEditPen = editPen; -- comboBoxParameters.comboBoxDisablePen = disablePen; --} -- --void KDefaultStyleParameters::initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- listParameters.radius = 6; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush selectBrush; -- QBrush disableBrush; -- QPen textHoverPen = QPen(Qt::NoPen); -- QPen textSelectPen = QPen(Qt::NoPen); -- bool needTranslucent = false; -- if (widget && widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- //default -- defaultBrush = QBrush(Qt::transparent); -- -- //hover -- hoverBrush = option->palette.brush(QPalette::Disabled, QPalette::Midlight); -- -- //select -- selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -- -- //disable -- disableBrush = QBrush(Qt::transparent); -- -- const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option); -- QPalette::ColorGroup cg = vi->state & QStyle::State_Enabled -- ? QPalette::Normal : QPalette::Disabled; -- if (cg == QPalette::Normal && !(vi->state & QStyle::State_Active)) -- cg = QPalette::Inactive; -- -- if(needTranslucent) -- { -- QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- hoverColor.setAlphaF(isDark ? 0.1 : 0.05); -- hoverBrush.setColor(hoverColor); -- -- QColor selectColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- selectColor.setAlphaF(isDark ? 0.20 : 0.15); -- selectBrush.setColor(selectColor); -- -- -- textSelectPen = option->palette.color(cg, QPalette::Text); -- textHoverPen = option->palette.color(cg, QPalette::BrightText); -- } -- else -- { -- textSelectPen = option->palette.color(cg, QPalette::HighlightedText); -- textHoverPen = option->palette.color(cg, QPalette::Text); -- } -- -- listParameters.listDefaultBrush = defaultBrush; -- listParameters.listHoverBrush = hoverBrush; -- listParameters.listSelectBrush = selectBrush; -- listParameters.listDisableBrush = disableBrush; -- listParameters.listTextHoverPen = textHoverPen; -- listParameters.listTextSelectPen = textSelectPen; --} -- --void KDefaultStyleParameters::initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- treeParameters.radius = 6; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush selectBrush; -- QBrush disableBrush; -- -- QBrush branchDefaultBrush; -- QBrush branchHoverBrush; -- QBrush branchSelectBrush; -- QBrush branchDisableBrush; -- -- -- //default -- defaultBrush = QBrush(Qt::transparent); -- branchDefaultBrush = defaultBrush; -- -- //hover -- hoverBrush = option->palette.brush(QPalette::Disabled, QPalette::Midlight); -- branchHoverBrush = hoverBrush; -- -- //select -- selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -- branchSelectBrush = selectBrush; -- -- //disable -- disableBrush = QBrush(Qt::transparent); -- branchDisableBrush = disableBrush; -- -- -- treeParameters.treeDefaultBrush = defaultBrush; -- treeParameters.treeHoverBrush = hoverBrush; -- treeParameters.treeSelectBrush = selectBrush; -- treeParameters.treeDisableBrush = disableBrush; -- -- treeParameters.treeBranchDefaultBrush = branchDefaultBrush; -- treeParameters.treeBranchHoverBrush = branchHoverBrush; -- treeParameters.treeBranchSelectBrush = branchSelectBrush; -- treeParameters.treeBranchDisableBrush = branchDisableBrush; --} -- --void KDefaultStyleParameters::initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- tableParameters.radius = 0; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush selectBrush; -- QBrush disableBrush; -- -- -- //default -- defaultBrush = QBrush(Qt::transparent); -- -- //hover -- hoverBrush = option->palette.brush(QPalette::Disabled, QPalette::Midlight); -- -- //select -- selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -- -- //disable -- disableBrush = QBrush(Qt::transparent); -- -- -- tableParameters.tableDefaultBrush = defaultBrush; -- tableParameters.tableHoverBrush = hoverBrush; -- tableParameters.tableSelectBrush = selectBrush; -- tableParameters.tableDisableBrush = disableBrush; --} -- --void KDefaultStyleParameters::initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- checkBoxParameters.radius = 4; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen clickPen; -- QPen disablePen; -- QPen onDefaultPen; -- QPen onHoverPen; -- QPen onClickPen; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush clickBrush; -- QBrush disableBrush; -- QBrush onDefaultBrush; -- QBrush onHoverBrush; -- QBrush onClickBrush; -- -- bool needTranslucent = false; -- if (widget && widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- //default -- if (isDark) { -- QColor col = option->palette.color(QPalette::Active, QPalette::BrightText); -- col.setAlphaF(0.15); -- defaultPen = QPen(col, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } else { -- defaultPen = QPen(option->palette.brush(QPalette::Disabled, QPalette::ButtonText), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- defaultBrush = QBrush(option->palette.color(QPalette::Active, QPalette::Base).lighter(200)); -- -- //hover -- hoverPen = defaultPen; -- if (isDark) { -- hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); -- } else { -- hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.05)); -- } -- -- //click -- clickPen = defaultPen; -- if (isDark) { -- clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.1)); -- } else { -- clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); -- } -- -- -- if(needTranslucent) -- { -- QColor defaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- defaultColor.setAlphaF(isDark ? 0.04 : 0.05); -- defaultBrush.setColor(defaultColor); -- QColor defaultPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- defaultPenColor.setAlphaF(0.35); -- defaultPen = QPen(QBrush(defaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- hoverColor.setAlphaF(isDark ? 0.10 : 0.10); -- hoverBrush.setColor(hoverColor); -- QColor hoverPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- hoverPenColor.setAlphaF(0.3); -- hoverPen = QPen(QBrush(hoverPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- -- QColor clickColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- clickColor.setAlphaF(isDark ? 0.20 : 0.16); -- clickBrush.setColor(clickColor); -- QColor clickPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- if(!isDark) -- clickPenColor = option->palette.color(QPalette::Active, QPalette::Mid); -- clickPenColor.setAlphaF(isDark ? 0.25 : 0.65); -- clickPen = QPen(QBrush(clickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- } -- -- //disable -- disablePen = defaultPen; -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- -- //on default -- onDefaultPen = QPen(Qt::NoPen); -- onDefaultPen.setWidth(0); -- onDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -- if(needTranslucent) -- { -- QColor onDefaultPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- onDefaultPenColor.setAlphaF(0.1); -- onDefaultPen = QPen(QBrush(onDefaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- -- //on hover -- onHoverPen = QPen(Qt::NoPen); -- onHoverPen.setWidth(0); -- if (isDark) { -- onHoverBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.2)); -- } else { -- onHoverBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.05)); -- } -- if(needTranslucent) -- { -- QColor onHoverPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- onHoverPenColor.setAlphaF(0.15); -- onHoverPen = QPen(QBrush(onHoverPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- -- //on click -- onClickPen = QPen(Qt::NoPen); -- onClickPen.setWidth(0); -- if (isDark) { -- onClickBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.05)); -- } else { -- onClickBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.2)); -- } -- if(needTranslucent) -- { -- QColor onClickPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- onClickPenColor.setAlphaF(0.1); -- onClickPen = QPen(QBrush(onClickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- -- checkBoxParameters.checkBoxDefaultPen = defaultPen; -- checkBoxParameters.checkBoxHoverPen = hoverPen; -- checkBoxParameters.checkBoxClickPen = clickPen; -- checkBoxParameters.checkBoxDisablePen = disablePen; -- checkBoxParameters.checkBoxOnDefaultPen = onDefaultPen; -- checkBoxParameters.checkBoxOnHoverPen = onHoverPen; -- checkBoxParameters.checkBoxOnClickPen = onClickPen; -- -- checkBoxParameters.checkBoxDefaultBrush = defaultBrush; -- checkBoxParameters.checkBoxHoverBrush = hoverBrush; -- checkBoxParameters.checkBoxClickBrush = clickBrush; -- checkBoxParameters.checkBoxDisableBrush = disableBrush; -- checkBoxParameters.checkBoxOnDefaultBrush = onDefaultBrush; -- checkBoxParameters.checkBoxOnHoverBrush = onHoverBrush; -- checkBoxParameters.checkBoxOnClickBrush = onClickBrush; --} -- --void KDefaultStyleParameters::initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- radioButtonParameters.radius = 6; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen clickPen; -- QPen disablePen; -- QPen onDefaultPen; -- QPen onHoverPen; -- QPen onClickPen; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush clickBrush; -- QBrush disableBrush; -- QBrush onDefaultBrush; -- QBrush onHoverBrush; -- QBrush onClickBrush; -- -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- //default -- if (isDark) { -- QColor col = option->palette.color(QPalette::Active, QPalette::BrightText); -- col.setAlphaF(0.15); -- defaultPen = QPen(col, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } else { -- defaultPen = QPen(option->palette.brush(QPalette::Disabled, QPalette::ButtonText), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- defaultBrush = QBrush(option->palette.color(QPalette::Active, QPalette::Base).lighter(200)); -- -- //hover -- hoverPen = defaultPen; -- if (isDark) { -- hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); -- } else { -- hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.05)); -- } -- -- //click -- clickPen = defaultPen; -- if (isDark) { -- clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.1)); -- } else { -- clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); -- } -- -- //disable -- disablePen = defaultPen; -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- -- //on default -- onDefaultPen = QPen(Qt::NoPen); -- onDefaultPen.setWidth(0); -- onDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -- -- //on hover -- onHoverPen = QPen(Qt::NoPen); -- onHoverPen.setWidth(0); -- if (isDark) { -- onHoverBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.2)); -- } else { -- onHoverBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.05)); -- } -- -- //on click -- onClickPen = QPen(Qt::NoPen); -- onClickPen.setWidth(0); -- if (isDark) { -- onClickBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.05)); -- } else { -- onClickBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.2)); -- } -- -- -- //if set property -- if (widget) { -- if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { -- defaultPen = widget->property("setDefaultPen").value<QPen>(); -- } -- if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { -- hoverPen = widget->property("setHoverPen").value<QPen>(); -- } -- if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { -- clickPen = widget->property("setClickPen").value<QPen>(); -- } -- if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { -- disablePen = widget->property("setDisablePen").value<QPen>(); -- } -- if (widget->property("setOnDefaultPen").isValid() && widget->property("setOnDefaultPen").canConvert<QPen>()) { -- onDefaultPen = widget->property("setOnDefaultPen").value<QPen>(); -- } -- if (widget->property("setOnHoverPen").isValid() && widget->property("setOnHoverPen").canConvert<QPen>()) { -- onHoverPen = widget->property("setOnHoverPen").value<QPen>(); -- } -- if (widget->property("setOnClickPen").isValid() && widget->property("setOnClickPen").canConvert<QPen>()) { -- onClickPen = widget->property("setOnClickPen").value<QPen>(); -- } -- if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { -- defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { -- hoverBrush = widget->property("setHoverBrush").value<QBrush>(); -- } -- if (widget->property("setClickBrush").isValid() && widget->property("setClickBrush").canConvert<QBrush>()) { -- clickBrush = widget->property("setClickBrush").value<QBrush>(); -- } -- if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { -- disableBrush = widget->property("setDisableBrush").value<QBrush>(); -- } -- if (widget->property("setOnDefaultBrush").isValid() && widget->property("setOnDefaultBrush").canConvert<QBrush>()) { -- onDefaultBrush = widget->property("setOnDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setOnHoverBrush").isValid() && widget->property("setOnHoverBrush").canConvert<QBrush>()) { -- onHoverBrush = widget->property("setOnHoverBrush").value<QBrush>(); -- } -- if (widget->property("setOnClickBrush").isValid() && widget->property("setOnClickBrush").canConvert<QBrush>()) { -- onClickBrush = widget->property("setOnClickBrush").value<QBrush>(); -- } -- } -- -- -- radioButtonParameters.radioButtonDefaultPen = defaultPen; -- radioButtonParameters.radioButtonHoverPen = hoverPen; -- radioButtonParameters.radioButtonClickPen = clickPen; -- radioButtonParameters.radioButtonDisablePen = disablePen; -- radioButtonParameters.radioButtonOnDefaultPen = onDefaultPen; -- radioButtonParameters.radioButtonOnHoverPen = onHoverPen; -- radioButtonParameters.radioButtonOnClickPen = onClickPen; -- -- radioButtonParameters.radioButtonDefaultBrush = defaultBrush; -- radioButtonParameters.radioButtonHoverBrush = hoverBrush; -- radioButtonParameters.radioButtonClickBrush = clickBrush; -- radioButtonParameters.radioButtonDisableBrush = disableBrush; -- radioButtonParameters.radioButtonOnDefaultBrush = onDefaultBrush; -- radioButtonParameters.radioButtonOnHoverBrush = onHoverBrush; -- radioButtonParameters.radioButtonOnClickBrush = onClickBrush; --} -- --void KDefaultStyleParameters::initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- QBrush handleDefaultBrush; -- QBrush handleHoverBrush; -- QBrush handleClickBrush; -- QBrush handleDisableBrush; -- -- QBrush grooveValueDefaultBrush; -- QBrush grooveValueHoverBrush; -- QBrush grooveValueDisableBrush; -- QBrush grooveUnvalueDefaultBrush; -- QBrush grooveUnvalueHoverBrush; -- QBrush grooveUnvalueDisableBrush; -- -- QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- bool needTranslucent = false; -- -- if (widget && widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- //handle default -- handleDefaultBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -- -- //handle hover -- if (isDark) { -- handleHoverBrush = QBrush(mixColor(highlight, mix, 0.2)); -- } else { -- handleHoverBrush = QBrush(mixColor(highlight, mix, 0.05)); -- } -- -- //handle click -- if (isDark) { -- handleClickBrush = QBrush(mixColor(highlight, mix, 0.05)); -- } else { -- handleClickBrush = QBrush(mixColor(highlight, mix, 0.2)); -- } -- -- //handle disable -- handleDisableBrush = option->palette.color(QPalette::Disabled, QPalette::ButtonText); -- -- //groove value default -- if (isDark) { -- grooveValueDefaultBrush = QBrush(mixColor(highlight, mix, 0.05)); -- } else { -- grooveValueDefaultBrush = QBrush(mixColor(highlight, mix, 0.2)); -- } -- -- //groove value hover -- grooveValueHoverBrush = grooveValueDefaultBrush; -- -- //groove value disable -- grooveValueDisableBrush = handleDisableBrush; -- -- //groove unvalue default -- grooveUnvalueDefaultBrush = option->palette.color(QPalette::Active, QPalette::Button); -- if(needTranslucent) -- { -- QColor color = option->palette.color(QPalette::Active, QPalette::BrightText); -- color.setAlphaF(0.1); -- grooveUnvalueDefaultBrush.setColor(color); -- } -- -- //groove unvalue hover -- grooveUnvalueHoverBrush = grooveUnvalueDefaultBrush; -- -- //groove unvalue disable -- grooveUnvalueDisableBrush = grooveUnvalueDefaultBrush; -- -- -- sliderParameters.sliderHandleDefaultBrush = handleDefaultBrush; -- sliderParameters.sliderHandleHoverBrush = handleHoverBrush; -- sliderParameters.sliderHandleClickBrush = handleClickBrush; -- sliderParameters.sliderHandleDisableBrush = handleDisableBrush; -- -- sliderParameters.sliderGrooveValueDefaultBrush = grooveValueDefaultBrush; -- sliderParameters.sliderGrooveValueHoverBrush = grooveValueHoverBrush; -- sliderParameters.sliderGrooveValueDisableBrush = grooveValueDisableBrush; -- -- sliderParameters.sliderGrooveUnvalueDefaultBrush = grooveUnvalueDefaultBrush; -- sliderParameters.sliderGrooveUnvalueHoverBrush = grooveUnvalueHoverBrush; -- sliderParameters.sliderGrooveUnvalueDisableBrush = grooveUnvalueDisableBrush; --} -- --void KDefaultStyleParameters::initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- QBrush contentBrush; -- QBrush grooveDefaultBrush; -- QBrush grooveDisableBrush; -- -- bool needTranslucent = false; -- -- if (widget && widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option); -- const bool vertical = pb->orientation == Qt::Vertical; -- const bool inverted = pb->invertedAppearance; -- -- bool reverse = (!vertical && (pb->direction == Qt::RightToLeft)) || vertical; -- if (inverted) -- reverse = !reverse; -- -- //content -- QColor startColor = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor endColor = option->palette.color(QPalette::Active, QPalette::Highlight).lighter(120); -- QLinearGradient linearGradient; -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- if (vertical) { -- if (reverse) { -- linearGradient.setStart(pb->rect.bottomLeft()); -- linearGradient.setFinalStop(pb->rect.topLeft()); -- } else { -- linearGradient.setStart(pb->rect.topLeft()); -- linearGradient.setFinalStop(pb->rect.bottomLeft()); -- } -- } else { -- if (reverse) { -- linearGradient.setStart(pb->rect.topRight()); -- linearGradient.setFinalStop(pb->rect.topLeft()); -- } else { -- linearGradient.setStart(pb->rect.topLeft()); -- linearGradient.setFinalStop(pb->rect.topRight()); -- } -- } -- contentBrush = QBrush(linearGradient); -- -- //groove default -- grooveDefaultBrush = pb->palette.brush(QPalette::Active, QPalette::Button); -- if(needTranslucent) -- { -- QColor grooveDefaultColor = pb->palette.color(QPalette::Active, QPalette::BrightText); -- grooveDefaultColor.setAlphaF(0.10); -- grooveDefaultBrush.setColor(grooveDefaultColor); -- } -- -- //groove disable -- grooveDisableBrush = pb->palette.brush(QPalette::Disabled, QPalette::Button); -- -- -- progressBarParameters.radius = 6; -- progressBarParameters.progressBarContentBrush = contentBrush; -- progressBarParameters.progressBarGrooveDefaultBrush = grooveDefaultBrush; -- progressBarParameters.progressBarGrooveDisableBrush = grooveDisableBrush; --} -- --void KDefaultStyleParameters::initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int sliderRadius; -- QBrush grooveDefaultBrush; -- QBrush grooveInactiveBrush; -- QBrush sliderDefaultBrush; -- QBrush sliderHoverBrush; -- QBrush sliderClickBrush; -- QBrush sliderDisableBrush; -- bool needTranslucent = false; -- -- if (widget && widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option); -- -- //radius -- if (bar->orientation == Qt::Horizontal) { -- sliderRadius = (bar->rect.height()) / 4; -- } else { -- sliderRadius = (bar->rect.width()) / 4; -- } -- -- //groove default -- grooveDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- -- //groove inactive -- grooveInactiveBrush = option->palette.brush(QPalette::Inactive, QPalette::Base); -- -- //slider default -- sliderDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- -- //slider hover -- if (isDark) { -- sliderHoverBrush = QBrush(mixColor(sliderDefaultBrush.color(), mix, 0.2)); -- } else { -- sliderHoverBrush = QBrush(mixColor(sliderDefaultBrush.color(), mix, 0.05)); -- } -- -- //slider click -- if (isDark) { -- sliderClickBrush = QBrush(mixColor(sliderDefaultBrush.color(), mix, 0.05)); -- } else { -- sliderClickBrush = QBrush(mixColor(sliderDefaultBrush.color(), mix, 0.2)); -- } -- -- //slider disable -- sliderDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- -- -- if(needTranslucent) -- { -- QColor grooveDefaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- grooveDefaultColor.setAlphaF(isDark ? 0.08 : 0.06); -- grooveDefaultBrush.setColor(grooveDefaultColor); -- -- QColor grooveInactiveColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- grooveInactiveColor.setAlphaF(isDark ? 0.08 : 0.06); -- grooveInactiveBrush.setColor(grooveInactiveColor); -- -- QColor sliderDefaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- sliderDefaultColor.setAlphaF(isDark ? 0.10 : 0.10); -- sliderDefaultBrush.setColor(sliderDefaultColor); -- -- QColor sliderHoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- sliderHoverColor.setAlphaF(isDark ? 0.20 : 0.18); -- sliderHoverBrush.setColor(sliderHoverColor); -- -- QColor sliderClickColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- sliderClickColor.setAlphaF(isDark ? 0.30 : 0.28); -- sliderClickBrush.setColor(sliderClickColor); -- } -- -- -- scrollBarParameters.radius = sliderRadius; -- scrollBarParameters.scrollBarGrooveDefaultBrush = grooveDefaultBrush; -- scrollBarParameters.scrollBarGrooveInactiveBrush = grooveInactiveBrush; -- scrollBarParameters.scrollBarSliderDefaultBrush = sliderDefaultBrush; -- scrollBarParameters.scrollBarSliderHoverBrush = sliderHoverBrush; -- scrollBarParameters.scrollBarSliderClickBrush = sliderClickBrush; -- scrollBarParameters.scrollBarSliderDisableBrush = sliderDisableBrush; --} -- --void KDefaultStyleParameters::initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- QBrush backgroundBrush; -- -- //background -- backgroundBrush = option->palette.color(QPalette::Active, QPalette::ToolTipBase); -- -- -- toolTipParameters.radius = 6; -- toolTipParameters.toolTipBackgroundBrush = backgroundBrush; --} -- --void KDefaultStyleParameters::initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int tabradius = 6; -- QBrush widgetBackgroundBrush; -- QBrush tabBarBackgroundBrush; -- QBrush tabBarDefaultBrush; -- QBrush tabBarHoverBrush; -- QBrush tabBarSelectBrush; -- -- //tab widget background -- widgetBackgroundBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- -- //tabbar background -- tabBarBackgroundBrush = option->palette.brush(QPalette::Active, QPalette::Window); -- -- //tabbar default -- tabBarDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Window); -- -- //tabbar hover -- QColor hover_color = option->palette.color(QPalette::Active, QPalette::Window); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- tabBarHoverBrush = QBrush(mixColor(hover_color, mix, 0.1)); -- -- //tabbar select -- tabBarSelectBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- -- -- if (widget && widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -- tabradius = widget->property("setRadius").value<int>(); -- } -- -- -- tabWidgetParameters.radius = tabradius; -- tabWidgetParameters.tabWidgetBackgroundBrush = widgetBackgroundBrush; -- tabWidgetParameters.tabBarBackgroundBrush = tabBarBackgroundBrush; -- tabWidgetParameters.tabBarDefaultBrush = tabBarDefaultBrush; -- tabWidgetParameters.tabBarHoverBrush = tabBarHoverBrush; -- tabWidgetParameters.tabBarSelectBrush = tabBarSelectBrush; --} -- --void KDefaultStyleParameters::initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- -- int frameradius = 8; -- int itemradius = 6; -- QPixmap framePixmap(option->rect.size()); -- QBrush itemSelectBrush; -- -- -- //frame Pixmap -- framePixmap.fill(Qt::transparent); -- if (qobject_cast<const QFrame*>(widget)) { -- QPainter pixmapPainter(&framePixmap); -- pixmapPainter.setPen(Qt::NoPen); -- pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::Base).lighter(180)); -- pixmapPainter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter.drawRoundedRect(option->rect, frameradius, frameradius); -- } else { -- int rander = 2; -- -- // Draw a black floor -- QPainter pixmapPainter(&framePixmap); -- pixmapPainter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter.setPen(Qt::transparent); -- pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::BrightText)); -- pixmapPainter.drawRoundedRect(option->rect.adjusted(+rander, +rander+6, -rander, -rander-6), frameradius, frameradius); -- pixmapPainter.end(); -- -- // Blur the black background -- QImage img = framePixmap.toImage(); -- qt_blurImage(img, 4, false, false); -- -- // Dig out the center part, Shadow rendering -- framePixmap = QPixmap::fromImage(img); -- QPainter pixmapPainter2(&framePixmap); -- pixmapPainter2.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter2.setCompositionMode(QPainter::CompositionMode_Clear); -- pixmapPainter2.setPen(Qt::transparent); -- pixmapPainter2.setBrush(Qt::transparent); -- pixmapPainter2.drawRoundedRect(option->rect.adjusted(+rander, +rander+6, -rander, -rander-6), frameradius, frameradius); -- pixmapPainter2.end(); -- -- //That's when I started drawing the frame floor -- auto color = option->palette.color(QPalette::Base); -- if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -- auto opacity = UKUIStyleSettings::globalInstance()->get("menuTransparency").toInt()/100.0; -- color.setAlphaF(opacity); -- } -- if (qApp->property("blurEnable").isValid()) { -- bool blurEnable = qApp->property("blurEnable").toBool(); -- if (!blurEnable) { -- color.setAlphaF(1); -- } -- } -- if (widget) { -- if (widget->property("useSystemStyleBlur").isValid() && !widget->property("useSystemStyleBlur").toBool()) { -- color.setAlphaF(1); -- } -- } -- //if blur effect is not supported, do not use transparent color. -- if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind) || blackAppListWithBlurHelper().contains(qAppName())) { -- color.setAlphaF(1); -- } -- -- QPainterPath path; -- QRegion region; -- if (widget) { -- region = widget->mask(); -- } -- if (region.isEmpty()) { -- path.addRoundedRect(option->rect.adjusted(+rander, +rander+6, -rander, -rander-6), frameradius, frameradius); -- } else { -- path.addRegion(region); -- } -- -- //draw blur background -- QPainter pixmapPainter3(&framePixmap); -- pixmapPainter3.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter3.setPen(Qt::transparent); -- pixmapPainter3.setBrush(color); -- pixmapPainter3.drawPath(path); -- } -- -- //item select brush -- itemSelectBrush = QBrush(option->palette.brush(QPalette::Active, QPalette::Highlight)); -- -- menuParameters.frameRadius = frameradius; -- menuParameters.itemRadius = itemradius; -- menuParameters.menuFramePixmap = framePixmap; -- menuParameters.menuItemSelectBrush = itemSelectBrush; --} -- -- --//Classical widget theme --KClassicalStyleParameters::KClassicalStyleParameters(QObject *parent, bool isDark) : KAbstractStyleParameters(parent, isDark) --{ -- radius = 0; -- CheckBox_Radius = 0; -- -- initPalette(isDark); --} -- --void KClassicalStyleParameters::initPalette(bool isDark) --{ -- -- QColor windowText_at(38, 38, 38), -- windowText_iat(38, 38, 38), -- windowText_dis(166, 166, 166), -- button_at(230, 230, 230), -- button_iat(230, 230, 230), -- button_dis(233, 233, 233), -- light_at(255, 255, 255), -- light_iat(255, 255, 255), -- light_dis(242, 242, 242), -- midlight_at(217, 217, 217), -- midlight_iat(217, 217, 217), -- midlight_dis(230, 230, 230), -- dark_at(77, 77, 77), -- dark_iat(77, 77, 77), -- dark_dis(64, 64, 64), -- mid_at(115, 115, 115), -- mid_iat(115, 115, 115), -- mid_dis(102, 102, 102), -- text_at(38, 38, 38), -- text_iat(38, 38, 38), -- text_dis(140, 140, 140), -- brightText_at(89, 89, 89), -- brightText_iat(89, 89, 89), -- brightText_dis(77, 77, 77), -- buttonText_at(38, 38, 38), -- buttonText_iat(38, 38, 38), -- buttonText_dis(179, 179, 179), -- base_at(255, 255, 255), -- base_iat(245, 245, 245), -- base_dis(237, 237, 237), -- window_at(245, 245, 245), -- window_iat(237, 237, 237), -- window_dis(230, 230, 230), -- shadow_at(214, 214, 214), -- shadow_iat(214, 214, 214), -- shadow_dis(201, 201, 201), -- highLight_at(55, 144, 250), -- highLight_iat(55, 144, 250), -- hightight_dis(233, 233, 233), -- highLightText_at(255, 255, 255), -- highLightText_iat(255, 255, 255), -- highLightText_dis(179, 179, 179), -- link_at(55, 144, 250), -- link_iat(55, 144, 250), -- link_dis(55, 144, 250), -- linkVisited_at(114, 46, 209), -- linkVisited_iat(114, 46, 209), -- linkVisited_dis(114, 46, 209), -- alternateBase_at(244, 245, 245), -- noRale_at(240, 240, 240), -- noRole_iat(240, 240, 240), -- noRole_dis(217, 217, 217), -- toolTipBase(255, 255, 255), -- toolTipText(38, 38, 38), -- placeholderText(38, 38, 38); -- -- if (isDark) { -- windowText_at.setRgb(217, 217, 217); -- windowText_iat.setRgb(217, 217, 217); -- windowText_dis.setRgb(77, 77, 77); -- button_at.setRgb(55, 55, 59); -- button_iat.setRgb(55, 55, 59); -- button_dis.setRgb(46, 46, 48); -- midlight_at.setRgb(77, 77, 77); -- midlight_iat.setRgb(77, 77, 77); -- midlight_dis.setRgb(64, 64, 64); -- dark_at.setRgb(38, 38, 38); -- dark_iat.setRgb(38, 38, 38); -- dark_dis.setRgb(26, 26, 26); -- text_at.setRgb(217, 217, 217); -- text_iat.setRgb(217, 217, 217); -- text_dis.setRgb(77, 77, 77); -- brightText_at.setRgb(255, 255, 255); -- brightText_iat.setRgb(255, 255, 255); -- brightText_dis.setRgb(77, 77, 77); -- buttonText_at.setRgb(217, 217, 217); -- buttonText_iat.setRgb(217, 217, 217); -- buttonText_dis.setRgb(76, 76, 79); -- base_at.setRgb(18, 18, 18); -- base_iat.setRgb(28, 28, 28); -- base_dis.setRgb(36, 36, 36); -- window_at.setRgb(35, 36, 38); -- window_iat.setRgb(26, 26, 26); -- window_dis.setRgb(18, 18, 18); -- hightight_dis.setRgb(46, 46, 48); -- highLightText_dis.setRgb(77, 77, 77); -- alternateBase_at.setRgb(38, 38, 38); -- noRale_at.setRgb(51, 51, 51); -- noRole_iat.setRgb(51, 51, 51); -- noRole_dis.setRgb(60, 60, 64); -- toolTipBase.setRgb(38, 38, 38); -- toolTipText.setRgb(217, 217, 217); -- placeholderText.setRgb(166, 166, 166); -- } -- -- defaultPalette.setColor(QPalette::Active, QPalette::WindowText, windowText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::WindowText, windowText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::WindowText, windowText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Button, button_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Button, button_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Button, button_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Light, light_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Light, light_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Light, light_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Midlight, midlight_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Midlight, midlight_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Midlight, midlight_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Dark, dark_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Dark, dark_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Dark, dark_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Mid, mid_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Mid, mid_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Mid, mid_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Text, text_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Text, text_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Text, text_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::BrightText, brightText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::BrightText, brightText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::BrightText, brightText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::ButtonText, buttonText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::ButtonText, buttonText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::ButtonText, buttonText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Base, base_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Base, base_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Base, base_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Window, window_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Window, window_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Window, window_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Shadow, shadow_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Shadow, shadow_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Shadow, shadow_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Highlight, highLight_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Highlight, highLight_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Highlight, hightight_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::HighlightedText, highLightText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::HighlightedText, highLightText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::HighlightedText, highLightText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Link, link_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Link, link_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Link, link_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::LinkVisited, linkVisited_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::LinkVisited, linkVisited_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::LinkVisited, linkVisited_dis); -- -- defaultPalette.setColor(QPalette::AlternateBase, alternateBase_at); -- -- defaultPalette.setColor(QPalette::Active, QPalette::NoRole, noRale_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::NoRole, noRole_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::NoRole, noRole_dis); -- -- defaultPalette.setColor(QPalette::ToolTipBase, toolTipBase); -- -- defaultPalette.setColor(QPalette::ToolTipText, toolTipText); -- --#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) -- defaultPalette.setColor(QPalette::PlaceholderText, placeholderText); --#endif --} -- --void KClassicalStyleParameters::initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- --} -- --void KClassicalStyleParameters::initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- --} -- --void KClassicalStyleParameters::initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- --} -- --void KClassicalStyleParameters::initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout) --{ -- --} -- --void KClassicalStyleParameters::initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- --} -- --void KClassicalStyleParameters::initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- --} -- --void KClassicalStyleParameters::initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- --} -- --void KClassicalStyleParameters::initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- --} -- --void KClassicalStyleParameters::initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- --} -- --void KClassicalStyleParameters::initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- --} -- --void KClassicalStyleParameters::initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- --} -- --void KClassicalStyleParameters::initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- --} -- --void KClassicalStyleParameters::initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- --} -- --void KClassicalStyleParameters::initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- --} -- --void KClassicalStyleParameters::initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- --} -- --void KClassicalStyleParameters::initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- --} -- -- --//fashion widget theme --KFashionStyleParameters::KFashionStyleParameters(QObject *parent, bool isDark) : KAbstractStyleParameters(parent, isDark) --{ -- radius = 6; -- -- ColoseButtonColor = QColor(198, 42, 63); -- -- initPalette(isDark); --} -- --void KFashionStyleParameters::initPalette(bool isDark) --{ -- //ukui-light palette UKUI3.1 -- QColor windowText_at(38, 38, 38), -- windowText_iat(0, 0, 0, 255 * 0.55), -- windowText_dis(0, 0, 0, 255 * 0.3), -- button_at(230, 230, 230), -- button_iat(230, 230, 230), -- button_dis(233, 233, 233), -- light_at(255, 255, 255), -- light_iat(255, 255, 255), -- light_dis(242, 242, 242), -- midlight_at(218, 218, 218), -- midlight_iat(218, 218, 218), -- midlight_dis(230, 230, 230), -- dark_at(77, 77, 77), -- dark_iat(77, 77, 77), -- dark_dis(64, 64, 64), -- mid_at(115, 115, 115), -- mid_iat(115, 115, 115), -- mid_dis(102, 102, 102), -- text_at(38, 38, 38), -- text_iat(38, 38, 38), -- text_dis(0, 0, 0, 255 * 0.3), -- brightText_at(0, 0, 0), -- brightText_iat(0, 0, 0), -- brightText_dis(0, 0, 0), -- buttonText_at(38, 38, 38), -- buttonText_iat(38, 38, 38), -- buttonText_dis(0, 0, 0, 255 * 0.3), -- base_at(255, 255, 255), -- base_iat(245, 245, 245), -- base_dis(237, 237, 237), -- window_at(245, 245, 245), -- window_iat(237, 237, 237), -- window_dis(230, 230, 230), -- shadow_at(0, 0, 0, 255 * 0.16), -- shadow_iat(0, 0, 0, 255 * 0.16), -- shadow_dis(0, 0, 0, 255 * 0.21), --// shadow_at(214, 214, 214), --// shadow_iat(214, 214, 214), --// shadow_dis(201, 201, 201), -- highLight_at(120, 115, 245), -- highLight_iat(120, 115, 245), -- highLight_dis(233, 233, 233), -- highLightText_at(255, 255, 255), -- highLightText_iat(255, 255, 255), -- highLightText_dis(179, 179, 179), -- link_at(120, 115, 245), -- link_iat(120, 115, 245), -- link_dis(120, 115, 245), -- linkVisited_at(62, 118, 247), -- linkVisited_iat(62, 118, 247), -- linkVisited_dis(62, 118, 247), -- alternateBase_at(245, 245, 245), -- alternateBase_iat(245, 245, 245), -- alternateBase_dis(245, 245, 245), -- noRale_at(240, 240, 240), -- noRole_iat(240, 240, 240), -- noRole_dis(217, 217, 217), -- toolTipBase_at(255, 255, 255), -- toolTipBase_iat(255, 255, 255), -- toolTipBase_dis(255, 255, 255), -- toolTipText_at(38, 38, 38), -- toolTipText_iat(38, 38, 38), -- toolTipText_dis(38, 38, 38), -- placeholderText_at(0, 0, 0, 255 * 0.35), -- placeholderText_iat(0, 0, 0, 255 * 0.35), -- placeholderText_dis(0, 0, 0, 255 * 0.3); -- -- //ukui-dark -- if (isDark) { -- windowText_at.setRgb(217, 217, 217); -- windowText_iat.setRgb(255, 255, 255, 255 * 0.55); -- windowText_dis.setRgb(255, 255, 255, 255 * 0.3); -- button_at.setRgb(55, 55, 59); -- button_iat.setRgb(55, 55, 59); -- button_dis.setRgb(46, 46, 46); -- light_at.setRgb(255, 255, 255); -- light_iat.setRgb(255, 255, 255); -- light_dis.setRgb(242, 242, 242); -- midlight_at.setRgb(95, 95, 98); -- midlight_iat.setRgb(95, 95, 98); -- midlight_dis.setRgb(79, 79, 82); -- dark_at.setRgb(38, 38, 38); -- dark_iat.setRgb(38, 38, 38); -- dark_dis.setRgb(26, 26, 26); -- mid_at.setRgb(115, 115, 115); -- mid_iat.setRgb(115, 115, 115); -- mid_dis.setRgb(102, 102, 102); -- text_at.setRgb(217, 217, 217); -- text_iat.setRgb(217, 217, 217); -- text_dis.setRgb(255, 255, 255, 255 * 0.3); -- brightText_at.setRgb(255, 255, 255); -- brightText_iat.setRgb(255, 255, 255); -- brightText_dis.setRgb(255, 255, 255); -- buttonText_at.setRgb(217, 217, 217); -- buttonText_iat.setRgb(217, 217, 217); -- buttonText_dis.setRgb(255, 255, 255, 255 * 0.3); -- base_at.setRgb(29, 29, 29); -- base_iat.setRgb(28, 28, 28); -- base_dis.setRgb(36, 36, 36); -- window_at.setRgb(35, 36, 38); -- window_iat.setRgb(26, 26, 26); -- window_dis.setRgb(18, 18, 18); -- shadow_at.setRgb(0, 0, 0, 255 * 0.16); -- shadow_iat.setRgb(0, 0, 0, 255 * 0.16); -- shadow_dis.setRgb(0, 0, 0, 255 * 0.21); --// shadow_at.setRgb(214, 214, 214); --// shadow_iat.setRgb(214, 214, 214); --// shadow_dis.setRgb(201, 201, 201); -- highLight_at.setRgb(120, 115, 245); -- highLight_iat.setRgb(120, 115, 245); -- highLight_dis.setRgb(46, 46, 46); -- highLightText_at.setRgb(255, 255, 255); -- highLightText_iat.setRgb(255, 255, 255); -- highLightText_dis.setRgb(77, 77, 77); -- link_at.setRgb(120, 115, 245); -- link_iat.setRgb(120, 115, 245); -- link_dis.setRgb(120, 115, 245); -- linkVisited_at.setRgb(62, 118, 247); -- linkVisited_iat.setRgb(62, 118, 247); -- linkVisited_dis.setRgb(62, 118, 247); -- alternateBase_at.setRgb(38, 38, 38); -- alternateBase_iat.setRgb(38, 38, 38); -- alternateBase_dis.setRgb(38, 38, 38); -- noRale_at.setRgb(51, 51, 51); -- noRole_iat.setRgb(51, 51, 51); -- noRole_dis.setRgb(60, 60, 60); -- toolTipBase_at.setRgb(38, 38, 38); -- toolTipBase_iat.setRgb(38, 38, 38); -- toolTipBase_dis.setRgb(38, 38, 38); -- toolTipText_at.setRgb(217, 217, 217); -- toolTipText_iat.setRgb(217, 217, 217); -- toolTipText_dis.setRgb(217, 217, 217); -- placeholderText_at.setRgb(255, 255, 255, 255 * 0.35); -- placeholderText_iat.setRgb(255, 255, 255, 255 * 0.35); -- placeholderText_dis.setRgb(255, 255, 255, 255 * 0.3); -- } -- -- defaultPalette.setColor(QPalette::Active, QPalette::WindowText, windowText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::WindowText, windowText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::WindowText, windowText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Button, button_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Button, button_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Button, button_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Light, light_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Light, light_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Light, light_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Midlight, midlight_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Midlight, midlight_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Midlight, midlight_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Dark, dark_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Dark, dark_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Dark, dark_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Mid, mid_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Mid, mid_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Mid, mid_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Text, text_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Text, text_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Text, text_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::BrightText, brightText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::BrightText, brightText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::BrightText, brightText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::ButtonText, buttonText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::ButtonText, buttonText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::ButtonText, buttonText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Base, base_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Base, base_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Base, base_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Window, window_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Window, window_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Window, window_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Shadow, shadow_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Shadow, shadow_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Shadow, shadow_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Highlight, highLight_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Highlight, highLight_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Highlight, highLight_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::HighlightedText, highLightText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::HighlightedText, highLightText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::HighlightedText, highLightText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Link, link_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Link, link_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Link, link_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::LinkVisited, linkVisited_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::LinkVisited, linkVisited_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::LinkVisited, linkVisited_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::AlternateBase, alternateBase_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::AlternateBase, alternateBase_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::AlternateBase, alternateBase_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::NoRole, noRale_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::NoRole, noRole_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::NoRole, noRole_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::ToolTipBase, toolTipBase_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipBase, toolTipBase_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipBase, toolTipBase_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::ToolTipText, toolTipText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipText, toolTipText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipText, toolTipText_dis); -- --#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) -- defaultPalette.setColor(QPalette::Active, QPalette::PlaceholderText, placeholderText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::PlaceholderText, placeholderText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::PlaceholderText, placeholderText_dis); --#endif --} -- --void KFashionStyleParameters::initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- pushButtonParameters.radius = 6; -- -- QBrush defaultBrush; -- QBrush clickBrush; -- QBrush hoverBrush; -- QBrush disableBrush; -- -- QBrush checkBrush; -- QBrush checkHoverBrush; -- QBrush checkClickBrush; -- QBrush checkDisableBrush; -- -- QPen focusPen; -- -- -- QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- QColor startColor; -- QColor endColor; -- QLinearGradient linearGradient; -- -- //hover -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -- if (isDark) { -- startColor = mixColor(highlight, QColor(Qt::white), 0.2); -- endColor = mixColor(highlight, QColor(Qt::black), 0.05); -- } else { -- startColor = mixColor(highlight, QColor(Qt::white), 0.05); -- endColor = mixColor(highlight, QColor(Qt::black), 0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- clickBrush = QBrush(mixColor(highlight, mix, 0.1)); -- defaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- -- checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -- checkHoverBrush = hoverBrush; -- checkClickBrush = clickBrush; -- checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); -- -- focusPen = QPen(QBrush(mixColor(highlight, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- if (widget) { -- bool isWindowButton = false; -- bool isWindowColoseButton = false; -- bool isImportant = false; -- bool useButtonPalette = false; -- bool needTranslucent = false; -- -- if (widget->property("isWindowButton").isValid()) { -- if (widget->property("isWindowButton").toInt() == 0x01) { -- isWindowButton = true; -- } -- if (widget->property("isWindowButton").toInt() == 0x02) { -- isWindowColoseButton = true; -- } -- } -- if (widget->property("isImportant").isValid()) { -- isImportant = widget->property("isImportant").toBool(); -- } -- -- if (widget->property("useButtonPalette").isValid()) { -- useButtonPalette = widget->property("useButtonPalette").toBool(); -- } -- -- if (widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- if (isWindowColoseButton) { -- QColor ColoseButton = ColoseButtonColor; -- -- if (isDark) { -- startColor = QColor(242, 116, 133); -- endColor = QColor(221, 44, 68); -- } else { -- startColor = QColor(242, 82, 117); -- endColor = QColor(221, 44, 68); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- //click -- clickBrush = QBrush(ColoseButton); -- -- //focus -- focusPen = QPen(QBrush(ColoseButton), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- } else if (isWindowButton && useTransparentButtonList().contains(qAppName())) { -- if (isDark) { -- mix.setAlphaF(0.28); -- hoverBrush = QBrush(mix); -- mix.setAlphaF(0.15); -- clickBrush = QBrush(mix); -- } else { -- mix.setAlphaF(0.15); -- hoverBrush = QBrush(mix); -- mix.setAlphaF(0.28); -- clickBrush = QBrush(mix); -- } -- } else if (useButtonPalette || isWindowButton) { -- if(needTranslucent) -- { -- if (isDark) { -- startColor = option->palette.color(QPalette::Active, QPalette::Light); -- endColor = option->palette.color(QPalette::Active, QPalette::Text); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } else { -- startColor = option->palette.color(QPalette::Active, QPalette::Mid); -- endColor = option->palette.color(QPalette::Active, QPalette::Dark); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- QColor clickColor = option->palette.color(QPalette::Active, QPalette::Dark); -- if(isDark) -- clickColor = option->palette.color(QPalette::Active, QPalette::Light); -- clickColor.setAlphaF(isDark ? 0.30 : 0.30); -- clickBrush.setColor(clickColor); -- } -- else{ -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- -- //hover -- if (isDark) { -- startColor = mixColor(button, QColor(Qt::white), 0.2); -- endColor = mixColor(button, QColor(Qt::white), 0.05); -- } else { -- startColor = mixColor(button, QColor(Qt::black), 0.05); -- endColor = mixColor(button, QColor(Qt::black), 0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- //click -- clickBrush = QBrush(mixColor(button, mix, 0.2)); -- } -- } -- -- if (needTranslucent) { -- defaultBrush = option->palette.brush(QPalette::Active, QPalette::Mid); -- disableBrush = option->palette.brush(QPalette::Active, QPalette::Mid); -- -- if(isDark){ -- defaultBrush = option->palette.brush(QPalette::Active, QPalette::Text); -- disableBrush = option->palette.brush(QPalette::Active, QPalette::Text); -- } -- QColor defaultColor = defaultBrush.color(); -- defaultColor.setAlphaF(0.15); -- defaultBrush.setColor(defaultColor); -- -- QColor disableColor = disableBrush.color(); -- disableColor.setAlphaF(0.1); -- disableBrush.setColor(disableColor); -- } -- -- if (isImportant) { -- defaultBrush = highlight; -- } -- } -- -- pushButtonParameters.pushButtonDefaultBrush = defaultBrush; -- pushButtonParameters.pushButtonClickBrush = clickBrush; -- pushButtonParameters.pushButtonHoverBrush = hoverBrush; -- pushButtonParameters.pushButtonDisableBrush = disableBrush; -- pushButtonParameters.pushButtonCheckBrush = checkBrush; -- pushButtonParameters.pushButtonCheckHoverBrush = checkHoverBrush; -- pushButtonParameters.pushButtonCheckClickBrush = checkClickBrush; -- pushButtonParameters.pushButtonCheckDisableBrush = checkDisableBrush; -- pushButtonParameters.pushButtonFocusPen = focusPen; --} -- --void KFashionStyleParameters::initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- toolButtonParameters.radius = 6; -- -- QBrush defaultBrush; -- QBrush clickBrush; -- QBrush hoverBrush; -- QBrush disableBrush; -- -- QBrush checkBrush; -- QBrush checkHoverBrush; -- QBrush checkClickBrush; -- QBrush checkDisableBrush; -- -- QPen focusPen; -- -- -- QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- QColor startColor; -- QColor endColor; -- QLinearGradient linearGradient; -- -- //hover -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -- if (isDark) { -- startColor = mixColor(highlight, QColor(Qt::white), 0.2); -- endColor = mixColor(highlight, QColor(Qt::black), 0.05); -- } else { -- startColor = mixColor(highlight, QColor(Qt::white), 0.05); -- endColor = mixColor(highlight, QColor(Qt::black), 0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- clickBrush = QBrush(mixColor(highlight, mix, 0.1)); -- defaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- -- checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -- checkHoverBrush = hoverBrush; -- checkClickBrush = clickBrush; -- checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); -- -- focusPen = QPen(QBrush(mixColor(highlight, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- if (widget) { -- bool isWindowButton = false; -- bool isWindowColoseButton = false; -- bool useButtonPalette = false; -- bool needTranslucent = false; -- -- if (widget->property("isWindowButton").isValid()) { -- if (widget->property("isWindowButton").toInt() == 0x01) { -- isWindowButton = true; -- } -- if (widget->property("isWindowButton").toInt() == 0x02) { -- isWindowColoseButton = true; -- } -- } -- -- if (widget->property("useButtonPalette").isValid()) { -- useButtonPalette = widget->property("useButtonPalette").toBool(); -- } -- -- if (widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- if (isWindowColoseButton) { -- QColor ColoseButton = ColoseButtonColor; -- if (isDark) { -- startColor = QColor(242, 116, 133); -- endColor = QColor(221, 44, 68); -- } else { -- startColor = QColor(242, 82, 117); -- endColor = QColor(221, 44, 68); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- //click -- clickBrush = QBrush(ColoseButton); -- -- //focus -- focusPen = QPen(QBrush(ColoseButton), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- } else if (isWindowButton && useTransparentButtonList().contains(qAppName())) { -- if (isDark) { -- mix.setAlphaF(0.28); -- hoverBrush = QBrush(mix); -- mix.setAlphaF(0.15); -- clickBrush = QBrush(mix); -- } else { -- mix.setAlphaF(0.15); -- hoverBrush = QBrush(mix); -- mix.setAlphaF(0.28); -- clickBrush = QBrush(mix); -- } -- } else if (useButtonPalette || isWindowButton) { -- if(needTranslucent) -- { -- if (isDark) { -- startColor = option->palette.color(QPalette::Active, QPalette::Light); -- endColor = option->palette.color(QPalette::Active, QPalette::Text); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } else { -- startColor = option->palette.color(QPalette::Active, QPalette::Mid); -- endColor = option->palette.color(QPalette::Active, QPalette::Dark); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- QColor clickColor = option->palette.color(QPalette::Active, QPalette::Dark); -- if(isDark) -- clickColor = option->palette.color(QPalette::Active, QPalette::Light); -- clickColor.setAlphaF(isDark ? 0.30 : 0.30); -- clickBrush.setColor(clickColor); -- } else { -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- -- //hover -- if (isDark) { -- startColor = mixColor(button, QColor(Qt::white), 0.2); -- endColor = mixColor(button, QColor(Qt::white), 0.05); -- } else { -- startColor = mixColor(button, QColor(Qt::black), 0.05); -- endColor = mixColor(button, QColor(Qt::black), 0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- //click -- clickBrush = QBrush(mixColor(button, mix, 0.2)); -- } -- } -- -- if (needTranslucent) { -- defaultBrush = option->palette.brush(QPalette::Active, QPalette::Mid); -- disableBrush = option->palette.brush(QPalette::Active, QPalette::Mid); -- -- if(isDark){ -- defaultBrush = option->palette.brush(QPalette::Active, QPalette::Text); -- disableBrush = option->palette.brush(QPalette::Active, QPalette::Text); -- } -- QColor defaultColor = defaultBrush.color(); -- defaultColor.setAlphaF(0.15); -- defaultBrush.setColor(defaultColor); -- -- QColor disableColor = disableBrush.color(); -- disableColor.setAlphaF(0.1); -- disableBrush.setColor(disableColor); -- } -- } -- -- toolButtonParameters.toolButtonDefaultBrush = defaultBrush; -- toolButtonParameters.toolButtonClickBrush = clickBrush; -- toolButtonParameters.toolButtonHoverBrush = hoverBrush; -- toolButtonParameters.toolButtonDisableBrush = disableBrush; -- toolButtonParameters.toolButtonCheckBrush = checkBrush; -- toolButtonParameters.toolButtonCheckHoverBrush = checkHoverBrush; -- toolButtonParameters.toolButtonCheckClickBrush = checkClickBrush; -- toolButtonParameters.toolButtonCheckDisableBrush = checkDisableBrush; -- toolButtonParameters.toolButtonFocusPen = focusPen; --} -- --void KFashionStyleParameters::initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- lineEditParameters.radius = 6; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush focusBrush; -- QBrush disableBrush; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen focusPen; -- QPen disablePen; -- -- bool needTranslucent = false; -- -- if (widget && widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- //default state -- defaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- defaultPen = QPen(Qt::NoPen); -- defaultPen.setWidth(0); -- -- //hover state -- hoverBrush = defaultBrush; -- hoverPen = defaultPen; -- -- //focus state -- focusBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- focusPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), -- 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- //disable state -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- disablePen = QPen(Qt::NoPen); -- disablePen.setWidth(0); -- -- if(needTranslucent) -- { -- QColor defaultColor = option->palette.color(QPalette::Active, QPalette::Mid); -- if (isDark) -- defaultColor = option->palette.color(QPalette::Active, QPalette::Text); -- defaultColor.setAlphaF(isDark ? 0.1 : 0.15); -- defaultBrush.setColor(defaultColor); -- -- QColor focusColor = option->palette.color(QPalette::Active, QPalette::Base); -- focusColor.setAlphaF(isDark ? 0.45 : 0.65); -- focusBrush.setColor(focusColor); -- -- QColor startColor; -- QColor endColor; -- QLinearGradient linearGradient; -- if (isDark) { -- startColor = option->palette.color(QPalette::Active, QPalette::Light); -- endColor = option->palette.color(QPalette::Active, QPalette::Text); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } else { -- startColor = option->palette.color(QPalette::Active, QPalette::Mid); -- endColor = option->palette.color(QPalette::Active, QPalette::Dark); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- } -- -- lineEditParameters.lineEditDefaultBrush = defaultBrush; -- lineEditParameters.lineEditHoverBrush = hoverBrush; -- lineEditParameters.lineEditFocusBrush = focusBrush; -- lineEditParameters.lineEditDisableBrush = disableBrush; -- -- lineEditParameters.lineEditDefaultPen = defaultPen; -- lineEditParameters.lineEditHoverPen = hoverPen; -- lineEditParameters.lineEditFocusPen = focusPen; -- lineEditParameters.lineEditDisablePen = disablePen; --} -- --void KFashionStyleParameters::initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout) --{ -- spinBoxParameters.radius = 6; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush focusBrush; -- QBrush disableBrush; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen focusPen; -- QPen disablePen; -- -- QBrush upHoverBrush; -- QBrush upFocusHoverBrush; -- QBrush upClickBrush; -- QBrush upDefaultBrush; -- QBrush downHoverBrush; -- QBrush downFocusHoverBrush; -- QBrush downClickBrush; -- QBrush downDefaultBrush; -- -- //default state -- defaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- defaultPen = QPen(Qt::NoPen); -- defaultPen.setWidth(0); -- -- //hover state -- hoverPen = defaultPen; -- if(isHorizonLayout) -- hoverPen.setWidth(2); -- {//hoverBrush -- QColor startColor; -- QColor endColor; -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -- if (isDark) { -- startColor = option->palette.color(QPalette::Active, QPalette::Midlight); -- endColor = option->palette.color(QPalette::Disabled, QPalette::NoRole); -- startColor.setAlphaF(0.5); -- endColor.setAlphaF(0.5); -- } else { -- startColor = option->palette.color(QPalette::Active, QPalette::Midlight); -- endColor = mixColor(startColor, mix, 0.1); -- startColor.setAlphaF(0.5); -- endColor.setAlphaF(0.5); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- } -- -- //focus state -- focusBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- focusPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), -- 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- //disable state -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- disablePen = QPen(Qt::NoPen); -- disablePen.setWidth(0); -- -- if(isHorizonLayout) -- { -- upDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- downDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- } -- else -- { -- upDefaultBrush = QBrush(Qt::NoBrush); -- downDefaultBrush = QBrush(Qt::NoBrush); -- } -- -- QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- QColor startColor; -- QColor endColor; -- -- QLinearGradient upLinearGradient; -- upLinearGradient.setStart(option->rect.left(), option->rect.top()); -- upLinearGradient.setFinalStop(option->rect.left(), option->rect.center().y()); -- //up hover -- if (isDark) { -- startColor = mixColor(button, QColor(Qt::white), 0.2); -- endColor = mixColor(button, QColor(Qt::white), 0.05); -- } else { -- startColor = mixColor(button, QColor(Qt::black), 0.05); -- endColor = mixColor(button, QColor(Qt::black), 0.2); -- } -- upLinearGradient.setColorAt(0, startColor); -- upLinearGradient.setColorAt(1, endColor); -- upHoverBrush = QBrush(upLinearGradient); -- -- //up focus hover -- if (isDark) { -- startColor = mixColor(highlight, QColor(Qt::white), 0.2); -- endColor = mixColor(highlight, QColor(Qt::black), 0.05); -- } else { -- startColor = mixColor(highlight, QColor(Qt::white), 0.05); -- endColor = mixColor(highlight, QColor(Qt::black), 0.2); -- } -- upLinearGradient.setColorAt(0, startColor); -- upLinearGradient.setColorAt(1, endColor); -- upFocusHoverBrush = QBrush(upLinearGradient); -- -- //up click -- upClickBrush = QBrush(mixColor(highlight, mix, 0.1)); -- -- -- QLinearGradient downLinearGradient; -- downLinearGradient.setStart(option->rect.left(), option->rect.center().y()); -- downLinearGradient.setFinalStop(option->rect.left(), option->rect.bottom()); -- //down hover -- if (isDark) { -- startColor = mixColor(button, QColor(Qt::white), 0.2); -- endColor = mixColor(button, QColor(Qt::white), 0.05); -- } else { -- startColor = mixColor(button, QColor(Qt::black), 0.05); -- endColor = mixColor(button, QColor(Qt::black), 0.2); -- } -- downLinearGradient.setColorAt(0, startColor); -- downLinearGradient.setColorAt(1, endColor); -- downHoverBrush = QBrush(downLinearGradient); -- -- //down focus hover -- if (isDark) { -- startColor = mixColor(highlight, QColor(Qt::white), 0.2); -- endColor = mixColor(highlight, QColor(Qt::black), 0.05); -- } else { -- startColor = mixColor(highlight, QColor(Qt::white), 0.05); -- endColor = mixColor(highlight, QColor(Qt::black), 0.2); -- } -- downLinearGradient.setColorAt(0, startColor); -- downLinearGradient.setColorAt(1, endColor); -- downFocusHoverBrush = QBrush(downLinearGradient); -- -- //down click -- downClickBrush = QBrush(mixColor(highlight, mix, 0.1)); -- -- -- -- spinBoxParameters.spinBoxDefaultBrush = defaultBrush; -- spinBoxParameters.spinBoxHoverBrush = hoverBrush; -- spinBoxParameters.spinBoxFocusBrush = focusBrush; -- spinBoxParameters.spinBoxDisableBrush = disableBrush; -- -- spinBoxParameters.spinBoxDefaultPen = defaultPen; -- spinBoxParameters.spinBoxHoverPen = hoverPen; -- spinBoxParameters.spinBoxFocusPen = focusPen; -- spinBoxParameters.spinBoxDisablePen = disablePen; -- -- spinBoxParameters.spinBoxUpDefaultBrush = upDefaultBrush; -- spinBoxParameters.spinBoxUpHoverBrush = upHoverBrush; -- spinBoxParameters.spinBoxUpFocusHoverBrush = upFocusHoverBrush; -- spinBoxParameters.spinBoxUpClickBrush = upClickBrush; -- spinBoxParameters.spinBoxDownHoverBrush = downHoverBrush; -- spinBoxParameters.spinBoxDownFocusHoverBrush = downFocusHoverBrush; -- spinBoxParameters.spinBoxDownClickBrush = downClickBrush; -- spinBoxParameters.spinBoxDownDefaultBrush = downDefaultBrush; --} -- --void KFashionStyleParameters::initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- comboBoxParameters.radius = 6; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush onBrush; -- QBrush editBrush; -- QBrush disableBrush; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen onPen; -- QPen editPen; -- QPen disablePen; -- -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- //default state -- defaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- defaultPen = QPen(Qt::NoPen); -- defaultPen.setWidth(0); -- -- //hover state -- if (isDark) { -- hoverBrush = QBrush(mixColor(button, mix, 0.2)); -- } else { -- hoverBrush = QBrush(mixColor(button, mix, 0.05)); -- } -- hoverPen = QPen(Qt::NoPen); -- hoverPen.setWidth(0); -- -- //on state -- if (isDark) { -- onBrush = QBrush(mixColor(button, mix, 0.05)); -- } else { -- onBrush = QBrush(mixColor(button, mix, 0.2)); -- } -- onPen = QPen(Qt::NoPen); -- onPen.setWidth(0); -- -- //focus and on state,edit mode -- editBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- editPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), -- 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- //disable state -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- disablePen = QPen(Qt::NoPen); -- disablePen.setWidth(0); -- -- -- comboBoxParameters.comboBoxDefaultBrush = defaultBrush; -- comboBoxParameters.comboBoxHoverBrush = hoverBrush; -- comboBoxParameters.comboBoxOnBrush = onBrush; -- comboBoxParameters.comboBoxEditBrush = editBrush; -- comboBoxParameters.comboBoxDisableBrush = disableBrush; -- -- comboBoxParameters.comboBoxDefaultPen = defaultPen; -- comboBoxParameters.comboBoxHoverPen = hoverPen; -- comboBoxParameters.comboBoxOnPen = onPen; -- comboBoxParameters.comboBoxEditPen = editPen; -- comboBoxParameters.comboBoxDisablePen = disablePen; --} -- --void KFashionStyleParameters::initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- listParameters.radius = 6; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush selectBrush; -- QBrush disableBrush; -- QPen textHoverPen = QPen(Qt::NoPen); -- QPen textSelectPen = QPen(Qt::NoPen); -- bool needTranslucent = false; -- if (widget && widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- //default -- defaultBrush = QBrush(Qt::transparent); -- -- //hover -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- QColor startColor; -- QColor endColor; -- QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -- if (isDark) { -- startColor = mixColor(button, QColor(Qt::white), 0.2); -- endColor = mixColor(button, QColor(Qt::white), 0.05); -- } else { -- startColor = mixColor(button, QColor(Qt::black), 0.05); -- endColor = mixColor(button, QColor(Qt::black), 0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- //select -- selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -- -- //disable -- disableBrush = QBrush(Qt::transparent); -- -- const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option); -- QPalette::ColorGroup cg = vi->state & QStyle::State_Enabled -- ? QPalette::Normal : QPalette::Disabled; -- if (cg == QPalette::Normal && !(vi->state & QStyle::State_Active)) -- cg = QPalette::Inactive; -- -- if(needTranslucent) -- { -- if (isDark) { -- startColor = option->palette.color(QPalette::Active, QPalette::Light); -- endColor = option->palette.color(QPalette::Active, QPalette::Text); -- startColor.setAlphaF(0.15); -- endColor.setAlphaF(0.15); -- } else { -- startColor = option->palette.color(QPalette::Active, QPalette::Mid); -- endColor = option->palette.color(QPalette::Active, QPalette::Dark); -- startColor.setAlphaF(0.1); -- endColor.setAlphaF(0.1); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- QColor selectColor = option->palette.color(QPalette::Active, QPalette::Dark); -- if(isDark) -- selectColor = option->palette.color(QPalette::Active, QPalette::Light); -- selectColor.setAlphaF(isDark ? 0.20 : 0.25); -- selectBrush.setColor(selectColor); -- -- textSelectPen = option->palette.color(cg, QPalette::Text); -- textHoverPen = option->palette.color(cg, QPalette::BrightText); -- } -- else -- { -- textSelectPen = option->palette.color(cg, QPalette::HighlightedText); -- textHoverPen = option->palette.color(cg, QPalette::Text); -- } -- -- listParameters.listDefaultBrush = defaultBrush; -- listParameters.listHoverBrush = hoverBrush; -- listParameters.listSelectBrush = selectBrush; -- listParameters.listDisableBrush = disableBrush; -- listParameters.listTextHoverPen = textHoverPen; -- listParameters.listTextSelectPen = textSelectPen; --} -- --void KFashionStyleParameters::initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- treeParameters.radius = 6; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush selectBrush; -- QBrush disableBrush; -- -- QBrush branchDefaultBrush; -- QBrush branchHoverBrush; -- QBrush branchSelectBrush; -- QBrush branchDisableBrush; -- -- -- //default -- defaultBrush = QBrush(Qt::transparent); -- branchDefaultBrush = defaultBrush; -- -- //hover -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- QColor startColor; -- QColor endColor; -- QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -- if (isDark) { -- startColor = mixColor(button, QColor(Qt::white), 0.2); -- endColor = mixColor(button, QColor(Qt::white), 0.05); -- } else { -- startColor = mixColor(button, QColor(Qt::black), 0.05); -- endColor = mixColor(button, QColor(Qt::black), 0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- branchHoverBrush = hoverBrush; -- -- //select -- selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -- branchSelectBrush = selectBrush; -- -- //disable -- disableBrush = QBrush(Qt::transparent); -- branchDisableBrush = disableBrush; -- -- -- treeParameters.treeDefaultBrush = defaultBrush; -- treeParameters.treeHoverBrush = hoverBrush; -- treeParameters.treeSelectBrush = selectBrush; -- treeParameters.treeDisableBrush = disableBrush; -- -- treeParameters.treeBranchDefaultBrush = branchDefaultBrush; -- treeParameters.treeBranchHoverBrush = branchHoverBrush; -- treeParameters.treeBranchSelectBrush = branchSelectBrush; -- treeParameters.treeBranchDisableBrush = branchDisableBrush; --} -- --void KFashionStyleParameters::initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- tableParameters.radius = 0; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush selectBrush; -- QBrush disableBrush; -- -- -- //default -- defaultBrush = QBrush(Qt::transparent); -- -- //hover -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- QColor startColor; -- QColor endColor; -- QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -- if (isDark) { -- startColor = mixColor(button, QColor(Qt::white), 0.2); -- endColor = mixColor(button, QColor(Qt::white), 0.05); -- } else { -- startColor = mixColor(button, QColor(Qt::black), 0.05); -- endColor = mixColor(button, QColor(Qt::black), 0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- //select -- selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -- -- //disable -- disableBrush = QBrush(Qt::transparent); -- -- -- tableParameters.tableDefaultBrush = defaultBrush; -- tableParameters.tableHoverBrush = hoverBrush; -- tableParameters.tableSelectBrush = selectBrush; -- tableParameters.tableDisableBrush = disableBrush; --} -- --void KFashionStyleParameters::initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- checkBoxParameters.radius = 4; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen clickPen; -- QPen disablePen; -- QPen onDefaultPen; -- QPen onHoverPen; -- QPen onClickPen; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush clickBrush; -- QBrush disableBrush; -- QBrush onDefaultBrush; -- QBrush onHoverBrush; -- QBrush onClickBrush; -- -- bool needTranslucent = false; -- if (widget && widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- //default -- if (isDark) { -- QColor col = option->palette.color(QPalette::Active, QPalette::BrightText); -- col.setAlphaF(0.15); -- defaultPen = QPen(col, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } else { -- defaultPen = QPen(option->palette.brush(QPalette::Disabled, QPalette::ButtonText), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- defaultBrush = QBrush(option->palette.color(QPalette::Active, QPalette::Base).lighter(200)); -- -- //hover -- hoverPen = defaultPen; -- if (isDark) { -- hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); -- } else { -- hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.05)); -- } -- -- //click -- clickPen = defaultPen; -- if (isDark) { -- clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.1)); -- } else { -- clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); -- } -- -- if(needTranslucent) -- { -- QColor defaultColor = option->palette.color(QPalette::Active, QPalette::Mid); -- if(isDark) -- defaultColor = option->palette.color(QPalette::Active, QPalette::Text); -- defaultColor.setAlphaF(isDark ? 0.15 : 0.20); -- defaultBrush.setColor(defaultColor); -- QColor defaultPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- defaultPenColor.setAlphaF(0.3); -- defaultPen = QPen(QBrush(defaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- -- QColor startColor; -- QColor endColor; -- QLinearGradient linearGradient; -- if (isDark) { -- startColor = option->palette.color(QPalette::Active, QPalette::Light); -- endColor = option->palette.color(QPalette::Active, QPalette::Text); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } else { -- startColor = option->palette.color(QPalette::Active, QPalette::Mid); -- endColor = option->palette.color(QPalette::Active, QPalette::Dark); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- hoverPen = defaultPen; -- -- -- QColor clickColor = option->palette.color(QPalette::Active, QPalette::Dark); -- if(isDark) -- clickColor = option->palette.color(QPalette::Active, QPalette::Light); -- clickColor.setAlphaF(0.30); -- clickBrush.setColor(clickColor); -- clickPen = defaultPen; -- } -- -- //disable -- disablePen = defaultPen; -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- -- //on default -- onDefaultPen = QPen(Qt::NoPen); -- onDefaultPen.setWidth(0); -- onDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -- if(needTranslucent) -- { -- QColor onDefaultPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- onDefaultPenColor.setAlphaF(0.1); -- onDefaultPen = QPen(QBrush(onDefaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- -- //on hover -- onHoverPen = QPen(Qt::NoPen); -- onHoverPen.setWidth(0); -- QColor startColor; -- QColor endColor; -- QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -- if (isDark) { -- startColor = mixColor(onDefaultBrush.color(), QColor(Qt::white), 0.2); -- endColor = mixColor(onDefaultBrush.color(), QColor(Qt::black), 0.05); -- } else { -- startColor = mixColor(onDefaultBrush.color(), QColor(Qt::white), 0.05); -- endColor = mixColor(onDefaultBrush.color(), QColor(Qt::black), 0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- onHoverBrush = QBrush(linearGradient); -- if(needTranslucent) -- { -- QColor onHoverPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- onHoverPenColor.setAlphaF(0.2); -- onHoverPen = QPen(QBrush(onHoverPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- -- //on click -- onClickPen = QPen(Qt::NoPen); -- onClickPen.setWidth(0); -- onClickBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.1)); -- if(needTranslucent) -- { -- QColor onClickPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- onClickPenColor.setAlphaF(0.2); -- onClickPen = QPen(QBrush(onClickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- -- checkBoxParameters.checkBoxDefaultPen = defaultPen; -- checkBoxParameters.checkBoxHoverPen = hoverPen; -- checkBoxParameters.checkBoxClickPen = clickPen; -- checkBoxParameters.checkBoxDisablePen = disablePen; -- checkBoxParameters.checkBoxOnDefaultPen = onDefaultPen; -- checkBoxParameters.checkBoxOnHoverPen = onHoverPen; -- checkBoxParameters.checkBoxOnClickPen = onClickPen; -- -- checkBoxParameters.checkBoxDefaultBrush = defaultBrush; -- checkBoxParameters.checkBoxHoverBrush = hoverBrush; -- checkBoxParameters.checkBoxClickBrush = clickBrush; -- checkBoxParameters.checkBoxDisableBrush = disableBrush; -- checkBoxParameters.checkBoxOnDefaultBrush = onDefaultBrush; -- checkBoxParameters.checkBoxOnHoverBrush = onHoverBrush; -- checkBoxParameters.checkBoxOnClickBrush = onClickBrush; --} -- --void KFashionStyleParameters::initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- radioButtonParameters.radius = 6; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen clickPen; -- QPen disablePen; -- QPen onDefaultPen; -- QPen onHoverPen; -- QPen onClickPen; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush clickBrush; -- QBrush disableBrush; -- QBrush onDefaultBrush; -- QBrush onHoverBrush; -- QBrush onClickBrush; -- -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- //default -- if (isDark) { -- QColor col = option->palette.color(QPalette::Active, QPalette::BrightText); -- col.setAlphaF(0.15); -- defaultPen = QPen(col, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } else { -- defaultPen = QPen(option->palette.brush(QPalette::Disabled, QPalette::ButtonText), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- defaultBrush = QBrush(option->palette.color(QPalette::Active, QPalette::Base).lighter(200)); -- -- //hover -- hoverPen = defaultPen; -- if (isDark) { -- hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); -- } else { -- hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.05)); -- } -- -- //click -- clickPen = defaultPen; -- if (isDark) { -- clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.1)); -- } else { -- clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); -- } -- -- //disable -- disablePen = defaultPen; -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- -- //on default -- onDefaultPen = QPen(Qt::NoPen); -- onDefaultPen.setWidth(0); -- onDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -- -- //on hover -- onHoverPen = QPen(Qt::NoPen); -- onHoverPen.setWidth(0); -- if (isDark) { -- onHoverBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.2)); -- } else { -- onHoverBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.05)); -- } -- -- //on click -- onClickPen = QPen(Qt::NoPen); -- onClickPen.setWidth(0); -- if (isDark) { -- onClickBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.05)); -- } else { -- onClickBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.2)); -- } -- -- -- //if set property -- if (widget) { -- if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { -- defaultPen = widget->property("setDefaultPen").value<QPen>(); -- } -- if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { -- hoverPen = widget->property("setHoverPen").value<QPen>(); -- } -- if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { -- clickPen = widget->property("setClickPen").value<QPen>(); -- } -- if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { -- disablePen = widget->property("setDisablePen").value<QPen>(); -- } -- if (widget->property("setOnDefaultPen").isValid() && widget->property("setOnDefaultPen").canConvert<QPen>()) { -- onDefaultPen = widget->property("setOnDefaultPen").value<QPen>(); -- } -- if (widget->property("setOnHoverPen").isValid() && widget->property("setOnHoverPen").canConvert<QPen>()) { -- onHoverPen = widget->property("setOnHoverPen").value<QPen>(); -- } -- if (widget->property("setOnClickPen").isValid() && widget->property("setOnClickPen").canConvert<QPen>()) { -- onClickPen = widget->property("setOnClickPen").value<QPen>(); -- } -- if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { -- defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { -- hoverBrush = widget->property("setHoverBrush").value<QBrush>(); -- } -- if (widget->property("setClickBrush").isValid() && widget->property("setClickBrush").canConvert<QBrush>()) { -- clickBrush = widget->property("setClickBrush").value<QBrush>(); -- } -- if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { -- disableBrush = widget->property("setDisableBrush").value<QBrush>(); -- } -- if (widget->property("setOnDefaultBrush").isValid() && widget->property("setOnDefaultBrush").canConvert<QBrush>()) { -- onDefaultBrush = widget->property("setOnDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setOnHoverBrush").isValid() && widget->property("setOnHoverBrush").canConvert<QBrush>()) { -- onHoverBrush = widget->property("setOnHoverBrush").value<QBrush>(); -- } -- if (widget->property("setOnClickBrush").isValid() && widget->property("setOnClickBrush").canConvert<QBrush>()) { -- onClickBrush = widget->property("setOnClickBrush").value<QBrush>(); -- } -- } -- -- -- radioButtonParameters.radioButtonDefaultPen = defaultPen; -- radioButtonParameters.radioButtonHoverPen = hoverPen; -- radioButtonParameters.radioButtonClickPen = clickPen; -- radioButtonParameters.radioButtonDisablePen = disablePen; -- radioButtonParameters.radioButtonOnDefaultPen = onDefaultPen; -- radioButtonParameters.radioButtonOnHoverPen = onHoverPen; -- radioButtonParameters.radioButtonOnClickPen = onClickPen; -- -- radioButtonParameters.radioButtonDefaultBrush = defaultBrush; -- radioButtonParameters.radioButtonHoverBrush = hoverBrush; -- radioButtonParameters.radioButtonClickBrush = clickBrush; -- radioButtonParameters.radioButtonDisableBrush = disableBrush; -- radioButtonParameters.radioButtonOnDefaultBrush = onDefaultBrush; -- radioButtonParameters.radioButtonOnHoverBrush = onHoverBrush; -- radioButtonParameters.radioButtonOnClickBrush = onClickBrush; --} -- --void KFashionStyleParameters::initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- QBrush handleDefaultBrush; -- QBrush handleHoverBrush; -- QBrush handleClickBrush; -- QBrush handleDisableBrush; -- -- QBrush grooveValueDefaultBrush; -- QBrush grooveValueHoverBrush; -- QBrush grooveValueDisableBrush; -- QBrush grooveUnvalueDefaultBrush; -- QBrush grooveUnvalueHoverBrush; -- QBrush grooveUnvalueDisableBrush; -- -- bool needTranslucent = false; -- -- if (widget && widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option); -- -- QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- //handle default -- handleDefaultBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -- -- //handle hover -- QColor startColor; -- QColor endColor; -- QLinearGradient linearGradient; -- if (slider->orientation == Qt::Vertical) { -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.topRight()); -- } else { -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -- } -- -- if (isDark) { -- startColor = mixColor(highlight, QColor(Qt::white), 0.2); -- endColor = mixColor(highlight, QColor(Qt::black), 0.05); -- } else { -- startColor = mixColor(highlight, QColor(Qt::white), 0.05); -- endColor = mixColor(highlight, QColor(Qt::black), 0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- handleHoverBrush = QBrush(linearGradient); -- -- //handle click -- handleClickBrush = QBrush(mixColor(highlight, mix, 0.1)); -- -- //handle disable -- handleDisableBrush = option->palette.color(QPalette::Disabled, QPalette::ButtonText); -- -- //groove value default -- if (isDark) { -- grooveValueDefaultBrush = QBrush(mixColor(highlight, mix, 0.05)); -- } else { -- grooveValueDefaultBrush = QBrush(mixColor(highlight, mix, 0.2)); -- } -- -- //groove value hover -- grooveValueHoverBrush = grooveValueDefaultBrush; -- -- //groove value disable -- grooveValueDisableBrush = handleDisableBrush; -- -- //groove unvalue default -- grooveUnvalueDefaultBrush = option->palette.color(QPalette::Active, QPalette::Button); -- if(needTranslucent) -- { -- QColor color = option->palette.color(QPalette::Active, QPalette::BrightText); -- color.setAlphaF(0.1); -- grooveUnvalueDefaultBrush.setColor(color); -- } -- -- //groove unvalue hover -- grooveUnvalueHoverBrush = grooveUnvalueDefaultBrush; -- -- //groove unvalue disable -- grooveUnvalueDisableBrush = grooveUnvalueDefaultBrush; -- -- -- sliderParameters.sliderHandleDefaultBrush = handleDefaultBrush; -- sliderParameters.sliderHandleHoverBrush = handleHoverBrush; -- sliderParameters.sliderHandleClickBrush = handleClickBrush; -- sliderParameters.sliderHandleDisableBrush = handleDisableBrush; -- -- sliderParameters.sliderGrooveValueDefaultBrush = grooveValueDefaultBrush; -- sliderParameters.sliderGrooveValueHoverBrush = grooveValueHoverBrush; -- sliderParameters.sliderGrooveValueDisableBrush = grooveValueDisableBrush; -- -- sliderParameters.sliderGrooveUnvalueDefaultBrush = grooveUnvalueDefaultBrush; -- sliderParameters.sliderGrooveUnvalueHoverBrush = grooveUnvalueHoverBrush; -- sliderParameters.sliderGrooveUnvalueDisableBrush = grooveUnvalueDisableBrush; --} -- --void KFashionStyleParameters::initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- QBrush contentBrush; -- QBrush grooveDefaultBrush; -- QBrush grooveDisableBrush; -- -- bool needTranslucent = false; -- -- if (widget && widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option); -- const bool vertical = pb->orientation == Qt::Vertical; -- const bool inverted = pb->invertedAppearance; -- -- bool reverse = (!vertical && (pb->direction == Qt::RightToLeft)) || vertical; -- if (inverted) -- reverse = !reverse; -- -- //content -- QColor startColor = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor endColor = option->palette.color(QPalette::Active, QPalette::Highlight).lighter(120); -- QLinearGradient linearGradient; -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- if (vertical) { -- if (reverse) { -- linearGradient.setStart(pb->rect.bottomLeft()); -- linearGradient.setFinalStop(pb->rect.topLeft()); -- } else { -- linearGradient.setStart(pb->rect.topLeft()); -- linearGradient.setFinalStop(pb->rect.bottomLeft()); -- } -- } else { -- if (reverse) { -- linearGradient.setStart(pb->rect.topRight()); -- linearGradient.setFinalStop(pb->rect.topLeft()); -- } else { -- linearGradient.setStart(pb->rect.topLeft()); -- linearGradient.setFinalStop(pb->rect.topRight()); -- } -- } -- contentBrush = QBrush(linearGradient); -- -- //groove default -- grooveDefaultBrush = pb->palette.brush(QPalette::Active, QPalette::Button); -- if(needTranslucent) -- { -- QColor grooveDefaultColor = pb->palette.color(QPalette::Active, QPalette::BrightText); -- grooveDefaultColor.setAlphaF(0.1); -- grooveDefaultBrush.setColor(grooveDefaultColor); -- } -- -- //groove disable -- grooveDisableBrush = pb->palette.brush(QPalette::Disabled, QPalette::Button); -- -- -- progressBarParameters.radius = 6; -- progressBarParameters.progressBarContentBrush = contentBrush; -- progressBarParameters.progressBarGrooveDefaultBrush = grooveDefaultBrush; -- progressBarParameters.progressBarGrooveDisableBrush = grooveDisableBrush; --} -- --void KFashionStyleParameters::initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int sliderRadius; -- QBrush grooveDefaultBrush; -- QBrush grooveInactiveBrush; -- QBrush sliderDefaultBrush; -- QBrush sliderHoverBrush; -- QBrush sliderClickBrush; -- QBrush sliderDisableBrush; -- -- bool needTranslucent = false; -- -- if (widget && widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -- } -- -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option); -- -- //radius -- if (bar->orientation == Qt::Horizontal) { -- sliderRadius = (bar->rect.height()) / 4; -- } else { -- sliderRadius = (bar->rect.width()) / 4; -- } -- -- //groove default -- grooveDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- -- //groove inactive -- grooveInactiveBrush = option->palette.brush(QPalette::Inactive, QPalette::Base); -- -- //slider default -- sliderDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- -- //slider hover -- QColor startColor; -- QColor endColor; -- QLinearGradient linearGradient; -- if (bar->orientation == Qt::Horizontal) { -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -- } else { -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.topRight()); -- } -- QColor color = option->palette.color(QPalette::Active, QPalette::Button); -- if (isDark) { -- startColor = mixColor(color, QColor(Qt::white), 0.2); -- endColor = mixColor(color, QColor(Qt::white), 0.05); -- } else { -- startColor = mixColor(color, QColor(Qt::black), 0.05); -- endColor = mixColor(color, QColor(Qt::black), 0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- sliderHoverBrush = QBrush(linearGradient); -- -- //slider click -- sliderClickBrush = QBrush(mixColor(sliderDefaultBrush.color(), mix, 0.2)); -- -- //slider disable -- sliderDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- -- -- if(needTranslucent) -- { -- QColor grooveDefaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- grooveDefaultColor.setAlphaF(0.05); -- grooveDefaultBrush = QBrush(grooveDefaultColor); -- -- QColor grooveInactiveColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- grooveInactiveColor.setAlphaF(0.05); -- grooveInactiveBrush = QBrush(grooveInactiveColor); -- -- QColor sliderDefaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- sliderDefaultColor.setAlphaF(0.10); -- sliderDefaultBrush = QBrush(sliderDefaultColor); -- -- QColor sliderHoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- sliderHoverColor.setAlphaF(0.2); -- sliderHoverBrush = QBrush(sliderHoverColor); -- -- QColor sliderClickColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- sliderClickColor.setAlphaF(0.3); -- sliderClickBrush = QBrush(sliderClickColor); -- } -- -- -- scrollBarParameters.radius = sliderRadius; -- scrollBarParameters.scrollBarGrooveDefaultBrush = grooveDefaultBrush; -- scrollBarParameters.scrollBarGrooveInactiveBrush = grooveInactiveBrush; -- scrollBarParameters.scrollBarSliderDefaultBrush = sliderDefaultBrush; -- scrollBarParameters.scrollBarSliderHoverBrush = sliderHoverBrush; -- scrollBarParameters.scrollBarSliderClickBrush = sliderClickBrush; -- scrollBarParameters.scrollBarSliderDisableBrush = sliderDisableBrush; --} -- --void KFashionStyleParameters::initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- QBrush backgroundBrush; -- -- //background -- backgroundBrush = option->palette.color(QPalette::Active, QPalette::ToolTipBase); -- -- -- toolTipParameters.radius = 6; -- toolTipParameters.toolTipBackgroundBrush = backgroundBrush; --} -- --void KFashionStyleParameters::initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int tabradius = 6; -- QBrush widgetBackgroundBrush; -- QBrush tabBarBackgroundBrush; -- QBrush tabBarDefaultBrush; -- QBrush tabBarHoverBrush; -- QBrush tabBarSelectBrush; -- -- //tab widget background -- widgetBackgroundBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- -- //tabbar background -- tabBarBackgroundBrush = option->palette.brush(QPalette::Active, QPalette::Window); -- -- //tabbar default -- tabBarDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Window); -- -- //tabbar hover -- QColor hover_color = option->palette.color(QPalette::Active, QPalette::Window); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- tabBarHoverBrush = QBrush(mixColor(hover_color, mix, 0.1)); -- -- //tabbar select -- tabBarSelectBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- -- -- if (widget && widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -- tabradius = widget->property("setRadius").value<int>(); -- } -- -- -- tabWidgetParameters.radius = tabradius; -- tabWidgetParameters.tabWidgetBackgroundBrush = widgetBackgroundBrush; -- tabWidgetParameters.tabBarBackgroundBrush = tabBarBackgroundBrush; -- tabWidgetParameters.tabBarDefaultBrush = tabBarDefaultBrush; -- tabWidgetParameters.tabBarHoverBrush = tabBarHoverBrush; -- tabWidgetParameters.tabBarSelectBrush = tabBarSelectBrush; --} -- --void KFashionStyleParameters::initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int frameradius = 8; -- int itemradius = 6; -- QPixmap framePixmap(option->rect.size()); -- QBrush itemSelectBrush; -- -- //frame Pixmap -- framePixmap.fill(Qt::transparent); -- QRect drawRect; -- if (qobject_cast<const QFrame*>(widget)) { -- //path has 1px blank on right and bottom -- drawRect = option->rect.adjusted(0, 0, 1, 1); -- -- QPainterPath drawRectPath; -- drawRectPath.moveTo(drawRect.left(), drawRect.top() + frameradius); -- drawRectPath.arcTo(QRect(drawRect.left(), drawRect.top(), 2 * frameradius, 2 * frameradius), 180, -90); -- drawRectPath.lineTo(drawRect.right() - frameradius, drawRect.top()); -- drawRectPath.arcTo(QRect(drawRect.right() - 2 * frameradius, drawRect.top(), 2 * frameradius, 2 * frameradius), 90, -90); -- drawRectPath.lineTo(drawRect.right(), drawRect.bottom() - 28); -- drawRectPath.arcTo(QRect(drawRect.right() - 2 * 20, drawRect.bottom() - 2 * 28, 2 * 20, 2 * 28), 0, -90); -- drawRectPath.lineTo(drawRect.left() + frameradius, drawRect.bottom()); -- drawRectPath.arcTo(QRect(drawRect.left(), drawRect.bottom() - 2 * frameradius, 2 * frameradius, 2 * frameradius), -90, -90); -- drawRectPath.lineTo(drawRect.left(), drawRect.top() + frameradius); -- -- QPainter pixmapPainter(&framePixmap); -- pixmapPainter.setPen(Qt::NoPen); -- pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::Base).lighter(180)); -- pixmapPainter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter.drawPath(drawRectPath); -- pixmapPainter.end(); -- -- QPainterPath drawRightBottomPath; -- drawRightBottomPath.moveTo(drawRect.right(), drawRect.bottom() - 28); -- drawRightBottomPath.arcTo(QRect(drawRect.right() - 2 * 20, drawRect.bottom() - 2 * 28, 2 * 20, 2 * 28), 0, -90); -- drawRightBottomPath.lineTo(drawRect.right() - frameradius, drawRect.bottom()); -- drawRightBottomPath.arcTo(QRect(drawRect.right() - 2 * frameradius, drawRect.bottom() - 2 * frameradius, 2 * frameradius, 2 * frameradius), -90, 90); -- drawRightBottomPath.lineTo(drawRect.right(), drawRect.bottom() - 28); -- -- //draw right bottom corner -- QColor startColor = option->palette.color(QPalette::Active, QPalette::Base).lighter(300); -- QColor endColor = mixColor(startColor, QColor(Qt::black), 0.25); -- QLinearGradient linearGradient; -- QPainter pixmapPainter2(&framePixmap); -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- linearGradient.setStart(drawRect.right(), drawRect.bottom() - 28); -- linearGradient.setFinalStop(drawRect.right(), drawRect.bottom()); -- pixmapPainter2.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter2.setPen(Qt::transparent); -- pixmapPainter2.setBrush(linearGradient); -- pixmapPainter2.drawPath(drawRightBottomPath); -- } else { -- int rander = 2; -- drawRect = option->rect.adjusted(+rander, +rander+6, -rander, -rander-6); -- -- // Draw a black floor -- QPainter pixmapPainter(&framePixmap); -- pixmapPainter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter.setPen(Qt::transparent); -- pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::BrightText)); -- pixmapPainter.drawRoundedRect(drawRect.adjusted(1, 1, -1, -1), frameradius, frameradius); -- pixmapPainter.end(); -- -- // Blur the black background -- QImage img = framePixmap.toImage(); -- qt_blurImage(img, 4, false, false); -- -- // Dig out the center part, Shadow rendering -- framePixmap = QPixmap::fromImage(img); -- QPainter pixmapPainter2(&framePixmap); -- pixmapPainter2.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter2.setCompositionMode(QPainter::CompositionMode_Clear); -- pixmapPainter2.setPen(Qt::transparent); -- pixmapPainter2.setBrush(Qt::transparent); -- pixmapPainter2.drawRoundedRect(drawRect.adjusted(1, 1, -1, -1), frameradius, frameradius); -- pixmapPainter2.end(); -- -- //That's when I started drawing the frame floor -- QColor color = option->palette.color(QPalette::Base); -- QColor startColor; -- QColor endColor; -- if (isDark) { -- endColor = option->palette.color(QPalette::Active, QPalette::Base).lighter(300); -- startColor = mixColor(endColor, QColor(Qt::white), 0.2); -- } else { -- startColor = option->palette.color(QPalette::Active, QPalette::Base).lighter(300); -- endColor = mixColor(startColor, QColor(Qt::black), 0.2); -- } -- -- if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -- auto opacity = UKUIStyleSettings::globalInstance()->get("menuTransparency").toInt()/100.0; -- color.setAlphaF(opacity); -- startColor.setAlphaF(opacity); -- endColor.setAlphaF(opacity); -- } -- if (qApp->property("blurEnable").isValid()) { -- bool blurEnable = qApp->property("blurEnable").toBool(); -- if (!blurEnable) { -- color.setAlphaF(1); -- startColor.setAlphaF(1); -- endColor.setAlphaF(1); -- } -- } -- if (widget) { -- if (widget->property("useSystemStyleBlur").isValid() && !widget->property("useSystemStyleBlur").toBool()) { -- color.setAlphaF(1); -- startColor.setAlphaF(1); -- endColor.setAlphaF(1); -- } -- } -- //if blur effect is not supported, do not use transparent color. -- if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind) || blackAppListWithBlurHelper().contains(qAppName())) { -- color.setAlphaF(1); -- startColor.setAlphaF(1); -- endColor.setAlphaF(1); -- } -- -- QRegion region; -- if (widget) { -- region = widget->mask(); -- } -- -- if (!region.isEmpty()) { -- QPainterPath path; -- path.addRegion(region); -- -- //draw blur background -- QPainter pixmapPainter3(&framePixmap); -- pixmapPainter3.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter3.setPen(Qt::transparent); -- pixmapPainter3.setBrush(color); -- pixmapPainter3.drawPath(path); -- } else { -- //path has 1px blank on right and bottom -- drawRect.adjust(0, 0, 1, 1); -- -- QPainterPath drawRectPath; -- drawRectPath.moveTo(drawRect.left(), drawRect.top() + frameradius); -- drawRectPath.arcTo(QRect(drawRect.left(), drawRect.top(), 2 * frameradius, 2 * frameradius), 180, -90); -- drawRectPath.lineTo(drawRect.right() - frameradius, drawRect.top()); -- drawRectPath.arcTo(QRect(drawRect.right() - 2 * frameradius, drawRect.top(), 2 * frameradius, 2 * frameradius), 90, -90); -- drawRectPath.lineTo(drawRect.right(), drawRect.bottom() - 28); -- drawRectPath.arcTo(QRect(drawRect.right() - 2 * 20, drawRect.bottom() - 2 * 28, 2 * 20, 2 * 28), 0, -90); -- drawRectPath.lineTo(drawRect.left() + frameradius, drawRect.bottom()); -- drawRectPath.arcTo(QRect(drawRect.left(), drawRect.bottom() - 2 * frameradius, 2 * frameradius, 2 * frameradius), -90, -90); -- drawRectPath.lineTo(drawRect.left(), drawRect.top() + frameradius); -- -- //draw blur background -- QPainter pixmapPainter3(&framePixmap); -- pixmapPainter3.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter3.setPen(Qt::transparent); -- pixmapPainter3.setBrush(color); -- pixmapPainter3.drawPath(drawRectPath); -- pixmapPainter3.end(); -- -- QPainterPath drawRightBottomPath; -- drawRightBottomPath.moveTo(drawRect.right(), drawRect.bottom() - 28); -- drawRightBottomPath.arcTo(QRect(drawRect.right() - 2 * 20, drawRect.bottom() - 2 * 28, 2 * 20, 2 * 28), 0, -90); -- drawRightBottomPath.lineTo(drawRect.right() - frameradius, drawRect.bottom()); -- drawRightBottomPath.arcTo(QRect(drawRect.right() - 2 * frameradius, drawRect.bottom() - 2 * frameradius, 2 * frameradius, 2 * frameradius), -90, 90); -- drawRightBottomPath.lineTo(drawRect.right(), drawRect.bottom() - 28); -- -- //draw right bottom corner -- QLinearGradient linearGradient; -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- linearGradient.setStart(drawRect.right(), drawRect.bottom() - 28); -- linearGradient.setFinalStop(drawRect.right(), drawRect.bottom()); -- QPainter pixmapPainter4(&framePixmap); -- pixmapPainter4.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter4.setPen(Qt::transparent); -- pixmapPainter4.setBrush(linearGradient); -- pixmapPainter4.drawPath(drawRightBottomPath); -- } -- } -- -- //item select brush -- itemSelectBrush = QBrush(option->palette.brush(QPalette::Active, QPalette::Highlight)); -- -- -- menuParameters.frameRadius = frameradius; -- menuParameters.itemRadius = itemradius; -- menuParameters.menuFramePixmap = framePixmap; -- menuParameters.menuItemSelectBrush = itemSelectBrush; --} -diff --git a/ukui-styles/qt5-style-ukui/kabstract-style-parameters.h b/ukui-styles/qt5-style-ukui/kabstract-style-parameters.h -deleted file mode 100644 -index 5c8a940..0000000 ---- a/ukui-styles/qt5-style-ukui/kabstract-style-parameters.h -+++ /dev/null -@@ -1,311 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <xibowen@kylinos.cn> -- * -- */ -- --#ifndef KABSTRACTSTYLEPARAMETERS_H --#define KABSTRACTSTYLEPARAMETERS_H -- --#include <QObject> --#include <QPalette> --#include <QStyleOption> -- --#include "pushbutton-parameters.h" --#include "toolbutton-parameters.h" --#include "lineedit-parameters.h" --#include "spinbox-parameters.h" --#include "combobox-parameters.h" --#include "list-parameters.h" --#include "tree-parameters.h" --#include "table-parameters.h" --#include "checkbox-parameters.h" --#include "radiobutton-parameters.h" --#include "slider-parameters.h" --#include "progressbar-parameters.h" --#include "scrollbar-parameters.h" --#include "tooltip-parameters.h" --#include "tabwidget-parameters.h" --#include "menu-parameters.h" -- -- -- --class KAbstractStyleParameters: public QObject --{ -- Q_OBJECT --public: -- KAbstractStyleParameters(QObject *parent, bool isDark); -- -- enum SpinBoxControlLayout { -- Horizontal, -- Vertical -- }; -- Q_ENUM(SpinBoxControlLayout) -- -- void updateParameters(bool isTabletMode); -- -- // radius -- int radius = 6; -- -- // common -- int SmallIcon_Size = 16; -- int IconButton_Distance = 8; -- -- // button -- int Button_MarginHeight = 0; -- int ToolButton_MarginWidth = 8; -- int Button_MarginWidth = 8; -- int Button_IconSize = 16; -- int Button_IndicatorSize = 16; -- int Button_DefaultIndicatorSize = 0; -- int Button_DefaultWidth = 96; -- int Button_DefaultHeight = 36; -- int Button_DefaultHeight_origin = 36; -- int ToolButton_DefaultWidth = 60; -- int IconButton_DefaultWidth = 36; -- int IconButton_DefaultWidth_origin = 36; -- QColor ColoseButtonColor; -- -- // menu -- int Menu_MarginHeight = 4 + 8; -- int Menu_Combobox_Popup_MarginHeight = 4; -- int Menu_MarginWidth = 4 + 2; -- int Menu_MarginPanelWidth = 0; -- -- // menu-item -- int MenuItem_MarginHeight = 2; -- int MenuItem_MarginWidth = 12 + 4; -- int MenuItemSeparator_MarginHeight = 4; -- int MenuItemSeparator_MarginHeight_origin = 4; -- int MenuItemSeparator_MarginWidth = 4; -- int MenuItem_DefaultHeight = 36; -- int MenuItem_DefaultHeight_origin = 36; -- int MenuItem_DefaultWidght = 152; -- -- // scrollbar -- int ScroolBar_Width = 16; -- int ScroolBar_Width_origin = 16; -- int ScroolBar_Height = 68; -- -- // progressbar -- int ProgressBar_DefaultLength = 388; -- int ProgressBar_DefaultThick = 16; -- -- // slider -- int Slider_DefaultLength = 94; -- int Slider_DefaultLength_origin = 94; -- int Slider_Length = 20; -- int Slider_Length_origin = 20; -- int Slider_GrooveLength = 4; -- int Slider_GrooveLength_origin = 4; -- int Slider_Margin = 2; -- -- // radiobutton -- int ExclusiveIndicator_Width = 16; -- int ExclusiveIndicator_Height = 16; -- int RadioButtonLabel_Spacing = 8; -- int RadioButton_DefaultHeight = 36; -- int RadioButton_DefaultHeight_origin = 36; -- -- // checkbox -- int Indicator_Width = 16; -- int Indicator_Height = 16; -- int CheckBox_DefaultHeight = 36; -- int CheckBox_DefaultHeight_origin = 36; -- int CheckBox_Radius = 4; -- -- // lineedit -- int LineEdit_DefaultWidth = 160; -- int LineEdit_DefaultWidth_origin = 160; -- int LineEdit_DefaultHeight = 36; -- int LineEdit_DefaultHeight_origin = 36; -- -- // combobox -- int ComboBox_DefaultWidth = 160; -- int ComboBox_DefaultHeight = 36; -- int ComboBox_DefaultHeight_origin = 36; -- int ComboBox_DefaultMenuItemHeight = 36; -- int ComboBox_DefaultMenuItemHeight_original = 36; -- int ComboBox_FrameWidth = 2; -- int ComboBox_VMargin = 1; -- -- // spinbox -- int SpinBox_DefaultWidth = 160; -- int SpinBox_DefaultHeight = 36; -- int SpinBox_DefaultHeight_origin = 36; -- int SpinBox_FrameWidth = 2; -- -- // tabbar -- int TabBar_DefaultMinWidth = 168; -- int TabBar_DefaultMaxWidth = 248; -- int TabBar_DefaultHeight = 40; -- int TabBar_DefaultHeight_origin = 40; -- int TabBar_ScrollButtonWidth = 16; -- int TabBar_ScrollButtonOverlap = 2; -- -- // tooltip -- int ToolTip_DefaultMargin = 8; -- int ToolTip_Height = 36; -- int ToolTip_Height_origin = 36; -- -- //viewitem FIX:Separate to list,tree and table after -- int ViewItem_DefaultHeight = 36; -- int ViewItem_DefaultHeight_origin = 36; -- -- //table -- int Table_HeaderHeight = 36; -- int Table_HeaderHeight_origin = 36; -- -- float m_scaleRatio4_3 = 1.0; -- float m_scaleRatio3_2 = 1.0; -- float m_scaleRatio2_1 = 1.0; -- -- int m_headerDefaultSectionSizeVertical = 36; -- int m_headerDefaultSectionSizeVertical1_1 = 36; -- int m_headerDefaultSectionSizeVertical4_3 = 48; -- bool m_isTableMode = false; -- bool m_isInitial = true; -- -- float m_scaleSliderDefaultLength = 1.0; -- float m_ScaleComboBoxDefaultLength = 1.0; -- float m_ScaleLineEditDefaultLength = 1.0; -- float m_scaleTabBarHeight6_5 = 1.0; -- -- -- QPalette defaultPalette; -- -- PushButtonParameters pushButtonParameters; -- ToolButtonParameters toolButtonParameters; -- LineEditParameters lineEditParameters; -- SpinBoxParameters spinBoxParameters; -- ComboBoxParameters comboBoxParameters; -- ListParameters listParameters; -- TreeParameters treeParameters; -- TableParameters tableParameters; -- CheckBoxParameters checkBoxParameters; -- RadioButtonParameters radioButtonParameters; -- SliderParameters sliderParameters; -- ProgressBarParameters progressBarParameters; -- ScrollBarParameters scrollBarParameters; -- ToolTipParameters toolTipParameters; -- TabWidgetParameters tabWidgetParameters; -- MenuParameters menuParameters; -- -- -- -- QPalette setPalette(QPalette &palette); -- int getSpinBoxControlLayout(); -- -- virtual void initPalette(bool isDark) = 0; -- virtual void initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) = 0; -- virtual void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- --private: -- int m_spinBoxControlLayout = SpinBoxControlLayout::Vertical; --}; -- -- --class KDefaultStyleParameters : public KAbstractStyleParameters --{ --public: -- KDefaultStyleParameters(QObject *parent, bool isDark); -- -- void initPalette(bool isDark) override; -- void initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) override; -- void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; --}; -- -- --class KClassicalStyleParameters : public KAbstractStyleParameters --{ --public: -- KClassicalStyleParameters(QObject *parent, bool isDark); -- -- void initPalette(bool isDark) override; -- void initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) override; -- void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; --}; -- -- --class KFashionStyleParameters : public KAbstractStyleParameters --{ --public: -- KFashionStyleParameters(QObject *parent, bool isDark); -- -- void initPalette(bool isDark) override; -- void initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) override; -- void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; --}; --#endif // KABSTRACTSTYLEPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp b/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp -index d63da35..e0bd4bf 100644 ---- a/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp -+++ b/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp -@@ -196,8 +196,8 @@ Qt5UKUIStyle::Qt5UKUIStyle(bool dark, bool useDefault, QString type) : QProxySty - } else { - qWarning("org.ukui.peripherals-mouse no doubleClick keys!"); - } -- settings->deleteLater(); -- settings = nullptr; -+// settings->deleteLater(); -+// settings = nullptr; - } else { - qWarning("org.ukui.peripherals-mouse is null!"); - } -@@ -261,7 +261,7 @@ Qt5UKUIStyle::Qt5UKUIStyle(bool dark, bool useDefault, QString type) : QProxySty - sp = new KClassicalStyleParameters(this, isUseDarkPalette()); - - qDebug() << "classical setproperty........" << sp->radiusProperty().maxRadius << sp->radiusProperty().normalRadius << sp->radiusProperty().minRadius; -- setProperty("maxRadius", sp->radiusProperty().maxRadius); -+ setProperty("windowRadius", sp->radiusProperty().maxRadius); - setProperty("normalRadius", sp->radiusProperty().normalRadius); - setProperty("minRadius", sp->radiusProperty().minRadius); - } -@@ -627,6 +627,15 @@ bool Qt5UKUIStyle::eventFilter(QObject *obj, QEvent *e) - - } - -+ if (qobject_cast<QMenu *>(obj)) { -+ if (e->type() == QEvent::Show) { -+ if (QMenu *w = qobject_cast<QMenu *>(obj)) { -+ if (!KWindowSystem::compositingActive()) { -+ w->setProperty("useSystemStyleBlur", false); -+ } -+ } -+ } -+ } - return false; - } - -@@ -5333,15 +5342,17 @@ void Qt5UKUIStyle::drawControl(QStyle::ControlElement element, const QStyleOptio - bool hasIcon = false; - if(isComboBox) - { -- auto *comboBox = qobject_cast<const QComboBox*>(widget); -- int column = comboBox->count(); -- for(int i = 0; i < column; i++) -- { -- if(!comboBox->itemIcon(i).isNull()){ -- hasIcon = true; -- break; -- } -- } -+ if(!menuItem->icon.isNull()) -+ hasIcon = true; -+// auto *comboBox = qobject_cast<const QComboBox*>(widget); -+// int column = comboBox->count(); -+// for(int i = 0; i < column; i++) -+// { -+// if(!comboBox->itemIcon(i).isNull()){ -+// hasIcon = true; -+// break; -+// } -+// } - } - else if(menuItem->maxIconWidth != 0) - hasIcon = true; -@@ -7086,15 +7097,17 @@ QSize Qt5UKUIStyle::sizeFromContents(ContentsType ct, const QStyleOption *option - bool hasIcon = false; - if(isComboBox) - { -- auto *comboBox = qobject_cast<const QComboBox*>(widget); -- int column = comboBox->count(); -- for(int i = 0; i < column; i++) -- { -- if(!comboBox->itemIcon(i).isNull()){ -- hasIcon = true; -- break; -- } -- } -+ if(!menuItem->icon.isNull()) -+ hasIcon = true; -+// auto *comboBox = qobject_cast<const QComboBox*>(widget); -+// int column = comboBox->count(); -+// for(int i = 0; i < column; i++) -+// { -+// if(!comboBox->itemIcon(i).isNull()){ -+// hasIcon = true; -+// break; -+// } -+// } - } - else if(menuItem->maxIconWidth != 0) - { -diff --git a/ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json b/ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json -index 45be0db..3164a16 100644 ---- a/ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json -+++ b/ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json -@@ -1,6 +1,6 @@ - { - "Radius":{ -- "Max_Radius" : {"value": "0", "type": "int"}, -+ "Window_Radius" : {"value": "0", "type": "int"}, - "Normal_Radius" : {"value": "0", "type": "int"}, - "Min_Radius" : {"value": "0", "type": "int"} - } -diff --git a/ukui-styles/qt5-style-ukui/ukui-style-parameters.h b/ukui-styles/qt5-style-ukui/ukui-style-parameters.h -index 6b838fe..4809481 100644 ---- a/ukui-styles/qt5-style-ukui/ukui-style-parameters.h -+++ b/ukui-styles/qt5-style-ukui/ukui-style-parameters.h -@@ -189,7 +189,7 @@ public: - bool TabBar_BorderLine = false; - - // tooltip -- int ToolTip_DefaultMargin = 8; -+ int ToolTip_DefaultMargin = 10; - int ToolTip_Height = 36; - int ToolTip_Height_origin = 36; - -diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp -index 607b7fd..2c51920 100644 ---- a/ukui-styles/readconfig.cpp -+++ b/ukui-styles/readconfig.cpp -@@ -1128,7 +1128,7 @@ UKUIRadiusInformation::UKUIRadiusStruct ReadThemeConfig::getRadiusStruct(QString - if(!m_loadConfig) - return m_radiusStruct; - -- getRadius(Max_Radius, m_radiusStruct.maxRadius); -+ getRadius(Window_Radius, m_radiusStruct.maxRadius); - getRadius(Normal_Radius, m_radiusStruct.normalRadius); - getRadius(Min_Radius, m_radiusStruct.minRadius); - return m_radiusStruct; -diff --git a/ukui-styles/themeinformation.h b/ukui-styles/themeinformation.h -index 5cbe95d..8af8bc8 100644 ---- a/ukui-styles/themeinformation.h -+++ b/ukui-styles/themeinformation.h -@@ -43,7 +43,7 @@ - #define Obj_PaletteRole_Type "paletterole" - - #define UKUI_Radius "Radius" --#define Max_Radius "Max_Radius" -+#define Window_Radius "Window_Radius" - #define Normal_Radius "Normal_Radius" - #define Min_Radius "Min_Radius" - -diff --git a/ukui-styles/ukui-style-plugin.cpp b/ukui-styles/ukui-style-plugin.cpp -index 9cefa7e..e411b3e 100644 ---- a/ukui-styles/ukui-style-plugin.cpp -+++ b/ukui-styles/ukui-style-plugin.cpp -@@ -65,11 +65,24 @@ UKUIStylePlugin::UKUIStylePlugin(QObject *parent) : - if(qAppName() != blackStyleChangeApp) { - if (widgetThemeName == "classical") { - styleName ="ukui-config"; -- qApp->setStyle(new UKUIConfigStyle(styleName)); - } else { - styleName = "ukui-config"; -- qApp->setStyle(new UKUIConfigStyle(styleName)); - } -+ qApp->setStyle(new UKUIConfigStyle(styleName)); -+ -+// if(key == "widgetThemeName" || key == "widget-theme-name"){ -+// qDebug() << "qApp style....." << qApp->style(); -+// auto configStyle = qobject_cast<UKUIConfigStyle *>(qApp->style()); -+// if(configStyle){ -+// int max, normal, min; -+// max = configStyle->property("windowRadius").isValid() ? configStyle->property("windowRadius").toInt() : settings->get("windowRadius").toInt(); -+// normal = configStyle->property("normalRadius").isValid() ? configStyle->property("normalRadius").toInt() : settings->get("normalRadius").toInt(); -+// min = configStyle->property("minRadius").isValid() ? configStyle->property("minRadius").toInt() : settings->get("minRadius").toInt(); -+// settings->trySet("max-radius", max); -+// settings->trySet("normal-radius", normal); -+// settings->trySet("min-radius", min); -+// } -+// } - } - - return; -@@ -95,6 +108,31 @@ UKUIStylePlugin::UKUIStylePlugin(QObject *parent) : - if (key == "useSystemPalette") { - onSystemPaletteChanged(); - } -+ -+ /* -+ if(key == "window-radius" || key == "windowRadius"){ -+ auto radius = settings->get("windowRadius").toInt(); -+ foreach (QWidget *widget, qApp->allWidgets()) { -+ widget->setProperty("windowRadius", radius); -+ widget->repaint(); -+ } -+ } -+ if(key == "normal-radius" || key == "normalRadius"){ -+ auto radius = settings->get("normalRadius").toInt(); -+ //qDebug() << "normalRadius.........." << radius; -+ foreach (QWidget *widget, qApp->allWidgets()) { -+ widget->setProperty("normalRadius", radius); -+ widget->repaint(); -+ } -+ } -+ if(key == "min-radius" || key == "minRadius"){ -+ auto radius = settings->get("minRadius").toInt(); -+ foreach (QWidget *widget, qApp->allWidgets()) { -+ widget->setProperty("minRadius", radius); -+ widget->repaint(); -+ } -+ } -+ */ - }); - } - -diff --git a/ukui-styles/window-manager.cpp b/ukui-styles/window-manager.cpp -index e3efd8e..44903ee 100644 ---- a/ukui-styles/window-manager.cpp -+++ b/ukui-styles/window-manager.cpp -@@ -34,6 +34,7 @@ - #include <QWindow> - - #include <QDebug> -+#include "black-list.h" - - WindowManager::WindowManager(QObject *parent) : QObject(parent) - { -@@ -122,6 +123,10 @@ bool WindowManager::eventFilter(QObject *obj, QEvent *e) - } - case QEvent::MouseMove: { - //if (QWidget::mouseGrabber()) return false; -+ //fixbug#182587 -+ if(windowManageBlackList().contains(qApp->applicationName()) || windowManageBlackList().contains(qAppName())){ -+ return false; -+ } - QMouseEvent *event = static_cast<QMouseEvent*>(e); - - /*! \note In x11, accuracy of the MouseEvent translated from TouchEvent is not diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0009-Add-a-changelog-2023.11.1-4.1.0.0-0k10.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0009-Add-a-changelog-2023.11.1-4.1.0.0-0k10.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0009-Add-a-changelog-2023.11.1-4.1.0.0-0k10.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0009-Add-a-changelog-2023.11.1-4.1.0.0-0k10.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,7147 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Wed, 1 Nov 2023 16:17:43 +0800 -Subject: Add a changelog 2023.11.1 4.1.0.0-0k10 - ---- - libqt5-ukui-style/settings/black-list.h | 2 + - .../translations/qt5-ukui-platformtheme_bo_CN.ts | 226 +++++++++--- - .../translations/qt5-ukui-platformtheme_cs.ts | 225 +++++++++--- - .../translations/qt5-ukui-platformtheme_de.ts | 386 +++++++++++++++++++++ - .../translations/qt5-ukui-platformtheme_en_US.ts | 235 ++++++++++--- - .../translations/qt5-ukui-platformtheme_es.ts | 386 +++++++++++++++++++++ - .../translations/qt5-ukui-platformtheme_fa.ts | 225 +++++++++--- - .../translations/qt5-ukui-platformtheme_fr.ts | 315 ++++++++++++----- - .../translations/qt5-ukui-platformtheme_kk.ts | 315 ++++++++++++----- - .../translations/qt5-ukui-platformtheme_ky.ts | 315 ++++++++++++----- - .../translations/qt5-ukui-platformtheme_mn.ts | 378 +++++++++++++------- - .../translations/qt5-ukui-platformtheme_tr.ts | 225 +++++++++--- - .../translations/qt5-ukui-platformtheme_ug.ts | 315 ++++++++++++----- - .../translations/qt5-ukui-platformtheme_zh_CN.ts | 376 +++++++++++++------- - .../translations/qt5-ukui-platformtheme_zh_HK.ts | 376 +++++++++++++------- - .../translations/qt5-ukui-platformtheme_zh_Hans.ts | 258 ++++++++++++++ - .../translations/qt5-ukui-platformtheme_zh_Hant.ts | 386 +++++++++++++++++++++ - .../widget/filedialog/kyfiledialog.cpp | 9 +- - 18 files changed, 3931 insertions(+), 1022 deletions(-) - create mode 100644 qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_de.ts - create mode 100644 qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_es.ts - create mode 100644 qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hans.ts - create mode 100644 qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hant.ts - -diff --git a/libqt5-ukui-style/settings/black-list.h b/libqt5-ukui-style/settings/black-list.h -index e3166b1..bf69d0e 100644 ---- a/libqt5-ukui-style/settings/black-list.h -+++ b/libqt5-ukui-style/settings/black-list.h -@@ -102,6 +102,8 @@ static const QStringList focusStateActiveList() { - QStringList l; - l<<"ukui-menu"; - l<<"platformthemeDemo"; -+ l<<"ukui-greeter"; -+ l<<"ukui-screensaver"; - - return l; - } -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_bo_CN.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_bo_CN.ts -index ba87e19..e612f92 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_bo_CN.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_bo_CN.ts -@@ -1,11 +1,131 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="bo_CN"> -- -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> - <context> - <name>MessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="96"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> - <translation>ཁ་རྒྱག་པ།</translation> - </message> -@@ -26,8 +146,8 @@ - <context> - <name>QDialogButtonBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="361"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1089"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> - <translation>འགྲིགས།</translation> - </message> -@@ -35,15 +155,15 @@ - <context> - <name>QMessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="417"/> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> - <translation>ཞིབ་ཕྲའི་གནས་ཚུལ་གསལ་བཤད་བྱ་དགོས།</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> - <translation>གནས་ཚུལ་ཞིབ་ཕྲ་སྦས་སྐུང་བྱེད་</translation> - </message> -@@ -51,57 +171,57 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> - <translation>ཡིག་ཆའི་མིང་།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> - <translation>བཟོ་བཅོས་བརྒྱབ་པའི་དུས་ཚོད།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> - <translation>ཡིག་ཆའི་རིགས་གྲས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> - <translation>ཡིག་ཆའི་ཆེ་ཆུང་།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> - <translation>ཐོག་མའི་འགྲོ་ལམ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> - <translation>མར་འབབ་པ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> - <translation>རིམ་པ་ཇེ་མང་དུ་འགྲོ་བཞིན།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> - <translation>ཁྱོན་ཡོངས་ཀྱི་གོ་རིམ་བེད་སྤྱོད།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> - <translation>མཐོང་རིས་རེའུ་མིག</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> - <translation>མཚོན་རྟགས་ལྟ་ཚུལ།</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="729"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> - <translation>ཁ་རྒྱག་པ།</translation> - </message> -@@ -109,11 +229,13 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation>ཁ་ཆད་བཞག་པའི་སྒྲོན་བརྙན</translation> - </message> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation>སྒྲོན་བརྙན་གྱི་འགུལ་རིས་ལ་བརྟེན་ནས་ཤོག་བྱང་ཆུང་ཆུང་བརྗེ་རེས་བྱེད་དུ་འཇུག་དགོས།</translation> -@@ -122,17 +244,17 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> - <translation>ཁ་ཕྱེ་བའི་ཡིག་ཆ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> - <translation>ཡིག་ཆ་ཉར་ཚགས་བྱེད་པ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> - <translation>ཡིག་ཆ་ཡོད་ཚད་(*)</translation> - </message> -@@ -140,123 +262,123 @@ - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> - <translation>ཕྱིར་ལོག</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> - <translation>མདུན་སྐྱོད།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> - <translation>གོང་ཕྱོགས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> - <translation>འཚོལ་ཞིབ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> - <translation>མཐོང་རིས་ཀྱི་རིགས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> - <translation>གོ་རིམ་གྱི་རིགས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> - <translation>ཆེས་ཆེ་བསྒྱུར།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> - <translation>ཁ་རྒྱག་པ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> - <translation>སླར་གསོ་བྱེད་པ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> - <translation>ཡིག་ཆའི་མིང་།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> - <translation>སྒོ་ཕྱེ་བ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> - <translation>ཕྱིར་འཐེན།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> - <translation>ཉར་ཚགས་གཞན།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> - <translation>ཡིག་ཁུག་གསར་འཛུགས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> - <translation>གྲོན་ཆུང་བྱེད་དགོས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> - <translation>དཀར་ཆག</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> - <translation>ཐ་ཚིག་སྒྲོག་པ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> - <translation>གནས་ཡོད་པས། ཁྱོད་ཀྱིས་དངོས་གནས་ཚབ་བྱེད་ཐུབ་བམ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> - <translation>དཀར་ཆག་གསར་བ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> - <translation>ཁ་ཕྱིར་འཐེན་བྱ་དགོས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> - <translation>ཡང་བསྐྱར་ལས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> - <translation>ཉེན་བརྡ་བཏང་བ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> - <translation>བཀོལ་སྤྱོད་འདི་ལ་རྒྱབ་སྐྱོར་མི་བྱེད།</translation> - </message> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_cs.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_cs.ts -index 1bd4be0..4dead9a 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_cs.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_cs.ts -@@ -1,10 +1,131 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="cs_CZ"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> - <context> - <name>MessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="96"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> - <translation type="unfinished"></translation> - </message> -@@ -25,8 +146,8 @@ - <context> - <name>QDialogButtonBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="361"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1089"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> - <translation type="unfinished"></translation> - </message> -@@ -34,15 +155,15 @@ - <context> - <name>QMessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="417"/> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> - <translation type="unfinished"></translation> - </message> -@@ -50,57 +171,57 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="729"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> - <translation type="unfinished"></translation> - </message> -@@ -108,11 +229,13 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation type="unfinished"></translation> - </message> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> -@@ -121,17 +244,17 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> - <translation type="unfinished"></translation> - </message> -@@ -139,123 +262,123 @@ - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> - <translation type="unfinished"></translation> - </message> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_de.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_de.ts -new file mode 100644 -index 0000000..2f059f1 ---- /dev/null -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_de.ts -@@ -0,0 +1,386 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="de"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation>Schließen</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>Die ausführbare Datei '%1' erfordert Qt %2, Qt %3 gefunden.</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>Fehler in der inkompatiblen Qt-Bibliothek</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation>OKAY</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation>Details anzeigen...</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation>Details ausblenden...</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>Dateiname</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>Änderungsdatum</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>Dateityp</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>Dateigröße</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>Ursprünglicher Pfad</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>Absteigend</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>Aufsteigend</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>Globale Sortierung verwenden</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>Listenansicht</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>Icon-Ansicht</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation>Schließen</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>Standard-Folie</translation> -+ </message> -+ <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>Lassen Sie das Tab-Widget mit einer Folienanimation wechseln.</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> -+ <source>Open File</source> -+ <translation>Offene Linie</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> -+ <source>Save File</source> -+ <translation>Datei speichern</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> -+ <source>All Files (*)</source> -+ <translation>Alle Dateien (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>Zurück</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>Vorwärts gehen</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>Cd nach oben</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>Suchen</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>Typ der Ansicht</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>Art der Sortierung</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>Maximieren</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>Schließen</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>Wiederherstellen</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>Name</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>Offen</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>Abbrechen</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>Speichern unter</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>Neuer Ordner</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>Retten</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>Verzeichnisse</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>Warnung</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>existieren, sind Sie sicher, ersetzen?</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> -+ <source>NewFolder</source> -+ <translation>Neuer Ordner</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> -+ <source>Undo</source> -+ <translation>Aufmachen</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> -+ <source>Redo</source> -+ <translation>Noch einmal machen</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>warn</source> -+ <translation>warnen</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>This operation is not supported.</source> -+ <translation>Dieser Vorgang wird nicht unterstützt.</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_en_US.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_en_US.ts -index de9bc48..e31ff34 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_en_US.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_en_US.ts -@@ -1,10 +1,131 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="en_US"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> - <context> - <name>MessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="96"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> - <translation>Close</translation> - </message> -@@ -14,93 +135,93 @@ - <message> - <location filename="../widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="unfinished"></translation> -+ <translation>Executable '%1' requires Qt %2, found Qt %3.</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> -- <translation type="unfinished"></translation> -+ <translation>Incompatible Qt Library Error</translation> - </message> - </context> - <context> - <name>QDialogButtonBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="361"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1089"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> -- <translation type="unfinished"></translation> -+ <translation>OK</translation> - </message> - </context> - <context> - <name>QMessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="417"/> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> -- <translation type="unfinished"></translation> -+ <translation>Show Details...</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> -- <translation type="unfinished"></translation> -+ <translation>Hide Details...</translation> - </message> - </context> - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> - <translation>File Name</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> - <translation>Modified Date</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> - <translation>File Type</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> - <translation>File Size</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> - <translation>Original Path</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> - <translation>Descending</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> - <translation>Ascending</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> - <translation>Use global sorting</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> - <translation>List View</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> - <translation>Icon View</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="729"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> - <translation>Close</translation> - </message> -@@ -108,11 +229,13 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation type="unfinished"></translation> - </message> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> -@@ -121,17 +244,17 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> - <translation>Open File</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> - <translation>Save File</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> - <translation>All Files (*)</translation> - </message> -@@ -139,123 +262,123 @@ - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> - <translation>Go Back</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> - <translation>Go Forward</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> - <translation>Cd Up</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> - <translation>Search</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> - <translation>View Type</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> - <translation>Sort Type</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> - <translation>Maximize</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> - <translation>Close</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> - <translation>Restore</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> - <translation>Name</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> - <translation>Open</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> - <translation>Cancel</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> - <translation>Save as</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> - <translation>New Folder</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> - <translation>Save</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> - <translation>Directories</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> - <translation>Warning</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> - <translation>exist, are you sure replace?</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> - <translation>NewFolder</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> - <translation>Undo</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> - <translation>Redo</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> - <translation>warn</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> - <translation>This operation is not supported.</translation> - </message> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_es.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_es.ts -new file mode 100644 -index 0000000..ed31441 ---- /dev/null -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_es.ts -@@ -0,0 +1,386 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="es"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> -+ <source>Open File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> -+ <source>Save File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> -+ <source>NewFolder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> -+ <source>Undo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> -+ <source>Redo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>warn</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fa.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fa.ts -index 6217887..e225ee6 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fa.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fa.ts -@@ -1,10 +1,131 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="fa_IR"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> - <context> - <name>MessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="96"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> - <translation type="unfinished"></translation> - </message> -@@ -25,8 +146,8 @@ - <context> - <name>QDialogButtonBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="361"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1089"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> - <translation type="unfinished"></translation> - </message> -@@ -34,15 +155,15 @@ - <context> - <name>QMessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="417"/> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> - <translation type="unfinished"></translation> - </message> -@@ -50,57 +171,57 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="729"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> - <translation type="unfinished"></translation> - </message> -@@ -108,11 +229,13 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation type="unfinished"></translation> - </message> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> -@@ -121,17 +244,17 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> - <translation type="unfinished"></translation> - </message> -@@ -139,123 +262,123 @@ - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> - <translation type="unfinished"></translation> - </message> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fr.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fr.ts -index e486266..faf3d4a 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fr.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fr.ts -@@ -1,12 +1,133 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="fr_FR"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> - <context> - <name>MessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="96"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>Fermer</translation> - </message> - </context> - <context> -@@ -14,250 +135,252 @@ - <message> - <location filename="../widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="unfinished"></translation> -+ <translation>L’exécutable '%1' nécessite Qt %2, trouvé Qt %3.</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> -- <translation type="unfinished"></translation> -+ <translation>Erreur de bibliothèque Qt incompatible</translation> - </message> - </context> - <context> - <name>QDialogButtonBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="361"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1089"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> -- <translation type="unfinished"></translation> -+ <translation>D’ACCORD</translation> - </message> - </context> - <context> - <name>QMessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="417"/> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> -- <translation type="unfinished"></translation> -+ <translation>Afficher les détails...</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> -- <translation type="unfinished"></translation> -+ <translation>Masquer les détails...</translation> - </message> - </context> - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation type="unfinished"></translation> -+ <translation>Nom du fichier</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation type="unfinished"></translation> -+ <translation>Date de modification</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation type="unfinished"></translation> -+ <translation>Type de fichier</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation type="unfinished"></translation> -+ <translation>Taille du fichier</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation type="unfinished"></translation> -+ <translation>Chemin d’accès d’origine</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation type="unfinished"></translation> -+ <translation>Descendant</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation type="unfinished"></translation> -+ <translation>Ascendant</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation type="unfinished"></translation> -+ <translation>Utiliser le tri global</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation type="unfinished"></translation> -+ <translation>Affichage en liste</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation type="unfinished"></translation> -+ <translation>Affichage de l’icône</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="729"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">Fermer</translation> - </message> - </context> - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation type="unfinished"></translation> -+ <translation>Diapositive par défaut</translation> - </message> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -+ <translation>Laissez le widget d’onglet basculer avec une animation de diapositive.</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> -- <translation type="unfinished"></translation> -+ <translation>Ouvrir un fichier</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> -- <translation type="unfinished"></translation> -+ <translation>Enregistrer le fichier</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> -- <translation type="unfinished"></translation> -+ <translation>Tous les fichiers (*)</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation type="unfinished"></translation> -+ <translation>Retour</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation type="unfinished"></translation> -+ <translation>Avancer</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation type="unfinished"></translation> -+ <translation>Cd Up</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation type="unfinished"></translation> -+ <translation>Rechercher</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation type="unfinished"></translation> -+ <translation>Type de vue</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation type="unfinished"></translation> -+ <translation>Type de tri</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation type="unfinished"></translation> -+ <translation>Maximiser</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>Fermer</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation type="unfinished"></translation> -+ <translation>Restaurer</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation type="unfinished"></translation> -+ <translation>Nom</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation type="unfinished"></translation> -+ <translation>Ouvrir</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation type="unfinished"></translation> -+ <translation>Annuler</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation type="unfinished"></translation> -+ <translation>Enregistrer sous</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation type="unfinished"></translation> -+ <translation>Nouveau dossier</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation type="unfinished"></translation> -+ <translation>Sauvegarder</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation type="unfinished"></translation> -+ <translation>Téléphonique</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation type="unfinished"></translation> -+ <translation>Avertissement</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -+ <translation>exister, êtes-vous sûr de remplacer ?</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> -- <translation type="unfinished"></translation> -+ <translation>NouveauDossier</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> -- <translation type="unfinished"></translation> -+ <translation>Défaire</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> -- <translation type="unfinished"></translation> -+ <translation>Refaire</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> -- <translation type="unfinished"></translation> -+ <translation>avertir</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -+ <translation>Cette opération n’est pas prise en charge.</translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts -index 55e8697..19ff081 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts -@@ -1,12 +1,133 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="kk_KZ"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> - <context> - <name>MessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="96"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>Жабу</translation> - </message> - </context> - <context> -@@ -14,250 +135,252 @@ - <message> - <location filename="../widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="unfinished"></translation> -+ <translation>Орындалатын '% 1' Qt% 2 дегенді қажет етеді, табылған Qt% 3.</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> -- <translation type="unfinished"></translation> -+ <translation>Үйлеспейтін Qt кітапхана қатесі</translation> - </message> - </context> - <context> - <name>QDialogButtonBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="361"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1089"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> -- <translation type="unfinished"></translation> -+ <translation>ЖАҚСЫ</translation> - </message> - </context> - <context> - <name>QMessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="417"/> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> -- <translation type="unfinished"></translation> -+ <translation>Егжей-тегжейін көрсету...</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> -- <translation type="unfinished"></translation> -+ <translation>Мәліметтерді жасыру...</translation> - </message> - </context> - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation type="unfinished"></translation> -+ <translation>Файл атауы</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation type="unfinished"></translation> -+ <translation>Өзгертілген күн</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation type="unfinished"></translation> -+ <translation>Файл түрі</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation type="unfinished"></translation> -+ <translation>Файл өлшемі</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation type="unfinished"></translation> -+ <translation>Бастапқы жол</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation type="unfinished"></translation> -+ <translation>Кему</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation type="unfinished"></translation> -+ <translation>Көтерілу</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation type="unfinished"></translation> -+ <translation>Ғаламдық сұрыптауды пайдалану</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation type="unfinished"></translation> -+ <translation>Тізім көрінісі</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation type="unfinished"></translation> -+ <translation>Белгіше көрінісі</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="729"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">Жабу</translation> - </message> - </context> - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation type="unfinished"></translation> -+ <translation>Әдетті слайд</translation> - </message> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -+ <translation>Слайд анимациясы бар tab widget ауыстырып қосқышына рұқсат етіңіз.</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> -- <translation type="unfinished"></translation> -+ <translation>Файлды ашу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> -- <translation type="unfinished"></translation> -+ <translation>Файлды сақтау</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> -- <translation type="unfinished"></translation> -+ <translation>Барлық файлдар (*)</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation type="unfinished"></translation> -+ <translation>Қайтып бар</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation type="unfinished"></translation> -+ <translation>Алға жылжу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation type="unfinished"></translation> -+ <translation>Cd Up</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation type="unfinished"></translation> -+ <translation>Іздеу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation type="unfinished"></translation> -+ <translation>Көрініс түрі</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation type="unfinished"></translation> -+ <translation>Сұрыптау түрі</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation type="unfinished"></translation> -+ <translation>Барынша көбейту</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>Жабу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation type="unfinished"></translation> -+ <translation>Қалпына келтіру</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation type="unfinished"></translation> -+ <translation>Атауы</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation type="unfinished"></translation> -+ <translation>Ашу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation type="unfinished"></translation> -+ <translation>Болдырмау</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation type="unfinished"></translation> -+ <translation>Басқаша сақтау</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation type="unfinished"></translation> -+ <translation>Жаңа қапшық</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation type="unfinished"></translation> -+ <translation>Сақтау</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation type="unfinished"></translation> -+ <translation>Каталогтар</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation type="unfinished"></translation> -+ <translation>Ескерту</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -+ <translation>бар, сіз алмастырасыз ба?</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> -- <translation type="unfinished"></translation> -+ <translation>NewFolder</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> -- <translation type="unfinished"></translation> -+ <translation>Болдырмау</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> -- <translation type="unfinished"></translation> -+ <translation>Редо</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> -- <translation type="unfinished"></translation> -+ <translation>Ескерту</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -+ <translation>Бұл операцияға қолдау көрсетілмеген.</translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts -index da6b5ec..eb92b8c 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts -@@ -1,12 +1,133 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="ky_KG"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> - <context> - <name>MessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="96"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>Жабуу</translation> - </message> - </context> - <context> -@@ -14,250 +135,252 @@ - <message> - <location filename="../widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="unfinished"></translation> -+ <translation>Аткарыла турган '%1' Qt %2 талап кылынат, Qt %3 табылган.</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> -- <translation type="unfinished"></translation> -+ <translation>Qt китепканасынын шайкеш келбеген катасы</translation> - </message> - </context> - <context> - <name>QDialogButtonBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="361"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1089"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> -- <translation type="unfinished"></translation> -+ <translation>МАКУЛ</translation> - </message> - </context> - <context> - <name>QMessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="417"/> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> -- <translation type="unfinished"></translation> -+ <translation>Егжей-тегжейин</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> -- <translation type="unfinished"></translation> -+ <translation>Маалымат жашыруу...</translation> - </message> - </context> - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation type="unfinished"></translation> -+ <translation>Файлдын аты</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation type="unfinished"></translation> -+ <translation>Өзгөртүлгөн дата</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation type="unfinished"></translation> -+ <translation>Файл түрү</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation type="unfinished"></translation> -+ <translation>Файл өлчөмү</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation type="unfinished"></translation> -+ <translation>Оригиналдуу жол</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation type="unfinished"></translation> -+ <translation>Түшүп</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation type="unfinished"></translation> -+ <translation>Көтөрүлүш</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation type="unfinished"></translation> -+ <translation>Глобалдык сорттоону колдонуу</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation type="unfinished"></translation> -+ <translation>Тизменин көрүнүшү</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation type="unfinished"></translation> -+ <translation>Икона көрүнүшү</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="729"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">Жабуу</translation> - </message> - </context> - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation type="unfinished"></translation> -+ <translation>Дефолт слайды</translation> - </message> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -+ <translation>Таблица виджет слайд анимациясы менен которуп берсин.</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> -- <translation type="unfinished"></translation> -+ <translation>Файлды ачуу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> -- <translation type="unfinished"></translation> -+ <translation>Файлды сактоо</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> -- <translation></translation> -+ <translation>Бардык файлдар (*)</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation type="unfinished"></translation> -+ <translation>Артка кайрыл</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation type="unfinished"></translation> -+ <translation>Алга илгерилетүү</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation type="unfinished"></translation> -+ <translation>Cd Up</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation type="unfinished"></translation> -+ <translation>Издөө</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation type="unfinished"></translation> -+ <translation>Көрүү түрү</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation type="unfinished"></translation> -+ <translation>Түрүн сорттоо</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation type="unfinished"></translation> -+ <translation>Максималдуу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>Жабуу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation type="unfinished"></translation> -+ <translation>Калыбына келтирүү</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation type="unfinished"></translation> -+ <translation>Аты-жөнү</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation type="unfinished"></translation> -+ <translation>Ачуу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation type="unfinished"></translation> -+ <translation>Жокко чыгаруу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation type="unfinished"></translation> -+ <translation>Үнөмдөө</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation type="unfinished"></translation> -+ <translation>Жаңы папка</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation type="unfinished"></translation> -+ <translation>Сактоо</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation type="unfinished"></translation> -+ <translation>Каталогдор</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation type="unfinished"></translation> -+ <translation>Эскертүү</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -+ <translation>бар, сиз сөзсүз алмаштырып жатасызбы?</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> -- <translation type="unfinished"></translation> -+ <translation>Жаңы папкалар</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> -- <translation type="unfinished"></translation> -+ <translation>Ундо</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> -- <translation type="unfinished"></translation> -+ <translation>Редо</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> -- <translation type="unfinished"></translation> -+ <translation>эскертүү</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -+ <translation>Бул операция колдолбойт.</translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_mn.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_mn.ts -index 354e088..46cb344 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_mn.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_mn.ts -@@ -2,151 +2,130 @@ - <!DOCTYPE TS> - <TS version="2.1" language="mn_MN"> - <context> -- <name>KyFileDialogHelper</name> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2524"/> -- <source>Open File</source> -- <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2525"/> -- <source>Save File</source> -- <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2538"/> -- <source>All Files (*)</source> -- <translation>ᠪᠦᠬᠦᠢᠯᠡ (*)</translation> -- </message> --</context> --<context> -- <name>KyNativeFileDialog</name> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="192"/> -- <source>Go Back</source> -- <translation>ᠤᠬᠤᠷᠢᠬᠤ</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="199"/> -- <source>Go Forward</source> -- <translation>ᠤᠷᠤᠭᠰᠢᠯᠠᠬᠤ</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="205"/> -- <source>Cd Up</source> -- <translation>ᠳᠡᠭᠡᠭᠰᠢ</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="212"/> -- <source>Search</source> -- <translation>ᠬᠠᠢᠯᠳᠠ</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="220"/> -- <source>View Type</source> -- <translation>ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="231"/> -- <source>Sort Type</source> -- <translation>ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="348"/> -- <source>Maximize</source> -- <translation>ᠬᠠᠮᠤᠭ ᠤ᠋ᠨ ᠶᠡᠬᠡᠴᠢᠯᠡᠯ</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="250"/> -- <source>Close</source> -- <translation>ᠬᠠᠭᠠᠬᠤ</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="345"/> -- <source>Restore</source> -- <translation>ᠡᠬᠡᠬᠦᠯᠬᠦ</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="941"/> -- <source>Name</source> -- <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡ</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="944"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1532"/> -- <source>Open</source> -- <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="945"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="954"/> -- <source>Cancel</source> -- <translation>ᠦᠬᠡᠢᠰᠭᠡᠬᠦ᠌</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="949"/> -- <source>Save as</source> -- <translation>ᠦᠭᠡᠷᠡ ᠭᠠᠵᠠᠷ ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <source>New Folder</source> -- <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="953"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1536"/> -- <source>Save</source> -- <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="989"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="992"/> -- <source>Directories</source> -- <translation>ᠭᠠᠷᠴᠠᠭ</translation> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -- <source>Warning</source> -- <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠦᠯ</translation> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -- <source>exist, are you sure replace?</source> -- <translation>ᠪᠠᠢᠨᠠ᠂ ᠰᠤᠯᠢᠬᠤ ᠤᠤ?</translation> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1858"/> -- <source>NewFolder</source> -- <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2146"/> -- <source>Undo</source> -- <translation>ᠬᠦᠴᠦᠨ ᠦᠬᠡᠢ ᠪᠤᠯᠭᠠᠬᠤ</translation> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2153"/> -- <source>Redo</source> -- <translation>ᠳᠠᠬᠢᠵᠤ ᠬᠢᠬᠦ</translation> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -- <source>warn</source> -- <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠬᠦ</translation> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -- <source>This operation is not supported.</source> -- <translation>ᠳᠤᠰ ᠠᠵᠢᠯᠯᠠᠬᠤᠢ ᠵᠢ ᠳᠡᠮᠵᠢᠬᠦ ᠦᠬᠡᠢ.</translation> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> - </message> - </context> - <context> - <name>MessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="166"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> - <translation>ᠬᠠᠭᠠᠬᠤ</translation> - </message> -@@ -154,12 +133,12 @@ - <context> - <name>QApplication</name> - <message> -- <location filename="../widget/messagebox/message-box.h" line="190"/> -+ <location filename="../widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> - <translation>ᠭᠦᠢᠴᠡᠳᠬᠡᠵᠦ ᠪᠣᠯᠬᠤ ᠹᠠᠢᠯ '%1' Qt% 2 ᠬᠡᠷᠡᠭᠰᠡᠵᠦ ᠂ Qt% 3 ᠢ᠋/ ᠵᠢ ᠡᠷᠢᠵᠦ ᠣᠯᠬᠤ ᠬᠡᠷᠡᠭᠲᠡᠶ .</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.h" line="192"/> -+ <location filename="../widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> - <translation type="unfinished"></translation> - </message> -@@ -167,8 +146,8 @@ - <context> - <name>QDialogButtonBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="423"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1106"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> - <translation>OK</translation> - </message> -@@ -176,15 +155,15 @@ - <context> - <name>QMessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="479"/> -- <location filename="../widget/messagebox/message-box.cpp" line="897"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="897"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> - <translation type="unfinished"></translation> - </message> -@@ -192,67 +171,216 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="19"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> - <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡᠢᠳᠦᠯ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="23"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> - <translation>ᠵᠠᠰᠠᠭᠰᠠᠨ ᠡᠳᠦᠷ ᠰᠠᠷᠠ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="27"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> - <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="31"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> - <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠶᠡᠬᠡ ᠪᠠᠭᠠ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="35"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> - <translation>ᠤᠭ ᠤ᠋ᠨ ᠵᠠᠮ ᠱᠤᠭᠤᠮ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="44"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> - <translation>ᠪᠠᠭᠠᠰᠬᠠᠬᠤ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="49"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> - <translation>ᠶᠡᠬᠡᠰᠬᠡᠬᠦ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="55"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> - <translation>ᠪᠦᠬᠦ ᠪᠠᠢᠳᠠᠯ ᠤ᠋ᠨ ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠢ᠋ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="75"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> - <translation>ᠵᠢᠭᠰᠠᠭᠠᠯᠳᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="76"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> - <translation>ᠰᠢᠪᠠᠭᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> - </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation>ᠬᠠᠭᠠᠬᠤ</translation> -+ </message> - </context> - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation>Default Slide</translation> - </message> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> - </message> - </context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> -+ <source>Open File</source> -+ <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> -+ <source>Save File</source> -+ <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> -+ <source>All Files (*)</source> -+ <translation>ᠪᠦᠬᠦᠢᠯᠡ (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>ᠤᠬᠤᠷᠢᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>ᠤᠷᠤᠭᠰᠢᠯᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>ᠳᠡᠭᠡᠭᠰᠢ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>ᠬᠠᠢᠯᠳᠠ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>ᠬᠠᠮᠤᠭ ᠤ᠋ᠨ ᠶᠡᠬᠡᠴᠢᠯᠡᠯ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>ᠬᠠᠭᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>ᠡᠬᠡᠬᠦᠯᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>ᠦᠬᠡᠢᠰᠭᠡᠬᠦ᠌</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>ᠦᠭᠡᠷᠡ ᠭᠠᠵᠠᠷ ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>ᠭᠠᠷᠴᠠᠭ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠦᠯ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>ᠪᠠᠢᠨᠠ᠂ ᠰᠤᠯᠢᠬᠤ ᠤᠤ?</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> -+ <source>NewFolder</source> -+ <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> -+ <source>Undo</source> -+ <translation>ᠬᠦᠴᠦᠨ ᠦᠬᠡᠢ ᠪᠤᠯᠭᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> -+ <source>Redo</source> -+ <translation>ᠳᠠᠬᠢᠵᠤ ᠬᠢᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>warn</source> -+ <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>This operation is not supported.</source> -+ <translation>ᠳᠤᠰ ᠠᠵᠢᠯᠯᠠᠬᠤᠢ ᠵᠢ ᠳᠡᠮᠵᠢᠬᠦ ᠦᠬᠡᠢ.</translation> -+ </message> -+</context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_tr.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_tr.ts -index e7140c0..a819154 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_tr.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_tr.ts -@@ -1,10 +1,131 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="tr_TR"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> - <context> - <name>MessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="96"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> - <translation type="unfinished"></translation> - </message> -@@ -25,8 +146,8 @@ - <context> - <name>QDialogButtonBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="361"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1089"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> - <translation type="unfinished"></translation> - </message> -@@ -34,15 +155,15 @@ - <context> - <name>QMessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="417"/> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> - <translation type="unfinished"></translation> - </message> -@@ -50,57 +171,57 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="729"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> - <translation type="unfinished"></translation> - </message> -@@ -108,11 +229,13 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation type="unfinished"></translation> - </message> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> -@@ -121,17 +244,17 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> - <translation type="unfinished"></translation> - </message> -@@ -139,123 +262,123 @@ - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> - <translation type="unfinished"></translation> - </message> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts -index d320e1f..d0d4a2b 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts -@@ -1,12 +1,133 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="ug_CN"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> - <context> - <name>MessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="96"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>ياپ</translation> - </message> - </context> - <context> -@@ -14,250 +135,252 @@ - <message> - <location filename="../widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="unfinished"></translation> -+ <translation>ئىجرا قىلىشقا بولىدىغان '٪1' Qt ٪2 نى تەلەپ قىلىدۇ، تېپىلغان Qt ٪3.</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> -- <translation type="unfinished"></translation> -+ <translation>بىردەك بولمىغان QT ئامبىرى خاتالىقى</translation> - </message> - </context> - <context> - <name>QDialogButtonBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="361"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1089"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> -- <translation type="unfinished"></translation> -+ <translation>ماقۇل</translation> - </message> - </context> - <context> - <name>QMessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="417"/> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> -- <translation type="unfinished"></translation> -+ <translation>تەپسىلاتىنى كۆرسەت...</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="880"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1515"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> -- <translation type="unfinished"></translation> -+ <translation>تەپسىلاتىنى يوشۇرۇش...</translation> - </message> - </context> - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation type="unfinished"></translation> -+ <translation>ھۆججەت نامى</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation type="unfinished"></translation> -+ <translation>ئۆزگەرتىلگەن ۋاقتى</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation type="unfinished"></translation> -+ <translation>ھۆججەت تۈرى</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation type="unfinished"></translation> -+ <translation>ھۆججەت چوڭلۇقى</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation type="unfinished"></translation> -+ <translation>ئەسلى يول</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation type="unfinished"></translation> -+ <translation>پەسكە چۈشمەكتە</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation type="unfinished"></translation> -+ <translation>ئۆرلەش</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation type="unfinished"></translation> -+ <translation>يەر شارىنى تۈرگە ئايرىشنى ئىشلىتىش</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation type="unfinished"></translation> -+ <translation>تىزىملىك كۆرۈش</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation type="unfinished"></translation> -+ <translation>ئايكون كۆرۈش</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="729"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">ياپ</translation> - </message> - </context> - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation type="unfinished"></translation> -+ <translation>كۆڭۈلدىكى سىيرىلما</translation> - </message> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -+ <translation>سىيرىلما كارتون ئارقىلىق تاختا ۋىكىپات ئالماشتۇرسۇن.</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">ھۆججەتنى ئېچىش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">ھۆججەت ساقلاش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">بارلىق ھۆججەتلەر (*)</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">قايت</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">ئالدىغا ماڭ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">Cd Up</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">ئىزدە</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">كۆرۈش تىپى</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">تۈر تۈرى</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">ئەڭ چوڭ چەككە</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">ياپ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">ئەسلىگە كەلتۈرۈش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">ئىسىم-فامىلىسى</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">ئېچىش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">ئەمەلدىن قالدۇرۇش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">تېجەش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">يېڭى ھۆججەت قىسقۇچ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">ساقلاش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">مۇندەرىجىلەر</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">دىققەت</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">مەۋجۇت، سىز راستىنلا ئالماشتۇرۇۋاتامسىز؟</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">يېڭى قاتلىغۇچ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">Undo</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">قايتا-قايتا</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">ئاگاھلاندۇرۇش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -+ <translation type="unfinished">بۇ مەشغۇلات قوللىمايدۇ.</translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts -index 7c6289d..73efbce 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts -@@ -2,151 +2,130 @@ - <!DOCTYPE TS> - <TS version="2.1" language="zh_CN"> - <context> -- <name>KyFileDialogHelper</name> -+ <name>MainWindow</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2524"/> -- <source>Open File</source> -- <translation>打开</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2525"/> -- <source>Save File</source> -- <translation>保存</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2538"/> -- <source>All Files (*)</source> -- <translation>所有(*)</translation> -- </message> --</context> --<context> -- <name>KyNativeFileDialog</name> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="192"/> -- <source>Go Back</source> -- <translation>后退</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="199"/> -- <source>Go Forward</source> -- <translation>前进</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="205"/> -- <source>Cd Up</source> -- <translation>向上</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="212"/> -- <source>Search</source> -- <translation>搜索</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="220"/> -- <source>View Type</source> -- <translation>视图类型</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="231"/> -- <source>Sort Type</source> -- <translation>排序类型</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="348"/> -- <source>Maximize</source> -- <translation>最大化</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="250"/> -- <source>Close</source> -- <translation>关闭</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="345"/> -- <source>Restore</source> -- <translation>还原</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="941"/> -- <source>Name</source> -- <translation>文件名</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="944"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1532"/> -- <source>Open</source> -- <translation>打开</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="945"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="954"/> -- <source>Cancel</source> -- <translation>取消</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="949"/> -- <source>Save as</source> -- <translation>另存为</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <source>New Folder</source> -- <translation>新建文件夹</translation> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="953"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1536"/> -- <source>Save</source> -- <translation>保存</translation> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="989"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="992"/> -- <source>Directories</source> -- <translation>目录</translation> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -- <source>Warning</source> -- <translation>警告</translation> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -- <source>exist, are you sure replace?</source> -- <translation>已存在,是否替换?</translation> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1858"/> -- <source>NewFolder</source> -- <translation>新建文件夹</translation> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2146"/> -- <source>Undo</source> -- <translation>撤销</translation> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2153"/> -- <source>Redo</source> -- <translation>重做</translation> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -- <source>warn</source> -- <translation>警告</translation> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -- <source>This operation is not supported.</source> -- <translation>不支持此操作。</translation> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> - </message> - </context> - <context> - <name>MessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="166"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> - <translation>关闭</translation> - </message> -@@ -154,12 +133,12 @@ - <context> - <name>QApplication</name> - <message> -- <location filename="../widget/messagebox/message-box.h" line="190"/> -+ <location filename="../widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> - <translation>可执行文件“%1”需要数量%2,找到数量%3。</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.h" line="192"/> -+ <location filename="../widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> - <translation>不兼容的Qt库错误</translation> - </message> -@@ -167,8 +146,8 @@ - <context> - <name>QDialogButtonBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="423"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1106"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> - <translation>确认</translation> - </message> -@@ -176,15 +155,15 @@ - <context> - <name>QMessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="479"/> -- <location filename="../widget/messagebox/message-box.cpp" line="897"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> - <translation>显示细节……</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="897"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> - <translation>隐藏细节……</translation> - </message> -@@ -192,67 +171,216 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="19"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> - <translation>文件名称</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="23"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> - <translation>修改日期</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="27"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> - <translation>文件类型</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="31"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> - <translation>文件大小</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="35"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> - <translation>原始路径</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="44"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> - <translation>降序</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="49"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> - <translation>升序</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="55"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> - <translation>使用全局排序</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="75"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> - <translation>列表视图</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="76"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> - <translation>图标视图</translation> - </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation>关闭</translation> -+ </message> - </context> - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation>默认slide</translation> - </message> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation>让选项卡小部件切换为幻灯片动画。</translation> - </message> - </context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> -+ <source>Open File</source> -+ <translation>打开</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> -+ <source>Save File</source> -+ <translation>保存</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> -+ <source>All Files (*)</source> -+ <translation>所有(*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>后退</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>前进</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>向上</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>搜索</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>视图类型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>排序类型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>最大化</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>关闭</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>还原</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>文件名</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>打开</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>取消</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>另存为</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>新建文件夹</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>保存</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>目录</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>警告</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>已存在,是否替换?</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> -+ <source>NewFolder</source> -+ <translation>新建文件夹</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> -+ <source>Undo</source> -+ <translation>撤销</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> -+ <source>Redo</source> -+ <translation>重做</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>warn</source> -+ <translation>警告</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>This operation is not supported.</source> -+ <translation>不支持此操作。</translation> -+ </message> -+</context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts -index f39f694..a667954 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts -@@ -2,151 +2,130 @@ - <!DOCTYPE TS> - <TS version="2.1" language="zh_HK"> - <context> -- <name>KyFileDialogHelper</name> -+ <name>MainWindow</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2524"/> -- <source>Open File</source> -- <translation>打開</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2525"/> -- <source>Save File</source> -- <translation>保存</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2538"/> -- <source>All Files (*)</source> -- <translation>所有(*)</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> - </message> --</context> --<context> -- <name>KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="192"/> -- <source>Go Back</source> -- <translation>後退</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="199"/> -- <source>Go Forward</source> -- <translation>前進</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="205"/> -- <source>Cd Up</source> -- <translation>向上</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="212"/> -- <source>Search</source> -- <translation>搜索</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="220"/> -- <source>View Type</source> -- <translation>視圖類型</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="231"/> -- <source>Sort Type</source> -- <translation>排序類型</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="348"/> -- <source>Maximize</source> -- <translation>最大化</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="250"/> -- <source>Close</source> -- <translation>關閉</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="345"/> -- <source>Restore</source> -- <translation>還原</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="941"/> -- <source>Name</source> -- <translation>檔名</translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="944"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1532"/> -- <source>Open</source> -- <translation>打開</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="945"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="954"/> -- <source>Cancel</source> -- <translation>取消</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="949"/> -- <source>Save as</source> -- <translation>另存為</translation> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <source>New Folder</source> -- <translation>新建資料夾</translation> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="953"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1536"/> -- <source>Save</source> -- <translation>保存</translation> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="989"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="992"/> -- <source>Directories</source> -- <translation>目錄</translation> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -- <source>Warning</source> -- <translation>警告</translation> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -- <source>exist, are you sure replace?</source> -- <translation>已存在,是否替換?</translation> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1858"/> -- <source>NewFolder</source> -- <translation>新建資料夾</translation> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2146"/> -- <source>Undo</source> -- <translation>撤銷</translation> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2153"/> -- <source>Redo</source> -- <translation>重做</translation> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -- <source>warn</source> -- <translation>警告</translation> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -- <source>This operation is not supported.</source> -- <translation>不支援此操作。</translation> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> - </message> - </context> - <context> - <name>MessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="166"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> - <translation>關閉</translation> - </message> -@@ -154,12 +133,12 @@ - <context> - <name>QApplication</name> - <message> -- <location filename="../widget/messagebox/message-box.h" line="190"/> -+ <location filename="../widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> - <translation>可執行檔「%1」 需要數量%2,找到數量%3。</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.h" line="192"/> -+ <location filename="../widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> - <translation>不相容的Qt庫錯誤</translation> - </message> -@@ -167,8 +146,8 @@ - <context> - <name>QDialogButtonBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="423"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1106"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> - <translation>確認</translation> - </message> -@@ -176,15 +155,15 @@ - <context> - <name>QMessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="479"/> -- <location filename="../widget/messagebox/message-box.cpp" line="897"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> - <translation>顯示細節......</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="897"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> - <translation>隱藏細節......</translation> - </message> -@@ -192,67 +171,216 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="19"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> - <translation>檔名稱</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="23"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> - <translation>修改日期</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="27"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> - <translation>檔案類型</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="31"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> - <translation>檔大小</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="35"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> - <translation>原始路徑</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="44"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> - <translation>降序</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="49"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> - <translation>升序</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="55"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> - <translation>使用全域排序</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="75"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> - <translation>清單檢視</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="76"/> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> - <translation>圖示檢視</translation> - </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished">關閉</translation> -+ </message> - </context> - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation>默認slide</translation> - </message> - <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation>讓選項卡小部件切換為幻燈片動畫。</translation> - </message> - </context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> -+ <source>Open File</source> -+ <translation type="unfinished">打開</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> -+ <source>Save File</source> -+ <translation type="unfinished">保存</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished">所有(*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished">後退</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished">前進</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished">向上</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished">搜索</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished">視圖類型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished">排序類型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished">最大化</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished">關閉</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished">還原</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished">檔名</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished">打開</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished">取消</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished">另存為</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished">新建資料夾</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished">保存</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished">目錄</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished">警告</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished">已存在,是否替換?</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> -+ <source>NewFolder</source> -+ <translation type="unfinished">新建資料夾</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> -+ <source>Undo</source> -+ <translation type="unfinished">撤銷</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> -+ <source>Redo</source> -+ <translation type="unfinished">重做</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>warn</source> -+ <translation type="unfinished">警告</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished">不支援此操作。</translation> -+ </message> -+</context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hans.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hans.ts -new file mode 100644 -index 0000000..7380cc3 ---- /dev/null -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hans.ts -@@ -0,0 +1,258 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="zh_Hans"> -+<context> -+ <name>KyFileDialogHelper</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2524"/> -+ <source>Open File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2525"/> -+ <source>Save File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2538"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>KyNativeFileDialog</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="192"/> -+ <source>Go Back</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="199"/> -+ <source>Go Forward</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="205"/> -+ <source>Cd Up</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="212"/> -+ <source>Search</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="220"/> -+ <source>View Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="231"/> -+ <source>Sort Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="348"/> -+ <source>Maximize</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="250"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="345"/> -+ <source>Restore</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="941"/> -+ <source>Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="944"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1532"/> -+ <source>Open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="945"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="954"/> -+ <source>Cancel</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="949"/> -+ <source>Save as</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -+ <source>New Folder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="953"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1536"/> -+ <source>Save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="989"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="992"/> -+ <source>Directories</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -+ <source>Warning</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1858"/> -+ <source>NewFolder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2146"/> -+ <source>Undo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2153"/> -+ <source>Redo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -+ <source>warn</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="166"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="190"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="192"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="423"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1106"/> -+ <source>OK</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="479"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="897"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <source>Show Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="897"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <source>Hide Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="19"/> -+ <source>File Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="23"/> -+ <source>Modified Date</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="27"/> -+ <source>File Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="31"/> -+ <source>File Size</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="35"/> -+ <source>Original Path</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="44"/> -+ <source>Descending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="49"/> -+ <source>Ascending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="55"/> -+ <source>Use global sorting</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="75"/> -+ <source>List View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="76"/> -+ <source>Icon View</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hant.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hant.ts -new file mode 100644 -index 0000000..39df820 ---- /dev/null -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hant.ts -@@ -0,0 +1,386 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="zh"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation>關閉</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>可執行檔「%1」 需要數量%2,找到數量%3。</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>不相容的Qt庫錯誤</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation>確認</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation>顯示細節......</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation>隱藏細節......</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>檔名稱</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>修改日期</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>檔案類型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>檔大小</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>原始路徑</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>降序</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>升序</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>使用全域排序</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>清單檢視</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>圖示檢視</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished">關閉</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>默認slide</translation> -+ </message> -+ <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>讓選項卡小部件切換為幻燈片動畫。</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> -+ <source>Open File</source> -+ <translation>打開</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> -+ <source>Save File</source> -+ <translation>保存</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> -+ <source>All Files (*)</source> -+ <translation>所有(*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>後退</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>前進</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>向上</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>搜索</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>視圖類型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>排序類型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>最大化</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>關閉</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>還原</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>檔名</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>打開</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>取消</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>另存為</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>新建資料夾</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>保存</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>目錄</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>警告</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>已存在,是否替換?</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> -+ <source>NewFolder</source> -+ <translation>新建資料夾</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> -+ <source>Undo</source> -+ <translation>撤銷</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> -+ <source>Redo</source> -+ <translation>重做</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>warn</source> -+ <translation>警告</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>This operation is not supported.</source> -+ <translation>不支援此操作。</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -index 9361d33..497180a 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -+++ b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -@@ -2665,6 +2665,11 @@ bool KyFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality wi - } - } - -+ if(options()->viewMode() == QFileDialog::List && mKyFileDialog->viewMode() != KyNativeFileDialog::Icon) -+ mKyFileDialog->setViewMode(KyNativeFileDialog::Icon); -+ else if(options()->viewMode() == QFileDialog::Detail && mKyFileDialog->viewMode() != KyNativeFileDialog::List) -+ mKyFileDialog->setViewMode(KyNativeFileDialog::List); -+ - QString platform = QGuiApplication::platformName(); - if(platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) - { -@@ -2713,10 +2718,6 @@ void KyFileDialogHelper::initDialog() - pDebug << "initDialog filters:" << options()->nameFilters(); - mKyFileDialog->setNameFilters(options()->nameFilters()); - pDebug << "view mode:" << options()->viewMode() << mKyFileDialog->viewMode(); -- if(options()->viewMode() == QFileDialog::List && mKyFileDialog->viewMode() != KyNativeFileDialog::Icon) -- mKyFileDialog->setViewMode(KyNativeFileDialog::Icon); -- else if(options()->viewMode() == QFileDialog::Detail && mKyFileDialog->viewMode() != KyNativeFileDialog::List) -- mKyFileDialog->setViewMode(KyNativeFileDialog::List); - - for(int i = 0; i < QFileDialogOptions::DialogLabelCount; ++i) { - auto label = static_cast<QFileDialogOptions::DialogLabel>(i); diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0010-Update-changelog-4.1.0.0-0k11.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0010-Update-changelog-4.1.0.0-0k11.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0010-Update-changelog-4.1.0.0-0k11.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0010-Update-changelog-4.1.0.0-0k11.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,2159 +0,0 @@ -From: xibowen <xibowen@kylinos.cn> -Date: Thu, 16 Nov 2023 16:15:43 +0800 -Subject: Update changelog 4.1.0.0-0k11 - ---- - libqt5-ukui-style/settings/black-list.h | 2 +- - .../settings/org.ukui.style.gschema.xml | 8 +- - ukui-styles/blur-helper.cpp | 6 +- - .../ukui-config-style-parameters.cpp | 1019 ++++++++++---------- - .../qt5-config-style-ukui/ukui-config-style.cpp | 22 +- - ukui-styles/window-manager.cpp | 8 +- - 6 files changed, 534 insertions(+), 531 deletions(-) - -diff --git a/libqt5-ukui-style/settings/black-list.h b/libqt5-ukui-style/settings/black-list.h -index bf69d0e..1e428f0 100644 ---- a/libqt5-ukui-style/settings/black-list.h -+++ b/libqt5-ukui-style/settings/black-list.h -@@ -102,7 +102,7 @@ static const QStringList focusStateActiveList() { - QStringList l; - l<<"ukui-menu"; - l<<"platformthemeDemo"; -- l<<"ukui-greeter"; -+ l<<"ukui-greeter-dialog"; - l<<"ukui-screensaver"; - - return l; -diff --git a/libqt5-ukui-style/settings/org.ukui.style.gschema.xml b/libqt5-ukui-style/settings/org.ukui.style.gschema.xml -index 1b777a5..45822c5 100644 ---- a/libqt5-ukui-style/settings/org.ukui.style.gschema.xml -+++ b/libqt5-ukui-style/settings/org.ukui.style.gschema.xml -@@ -61,9 +61,10 @@ - <description>Set default system palette for UKUI desktop environment.</description> - </key> - <key type="s" name="theme-color"> -- <default>"daybreakBlue"</default> -+ <default>"#3790FA"</default> - <summary> theme color</summary> -- <description>Set theme color for UKUI desktop environment.include default,daybreakBlue,jamPurple,magenta,sunRed,sunsetOrange,dustGold,polarGreen, and using rgba for example "(125,125,125)" </description> -+ <description>Set theme color for UKUI desktop environment.include default,daybreakBlue,jamPurple,magenta,sunRed,sunsetOrange,dustGold,polarGreen, -+ and using rgba for example "(125,125,125) or #3790FA" </description> - </key> - <key type="b" name="cursor-blink"> - <default>true</default> -@@ -88,7 +89,8 @@ - <description>Set custom highlight color for UKUI desktop environment.Now is to compatible with third party application</description> - </key> - <key type="i" name="window-radius"> -- <default>8</default> -+ <default>12</default> -+ <range min="1" max="12"/> - <summary>Window Radius</summary> - <description>Set the rounded corner size of the window</description> - </key> -diff --git a/ukui-styles/blur-helper.cpp b/ukui-styles/blur-helper.cpp -index 60c0248..0ffe570 100644 ---- a/ukui-styles/blur-helper.cpp -+++ b/ukui-styles/blur-helper.cpp -@@ -117,9 +117,9 @@ bool BlurHelper::eventFilter(QObject *obj, QEvent *e) - #if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) - void BlurHelper::registerWidget(QWidget *widget) - { -- // FIXME: how to blur window on wayland? -- if (!QX11Info::isPlatformX11()) -- return; -+// // FIXME: how to blur window on wayland? -+// if (!QX11Info::isPlatformX11()) -+// return; - - if (!widget) - return; -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index 213ca36..794390e 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -72,7 +72,7 @@ UKUIConfigStyleParameters::UKUIConfigStyleParameters(QObject *parent, bool isDar - initRadiusCfg(); - - switch (m_adjustColorRules) { -- case DefaultRGB: -+ case DefaultRGB: { - MenuItem_HMargin = 8; - Menu_MarginWidth = 4; - Menu_Combobox_Popup_MarginWidth = Menu_MarginWidth; -@@ -88,8 +88,8 @@ UKUIConfigStyleParameters::UKUIConfigStyleParameters(QObject *parent, bool isDar - - setTabBarIndicatorLayout(TabBarIndicatorLayout::TabBarIndicator_Horizontal); - -- break; -- case HSL: -+ }break; -+ case HSL: { - MenuItem_HMargin = 0; - Menu_MarginWidth = 1; - Menu_Combobox_Popup_MarginWidth = Menu_MarginWidth; -@@ -105,7 +105,7 @@ UKUIConfigStyleParameters::UKUIConfigStyleParameters(QObject *parent, bool isDar - ScrooBar_ShowLine = true; - TabBar_SplitLine = true; - TabBar_ScrollButtonWidth = 32; -- break; -+ }break; - default: - break; - } -@@ -246,7 +246,7 @@ void UKUIConfigStyleParameters::initRadiusCfg() - cDebug << "homelocation:" << QStandardPaths::writableLocation(QStandardPaths::HomeLocation); - QString cfgPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + - HomeCFGColorPath + cfgName(); -- if(!QFile::exists(cfgPath)) -+ if (!QFile::exists(cfgPath)) - cfgPath = UsrRadiusPath + cfgName(); - - if (!QFile(cfgPath).exists()) { -@@ -579,15 +579,15 @@ QColor UKUIConfigStyleParameters::buttonDarkClick(bool isDark, QPalette p) - return QColor(); - } - --void UKUIConfigStyleParameters::normalButtonColor(bool isDark, QPalette p, QPen &defaultPen, QBrush &defaultBrush, QPen &hoverPen, -- QBrush &hoverBrush, QPen &clickPen, QBrush &clickBrush, QPen &disablePen, QBrush &disableBrush) -+void UKUIConfigStyleParameters::normalButtonColor(bool isDark, QPalette p, QPen &defaultPen, QBrush &defaultBrush, -+ QPen &hoverPen, QBrush &hoverBrush, QPen &clickPen, QBrush &clickBrush, -+ QPen &disablePen, QBrush &disableBrush) - { - //default -- if(isDark){ -+ if (isDark) { - defaultPen = QPen(QBrush(adjustColor(defaultBrush.color(), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else -+ } else - defaultPen = QPen(QBrush(adjustColor(defaultBrush.color(), 0, 0, -25)), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - -@@ -706,7 +706,8 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - if (isImportant) - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); - -- int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? -+ widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - - QBrush defaultBrush = QBrush(buttonColorCfg.defaultBrush); - QBrush disableBrush = QBrush(buttonColorCfg.disableBrush); -@@ -737,41 +738,42 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - QBrush checkClickBrush; - QBrush checkDisableBrush; - -- defaultPen = QPen(QBrush(buttonColorCfg.defaultPen), (buttonColorCfg.defaultPen == Qt::NoPen || buttonColorCfg.defaultPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- hoverPen = QPen(QBrush(buttonColorCfg.hoverPen), (buttonColorCfg.hoverPen == Qt::NoPen || buttonColorCfg.hoverPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- clickPen = QPen(QBrush(buttonColorCfg.clickPen), (buttonColorCfg.clickPen == Qt::NoPen || buttonColorCfg.clickPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- disablePen = QPen(QBrush(buttonColorCfg.disablePen), (buttonColorCfg.disablePen == Qt::NoPen || buttonColorCfg.disablePen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- if (isWindowColoseButton){ -- if(buttonColorCfg.hoverType == Obj_Color_Type) -- { -+ defaultPen = QPen(QBrush(buttonColorCfg.defaultPen), (buttonColorCfg.defaultPen == Qt::NoPen || buttonColorCfg.defaultPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ hoverPen = QPen(QBrush(buttonColorCfg.hoverPen), (buttonColorCfg.hoverPen == Qt::NoPen || buttonColorCfg.hoverPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ clickPen = QPen(QBrush(buttonColorCfg.clickPen), (buttonColorCfg.clickPen == Qt::NoPen || buttonColorCfg.clickPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ disablePen = QPen(QBrush(buttonColorCfg.disablePen), (buttonColorCfg.disablePen == Qt::NoPen || buttonColorCfg.disablePen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ -+ if (isWindowColoseButton) { -+ if (buttonColorCfg.hoverType == Obj_Color_Type) { - hoverBrush = buttonColorCfg.hoverBrush; -- } -- else if(buttonColorCfg.hoverType == Obj_Gradient_Type){ -+ } else if (buttonColorCfg.hoverType == Obj_Gradient_Type){ - linearGradient.setColorAt(0, buttonColorCfg.hoverGradientList.value(0)); - linearGradient.setColorAt(1, buttonColorCfg.hoverGradientList.value(1)); - hoverBrush = QBrush(linearGradient); - } - clickBrush = buttonColorCfg.clickBrush; - focusPen = QPen(QBrush(clickBrush), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else { -+ } else { - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - -- if(buttonColorCfg.hoverType == Obj_Color_Type){ -+ if (buttonColorCfg.hoverType == Obj_Color_Type) { - if (isDark) { - hoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } else { - hoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } -+ - if (isDark) { - clickBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } else { - clickBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } -- } -- else{ -+ } else { - if (isDark) { - startColor = configMixColor(highlight, QColor(Qt::white), 0.2); - endColor = configMixColor(highlight, QColor(Qt::black), 0.05); -@@ -783,7 +785,6 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - clickBrush = QBrush(configMixColor(highlight, mix, 0.1)); -- - } - - if (isWindowButton && useTransparentButtonList().contains(qAppName())) { -@@ -799,9 +800,8 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - clickBrush = QBrush(mix); - } - } else if (useButtonPalette || isWindowButton) { -- if(buttonColorCfg.hoverType == Obj_Color_Type){ -- if (needTranslucent) -- { -+ if (buttonColorCfg.hoverType == Obj_Color_Type) { -+ if (needTranslucent) { - QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); - hoverColor.setAlphaF(isDark ? 0.20 : 0.16); - hoverBrush.setColor(hoverColor); -@@ -809,9 +809,7 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - QColor clickColor = option->palette.color(QPalette::Active, QPalette::BrightText); - clickColor.setAlphaF(isDark ? 0.30 : 0.21); - clickBrush.setColor(clickColor); -- } -- else -- { -+ } else { - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - - if (isDark) { -@@ -822,10 +820,8 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - clickBrush = QBrush(configMixColor(button, mix, 0.2)); - } - } -- } -- else{ -- if(needTranslucent) -- { -+ } else { -+ if(needTranslucent) { - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Light); - endColor = option->palette.color(QPalette::Active, QPalette::Text); -@@ -846,8 +842,7 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - clickColor = option->palette.color(QPalette::Active, QPalette::Light); - clickColor.setAlphaF(isDark ? 0.30 : 0.30); - clickBrush.setColor(clickColor); -- } -- else{ -+ } else { - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - - //hover -@@ -870,20 +865,18 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - - focusPen = QPen(QBrush(configMixColor(highlight, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- } -- break; -+ }break; - case AdjustColorRules::HSL:{ -- if(buttonColorCfg.focusPen != Qt::NoPen) -+ if (buttonColorCfg.focusPen != Qt::NoPen) - focusPen = QPen(QBrush(buttonColorCfg.focusPen), (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- if (!isWindowColoseButton) -- { -+ if (!isWindowColoseButton) { - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); - focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), -- (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else{ -+ (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ } else { - clickBrush = QBrush(buttonColorCfg.clickBrush); - hoverBrush = QBrush(buttonColorCfg.hoverBrush); - } -@@ -904,25 +897,25 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -- w->setProperty("ukui_radius", radius); -- w->setProperty("ukui_defaultBrush", defaultBrush); -- w->setProperty("ukui_clickBrush", clickBrush); -- w->setProperty("ukui_hoverBrush", hoverBrush); -- w->setProperty("ukui_disableBrush", disableBrush); -- w->setProperty("ukui_checkBrush", checkBrush); -- w->setProperty("ukui_checkHoverBrush", checkHoverBrush); -- w->setProperty("ukui_checkClickBrush", checkClickBrush); -- w->setProperty("ukui_checkDisableBrush", checkDisableBrush); -- w->setProperty("ukui_defaultPen", defaultPen); -- w->setProperty("ukui_clickPen", clickPen); -- w->setProperty("ukui_hoverPen", hoverPen); -- w->setProperty("ukui_disablePen", disablePen); -- w->setProperty("ukui_checkPen", checkPen); -- w->setProperty("ukui_checkHoverPen", checkHoverPen); -- w->setProperty("ukui_checkClickPen", checkClickPen); -- w->setProperty("ukui_checkDisablePen", checkDisablePen); -- w->setProperty("ukui_focusPen", focusPen); -+ if (w) { -+ w->setProperty("radius", radius); -+ w->setProperty("defaultBrush", defaultBrush); -+ w->setProperty("clickBrush", clickBrush); -+ w->setProperty("hoverBrush", hoverBrush); -+ w->setProperty("disableBrush", disableBrush); -+ w->setProperty("checkBrush", checkBrush); -+ w->setProperty("checkHoverBrush", checkHoverBrush); -+ w->setProperty("checkClickBrush", checkClickBrush); -+ w->setProperty("checkDisableBrush", checkDisableBrush); -+ w->setProperty("defaultPen", defaultPen); -+ w->setProperty("clickPen", clickPen); -+ w->setProperty("hoverPen", hoverPen); -+ w->setProperty("disablePen", disablePen); -+ w->setProperty("checkPen", checkPen); -+ w->setProperty("checkHoverPen", checkHoverPen); -+ w->setProperty("checkClickPen", checkClickPen); -+ w->setProperty("checkDisablePen", checkDisablePen); -+ w->setProperty("focusPen", focusPen); - } - - if (widget) { -@@ -1073,9 +1066,9 @@ void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, - - auto *w = const_cast<QWidget *>(widget); - if(w){ -- w->setProperty("ukui_iconHighlight", iconHighlight); -- w->setProperty("ukui_textHighlight", textHighlight); -- w->setProperty("ukui_textColor", textColor); -+ w->setProperty("iconHighlight", iconHighlight); -+ w->setProperty("textHighlight", textHighlight); -+ w->setProperty("textColor", textColor); - } - - if (widget) { -@@ -1141,7 +1134,8 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - if (isImportant) - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); - -- int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? -+ widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - - QBrush defaultBrush = QBrush(buttonColorCfg.defaultBrush); - QBrush disableBrush = QBrush(buttonColorCfg.disableBrush); -@@ -1170,25 +1164,26 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - QBrush checkClickBrush; - QBrush checkDisableBrush; - -- defaultPen = QPen(QBrush(buttonColorCfg.defaultPen), (buttonColorCfg.defaultPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- hoverPen = QPen(QBrush(buttonColorCfg.hoverPen), (buttonColorCfg.hoverPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- clickPen = QPen(QBrush(buttonColorCfg.clickPen), (buttonColorCfg.clickPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- disablePen = QPen(QBrush(buttonColorCfg.disablePen), (buttonColorCfg.disablePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ defaultPen = QPen(QBrush(buttonColorCfg.defaultPen), (buttonColorCfg.defaultPen == Qt::NoPen) ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ hoverPen = QPen(QBrush(buttonColorCfg.hoverPen), (buttonColorCfg.hoverPen == Qt::NoPen) ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ clickPen = QPen(QBrush(buttonColorCfg.clickPen), (buttonColorCfg.clickPen == Qt::NoPen) ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ disablePen = QPen(QBrush(buttonColorCfg.disablePen), (buttonColorCfg.disablePen == Qt::NoPen) ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if (isWindowColoseButton){ -- if(buttonColorCfg.hoverType == Obj_Color_Type) -- { -+ if (buttonColorCfg.hoverType == Obj_Color_Type) { - hoverBrush = buttonColorCfg.hoverBrush; -- } -- else if(buttonColorCfg.hoverType == Obj_Gradient_Type){ -+ } else if (buttonColorCfg.hoverType == Obj_Gradient_Type) { - linearGradient.setColorAt(0, buttonColorCfg.hoverGradientList.value(0)); - linearGradient.setColorAt(1, buttonColorCfg.hoverGradientList.value(1)); - hoverBrush = QBrush(linearGradient); - } - clickBrush = buttonColorCfg.clickBrush; - focusPen = QPen(QBrush(clickBrush), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else { -+ } else { - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - -@@ -1203,8 +1198,7 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - } else { - clickBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } -- } -- else{ -+ } else { - if (isDark) { - startColor = configMixColor(highlight, QColor(Qt::white), 0.2); - endColor = configMixColor(highlight, QColor(Qt::black), 0.05); -@@ -1233,8 +1227,7 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - } - } else if (useButtonPalette || isWindowButton) { - if(buttonColorCfg.hoverType == Obj_Color_Type){ -- if (needTranslucent) -- { -+ if (needTranslucent) { - QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); - hoverColor.setAlphaF(isDark ? 0.20 : 0.16); - hoverBrush.setColor(hoverColor); -@@ -1242,9 +1235,7 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - QColor clickColor = option->palette.color(QPalette::Active, QPalette::BrightText); - clickColor.setAlphaF(isDark ? 0.30 : 0.21); - clickBrush.setColor(clickColor); -- } -- else -- { -+ } else { - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - - if (isDark) { -@@ -1255,10 +1246,8 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - clickBrush = QBrush(configMixColor(button, mix, 0.2)); - } - } -- } -- else{ -- if(needTranslucent) -- { -+ } else { -+ if(needTranslucent) { - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Light); - endColor = option->palette.color(QPalette::Active, QPalette::Text); -@@ -1279,8 +1268,7 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - clickColor = option->palette.color(QPalette::Active, QPalette::Light); - clickColor.setAlphaF(isDark ? 0.30 : 0.30); - clickBrush.setColor(clickColor); -- } -- else{ -+ } else { - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - - //hover -@@ -1303,20 +1291,19 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - - focusPen = QPen(QBrush(configMixColor(highlight, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- } -- break; -+ } break; - case AdjustColorRules::HSL:{ - if(buttonColorCfg.focusPen != Qt::NoPen) -- focusPen = QPen(QBrush(buttonColorCfg.focusPen), (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ focusPen = QPen(QBrush(buttonColorCfg.focusPen), (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- if (!isWindowColoseButton) -- { -+ if (!isWindowColoseButton) { - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); - focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), -- (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else{ -+ (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ } else { - clickBrush = QBrush(buttonColorCfg.clickBrush); - hoverBrush = QBrush(buttonColorCfg.hoverBrush); - } -@@ -1338,24 +1325,24 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - - auto *w = const_cast<QWidget *>(widget); - if(w){ -- w->setProperty("ukui_radius", radius); -- w->setProperty("ukui_defaultBrush", defaultBrush); -- w->setProperty("ukui_clickBrush", clickBrush); -- w->setProperty("ukui_hoverBrush", hoverBrush); -- w->setProperty("ukui_disableBrush", disableBrush); -- w->setProperty("ukui_checkBrush", checkBrush); -- w->setProperty("ukui_checkHoverBrush", checkHoverBrush); -- w->setProperty("ukui_checkClickBrush", checkClickBrush); -- w->setProperty("ukui_checkDisableBrush", checkDisableBrush); -- w->setProperty("ukui_defaultPen", defaultPen); -- w->setProperty("ukui_clickPen", clickPen); -- w->setProperty("ukui_hoverPen", hoverPen); -- w->setProperty("ukui_disablePen", disablePen); -- w->setProperty("ukui_checkPen", checkPen); -- w->setProperty("ukui_checkHoverPen", checkHoverPen); -- w->setProperty("ukui_checkClickPen", checkClickPen); -- w->setProperty("ukui_checkDisablePen", checkDisablePen); -- w->setProperty("ukui_focusPen", focusPen); -+ w->setProperty("radius", radius); -+ w->setProperty("defaultBrush", defaultBrush); -+ w->setProperty("clickBrush", clickBrush); -+ w->setProperty("hoverBrush", hoverBrush); -+ w->setProperty("disableBrush", disableBrush); -+ w->setProperty("checkBrush", checkBrush); -+ w->setProperty("checkHoverBrush", checkHoverBrush); -+ w->setProperty("_checkClickBrush", checkClickBrush); -+ w->setProperty("checkDisableBrush", checkDisableBrush); -+ w->setProperty("defaultPen", defaultPen); -+ w->setProperty("clickPen", clickPen); -+ w->setProperty("hoverPen", hoverPen); -+ w->setProperty("disablePen", disablePen); -+ w->setProperty("checkPen", checkPen); -+ w->setProperty("checkHoverPen", checkHoverPen); -+ w->setProperty("checkClickPen", checkClickPen); -+ w->setProperty("checkDisablePen", checkDisablePen); -+ w->setProperty("focusPen", focusPen); - } - - if (widget) { -@@ -1504,10 +1491,10 @@ void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, - } - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -- w->setProperty("ukui_iconHighlight", iconHighlight); -- w->setProperty("ukui_textHighlight", textHighlight); -- w->setProperty("ukui_textColor", textColor); -+ if (w) { -+ w->setProperty("iconHighlight", iconHighlight); -+ w->setProperty("textHighlight", textHighlight); -+ w->setProperty("textColor", textColor); - } - if (widget) { - if(!widget->isEnabled()) -@@ -1531,8 +1518,8 @@ void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, - - void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -- qDebug() << "initConfigLineEditParameters....." << widget->property("normalRadius").isValid() << radius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? -+ widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - bool needTranslucent = false; - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); -@@ -1557,8 +1544,7 @@ void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); -- if(!needTranslucent) -- { -+ if(!needTranslucent) { - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Midlight); - endColor = option->palette.color(QPalette::Disabled, QPalette::NoRole); -@@ -1570,8 +1556,7 @@ void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const - startColor.setAlphaF(0.5); - endColor.setAlphaF(0.5); - } -- } -- else{ -+ } else { - QColor defaultColor = option->palette.color(QPalette::Active, QPalette::Mid); - if (isDark) - defaultColor = option->palette.color(QPalette::Active, QPalette::Text); -@@ -1597,8 +1582,7 @@ void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); -- } -- else -+ } else - hoverBrush= defaultBrush; - - switch (m_adjustColorRules) { -@@ -1619,15 +1603,15 @@ void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const - - auto *w = const_cast<QWidget *>(widget); - if(w){ -- w->setProperty("ukui_radius", radius); -- w->setProperty("ukui_defaultBrush", defaultBrush); -- w->setProperty("ukui_focusBrush", focusBrush); -- w->setProperty("ukui_hoverBrush", hoverBrush); -- w->setProperty("ukui_disableBrush", disableBrush); -- w->setProperty("ukui_defaultPen", defaultPen); -- w->setProperty("ukui_hoverPen", hoverPen); -- w->setProperty("ukui_disablePen", disablePen); -- w->setProperty("ukui_focusPen", focusPen); -+ w->setProperty("radius", radius); -+ w->setProperty("defaultBrush", defaultBrush); -+ w->setProperty("focusBrush", focusBrush); -+ w->setProperty("hoverBrush", hoverBrush); -+ w->setProperty("disableBrush", disableBrush); -+ w->setProperty("defaultPen", defaultPen); -+ w->setProperty("hoverPen", hoverPen); -+ w->setProperty("disablePen", disablePen); -+ w->setProperty("focusPen", focusPen); - } - - if (widget) { -@@ -1684,10 +1668,14 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - QBrush focusBrush = spinBoxColorCfg.focusBrush; - QBrush disableBrush = spinBoxColorCfg.disableBrush; - -- QPen defaultPen = QPen(spinBoxColorCfg.defaultPen, spinBoxColorCfg.defaultPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen hoverPen = QPen(spinBoxColorCfg.hoverPen, spinBoxColorCfg.defaultPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen focusPen = QPen(spinBoxColorCfg.focusPen, m_adjustColorRules == 0 ? 2 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen disablePen = QPen(spinBoxColorCfg.disablePen, spinBoxColorCfg.defaultPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen defaultPen = QPen(spinBoxColorCfg.defaultPen, spinBoxColorCfg.defaultPen.alpha()<= 0 ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen hoverPen = QPen(spinBoxColorCfg.hoverPen, spinBoxColorCfg.defaultPen.alpha()<= 0 ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen focusPen = QPen(spinBoxColorCfg.focusPen, m_adjustColorRules == 0 ? -+ 2 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen disablePen = QPen(spinBoxColorCfg.disablePen, spinBoxColorCfg.defaultPen.alpha()<= 0 ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - QBrush upHoverBrush = spinBoxColorCfg.upHoverBrush ; - QBrush upFocusHoverBrush = spinBoxColorCfg.upFocusHoverBrush ; -@@ -1698,23 +1686,33 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - QBrush downClickBrush = spinBoxColorCfg.downClickBrush ; - QBrush downDefaultBrush = spinBoxColorCfg.downDefaultBrush ; - -- QPen upDefaultPen = QPen(spinBoxColorCfg.upDefaultPen , spinBoxColorCfg.upDefaultPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen upHoverPen = QPen(spinBoxColorCfg.upHoverPen , spinBoxColorCfg.upHoverPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen upFocusHoverPen = QPen(spinBoxColorCfg.upFocusPen , spinBoxColorCfg.upFocusPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen upClickPen = QPen(spinBoxColorCfg.upClickPen , spinBoxColorCfg.upClickPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen upDisablePen = QPen(spinBoxColorCfg.upDisablePen , spinBoxColorCfg.upDisablePen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen downDefaultPen = QPen(spinBoxColorCfg.downDefaultPen , spinBoxColorCfg.downDefaultPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen downHoverPen = QPen(spinBoxColorCfg.downHoverPen , spinBoxColorCfg.downHoverPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen downFocusHoverPen = QPen(spinBoxColorCfg.downFocusPen , spinBoxColorCfg.downFocusPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen downClickPen = QPen(spinBoxColorCfg.downClickPen , spinBoxColorCfg.downClickPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen downDisablePen = QPen(spinBoxColorCfg.downDisablePen , spinBoxColorCfg.downDisablePen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen upDefaultPen = QPen(spinBoxColorCfg.upDefaultPen , spinBoxColorCfg.upDefaultPen.alpha()<= 0 ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen upHoverPen = QPen(spinBoxColorCfg.upHoverPen , spinBoxColorCfg.upHoverPen.alpha()<= 0 ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen upFocusHoverPen = QPen(spinBoxColorCfg.upFocusPen , spinBoxColorCfg.upFocusPen.alpha()<= 0 ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen upClickPen = QPen(spinBoxColorCfg.upClickPen , spinBoxColorCfg.upClickPen.alpha()<= 0 ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen upDisablePen = QPen(spinBoxColorCfg.upDisablePen , spinBoxColorCfg.upDisablePen.alpha()<= 0 ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen downDefaultPen = QPen(spinBoxColorCfg.downDefaultPen , spinBoxColorCfg.downDefaultPen.alpha()<= 0 ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen downHoverPen = QPen(spinBoxColorCfg.downHoverPen , spinBoxColorCfg.downHoverPen.alpha()<= 0 ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen downFocusHoverPen = QPen(spinBoxColorCfg.downFocusPen , spinBoxColorCfg.downFocusPen.alpha()<= 0 ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen downClickPen = QPen(spinBoxColorCfg.downClickPen , spinBoxColorCfg.downClickPen.alpha()<= 0 ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen downDisablePen = QPen(spinBoxColorCfg.downDisablePen , spinBoxColorCfg.downDisablePen.alpha()<= 0 ? -+ 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - if (isHorizonLayout) - hoverPen.setWidth(m_adjustColorRules == 0 ? 2 : 1); - -- if(spinBoxColorCfg.hoverType == Obj_Gradient_Type){ -+ if(spinBoxColorCfg.hoverType == Obj_Gradient_Type) { - //hoverBrush - QColor startColor; - QColor endColor; -@@ -1738,19 +1736,18 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); -- } -- else -+ } else - hoverBrush= defaultBrush; - } - break; - case AdjustColorRules::HSL:{ -- if(isDark){ -+ if (isDark) { - defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else -+ } else - defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ - hoverPen = defaultPen; - hoverBrush = defaultBrush; - -@@ -1765,8 +1762,7 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - disablePen = QPen(option->palette.brush(QPalette::Disabled, QPalette::Button), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } -- } -- break; -+ } break; - default: - break; - } -@@ -1784,18 +1780,16 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - downLinearGradient.setStart(option->rect.left(), option->rect.center().y()); - downLinearGradient.setFinalStop(option->rect.left(), option->rect.bottom()); - -- //up hover - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ -- if(spinBoxColorCfg.upHoverBrushType == Obj_Color_Type) -- { -+ //up hover -+ if(spinBoxColorCfg.upHoverBrushType == Obj_Color_Type) { - if (isDark) { - upHoverBrush = QBrush(configMixColor(button, mix, 0.2)); - } else { - upHoverBrush = QBrush(configMixColor(button, mix, 0.05)); - } -- } -- else if(spinBoxColorCfg.upHoverBrushType == Obj_Gradient_Type){ -+ } else if (spinBoxColorCfg.upHoverBrushType == Obj_Gradient_Type) { - if (isDark) { - startColor = configMixColor(button, QColor(Qt::white), 0.2); - endColor = configMixColor(button, QColor(Qt::white), 0.05); -@@ -1808,15 +1802,14 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - upHoverBrush = QBrush(upLinearGradient); - } - -- if(spinBoxColorCfg.downHoverBrushType == Obj_Color_Type) -- { -+ //down hover -+ if (spinBoxColorCfg.downHoverBrushType == Obj_Color_Type) { - if (isDark) { - downHoverBrush = QBrush(configMixColor(button, mix, 0.2)); - } else { - downHoverBrush = QBrush(configMixColor(button, mix, 0.05)); - } -- } -- else if(spinBoxColorCfg.downHoverBrushType == Obj_Gradient_Type){ -+ } else if (spinBoxColorCfg.downHoverBrushType == Obj_Gradient_Type) { - if (isDark) { - startColor = configMixColor(button, QColor(Qt::white), 0.2); - endColor = configMixColor(button, QColor(Qt::white), 0.05); -@@ -1829,16 +1822,15 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - downHoverBrush = QBrush(downLinearGradient); - } - -- if(spinBoxColorCfg.upFocusHoverBrushType == Obj_Color_Type) -- { -+ //up focus hover -+ if (spinBoxColorCfg.upFocusHoverBrushType == Obj_Color_Type) { - if (isDark) { - upFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } else { - upFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } -- } -- else if(spinBoxColorCfg.upFocusHoverBrushType == Obj_Gradient_Type){ -- if(isHorizonLayout){ -+ } else if (spinBoxColorCfg.upFocusHoverBrushType == Obj_Gradient_Type) { -+ if (isHorizonLayout) { - if (isDark) { - startColor = configMixColor(button, QColor(Qt::white), 0.2); - endColor = configMixColor(button, QColor(Qt::white), 0.05); -@@ -1846,7 +1838,7 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - startColor = configMixColor(button, QColor(Qt::black), 0.05); - endColor = configMixColor(button, QColor(Qt::black), 0.2); - } -- }else{ -+ } else { - if (isDark) { - startColor = configMixColor(highlight, QColor(Qt::white), 0.2); - endColor = configMixColor(highlight, QColor(Qt::white), 0.05); -@@ -1860,16 +1852,15 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - upFocusHoverBrush = QBrush(upLinearGradient); - } - -- if(spinBoxColorCfg.downFocusHoverBrushType == Obj_Color_Type) -- { -+ //down focus hover -+ if(spinBoxColorCfg.downFocusHoverBrushType == Obj_Color_Type) { - if (isDark) { - downFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } else { - downFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } -- } -- else if(spinBoxColorCfg.downFocusHoverBrushType == Obj_Gradient_Type){ -- if(isHorizonLayout){ -+ } else if (spinBoxColorCfg.downFocusHoverBrushType == Obj_Gradient_Type) { -+ if (isHorizonLayout) { - if (isDark) { - startColor = configMixColor(button, QColor(Qt::white), 0.2); - endColor = configMixColor(button, QColor(Qt::white), 0.05); -@@ -1877,7 +1868,7 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - startColor = configMixColor(button, QColor(Qt::black), 0.05); - endColor = configMixColor(button, QColor(Qt::black), 0.2); - } -- }else{ -+ } else { - if (isDark) { - startColor = configMixColor(highlight, QColor(Qt::white), 0.2); - endColor = configMixColor(highlight, QColor(Qt::white), 0.05); -@@ -1904,6 +1895,7 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - else - upClickBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } -+ - //down click - if (isDark) { - if(isHorizonLayout) -@@ -1978,34 +1970,34 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - } - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -- w->setProperty("ukui_radius", radius); -- w->setProperty("ukui_defaultBrush", defaultBrush); -- w->setProperty("ukui_focusBrush", focusBrush); -- w->setProperty("ukui_hoverBrush", hoverBrush); -- w->setProperty("ukui_disableBrush", disableBrush); -- w->setProperty("ukui_defaultPen", defaultPen); -- w->setProperty("ukui_hoverPen", hoverPen); -- w->setProperty("ukui_disablePen", disablePen); -- w->setProperty("ukui_focusPen", focusPen); -- w->setProperty("ukui_upDefaultBrush", upDefaultBrush); -- w->setProperty("ukui_upFocusHoverBrush", upFocusHoverBrush); -- w->setProperty("ukui_upClickBrush", upClickBrush); -- w->setProperty("ukui_upHoverBrush", upHoverBrush); -- w->setProperty("ukui_downDefaultBrush", downDefaultBrush); -- w->setProperty("ukui_downHoverBrush", downHoverBrush); -- w->setProperty("ukui_downFocusHoverBrush", downFocusHoverBrush); -- w->setProperty("ukui_downClickBrush", downClickBrush); -- w->setProperty("ukui_upDefaultPen", upDefaultPen); -- w->setProperty("ukui_upHoverPen", upHoverPen); -- w->setProperty("ukui_upFocusHoverPen", upFocusHoverPen); -- w->setProperty("ukui_upClickPen", upClickPen); -- w->setProperty("ukui_upDisablePen", upDisablePen); -- w->setProperty("ukui_downDefaultPen", downDefaultPen); -- w->setProperty("ukui_downHoverPen", downHoverPen); -- w->setProperty("ukui_downFocusHoverPen", downFocusHoverPen); -- w->setProperty("ukui_downClickPen", downClickPen); -- w->setProperty("ukui_downDisablePen", downDisablePen); -+ if (w) { -+ w->setProperty("radius", radius); -+ w->setProperty("defaultBrush", defaultBrush); -+ w->setProperty("focusBrush", focusBrush); -+ w->setProperty("hoverBrush", hoverBrush); -+ w->setProperty("disableBrush", disableBrush); -+ w->setProperty("defaultPen", defaultPen); -+ w->setProperty("hoverPen", hoverPen); -+ w->setProperty("disablePen", disablePen); -+ w->setProperty("focusPen", focusPen); -+ w->setProperty("upDefaultBrush", upDefaultBrush); -+ w->setProperty("upFocusHoverBrush", upFocusHoverBrush); -+ w->setProperty("upClickBrush", upClickBrush); -+ w->setProperty("upHoverBrush", upHoverBrush); -+ w->setProperty("downDefaultBrush", downDefaultBrush); -+ w->setProperty("downHoverBrush", downHoverBrush); -+ w->setProperty("downFocusHoverBrush", downFocusHoverBrush); -+ w->setProperty("downClickBrush", downClickBrush); -+ w->setProperty("upDefaultPen", upDefaultPen); -+ w->setProperty("upHoverPen", upHoverPen); -+ w->setProperty("upFocusHoverPen", upFocusHoverPen); -+ w->setProperty("upClickPen", upClickPen); -+ w->setProperty("upDisablePen", upDisablePen); -+ w->setProperty("downDefaultPen", downDefaultPen); -+ w->setProperty("downHoverPen", downHoverPen); -+ w->setProperty("downFocusHoverPen", downFocusHoverPen); -+ w->setProperty("downClickPen", downClickPen); -+ w->setProperty("downDisablePen", downDisablePen); - } - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -@@ -2093,13 +2085,13 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - - m_SpinBoxParameters.radius = radius; - m_SpinBoxParameters.spinBoxDefaultBrush = defaultBrush; -- m_SpinBoxParameters.spinBoxHoverBrush = hoverBrush; -- m_SpinBoxParameters.spinBoxFocusBrush = focusBrush; -+ m_SpinBoxParameters.spinBoxHoverBrush = hoverBrush; -+ m_SpinBoxParameters.spinBoxFocusBrush = focusBrush; - m_SpinBoxParameters.spinBoxDisableBrush = disableBrush; - - m_SpinBoxParameters.spinBoxDefaultPen = defaultPen; -- m_SpinBoxParameters.spinBoxHoverPen = hoverPen; -- m_SpinBoxParameters.spinBoxFocusPen = focusPen; -+ m_SpinBoxParameters.spinBoxHoverPen = hoverPen; -+ m_SpinBoxParameters.spinBoxFocusPen = focusPen; - m_SpinBoxParameters.spinBoxDisablePen = disablePen; - - m_SpinBoxParameters.spinBoxUpDefaultBrush = upDefaultBrush; -@@ -2129,22 +2121,28 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - - void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? -+ widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - - - UKUIColorTheme::ComboBoxColorCfg comboBoxColorCfg = readCfg()->comboBoxColorCfg(option->palette, C_ComboBox_Default); - - QBrush defaultBrush = comboBoxColorCfg.defaultBrush; - QBrush hoverBrush = comboBoxColorCfg.hoverBrush; -- QBrush onBrush = comboBoxColorCfg.onBrush; -- QBrush editBrush = comboBoxColorCfg.editBrush; -+ QBrush onBrush = comboBoxColorCfg.onBrush; -+ QBrush editBrush = comboBoxColorCfg.editBrush; - QBrush disableBrush = comboBoxColorCfg.disableBrush; - -- QPen defaultPen = QPen(comboBoxColorCfg.defaultPen, (comboBoxColorCfg.defaultPen.alpha() == 0 || comboBoxColorCfg.defaultPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen hoverPen = QPen(comboBoxColorCfg.hoverPen, (comboBoxColorCfg.hoverPen.alpha() == 0 || comboBoxColorCfg.hoverPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen onPen = QPen(comboBoxColorCfg.onPen, (comboBoxColorCfg.onPen.alpha() == 0 || comboBoxColorCfg.onPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen editPen = QPen(comboBoxColorCfg.editPen, (m_adjustColorRules == AdjustColorRules::DefaultRGB) ? 2 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen disablePen = QPen(comboBoxColorCfg.disablePen, (comboBoxColorCfg.disablePen.alpha() == 0 || comboBoxColorCfg.disablePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen defaultPen = QPen(comboBoxColorCfg.defaultPen, (comboBoxColorCfg.defaultPen.alpha() == 0 || comboBoxColorCfg.defaultPen == Qt::NoPen) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen hoverPen = QPen(comboBoxColorCfg.hoverPen, (comboBoxColorCfg.hoverPen.alpha() == 0 || comboBoxColorCfg.hoverPen == Qt::NoPen) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen onPen = QPen(comboBoxColorCfg.onPen, (comboBoxColorCfg.onPen.alpha() == 0 || comboBoxColorCfg.onPen == Qt::NoPen) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen editPen = QPen(comboBoxColorCfg.editPen, (m_adjustColorRules == AdjustColorRules::DefaultRGB) -+ ? 2 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen disablePen = QPen(comboBoxColorCfg.disablePen, (comboBoxColorCfg.disablePen.alpha() == 0 || comboBoxColorCfg.disablePen == Qt::NoPen) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -@@ -2169,17 +2167,17 @@ void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const - - auto *w = const_cast<QWidget *>(widget); - if(w){ -- w->setProperty("ukui_radius", radius); -- w->setProperty("ukui_defaultBrush", defaultBrush); -- w->setProperty("ukui_onBrush", onBrush); -- w->setProperty("ukui_hoverBrush", hoverBrush); -- w->setProperty("ukui_disableBrush", disableBrush); -- w->setProperty("ukui_editBrush", editBrush); -- w->setProperty("ukui_defaultPen", defaultPen); -- w->setProperty("ukui_hoverPen", hoverPen); -- w->setProperty("ukui_disablePen", disablePen); -- w->setProperty("ukui_onPen", onPen); -- w->setProperty("ukui_editPen", editPen); -+ w->setProperty("radius", radius); -+ w->setProperty("defaultBrush", defaultBrush); -+ w->setProperty("onBrush", onBrush); -+ w->setProperty("hoverBrush", hoverBrush); -+ w->setProperty("disableBrush", disableBrush); -+ w->setProperty("editBrush", editBrush); -+ w->setProperty("defaultPen", defaultPen); -+ w->setProperty("hoverPen", hoverPen); -+ w->setProperty("disablePen", disablePen); -+ w->setProperty("onPen", onPen); -+ w->setProperty("editPen", editPen); - } - - if (widget) { -@@ -2235,7 +2233,8 @@ void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const - - void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? -+ widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - - - bool needTranslucent = false; -@@ -2247,7 +2246,8 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - needTranslucent = widget->property("needTranslucent").toBool(); - } - -- UKUIColorTheme::ListViewColorCfg listViewColorCfg = readCfg()->listViewColorCfg(option->palette, highlightMode ? C_ListView_Highlight : (needTranslucent ? C_ListView_Translucent : C_ListView_Default)); -+ UKUIColorTheme::ListViewColorCfg listViewColorCfg = readCfg()->listViewColorCfg(option->palette, highlightMode ? -+ C_ListView_Highlight : (needTranslucent ? C_ListView_Translucent : C_ListView_Default)); - - QBrush defaultBrush = listViewColorCfg.defaultBrush; - QBrush hoverBrush = listViewColorCfg.hoverBrush; -@@ -2255,10 +2255,12 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - QBrush disableBrush = listViewColorCfg.disableBrush; - QPen textHoverPen = QPen(listViewColorCfg.textHoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen textSelectPen = QPen(listViewColorCfg.textSelectPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen hoverPen = QPen(listViewColorCfg.hoverPen, listViewColorCfg.hoverPen.alpha() > 0 ? 1 : 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen selectPen = QPen(listViewColorCfg.selectPen, listViewColorCfg.selectPen.alpha() > 0 ? 1 : 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen hoverPen = QPen(listViewColorCfg.hoverPen, listViewColorCfg.hoverPen.alpha() > 0 ? -+ 1 : 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen selectPen = QPen(listViewColorCfg.selectPen, listViewColorCfg.selectPen.alpha() > 0 ? -+ 1 : 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- if(!option->state & QStyle::State_Enabled){ -+ if (!option->state & QStyle::State_Enabled) { - textSelectPen = option->palette.color(QPalette::Disabled, QPalette::Text); - textHoverPen = option->palette.color(QPalette::Disabled, QPalette::Text); - } -@@ -2266,9 +2268,9 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB: - //hover -- if(listViewColorCfg.hoverType == Obj_Color_Type) -- hoverBrush = listViewColorCfg.hoverBrush; -- else if(listViewColorCfg.hoverType == Obj_Gradient_Type){ -+ if(listViewColorCfg.hoverType == Obj_Color_Type) { -+ hoverBrush = listViewColorCfg.hoverBrush; -+ } else if (listViewColorCfg.hoverType == Obj_Gradient_Type) { - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor startColor; - QColor endColor; -@@ -2276,7 +2278,7 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - -- if(needTranslucent){ -+ if (needTranslucent) { - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Light); - endColor = option->palette.color(QPalette::Active, QPalette::Text); -@@ -2293,12 +2295,11 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - hoverBrush = QBrush(linearGradient); - - QColor selectColor = option->palette.color(QPalette::Active, QPalette::Dark); -- if(isDark) -+ if (isDark) - selectColor = option->palette.color(QPalette::Active, QPalette::Light); - selectColor.setAlphaF(isDark ? 0.20 : 0.25); - selectBrush.setColor(selectColor); -- } -- else{ -+ } else { - //hover - if (isDark) { - startColor = configMixColor(button, QColor(Qt::white), 0.2); -@@ -2316,35 +2317,36 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - case AdjustColorRules::HSL: - hoverBrush = QBrush(highlightHover(isDark, option->palette)); - selectBrush = QBrush(highlightClick(isDark, option->palette)); -- if(isDark) -+ if(isDark) { - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else -+ } else { - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- if(isDark) -- -+ } -+ if(isDark) { - selectPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else -+ } else { - selectPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ } - break; - default: - break; - } - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -- w->setProperty("ukui_radius", radius); -- w->setProperty("ukui_defaultBrush", defaultBrush); -- w->setProperty("ukui_hoverBrush", hoverBrush); -- w->setProperty("ukui_disableBrush", disableBrush); -- w->setProperty("ukui_selectBrush", selectBrush); -- w->setProperty("ukui_textHoverPen", textHoverPen); -- w->setProperty("ukui_textSelectPen", textSelectPen); -- w->setProperty("ukui_hoverPen", hoverPen); -- w->setProperty("ukui_selectPen", selectPen); -+ if (w) { -+ w->setProperty("radius", radius); -+ w->setProperty("defaultBrush", defaultBrush); -+ w->setProperty("hoverBrush", hoverBrush); -+ w->setProperty("disableBrush", disableBrush); -+ w->setProperty("selectBrush", selectBrush); -+ w->setProperty("textHoverPen", textHoverPen); -+ w->setProperty("textSelectPen", textSelectPen); -+ w->setProperty("hoverPen", hoverPen); -+ w->setProperty("selectPen", selectPen); - } - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -@@ -2389,14 +2391,16 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - - void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? -+ widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - ; - - bool highlightMode = false; - if (widget && widget->property("highlightMode").isValid()) { - highlightMode = widget->property("highlightMode").toBool(); - } -- UKUIColorTheme::TreeViewColorCfg treeViewColorCfg = readCfg()->treeViewColorCfg(option->palette, highlightMode ? C_TreeView_HighLight : C_TreeView_Default); -+ UKUIColorTheme::TreeViewColorCfg treeViewColorCfg = readCfg()->treeViewColorCfg(option->palette, -+ highlightMode ? C_TreeView_HighLight : C_TreeView_Default); - - QBrush defaultBrush = treeViewColorCfg.defaultBrush; - QBrush hoverBrush = treeViewColorCfg.hoverBrush; -@@ -2404,15 +2408,17 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - QBrush disableBrush = treeViewColorCfg.disableBrush; - QPen textHoverPen = QPen(treeViewColorCfg.textHoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen textSelectPen = QPen(treeViewColorCfg.textSelectPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen hoverPen = QPen(treeViewColorCfg.hoverPen, (treeViewColorCfg.hoverPen == Qt::NoPen || treeViewColorCfg.hoverPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen selectPen = QPen(treeViewColorCfg.selectPen, (treeViewColorCfg.selectPen == Qt::NoPen || treeViewColorCfg.selectPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen hoverPen = QPen(treeViewColorCfg.hoverPen, (treeViewColorCfg.hoverPen == Qt::NoPen || treeViewColorCfg.hoverPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen selectPen = QPen(treeViewColorCfg.selectPen, (treeViewColorCfg.selectPen == Qt::NoPen || treeViewColorCfg.selectPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - QBrush branchDefaultBrush = treeViewColorCfg.branchDefaultBrush; - QBrush branchHoverBrush = treeViewColorCfg.branchHoverBrush; - QBrush branchSelectBrush = treeViewColorCfg.branchSelectBrush; - QBrush branchDisableBrush = treeViewColorCfg.branchDisableBrush; - -- if(!option->state & QStyle::State_Enabled){ -+ if (!option->state & QStyle::State_Enabled) { - textSelectPen = option->palette.color(QPalette::Disabled, QPalette::Text); - textHoverPen = option->palette.color(QPalette::Disabled, QPalette::Text); - } -@@ -2426,11 +2432,10 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - QColor endColor; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); -- if(treeViewColorCfg.hoverType == Obj_Color_Type){ -+ if (treeViewColorCfg.hoverType == Obj_Color_Type) { - hoverBrush = treeViewColorCfg.hoverBrush; - branchHoverBrush = hoverBrush; -- } -- else if(treeViewColorCfg.hoverType == Obj_Gradient_Type){ -+ } else if (treeViewColorCfg.hoverType == Obj_Gradient_Type) { - if (isDark) { - startColor = configMixColor(button, QColor(Qt::white), 0.2); - endColor = configMixColor(button, QColor(Qt::white), 0.05); -@@ -2443,28 +2448,28 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - hoverBrush = QBrush(linearGradient); - branchHoverBrush = QBrush(linearGradient); - } -- } -- break; -+ }break; - case AdjustColorRules::HSL:{ - hoverBrush = QBrush(highlightHover(isDark, option->palette)); - branchHoverBrush = hoverBrush; - selectBrush = QBrush(highlightClick(isDark, option->palette)); - -- if(isDark) -+ if(isDark) { - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else -+ } else { - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- if(isDark) -+ } - -+ if(isDark) { - selectPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else -+ } else { - selectPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- break; -+ } -+ }break; - default: - break; - } -@@ -2474,20 +2479,20 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - branchDisableBrush = disableBrush; - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -- w->setProperty("ukui_radius", radius); -- w->setProperty("ukui_defaultBrush", defaultBrush); -- w->setProperty("ukui_hoverBrush", hoverBrush); -- w->setProperty("ukui_disableBrush", disableBrush); -- w->setProperty("ukui_selectBrush", selectBrush); -- w->setProperty("ukui_branchDefaultBrush", branchDefaultBrush); -- w->setProperty("ukui_branchHoverBrush", branchHoverBrush); -- w->setProperty("ukui_branchSelectBrush", branchSelectBrush); -- w->setProperty("ukui_branchDisableBrush", branchDisableBrush); -- w->setProperty("ukui_textHoverPen", textHoverPen); -- w->setProperty("ukui_textSelectPen", textSelectPen); -- w->setProperty("ukui_hoverPen", hoverPen); -- w->setProperty("ukui_selectPen", selectPen); -+ if (w) { -+ w->setProperty("radius", radius); -+ w->setProperty("defaultBrush", defaultBrush); -+ w->setProperty("hoverBrush", hoverBrush); -+ w->setProperty("disableBrush", disableBrush); -+ w->setProperty("selectBrush", selectBrush); -+ w->setProperty("branchDefaultBrush", branchDefaultBrush); -+ w->setProperty("branchHoverBrush", branchHoverBrush); -+ w->setProperty("branchSelectBrush", branchSelectBrush); -+ w->setProperty("branchDisableBrush", branchDisableBrush); -+ w->setProperty("textHoverPen", textHoverPen); -+ w->setProperty("textSelectPen", textSelectPen); -+ w->setProperty("hoverPen", hoverPen); -+ w->setProperty("selectPen", selectPen); - } - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -@@ -2550,34 +2555,38 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - - void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? -+ widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - - - bool highlightMode = false; - if (widget && widget->property("highlightMode").isValid()) { - highlightMode = widget->property("highlightMode").toBool(); - } -- UKUIColorTheme::TableColorCfg tableColorCfg = readCfg()->tableColorCfg(option->palette, highlightMode ? C_Table_Highlight : C_Table_Default); -+ UKUIColorTheme::TableColorCfg tableColorCfg = readCfg()->tableColorCfg(option->palette, -+ highlightMode ? C_Table_Highlight : C_Table_Default); - - QBrush defaultBrush = tableColorCfg.defaultBrush; - QBrush hoverBrush = QBrush(tableColorCfg.hoverBrush); - QBrush selectBrush = tableColorCfg.selectBrush; - QBrush disableBrush = tableColorCfg.disableBrush; -- QPen hoverPen = QPen(tableColorCfg.hoverPen, (tableColorCfg.hoverPen.alpha() == 0 || tableColorCfg.hoverPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen selectPen = QPen(tableColorCfg.selectPen, (tableColorCfg.selectPen.alpha() == 0 || tableColorCfg.selectPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen hoverPen = QPen(tableColorCfg.hoverPen, (tableColorCfg.hoverPen.alpha() == 0 || tableColorCfg.hoverPen == Qt::NoPen) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen selectPen = QPen(tableColorCfg.selectPen, (tableColorCfg.selectPen.alpha() == 0 || tableColorCfg.selectPen == Qt::NoPen) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen textHoverPen = QPen(tableColorCfg.textHoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen textSelectPen = QPen(tableColorCfg.textSelectPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- if(!option->state & QStyle::State_Enabled){ -+ if (!option->state & QStyle::State_Enabled) { - textSelectPen = option->palette.color(QPalette::Disabled, QPalette::Text); - textHoverPen = option->palette.color(QPalette::Disabled, QPalette::Text); - } - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ -- if(tableColorCfg.hoverType == Obj_Color_Type) -+ if(tableColorCfg.hoverType == Obj_Color_Type) { - hoverBrush= QBrush(tableColorCfg.hoverBrush); -- else if(tableColorCfg.hoverType == Obj_Gradient_Type){ -+ } else if(tableColorCfg.hoverType == Obj_Gradient_Type) { - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); -@@ -2595,43 +2604,42 @@ void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QSt - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - } -- } -- break; -+ } break; - case AdjustColorRules::HSL:{ - hoverBrush = QBrush(highlightHover(isDark, option->palette)); - selectBrush = QBrush(highlightClick(isDark, option->palette)); - -- if(isDark) -+ if(isDark) { - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else -+ } else { - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- if(isDark) -+ } - -+ if (isDark) { - selectPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else -+ } else { - selectPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- } -- break; -+ } -+ } break; - default: - break; - } - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -- w->setProperty("ukui_radius", radius); -- w->setProperty("ukui_defaultBrush", defaultBrush); -- w->setProperty("ukui_hoverBrush", hoverBrush); -- w->setProperty("ukui_disableBrush", disableBrush); -- w->setProperty("ukui_selectBrush", selectBrush); -- w->setProperty("ukui_textHoverPen", textHoverPen); -- w->setProperty("ukui_textSelectPen", textSelectPen); -- w->setProperty("ukui_hoverPen", hoverPen); -- w->setProperty("ukui_selectPen", selectPen); -+ if (w) { -+ w->setProperty("radius", radius); -+ w->setProperty("defaultBrush", defaultBrush); -+ w->setProperty("hoverBrush", hoverBrush); -+ w->setProperty("disableBrush", disableBrush); -+ w->setProperty("selectBrush", selectBrush); -+ w->setProperty("textHoverPen", textHoverPen); -+ w->setProperty("textSelectPen", textSelectPen); -+ w->setProperty("hoverPen", hoverPen); -+ w->setProperty("selectPen", selectPen); - } - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -@@ -2682,9 +2690,11 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - needTranslucent = widget->property("needTranslucent").toBool(); - } - -- UKUIColorTheme::CheckBoxColorCfg checkboxColorCfg = readCfg()->checkBoxColorCfg(option->palette, needTranslucent ? C_CheckBox_Translucent : C_CheckBox_Default); -+ UKUIColorTheme::CheckBoxColorCfg checkboxColorCfg = readCfg()->checkBoxColorCfg(option->palette, -+ needTranslucent ? C_CheckBox_Translucent : C_CheckBox_Default); - -- int radius = (widget && widget->property("minRadius").isValid()) ? widget->property("minRadius").toInt() : m_radiusStruct.minRadius; -+ int radius = (widget && widget->property("minRadius").isValid()) ? -+ widget->property("minRadius").toInt() : m_radiusStruct.minRadius; - - QPen defaultPen = QPen(checkboxColorCfg.defaultPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen hoverPen = QPen(checkboxColorCfg.hoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -2711,13 +2721,11 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ -- if(checkboxColorCfg.hoverType == Obj_Color_Type){ -- if(!needTranslucent){ -+ if(checkboxColorCfg.hoverType == Obj_Color_Type) { -+ if(!needTranslucent) { - hoverBrush = QBrush(configMixColor(defaultBrush.color(), mix, isDark ? 0.15 : 0.05)); -- - clickBrush = QBrush(configMixColor(defaultBrush.color(), mix, isDark ? 0.1 : 0.15)); -- } -- else{ -+ } else { - QColor defaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); - defaultColor.setAlphaF(isDark ? 0.04 : 0.05); - defaultBrush.setColor(defaultColor); -@@ -2732,7 +2740,6 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - hoverPenColor.setAlphaF(0.3); - hoverPen = QPen(QBrush(hoverPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- - QColor clickColor = option->palette.color(QPalette::Active, QPalette::BrightText); - clickColor.setAlphaF(isDark ? 0.20 : 0.16); - clickBrush.setColor(clickColor); -@@ -2742,9 +2749,8 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - clickPenColor.setAlphaF(isDark ? 0.25 : 0.65); - clickPen = QPen(QBrush(clickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } -- } -- else if(checkboxColorCfg.hoverType == Obj_Gradient_Type){ -- if(needTranslucent){ -+ } else if (checkboxColorCfg.hoverType == Obj_Gradient_Type) { -+ if (needTranslucent) { - QColor defaultColor = option->palette.color(QPalette::Active, QPalette::Mid); - if(isDark) - defaultColor = option->palette.color(QPalette::Active, QPalette::Text); -@@ -2787,18 +2793,14 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - - if(checkboxColorCfg.onHoverType == Obj_Color_Type){ - onHoverBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, isDark? 0.2 : 0.05)); -- - onClickBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, isDark ? 0.05 : 0.2)); -- -- } -- else if(checkboxColorCfg.onHoverType == Obj_Gradient_Type){ -+ } else if (checkboxColorCfg.onHoverType == Obj_Gradient_Type) { - //on default - QColor DefaultPenColor = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor onDefaultPenColor = configMixColor(DefaultPenColor, mix, 0.1); - onDefaultPen = QPen(QBrush(onDefaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - onDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -- if(needTranslucent) -- { -+ if(needTranslucent) { - QColor onDefaultPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - onDefaultPenColor.setAlphaF(0.1); - onDefaultPen = QPen(QBrush(onDefaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -2822,8 +2824,7 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - onHoverBrush = QBrush(linearGradient); -- if(needTranslucent) -- { -+ if(needTranslucent) { - QColor onHoverPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - onHoverPenColor.setAlphaF(0.2); - onHoverPen = QPen(QBrush(onHoverPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -2833,8 +2834,7 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - QColor onClickPenColor = configMixColor(DefaultPenColor, mix, 0.1); - onClickPen = QPen(QBrush(onClickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - onClickBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, 0.1)); -- if(needTranslucent) -- { -+ if(needTranslucent) { - QColor onClickPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - onClickPenColor.setAlphaF(0.2); - onClickPen = QPen(QBrush(onClickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -2842,8 +2842,7 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - onHoverBrushIslinearGradient = true; - } - disablePen = defaultPen; -- } -- break; -+ } break; - case AdjustColorRules::HSL:{ - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); -@@ -2871,26 +2870,26 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - } - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -- w->setProperty("ukui_radius", radius); -- w->setProperty("ukui_defaultBrush", defaultBrush); -- w->setProperty("ukui_hoverBrush", hoverBrush); -- w->setProperty("ukui_clickBrush", clickBrush); -- w->setProperty("ukui_disableBrush", disableBrush); -- w->setProperty("ukui_onDefaultBrush", onDefaultBrush); -- w->setProperty("ukui_onHoverBrush", onHoverBrush); -- w->setProperty("ukui_onClickBrush", onClickBrush); -- w->setProperty("ukui_pathDisableBrush", pathDisableBrush); -- w->setProperty("ukui_pathBrush", pathBrush); -- w->setProperty("ukui_contentPen", contentPen); -- w->setProperty("ukui_defaultPen", defaultPen); -- w->setProperty("ukui_disablePen", disablePen); -- w->setProperty("ukui_hoverPen", hoverPen); -- w->setProperty("ukui_clickPen", clickPen); -- w->setProperty("ukui_onDefaultPen", onDefaultPen); -- w->setProperty("ukui_onHoverPen", onHoverPen); -- w->setProperty("ukui_onClickPen", onClickPen); -- w->setProperty("ukui_onHoverBrushIslinearGradient", onHoverBrushIslinearGradient); -+ if (w) { -+ w->setProperty("radius", radius); -+ w->setProperty("defaultBrush", defaultBrush); -+ w->setProperty("hoverBrush", hoverBrush); -+ w->setProperty("clickBrush", clickBrush); -+ w->setProperty("disableBrush", disableBrush); -+ w->setProperty("onDefaultBrush", onDefaultBrush); -+ w->setProperty("onHoverBrush", onHoverBrush); -+ w->setProperty("onClickBrush", onClickBrush); -+ w->setProperty("pathDisableBrush", pathDisableBrush); -+ w->setProperty("pathBrush", pathBrush); -+ w->setProperty("contentPen", contentPen); -+ w->setProperty("defaultPen", defaultPen); -+ w->setProperty("disablePen", disablePen); -+ w->setProperty("hoverPen", hoverPen); -+ w->setProperty("clickPen", clickPen); -+ w->setProperty("onDefaultPen", onDefaultPen); -+ w->setProperty("onHoverPen", onHoverPen); -+ w->setProperty("onClickPen", onClickPen); -+ w->setProperty("onHoverBrushIslinearGradient", onHoverBrushIslinearGradient); - } - - if (widget) { -@@ -2981,7 +2980,8 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - - void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- m_RadioButtonParameters.radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ m_RadioButtonParameters.radius = (widget && widget->property("normalRadius").isValid()) ? -+ widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - - UKUIColorTheme::RadioButtonColorCfg radioButtonColorCfg = readCfg()->radioButtonColorCfg(option->palette, C_RadioButton_Default); - QPen defaultPen = QPen(radioButtonColorCfg.defaultPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -3003,9 +3003,9 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - QBrush childrenOnClickBrush = radioButtonColorCfg.childrenOnClickBrush; - QBrush childrenOnDisableBrush = radioButtonColorCfg.childrenOnDisableBrush; - QBrush onHoverBrush = QBrush(radioButtonColorCfg.onHoverBrush); -- if(radioButtonColorCfg.onHoverType == Obj_Color_Type) -+ if(radioButtonColorCfg.onHoverType == Obj_Color_Type) { - onHoverBrush= QBrush(radioButtonColorCfg.onHoverBrush); -- else if(radioButtonColorCfg.onHoverType == Obj_Gradient_Type){ -+ } else if (radioButtonColorCfg.onHoverType == Obj_Gradient_Type) { - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); -@@ -3018,7 +3018,8 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - case AdjustColorRules::DefaultRGB:{ - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - -- m_RadioButtonParameters.childrenRadius = (qstyleoption_cast<const QStyleOptionButton*>(option)->rect.adjusted(1, 1, -1, -1).width()) / 2 - 2; -+ m_RadioButtonParameters.childrenRadius = -+ (qstyleoption_cast<const QStyleOptionButton*>(option)->rect.adjusted(1, 1, -1, -1).width()) / 2 - 2; - - //hover - hoverPen = defaultPen; -@@ -3037,7 +3038,7 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - } - - onHoverPen = onDefaultPen; -- if(radioButtonColorCfg.onHoverType == Obj_Color_Type){ -+ if (radioButtonColorCfg.onHoverType == Obj_Color_Type) { - //on hover - if (isDark) { - onHoverBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, 0.2)); -@@ -3046,8 +3047,7 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - } - //disable - disablePen = defaultPen; -- } -- else if(radioButtonColorCfg.onHoverType == Obj_Gradient_Type){ -+ } else if (radioButtonColorCfg.onHoverType == Obj_Gradient_Type) { - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; -@@ -3072,8 +3072,8 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - } else { - onClickBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, 0.2)); - } -- } - break; -+ } - case AdjustColorRules::HSL:{ - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); -@@ -3098,26 +3098,26 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - } - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -- w->setProperty("ukui_radius", radius); -- w->setProperty("ukui_defaultBrush", defaultBrush); -- w->setProperty("ukui_hoverBrush", hoverBrush); -- w->setProperty("ukui_clickBrush", clickBrush); -- w->setProperty("ukui_disableBrush", disableBrush); -- w->setProperty("ukui_onDefaultBrush", onDefaultBrush); -- w->setProperty("ukui_onHoverBrush", onHoverBrush); -- w->setProperty("ukui_onClickBrush", onClickBrush); -- w->setProperty("ukui_childrenOnDefaultBrush", childrenOnDefaultBrush); -- w->setProperty("ukui_childrenOnHoverBrush", childrenOnHoverBrush); -- w->setProperty("ukui_childrenOnClickBrush", childrenOnClickBrush); -- w->setProperty("ukui_childrenOnDisableBrush", childrenOnDisableBrush); -- w->setProperty("ukui_defaultPen", defaultPen); -- w->setProperty("ukui_disablePen", disablePen); -- w->setProperty("ukui_hoverPen", hoverPen); -- w->setProperty("ukui_clickPen", clickPen); -- w->setProperty("ukui_onDefaultPen", onDefaultPen); -- w->setProperty("ukui_onHoverPen", onHoverPen); -- w->setProperty("ukui_onClickPen", onClickPen); -+ if (w) { -+ w->setProperty("radius", radius); -+ w->setProperty("defaultBrush", defaultBrush); -+ w->setProperty("hoverBrush", hoverBrush); -+ w->setProperty("clickBrush", clickBrush); -+ w->setProperty("disableBrush", disableBrush); -+ w->setProperty("onDefaultBrush", onDefaultBrush); -+ w->setProperty("onHoverBrush", onHoverBrush); -+ w->setProperty("onClickBrush", onClickBrush); -+ w->setProperty("childrenOnDefaultBrush", childrenOnDefaultBrush); -+ w->setProperty("childrenOnHoverBrush", childrenOnHoverBrush); -+ w->setProperty("childrenOnClickBrush", childrenOnClickBrush); -+ w->setProperty("childrenOnDisableBrush", childrenOnDisableBrush); -+ w->setProperty("defaultPen", defaultPen); -+ w->setProperty("disablePen", disablePen); -+ w->setProperty("hoverPen", hoverPen); -+ w->setProperty("clickPen", clickPen); -+ w->setProperty("onDefaultPen", onDefaultPen); -+ w->setProperty("onHoverPen", onHoverPen); -+ w->setProperty("onClickPen", onClickPen); - } - - //if set property -@@ -3208,7 +3208,8 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } -- UKUIColorTheme::SliderBarColorCfg sliderColorCfg = readCfg()->sliderBarColorCfg(option->palette, needTranslucent ? C_SliderBar_Translucent : C_SliderBar_Default); -+ UKUIColorTheme::SliderBarColorCfg sliderColorCfg = readCfg()->sliderBarColorCfg(option->palette, -+ needTranslucent ? C_SliderBar_Translucent : C_SliderBar_Default); - - QBrush handleDefaultBrush = sliderColorCfg.handleDefaultBrush; - QBrush handleHoverBrush = sliderColorCfg.handleHoverBrush; -@@ -3222,11 +3223,16 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - QBrush grooveUnvalueHoverBrush = sliderColorCfg.grooveUnvalueHoverBrush; - QBrush grooveUnvalueDisableBrush = sliderColorCfg.grooveUnvalueDisableBrush; - -- QPen handleDefaultPen = QPen(sliderColorCfg.handleDefaultPen, (sliderColorCfg.handleDefaultPen.alpha() == 0 || sliderColorCfg.handleDefaultPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen handleHoverPen = QPen(sliderColorCfg.handleHoverPen , (sliderColorCfg.handleHoverPen.alpha() == 0 || sliderColorCfg.handleHoverPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen handleClickPen = QPen(sliderColorCfg.handleClickPen , (sliderColorCfg.handleClickPen.alpha() == 0 || sliderColorCfg.handleClickPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen handleDisablePen = QPen(sliderColorCfg.handleDisablePen, (sliderColorCfg.handleDisablePen.alpha() == 0 || sliderColorCfg.handleDisablePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen sliderGroovePen = QPen(sliderColorCfg.sliderGroovePen , (sliderColorCfg.sliderGroovePen.alpha() == 0 || sliderColorCfg.sliderGroovePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen handleDefaultPen = QPen(sliderColorCfg.handleDefaultPen, (sliderColorCfg.handleDefaultPen.alpha() == 0 || -+ sliderColorCfg.handleDefaultPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen handleHoverPen = QPen(sliderColorCfg.handleHoverPen , (sliderColorCfg.handleHoverPen.alpha() == 0 || -+ sliderColorCfg.handleHoverPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen handleClickPen = QPen(sliderColorCfg.handleClickPen , (sliderColorCfg.handleClickPen.alpha() == 0 || -+ sliderColorCfg.handleClickPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen handleDisablePen = QPen(sliderColorCfg.handleDisablePen, (sliderColorCfg.handleDisablePen.alpha() == 0 || -+ sliderColorCfg.handleDisablePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen sliderGroovePen = QPen(sliderColorCfg.sliderGroovePen , (sliderColorCfg.sliderGroovePen.alpha() == 0 || -+ sliderColorCfg.sliderGroovePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPainterPath handlePath; - - const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option); -@@ -3240,15 +3246,14 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - -- if(sliderColorCfg.handleHoverType == Obj_Color_Type){ -+ if (sliderColorCfg.handleHoverType == Obj_Color_Type) { - //handle hover - if (isDark) { - handleHoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } else { - handleHoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } -- } -- else if(sliderColorCfg.handleHoverType == Obj_Gradient_Type){ -+ } else if (sliderColorCfg.handleHoverType == Obj_Gradient_Type) { - //handle hover - QColor startColor; - QColor endColor; -@@ -3293,15 +3298,13 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - //groove value disable - grooveValueDisableBrush = handleDisableBrush; - -- if(needTranslucent) -- { -+ if(needTranslucent) { - QColor color = option->palette.color(QPalette::Active, QPalette::BrightText); - color.setAlphaF(0.1); - grooveUnvalueDefaultBrush.setColor(color); - } - grooveUnvalueHoverBrush = grooveUnvalueDefaultBrush; -- } -- break; -+ } break; - case AdjustColorRules::HSL:{ - if (isDark) { - handleDefaultPen = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15); -@@ -3319,12 +3322,11 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - handleClickBrush = highlightClick(isDark, option->palette); - - //handle disable -- if(isDark) -- { -+ if (isDark) { - handleDisablePen = adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), 18); -- } -- else -+ } else { - handleDisablePen = adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), -12); -+ } - handleDisablePen.setWidth(1); - - if (isDark) { -@@ -3338,13 +3340,12 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - if(isDark){ - sliderGroovePen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else -+ } else - sliderGroovePen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - QRect handleRect = option->rect; -- if(horizontal){ -+ if (horizontal) { - handlePath.moveTo(handleRect.left(), handleRect.top()); - handlePath.lineTo(handleRect.left(), handleRect.top() + (2 * (handleRect.height())/3)); - handlePath.lineTo(handleRect.center().x(), handleRect.bottom()); -@@ -3352,7 +3353,7 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - handlePath.lineTo(handleRect.right(), handleRect.top()); - handlePath.lineTo(handleRect.left(), handleRect.top()); - -- }else { -+ } else { - handlePath.moveTo(handleRect.right(),handleRect.top()); - handlePath.lineTo(handleRect.right() - (2 * (handleRect.width())/3) , handleRect.top()); - handlePath.lineTo(handleRect.left(), handleRect.center().y() ); -@@ -3362,31 +3363,29 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - } - - grooveRadius = radiusProperty().normalRadius; -- -- } -- break; -+ } break; - default: - break; - } - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -- w->setProperty("ukui_grooveRadius", grooveRadius); -- w->setProperty("ukui_handleDefaultBrush", handleDefaultBrush); -- w->setProperty("ukui_handleHoverBrush", handleHoverBrush); -- w->setProperty("ukui_handleClickBrush", handleClickBrush); -- w->setProperty("ukui_handleDisableBrush", handleDisableBrush); -- w->setProperty("ukui_grooveValueDefaultBrush", grooveValueDefaultBrush); -- w->setProperty("ukui_grooveValueHoverBrush", grooveValueHoverBrush); -- w->setProperty("ukui_grooveValueDisableBrush", grooveValueDisableBrush); -- w->setProperty("ukui_grooveUnvalueDefaultBrush", grooveUnvalueDefaultBrush); -- w->setProperty("ukui_grooveUnvalueHoverBrush", grooveUnvalueHoverBrush); -- w->setProperty("ukui_grooveUnvalueDisableBrush", grooveUnvalueDisableBrush); -- w->setProperty("ukui_handleDefaultPen", handleDefaultPen); -- w->setProperty("ukui_handleHoverPen", handleHoverPen); -- w->setProperty("ukui_handleClickPen", handleClickPen); -- w->setProperty("ukui_handleDisablePen", handleDisablePen); -- w->setProperty("ukui_sliderGroovePen; ", sliderGroovePen); -+ if (w) { -+ w->setProperty("grooveRadius", grooveRadius); -+ w->setProperty("handleDefaultBrush", handleDefaultBrush); -+ w->setProperty("handleHoverBrush", handleHoverBrush); -+ w->setProperty("handleClickBrush", handleClickBrush); -+ w->setProperty("handleDisableBrush", handleDisableBrush); -+ w->setProperty("grooveValueDefaultBrush", grooveValueDefaultBrush); -+ w->setProperty("grooveValueHoverBrush", grooveValueHoverBrush); -+ w->setProperty("grooveValueDisableBrush", grooveValueDisableBrush); -+ w->setProperty("grooveUnvalueDefaultBrush", grooveUnvalueDefaultBrush); -+ w->setProperty("grooveUnvalueHoverBrush", grooveUnvalueHoverBrush); -+ w->setProperty("grooveUnvalueDisableBrush", grooveUnvalueDisableBrush); -+ w->setProperty("handleDefaultPen", handleDefaultPen); -+ w->setProperty("handleHoverPen", handleHoverPen); -+ w->setProperty("handleClickPen", handleClickPen); -+ w->setProperty("handleDisablePen", handleDisablePen); -+ w->setProperty("sliderGroovePen; ", sliderGroovePen); - } - - if (widget) { -@@ -3467,22 +3466,27 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - - void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int normalRadius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ int normalRadius = (widget && widget->property("normalRadius").isValid()) ? -+ widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - int radius = widget ? (widget->height() / 2 > normalRadius ? normalRadius : widget->height() / 2) : normalRadius; - - bool needTranslucent = false; - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } -- UKUIColorTheme::ProgressBarColorCfg progressColorCfg = readCfg()->progressBarColorCfg(option->palette, needTranslucent ? C_ProgressBar_Translucent : C_ProgressBar_Default); -+ UKUIColorTheme::ProgressBarColorCfg progressColorCfg = readCfg()->progressBarColorCfg(option->palette, -+ needTranslucent ? C_ProgressBar_Translucent : C_ProgressBar_Default); - - QBrush contentBrush = progressColorCfg.contentBrush; - QBrush grooveDefaultBrush = progressColorCfg.grooveDefaultBrush; - QBrush grooveDisableBrush = progressColorCfg.grooveDisableBrush; - -- QPen contentPen = QPen(progressColorCfg.contentPen , (progressColorCfg.contentPen.alpha() == 0 || progressColorCfg.contentPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen grooveDefaultPen = QPen(progressColorCfg.grooveDefaultPen , (progressColorCfg.grooveDefaultPen.alpha() == 0 || progressColorCfg.grooveDefaultPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen grooveDisablePen = QPen(progressColorCfg.grooveDisablePen , (progressColorCfg.grooveDisablePen.alpha() == 0 || progressColorCfg.grooveDisablePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen contentPen = QPen(progressColorCfg.contentPen , (progressColorCfg.contentPen.alpha() == 0 || -+ progressColorCfg.contentPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen grooveDefaultPen = QPen(progressColorCfg.grooveDefaultPen , (progressColorCfg.grooveDefaultPen.alpha() == 0 || -+ progressColorCfg.grooveDefaultPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen grooveDisablePen = QPen(progressColorCfg.grooveDisablePen , (progressColorCfg.grooveDisablePen.alpha() == 0 || -+ progressColorCfg.grooveDisablePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option); - const bool vertical = pb->orientation == Qt::Vertical; -@@ -3520,8 +3524,7 @@ void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, con - } - } - contentBrush = QBrush(linearGradient); -- } -- break; -+ } break; - case AdjustColorRules::HSL: - //content - if(isDark) -@@ -3535,8 +3538,7 @@ void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, con - if(isDark){ - grooveDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else -+ } else - grooveDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -@@ -3550,15 +3552,15 @@ void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, con - - auto *w = const_cast<QWidget *>(widget); - if(w){ -- w->setProperty("ukui_radius", radius); -- w->setProperty("ukui_contentPen", contentPen); -- w->setProperty("ukui_grooveDefaultPen", grooveDefaultPen); -- w->setProperty("ukui_grooveDisablePen", grooveDisablePen); -- w->setProperty("ukui_contentBrush", contentBrush); -- w->setProperty("ukui_grooveDefaultBrush", grooveDefaultBrush); -- w->setProperty("ukui_grooveDisableBrush", grooveDisableBrush); -- w->setProperty("ukui_endColor", endColor); -- w->setProperty("ukui_= startColor", startColor); -+ w->setProperty("radius", radius); -+ w->setProperty("contentPen", contentPen); -+ w->setProperty("grooveDefaultPen", grooveDefaultPen); -+ w->setProperty("grooveDisablePen", grooveDisablePen); -+ w->setProperty("contentBrush", contentBrush); -+ w->setProperty("grooveDefaultBrush", grooveDefaultBrush); -+ w->setProperty("grooveDisableBrush", grooveDisableBrush); -+ w->setProperty("endColor", endColor); -+ w->setProperty("startColor", startColor); - } - - if(widget){ -@@ -3608,7 +3610,8 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } -- UKUIColorTheme::ScrollBarColorCfg scrollBarColorCfg = readCfg()->scrollBarColorCfg(option->palette, needTranslucent ? C_ScrollBar_Translucent : C_ScrollBar_Default); -+ UKUIColorTheme::ScrollBarColorCfg scrollBarColorCfg = readCfg()->scrollBarColorCfg(option->palette, -+ needTranslucent ? C_ScrollBar_Translucent : C_ScrollBar_Default); - - QBrush grooveDefaultBrush = scrollBarColorCfg.grooveDefaultBrush; - QBrush grooveInactiveBrush = scrollBarColorCfg.grooveInactiveBrush; -@@ -3622,8 +3625,9 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option); - - //radius -- int normalRadius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -- if(normalRadius != 0){ -+ int normalRadius = (widget && widget->property("normalRadius").isValid()) ? -+ widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ if (normalRadius != 0) { - if (bar->orientation == Qt::Horizontal) { - sliderRadius = (bar->rect.height()) / 4; - } else { -@@ -3632,9 +3636,9 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - m_ScrollBarParameters.grooveWidthAnimation = true; - ScrooBar_ShowLine = false; - ScroolBar_LineLength = 0; -- } -- else{ -- int normalRadius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ } else { -+ int normalRadius = (widget && widget->property("normalRadius").isValid()) ? -+ widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - sliderRadius = normalRadius; - m_ScrollBarParameters.grooveWidthAnimation = false; - ScrooBar_ShowLine = true; -@@ -3648,8 +3652,8 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB: -- if(!needTranslucent){ -- if(scrollBarColorCfg.sliderHoverType == Obj_Color_Type){ -+ if (!needTranslucent) { -+ if (scrollBarColorCfg.sliderHoverType == Obj_Color_Type) { - //slider hover - if (isDark) { - sliderHoverBrush = QBrush(configMixColor(sliderDefaultBrush.color(), mix, 0.2)); -@@ -3663,8 +3667,7 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - } else { - sliderClickBrush = QBrush(configMixColor(sliderDefaultBrush.color(), mix, 0.2)); - } -- } -- else if(scrollBarColorCfg.sliderHoverType == Obj_Gradient_Type){ -+ } else if (scrollBarColorCfg.sliderHoverType == Obj_Gradient_Type) { - if (bar->orientation == Qt::Horizontal) { - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); -@@ -3708,16 +3711,16 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - } - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -- w->setProperty("ukui_radius", sliderRadius); -- w->setProperty("ukui_grooveDefaultBrush", grooveDefaultBrush); -- w->setProperty("ukui_grooveInactiveBrush", grooveInactiveBrush); -- w->setProperty("ukui_sliderDefaultBrush", sliderDefaultBrush); -- w->setProperty("ukui_sliderHoverBrush", sliderHoverBrush); -- w->setProperty("ukui_sliderClickBrush", sliderClickBrush); -- w->setProperty("ukui_sliderDisableBrush", sliderDisableBrush); -+ if (w) { -+ w->setProperty("radius", sliderRadius); -+ w->setProperty("grooveDefaultBrush", grooveDefaultBrush); -+ w->setProperty("grooveInactiveBrush", grooveInactiveBrush); -+ w->setProperty("sliderDefaultBrush", sliderDefaultBrush); -+ w->setProperty("sliderHoverBrush", sliderHoverBrush); -+ w->setProperty("sliderClickBrush", sliderClickBrush); -+ w->setProperty("sliderDisableBrush", sliderDisableBrush); - } -- if(widget){ -+ if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); - } -@@ -3755,7 +3758,8 @@ void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const Q - { - UKUIColorTheme::ToolTipColorCfg tooltipColorCfg = readCfg()->toolTipColorCfg(option->palette, C_ToolTip_Default); - -- QPen backgroundPen = QPen(tooltipColorCfg.backgroundPen, (tooltipColorCfg.backgroundPen.alpha() == 0 || tooltipColorCfg.backgroundPen == Qt::NoPen ) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen backgroundPen = QPen(tooltipColorCfg.backgroundPen, (tooltipColorCfg.backgroundPen.alpha() == 0 || -+ tooltipColorCfg.backgroundPen == Qt::NoPen ) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //background - auto color = tooltipColorCfg.backgroundBrush; -@@ -3780,9 +3784,10 @@ void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const Q - } - QBrush backgroundBrush = color; - -- int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ int radius = (widget && widget->property("normalRadius").isValid()) ? -+ widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - -- if(widget){ -+ if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); - } -@@ -3795,10 +3800,10 @@ void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const Q - } - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -- w->setProperty("ukui_radius", radius); -- w->setProperty("ukui_backgroundBrush", backgroundBrush); -- w->setProperty("ukui_backgroundPen", backgroundPen); -+ if (w) { -+ w->setProperty("radius", radius); -+ w->setProperty("backgroundBrush", backgroundBrush); -+ w->setProperty("backgroundPen", backgroundPen); - } - m_ToolTipParameters.radius = radius; - m_ToolTipParameters.toolTipBackgroundBrush = backgroundBrush; -@@ -3807,7 +3812,8 @@ void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const Q - - void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int tabradius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ int tabradius = (widget && widget->property("normalRadius").isValid()) ? -+ widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - UKUIColorTheme::TabWidgetColorCfg tabWidgetColorCfg = readCfg()->tabWidgetColorCfg(option->palette, C_TabWidget_Default); - - QBrush widgetBackgroundBrush = tabWidgetColorCfg.widgetBackgroundBrush; -@@ -3823,13 +3829,12 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB: -- if(tabWidgetColorCfg.tabBarHoverType == Obj_Color_Type){ -+ if (tabWidgetColorCfg.tabBarHoverType == Obj_Color_Type) { - //tabbar hover - QColor hover_color = option->palette.color(QPalette::Active, QPalette::Window); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - tabBarHoverBrush = QBrush(configMixColor(hover_color, mix, 0.1)); -- } -- else if(tabWidgetColorCfg.tabBarHoverType == Obj_Gradient_Type){ -+ } else if (tabWidgetColorCfg.tabBarHoverType == Obj_Gradient_Type) { - //tabbar hover - QColor hover_color = option->palette.color(QPalette::Active, QPalette::Window); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -@@ -3858,15 +3863,14 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - if (isDark) { - tabBarHoverBrush = highlightHover(isDark, option->palette); - tabBarClickBrush = highlightClick(isDark, option->palette); -- if(click){ -+ if (click) { - tabBarPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else if(hover && !selected){ -+ } else if(hover && !selected) { - tabBarPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } -- }else { -+ } else { - tabBarHoverBrush = highlightHover(isDark, option->palette); - tabBarClickBrush = highlightClick(isDark, option->palette); - -@@ -3879,24 +3883,23 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - } -- } -- break; -+ } break; - default: - break; - } - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -- w->setProperty("ukui_radius", tabradius); -- w->setProperty("ukui_widgetBackgroundBrush", widgetBackgroundBrush); -- w->setProperty("ukui_tabBarBackgroundBrush", tabBarBackgroundBrush); -- w->setProperty("ukui_tabBarDefaultBrush", tabBarDefaultBrush); -- w->setProperty("ukui_tabBarHoverBrush", tabBarHoverBrush); -- w->setProperty("ukui_tabBarClickBrush", tabBarClickBrush); -- w->setProperty("ukui_tabBarSelectBrush", tabBarSelectBrush); -- w->setProperty("ukui_tabBarPen", tabBarPen); -+ if (w) { -+ w->setProperty("radius", tabradius); -+ w->setProperty("widgetBackgroundBrush", widgetBackgroundBrush); -+ w->setProperty("tabBarBackgroundBrush", tabBarBackgroundBrush); -+ w->setProperty("tabBarDefaultBrush", tabBarDefaultBrush); -+ w->setProperty("tabBarHoverBrush", tabBarHoverBrush); -+ w->setProperty("tabBarClickBrush", tabBarClickBrush); -+ w->setProperty("tabBarSelectBrush", tabBarSelectBrush); -+ w->setProperty("tabBarPen", tabBarPen); - } -- if(widget){ -+ if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - tabradius = widget->property("setRadius").value<int>(); - } -@@ -3935,22 +3938,24 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - - void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int frameradius = (widget && widget->property("windowRadius").isValid()) ? widget->property("windowRadius").toInt() : m_radiusStruct.maxRadius; -- int itemradius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ int frameradius = (widget && widget->property("windowRadius").isValid()) ? -+ widget->property("windowRadius").toInt() : m_radiusStruct.maxRadius; -+ int itemradius = (widget && widget->property("normalRadius").isValid()) ? -+ widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - // QPixmap framePixmap(option->rect.size()); - UKUIColorTheme::MenuColorCfg menuColorCfg = readCfg()->menuColorCfg(C_Menu_Default); - -- QPen menuBackgroundPen = QPen(menuColorCfg.menuBackgroundPen, (menuColorCfg.menuBackgroundPen.alpha() == 0 || menuColorCfg.menuBackgroundPen == Qt::NoPen ) ? -- 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen menuBackgroundPen = QPen(menuColorCfg.menuBackgroundPen, (menuColorCfg.menuBackgroundPen.alpha() == 0 || -+ menuColorCfg.menuBackgroundPen == Qt::NoPen ) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QBrush itemSelectBrush = menuColorCfg.menuItemSelectBrush; - QPen menuHoverPen = menuColorCfg.menuTextHoverPen; - - //item select brush - switch (m_adjustColorRules) { - case HSL: -- if(isDark) -+ if(isDark) { - itemSelectBrush = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 3, 23, -11); -- else{ -+ } else { - itemSelectBrush = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -17, -6); - } - break; -@@ -3981,16 +3986,16 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - QBrush menuBackgroundBrush = color; - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -- w->setProperty("ukui_frameradius", frameradius); -- w->setProperty("ukui_itemradius", itemradius); -- w->setProperty("ukui_menuBackgroundBrush", menuBackgroundBrush); -- w->setProperty("ukui_menuBackgroundPen", menuBackgroundPen); -- w->setProperty("ukui_itemSelectBrush", itemSelectBrush); -- w->setProperty("ukui_menuHoverPen", menuHoverPen); -+ if (w) { -+ w->setProperty("frameradius", frameradius); -+ w->setProperty("itemradius", itemradius); -+ w->setProperty("menuBackgroundBrush", menuBackgroundBrush); -+ w->setProperty("menuBackgroundPen", menuBackgroundPen); -+ w->setProperty("itemSelectBrush", itemSelectBrush); -+ w->setProperty("menuHoverPen", menuHoverPen); - } - -- if(widget){ -+ if (widget) { - if (widget->property("setFrameRadius").isValid() && widget->property("setFrameRadius").canConvert<int>()) { - frameradius = widget->property("setFrameRadius").value<int>(); - } -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 e5150a9..96e315e 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -753,8 +753,7 @@ QPalette UKUIConfigStyle::standardPalette() const - color = QColor(249, 197, 61); - } else if (themeColor == "polarGreen") { - color = QColor(82, 196, 41); -- } -- else if(!themeColor.isEmpty() && themeColor.startsWith("(") && themeColor.endsWith(")")){ -+ } else if (!themeColor.isEmpty() && themeColor.startsWith("(") && themeColor.endsWith(")")) { - QColor c = color; - QString colorStr = themeColor; - colorStr = colorStr.remove(colorStr.length() - 1, 1); -@@ -782,9 +781,9 @@ QPalette UKUIConfigStyle::standardPalette() const - } else - c.setAlphaF(1.0); - } -- }/* else if (list.length() == 1 && list[0].startsWith("#")) { -+ } else if (list.length() == 1 && list[0].length() == 7 && list[0].startsWith("#")) { - c = list[0]; -- }*/ -+ } - - color = c; - } -@@ -1568,13 +1567,11 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - width = sp->m_PushButtonParameters.pushButtonCheckDisablePen.width(); - painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonCheckDisablePen); - painter->setBrush(sp->m_PushButtonParameters.pushButtonCheckDisableBrush); -- } -- else if (button->features & QStyleOptionButton::Flat) { -+ } else if (button->features & QStyleOptionButton::Flat) { - width = 0; - painter->setPen(Qt::NoPen); - painter->setBrush(Qt::NoBrush); -- } -- else { -+ } else { - width = sp->m_PushButtonParameters.pushButtonDisablePen.width(); - painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonDisablePen); - painter->setBrush(sp->m_PushButtonParameters.pushButtonDisableBrush); -@@ -1630,7 +1627,8 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - } else { - if(width == 1 && sp->m_PushButtonParameters.radius != 0) - painter->translate(0.5, 0.5); -- painter->drawRoundedRect(rect.adjusted(width, width, -width, -width), sp->m_PushButtonParameters.radius, sp->m_PushButtonParameters.radius); -+ painter->drawRoundedRect(rect.adjusted(width, width, -width, -width), -+ sp->m_PushButtonParameters.radius, sp->m_PushButtonParameters.radius); - } - painter->restore(); - return; -@@ -5457,8 +5455,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - - - bool hasIcon = false; -- if(isComboBox) -- { -+ if (isComboBox) { - if(!menuItem->icon.isNull()) - hasIcon = true; - // auto *comboBox = qobject_cast<const QComboBox*>(widget); -@@ -5470,8 +5467,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - // break; - // } - // } -- } -- else if(menuItem->maxIconWidth != 0) -+ } else if(menuItem->maxIconWidth != 0) - hasIcon = true; - - // if(qobject_cast<const QMenu*>(widget)) -diff --git a/ukui-styles/window-manager.cpp b/ukui-styles/window-manager.cpp -index 44903ee..4842668 100644 ---- a/ukui-styles/window-manager.cpp -+++ b/ukui-styles/window-manager.cpp -@@ -203,13 +203,13 @@ void WindowManager::mouseMoveEvent(QObject *obj, QMouseEvent *e) - if (!m_prepared_to_drag) - return; - -+ if (m_is_dragging) -+ return; -+ - QWidget *w = qobject_cast<QWidget*>(obj); - const QPoint native = e->globalPos(); - qreal dpiRatio = qApp->devicePixelRatio(); - if (QX11Info::isPlatformX11()) { -- if (m_is_dragging) -- return; -- - // qDebug()<<"x11 move start"; - auto connection = QX11Info::connection(); - xcb_ungrab_pointer(connection, XCB_TIME_CURRENT_TIME); -@@ -262,7 +262,7 @@ void WindowManager::mouseMoveEvent(QObject *obj, QMouseEvent *e) - return; - shellSurface->requestMove(m_seat, m_serial); - #endif -- -+ m_is_dragging = true; - } - - return; diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0011-Update-changelog-4.1.0.0-0k12.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0011-Update-changelog-4.1.0.0-0k12.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0011-Update-changelog-4.1.0.0-0k12.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0011-Update-changelog-4.1.0.0-0k12.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,915 +0,0 @@ -From: xibowen <xibowen@kylinos.cn> -Date: Tue, 21 Nov 2023 15:16:31 +0800 -Subject: Update changelog 4.1.0.0-0k12 - ---- - .../settings/org.ukui.style.gschema.xml | 2 +- - .../widget/filedialog/kyfiledialog.cpp | 14 ++- - ukui-styles/blur-helper.cpp | 4 +- - .../qt5-config-style-ukui/config-shadow-helper.cpp | 8 +- - .../themeconfig/classical.json | 24 +++-- - .../qt5-config-style-ukui/themeconfig/default.json | 14 ++- - .../qt5-config-style-ukui/themeconfig/fashion.json | 14 ++- - .../ukui-config-style-parameters.cpp | 72 +++++++++----- - .../ukui-config-style-parameters.h | 2 + - .../qt5-config-style-ukui/ukui-config-style.cpp | 105 ++++++++++----------- - .../widget-parameters/config-slider-parameters.cpp | 36 +++---- - .../widget-parameters/config-slider-parameters.h | 3 +- - ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp | 6 +- - .../themeconfig/style-ukui-classical.json | 2 +- - ukui-styles/qt5-style-ukui/ukui-style-parameters.h | 1 + - ukui-styles/readconfig.cpp | 4 +- - ukui-styles/themeinformation.h | 5 +- - 17 files changed, 186 insertions(+), 130 deletions(-) - -diff --git a/libqt5-ukui-style/settings/org.ukui.style.gschema.xml b/libqt5-ukui-style/settings/org.ukui.style.gschema.xml -index 45822c5..0d5e127 100644 ---- a/libqt5-ukui-style/settings/org.ukui.style.gschema.xml -+++ b/libqt5-ukui-style/settings/org.ukui.style.gschema.xml -@@ -90,7 +90,7 @@ - </key> - <key type="i" name="window-radius"> - <default>12</default> -- <range min="1" max="12"/> -+ <range min="0" max="12"/> - <summary>Window Radius</summary> - <description>Set the rounded corner size of the window</description> - </key> -diff --git a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -index 497180a..e0906fd 100644 ---- a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -+++ b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -@@ -1684,8 +1684,18 @@ void KyNativeFileDialog::paintEvent(QPaintEvent *e) - // sidebarPath.addRect(adjustedRect.adjusted(6, 0, 0, 0)); - QPainter p(this); - QPainterPath contentPath; -- if(this && this->property("windowRadius").isValid()) -- radius = this->property("windowRadius").toInt(); -+ -+ -+ if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -+ auto settings = UKUIStyleSettings::globalInstance(); -+ if(settings->keys().contains("windowRadius")) -+ radius = settings->get("windowRadius").toInt(); -+ else if(this && this->property("maxRadius").isValid()) -+ radius = this->property("maxRadius").toInt(); -+ } -+ else if(this && this->property("maxRadius").isValid()) -+ radius = this->property("maxRadius").toInt(); -+ - // qDebug() << "KyNativeFileDialog radius........" << radius; - contentPath.addRoundedRect(this->rect(), radius, radius); - auto bgPath = contentPath - sidebarPath; -diff --git a/ukui-styles/blur-helper.cpp b/ukui-styles/blur-helper.cpp -index 0ffe570..6348d56 100644 ---- a/ukui-styles/blur-helper.cpp -+++ b/ukui-styles/blur-helper.cpp -@@ -282,8 +282,8 @@ void BlurHelper::delayUpdate(QWidget *w, bool updateBlurRegionOnly) - } - QPainterPath path; - int radius = 8; -- if(widget->property("windowRadius").isValid()) -- radius = widget->property("windowRadius").toInt(); -+ if(widget->property("maxRadius").isValid()) -+ radius = widget->property("maxRadius").toInt(); - path.addRoundedRect(widget->rect(), radius, radius); - KWindowEffects::enableBlurBehind(widget->winId(), true, path.toFillPolygon().toPolygon()); - if (!updateBlurRegionOnly) -diff --git a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -index e62526d..c586f7a 100644 ---- a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -@@ -155,8 +155,8 @@ QPixmap ConfigShadowHelper::getShadowPixmap(QColor color, /*ConfigShadowHelper:: - QPoint currentPos; - - int qAppMaxradius = maxRadius; -- if(widget && widget->property("windowRadius").isValid()){ -- qAppMaxradius = widget->property("windowRadius").toInt(); -+ if(widget && widget->property("maxRadius").isValid()){ -+ qAppMaxradius = widget->property("maxRadius").toInt(); - // qDebug() << "radius...." << qAppMaxradius; - } - // move to top left arc start point -@@ -259,8 +259,8 @@ QPainterPath ConfigShadowHelper::caculateRelativePainterPath(QWidget *widget, qr - QPointF currentPos; - - int qAppMaxradius = maxRadius; -- if(widget && widget->property("windowRadius").isValid()){ -- qAppMaxradius = widget->property("windowRadius").toInt(); -+ if(widget && widget->property("maxRadius").isValid()){ -+ qAppMaxradius = widget->property("maxRadius").toInt(); - //qDebug() << "radius...." << qAppMaxradius; - } - -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json b/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -index b2587b2..e2d7807 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -@@ -1,6 +1,6 @@ - { - "Radius":{ -- "Window_Radius" : {"value": "0", "type": "int"}, -+ "Max_Radius" : {"value": "0", "type": "int"}, - "Normal_Radius" : {"value": "0", "type": "int"}, - "Min_Radius" : {"value": "0", "type": "int"} - }, -@@ -187,12 +187,12 @@ - }, - "LineEdit":{ - "DefaultLineEdit":{ -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "DisableBrush" : {"value": "Base_at", "type": "paletterole"} - }, - "TranslucentLineEdit":{ - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -@@ -200,7 +200,7 @@ - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "DisableBrush" : {"value": "Base_at", "type": "paletterole"} - } - }, - "SpinBox":{ -@@ -209,7 +209,7 @@ - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} - }, -@@ -217,7 +217,7 @@ - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} - } -@@ -326,7 +326,8 @@ - "GrooveValueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_at", "type": "paletterole"} -+ "GrooveUnvalueDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - }, - "TranslucentSliderBar":{ - "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -@@ -336,7 +337,8 @@ - "GrooveValueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_at", "type": "paletterole"} -+ "GrooveUnvalueDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "ProgressBar":{ -@@ -705,7 +707,8 @@ - "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueHoverBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - }, - "TranslucentSliderBar":{ - "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -@@ -715,7 +718,8 @@ - "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueHoverBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "ProgressBar":{ -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/default.json b/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -index f72a3dc..b55d577 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -@@ -1,6 +1,6 @@ - { - "Radius":{ -- "Window_Radius" : {"value": "8", "type": "int"}, -+ "Max_Radius" : {"value": "8", "type": "int"}, - "Normal_Radius" : {"value": "6", "type": "int"}, - "Min_Radius" : {"value": "4", "type": "int"} - }, -@@ -348,13 +348,15 @@ - "HandleHoverBrush" : { "type": "color"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - }, - "TranslucentSliderBar":{ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "color"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "ProgressBar":{ -@@ -752,13 +754,15 @@ - "HandleHoverBrush" : { "type": "color"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "HighLight_dis", "type": "paletterole"} -+ "GrooveUnvalueDisableBrush" : {"value": "HighLight_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - }, - "TranslucentSliderBar":{ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "color"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "HighLight_dis", "type": "paletterole"} -+ "GrooveUnvalueDisableBrush" : {"value": "HighLight_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "ProgressBar":{ -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json b/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -index 141b63f..63645c6 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -@@ -1,6 +1,6 @@ - { - "Radius":{ -- "Window_Radius" : {"value": "8", "type": "int"}, -+ "Max_Radius" : {"value": "8", "type": "int"}, - "Normal_Radius" : {"value": "6", "type": "int"}, - "Min_Radius" : {"value": "4", "type": "int"} - }, -@@ -341,13 +341,15 @@ - "HandleHoverBrush" : {"type": "gradient"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - }, - "TranslucentSliderBar":{ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "gradient"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "ProgressBar":{ -@@ -746,13 +748,15 @@ - "HandleHoverBrush" : { "type": "gradient"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - }, - "TranslucentSliderBar":{ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "gradient"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -- "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "ProgressBar":{ -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index 794390e..3dad245 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -385,7 +385,7 @@ bool UKUIConfigStyleParameters::isDefaultThemeColor() - - void UKUIConfigStyleParameters::updateParameters(bool isTabletMode) - { -- if(isTabletMode){//styleName == "ukui-dark"){// -+ if (isTabletMode) {//styleName == "ukui-dark"){// - m_scaleRatio4_3 = (4 * 1.0) / 3.0; - m_scaleRatio3_2 = (3 * 1.0) / 2.0; - m_scaleRatio2_1 = (2 * 1.0) / 1.0; -@@ -397,8 +397,7 @@ void UKUIConfigStyleParameters::updateParameters(bool isTabletMode) - m_isTableMode = true; - m_spinBoxControlLayout = SpinBoxControlLayout::Horizontal; - m_headerDefaultSectionSizeVertical = m_headerDefaultSectionSizeVertical4_3; -- } -- else{ -+ } else { - m_scaleRatio4_3 = 1.0; - m_scaleRatio3_2 = 1.0; - m_scaleRatio2_1 = 1.0; -@@ -426,6 +425,7 @@ void UKUIConfigStyleParameters::updateParameters(bool isTabletMode) - ScroolBar_Width = ScroolBar_Width_origin * m_scaleRatio3_2; - Slider_Length = Slider_Length_origin * m_scaleRatio2_1; - Slider_Thickness = Slider_Thickness_origin * m_scaleRatio2_1; -+ Slider_DefaultWidth = Slider_DefaultWidth_origin * m_scaleRatio2_1; - Slider_GrooveLength = Slider_GrooveLength_origin * m_scaleRatio2_1; - Slider_DefaultLength = Slider_DefaultLength_origin * m_scaleSliderDefaultLength; - LineEdit_DefaultWidth = LineEdit_DefaultWidth_origin * m_ScaleLineEditDefaultLength; -@@ -897,6 +897,7 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); - - auto *w = const_cast<QWidget *>(widget); -+ - if (w) { - w->setProperty("radius", radius); - w->setProperty("defaultBrush", defaultBrush); -@@ -1065,7 +1066,7 @@ void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, - } - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -+ if (w) { - w->setProperty("iconHighlight", iconHighlight); - w->setProperty("textHighlight", textHighlight); - w->setProperty("textColor", textColor); -@@ -1324,7 +1325,7 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -+ if (w) { - w->setProperty("radius", radius); - w->setProperty("defaultBrush", defaultBrush); - w->setProperty("clickBrush", clickBrush); -@@ -1332,7 +1333,7 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - w->setProperty("disableBrush", disableBrush); - w->setProperty("checkBrush", checkBrush); - w->setProperty("checkHoverBrush", checkHoverBrush); -- w->setProperty("_checkClickBrush", checkClickBrush); -+ w->setProperty("checkClickBrush", checkClickBrush); - w->setProperty("checkDisableBrush", checkDisableBrush); - w->setProperty("defaultPen", defaultPen); - w->setProperty("clickPen", clickPen); -@@ -1595,6 +1596,15 @@ void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const - defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - hoverPen = defaultPen; -+ //disable state -+ if (isDark) { -+ disablePen = QPen(QBrush(adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), 18)), -+ 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ -+ } else { -+ disablePen = QPen(option->palette.brush(QPalette::Disabled, QPalette::Button), -+ 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ } - } - break; - default: -@@ -1602,7 +1612,7 @@ void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const - } - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -+ if (w) { - w->setProperty("radius", radius); - w->setProperty("defaultBrush", defaultBrush); - w->setProperty("focusBrush", focusBrush); -@@ -2166,18 +2176,18 @@ void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const - } - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -+ if (w) { - w->setProperty("radius", radius); -- w->setProperty("defaultBrush", defaultBrush); -- w->setProperty("onBrush", onBrush); -- w->setProperty("hoverBrush", hoverBrush); -- w->setProperty("disableBrush", disableBrush); -- w->setProperty("editBrush", editBrush); -- w->setProperty("defaultPen", defaultPen); -- w->setProperty("hoverPen", hoverPen); -- w->setProperty("disablePen", disablePen); -- w->setProperty("onPen", onPen); -- w->setProperty("editPen", editPen); -+ w->setProperty("defaultBrush", defaultBrush); -+ w->setProperty("onBrush", onBrush); -+ w->setProperty("hoverBrush", hoverBrush); -+ w->setProperty("disableBrush", disableBrush); -+ w->setProperty("editBrush", editBrush); -+ w->setProperty("defaultPen", defaultPen); -+ w->setProperty("hoverPen", hoverPen); -+ w->setProperty("disablePen", disablePen); -+ w->setProperty("onPen", onPen); -+ w->setProperty("editPen", editPen); - } - - if (widget) { -@@ -3233,8 +3243,13 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - sliderColorCfg.handleDisablePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen sliderGroovePen = QPen(sliderColorCfg.sliderGroovePen , (sliderColorCfg.sliderGroovePen.alpha() == 0 || - sliderColorCfg.sliderGroovePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen focusPen = QPen(sliderColorCfg.focusPen , (sliderColorCfg.focusPen.alpha() == 0 || -+ sliderColorCfg.focusPen == Qt::NoPen) ? 0 : 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPainterPath handlePath; - -+ int radius = (widget && widget->property("normalRadius").isValid()) ? -+ widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ - const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option); - const bool horizontal = slider->orientation == Qt::Horizontal; - -@@ -3370,7 +3385,8 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - - auto *w = const_cast<QWidget *>(widget); - if (w) { -- w->setProperty("grooveRadius", grooveRadius); -+ w->setProperty("radius", radius); -+ w->setProperty("grooveRadius", grooveRadius); - w->setProperty("handleDefaultBrush", handleDefaultBrush); - w->setProperty("handleHoverBrush", handleHoverBrush); - w->setProperty("handleClickBrush", handleClickBrush); -@@ -3385,10 +3401,14 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - w->setProperty("handleHoverPen", handleHoverPen); - w->setProperty("handleClickPen", handleClickPen); - w->setProperty("handleDisablePen", handleDisablePen); -- w->setProperty("sliderGroovePen; ", sliderGroovePen); -+ w->setProperty("sliderGroovePen", sliderGroovePen); -+ w->setProperty("focusPen", focusPen); - } - - if (widget) { -+ if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -+ radius = widget->property("setRadius").value<int>(); -+ } - if (widget->property("setGrooveRadius").isValid() && widget->property("setGrooveRadius").canConvert<int>()) { - grooveRadius = widget->property("setGrooveRadius").value<int>(); - } -@@ -3438,8 +3458,12 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - if (widget->property("setSliderGroovePen").isValid() && widget->property("setSliderGroovePen").canConvert<QBrush>()) { - sliderGroovePen = widget->property("setSliderGroovePen").value<QPen>(); - } -+ if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QBrush>()) { -+ focusPen = widget->property("setFocusPen").value<QPen>(); -+ } - } - -+ m_SliderParameters.radius = radius; - m_SliderParameters.sliderGrooveRadius = grooveRadius; - - m_SliderParameters.sliderHandleDefaultBrush = handleDefaultBrush; -@@ -3460,6 +3484,8 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - m_SliderParameters.sliderHandleClickPen = handleClickPen; - m_SliderParameters.sliderHandleDisablePen = handleDisablePen; - m_SliderParameters.sliderGroovePen = sliderGroovePen; -+ m_SliderParameters.focusPen = focusPen; -+ - - m_SliderParameters.sliderHandlePath = handlePath; - } -@@ -3551,7 +3577,7 @@ void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, con - } - - auto *w = const_cast<QWidget *>(widget); -- if(w){ -+ if (w) { - w->setProperty("radius", radius); - w->setProperty("contentPen", contentPen); - w->setProperty("grooveDefaultPen", grooveDefaultPen); -@@ -3938,8 +3964,8 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - - void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- int frameradius = (widget && widget->property("windowRadius").isValid()) ? -- widget->property("windowRadius").toInt() : m_radiusStruct.maxRadius; -+ int frameradius = (widget && widget->property("maxRadius").isValid()) ? -+ widget->property("maxRadius").toInt() : m_radiusStruct.maxRadius; - int itemradius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - // QPixmap framePixmap(option->rect.size()); -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -index 7f90729..e3ee64e 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -@@ -230,6 +230,8 @@ public: - // slider - int Slider_DefaultLength = 94; - int Slider_DefaultLength_origin = 94; -+ int Slider_DefaultWidth = 34; -+ int Slider_DefaultWidth_origin = 34; - int Slider_Length = 20; - int Slider_Length_origin = 20; - int Slider_Thickness = 20; -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 96e315e..02683a6 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -265,13 +265,7 @@ UKUIConfigStyle::UKUIConfigStyle(bool dark, bool useDefault, QString type) : QPr - - sp = new UKUIConfigStyleParameters(this, isUseDarkPalette(), m_widget_theme); - -- if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -- auto settings = UKUIStyleSettings::globalInstance(); -- if(settings->keys().contains("windowRadius")) -- setProperty("windowRadius", settings->get("windowRadius").toInt()); -- else -- setProperty("windowRadius", sp->radiusProperty().maxRadius); -- } -+ setProperty("maxRadius", sp->radiusProperty().maxRadius); - setProperty("normalRadius", sp->radiusProperty().normalRadius); - setProperty("minRadius", sp->radiusProperty().minRadius); - } -@@ -968,30 +962,9 @@ void UKUIConfigStyle::polish(QWidget *widget) - - if(!widget) - return; -- -- if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -- auto settings = UKUIStyleSettings::globalInstance(); -- if(settings->keys().contains("windowRadius")) -- widget->setProperty("windowRadius", settings->get("windowRadius").toInt()); -- else -- widget->setProperty("windowRadius", sp->radiusProperty().maxRadius); -- } -- --// if(settings->keys().contains("normalRadius")) --// widget->setProperty("normalRadius", settings->get("normalRadius").toInt()); --// else --// widget->setProperty("normalRadius", sp->radiusProperty().normalRadius); -- --// if(settings->keys().contains("minRadius")) --// widget->setProperty("minRadius", settings->get("minRadius").toInt()); --// else --// widget->setProperty("minRadius", sp->radiusProperty().minRadius); --// } --// else{ -- widget->setProperty("normalRadius", sp->radiusProperty().normalRadius); -- widget->setProperty("minRadius", sp->radiusProperty().minRadius); --// } -- -+ widget->setProperty("maxRadius", sp->radiusProperty().maxRadius); -+ widget->setProperty("normalRadius", sp->radiusProperty().normalRadius); -+ widget->setProperty("minRadius", sp->radiusProperty().minRadius); - - Style::polish(widget); - -@@ -1612,7 +1585,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - } - - //focus -- if (focus && focusStateActiveList().contains(qAppName())) { -+ if (focus) { - width = sp->m_PushButtonParameters.pushButtonFocusPen.width(); - painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonFocusPen); - } -@@ -1920,7 +1893,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - } - - //focus -- if (focus && focusStateActiveList().contains(qAppName())) { -+ if (focus) { - width = sp->m_ToolButtonParameters.toolButtonFocusPen.width(); - painter->setPen(width <= 0 ? Qt::NoPen : sp->m_ToolButtonParameters.toolButtonFocusPen); - } -@@ -3542,10 +3515,12 @@ void UKUIConfigStyle::drawComplexControl(QStyle::ComplexControl control, const Q - sp->initConfigSliderParameters(isUseDarkPalette(), option, widget); - QRect groove = proxy()->subControlRect(CC_Slider, option, SC_SliderGroove, widget); - QRect handle = proxy()->subControlRect(CC_Slider, option, SC_SliderHandle, widget); -+ int width = 0; - const bool horizontal = slider->orientation == Qt::Horizontal; - const bool enable = slider->state & State_Enabled; - const bool hover = slider->state & State_MouseOver; - const bool suken = slider->state & State_Sunken; -+ const bool focus = slider->state & State_HasFocus; - if (slider->subControls & SC_SliderGroove) { - if (horizontal) { - groove.setHeight(sp->Slider_GrooveLength); -@@ -3694,6 +3669,19 @@ void UKUIConfigStyle::drawComplexControl(QStyle::ComplexControl control, const Q - painter->drawPath(sp->m_SliderParameters.sliderHandlePath); - painter->restore(); - } -+ -+ if (enable && focus) { -+ painter->save(); -+ painter->setRenderHint(QPainter::Antialiasing, true); -+ painter->setPen(sp->m_SliderParameters.focusPen.width() == 0 ? Qt::NoPen : sp->m_SliderParameters.focusPen); -+ width = painter->pen().width(); -+ if(width == 1) -+ painter->translate(0.5, 0.5); -+ painter->setBrush(Qt::NoBrush); -+ painter->drawRoundedRect(slider->rect.adjusted(width, width, -width, -width), -+ sp->m_SliderParameters.radius, sp->m_SliderParameters.radius); -+ painter->restore(); -+ } - return; - } - break; -@@ -5415,9 +5403,9 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - QIcon::Mode mode = enable ? QIcon::Active : QIcon::Disabled; - QPixmap pixmap = icon.pixmap(iconWidth, iconWidth, mode , QIcon::On); - QPixmap drawPixmap; -- if(!isComboBox && !sp->indicatorIconHoverNeedHighLight) -- drawPixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -- else -+// if(!isComboBox && !sp->indicatorIconHoverNeedHighLight) -+// drawPixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -+// else - drawPixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); - - QRect iconRect(drawRect.x(), drawRect.y() + (drawRect.height() - iconWidth) / 2, iconWidth, iconWidth); -@@ -5436,9 +5424,9 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - QIcon::Mode mode = enable ? (selected ? QIcon::Active : QIcon::Normal) : QIcon::Disabled; - QPixmap pixmap = icon.pixmap(iconWidth, iconWidth, mode , QIcon::On); - QPixmap drawPixmap; -- if(!isComboBox && !sp->indicatorIconHoverNeedHighLight) -- drawPixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -- else -+// if(!isComboBox && !sp->indicatorIconHoverNeedHighLight) -+// drawPixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -+// else - drawPixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); - - QRect iconRect(drawRect.x(), drawRect.y() + (drawRect.height() - iconWidth) / 2, iconWidth, iconWidth); -@@ -5515,9 +5503,9 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - QPixmap pixmap = menuItem->icon.pixmap(iconSize, mode, state); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); - QPixmap target; -- if(!isComboBox && !sp->indicatorIconHoverNeedHighLight) -- target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -- else -+// if(!isComboBox && !sp->indicatorIconHoverNeedHighLight) -+// target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -+// else - target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); - - -@@ -6279,8 +6267,7 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - int lineLength = 0; - int distance = 4; - if (sp->ScrooBar_ShowLine && widget && ((widget->property("drawScrollBarGroove").isValid() && -- widget->property("drawScrollBarGroove").toBool()) || !widget->property("drawScrollBarGroove").isValid())) -- { -+ widget->property("drawScrollBarGroove").toBool()) || !widget->property("drawScrollBarGroove").isValid())) { - lineLength = sp->ScroolBar_LineLength; - distance = 0; - } -@@ -6303,7 +6290,8 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - auto animator = m_scrollbar_animation_helper->animator(widget); - bool hasAnimation = widget &&(!widget->property("animation").isValid() || - (widget->property("animation").isValid() && widget->property("animation").toBool())); -- int sliderstart = lineLength + sliderPositionFromValue(bar->minimum, bar->maximum, bar->sliderPosition, maxlen - sliderlen, bar->upsideDown) + distance / 2; -+ int sliderstart = lineLength + sliderPositionFromValue(bar->minimum, bar->maximum, -+ bar->sliderPosition,maxlen - sliderlen, bar->upsideDown) + distance / 2; - - // qDebug() << "sliderstart0000......" << sliderstart << lineLength << bar->sliderPosition; - if (animator && hasAnimation) { -@@ -6321,10 +6309,12 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - int endValue = animator->getExtraProperty("end_position").toInt(); - int v = startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal(); - // qDebug() << "v...................." << v << startValue << endValue; -- if(v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)){ -+ if (v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)) { - sbar->setValue(v); -- auto startPos = sliderPositionFromValue(bar->minimum, bar->maximum, startValue, maxlen - sliderlen, bar->upsideDown) + distance / 2; -- auto endPos = sliderPositionFromValue(bar->minimum, bar->maximum, endValue, maxlen - sliderlen, bar->upsideDown) + distance / 2; -+ auto startPos = sliderPositionFromValue(bar->minimum, bar->maximum, startValue, -+ maxlen - sliderlen, bar->upsideDown) + distance / 2; -+ auto endPos = sliderPositionFromValue(bar->minimum, bar->maximum, -+ endValue, maxlen - sliderlen, bar->upsideDown) + distance / 2; - - // qDebug() << "startpos....:" << startPos << "endpos...:" << endPos; - sliderstart = lineLength + startPos + (endPos - startPos) * 1.0 * animator->value("move_position").toReal(); -@@ -6441,7 +6431,8 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - int sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum, slider->sliderValue, - proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); - // qDebug() << "sliderPos000........" << sliderPos; -- bool hasAnimation = widget && ((widget->property("animation").isValid() && widget->property("animation").toBool())||(!widget->property("animation").isValid())); -+ bool hasAnimation = widget && ((widget->property("animation").isValid() && widget->property("animation").toBool()) || -+ (!widget->property("animation").isValid())); - if (slider && animator && hasAnimation){ - if(animator->isRunning("move_position") || - (animator->getExtraProperty("start_position").toInt() != -@@ -6454,7 +6445,7 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - // qDebug() << "value:.........." << animator->value("move_position").toReal(); - - QAbstractSlider *sbar = const_cast<QAbstractSlider *>(sliderBar); -- if(sbar){ -+ if (sbar) { - int startValue = animator->getExtraProperty("start_position").toInt(); - int endValue = animator->getExtraProperty("end_position").toInt(); - // qDebug() << "startvalue:" << startValue << "endvalue:" << endValue -@@ -6466,9 +6457,9 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - sbar->setValue(startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal()); - - auto startPos = sliderPositionFromValue(slider->minimum, slider->maximum, startValue, -- proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); -+ proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); - auto endPos = sliderPositionFromValue(slider->minimum, slider->maximum, endValue, -- proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); -+ proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); - sliderPos = startPos + (endPos - startPos) * 1.0 * animator->value("move_position").toReal(); - // qDebug() << "sliderPos1111........" << sliderPos; - } -@@ -7517,13 +7508,19 @@ QSize UKUIConfigStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt - { - if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) { - const bool horizontal(slider->orientation == Qt::Horizontal); -+ -+ qDebug()<<"oldSize"<<newSize; -+ - if (horizontal) { -- newSize.setHeight(newSize.height() + 2 * sp->Slider_Margin); -+ newSize.setHeight(qMax(newSize.height() + 2 * sp->Slider_Margin, sp->Slider_DefaultWidth)); - newSize.setWidth(qMax(newSize.width(), sp->Slider_DefaultLength)); - } else { -- newSize.setWidth(newSize.width() + 2 * sp->Slider_Margin); -+ newSize.setWidth(qMax(newSize.width() + 2 * sp->Slider_Margin, sp->Slider_DefaultWidth)); - newSize.setHeight(qMax(newSize.height(), sp->Slider_DefaultLength)); - } -+ -+ qDebug()<<"newSize"<<newSize; -+ - return newSize; - } - break; -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp -index d08fa1a..d204171 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp -@@ -27,22 +27,24 @@ using namespace UKUIConfigStyleSpace; - - ConfigSliderParameters::ConfigSliderParameters() - { -- -+ radius = 0; - sliderHandleDefaultPen = QPen(Qt::NoPen); -- sliderHandleHoverPen = QPen(Qt::NoPen);; -- sliderHandleClickPen = QPen(Qt::NoPen);; -- sliderHandleDisablePen = QPen(Qt::NoPen);; -- -- sliderHandleDefaultBrush = QBrush(Qt::NoBrush); -- sliderHandleHoverBrush = QBrush(Qt::NoBrush); -- sliderHandleClickBrush = QBrush(Qt::NoBrush); -- sliderHandleDisableBrush = QBrush(Qt::NoBrush); -- -- sliderGrooveValueDefaultBrush = QBrush(Qt::NoBrush); -- sliderGrooveValueHoverBrush = QBrush(Qt::NoBrush); -- sliderGrooveValueDisableBrush = QBrush(Qt::NoBrush); -- -- sliderGrooveUnvalueDefaultBrush = QBrush(Qt::NoBrush); -- sliderGrooveUnvalueHoverBrush = QBrush(Qt::NoBrush); -- sliderGrooveUnvalueDisableBrush = QBrush(Qt::NoBrush); -+ sliderHandleHoverPen = QPen(Qt::NoPen); -+ sliderHandleClickPen = QPen(Qt::NoPen); -+ sliderHandleDisablePen = QPen(Qt::NoPen); -+ sliderGroovePen = QPen(Qt::NoPen); -+ focusPen = QPen(Qt::NoPen); -+ -+ sliderHandleDefaultBrush = QBrush(Qt::NoBrush); -+ sliderHandleHoverBrush = QBrush(Qt::NoBrush); -+ sliderHandleClickBrush = QBrush(Qt::NoBrush); -+ sliderHandleDisableBrush = QBrush(Qt::NoBrush); -+ -+ sliderGrooveValueDefaultBrush = QBrush(Qt::NoBrush); -+ sliderGrooveValueHoverBrush = QBrush(Qt::NoBrush); -+ sliderGrooveValueDisableBrush = QBrush(Qt::NoBrush); -+ -+ sliderGrooveUnvalueDefaultBrush = QBrush(Qt::NoBrush); -+ sliderGrooveUnvalueHoverBrush = QBrush(Qt::NoBrush); -+ sliderGrooveUnvalueDisableBrush = QBrush(Qt::NoBrush); - } -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -index 8722603..ef39fab 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -@@ -35,7 +35,7 @@ public: - ConfigSliderParameters(); - - //private: --// int radius; -+ int radius; - QBrush sliderHandleDefaultBrush; - QBrush sliderHandleHoverBrush; - QBrush sliderHandleClickBrush; -@@ -54,6 +54,7 @@ public: - QPen sliderHandleClickPen = Qt::NoPen; - QPen sliderHandleDisablePen = Qt::NoPen; - QPen sliderGroovePen = Qt::NoPen; -+ QPen focusPen = Qt::NoPen; - QPainterPath sliderHandlePath; - - // bool animation = true; -diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp b/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp -index e0bd4bf..9cd3e3b 100644 ---- a/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp -+++ b/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp -@@ -261,7 +261,7 @@ Qt5UKUIStyle::Qt5UKUIStyle(bool dark, bool useDefault, QString type) : QProxySty - sp = new KClassicalStyleParameters(this, isUseDarkPalette()); - - qDebug() << "classical setproperty........" << sp->radiusProperty().maxRadius << sp->radiusProperty().normalRadius << sp->radiusProperty().minRadius; -- setProperty("windowRadius", sp->radiusProperty().maxRadius); -+ setProperty("maxRadius", sp->radiusProperty().maxRadius); - setProperty("normalRadius", sp->radiusProperty().normalRadius); - setProperty("minRadius", sp->radiusProperty().minRadius); - } -@@ -1502,7 +1502,7 @@ void Qt5UKUIStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleO - } - - //focus -- if (focus && focusStateActiveList().contains(qAppName())) { -+ if (focus) { - width = sp->pushButtonParameters.pushButtonFocusPen.width(); - painter->setPen(sp->pushButtonParameters.pushButtonFocusPen); - } -@@ -1812,7 +1812,7 @@ void Qt5UKUIStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleO - } - - //focus -- if (focus && focusStateActiveList().contains(qAppName())) { -+ if (focus) { - width = sp->toolButtonParameters.toolButtonFocusPen.width(); - painter->setPen(sp->toolButtonParameters.toolButtonFocusPen); - } -diff --git a/ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json b/ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json -index 3164a16..45be0db 100644 ---- a/ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json -+++ b/ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json -@@ -1,6 +1,6 @@ - { - "Radius":{ -- "Window_Radius" : {"value": "0", "type": "int"}, -+ "Max_Radius" : {"value": "0", "type": "int"}, - "Normal_Radius" : {"value": "0", "type": "int"}, - "Min_Radius" : {"value": "0", "type": "int"} - } -diff --git a/ukui-styles/qt5-style-ukui/ukui-style-parameters.h b/ukui-styles/qt5-style-ukui/ukui-style-parameters.h -index 4809481..d652d56 100644 ---- a/ukui-styles/qt5-style-ukui/ukui-style-parameters.h -+++ b/ukui-styles/qt5-style-ukui/ukui-style-parameters.h -@@ -133,6 +133,7 @@ public: - // slider - int Slider_DefaultLength = 94; - int Slider_DefaultLength_origin = 94; -+ int Slider_DefaultWidth = 94; - int Slider_Length = 20; - int Slider_Length_origin = 20; - int Slider_Thickness = 20; -diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp -index 2c51920..0526356 100644 ---- a/ukui-styles/readconfig.cpp -+++ b/ukui-styles/readconfig.cpp -@@ -990,6 +990,8 @@ UKUIColorTheme::SliderBarColorCfg ReadThemeConfig::sliderBarColorCfg(const QPale - m_readConfig->getColorValue(m_sliderBarColorCfg.handleClickPen , m_theme, UKUISliderBar, property, C_SliderBar_HandleClickPen ); - m_readConfig->getColorValue(m_sliderBarColorCfg.handleDisablePen, m_theme, UKUISliderBar, property, C_SliderBar_HandleDisablePen); - m_readConfig->getColorValue(m_sliderBarColorCfg.sliderGroovePen , m_theme, UKUISliderBar, property, C_SliderBar_SliderGroovePen ); -+ m_readConfig->getColorValue(m_sliderBarColorCfg.focusPen , m_theme, UKUISliderBar, property, C_SliderBar_FocusPen); -+ - - m_sliderBarColorCfg.handleHoverType = m_readConfig->getType(m_theme, UKUISliderBar, property, C_SliderBar_HandleHoverBrush); - if(m_sliderBarColorCfg.handleHoverType == Obj_Gradient_Type){ -@@ -1128,7 +1130,7 @@ UKUIRadiusInformation::UKUIRadiusStruct ReadThemeConfig::getRadiusStruct(QString - if(!m_loadConfig) - return m_radiusStruct; - -- getRadius(Window_Radius, m_radiusStruct.maxRadius); -+ getRadius(Max_Radius, m_radiusStruct.maxRadius); - getRadius(Normal_Radius, m_radiusStruct.normalRadius); - getRadius(Min_Radius, m_radiusStruct.minRadius); - return m_radiusStruct; -diff --git a/ukui-styles/themeinformation.h b/ukui-styles/themeinformation.h -index 8af8bc8..c0a3df0 100644 ---- a/ukui-styles/themeinformation.h -+++ b/ukui-styles/themeinformation.h -@@ -43,7 +43,7 @@ - #define Obj_PaletteRole_Type "paletterole" - - #define UKUI_Radius "Radius" --#define Window_Radius "Window_Radius" -+#define Max_Radius "Max_Radius" - #define Normal_Radius "Normal_Radius" - #define Min_Radius "Min_Radius" - -@@ -245,6 +245,8 @@ - #define C_SliderBar_HandleClickPen "HandleClickPen" - #define C_SliderBar_HandleDisablePen "HandleDisablePen" - #define C_SliderBar_SliderGroovePen "SliderGroovePen" -+#define C_SliderBar_FocusPen "FocusPen" -+ - - #define UKUIProgressBar "ProgressBar" - #define C_ProgressBar_Default "DefaultProgressBar" -@@ -742,6 +744,7 @@ typedef struct SliderBarColorStruct - QColor handleClickPen = Qt::NoPen; - QColor handleDisablePen = Qt::NoPen; - QColor sliderGroovePen = Qt::NoPen; -+ QColor focusPen = Qt::NoPen; - - QList<QColor> handleHoverGradientList; - QString handleHoverType = "color"; diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0012-rebuild-for-qt-5.15.10.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0012-rebuild-for-qt-5.15.10.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0012-rebuild-for-qt-5.15.10.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0012-rebuild-for-qt-5.15.10.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,18866 +0,0 @@ -From: handsome-feng <jianfengli@ubuntukylin.com> -Date: Thu, 23 Nov 2023 19:21:44 +0800 -Subject: rebuild for qt 5.15.10 - ---- - .../themeconfig/classical.json | 2 +- - .../qt5-config-style-ukui/ukui-config-style.cpp | 56 +- - .../qt5-style-ukui/animations/animations.pri | 38 - - .../animations/box-animation-helper.cpp | 77 - - .../animations/box-animation-helper.h | 48 - - .../qt5-style-ukui/animations/box-animator.cpp | 246 - - .../qt5-style-ukui/animations/box-animator.h | 66 - - .../animations/button-animation-helper.cpp | 77 - - .../animations/button-animation-helper.h | 47 - - .../qt5-style-ukui/animations/button-animator.cpp | 260 - - .../qt5-style-ukui/animations/button-animator.h | 72 - - .../animations/checkbox-animation-helper.cpp | 79 - - .../animations/checkbox-animation-helper.h | 47 - - .../animations/checkbox-animator.cpp | 398 -- - .../qt5-style-ukui/animations/checkbox-animator.h | 72 - - .../animations/progressbar-animation-helper.cpp | 79 - - .../animations/progressbar-animation-helper.h | 50 - - .../animations/progressbar-animation.cpp | 57 - - .../animations/progressbar-animation.h | 44 - - .../animations/radiobutton-animation-helper.cpp | 75 - - .../animations/radiobutton-animation-helper.h | 47 - - .../animations/radiobutton-animator.cpp | 260 - - .../animations/radiobutton-animator.h | 67 - - .../animations/scrollbar-animation-helper.cpp | 79 - - .../animations/scrollbar-animation-helper.h | 45 - - .../animations/slider-animation-helper.cpp | 78 - - .../animations/slider-animation-helper.h | 45 - - .../qt5-style-ukui/animations/slider-animator.cpp | 392 - - .../qt5-style-ukui/animations/slider-animator.h | 79 - - .../animations/tab-widget-animation-helper.cpp | 75 - - .../animations/tab-widget-animation-helper.h | 42 - - .../animations/tree-animation-helper.cpp | 78 - - .../animations/tree-animation-helper.h | 45 - - .../qt5-style-ukui/animations/tree-animator.cpp | 296 - - .../qt5-style-ukui/animations/tree-animator.h | 76 - - .../qt5-style-ukui/breezeboxshadowrenderer.cpp | 766 -- - .../qt5-style-ukui/breezeboxshadowrenderer.h | 268 - - ukui-styles/qt5-style-ukui/qt5-style-ukui.json | 3 - - ukui-styles/qt5-style-ukui/qt5-style-ukui.pri | 26 - - ukui-styles/qt5-style-ukui/qt5-style-ukui.pro | 63 - - .../qt5-style-ukui/qt5-ukui-style-helper.cpp | 203 - - ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.h | 36 - - .../qt5-style-ukui/qt5-ukui-style-plugin.cpp | 87 - - ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.h | 52 - - ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp | 7529 -------------------- - ukui-styles/qt5-style-ukui/qt5-ukui-style.h | 206 - - ukui-styles/qt5-style-ukui/shadow-helper.cpp | 387 - - ukui-styles/qt5-style-ukui/shadow-helper.h | 74 - - .../themeconfig/style-ukui-classical.json | 7 - - .../qt5-style-ukui/ukui-style-parameters.cpp | 2495 ------- - ukui-styles/qt5-style-ukui/ukui-style-parameters.h | 340 - - ukui-styles/qt5-style-ukui/view-helper.cpp | 384 - - .../widget-parameters/checkbox-parameters.cpp | 54 - - .../widget-parameters/checkbox-parameters.h | 59 - - .../widget-parameters/combobox-parameters.cpp | 44 - - .../widget-parameters/combobox-parameters.h | 51 - - .../widget-parameters/lineedit-parameters.cpp | 42 - - .../widget-parameters/lineedit-parameters.h | 51 - - .../widget-parameters/list-parameters.cpp | 36 - - .../widget-parameters/list-parameters.h | 50 - - .../widget-parameters/menu-parameters.cpp | 32 - - .../widget-parameters/menu-parameters.h | 47 - - .../widget-parameters/progressbar-parameters.cpp | 40 - - .../widget-parameters/progressbar-parameters.h | 50 - - .../widget-parameters/pushbutton-parameters.cpp | 59 - - .../widget-parameters/pushbutton-parameters.h | 72 - - .../widget-parameters/radiobutton-parameters.cpp | 28 - - .../widget-parameters/radiobutton-parameters.h | 60 - - .../widget-parameters/scrollbar-parameters.cpp | 28 - - .../widget-parameters/scrollbar-parameters.h | 47 - - .../widget-parameters/slider-parameters.cpp | 47 - - .../widget-parameters/slider-parameters.h | 62 - - .../widget-parameters/spinbox-parameters.cpp | 76 - - .../widget-parameters/spinbox-parameters.h | 77 - - .../widget-parameters/table-parameters.cpp | 36 - - .../widget-parameters/table-parameters.h | 49 - - .../widget-parameters/tabwidget-parameters.cpp | 29 - - .../widget-parameters/tabwidget-parameters.h | 49 - - .../widget-parameters/toolbutton-parameters.cpp | 59 - - .../widget-parameters/toolbutton-parameters.h | 61 - - .../widget-parameters/tooltip-parameters.cpp | 29 - - .../widget-parameters/tooltip-parameters.h | 41 - - .../widget-parameters/tree-parameters.cpp | 41 - - .../widget-parameters/tree-parameters.h | 56 - - .../widget-parameters/widget-parameters.pri | 39 - - ukui-styles/ukui-style-plugin.cpp | 1 - - ukui-styles/ukui-styles.pro | 1 - - 87 files changed, 55 insertions(+), 18068 deletions(-) - delete mode 100644 ukui-styles/qt5-style-ukui/animations/animations.pri - delete mode 100644 ukui-styles/qt5-style-ukui/animations/box-animation-helper.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/box-animation-helper.h - delete mode 100644 ukui-styles/qt5-style-ukui/animations/box-animator.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/box-animator.h - delete mode 100644 ukui-styles/qt5-style-ukui/animations/button-animation-helper.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/button-animation-helper.h - delete mode 100644 ukui-styles/qt5-style-ukui/animations/button-animator.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/button-animator.h - delete mode 100644 ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.h - delete mode 100644 ukui-styles/qt5-style-ukui/animations/checkbox-animator.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/checkbox-animator.h - delete mode 100644 ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.h - delete mode 100644 ukui-styles/qt5-style-ukui/animations/progressbar-animation.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/progressbar-animation.h - delete mode 100644 ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.h - delete mode 100644 ukui-styles/qt5-style-ukui/animations/radiobutton-animator.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/radiobutton-animator.h - delete mode 100644 ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.h - delete mode 100644 ukui-styles/qt5-style-ukui/animations/slider-animation-helper.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/slider-animation-helper.h - delete mode 100644 ukui-styles/qt5-style-ukui/animations/slider-animator.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/slider-animator.h - delete mode 100644 ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.h - delete mode 100644 ukui-styles/qt5-style-ukui/animations/tree-animation-helper.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/tree-animation-helper.h - delete mode 100644 ukui-styles/qt5-style-ukui/animations/tree-animator.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/animations/tree-animator.h - delete mode 100644 ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.h - delete mode 100644 ukui-styles/qt5-style-ukui/qt5-style-ukui.json - delete mode 100644 ukui-styles/qt5-style-ukui/qt5-style-ukui.pri - delete mode 100644 ukui-styles/qt5-style-ukui/qt5-style-ukui.pro - delete mode 100644 ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.h - delete mode 100644 ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.h - delete mode 100644 ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/qt5-ukui-style.h - delete mode 100644 ukui-styles/qt5-style-ukui/shadow-helper.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/shadow-helper.h - delete mode 100644 ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json - delete mode 100644 ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/ukui-style-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/view-helper.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.cpp - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h - delete mode 100644 ukui-styles/qt5-style-ukui/widget-parameters/widget-parameters.pri - -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json b/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -index e2d7807..7cd112b 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -@@ -385,7 +385,7 @@ - "DefaultTabWidget" :{ - "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarBackgroundBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -- "TabBarDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarHoverBrush" : { "type": "color"}, - "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"} - } -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 02683a6..702489f 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -3223,8 +3223,11 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - if (enable && select) { - painter->setPen((selectPen == Qt::NoPen || selectPen.color().alpha() == 0) ? Qt::NoPen : selectPen); - if(isTree){ -- if(painter->pen().width() == 1) -+ if (painter->pen().width() == 1 && -+ !(vi->viewItemPosition == QStyleOptionViewItem::OnlyOne && -+ vi->rect.left() == 0)) { - painter->translate(0, 0.5); -+ } - - if(!borderPath0.isEmpty()){ - painter->drawPath(borderPath0); -@@ -3243,8 +3246,11 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - } else if (enable && hover) { - painter->setPen((hoverPen == Qt::NoPen || hoverPen.color().alpha() == 0) ? Qt::NoPen : hoverPen); - if(isTree){ -- if(painter->pen().width() == 1) -+ if (painter->pen().width() == 1 && -+ !(vi->viewItemPosition == QStyleOptionViewItem::OnlyOne && -+ vi->rect.left() == 0)) { - painter->translate(0, 0.5); -+ } - - if(!borderPath0.isEmpty()){ - painter->drawPath(borderPath0); -@@ -4033,6 +4039,28 @@ void UKUIConfigStyle::drawComplexControl(QStyle::ComplexControl control, const Q - painter->restore(); - } else { - upOption.state = State_None; -+ int width = sp->m_SpinBoxParameters.spinBoxUpDisablePen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_SpinBoxParameters.spinBoxUpDisablePen); -+ painter->setBrush(sp->m_SpinBoxParameters.spinBoxUpDisableBrush); -+ QPainterPath upPath; -+ -+ upRect.adjust(0, 0, 1 - width, 1); -+ upPath.moveTo(upRect.left(), upRect.top() + sp->m_SpinBoxParameters.radius); -+ upPath.arcTo(upRect.left(), upRect.top(), sp->m_SpinBoxParameters.radius * 2, sp->m_SpinBoxParameters.radius * 2, 180, -90); -+ upPath.lineTo(upRect.right() - sp->m_SpinBoxParameters.radius, upRect.top()); -+ upPath.arcTo(upRect.right() - 2 * sp->m_SpinBoxParameters.radius, upRect.top(), sp->m_SpinBoxParameters.radius * 2, -+ sp->m_SpinBoxParameters.radius * 2, 90, -90); -+ upPath.lineTo(upRect.right(), upRect.bottom()); -+ upPath.lineTo(upRect.left(), upRect.bottom()); -+ upPath.lineTo(upRect.left(), upRect.top() + sp->m_SpinBoxParameters.radius); -+ -+ if(painter->pen().width() == 1 && sp->m_SpinBoxParameters.radius != 0) -+ painter->translate(0.5, 0.5); -+ -+ painter->drawPath(upPath); -+// painter->drawRect(upRect); -+ painter->restore(); -+ - } - - //down button -@@ -4091,7 +4119,31 @@ void UKUIConfigStyle::drawComplexControl(QStyle::ComplexControl control, const Q - // painter->drawRect(downRect); - painter->restore(); - } else { -+ QPainterPath downPath; -+ painter->save(); -+ painter->setRenderHint(QPainter::Antialiasing, sp->m_SpinBoxParameters.radius != 0); -+ - downOption.state = State_None; -+ int width = sp->m_SpinBoxParameters.spinBoxDownDisablePen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_SpinBoxParameters.spinBoxDownDisablePen); -+ painter->setBrush(sp->m_SpinBoxParameters.spinBoxDownDisableBrush); -+ downRect.adjust(0, 0, 1 - width, 1 - width); -+ downPath.moveTo(downRect.left(), downRect.bottom() - sp->m_SpinBoxParameters.radius); -+ downPath.arcTo(downRect.left(), downRect.bottom() - sp->m_SpinBoxParameters.radius * 2, sp->m_SpinBoxParameters.radius * 2, -+ sp->m_SpinBoxParameters.radius * 2, 180, 90); -+ downPath.lineTo(downRect.right() - sp->m_SpinBoxParameters.radius, downRect.bottom()); -+ downPath.arcTo(downRect.right() - sp->m_SpinBoxParameters.radius * 2, downRect.bottom() - sp->m_SpinBoxParameters.radius * 2, -+ sp->m_SpinBoxParameters.radius * 2, sp->m_SpinBoxParameters.radius * 2, 270, 90); -+ downPath.lineTo(downRect.right(), downRect.top()); -+ downPath.lineTo(downRect.left(), downRect.top()); -+ downPath.lineTo(downRect.left(), downRect.bottom() - sp->m_SpinBoxParameters.radius); -+ -+ if(painter->pen().width() == 1 && sp->m_SpinBoxParameters.radius != 0) -+ painter->translate(0.5, 0.5); -+ -+ painter->drawPath(downPath); -+// painter->drawRect(downRect); -+ painter->restore(); - } - - if (!enable) { -diff --git a/ukui-styles/qt5-style-ukui/animations/animations.pri b/ukui-styles/qt5-style-ukui/animations/animations.pri -deleted file mode 100644 -index c49c8c5..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/animations.pri -+++ /dev/null -@@ -1,38 +0,0 @@ --INCLUDEPATH += $$PWD -- --HEADERS += \ -- $$PWD/box-animator.h \ -- $$PWD/box-animation-helper.h \ -- $$PWD/button-animator.h \ -- $$PWD/button-animation-helper.h \ -- $$PWD/progressbar-animation-helper.h \ -- $$PWD/progressbar-animation.h \ -- $$PWD/scrollbar-animation-helper.h \ -- $$PWD/tab-widget-animation-helper.h \ -- $$PWD/radiobutton-animator.h \ -- $$PWD/radiobutton-animation-helper.h \ -- $$PWD/checkbox-animator.h \ -- $$PWD/checkbox-animation-helper.h \ -- $$PWD/slider-animator.h \ -- $$PWD/slider-animation-helper.h \ -- $$PWD/tree-animator.h \ -- $$PWD/tree-animation-helper.h -- --SOURCES += \ -- $$PWD/box-animator.cpp \ -- $$PWD/box-animation-helper.cpp \ -- $$PWD/button-animation-helper.cpp \ -- $$PWD/button-animator.cpp \ -- $$PWD/progressbar-animation-helper.cpp \ -- $$PWD/progressbar-animation.cpp \ -- $$PWD/scrollbar-animation-helper.cpp \ -- $$PWD/tab-widget-animation-helper.cpp \ -- $$PWD/radiobutton-animator.cpp \ -- $$PWD/radiobutton-animation-helper.cpp \ -- $$PWD/checkbox-animator.cpp \ -- $$PWD/checkbox-animation-helper.cpp \ -- $$PWD/slider-animator.cpp \ -- $$PWD/slider-animation-helper.cpp \ -- $$PWD/tree-animator.cpp \ -- $$PWD/tree-animation-helper.cpp -- -diff --git a/ukui-styles/qt5-style-ukui/animations/box-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/box-animation-helper.cpp -deleted file mode 100644 -index 7e5ba67..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/box-animation-helper.cpp -+++ /dev/null -@@ -1,77 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "box-animation-helper.h" -- --#include "box-animator.h" --#include <QWidget> -- --BoxAnimationHelper::BoxAnimationHelper(QObject *parent) : AnimationHelper(parent) --{ -- --} -- --BoxAnimationHelper::~BoxAnimationHelper() --{ --} -- --bool BoxAnimationHelper::registerWidget(QWidget *w) --{ -- auto animator = new UKUI::Box::BoxAnimator; -- bool result = animator->bindWidget(w); -- if (!result) -- { -- animator->deleteLater(); -- animator = nullptr; -- } -- else -- { -- m_animators->insertMulti(w, animator); -- } -- -- connect(w, &QWidget::destroyed, this, [=](){ -- unregisterWidget(w); -- }); -- -- return result; --} -- --bool BoxAnimationHelper::unregisterWidget(QWidget *w) --{ -- auto animators = m_animators->values(w); -- bool result = false; -- for (auto animator : animators) { -- if (animator) { -- result = animator->unboundWidget(); -- delete animator; -- animator = nullptr; -- } -- } -- m_animators->remove(w); -- return result; --} -- --AnimatorIface *BoxAnimationHelper::animator(const QWidget *w) --{ -- return m_animators->value(w); --} -- -diff --git a/ukui-styles/qt5-style-ukui/animations/box-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/box-animation-helper.h -deleted file mode 100644 -index 1b3d50d..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/box-animation-helper.h -+++ /dev/null -@@ -1,48 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef BOXANIMATIONHELPER_H --#define BOXANIMATIONHELPER_H -- --#include <QObject> --#include "animation-helper.h" --#include "animator-iface.h" --#include "box-animator.h" -- --class BoxAnimationHelper : public AnimationHelper --{ -- Q_OBJECT --public: -- BoxAnimationHelper(QObject *parent = nullptr); -- ~BoxAnimationHelper(); -- -- bool registerWidget(QWidget *w); -- bool unregisterWidget(QWidget *w); -- -- AnimatorIface *animator(const QWidget *w); -- --signals: -- --public slots: --}; -- --#endif // BOXANIMATIONHELPER_H -diff --git a/ukui-styles/qt5-style-ukui/animations/box-animator.cpp b/ukui-styles/qt5-style-ukui/animations/box-animator.cpp -deleted file mode 100644 -index fd0269e..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/box-animator.cpp -+++ /dev/null -@@ -1,246 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "box-animator.h" -- --#include <QComboBox> -- --using namespace UKUI::Box; -- --BoxAnimator::BoxAnimator(QObject *parent) : QParallelAnimationGroup (parent) --{ -- --} -- --BoxAnimator::~BoxAnimator() --{ -- if(m_mouseover){ -- m_mouseover->deleteLater(); -- m_mouseover = nullptr; -- } -- if(m_sunken){ -- m_sunken->deleteLater(); -- m_sunken = nullptr; -- } -- if(m_widget){ -- m_widget->deleteLater(); -- m_widget = nullptr; -- } --} -- -- --bool BoxAnimator::bindWidget(QWidget *w) --{ -- if (w->property("doNotAnimate").toBool()) -- return false; -- -- if (qobject_cast<QComboBox*>(w)) { -- m_widget = w; -- } else { -- return false; -- } -- -- m_mouseover = new QVariantAnimation(this); -- m_mouseover->setStartValue(0.0); -- m_mouseover->setEndValue(1.0); -- m_mouseover->setDuration(100); -- m_mouseover->setEasingCurve(QEasingCurve::OutCubic); -- addAnimation(m_mouseover); -- -- m_sunken = new QVariantAnimation(this); -- m_sunken->setStartValue(0.0); -- m_sunken->setEndValue(1.0); -- m_sunken->setDuration(75); -- m_sunken->setEasingCurve(QEasingCurve::InCubic); -- addAnimation(m_sunken); -- -- connect(m_sunken, &QVariantAnimation::valueChanged, w, [=]() { -- w->repaint(); -- }); -- connect(m_mouseover, &QVariantAnimation::valueChanged, w, [=]() { -- w->repaint(); -- }); -- connect(m_sunken, &QVariantAnimation::finished, w, [=]() { -- w->repaint(); -- }); -- connect(m_mouseover, &QVariantAnimation::finished, w, [=]() { -- w->repaint(); -- }); -- -- return true; -- --} -- --bool BoxAnimator::unboundWidget() --{ -- this->stop(); -- this->setDirection(QAbstractAnimation::Forward); -- if(m_mouseover){ -- m_mouseover->deleteLater(); -- m_mouseover = nullptr; -- } -- if(m_sunken){ -- m_sunken->deleteLater(); -- m_sunken = nullptr; -- } -- -- if (m_widget) { -- this->setParent(nullptr); -- return true; -- } -- return false; -- --} -- --QVariant BoxAnimator::value(const QString &property) --{ -- if(property == "MouseOver") -- return m_mouseover->currentValue(); -- else if(property == "SunKen") -- return m_sunken->currentValue(); -- else -- return QVariant(); --} -- --bool BoxAnimator::isRunning(const QString &property) --{ -- if(property == "MouseOver") -- return m_mouseover->state() == Running; -- else if(property == "SunKen") -- return m_sunken->state() == Running; -- else -- return this->state() == Running; --} -- --bool BoxAnimator::setAnimatorStartValue(const QString &property, const QVariant &value) --{ -- if(property == "MouseOver") -- { -- m_mouseover->setStartValue(value); -- return true; -- } -- else if(property == "SunKen") -- { -- m_sunken->setStartValue(value); -- return true; -- } -- else -- { -- return false; -- } --} -- --bool BoxAnimator::setAnimatorEndValue(const QString &property, const QVariant &value) --{ -- if(property == "MouseOver") -- { -- m_mouseover->setEndValue(value); -- return true; -- } -- else if(property == "SunKen") -- { -- m_sunken->setEndValue(value); -- return true; -- } -- else -- { -- return false; -- } --} -- --bool BoxAnimator::setAnimatorDuration(const QString &property, int duration) --{ -- if(property == "MouseOver") -- { -- m_mouseover->setDuration(duration); -- return true; -- } -- else if(property == "SunKen") -- { -- m_sunken->setDuration(duration); -- return true; -- } -- else -- { -- return false; -- } --} -- --void BoxAnimator::setAnimatorDirectionForward(const QString &property, bool forward) --{ -- auto d = forward? QAbstractAnimation::Forward: QAbstractAnimation::Backward; -- if(property == "MouseOver") -- m_mouseover->setDirection(d); -- else if(property == "SunKen") -- m_sunken->setDirection(d); -- else -- return; --} --void BoxAnimator::startAnimator(const QString &property) --{ -- if(property == "MouseOver") -- m_mouseover->start(); -- else if(property == "SunKen") -- m_sunken->start(); -- else -- this->start(); --} -- --void BoxAnimator::stopAnimator(const QString &property) --{ -- if(property == "MouseOver") -- { -- m_mouseover->stop(); -- m_mouseover->setCurrentTime(0); -- } -- else if(property == "SunKen") -- { -- m_sunken->stop(); -- m_sunken->setCurrentTime(0); -- } -- else -- { -- this->stop(); -- this->setCurrentTime(0); -- } --} -- --int BoxAnimator::currentAnimatorTime(const QString &property) --{ -- if(property == "MouseOver") -- return m_mouseover->currentTime(); -- else if(property == "SunKen") -- return m_sunken->currentTime(); -- else -- return this->currentTime(); --} -- --int BoxAnimator::totalAnimationDuration(const QString &property) --{ -- if(property == "MouseOver") -- return m_mouseover->duration(); -- else if(property == "SunKen") -- return m_sunken->duration(); -- else -- return this->duration(); --} -- -diff --git a/ukui-styles/qt5-style-ukui/animations/box-animator.h b/ukui-styles/qt5-style-ukui/animations/box-animator.h -deleted file mode 100644 -index 211725f..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/box-animator.h -+++ /dev/null -@@ -1,66 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef BOXANIMATOR_H --#define BOXANIMATOR_H -- --#include <QObject> --#include <QVariantAnimation> --#include <QParallelAnimationGroup> -- --#include "animator-iface.h" -- --namespace UKUI { -- --namespace Box { --class BoxAnimator : public QParallelAnimationGroup, public AnimatorIface --{ -- Q_OBJECT --public: -- explicit BoxAnimator(QObject *parent = nullptr); -- ~BoxAnimator(); -- -- bool bindWidget(QWidget *w); -- bool unboundWidget(); -- QWidget *boundedWidget() {return m_widget;} -- QVariant value(const QString &property); -- bool setAnimatorStartValue(const QString &property, const QVariant &value); -- bool setAnimatorEndValue(const QString &property, const QVariant &value); -- bool setAnimatorDuration(const QString &property, int duration); -- void setAnimatorDirectionForward(const QString &property = nullptr, bool forward = true); -- bool isRunning(const QString &property = nullptr); -- void startAnimator(const QString &property = nullptr); -- void stopAnimator(const QString &property = nullptr); -- int currentAnimatorTime(const QString &property = nullptr); -- int totalAnimationDuration(const QString &property = nullptr); -- --signals: -- --private: -- QWidget* m_widget = nullptr; -- QVariantAnimation *m_mouseover = nullptr; -- QVariantAnimation *m_sunken = nullptr; --}; --} --} -- --#endif // BOXANIMATOR_H -diff --git a/ukui-styles/qt5-style-ukui/animations/button-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/button-animation-helper.cpp -deleted file mode 100644 -index c70dae2..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/button-animation-helper.cpp -+++ /dev/null -@@ -1,77 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "button-animation-helper.h" --#include "button-animator.h" --#include <QWidget> -- --ButtonAnimationHelper::ButtonAnimationHelper(QObject *parent) : AnimationHelper(parent) --{ -- --} -- --ButtonAnimationHelper::~ButtonAnimationHelper() --{ -- --} -- -- --bool ButtonAnimationHelper::registerWidget(QWidget *w) --{ -- auto animator = new UKUI::Button::ButtonAnimator; -- bool result = animator->bindWidget(w); -- if (!result) -- { -- animator->deleteLater(); -- animator = nullptr; -- } -- else -- { -- m_animators->insertMulti(w, animator); -- } -- -- connect(w, &QWidget::destroyed, this, [=](){ -- unregisterWidget(w); -- }); -- -- return result; --} -- --bool ButtonAnimationHelper::unregisterWidget(QWidget *w) --{ -- auto animators = m_animators->values(w); -- bool result = false; -- for (auto animator : animators) { -- if (animator) { -- result = animator->unboundWidget(); -- delete animator; -- animator = nullptr; -- } -- } -- m_animators->remove(w); -- return result; --} -- --AnimatorIface *ButtonAnimationHelper::animator(const QWidget *w) --{ -- return m_animators->value(w); --} -diff --git a/ukui-styles/qt5-style-ukui/animations/button-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/button-animation-helper.h -deleted file mode 100644 -index 5fa3eb5..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/button-animation-helper.h -+++ /dev/null -@@ -1,47 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef BUTTONANIMATIONHELPER_H --#define BUTTONANIMATIONHELPER_H -- --#include <QObject> --#include "animation-helper.h" --#include "animator-iface.h" --#include "button-animator.h" -- --class ButtonAnimationHelper: public AnimationHelper --{ -- Q_OBJECT --public: -- ButtonAnimationHelper(QObject *parent = nullptr); -- ~ButtonAnimationHelper(); -- bool registerWidget(QWidget *w); -- bool unregisterWidget(QWidget *w); -- -- AnimatorIface *animator(const QWidget *w); -- --signals: -- --public slots: --}; -- --#endif // BUTTONANIMATIONHELPER_H -diff --git a/ukui-styles/qt5-style-ukui/animations/button-animator.cpp b/ukui-styles/qt5-style-ukui/animations/button-animator.cpp -deleted file mode 100644 -index bf3532e..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/button-animator.cpp -+++ /dev/null -@@ -1,260 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "button-animator.h" --#include <QToolButton> --#include <QPushButton> --#include <QComboBox> --#include <QSpinBox> --#include <QDoubleSpinBox> -- --using namespace UKUI::Button; -- --ButtonAnimator::ButtonAnimator(QObject *parent) : QParallelAnimationGroup (parent) --{ -- --} -- --ButtonAnimator::~ButtonAnimator() --{ -- if(m_mouseover){ -- m_mouseover->deleteLater(); -- m_mouseover = nullptr; -- } -- if(m_sunken){ -- m_sunken->deleteLater(); -- m_sunken = nullptr; -- } --} -- --bool ButtonAnimator::bindWidget(QWidget *w) --{ -- if (w->property("doNotAnimate").toBool()) -- return false; -- if (qobject_cast<QToolButton*>(w) || qobject_cast<QPushButton*>(w) || qobject_cast<QComboBox*>(w) -- || qobject_cast<QSpinBox*>(w) || qobject_cast<QDoubleSpinBox*>(w)) { -- m_widget = w; -- } else { -- return false; -- } -- -- m_mouseover = new QVariantAnimation(); -- m_mouseover->setStartValue(0.0); -- m_mouseover->setEndValue(1.0); -- m_mouseover->setDuration(100); -- m_mouseover->setEasingCurve(QEasingCurve::OutCubic); -- addAnimation(m_mouseover); -- -- m_sunken = new QVariantAnimation(); -- m_sunken->setStartValue(0.0); -- m_sunken->setEndValue(1.0); -- m_sunken->setDuration(75); -- m_sunken->setEasingCurve(QEasingCurve::InCubic); -- addAnimation(m_sunken); -- -- connect(m_sunken, &QVariantAnimation::valueChanged, w, [=]() { -- w->update(); -- }); -- connect(m_mouseover, &QVariantAnimation::valueChanged, w, [=]() { -- w->update(); -- }); -- connect(m_sunken, &QVariantAnimation::finished, w, [=]() { -- w->update(); -- }); -- connect(m_mouseover, &QVariantAnimation::finished, w, [=]() { -- w->update(); -- }); -- return true; --} -- --bool ButtonAnimator::unboundWidget() --{ -- this->stop(); -- this->setDirection(QAbstractAnimation::Forward); -- -- if(m_mouseover){ -- m_mouseover->deleteLater(); -- m_mouseover = nullptr; -- } -- if(m_sunken){ -- m_sunken->deleteLater(); -- m_sunken = nullptr; -- } -- -- if (m_widget) { -- this->setParent(nullptr); -- return true; -- } -- return false; -- --} -- --QVariant ButtonAnimator::value(const QString &property) --{ -- if(property == "MouseOver") -- return m_mouseover->currentValue(); -- else if(property == "SunKen") -- return m_sunken->currentValue(); -- else -- return QVariant(); --} -- --bool ButtonAnimator::isRunning(const QString &property) --{ -- if(property == "MouseOver") -- return m_mouseover->state() == Running; -- else if(property == "SunKen") -- return m_sunken->state() == Running; -- else -- return this->state() == Running; --} -- --bool ButtonAnimator::setAnimatorStartValue(const QString &property, const QVariant &value) --{ -- if(property == "MouseOver") -- { -- m_mouseover->setStartValue(value); -- return true; -- } -- else if(property == "SunKen") -- { -- m_sunken->setStartValue(value); -- return true; -- } -- else -- { -- return false; -- } --} -- --bool ButtonAnimator::setAnimatorEndValue(const QString &property, const QVariant &value) --{ -- if(property == "MouseOver") -- { -- m_mouseover->setEndValue(value); -- return true; -- } -- else if(property == "SunKen") -- { -- m_sunken->setEndValue(value); -- return true; -- } -- else -- { -- return false; -- } --} -- --bool ButtonAnimator::setAnimatorDuration(const QString &property, int duration) --{ -- if(property == "MouseOver") -- { -- m_mouseover->setDuration(duration); -- return true; -- } -- else if(property == "SunKen") -- { -- m_sunken->setDuration(duration); -- return true; -- } -- else -- { -- return false; -- } --} -- --void ButtonAnimator::setAnimatorDirectionForward(const QString &property, bool forward) --{ -- auto d = forward? QAbstractAnimation::Forward: QAbstractAnimation::Backward; -- if(property == "MouseOver") -- m_mouseover->setDirection(d); -- else if(property == "SunKen") -- m_sunken->setDirection(d); -- else -- return; --} --void ButtonAnimator::startAnimator(const QString &property) --{ -- if(property == "MouseOver") -- m_mouseover->start(); -- else if(property == "SunKen") -- m_sunken->start(); -- else -- this->start(); --} -- --void ButtonAnimator::stopAnimator(const QString &property) --{ -- if(property == "MouseOver") { -- m_mouseover->stop(); -- m_mouseover->setCurrentTime(0); -- } -- else if(property == "SunKen") -- { -- m_sunken->stop(); -- m_sunken->setCurrentTime(0); -- } -- else -- { -- this->stop(); -- this->setCurrentTime(0); -- } --} -- --int ButtonAnimator::currentAnimatorTime(const QString &property) --{ -- if(property == "MouseOver") -- return m_mouseover->currentTime(); -- else if(property == "SunKen") -- return m_sunken->currentTime(); -- else -- return this->currentTime(); --} -- --void ButtonAnimator::setAnimatorCurrentTime(const QString &property, const int msecs) --{ -- if ("MouseOver" == property) { -- m_mouseover->setCurrentTime(msecs); -- } else if("SunKen" == property) { -- m_sunken->setCurrentTime(msecs); -- } --} -- --int ButtonAnimator::totalAnimationDuration(const QString &property) --{ -- if(property == "MouseOver") -- return m_mouseover->duration(); -- else if(property == "SunKen") -- return m_sunken->duration(); -- else -- return this->duration(); --} -- --QVariant ButtonAnimator::endValue(const QString &property) --{ -- if(property == "MouseOver") -- return m_mouseover->endValue(); -- else if(property == "SunKen") -- return m_sunken->endValue(); -- else -- return this->endValue(); --} -diff --git a/ukui-styles/qt5-style-ukui/animations/button-animator.h b/ukui-styles/qt5-style-ukui/animations/button-animator.h -deleted file mode 100644 -index 140c40b..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/button-animator.h -+++ /dev/null -@@ -1,72 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef BUTTONANIMATOR_H --#define BUTTONANIMATOR_H -- --#include <QObject> --#include <QVariantAnimation> --#include <QParallelAnimationGroup> -- --#include "animator-iface.h" -- -- -- --namespace UKUI { -- --namespace Button { --class ButtonAnimator : public QParallelAnimationGroup, public AnimatorIface --{ -- Q_OBJECT --public: -- explicit ButtonAnimator(QObject *parent = nullptr); -- ~ButtonAnimator(); -- -- bool bindWidget(QWidget *w); -- bool unboundWidget(); -- QWidget *boundedWidget() {return m_widget;} -- QVariant value(const QString &property); -- bool setAnimatorStartValue(const QString &property, const QVariant &value); -- bool setAnimatorEndValue(const QString &property, const QVariant &value); -- bool setAnimatorDuration(const QString &property, int duration); -- void setAnimatorDirectionForward(const QString &property = nullptr, bool forward = true); -- bool isRunning(const QString &property = nullptr); -- void startAnimator(const QString &property = nullptr); -- void stopAnimator(const QString &property = nullptr); -- int currentAnimatorTime(const QString &property = nullptr); -- void setAnimatorCurrentTime(const QString &property = nullptr, const int msecs = 0); -- int totalAnimationDuration(const QString &property = nullptr); -- QVariant endValue(const QString &property = nullptr); -- --signals: -- --private: -- QWidget* m_widget = nullptr; -- QVariantAnimation *m_mouseover = nullptr; -- QVariantAnimation *m_sunken = nullptr; -- --}; -- --} --} -- --#endif // BUTTONANIMATOR_H -diff --git a/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.cpp -deleted file mode 100644 -index 91bd90c..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.cpp -+++ /dev/null -@@ -1,79 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "checkbox-animation-helper.h" -- --#include "checkbox-animator.h" --#include <QWidget> --#include <QDebug> -- --CheckBoxAnimationHelper::CheckBoxAnimationHelper(QObject *parent) : AnimationHelper(parent) --{ -- --} -- --CheckBoxAnimationHelper::~CheckBoxAnimationHelper() --{ -- --} -- --bool CheckBoxAnimationHelper::registerWidget(QWidget *w) --{ -- auto animator = new UKUI::CheckBox::CheckBoxAnimator; -- bool result = animator->bindWidget(w); -- if (!result) -- { -- animator->deleteLater(); -- animator = nullptr; -- } -- else -- { -- m_animators->insert(w, animator); -- } -- -- connect(w, &QWidget::destroyed, this, [=](){ -- unregisterWidget(w); -- }); -- -- return result; --} -- --bool CheckBoxAnimationHelper::unregisterWidget(QWidget *w) --{ -- auto animators = m_animators->values(w); -- bool result = false; -- for (auto animator : animators) { -- if (animator) { -- result = animator->unboundWidget(); -- delete animator; -- animator = nullptr; -- } -- } -- m_animators->remove(w); -- return result; --} -- --AnimatorIface *CheckBoxAnimationHelper::animator(const QWidget *w) --{ -- return m_animators->value(w); --} -- -diff --git a/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.h -deleted file mode 100644 -index b51d2bd..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.h -+++ /dev/null -@@ -1,47 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef CHECKBOXANIMATIONHELPER_H --#define CHECKBOXANIMATIONHELPER_H -- --#include <QObject> --#include "animation-helper.h" --#include "animator-iface.h" --#include "checkbox-animator.h" -- --class CheckBoxAnimationHelper : public AnimationHelper --{ -- Q_OBJECT --public: -- CheckBoxAnimationHelper(QObject *parent = nullptr); -- ~CheckBoxAnimationHelper(); -- bool registerWidget(QWidget *w); -- bool unregisterWidget(QWidget *w); -- -- AnimatorIface *animator(const QWidget *w); -- --signals: -- --public slots: --}; -- --#endif // CHECKBOXANIMATIONHELPER_H -diff --git a/ukui-styles/qt5-style-ukui/animations/checkbox-animator.cpp b/ukui-styles/qt5-style-ukui/animations/checkbox-animator.cpp -deleted file mode 100644 -index 0861304..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/checkbox-animator.cpp -+++ /dev/null -@@ -1,398 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "checkbox-animator.h" -- --#include <QCheckBox> --#include <QDebug> -- --using namespace UKUI::CheckBox; -- --CheckBoxAnimator::CheckBoxAnimator(QObject *parent) : QParallelAnimationGroup (parent) --{ -- --} -- --CheckBoxAnimator::~CheckBoxAnimator() --{ -- if(m_onScale){ -- m_onScale->deleteLater(); -- m_onScale = nullptr; -- } -- if(m_onOpacity){ -- m_onOpacity->deleteLater(); -- m_onOpacity = nullptr; -- } -- if(m_onBase){ -- m_onBase->deleteLater(); -- m_onBase = nullptr; -- } -- if(m_off){ -- m_off->deleteLater(); -- m_off = nullptr; -- } --} -- --bool CheckBoxAnimator::bindWidget(QWidget *w) --{ -- if (w->property("doNotAnimate").toBool()) -- return false; -- -- if (qobject_cast<QCheckBox*>(w)) { -- m_widget = w; -- } else { -- return false; -- } -- -- m_onScale = new QVariantAnimation(this); -- m_onScale->setStartValue(0.0); -- m_onScale->setEndValue(1.0); -- m_onScale->setDuration(260); -- m_onScale->setEasingCurve(QEasingCurve::InOutSine); -- addAnimation(m_onScale); -- connect(m_onScale, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { -- w->update(); -- }); -- connect(m_onScale, &QVariantAnimation::finished, w, [=]() { -- w->update(); -- }); -- -- m_onOpacity = new QVariantAnimation(this); -- m_onOpacity->setStartValue(0.0); -- m_onOpacity->setEndValue(1.0); -- m_onOpacity->setDuration(120); -- m_onOpacity->setEasingCurve(QEasingCurve::InOutSine); -- addAnimation(m_onOpacity); -- connect(m_onOpacity, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { -- w->update(); -- }); -- connect(m_onOpacity, &QVariantAnimation::finished, w, [=]() { -- w->update(); -- }); -- -- m_onBase = new QVariantAnimation(this); -- m_onBase->setStartValue(0.0); -- m_onBase->setEndValue(1.0); -- m_onBase->setDuration(180); -- m_onBase->setEasingCurve(QEasingCurve::InOutSine); -- addAnimation(m_onBase); -- connect(m_onBase, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { -- w->update(); -- }); -- connect(m_onBase, &QVariantAnimation::finished, w, [=]() { -- w->update(); -- }); -- -- m_off = new QVariantAnimation(this); -- m_off->setStartValue(1.0); -- m_off->setEndValue(0.0); -- m_off->setDuration(100); -- m_off->setEasingCurve(QEasingCurve::OutCubic); -- addAnimation(m_off); -- -- connect(m_off, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { -- w->update(); -- }); -- connect(m_off, &QVariantAnimation::finished, w, [=]() { -- qDebug() << "m_off finished......."; -- w->update(); -- }); -- return true; -- --} -- --bool CheckBoxAnimator::unboundWidget() --{ -- this->stop(); -- this->setDirection(QAbstractAnimation::Forward); -- if(m_onScale){ -- m_onScale->deleteLater(); -- m_onScale = nullptr; -- } -- if(m_onOpacity){ -- m_onOpacity->deleteLater(); -- m_onOpacity = nullptr; -- } -- if(m_onBase){ -- m_onBase->deleteLater(); -- m_onBase = nullptr; -- } -- if(m_off){ -- m_off->deleteLater(); -- m_off = nullptr; -- } -- -- if (m_widget) { -- this->setParent(nullptr); -- return true; -- } -- return false; -- --} -- --QVariant CheckBoxAnimator::value(const QString &property) --{ -- if(property == "OnScale") -- return m_onScale->currentValue(); -- else if(property == "OnOpacity") -- return m_onOpacity->currentValue(); -- else if(property == "OnBase") -- return m_onBase->currentValue(); -- else if(property == "Off") -- return m_off->currentValue(); -- else -- return QVariant(); --} -- --bool CheckBoxAnimator::isRunning(const QString &property) --{ -- if(property == "OnScale") -- return m_onScale->state() == Running; -- else if(property == "OnOpacity") -- return m_onOpacity->state() == Running; -- else if(property == "OnBase") -- return m_onBase->state() == Running; -- else if(property == "Off") -- return m_off->state() == Running; -- else -- return this->state() == Running; --} -- --bool CheckBoxAnimator::setAnimatorStartValue(const QString &property, const QVariant &value) --{ -- if(property == "OnScale") -- { -- m_onScale->setStartValue(value); -- return true; -- } -- else if(property == "OnOpacity") -- { -- m_onOpacity->setStartValue(value); -- return true; -- } -- else if(property == "OnBase") -- { -- m_onBase->setStartValue(value); -- return true; -- } -- else if(property == "Off") -- { -- m_off->setStartValue(value); -- return true; -- } -- else -- { -- return false; -- } --} -- --bool CheckBoxAnimator::setAnimatorEndValue(const QString &property, const QVariant &value) --{ -- if(property == "OnScale") -- { -- m_onScale->setEndValue(value); -- return true; -- } -- else if(property == "OnOpacity") -- { -- m_onOpacity->setEndValue(value); -- return true; -- } -- else if(property == "OnBase") -- { -- m_onBase->setEndValue(value); -- return true; -- } -- else if(property == "Off") -- { -- m_off->setEndValue(value); -- return true; -- } -- else -- { -- return false; -- } --} -- --bool CheckBoxAnimator::setAnimatorDuration(const QString &property, int duration) --{ -- if(property == "OnScale") -- { -- m_onScale->setDuration(duration); -- return true; -- } -- else if(property == "OnOpacity") -- { -- m_onOpacity->setDuration(duration); -- return true; -- } -- else if(property == "OnBase") -- { -- m_onBase->setDuration(duration); -- return true; -- } -- else if(property == "Off") -- { -- m_off->setDuration(duration); -- return true; -- } -- else -- { -- return false; -- } --} -- --void CheckBoxAnimator::setAnimatorDirectionForward(const QString &property, bool forward) --{ -- auto d = forward? QAbstractAnimation::Forward: QAbstractAnimation::Backward; -- if(property == "OnScale") -- m_onScale->setDirection(d); -- else if(property == "OnOpacity") -- { -- m_onOpacity->setDirection(d); -- } -- else if(property == "OnBase") -- { -- m_onBase->setDirection(d); -- } -- else if(property == "Off") -- { -- m_off->setDirection(d); -- } -- else -- return; --} --void CheckBoxAnimator::startAnimator(const QString &property) --{ -- if(property == "OnScale") -- m_onScale->start(); -- else if(property == "OnOpacity") -- { -- m_onOpacity->start(); -- } -- else if(property == "OnBase") -- { -- m_onBase->start(); -- } -- else if(property == "Off") -- { -- m_off->start(); -- } -- else -- this->start(); --} -- --void CheckBoxAnimator::stopAnimator(const QString &property) --{ -- if(property == "OnScale") -- { -- m_onScale->stop(); -- m_onScale->setCurrentTime(0); -- } -- else if(property == "OnOpacity") -- { -- m_onOpacity->stop(); -- m_onOpacity->setCurrentTime(0); -- } -- else if(property == "OnBase") -- { -- m_onBase->stop(); -- m_onBase->setCurrentTime(0); -- } -- else if(property == "Off") -- { -- m_off->stop(); -- m_off->setCurrentTime(0); -- } -- else -- { -- this->stop(); -- this->setCurrentTime(0); -- } --} -- --int CheckBoxAnimator::currentAnimatorTime(const QString &property) --{ -- if(property == "OnScale") -- return m_onScale->currentTime(); -- else if(property == "OnOpacity") -- { -- return m_onOpacity->currentTime(); -- } -- else if(property == "OnBase") -- { -- return m_onBase->currentTime(); -- } -- else if(property == "Off") -- return m_off->currentTime(); -- else -- return this->currentTime(); --} -- --void CheckBoxAnimator::setAnimatorCurrentTime(const QString &property, const int msecs) --{ -- if ("OnScale" == property) { -- m_onScale->setCurrentTime(msecs); -- } -- else if(property == "OnOpacity") -- { -- m_onOpacity->setCurrentTime(msecs); -- } -- else if(property == "OnBase") -- { -- m_onBase->setCurrentTime(msecs); -- } -- else if("Off" == property) { -- m_off->setCurrentTime(msecs); -- } --} -- --int CheckBoxAnimator::totalAnimationDuration(const QString &property) --{ -- if(property == "OnScale") -- return m_onScale->duration(); -- else if(property == "OnOpacity") -- { -- return m_onOpacity->duration(); -- } -- else if(property == "OnBase") -- { -- return m_onBase->duration(); -- } -- else if(property == "Off") -- return m_off->duration(); -- else -- return this->duration(); --} -- --void CheckBoxAnimator::setExtraProperty(const QString &property, const QVariant &value) --{ -- if(property == "nochange") -- m_noChange = value.toBool(); --} -- --QVariant CheckBoxAnimator::getExtraProperty(const QString &property) --{ -- if(property == "nochange") -- return m_noChange; -- return QVariant(); --} -diff --git a/ukui-styles/qt5-style-ukui/animations/checkbox-animator.h b/ukui-styles/qt5-style-ukui/animations/checkbox-animator.h -deleted file mode 100644 -index 3575118..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/checkbox-animator.h -+++ /dev/null -@@ -1,72 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef CHECKBOXANIMATOR_H --#define CHECKBOXANIMATOR_H -- --#include <QObject> --#include <QVariantAnimation> --#include <QParallelAnimationGroup> -- --#include "animator-iface.h" -- --namespace UKUI { -- --namespace CheckBox { --class CheckBoxAnimator : public QParallelAnimationGroup, public AnimatorIface --{ -- Q_OBJECT --public: -- explicit CheckBoxAnimator(QObject *parent = nullptr); -- ~CheckBoxAnimator(); -- -- bool bindWidget(QWidget *w); -- bool unboundWidget(); -- QWidget *boundedWidget() {return m_widget;} -- QVariant value(const QString &property); -- bool setAnimatorStartValue(const QString &property, const QVariant &value); -- bool setAnimatorEndValue(const QString &property, const QVariant &value); -- bool setAnimatorDuration(const QString &property, int duration); -- void setAnimatorDirectionForward(const QString &property = nullptr, bool forward = true); -- bool isRunning(const QString &property = nullptr); -- void startAnimator(const QString &property = nullptr); -- void stopAnimator(const QString &property = nullptr); -- int currentAnimatorTime(const QString &property = nullptr); -- void setAnimatorCurrentTime(const QString &property, const int msecs); -- int totalAnimationDuration(const QString &property = nullptr); -- void setExtraProperty(const QString &property, const QVariant &value); -- QVariant getExtraProperty(const QString &property); -- --signals: -- --private: -- QWidget* m_widget = nullptr; -- QVariantAnimation *m_onScale = nullptr; -- QVariantAnimation *m_onOpacity = nullptr; -- QVariantAnimation *m_onBase = nullptr; -- QVariantAnimation *m_off = nullptr; -- bool m_noChange = false; --}; --} --} -- --#endif // CHECKBOXANIMATOR_H -diff --git a/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.cpp -deleted file mode 100644 -index 8d16e5e..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.cpp -+++ /dev/null -@@ -1,79 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "progressbar-animation-helper.h" -- --ProgressBarAnimationHelper::ProgressBarAnimationHelper(QObject *parent) : QObject(parent) --{ -- animations = new QHash<QObject *, QVariantAnimation *>(); --} -- -- -- --ProgressBarAnimationHelper::~ProgressBarAnimationHelper() --{ -- for(auto item = animations->begin(); item != animations->end(); item++) -- delete item.value(); -- -- if(animations){ -- delete animations; -- animations = nullptr; -- } --} -- -- -- --void ProgressBarAnimationHelper::startAnimation(QVariantAnimation *animation) --{ -- stopAnimation(animation->parent()); -- connect(animation, SIGNAL(destroyed()), SLOT(_q_removeAnimation()), Qt::UniqueConnection); -- animations->insert(animation->parent(), animation); -- animation->start(); --} -- -- -- --void ProgressBarAnimationHelper::stopAnimation(QObject *target) --{ -- QVariantAnimation *animation = animations->take(target); -- if (animation) { -- animation->stop(); -- delete animation; -- animation = nullptr; -- } --} -- -- -- --QVariantAnimation* ProgressBarAnimationHelper::animation(QObject *target) --{ -- return animations->value(target); --} -- -- -- --void ProgressBarAnimationHelper::_q_removeAnimation() --{ -- QObject *animation = this->sender(); -- if (animation) -- animations->remove(animation->parent()); --} -diff --git a/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.h -deleted file mode 100644 -index e03a59e..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.h -+++ /dev/null -@@ -1,50 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef PROGRESSBARANIMATIONHELPER_H --#define PROGRESSBARANIMATIONHELPER_H -- --#include <QObject> --#include <QVariantAnimation> --#include <QHash> --#include "progressbar-animation.h" -- -- --class ProgressBarAnimationHelper : public QObject --{ -- Q_OBJECT --public: -- ProgressBarAnimationHelper(QObject *parent = nullptr); -- virtual ~ProgressBarAnimationHelper(); -- -- void startAnimation(QVariantAnimation *animation); -- void stopAnimation(QObject *target); -- QVariantAnimation* animation(QObject *target); -- --public slots: -- void _q_removeAnimation(); -- --private: -- QHash<QObject*, QVariantAnimation*> *animations = nullptr; --}; -- --#endif // PROGRESSBARANIMATIONHELPER_H -diff --git a/ukui-styles/qt5-style-ukui/animations/progressbar-animation.cpp b/ukui-styles/qt5-style-ukui/animations/progressbar-animation.cpp -deleted file mode 100644 -index cd18ae7..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/progressbar-animation.cpp -+++ /dev/null -@@ -1,57 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "progressbar-animation.h" -- --ProgressBarAnimation::ProgressBarAnimation(QObject *parent) : QVariantAnimation (parent) --{ -- init(); --} -- -- --ProgressBarAnimation::~ProgressBarAnimation() --{ -- --} -- --QWidget *ProgressBarAnimation::target() --{ -- return qobject_cast<QWidget*>(parent()); --} -- -- -- --void ProgressBarAnimation::init() --{ -- this->setStartValue(0.0); -- this->setEndValue(1.0); -- this->setDuration(2500); -- this->setDirection(QAbstractAnimation::Forward); -- this->setEasingCurve(QEasingCurve::InOutSine); -- -- connect(this, &QVariantAnimation::valueChanged, target(), [=](QVariant value) { -- target()->repaint(); -- }); -- connect(this, &QVariantAnimation::finished, target(), [=]() { -- target()->repaint(); -- }); --} -diff --git a/ukui-styles/qt5-style-ukui/animations/progressbar-animation.h b/ukui-styles/qt5-style-ukui/animations/progressbar-animation.h -deleted file mode 100644 -index e470427..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/progressbar-animation.h -+++ /dev/null -@@ -1,44 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef PROGRESSBARANIMATOR_H --#define PROGRESSBARANIMATOR_H -- --#include <QObject> --#include <QVariantAnimation> --#include <QProgressBar> -- -- -- --class ProgressBarAnimation : public QVariantAnimation --{ -- Q_OBJECT --public: -- ProgressBarAnimation(QObject *parent); -- ~ProgressBarAnimation(); -- -- QWidget *target(); --private: -- void init(); --}; -- --#endif // PROGRESSBARANIMATOR_H -diff --git a/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.cpp -deleted file mode 100644 -index 078b138..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.cpp -+++ /dev/null -@@ -1,75 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "radiobutton-animation-helper.h" -- --#include "radiobutton-animator.h" --#include <QWidget> --#include <QDebug> -- --RadioButtonAnimationHelper::RadioButtonAnimationHelper(QObject *parent) : AnimationHelper(parent) --{ -- --} -- --RadioButtonAnimationHelper::~RadioButtonAnimationHelper() --{ -- --} -- --bool RadioButtonAnimationHelper::registerWidget(QWidget *w) --{ -- auto animator = new UKUI::RadioButton::RadioButtonAnimator; -- bool result = animator->bindWidget(w); -- if (!result) -- { -- animator->deleteLater(); -- } -- else -- { -- m_animators->insert(w, animator); -- } -- -- connect(w, &QWidget::destroyed, this, [=](){ -- unregisterWidget(w); -- }); -- -- return result; --} -- --bool RadioButtonAnimationHelper::unregisterWidget(QWidget *w) --{ -- auto animator= m_animators->value(w); -- bool result = false; -- if (animator) { -- result = animator->unboundWidget(); -- delete animator; -- } -- m_animators->remove(w); -- return result; --} -- --AnimatorIface *RadioButtonAnimationHelper::animator(const QWidget *w) --{ -- return m_animators->value(w); --} -- -diff --git a/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.h -deleted file mode 100644 -index 681ab75..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.h -+++ /dev/null -@@ -1,47 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef RADIOBUTTONANIMATIONHELPER_H --#define RADIOBUTTONANIMATIONHELPER_H -- --#include <QObject> --#include "animation-helper.h" --#include "animator-iface.h" --#include "radiobutton-animator.h" -- --class RadioButtonAnimationHelper : public AnimationHelper --{ -- Q_OBJECT --public: -- RadioButtonAnimationHelper(QObject *parent = nullptr); -- ~RadioButtonAnimationHelper(); -- bool registerWidget(QWidget *w); -- bool unregisterWidget(QWidget *w); -- -- AnimatorIface *animator(const QWidget *w); -- --signals: -- --public slots: --}; -- --#endif // RADIOBUTTONANIMATIONHELPER_H -diff --git a/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.cpp b/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.cpp -deleted file mode 100644 -index bb376de..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.cpp -+++ /dev/null -@@ -1,260 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "radiobutton-animator.h" -- --#include <QRadioButton> --#include <QDebug> -- --using namespace UKUI::RadioButton; -- --RadioButtonAnimator::RadioButtonAnimator(QObject *parent) : QParallelAnimationGroup (parent) --{ -- --} -- --RadioButtonAnimator::~RadioButtonAnimator() --{ -- if(m_off){ -- m_off->deleteLater(); -- m_off = nullptr; -- } -- if(m_sunkenon){ -- m_sunkenon->deleteLater(); -- m_sunkenon = nullptr; -- } --} -- --bool RadioButtonAnimator::bindWidget(QWidget *w) --{ -- if (w->property("doNotAnimate").toBool()) -- return false; -- -- if (qobject_cast<QRadioButton*>(w)) { -- m_widget = w; -- } else { -- return false; -- } -- -- m_sunkenon = new QVariantAnimation(this); -- m_sunkenon->setStartValue(0.0); -- m_sunkenon->setEndValue(1.0); -- m_sunkenon->setDuration(200); -- m_sunkenon->setEasingCurve(QEasingCurve::OutCubic); -- -- addAnimation(m_sunkenon); -- -- connect(m_sunkenon, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { -- w->update(); -- }); -- connect(m_sunkenon, &QVariantAnimation::finished, w, [=]() { -- w->update(); -- }); -- -- m_off = new QVariantAnimation(this); -- m_off->setStartValue(1.0); -- m_off->setEndValue(0.0); -- m_off->setDuration(100); -- m_off->setEasingCurve(QEasingCurve::OutCubic); -- -- addAnimation(m_off); -- -- connect(m_off, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { -- w->update(); -- }); -- connect(m_off, &QVariantAnimation::finished, w, [=]() { -- w->update(); -- }); -- return true; -- --} -- --bool RadioButtonAnimator::unboundWidget() --{ -- this->stop(); -- this->setDirection(QAbstractAnimation::Forward); -- if(m_sunkenon){ -- m_sunkenon->deleteLater(); -- m_sunkenon = nullptr; -- } -- if(m_off){ -- m_off->deleteLater(); -- m_off = nullptr; -- } -- -- if (m_widget) { -- this->setParent(nullptr); -- return true; -- } -- return false; -- --} -- --QVariant RadioButtonAnimator::value(const QString &property) --{ -- if(property == "SunKenOn") -- return m_sunkenon->currentValue(); -- else if(property == "Off") -- return m_off->currentValue(); -- else -- return QVariant(); --} -- --bool RadioButtonAnimator::isRunning(const QString &property) --{ -- if(property == "SunKenOn"){ -- return m_sunkenon->state() == Running; -- } -- else if(property == "Off") -- return m_off->state() == Running; -- else -- return this->state() == Running; --} -- --bool RadioButtonAnimator::setAnimatorStartValue(const QString &property, const QVariant &value) --{ -- if(property == "SunKenOn") -- { -- m_sunkenon->setStartValue(value); -- return true; -- } -- else if(property == "Off") -- { -- m_off->setStartValue(value); -- return true; -- } -- else -- { -- return false; -- } --} -- --bool RadioButtonAnimator::setAnimatorEndValue(const QString &property, const QVariant &value) --{ -- if(property == "SunKenOn") -- { -- m_sunkenon->setEndValue(value); -- return true; -- } -- else if(property == "Off") -- { -- m_off->setEndValue(value); -- return true; -- } -- else -- { -- return false; -- } --} -- --bool RadioButtonAnimator::setAnimatorDuration(const QString &property, int duration) --{ -- if(property == "SunKenOn") -- { -- m_sunkenon->setDuration(duration); -- return true; -- } -- else if(property == "Off") -- { -- m_off->setDuration(duration); -- return true; -- } -- else -- { -- return false; -- } --} -- --void RadioButtonAnimator::setAnimatorDirectionForward(const QString &property, bool forward) --{ -- auto d = forward? QAbstractAnimation::Forward: QAbstractAnimation::Backward; -- if(property == "SunKenOn") -- m_sunkenon->setDirection(d); -- else if(property == "Off") -- { -- m_off->setDirection(d); -- } -- else -- return; --} --void RadioButtonAnimator::startAnimator(const QString &property) --{ -- if(property == "SunKenOn") -- { -- m_sunkenon->start(); -- } -- else if(property == "Off") -- { -- m_off->start(); -- } -- else -- this->start(); --} -- --void RadioButtonAnimator::stopAnimator(const QString &property) --{ -- if(property == "SunKenOn") -- { -- m_sunkenon->stop(); -- m_sunkenon->setCurrentTime(0); -- } -- else if(property == "Off") -- { -- m_off->stop(); -- m_off->setCurrentTime(0); -- } -- else -- { -- this->stop(); -- this->setCurrentTime(0); -- } --} -- --int RadioButtonAnimator::currentAnimatorTime(const QString &property) --{ -- if(property == "SunKenOn") -- return m_sunkenon->currentTime(); -- if(property == "Off") -- return m_off->currentTime(); -- else -- return this->currentTime(); --} -- --void RadioButtonAnimator::setAnimatorCurrentTime(const QString &property, const int msecs) --{ -- if ("SunKenOn" == property) { -- m_sunkenon->setCurrentTime(msecs); -- } else if("Off" == property) { -- m_off->setCurrentTime(msecs); -- } --} -- --int RadioButtonAnimator::totalAnimationDuration(const QString &property) --{ -- if(property == "SunKenOn") -- return m_sunkenon->duration(); -- if(property == "Off") -- return m_off->duration(); -- else -- return this->duration(); --} -- -diff --git a/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.h b/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.h -deleted file mode 100644 -index e355ee4..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.h -+++ /dev/null -@@ -1,67 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef RADIOANIMATOR_H --#define RADIOANIMATOR_H -- --#include <QObject> --#include <QVariantAnimation> --#include <QParallelAnimationGroup> -- --#include "animator-iface.h" -- --namespace UKUI { -- --namespace RadioButton { --class RadioButtonAnimator : public QParallelAnimationGroup, public AnimatorIface --{ -- Q_OBJECT --public: -- explicit RadioButtonAnimator(QObject *parent = nullptr); -- ~RadioButtonAnimator(); -- -- bool bindWidget(QWidget *w); -- bool unboundWidget(); -- QWidget *boundedWidget() {return m_widget;} -- QVariant value(const QString &property); -- bool setAnimatorStartValue(const QString &property, const QVariant &value); -- bool setAnimatorEndValue(const QString &property, const QVariant &value); -- bool setAnimatorDuration(const QString &property, int duration); -- void setAnimatorDirectionForward(const QString &property = nullptr, bool forward = true); -- bool isRunning(const QString &property = nullptr); -- void startAnimator(const QString &property = nullptr); -- void stopAnimator(const QString &property = nullptr); -- int currentAnimatorTime(const QString &property = nullptr); -- void setAnimatorCurrentTime(const QString &property = nullptr, const int msecs = 0); -- int totalAnimationDuration(const QString &property = nullptr); -- --signals: -- --private: -- QWidget* m_widget = nullptr; -- QVariantAnimation *m_off = nullptr; -- QVariantAnimation *m_sunkenon = nullptr; --}; --} --} -- --#endif // RADIOANIMATOR_H -diff --git a/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.cpp -deleted file mode 100644 -index b1f673a..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.cpp -+++ /dev/null -@@ -1,79 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "scrollbar-animation-helper.h" -- --#include "animations/scrollbar/ukui-scrollbar-default-interaction-animator.h" -- --#include <QWidget> -- --ScrollBarAnimationHelper::ScrollBarAnimationHelper(QObject *parent) : AnimationHelper(parent) --{ -- --} -- --ScrollBarAnimationHelper::~ScrollBarAnimationHelper() --{ -- --} -- --bool ScrollBarAnimationHelper::registerWidget(QWidget *w) --{ -- auto animator = new UKUI::ScrollBar::DefaultInteractionAnimator; -- bool result = animator->bindWidget(w); -- if (!result) -- { -- animator->deleteLater(); -- animator = nullptr; -- } -- else -- { -- m_animators->insertMulti(w, animator); -- } -- -- connect(w, &QWidget::destroyed, this, [=](){ -- unregisterWidget(w); -- }); -- -- return result; --} -- --bool ScrollBarAnimationHelper::unregisterWidget(QWidget *w) --{ --// auto animator = w->findChild<UKUI::ScrollBar::DefaultInteractionAnimator*>("ukui_scrollbar_default_interaction_animator", Qt::FindDirectChildrenOnly); -- auto animators = m_animators->values(w); -- bool result = false; -- for (auto animator : animators) { -- if (animator) { -- result = animator->unboundWidget(); -- delete animator; -- animator = nullptr; -- } -- } -- m_animators->remove(w); -- return result; --} -- --AnimatorIface *ScrollBarAnimationHelper::animator(const QWidget *w) --{ -- return m_animators->value(w); --} -diff --git a/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.h -deleted file mode 100644 -index ab21905..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.h -+++ /dev/null -@@ -1,45 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef SCROLLBARANIMATIONHELPER_H --#define SCROLLBARANIMATIONHELPER_H -- --#include <QObject> --#include "animation-helper.h" -- --class ScrollBarAnimationHelper : public AnimationHelper --{ -- Q_OBJECT --public: -- explicit ScrollBarAnimationHelper(QObject *parent = nullptr); -- ~ScrollBarAnimationHelper(); -- bool registerWidget(QWidget *w); -- bool unregisterWidget(QWidget *w); -- -- AnimatorIface *animator(const QWidget *w); -- --signals: -- --public slots: --}; -- --#endif // SCROLLBARANIMATIONHELPER_H -diff --git a/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.cpp -deleted file mode 100644 -index 48d4414..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.cpp -+++ /dev/null -@@ -1,78 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "slider-animation-helper.h" -- --#include "slider-animator.h" -- --#include <QWidget> -- --SliderAnimationHelper::SliderAnimationHelper(QObject *parent) : AnimationHelper(parent) --{ -- --} -- --SliderAnimationHelper::~SliderAnimationHelper() --{ -- --} -- --bool SliderAnimationHelper::registerWidget(QWidget *w) --{ -- auto animator = new UKUI::Slider::SliderAnimator; -- bool result = animator->bindWidget(w); -- if (!result) -- { -- animator->deleteLater(); -- animator = nullptr; -- } -- else -- { -- m_animators->insertMulti(w, animator); -- } -- -- connect(w, &QWidget::destroyed, this, [=](){ -- unregisterWidget(w); -- }); -- -- return result; --} -- --bool SliderAnimationHelper::unregisterWidget(QWidget *w) --{ -- auto animators= m_animators->values(w); -- bool result = false; -- for (auto animator : animators) { -- if (animator) { -- result = animator->unboundWidget(); -- delete animator; -- animator = nullptr; -- } -- } -- m_animators->remove(w); -- return result; --} -- --AnimatorIface *SliderAnimationHelper::animator(const QWidget *w) --{ -- return m_animators->value(w); --} -diff --git a/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.h -deleted file mode 100644 -index 955dafd..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.h -+++ /dev/null -@@ -1,45 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef SLIDERANIMATIONHELPER_H --#define SLIDERANIMATIONHELPER_H -- --#include <QObject> --#include "animation-helper.h" -- --class SliderAnimationHelper : public AnimationHelper --{ -- Q_OBJECT --public: -- explicit SliderAnimationHelper(QObject *parent = nullptr); -- ~SliderAnimationHelper(); -- bool registerWidget(QWidget *w); -- bool unregisterWidget(QWidget *w); -- -- AnimatorIface *animator(const QWidget *w); -- --signals: -- --public slots: --}; -- --#endif // SLIDERANIMATIONHELPER_H -diff --git a/ukui-styles/qt5-style-ukui/animations/slider-animator.cpp b/ukui-styles/qt5-style-ukui/animations/slider-animator.cpp -deleted file mode 100644 -index 9dc0991..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/slider-animator.cpp -+++ /dev/null -@@ -1,392 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "slider-animator.h" --#include <QSlider> -- --#include <QVariantAnimation> -- --#include <QDebug> -- --using namespace UKUI::Slider; -- --SliderAnimator::SliderAnimator(QObject *parent) : QParallelAnimationGroup (parent) --{ -- --} -- --SliderAnimator::~SliderAnimator() --{ -- if(m_slider_opacity){ -- m_slider_opacity->deleteLater(); -- m_slider_opacity = nullptr; -- } -- if(m_hover_bg_width){ -- m_hover_bg_width->deleteLater(); -- m_hover_bg_width = nullptr; -- } -- if(m_sunken_silder_additional_opacity){ -- m_sunken_silder_additional_opacity->deleteLater(); -- m_sunken_silder_additional_opacity = nullptr; -- } -- if(m_silder_move_position){ -- m_silder_move_position->deleteLater(); -- m_silder_move_position = nullptr; -- } --} -- --/*! -- * \brief SliderAnimator::bindWidget -- * \param w -- * \return -- * -- * \details -- * QObject has a feature that parent object can use findChild() method -- * getting a specific named child. -- * -- * I use QObject::setObjectName() set my animator and bind to a scroll bar. -- * So that i could not cache a hash or map to manage animators. -- * -- * \bug -- * Cause I use named QObject child to cache the animator for a scrollbar, -- * However there are some troubles for my unexcepted. -- * -- * For example, qt5 assistant's main view can not find child correctly. -- * I don't know if animator bind with child was been removed at some times. -- */ --bool SliderAnimator::bindWidget(QWidget *w) --{ -- if (w->property("doNotAnimate").toBool()) -- return false; -- -- if (qobject_cast<QSlider*>(w)) { -- m_widget = w; -- } else { -- return false; -- } -- -- m_slider_opacity = new QVariantAnimation(this); -- m_slider_opacity->setStartValue(0.0); -- m_slider_opacity->setEndValue(1.0); -- m_slider_opacity->setDuration(200); -- m_slider_opacity->setEasingCurve(QEasingCurve::InOutCubic); -- addAnimation(m_slider_opacity); -- -- m_hover_bg_width = new QVariantAnimation(this); -- m_hover_bg_width->setStartValue(0.0); -- m_hover_bg_width->setEndValue(1.0); -- m_hover_bg_width->setDuration(200); -- m_hover_bg_width->setEasingCurve(QEasingCurve::InOutCubic); -- addAnimation(m_hover_bg_width); -- -- m_sunken_silder_additional_opacity = new QVariantAnimation(this); -- m_sunken_silder_additional_opacity->setStartValue(0.0); -- m_sunken_silder_additional_opacity->setEndValue(0.10); -- m_sunken_silder_additional_opacity->setDuration(150); -- addAnimation(m_sunken_silder_additional_opacity); -- -- m_silder_move_position = new QVariantAnimation(this); -- m_silder_move_position->setStartValue(0.0); -- m_silder_move_position->setEndValue(1.0); -- m_silder_move_position->setDuration(150); -- m_silder_move_position->setEasingCurve(QEasingCurve::InOutCubic); -- addAnimation(m_silder_move_position); -- -- connect(m_slider_opacity, &QVariantAnimation::valueChanged, w, [=]() { -- w->update(); -- }); -- connect(m_sunken_silder_additional_opacity, &QVariantAnimation::valueChanged, w, [=]() { -- w->update(); -- }); -- connect(m_silder_move_position, &QVariantAnimation::valueChanged, w, [=]() { -- w->update(); -- }); -- connect(m_hover_bg_width, &QVariantAnimation::valueChanged, w, [=]() { -- w->update(); -- }); -- connect(m_slider_opacity, &QVariantAnimation::finished, w, [=]() { -- w->update(); -- }); -- connect(m_sunken_silder_additional_opacity, &QVariantAnimation::finished, w, [=]() { -- w->update(); -- }); -- connect(m_silder_move_position, &QVariantAnimation::finished, w, [=]() { -- w->update(); -- }); -- connect(m_hover_bg_width, &QVariantAnimation::finished, w, [=]() { -- w->update(); -- }); -- -- return true; --} -- --bool SliderAnimator::unboundWidget() --{ -- this->stop(); -- this->setDirection(QAbstractAnimation::Forward); -- if(m_slider_opacity){ -- m_slider_opacity->deleteLater(); -- m_slider_opacity = nullptr; -- } -- if(m_hover_bg_width){ -- m_hover_bg_width->deleteLater(); -- m_hover_bg_width = nullptr; -- } -- if(m_sunken_silder_additional_opacity){ -- m_sunken_silder_additional_opacity->deleteLater(); -- m_sunken_silder_additional_opacity = nullptr; -- } -- if(m_silder_move_position){ -- m_silder_move_position->deleteLater(); -- m_silder_move_position = nullptr; -- } -- if (m_widget) { -- this->setParent(nullptr); -- return true; -- } -- return false; --} -- --QVariant SliderAnimator::value(const QString &property) --{ -- if (property == "slider_opacity") { -- return m_slider_opacity->currentValue(); -- } else if (property == "additional_opacity") { -- return m_sunken_silder_additional_opacity->currentValue(); -- } else if (property == "move_position") { -- return m_silder_move_position->currentValue(); -- } else if (property == "bg_width") { -- return m_hover_bg_width->currentValue(); -- } else { -- return QVariant(); -- } --} -- --bool SliderAnimator::setAnimatorStartValue(const QString &property, const QVariant &value) --{ -- if (property == "slider_opacity") { -- m_slider_opacity->setStartValue(value); -- return true; -- } else if (property == "additional_opacity") -- { -- m_sunken_silder_additional_opacity->setStartValue(value); -- return true; -- } else if (property == "move_position") { -- m_silder_move_position->setStartValue(value); -- return true; -- } else if (property == "bg_width") { -- m_hover_bg_width->setStartValue(value); -- return true; -- } else { -- return false; -- } --} -- --bool SliderAnimator::setAnimatorEndValue(const QString &property, const QVariant &value) --{ -- if (property == "slider_opacity") { -- m_slider_opacity->setEndValue(value); -- return true; -- } else if (property == "additional_opacity") { -- m_sunken_silder_additional_opacity->setEndValue(value); -- return true; -- } else if (property == "move_position") { -- m_silder_move_position->setEndValue(value); -- return true; -- } else if (property == "bg_width") { -- m_hover_bg_width->setEndValue(value); -- return true; -- } else { -- return false; -- } --} -- --QVariant SliderAnimator::animatorStartValue(const QString &property) --{ -- if (property == "slider_opacity") { -- return m_slider_opacity->startValue(); -- } else if (property == "additional_opacity") { -- return m_sunken_silder_additional_opacity->startValue(); -- } else if (property == "move_position") { -- return m_silder_move_position->startValue(); -- } else if (property == "bg_width") { -- return m_hover_bg_width->startValue(); -- } else { -- return QVariant(); -- } --} -- --QVariant SliderAnimator::animatorEndValue(const QString &property) --{ -- if (property == "slider_opacity") { -- return m_slider_opacity->endValue(); -- } else if (property == "additional_opacity") { -- return m_sunken_silder_additional_opacity->endValue(); -- } else if (property == "move_position") { -- return m_silder_move_position->endValue(); -- } else if (property == "bg_width") { -- return m_hover_bg_width->endValue(); -- } else { -- return QVariant(); -- } --} -- -- --bool SliderAnimator::setAnimatorDuration(const QString &property, int duration) --{ -- if (property == "slider_opacity") { -- m_slider_opacity->setDuration(duration); -- return true; -- } else if (property == "additional_opacity") { -- m_sunken_silder_additional_opacity->setDuration(duration); -- return true; -- } else if (property == "move_position") { -- m_silder_move_position->setDuration(duration); -- return true; -- } else if (property == "bg_width") { -- m_hover_bg_width->setDuration(duration); -- return true; -- } else { -- return false; -- } --} -- --void SliderAnimator::setAnimatorDirectionForward(const QString &property, bool forward) --{ -- auto d = forward? QAbstractAnimation::Forward: QAbstractAnimation::Backward; -- if (property == "slider_opacity") { -- m_slider_opacity->setDirection(d); -- } else if (property == "additional_opacity") { -- m_sunken_silder_additional_opacity->setDirection(d); -- } else if (property == "move_position") { -- m_silder_move_position->setDirection(d); -- } else if (property == "bg_width") { -- m_hover_bg_width->setDirection(d); -- } else { -- return; -- } --} -- --bool SliderAnimator::isRunning(const QString &property) --{ -- if (property == "slider_opacity") { -- return m_slider_opacity->state() == Running; -- } else if (property == "additional_opacity") { -- return m_sunken_silder_additional_opacity->state() == Running; -- } else if (property == "move_position") { -- return m_silder_move_position->state() == Running; -- } else if (property == "bg_width") { -- return m_hover_bg_width->state() == Running; -- } else { -- return this->state() == Running; -- } --} -- --void SliderAnimator::startAnimator(const QString &property) --{ -- if (property == "slider_opacity") { -- m_slider_opacity->start(); -- } else if (property == "additional_opacity") { -- m_sunken_silder_additional_opacity->start(); -- } else if (property == "move_position") { -- m_silder_move_position->start(); -- } else if (property == "bg_width") { -- m_hover_bg_width->start(); -- } else { -- this->start(); -- } --} -- --void SliderAnimator::stopAnimator(const QString &property) --{ -- if (property == "slider_opacity") { -- m_slider_opacity->stop(); -- } else if (property == "additional_opacity") { -- m_sunken_silder_additional_opacity->stop(); -- } else if (property == "move_position") { -- m_silder_move_position->stop(); -- } else if (property == "bg_width") { -- m_hover_bg_width->stop(); -- } else { -- this->stop(); -- } --} -- --int SliderAnimator::currentAnimatorTime(const QString &property) --{ -- if (property == "slider_opacity") { -- return m_slider_opacity->currentTime(); -- } else if (property == "additional_opacity") { -- return m_sunken_silder_additional_opacity->currentTime(); -- } else if (property == "move_position") { -- return m_silder_move_position->currentTime(); -- } else if (property == "bg_width") { -- return m_hover_bg_width->currentTime(); -- } else { -- return this->currentTime(); -- } --} -- --void SliderAnimator::setAnimatorCurrentTime(const QString &property, const int msecs) --{ -- if ("move_position" == property) { -- m_silder_move_position->setCurrentTime(msecs); -- } --} -- -- --int SliderAnimator::totalAnimationDuration(const QString &property) --{ -- if (property == "slider_opacity") { -- return m_slider_opacity->duration(); -- } else if (property == "additional_opacity") { -- return m_sunken_silder_additional_opacity->duration(); -- } else if (property == "move_position") { -- return m_silder_move_position->duration(); -- } else if (property == "bg_width") { -- return m_hover_bg_width->duration(); -- } else { -- return this->duration(); -- } --} -- --void SliderAnimator::setExtraProperty(const QString &property, const QVariant &value) --{ -- if(property == "end_position") -- m_endPosition = value.toInt(); -- else if(property == "start_position") -- m_startPosition = value.toInt(); -- else if(property == "addValue") -- m_addValue = value.toBool(); --} -- --QVariant SliderAnimator::getExtraProperty(const QString &property) --{ -- if(property == "end_position") -- return m_endPosition; -- else if(property == "start_position") -- return m_startPosition; -- else if(property == "addValue") -- return m_addValue; -- return QVariant(); --} -- -diff --git a/ukui-styles/qt5-style-ukui/animations/slider-animator.h b/ukui-styles/qt5-style-ukui/animations/slider-animator.h -deleted file mode 100644 -index 54324fa..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/slider-animator.h -+++ /dev/null -@@ -1,79 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef SLIDERANIMATOR_H --#define SLIDERANIMATOR_H -- --#include <QParallelAnimationGroup> --#include "animator-iface.h" -- --class QVariantAnimation; -- --namespace UKUI { -- --namespace Slider { -- --class SliderAnimator : public QParallelAnimationGroup, public AnimatorIface --{ -- Q_OBJECT --public: -- explicit SliderAnimator(QObject *parent = nullptr); -- ~SliderAnimator(); -- -- bool bindWidget(QWidget *w); -- bool unboundWidget(); -- QWidget *boundedWidget() {return m_widget;} -- -- QVariant value(const QString &property); -- bool isRunning(const QString &property = nullptr); -- bool setAnimatorStartValue(const QString &property, const QVariant &value); -- bool setAnimatorEndValue(const QString &property, const QVariant &value); -- QVariant animatorStartValue(const QString &property); -- QVariant animatorEndValue(const QString &property); -- -- bool setAnimatorDuration(const QString &property, int duration); -- void setAnimatorDirectionForward(const QString &property = nullptr, bool forward = true); -- void startAnimator(const QString &property = nullptr); -- void stopAnimator(const QString &property = nullptr); -- int currentAnimatorTime(const QString &property = nullptr); -- void setAnimatorCurrentTime(const QString &property, const int msecs); -- int totalAnimationDuration(const QString &property); -- void setExtraProperty(const QString &property, const QVariant &value); -- QVariant getExtraProperty(const QString &property); -- --private: -- QWidget *m_widget = nullptr; -- -- QVariantAnimation *m_slider_opacity = nullptr; -- QVariantAnimation *m_hover_bg_width = nullptr; -- QVariantAnimation *m_sunken_silder_additional_opacity = nullptr; -- QVariantAnimation *m_silder_move_position = nullptr; -- int m_endPosition = 0; -- int m_startPosition = 0; -- bool m_addValue; --}; -- --} -- --} -- --#endif // SLIDERANIMATOR_H -diff --git a/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.cpp -deleted file mode 100644 -index 170f7bf..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.cpp -+++ /dev/null -@@ -1,75 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "tab-widget-animation-helper.h" --#include "tabwidget/ukui-tabwidget-default-slide-animator.h" -- --TabWidgetAnimationHelper::TabWidgetAnimationHelper(QObject *parent) : AnimationHelper(parent) --{ -- --} -- --TabWidgetAnimationHelper::~TabWidgetAnimationHelper() --{ -- --} -- --bool TabWidgetAnimationHelper::registerWidget(QWidget *w) --{ -- auto animator = new UKUI::TabWidget::DefaultSlideAnimator; -- bool result = animator->bindWidget(w); -- if (!result) -- { -- animator->deleteLater(); -- animator = nullptr; -- } -- else -- { -- m_animators->insertMulti(w, animator); -- } -- -- connect(w, &QWidget::destroyed, this, [=](){ -- unregisterWidget(w); -- }); -- -- return result; --} -- --bool TabWidgetAnimationHelper::unregisterWidget(QWidget *w) --{ -- auto animators = m_animators->values(w); -- bool result = false; -- for (auto animator : animators) { -- if (animator) { -- result = animator->unboundWidget(); -- delete animator; -- animator = nullptr; -- } -- } -- m_animators->remove(w); -- return result; --} -- --AnimatorIface *TabWidgetAnimationHelper::animator(const QWidget *w) --{ -- return m_animators->value(w); --} -diff --git a/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.h -deleted file mode 100644 -index c9f2c2c..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.h -+++ /dev/null -@@ -1,42 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef TABWIDGETANIMATIONHELPER_H --#define TABWIDGETANIMATIONHELPER_H -- --#include <QObject> --#include "animation-helper.h" -- --class TabWidgetAnimationHelper : public AnimationHelper --{ -- Q_OBJECT --public: -- explicit TabWidgetAnimationHelper(QObject *parent = nullptr); -- ~TabWidgetAnimationHelper(); -- -- bool registerWidget(QWidget *w); -- bool unregisterWidget(QWidget *w); -- -- AnimatorIface *animator(const QWidget *w); --}; -- --#endif // TABWIDGETANIMATIONHELPER_H -diff --git a/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.cpp b/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.cpp -deleted file mode 100644 -index a1b0dbb..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.cpp -+++ /dev/null -@@ -1,78 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "tree-animation-helper.h" -- --#include "tree-animator.h" -- --#include <QWidget> -- --TreeAnimationHelper::TreeAnimationHelper(QObject *parent) : AnimationHelper(parent) --{ -- --} -- --TreeAnimationHelper::~TreeAnimationHelper() --{ -- --} -- --bool TreeAnimationHelper::registerWidget(QWidget *w) --{ -- auto animator = new UKUI::Tree::TreeAnimator; -- bool result = animator->bindWidget(w); -- if (!result) -- { -- animator->deleteLater(); -- animator = nullptr; -- } -- else -- { -- m_animators->insertMulti(w, animator); -- } -- -- connect(w, &QWidget::destroyed, this, [=](){ -- unregisterWidget(w); -- }); -- -- return result; --} -- --bool TreeAnimationHelper::unregisterWidget(QWidget *w) --{ -- auto animators = m_animators->values(w); -- bool result = false; -- for (auto animator : animators) { -- if (animator) { -- result = animator->unboundWidget(); -- delete animator; -- animator = nullptr; -- } -- } -- m_animators->remove(w); -- return result; --} -- --AnimatorIface *TreeAnimationHelper::animator(const QWidget *w) --{ -- return m_animators->value(w); --} -diff --git a/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.h b/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.h -deleted file mode 100644 -index 3f5e923..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.h -+++ /dev/null -@@ -1,45 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef TREEANIMATIONHELPER_H --#define TREEANIMATIONHELPER_H -- --#include <QObject> --#include "animation-helper.h" -- --class TreeAnimationHelper : public AnimationHelper --{ -- Q_OBJECT --public: -- explicit TreeAnimationHelper(QObject *parent = nullptr); -- ~TreeAnimationHelper(); -- bool registerWidget(QWidget *w); -- bool unregisterWidget(QWidget *w); -- -- AnimatorIface *animator(const QWidget *w); -- --signals: -- --public slots: --}; -- --#endif // TREEANIMATIONHELPER_H -diff --git a/ukui-styles/qt5-style-ukui/animations/tree-animator.cpp b/ukui-styles/qt5-style-ukui/animations/tree-animator.cpp -deleted file mode 100644 -index 8cd21fd..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/tree-animator.cpp -+++ /dev/null -@@ -1,296 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "tree-animator.h" --#include <QTreeView> -- --#include <QVariantAnimation> -- --#include <QDebug> -- --using namespace UKUI::Tree; -- --TreeAnimator::TreeAnimator(QObject *parent) : QParallelAnimationGroup (parent) --{ -- --} -- --TreeAnimator::~TreeAnimator() --{ -- if(m_expand){ -- m_expand->deleteLater(); -- m_expand = nullptr; -- } -- if(m_collaps){ -- m_collaps->deleteLater(); -- m_collaps = nullptr; -- } --} -- --/*! -- * \brief TreeAnimator::bindWidget -- * \param w -- * \return -- * -- * \details -- * QObject has a feature that parent object can use findChild() method -- * getting a specific named child. -- * -- * I use QObject::setObjectName() set my animator and bind to a scroll bar. -- * So that i could not cache a hash or map to manage animators. -- * -- * \bug -- * Cause I use named QObject child to cache the animator for a scrollbar, -- * However there are some troubles for my unexcepted. -- * -- * For example, qt5 assistant's main view can not find child correctly. -- * I don't know if animator bind with child was been removed at some times. -- */ --bool TreeAnimator::bindWidget(QWidget *w) --{ -- if (w->property("doNotAnimate").toBool()) -- return false; -- -- if (qobject_cast<QTreeView*>(w)) { -- m_widget = w; -- } else { -- return false; -- } -- -- m_expand = new QVariantAnimation(this); -- m_expand->setStartValue(0.0); -- m_expand->setEndValue(1.0); -- m_expand->setDuration(250); -- m_expand->setEasingCurve(QEasingCurve::InOutCubic); -- addAnimation(m_expand); -- -- m_collaps = new QVariantAnimation(this); -- m_collaps->setStartValue(0.0); -- m_collaps->setEndValue(1.0); -- m_collaps->setDuration(250); -- m_collaps->setEasingCurve(QEasingCurve::InOutCubic); -- addAnimation(m_collaps); -- -- connect(m_expand, &QVariantAnimation::valueChanged, w, [=]() { -- qobject_cast<QTreeView*>(w)->viewport()->update(); -- }); -- connect(m_collaps, &QVariantAnimation::valueChanged, w, [=]() { -- qobject_cast<QTreeView*>(w)->viewport()->update(); -- }); -- connect(m_expand, &QVariantAnimation::finished, w, [=]() { -- qobject_cast<QTreeView*>(w)->viewport()->update(); -- }); -- connect(m_collaps, &QVariantAnimation::finished, w, [=]() { -- qobject_cast<QTreeView*>(w)->viewport()->update(); -- }); -- -- return true; --} -- --bool TreeAnimator::unboundWidget() --{ -- this->stop(); -- this->setDirection(QAbstractAnimation::Forward); -- if(m_expand){ -- m_expand->deleteLater(); -- m_expand = nullptr; -- } -- if(m_collaps){ -- m_collaps->deleteLater(); -- m_collaps = nullptr; -- } -- -- if (m_widget) { -- this->setParent(nullptr); -- return true; -- } -- return false; --} -- --QVariant TreeAnimator::value(const QString &property) --{ -- if (property == "expand") { -- return m_expand->currentValue(); -- } else if (property == "collaps") { -- return m_collaps->currentValue(); -- } else { -- return QVariant(); -- } --} -- --bool TreeAnimator::setAnimatorStartValue(const QString &property, const QVariant &value) --{ -- if (property == "expand") { -- m_expand->setStartValue(value); -- return true; -- } else if (property == "collaps") -- { -- m_collaps->setStartValue(value); -- return true; -- } else { -- return false; -- } --} -- --bool TreeAnimator::setAnimatorEndValue(const QString &property, const QVariant &value) --{ -- if (property == "expand") { -- m_expand->setEndValue(value); -- return true; -- } else if (property == "collaps") { -- m_collaps->setEndValue(value); -- return true; -- } else { -- return false; -- } --} -- --QVariant TreeAnimator::animatorStartValue(const QString &property) --{ -- if (property == "expand") { -- return m_expand->startValue(); -- } else if (property == "collaps") { -- return m_collaps->startValue(); -- } else { -- return QVariant(); -- } --} -- --QVariant TreeAnimator::animatorEndValue(const QString &property) --{ -- if (property == "expand") { -- return m_expand->endValue(); -- } else if (property == "collaps") { -- return m_collaps->endValue(); -- } else { -- return QVariant(); -- } --} -- -- --bool TreeAnimator::setAnimatorDuration(const QString &property, int duration) --{ -- if (property == "expand") { -- m_expand->setDuration(duration); -- return true; -- } else if (property == "collaps") { -- m_collaps->setDuration(duration); -- return true; -- } else { -- return false; -- } --} -- --void TreeAnimator::setAnimatorDirectionForward(const QString &property, bool forward) --{ -- auto d = forward? QAbstractAnimation::Forward: QAbstractAnimation::Backward; -- if (property == "expand") { -- m_expand->setDirection(d); -- } else if (property == "collaps") { -- m_collaps->setDirection(d); -- } else { -- return; -- } --} -- --bool TreeAnimator::isRunning(const QString &property) --{ -- if (property == "expand") { -- return m_expand->state() == Running; -- } else if (property == "collaps") { -- return m_collaps->state() == Running; -- } else { -- return this->state() == Running; -- } --} -- --void TreeAnimator::startAnimator(const QString &property) --{ -- if (property == "expand") { -- m_expand->start(); -- } else if (property == "collaps") { -- m_collaps->start(); -- } else { -- this->start(); -- } --} -- --void TreeAnimator::stopAnimator(const QString &property) --{ -- if (property == "expand") { -- m_expand->stop(); -- } else if (property == "collaps") { -- m_collaps->stop(); -- } else { -- this->stop(); -- } --} -- --int TreeAnimator::currentAnimatorTime(const QString &property) --{ -- if (property == "expand") { -- return m_expand->currentTime(); -- } else if (property == "collaps") { -- return m_collaps->currentTime(); -- } else { -- return this->currentTime(); -- } --} -- --void TreeAnimator::setAnimatorCurrentTime(const QString &property, const int msecs) --{ -- if (property == "expand") { -- return m_expand->setCurrentTime(msecs); -- } else if (property == "collaps") { -- return m_collaps->setCurrentTime(msecs); -- } --} -- -- --int TreeAnimator::totalAnimationDuration(const QString &property) --{ -- if (property == "expand") { -- return m_expand->duration(); -- } else if (property == "collaps") { -- return m_collaps->duration(); -- } else { -- return this->duration(); -- } --} -- --void TreeAnimator::setExtraProperty(const QString &property, const QVariant &value) --{ -- if(property == "expandItem") -- m_expandItem = value.toString(); -- else if(property == "collapsItem") -- m_collapsItem = value.toString(); --} -- --QVariant TreeAnimator::getExtraProperty(const QString &property) --{ -- if(property == "expandItem") -- return m_expandItem; -- else if(property == "collapsItem") -- return m_collapsItem; -- return QVariant(); --} -- -diff --git a/ukui-styles/qt5-style-ukui/animations/tree-animator.h b/ukui-styles/qt5-style-ukui/animations/tree-animator.h -deleted file mode 100644 -index 0037a1b..0000000 ---- a/ukui-styles/qt5-style-ukui/animations/tree-animator.h -+++ /dev/null -@@ -1,76 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef TREEANIMATOR_H --#define TREEANIMATOR_H -- --#include <QParallelAnimationGroup> --#include "animator-iface.h" -- --class QVariantAnimation; -- --namespace UKUI { -- --namespace Tree { -- --class TreeAnimator : public QParallelAnimationGroup, public AnimatorIface --{ -- Q_OBJECT --public: -- explicit TreeAnimator(QObject *parent = nullptr); -- ~TreeAnimator(); -- -- bool bindWidget(QWidget *w); -- bool unboundWidget(); -- QWidget *boundedWidget() {return m_widget;} -- -- QVariant value(const QString &property); -- bool isRunning(const QString &property = nullptr); -- bool setAnimatorStartValue(const QString &property, const QVariant &value); -- bool setAnimatorEndValue(const QString &property, const QVariant &value); -- QVariant animatorStartValue(const QString &property); -- QVariant animatorEndValue(const QString &property); -- -- bool setAnimatorDuration(const QString &property, int duration); -- void setAnimatorDirectionForward(const QString &property = nullptr, bool forward = true); -- void startAnimator(const QString &property = nullptr); -- void stopAnimator(const QString &property = nullptr); -- int currentAnimatorTime(const QString &property = nullptr); -- void setAnimatorCurrentTime(const QString &property, const int msecs); -- int totalAnimationDuration(const QString &property); -- void setExtraProperty(const QString &property, const QVariant &value); -- QVariant getExtraProperty(const QString &property); -- --private: -- QWidget *m_widget = nullptr; -- -- QVariantAnimation *m_expand = nullptr; -- QVariantAnimation *m_collaps = nullptr; -- QString m_expandItem; -- QString m_collapsItem; --}; -- --} -- --} -- --#endif // TREEANIMATOR_H -diff --git a/ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.cpp b/ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.cpp -deleted file mode 100644 -index 84490a0..0000000 ---- a/ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.cpp -+++ /dev/null -@@ -1,766 +0,0 @@ --/* -- * Copyright (C) 2018 Vlad Zagorodniy <vlad.zahorodnii@kde.org> -- * -- * The box blur implementation is based on AlphaBoxBlur from Firefox. -- * -- * This program is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program; if not, write to the Free Software -- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -- */ -- --// own --#include "breezeboxshadowrenderer.h" --#include <QX11Info> --#include <xcb/xcb.h> --#include <X11/Xlib.h> --#include <X11/X.h> --#include <xcb/xcb.h> --#include <QX11Info> --#include <X11/extensions/shape.h> -- --// auto-generated --// Qt --#include <QPainter> -- --#ifdef BREEZE_COMMON_USE_KDE4 --#include <QtCore/qmath.h> --#else --#include <QtMath> --#endif -- --static inline int calculateBlurRadius(qreal stdDev) --{ -- // See https://www.w3.org/TR/SVG11/filters.html#feGaussianBlurElement -- const qreal gaussianScaleFactor = (3.0 * qSqrt(2.0 * M_PI) / 4.0) * 1.5; -- return qMax(2, qFloor(stdDev * gaussianScaleFactor + 0.5)); --} -- --static inline qreal calculateBlurStdDev(int radius) --{ -- // See https://www.w3.org/TR/css-backgrounds-3/#shadow-blur -- return radius * 0.5; --} -- --static inline QSize calculateBlurExtent(int radius) --{ -- const int blurRadius = calculateBlurRadius(calculateBlurStdDev(radius)); -- return QSize(blurRadius, blurRadius); --} -- --struct BoxLobes --{ -- int left; ///< how many pixels sample to the left -- int right; ///< how many pixels sample to the right --}; -- --/** -- * Compute box filter parameters. -- * -- * @param radius The blur radius. -- * @returns Parameters for three box filters. -- **/ --static QVector<BoxLobes> computeLobes(int radius) --{ -- const int blurRadius = calculateBlurRadius(calculateBlurStdDev(radius)); -- const int z = blurRadius / 3; -- -- int major; -- int minor; -- int final; -- -- switch (blurRadius % 3) { -- case 0: -- major = z; -- minor = z; -- final = z; -- break; -- -- case 1: -- major = z + 1; -- minor = z; -- final = z; -- break; -- -- case 2: -- major = z + 1; -- minor = z; -- final = z + 1; -- break; -- -- default: --#if !BREEZE_COMMON_USE_KDE4 -- Q_UNREACHABLE(); --#endif -- break; -- } -- -- Q_ASSERT(major + minor + final == blurRadius); -- -- return { -- {major, minor}, -- {minor, major}, -- {final, final} -- }; --} -- --/** -- * Process a row with a box filter. -- * -- * @param src The start of the row. -- * @param dst The destination. -- * @param width The width of the row, in pixels. -- * @param horizontalStride The number of bytes from one alpha value to the -- * next alpha value. -- * @param verticalStride The number of bytes from one row to the next row. -- * @param lobes Params of the box filter. -- * @param transposeInput Whether the input is transposed. -- * @param transposeOutput Whether the output should be transposed. -- **/ --static inline void boxBlurRowAlpha(const uint8_t *src, uint8_t *dst, int width, int horizontalStride, -- int verticalStride, const BoxLobes &lobes, bool transposeInput, -- bool transposeOutput) --{ -- const int inputStep = transposeInput ? verticalStride : horizontalStride; -- const int outputStep = transposeOutput ? verticalStride : horizontalStride; -- -- const int boxSize = lobes.left + 1 + lobes.right; -- const int reciprocal = (1 << 24) / boxSize; -- -- uint32_t alphaSum = (boxSize + 1) / 2; -- -- const uint8_t *left = src; -- const uint8_t *right = src; -- uint8_t *out = dst; -- -- const uint8_t firstValue = src[0]; -- const uint8_t lastValue = src[(width - 1) * inputStep]; -- -- alphaSum += firstValue * lobes.left; -- -- const uint8_t *initEnd = src + (boxSize - lobes.left) * inputStep; -- while (right < initEnd) { -- alphaSum += *right; -- right += inputStep; -- } -- -- const uint8_t *leftEnd = src + boxSize * inputStep; -- while (right < leftEnd) { -- *out = (alphaSum * reciprocal) >> 24; -- alphaSum += *right - firstValue; -- right += inputStep; -- out += outputStep; -- } -- -- const uint8_t *centerEnd = src + width * inputStep; -- while (right < centerEnd) { -- *out = (alphaSum * reciprocal) >> 24; -- alphaSum += *right - *left; -- left += inputStep; -- right += inputStep; -- out += outputStep; -- } -- -- const uint8_t *rightEnd = dst + width * outputStep; -- while (out < rightEnd) { -- *out = (alphaSum * reciprocal) >> 24; -- alphaSum += lastValue - *left; -- left += inputStep; -- out += outputStep; -- } --} -- --/** -- * Blur the alpha channel of a given image. -- * -- * @param image The input image. -- * @param radius The blur radius. -- * @param rect Specifies what part of the image to blur. If nothing is provided, then -- * the whole alpha channel of the input image will be blurred. -- **/ --static inline void boxBlurAlpha(QImage &image, int radius, const QRect &rect = {}) --{ -- if (radius < 2) { -- return; -- } -- -- const QVector<BoxLobes> lobes = computeLobes(radius); -- -- const QRect blurRect = rect.isNull() ? image.rect() : rect; -- -- const int alphaOffset = QSysInfo::ByteOrder == QSysInfo::BigEndian ? 0 : 3; -- const int width = blurRect.width(); -- const int height = blurRect.height(); -- const int rowStride = image.bytesPerLine(); -- const int pixelStride = image.depth() >> 3; -- -- const int bufferStride = qMax(width, height) * pixelStride; -- QScopedPointer<uint8_t, QScopedPointerArrayDeleter<uint8_t> > buf(new uint8_t[2 * bufferStride]); -- uint8_t *buf1 = buf.data(); -- uint8_t *buf2 = buf1 + bufferStride; -- -- // Blur the image in horizontal direction. -- for (int i = 0; i < height; ++i) { -- uint8_t *row = image.scanLine(blurRect.y() + i) + blurRect.x() * pixelStride + alphaOffset; -- boxBlurRowAlpha(row, buf1, width, pixelStride, rowStride, lobes[0], false, false); -- boxBlurRowAlpha(buf1, buf2, width, pixelStride, rowStride, lobes[1], false, false); -- boxBlurRowAlpha(buf2, row, width, pixelStride, rowStride, lobes[2], false, false); -- } -- -- // Blur the image in vertical direction. -- for (int i = 0; i < width; ++i) { -- uint8_t *column = image.scanLine(blurRect.y()) + (blurRect.x() + i) * pixelStride + alphaOffset; -- boxBlurRowAlpha(column, buf1, height, pixelStride, rowStride, lobes[0], true, false); -- boxBlurRowAlpha(buf1, buf2, height, pixelStride, rowStride, lobes[1], false, false); -- boxBlurRowAlpha(buf2, column, height, pixelStride, rowStride, lobes[2], false, true); -- } --} -- --static inline void mirrorTopLeftQuadrant(QImage &image) --{ -- const int width = image.width(); -- const int height = image.height(); -- -- const int centerX = qCeil(width * 0.5); -- const int centerY = qCeil(height * 0.5); -- -- const int alphaOffset = QSysInfo::ByteOrder == QSysInfo::BigEndian ? 0 : 3; -- const int stride = image.depth() >> 3; -- -- for (int y = 0; y < centerY; ++y) { -- uint8_t *in = image.scanLine(y) + alphaOffset; -- uint8_t *out = in + (width - 1) * stride; -- -- for (int x = 0; x < centerX; ++x, in += stride, out -= stride) { -- *out = *in; -- } -- } -- -- for (int y = 0; y < centerY; ++y) { -- const uint8_t *in = image.scanLine(y) + alphaOffset; -- uint8_t *out = image.scanLine(width - y - 1) + alphaOffset; -- -- for (int x = 0; x < width; ++x, in += stride, out += stride) { -- *out = *in; -- } -- } --} -- --static void renderShadow(QPainter *painter, const QRect &rect, qreal borderRadius, const QPoint &offset, int radius, const QColor &color) --{ -- const QSize inflation = calculateBlurExtent(radius); -- const QSize size = rect.size() + 2 * inflation; -- --#if BREEZE_COMMON_USE_KDE4 -- const qreal dpr = 1.0; --#else -- const qreal dpr = painter->device()->devicePixelRatioF(); --#endif -- -- QImage shadow(size * dpr, QImage::Format_ARGB32_Premultiplied); --#if !BREEZE_COMMON_USE_KDE4 -- shadow.setDevicePixelRatio(dpr); --#endif -- shadow.fill(Qt::transparent); -- -- QRect boxRect(QPoint(0, 0), rect.size()); -- boxRect.moveCenter(QRect(QPoint(0, 0), size).center()); -- -- const qreal xRadius = 2.0 * borderRadius / boxRect.width(); -- const qreal yRadius = 2.0 * borderRadius / boxRect.height(); -- -- QPainter shadowPainter; -- shadowPainter.begin(&shadow); -- shadowPainter.setRenderHint(QPainter::Antialiasing); -- shadowPainter.setPen(Qt::NoPen); -- shadowPainter.setBrush(Qt::black); -- shadowPainter.drawRoundedRect(boxRect, xRadius, yRadius); -- shadowPainter.end(); -- -- // Because the shadow texture is symmetrical, that's enough to blur -- // only the top-left quadrant and then mirror it. -- const QRect blurRect(0, 0, qCeil(shadow.width() * 0.5), qCeil(shadow.height() * 0.5)); -- const int scaledRadius = qRound(radius * dpr); -- boxBlurAlpha(shadow, scaledRadius, blurRect); -- mirrorTopLeftQuadrant(shadow); -- -- // Give the shadow a tint of the desired color. -- shadowPainter.begin(&shadow); -- shadowPainter.setCompositionMode(QPainter::CompositionMode_SourceIn); -- shadowPainter.fillRect(shadow.rect(), color); -- shadowPainter.end(); -- -- // Actually, present the shadow. -- QRect shadowRect = shadow.rect(); -- shadowRect.setSize(shadowRect.size() / dpr); -- shadowRect.moveCenter(rect.center() + offset); -- painter->drawImage(shadowRect, shadow); --} -- --void BoxShadowRenderer::setBoxSize(const QSize &size) --{ -- m_boxSize = size; --} -- --void BoxShadowRenderer::setBorderRadius(qreal radius) --{ -- m_borderRadius = radius; --} -- --void BoxShadowRenderer::setDevicePixelRatio(qreal dpr) --{ -- m_dpr = dpr; --} -- --void BoxShadowRenderer::addShadow(const QPoint &offset, int radius, const QColor &color) --{ -- Shadow shadow = {}; -- shadow.offset = offset; -- shadow.radius = radius; -- shadow.color = color; -- m_shadows.append(shadow); --} -- --QImage BoxShadowRenderer::render() const --{ -- if (m_shadows.isEmpty()) { -- return {}; -- } -- -- QSize canvasSize; --#if BREEZE_COMMON_USE_KDE4 -- foreach (const Shadow &shadow, m_shadows) { --#else -- for (const Shadow &shadow : qAsConst(m_shadows)) { --#endif -- canvasSize = canvasSize.expandedTo( -- calculateMinimumShadowTextureSize(m_boxSize, shadow.radius, shadow.offset)); -- } -- -- QImage canvas(canvasSize * m_dpr, QImage::Format_ARGB32_Premultiplied); --#if !BREEZE_COMMON_USE_KDE4 -- canvas.setDevicePixelRatio(m_dpr); --#endif -- canvas.fill(Qt::transparent); -- -- QRect boxRect(QPoint(0, 0), m_boxSize); -- boxRect.moveCenter(QRect(QPoint(0, 0), canvasSize).center()); -- -- QPainter painter(&canvas); --#if BREEZE_COMMON_USE_KDE4 -- foreach (const Shadow &shadow, m_shadows) { --#else -- for (const Shadow &shadow : qAsConst(m_shadows)) { --#endif -- renderShadow(&painter, boxRect, m_borderRadius, shadow.offset, shadow.radius, shadow.color); -- } -- painter.end(); -- -- return canvas; --} -- --QSize BoxShadowRenderer::calculateMinimumBoxSize(int radius) --{ -- const QSize blurExtent = calculateBlurExtent(radius); -- return 2 * blurExtent + QSize(1, 1); --} -- --QSize BoxShadowRenderer::calculateMinimumShadowTextureSize(const QSize &boxSize, int radius, const QPoint &offset) --{ -- return boxSize + 2 * calculateBlurExtent(radius) + QSize(qAbs(offset.x()), qAbs(offset.y())); --} -- -- --BreezeShadowHelper::BreezeShadowHelper( QObject* parent): -- QObject( parent ) --{ -- // delay till event dispatcher is running as Wayland is highly async --// QMetaObject::invokeMethod(this, "initializeWayland", Qt::QueuedConnection); --} -- --//_______________________________________________________ --BreezeShadowHelper::~BreezeShadowHelper() --{ -- -- #if BREEZE_HAVE_X11 -- if( Helper::isX11() ) -- { foreach( const quint32& value, _pixmaps ) xcb_free_pixmap( Helper::connection(), value ); } -- #endif -- --} -- --//_______________________________________________________ --bool BreezeShadowHelper::eventFilter( QObject* object, QEvent* event ) --{ -- -- // check event type -- if( event->type() != QEvent::WinIdChange ) return false; -- -- // cast widget -- QWidget* widget( static_cast<QWidget*>( object ) ); -- -- // install shadows and update winId -- installShadows( widget ); -- -- return false; -- --} -- --//_______________________________________________________ --bool BreezeShadowHelper::installShadows(const QWidget* widget ) --{ -- -- qDebug() << "install shadows:" << (widget == nullptr); -- if( !widget ) return false; -- -- /* -- From bespin code. Supposedly prevent playing with some 'pseudo-widgets' -- that have winId matching some other -random- window -- */ --// if( !(widget->testAttribute(Qt::WA_WState_Created) && widget->internalWinId() )) --// { return false; } -- -- // create shadow tiles if needed -- -- -- const qreal frameRadius = 0; -- QColor color1(255,0,0); -- QColor color2(0,255,0); -- -- const qreal dpr =1; -- -- const QSize boxSize = BoxShadowRenderer::calculateMinimumBoxSize(20) -- .expandedTo(BoxShadowRenderer::calculateMinimumBoxSize(10)); --// color1.setAlphaF(0.22); --// color2.setAlphaF(0.12); -- -- BoxShadowRenderer shadowRenderer; -- shadowRenderer.setBorderRadius(frameRadius); -- shadowRenderer.setBoxSize(boxSize); -- shadowRenderer.setDevicePixelRatio(dpr); -- -- shadowRenderer.addShadow(QPoint(0, 0), 20, color1); -- shadowRenderer.addShadow(QPoint(0, -3), 10, color2); -- -- QImage shadowTexture = shadowRenderer.render(); -- -- const QRect outerRect(QPoint(0, 0), shadowTexture.size() / dpr); -- -- QRect boxRect(QPoint(0, 0), boxSize); -- boxRect.moveCenter(outerRect.center()); -- -- // Mask out inner rect. -- QPainter painter(&shadowTexture); -- painter.setRenderHint(QPainter::Antialiasing); -- -- const QMargins margins = QMargins( -- boxRect.left() - outerRect.left() - 2 - 0, -- boxRect.top() - outerRect.top() - 2 - 5, -- outerRect.right() - boxRect.right() - 2 + 0, -- outerRect.bottom() - boxRect.bottom() - 2 + 5); -- painter.setPen(Qt::NoPen); -- painter.setBrush(Qt::black); --// painter.setCompositionMode(QPainter::CompositionMode_DestinationOut); -- -- painter.drawRoundedRect( -- outerRect - margins, -- frameRadius, -- frameRadius); -- -- // We're done. -- painter.end(); -- -- const QPoint innerRectTopLeft = outerRect.center(); -- qDebug() << "innerRectTopLeft:" << innerRectTopLeft; -- _shadowTiles = TileSet( -- QPixmap::fromImage(shadowTexture), -- innerRectTopLeft.x(), -- innerRectTopLeft.y(), -- 1, 1); -- -- -- if( !_shadowTiles.isValid() ) return false; -- -- QVector<quint32> data( createPixmapHandles() ); -- if( data.size() != 8 ) return false; -- --// const QMargins margins(10,10,10,10); -- const quint32 topSize = margins.top(); -- const quint32 bottomSize = margins.bottom(); -- const quint32 leftSize( margins.left() ); -- const quint32 rightSize( margins.right() ); -- -- // assign to data and xcb property -- data << QVector<quint32>{topSize, rightSize, bottomSize, leftSize}; -- xcb_change_property( QX11Info::connection(), XCB_PROP_MODE_REPLACE, widget->winId(), _atom, XCB_ATOM_CARDINAL, 32, data.size(), data.constData() ); -- xcb_flush( QX11Info::connection() ); -- -- -- return false; --} -- --const QVector<quint32>& BreezeShadowHelper::createPixmapHandles() --{ -- -- /** -- shadow atom and property specification available at -- https://community.kde.org/KWin/Shadow -- */ -- --// // create atom --// #if BREEZE_HAVE_X11 --// if( !_atom && Helper::isX11() ) _atom = _helper.createAtom( QLatin1String( netWMShadowAtomName ) ); --// #endif -- -- QString name = "_KDE_NET_WM_SHADOW"; -- xcb_connection_t* connection( QX11Info::connection() ); -- xcb_intern_atom_cookie_t cookie( xcb_intern_atom( connection, false, name.size(), qPrintable( name ) ) ); -- ScopedPointer<xcb_intern_atom_reply_t> reply( xcb_intern_atom_reply( connection, cookie, nullptr) ); --//return reply ? reply->atom:0; -- -- _atom = reply ? reply->atom:0;//xcb_intern_atom_reply(QX11Info::connection(), xcb_intern_atom(QX11Info::connection(), 0, strlen("_NET_WM_SHADOW"), "_NET_WM_SHADOW"), NULL)->atom; -- -- // make sure size is valid -- if( _pixmaps.empty() ) -- { -- _pixmaps = QVector<quint32> { -- createPixmap( _shadowTiles.pixmap( 1 ) ), -- createPixmap( _shadowTiles.pixmap( 2 ) ), -- createPixmap( _shadowTiles.pixmap( 5 ) ), -- createPixmap( _shadowTiles.pixmap( 8 ) ), -- createPixmap( _shadowTiles.pixmap( 7 ) ), -- createPixmap( _shadowTiles.pixmap( 6 ) ), -- createPixmap( _shadowTiles.pixmap( 3 ) ), -- createPixmap( _shadowTiles.pixmap( 0 ) ) -- }; -- } -- -- // return relevant list of pixmap handles -- return _pixmaps; --} -- --quint32 BreezeShadowHelper::createPixmap( const QPixmap& source ) --{ -- -- // do nothing for invalid pixmaps -- if( source.isNull() ) return 0; --// if( !Helper::isX11() ) return 0; -- -- /* -- in some cases, pixmap handle is invalid. This is the case notably -- when Qt uses to RasterEngine. In this case, we create an X11 Pixmap -- explicitly and draw the source pixmap on it. -- */ -- --// #if BREEZE_HAVE_X11 -- -- const int width( source.width() ); -- const int height( source.height() ); -- -- // create X11 pixmap -- xcb_pixmap_t pixmap = xcb_generate_id( QX11Info::connection() ); -- xcb_create_pixmap( QX11Info::connection(), 32, pixmap, QX11Info::appRootWindow(), width, height ); -- -- xcb_gcontext_t _gc = xcb_generate_id( QX11Info::connection()); -- xcb_create_gc( QX11Info::connection(), _gc, pixmap, 0, nullptr ); -- -- -- // create image from QPixmap and assign to pixmap -- QImage image( source.toImage() ); -- -- -- #if QT_VERSION >= 0x051000 -- xcb_put_image( QX11Info::connection(), XCB_IMAGE_FORMAT_Z_PIXMAP, pixmap, _gc, image.width(), image.height(), 0, 0, 0, 32, image.sizeInBytes(), image.constBits()); -- #else -- xcb_put_image( QX11Info::connection(), XCB_IMAGE_FORMAT_Z_PIXMAP, pixmap, _gc, image.width(), image.height(), 0, 0, 0, 32, image.byteCount(), image.constBits()); -- #endif -- -- return pixmap; -- --// #else --// return 0; --// #endif -- --} -- -- --//___________________________________________________________ --inline bool bits(TileSet::Tiles flags, TileSet::Tiles testFlags) --{ return (flags & testFlags) == testFlags; } -- --//______________________________________________________________________________________ --inline qreal devicePixelRatio( const QPixmap& pixmap ) --{ -- #if QT_VERSION >= 0x050300 -- return pixmap.devicePixelRatio(); -- #else -- Q_UNUSED( pixmap ); -- return 1; -- #endif --} -- --//______________________________________________________________________________________ --inline void setDevicePixelRatio( QPixmap& pixmap, qreal value ) --{ -- #if QT_VERSION >= 0x050300 -- return pixmap.setDevicePixelRatio( value ); -- #else -- Q_UNUSED( pixmap ); -- Q_UNUSED( value ); -- #endif --} -- --//______________________________________________________________ --void TileSet::initPixmap( PixmapList& pixmaps, const QPixmap &source, int width, int height, const QRect &rect) --{ -- QSize size( width, height ); -- if( !( size.isValid() && rect.isValid() ) ) -- { -- pixmaps.append( QPixmap() ); -- -- } else if( size != rect.size() ) { -- -- const qreal dpiRatio( devicePixelRatio( source ) ); -- const QRect scaledRect( rect.topLeft()*dpiRatio, rect.size()*dpiRatio ); -- const QSize scaledSize( size*dpiRatio ); -- const QPixmap tile( source.copy(scaledRect) ); -- QPixmap pixmap( scaledSize ); -- -- pixmap.fill(Qt::transparent); -- QPainter painter(&pixmap); -- painter.drawTiledPixmap(0, 0, scaledSize.width(), scaledSize.height(), tile); -- setDevicePixelRatio( pixmap, dpiRatio ); -- pixmaps.append( pixmap ); -- -- } else { -- -- const qreal dpiRatio( devicePixelRatio( source ) ); -- const QRect scaledRect( rect.topLeft()*dpiRatio, rect.size()*dpiRatio ); -- QPixmap pixmap( source.copy( scaledRect ) ); -- setDevicePixelRatio( pixmap, dpiRatio ); -- pixmaps.append( pixmap ); -- -- } -- --} -- --//______________________________________________________________ --TileSet::TileSet(): -- _w1(0), -- _h1(0), -- _w3(0), -- _h3(0) --{ _pixmaps.reserve(9); } -- --//______________________________________________________________ --TileSet::TileSet(const QPixmap &source, int w1, int h1, int w2, int h2 ): -- _w1(w1), -- _h1(h1), -- _w3(0), -- _h3(0) --{ -- _pixmaps.reserve(9); -- if( source.isNull() ) return; -- -- _w3 = source.width()/devicePixelRatio( source ) - (w1 + w2); -- _h3 = source.height()/devicePixelRatio( source ) - (h1 + h2); -- int w = w2; -- int h = h2; -- -- // initialise pixmap array -- initPixmap( _pixmaps, source, _w1, _h1, QRect(0, 0, _w1, _h1) ); -- initPixmap( _pixmaps, source, w, _h1, QRect(_w1, 0, w2, _h1) ); -- initPixmap( _pixmaps, source, _w3, _h1, QRect(_w1+w2, 0, _w3, _h1) ); -- initPixmap( _pixmaps, source, _w1, h, QRect(0, _h1, _w1, h2) ); -- initPixmap( _pixmaps, source, w, h, QRect(_w1, _h1, w2, h2) ); -- initPixmap( _pixmaps, source, _w3, h, QRect(_w1+w2, _h1, _w3, h2) ); -- initPixmap( _pixmaps, source, _w1, _h3, QRect(0, _h1+h2, _w1, _h3) ); -- initPixmap( _pixmaps, source, w, _h3, QRect(_w1, _h1+h2, w2, _h3) ); -- initPixmap( _pixmaps, source, _w3, _h3, QRect(_w1+w2, _h1+h2, _w3, _h3) ); --} -- --//___________________________________________________________ --void TileSet::render(const QRect &constRect, QPainter *painter, Tiles tiles) const --{ -- -- const bool oldHint( painter->testRenderHint( QPainter::SmoothPixmapTransform ) ); -- painter->setRenderHint( QPainter::SmoothPixmapTransform, true ); -- -- // check initialization -- if( _pixmaps.size() < 9 ) return; -- -- // copy source rect -- QRect rect( constRect ); -- -- // get rect dimensions -- int x0, y0, w, h; -- rect.getRect(&x0, &y0, &w, &h); -- -- // calculate pixmaps widths -- int wLeft(0); -- int wRight(0); -- if( _w1+_w3 > 0 ) -- { -- qreal wRatio( qreal( _w1 )/qreal( _w1 + _w3 ) ); -- wLeft = (tiles&Right) ? qMin( _w1, int(w*wRatio) ):_w1; -- wRight = (tiles&Left) ? qMin( _w3, int(w*(1.0-wRatio)) ):_w3; -- } -- -- // calculate pixmap heights -- int hTop(0); -- int hBottom(0); -- if( _h1+_h3 > 0 ) -- { -- qreal hRatio( qreal( _h1 )/qreal( _h1 + _h3 ) ); -- hTop = (tiles&Bottom) ? qMin( _h1, int(h*hRatio) ):_h1; -- hBottom = (tiles&Top) ? qMin( _h3, int(h*(1.0-hRatio)) ):_h3; -- } -- -- // calculate corner locations -- w -= wLeft + wRight; -- h -= hTop + hBottom; -- const int x1 = x0 + wLeft; -- const int x2 = x1 + w; -- const int y1 = y0 + hTop; -- const int y2 = y1 + h; -- -- const int w2 = _pixmaps.at(7).width()/devicePixelRatio( _pixmaps.at(7) ); -- const int h2 = _pixmaps.at(5).height()/devicePixelRatio( _pixmaps.at(5) ); -- -- // corner -- if( bits( tiles, TileSet::Tile(Top|Left)) ) painter->drawPixmap(x0, y0, _pixmaps.at(0), 0, 0, wLeft*devicePixelRatio( _pixmaps.at(0) ), hTop*devicePixelRatio( _pixmaps.at(0) )); -- if( bits( tiles, TileSet::Tile(Top|Right)) ) painter->drawPixmap(x2, y0, _pixmaps.at(2), (_w3-wRight)*devicePixelRatio( _pixmaps.at(2) ), 0, wRight*devicePixelRatio( _pixmaps.at(2) ), hTop*devicePixelRatio( _pixmaps.at(2) ) ); -- if( bits( tiles, TileSet::Tile(Bottom|Left)) ) painter->drawPixmap(x0, y2, _pixmaps.at(6), 0, (_h3-hBottom)*devicePixelRatio( _pixmaps.at(6) ), wLeft*devicePixelRatio( _pixmaps.at(6) ), hBottom*devicePixelRatio( _pixmaps.at(6) )); -- if( bits( tiles, TileSet::Tile(Bottom|Right)) ) painter->drawPixmap(x2, y2, _pixmaps.at(8), (_w3-wRight)*devicePixelRatio( _pixmaps.at(8) ), (_h3-hBottom)*devicePixelRatio( _pixmaps.at(8) ), wRight*devicePixelRatio( _pixmaps.at(8) ), hBottom*devicePixelRatio( _pixmaps.at(8) ) ); -- -- // top and bottom -- if( w > 0 ) -- { -- if( tiles&Top ) painter->drawPixmap(x1, y0, w, hTop, _pixmaps.at(1), 0, 0, w2*devicePixelRatio( _pixmaps.at(1) ), hTop*devicePixelRatio( _pixmaps.at(1) ) ); -- if( tiles&Bottom ) painter->drawPixmap(x1, y2, w, hBottom, _pixmaps.at(7), 0, (_h3-hBottom)*devicePixelRatio( _pixmaps.at(7) ), w2*devicePixelRatio( _pixmaps.at(7) ), hBottom*devicePixelRatio( _pixmaps.at(7) ) ); -- } -- -- // left and right -- if( h > 0 ) -- { -- if( tiles&Left ) painter->drawPixmap(x0, y1, wLeft, h, _pixmaps.at(3), 0, 0, wLeft*devicePixelRatio( _pixmaps.at(3) ), h2*devicePixelRatio( _pixmaps.at(3) ) ); -- if( tiles&Right ) painter->drawPixmap(x2, y1, wRight, h, _pixmaps.at(5), (_w3-wRight)*devicePixelRatio( _pixmaps.at(5) ), 0, wRight*devicePixelRatio( _pixmaps.at(5) ), h2*devicePixelRatio( _pixmaps.at(5) ) ); -- } -- -- // center -- if( (tiles&Center) && h > 0 && w > 0 ) painter->drawPixmap(x1, y1, w, h, _pixmaps.at(4)); -- -- // restore -- painter->setRenderHint( QPainter::SmoothPixmapTransform, oldHint ); -- --} -- -diff --git a/ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.h b/ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.h -deleted file mode 100644 -index 38b35a4..0000000 ---- a/ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.h -+++ /dev/null -@@ -1,268 +0,0 @@ --/* -- * Copyright (C) 2018 Vlad Zagorodniy <vlad.zahorodnii@kde.org> -- * -- * This program is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program; if not, write to the Free Software -- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -- */ -- --#pragma once -- --// own --// Qt --#include <QEvent> --/* --#include <QMainWindow> -- --#include <QWidget> -- -- -- -- --#include <QMenu> --#include <QPushButton> --#include <QIcon> --#include <QListWidget> --#include <QTabWidget> --#include <QToolTip> --#include <QAction> --#include <QTreeView> --#include <QLabel> --#include <QPalette> --#include <QColor> --#include <QDebug> --#include <QPainter> --#include <QPixmap> --#include <QStyle> --#include <QLineEdit> -- --#include <QToolBar> --#include <QToolButton> --#include <QCheckBox> --#include <QLabel> --#include <QThread> --#include <QScrollBar> --#include <QVBoxLayout> -- --#include <QContextMenuEvent> --#include <QMenu> --*/ --//#include <KWindowEffects> --#include <xcb/xproto.h> --#include <qdebug.h> -- --#include <QVector4D> -- --//#include <QTimer> -- -- --#include <xcb/xcb.h> -- --//#include <QApplication> --#include <QWidget> --#include <QPainter> -- --#include <QColor> --#include <QImage> --#include <QPoint> --#include <QSize> --#include <QScopedPointer> --#include <QWeakPointer> -- --template <typename T> using ScopedPointer = QScopedPointer<T, QScopedPointerPodDeleter>; -- --class BoxShadowRenderer --{ --public: -- // Compiler generated constructors & destructor are fine. -- -- /** -- * Set the size of the box. -- * @param size The size of the box. -- **/ -- void setBoxSize(const QSize &size); -- -- /** -- * Set the radius of box' corners. -- * @param radius The border radius, in pixels. -- **/ -- void setBorderRadius(qreal radius); -- -- /** -- * Set the device pixel ratio of the resulting shadow texture. -- * @param dpr The device pixel ratio. -- **/ -- void setDevicePixelRatio(qreal dpr); -- -- /** -- * Add a shadow. -- * @param offset The offset of the shadow. -- * @param radius The blur radius. -- * @param color The color of the shadow. -- **/ -- void addShadow(const QPoint &offset, int radius, const QColor &color); -- -- /** -- * Render the shadow. -- **/ -- QImage render() const; -- -- /** -- * Calculate the minimum size of the box. -- * -- * This helper computes the minimum size of the box so the shadow behind it has -- * full its strength. -- * -- * @param radius The blur radius of the shadow. -- **/ -- static QSize calculateMinimumBoxSize(int radius); -- -- /** -- * Calculate the minimum size of the shadow texture. -- * -- * This helper computes the minimum size of the resulting texture so the shadow -- * is not clipped. -- * -- * @param boxSize The size of the box. -- * @param radius The blur radius. -- * @param offset The offset of the shadow. -- **/ -- static QSize calculateMinimumShadowTextureSize(const QSize &boxSize, int radius, const QPoint &offset); -- --private: -- QSize m_boxSize; -- qreal m_borderRadius = 0.0; -- qreal m_dpr = 1.0; -- -- struct Shadow { -- QPoint offset; -- int radius; -- QColor color; -- }; -- -- QVector<Shadow> m_shadows; --}; -- --class TileSet --{ -- public: -- /** -- Create a TileSet from a pixmap. The size of the bottom/right chunks is -- whatever is left over from the other chunks, whose size is specified -- in the required parameters. -- -- @param w1 width of the left chunks -- @param h1 height of the top chunks -- @param w2 width of the not-left-or-right chunks -- @param h2 height of the not-top-or-bottom chunks -- */ -- TileSet(const QPixmap&, int w1, int h1, int w2, int h2 ); -- -- //* empty constructor -- TileSet(); -- -- //* destructor -- virtual ~TileSet() -- {} -- -- /** -- Flags specifying what sides to draw in ::render. Corners are drawn when -- the sides forming that corner are drawn, e.g. Top|Left draws the -- top-center, center-left, and top-left chunks. The center-center chunk is -- only drawn when Center is requested. -- */ -- enum Tile { -- Top = 0x1, -- Left = 0x2, -- Bottom = 0x4, -- Right = 0x8, -- Center = 0x10, -- TopLeft = Top|Left, -- TopRight = Top|Right, -- BottomLeft = Bottom|Left, -- BottomRight = Bottom|Right, -- Ring = Top|Left|Bottom|Right, -- Horizontal = Left|Right|Center, -- Vertical = Top|Bottom|Center, -- Full = Ring|Center -- }; -- Q_DECLARE_FLAGS(Tiles, Tile) -- -- /** -- Fills the specified rect with tiled chunks. Corners are never tiled, -- edges are tiled in one direction, and the center chunk is tiled in both -- directions. Partial tiles are used as needed so that the entire rect is -- perfectly filled. Filling is performed as if all chunks are being drawn. -- */ -- void render(const QRect&, QPainter*, Tiles = Ring) const; -- -- //* return size associated to this tileset -- QSize size() const -- { return QSize( _w1 + _w3, _h1 + _h3 ); } -- -- //* is valid -- bool isValid() const -- { return _pixmaps.size() == 9; } -- -- //* returns pixmap for given index -- QPixmap pixmap( int index ) const -- { return _pixmaps[index]; } -- -- protected: -- -- //* shortcut to pixmap list -- using PixmapList = QVector<QPixmap>; -- -- //* initialize pixmap -- void initPixmap( PixmapList&, const QPixmap&, int w, int h, const QRect& ); -- -- private: -- -- //* pixmap arry -- PixmapList _pixmaps; -- -- // dimensions -- int _w1; -- int _h1; -- int _w3; -- int _h3; -- --}; -- -- --class BreezeShadowHelper: public QObject --{ -- Q_OBJECT -- -- public: -- //* constructor -- BreezeShadowHelper( QObject*/*, Helper& */); -- -- //* destructor -- ~BreezeShadowHelper() override; -- -- //* event filter -- bool eventFilter( QObject*, QEvent* ) override; -- -- const QVector<quint32>& createPixmapHandles(); -- quint32 createPixmap( const QPixmap& source ); -- -- bool installShadows( const QWidget * ); -- --private: -- QVector<quint32> _pixmaps; -- TileSet _shadowTiles; -- xcb_atom_t _atom = 0; -- -- --}; -diff --git a/ukui-styles/qt5-style-ukui/qt5-style-ukui.json b/ukui-styles/qt5-style-ukui/qt5-style-ukui.json -deleted file mode 100644 -index a727cde..0000000 ---- a/ukui-styles/qt5-style-ukui/qt5-style-ukui.json -+++ /dev/null -@@ -1,3 +0,0 @@ --{ -- "Keys" : [ "ukui-light", "ukui-default", "ukui-dark" ] --} -diff --git a/ukui-styles/qt5-style-ukui/qt5-style-ukui.pri b/ukui-styles/qt5-style-ukui/qt5-style-ukui.pri -deleted file mode 100644 -index 9e58b00..0000000 ---- a/ukui-styles/qt5-style-ukui/qt5-style-ukui.pri -+++ /dev/null -@@ -1,26 +0,0 @@ --INCLUDEPATH += $$PWD -- --include(animations/animations.pri) --include(widget-parameters/widget-parameters.pri) -- -- --HEADERS += \ -- $$PWD/ukui-style-parameters.h \ -- $$PWD/qt5-ukui-style.h \ -- $$PWD/shadow-helper.h \ -- $$PWD/qt5-ukui-style-helper.h \ -- $$PWD/breezeboxshadowrenderer.h --# $$PWD/readconfig.h \ --# $$PWD/themeinformation.h -- -- --SOURCES += \ -- $$PWD/ukui-style-parameters.cpp \ -- $$PWD/qt5-ukui-style.cpp \ -- $$PWD/shadow-helper.cpp \ -- $$PWD/view-helper.cpp \ -- $$PWD/qt5-ukui-style-helper.cpp \ -- $$PWD/breezeboxshadowrenderer.cpp --# $$PWD/readconfig.cpp --DISTFILES += \ -- $$PWD/themeconfig/style-ukui-classical.json -diff --git a/ukui-styles/qt5-style-ukui/qt5-style-ukui.pro b/ukui-styles/qt5-style-ukui/qt5-style-ukui.pro -deleted file mode 100644 -index 751d678..0000000 ---- a/ukui-styles/qt5-style-ukui/qt5-style-ukui.pro -+++ /dev/null -@@ -1,63 +0,0 @@ --#------------------------------------------------- --# --# Project created by QtCreator 2020-01-03T19:31:51 --# --#------------------------------------------------- -- --QT += widgets widgets-private KWindowSystem gui gui-private x11extras dbus KWaylandClient -- --TARGET = qt5-style-ukui --TEMPLATE = lib --CONFIG += plugin c++11 link_pkgconfig --PKGCONFIG += gsettings-qt -- --include(../../libqt5-ukui-style/libqt5-ukui-style.pri) --include(animations/animations.pri) --include(widget-parameters/widget-parameters.pri) -- --# The following define makes your compiler emit warnings if you use --# any feature of Qt which has been marked as deprecated (the exact warnings --# depend on your compiler). Please consult the documentation of the --# deprecated API in order to know how to port your code away from it. --DEFINES += QT_DEPRECATED_WARNINGS --#DEFINES += QT_NO_DEBUG_OUTPUT --DEFINES += QT_MESSAGELOGCONTEXT -- --# You can also make your code fail to compile if you use deprecated APIs. --# In order to do so, uncomment the following line. --# You can also select to disable deprecated APIs only up to a certain version of Qt. --#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -- --SOURCES += \ -- ukui-style-parameters.cpp \ -- #qt5-ukui-style-plugin.cpp \ -- qt5-ukui-style.cpp \ -- shadow-helper.cpp \ -- qt5-ukui-style-helper.cpp \ -- view-helper.cpp \ -- ../common/blur-helper.cpp \ -- ../common/gesture-helper.cpp \ -- ../common/window-manager.cpp \ -- ../qt5-config-style-ukui/readconfig.cpp \ -- ../common/ukui-style-plugin.cpp -- --HEADERS += \ -- ukui-style-parameters.h \ -- #qt5-ukui-style-plugin.h \ -- qt5-ukui-style.h \ -- shadow-helper.h \ -- qt5-ukui-style-helper.h \ -- ../common/blur-helper.h \ -- ../common/gesture-helper.h \ -- ../common/window-manager.h \ -- ../qt5-config-style-ukui/readconfig.h \ -- ../qt5-config-style-ukui/themeinformation.h \ -- ../common/ukui-style-plugin.h -- --DISTFILES += ../common/qt5-style-ukui.json \ -- themeconfig/UKUIClassical.json -- --unix { -- target.path = $$[QT_INSTALL_PLUGINS]/styles -- INSTALLS += target --} -diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.cpp b/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.cpp -deleted file mode 100644 -index e25ec49..0000000 ---- a/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.cpp -+++ /dev/null -@@ -1,203 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "qt5-ukui-style-helper.h" -- --#include <QPainter> --#include <QStyleOption> --#include <QWidget> --#include <QPainterPath> -- -- -- --static inline qreal mixQreal(qreal a, qreal b, qreal bias) --{ -- return a + (b - a) * bias; --} -- -- -- --const QRegion getRoundedRectRegion(const QRect &rect, qreal radius_x, qreal radius_y) --{ -- QPainterPath path; -- path.addRoundedRect(rect, radius_x, radius_y); -- return path.toFillPolygon().toPolygon(); --} -- -- -- --qreal calcRadial(const QStyleOptionSlider *dial, int position) --{ -- int currentSliderPosition = position; -- if (!dial->upsideDown) { -- if (position == dial->minimum) -- currentSliderPosition = dial->maximum; -- else if (position == dial->maximum) -- currentSliderPosition = dial->minimum; -- else -- currentSliderPosition = dial->maximum - position; -- } -- qreal a = 0; -- if (dial->maximum == dial->minimum) -- a = M_PI / 2; -- else if (dial->dialWrapping) -- a = M_PI * 3 / 2 - (currentSliderPosition - dial->minimum) * 2 * M_PI / (dial->maximum - dial->minimum); -- else -- a = (M_PI * 8 - (currentSliderPosition - dial->minimum) * 10 * M_PI / (dial->maximum - dial->minimum)) / 6; -- return a; --} -- -- -- --QPolygonF calcLines(const QStyleOptionSlider *dial, int offset) --{ -- QPolygonF poly(0); -- int width = dial->rect.width(); -- int height = dial->rect.height(); -- qreal r = qMin(width, height) / 2; -- -- qreal xc = width / 2; -- qreal yc = height / 2; -- const int ns = dial->tickInterval; -- if (!ns) // Invalid values may be set by Qt Designer. -- return poly; -- int notches = (dial->maximum + ns - 1 - dial->minimum) / ns; -- if (notches <= 0) -- return poly; -- if (dial->maximum < dial->minimum || dial->maximum - dial->minimum > 1000) { -- int maximum = dial->minimum + 1000; -- notches = (maximum + ns - 1 - dial->minimum) / ns; -- } -- -- poly.resize(2 + 2 * notches); -- int smallLineSize = offset / 2; -- for (int i = 0; i <= notches; ++i) { -- qreal angle = dial->dialWrapping ? M_PI * 3 / 2 - i * 2 * M_PI / notches -- : (M_PI * 8 - i * 10 * M_PI / notches) / 6; -- qreal s = qSin(angle); -- qreal c = qCos(angle); -- poly[2 * i] = QPointF(xc + (r + 0.5 - smallLineSize) * c, -- yc - (r + 0.5 - smallLineSize) * s); -- poly[2 * i + 1] = QPointF(xc + r * c, yc - r * s); -- } -- return poly; --} -- -- -- --void tabLayout(const QStyleOptionTab *tab, const QWidget *widget, const QStyle *style, QRect *textRect, QRect *iconRect) --{ -- Q_ASSERT(textRect); -- Q_ASSERT(iconRect); -- -- QRect rect = tab->rect; -- bool verticalTabs = tab->shape == QTabBar::RoundedEast || tab->shape == QTabBar::RoundedWest -- || tab->shape == QTabBar::TriangularEast || tab->shape == QTabBar::TriangularWest; -- -- int iconExtent = style->pixelMetric(QStyle::PM_SmallIconSize); -- if (verticalTabs) -- rect.setRect(0, 0, rect.height(), rect.width()); -- -- int hpadding = style->pixelMetric(QStyle::PM_TabBarTabHSpace, tab, widget) / 2; -- int vpadding = style->pixelMetric(QStyle::PM_TabBarTabVSpace, tab, widget) / 2; -- -- rect.adjust(hpadding, vpadding, -hpadding, -vpadding); -- // left widget -- if (!tab->leftButtonSize.isEmpty()) { -- rect.setLeft(rect.left() + 8 + (verticalTabs ? tab->leftButtonSize.height() : tab->leftButtonSize.width())); -- } -- // right widget -- if (!tab->rightButtonSize.isEmpty()) { -- rect.setRight(rect.right() - 8 - (verticalTabs ? tab->rightButtonSize.height() : tab->rightButtonSize.width())); -- } -- // icon -- if (!tab->icon.isNull()) { -- QSize iconSize = tab->iconSize; -- if (!iconSize.isValid()) { -- iconSize = QSize(iconExtent, iconExtent); -- } -- QSize tabIconSize = tab->icon.actualSize(iconSize, -- (tab->state & QStyle::State_Enabled) ? QIcon::Normal : QIcon::Disabled, -- (tab->state & QStyle::State_Selected) ? QIcon::On : QIcon::Off); -- // High-dpi icons do not need adjustment; make sure tabIconSize is not larger than iconSize -- tabIconSize = QSize(qMin(tabIconSize.width(), iconSize.width()), qMin(tabIconSize.height(), iconSize.height())); -- -- *iconRect = QRect(rect.left(), rect.center().y() - tabIconSize.height() / 2, -- tabIconSize.width(), tabIconSize.height()); -- if (!verticalTabs) -- *iconRect = style->visualRect(tab->direction, tab->rect, *iconRect); -- rect.setLeft(rect.left() + tabIconSize.width() + 8); -- } -- if (!verticalTabs) -- rect = style->visualRect(tab->direction, tab->rect, rect); -- *textRect = rect; --} -- -- -- --QColor mixColor(const QColor &c1, const QColor &c2, qreal bias) --{ -- if (bias <= 0.0) { -- return c1; -- } -- if (bias >= 1.0) { -- return c2; -- } -- if (qIsNaN(bias)) { -- return c1; -- } -- -- qreal r = mixQreal(c1.redF(), c2.redF(), bias); -- qreal g = mixQreal(c1.greenF(), c2.greenF(), bias); -- qreal b = mixQreal(c1.blueF(), c2.blueF(), bias); -- qreal a = mixQreal(c1.alphaF(), c2.alphaF(), bias); -- -- return QColor::fromRgbF(r, g, b, a); --} -- -- -- --void drawArrow(const QStyle *style, const QStyleOptionToolButton *toolbutton, -- const QRect &rect, QPainter *painter, const QWidget *widget) --{ -- QStyle::PrimitiveElement pe; -- switch (toolbutton->arrowType) { -- case Qt::LeftArrow: -- pe = QStyle::PE_IndicatorArrowLeft; -- break; -- case Qt::RightArrow: -- pe = QStyle::PE_IndicatorArrowRight; -- break; -- case Qt::UpArrow: -- pe = QStyle::PE_IndicatorArrowUp; -- break; -- -- case Qt::DownArrow: -- pe = QStyle::PE_IndicatorArrowDown; -- break; -- default: -- return; -- } -- QStyleOption arrowOpt = *toolbutton; -- arrowOpt.rect = rect; -- style->drawPrimitive(pe, &arrowOpt, painter, widget); --} -diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.h b/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.h -deleted file mode 100644 -index c8332b3..0000000 ---- a/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.h -+++ /dev/null -@@ -1,36 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef QT5UKUISTYLEHELPER_H --#define QT5UKUISTYLEHELPER_H -- --#include "qt5-ukui-style.h" --#include <QStyleOption> --#include <qmath.h> -- --const QRegion getRoundedRectRegion(const QRect &rect, qreal radius_x, qreal radius_y); --qreal calcRadial(const QStyleOptionSlider *dial, int postion); --QPolygonF calcLines(const QStyleOptionSlider *dial, int offset); --void tabLayout(const QStyleOptionTab *tab, const QWidget *widget, const QStyle *style, QRect *textRect, QRect *iconRect); --QColor mixColor(const QColor &c1, const QColor &c2, qreal bias = 0.5); --void drawArrow(const QStyle *style, const QStyleOptionToolButton *toolbutton, const QRect &rect, QPainter *painter, const QWidget *widget = 0); --#endif // QT5UKUISTYLEHELPER_H -diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.cpp b/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.cpp -deleted file mode 100644 -index ebc8f17..0000000 ---- a/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.cpp -+++ /dev/null -@@ -1,87 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "qt5-ukui-style-plugin.h" --#include "qt5-ukui-style.h" -- --#include "black-list.h" --#include "ukui-style-settings.h" --#include "highlight-effect.h" -- --#include <QApplication> --#include <QTimer> -- --#include <QDebug> -- --Qt5UKUIStylePlugin::Qt5UKUIStylePlugin(QObject *parent) : -- QStylePlugin(parent) --{ --// if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { --// auto settings = UKUIStyleSettings::globalInstance(); --// QString inconTheme = settings->get("iconThemeName").toString(); --// if (inconTheme == "ukui-icon-theme-classical" || inconTheme == "ukui-classical") { --// HighLightEffect::setSymoblicColor(QColor(128, 128, 128, 255)); --// } -- --// connect(settings, &QGSettings::changed, this, [=](const QString &key){ --// if (key == "iconThemeName") { --// QString inconTheme = settings->get("iconThemeName").toString(); --// if (inconTheme == "ukui-icon-theme-classical" || inconTheme == "ukui-classical") { --// HighLightEffect::setSymoblicColor(QColor(128, 128, 128, 255)); --// } else { --// HighLightEffect::setSymoblicColor(QColor(31, 32, 34, 192)); --// } --// } --// }); --// } --} -- --QStyle *Qt5UKUIStylePlugin::create(const QString &key) --{ -- if (blackList().contains(qAppName())) -- return new Style; -- //FIXME: -- bool dark = false; -- bool useDefault = false; -- QString type = "default"; -- -- if (key == "ukui-light") { -- dark = false; -- useDefault = false; -- } else if (key == "ukui-dark") { -- dark = true; -- useDefault = false; -- } else { -- useDefault = true; -- } -- -- return new Qt5UKUIStyle(dark, useDefault); --} -- --const QStringList Qt5UKUIStylePlugin::blackList() --{ -- return blackAppList(); --} -- --#if QT_VERSION < 0x050000 --Q_EXPORT_PLUGIN2(qt5-style-ukui, Qt5UKUIStylePlugin) --#endif // QT_VERSION < 0x050000 -diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.h b/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.h -deleted file mode 100644 -index 9f8e860..0000000 ---- a/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.h -+++ /dev/null -@@ -1,52 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef QT5UKUISTYLEPLUGIN_H --#define QT5UKUISTYLEPLUGIN_H -- --#include <QStylePlugin> -- --#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) --#include<private/qfusionstyle_p.h> --#define Style QFusionStyle --#else --#define Style QProxyStyle --#endif -- --class Qt5UKUIStylePlugin : public QStylePlugin --{ -- Q_OBJECT --#if QT_VERSION >= 0x050000 -- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QStyleFactoryInterface" FILE "qt5-style-ukui.json") --#endif // QT_VERSION >= 0x050000 -- --public: -- Qt5UKUIStylePlugin(QObject *parent = 0); -- -- QStyle *create(const QString &key) override; -- -- const QStringList blackList(); -- --private: --}; -- --#endif // QT5UKUISTYLEPLUGIN_H -diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp b/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp -deleted file mode 100644 -index 9cd3e3b..0000000 ---- a/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp -+++ /dev/null -@@ -1,7529 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "qt5-ukui-style.h" -- --#include "qt5-ukui-style-helper.h" -- --#include "ukui-style-settings.h" --#include "ukui-tabwidget-default-slide-animator.h" -- --#include <QStyleOption> --#include <QWidget> --#include <QPainter> --#include <QPainterPath> -- --#include <QPaintDevice> -- --#include "animations/tab-widget-animation-helper.h" --#include "animations/scrollbar-animation-helper.h" --#include "animations/button-animation-helper.h" --#include "animations/button-animator.h" --#include "animations/box-animation-helper.h" --#include "animations/animator-iface.h" --#include "animations/animation-helper.h" --#include "animations/progressbar-animation-helper.h" --#include "animations/progressbar-animation.h" --#include "animations/radiobutton-animation-helper.h" --#include "animations/checkbox-animation-helper.h" --#include "animations/slider-animation-helper.h" --#include "animations/tree-animation-helper.h" --#include "shadow-helper.h" -- -- --#include "highlight-effect.h" -- --#include "ukui-style-parameters.h" --#include "black-list.h" -- --#include "blur-helper.h" --#include "gesture-helper.h" --#include "window-manager.h" --#include "application-style-settings.h" -- --#include <QIcon> --#include <QStyleOptionViewItem> --#include <QAbstractItemView> --#include <QScrollBar> --#include <QTreeView> --#include <QListView> --#include <QMenu> --#include <QToolButton> --#include <QtPlatformHeaders/QXcbWindowFunctions> --#include <QComboBox> --#include <QPushButton> --#include <QSpinBox> --#include <QDoubleSpinBox> --#include <QTableView> --#include <QTableWidget> --#include <QTreeView> --#include <QTreeWidget> --#include <QListWidget> --#include <QHeaderView> --#include <QEvent> --#include <QDebug> --#include <QPixmapCache> --#include <QStyleOptionButton> --#include <QStyleOptionMenuItem> --#include <QLabel> --#include <QMessageBox> --#include <QLineEdit> --#include <QApplication> --#include <QToolTip> --#include <QRadioButton> --#include <QCheckBox> --#include <KWindowEffects> --#include <KWindowSystem> --#include <QDialogButtonBox> --#include <QLibrary> --#include <QProxyStyle> --#include <QStyleHints> -- --#include <private/qlineedit_p.h> -- --#include <QDBusInterface> --#include <QDBusMessage> --#include <QDBusConnection> --#include <QDBusReply> --#include <qdrawutil.h> -- --#define DBUS_STATUS_MANAGER_IF "com.kylin.statusmanager.interface" -- --#define COMMERCIAL_VERSION true --extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); -- --//static QWindow *qt_getWindow(const QWidget *widget) --//{ --// return widget ? widget->window()->windowHandle() : 0; --//} -- --#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) --Qt5UKUIStyle::Qt5UKUIStyle(QString name) : QFusionStyle() --#else --Qt5UKUIStyle::Qt5UKUIStyle(bool dark, bool useDefault, QString type) : QProxyStyle("fusion") --#endif --{ -- auto settings = UKUIStyleSettings::globalInstance(); -- if (settings) { -- m_blink_cursor = settings->get("cursorBlink").toBool(); -- m_blink_cursor_time = settings->get("cursorBlinkTime").toInt(); -- qApp->styleHints()->setCursorFlashTime(m_blink_cursor_time); -- -- connect(settings, &QGSettings::changed, this, [=](const QString &key) { -- if (key == "cursorBlink") { -- m_blink_cursor = settings->get("cursorBlink").toBool(); -- if (qApp->activeWindow()) { -- qApp->activeWindow()->update(); -- } -- if (qApp->activeModalWidget()) { -- qApp->activeModalWidget()->update(); -- } -- if (qApp->activePopupWidget()) { -- qApp->activePopupWidget()->update(); -- } -- } -- if (key == "cursorBlinkTime") { -- m_blink_cursor_time = settings->get("cursorBlinkTime").toInt(); -- qApp->styleHints()->setCursorFlashTime(m_blink_cursor_time); -- } -- }); -- } else { -- qWarning("org.ukui.style is null!"); -- } -- -- m_blur_helper = new BlurHelper(this); -- --// m_gesture_helper = new GestureHelper(this); -- -- m_window_manager = new WindowManager(this); -- -- m_app_style_settings = ApplicationStyleSettings::getInstance(); -- if (m_app_style_settings) { -- connect(m_app_style_settings, &ApplicationStyleSettings::colorStretageChanged, [=](const ApplicationStyleSettings::ColorStretagy &stretagy) { -- ////todo implemet palette switch. -- switch (stretagy) { -- case ApplicationStyleSettings::System: { -- break; -- } -- case ApplicationStyleSettings::Bright: { -- break; -- } -- case ApplicationStyleSettings::Dark: { -- break; -- } -- default: -- break; -- } -- }); -- } else { -- qWarning("org.ukui.style is null!"); -- } -- -- if (QGSettings::isSchemaInstalled("org.ukui.peripherals-mouse")) { -- QGSettings *settings = new QGSettings("org.ukui.peripherals-mouse"); -- if (settings->keys().contains("doubleClick")) { -- int mouse_double_click_time = settings->get("doubleClick").toInt(); -- if (mouse_double_click_time != qApp->doubleClickInterval()) { -- qApp->setDoubleClickInterval(mouse_double_click_time); -- } -- connect(settings, &QGSettings::changed, qApp, [=] (const QString &key) { -- if (key == "doubleClick") { -- int mouse_double_click_time = settings->get("doubleClick").toInt(); -- if (mouse_double_click_time != qApp->doubleClickInterval()) { -- qApp->setDoubleClickInterval(mouse_double_click_time); -- } -- } -- }); -- } else { -- qWarning("org.ukui.peripherals-mouse no doubleClick keys!"); -- } --// settings->deleteLater(); --// settings = nullptr; -- } else { -- qWarning("org.ukui.peripherals-mouse is null!"); -- } -- -- if (auto settings = UKUIStyleSettings::globalInstance()) { -- m_widget_theme = settings->get("widgetThemeName").toString(); -- m_style_name = settings->get("styleName").toString(); -- } -- -- if (m_style_name == "ukui") { -- m_style_name = "ukui-default"; -- } else if (m_style_name == "ukui-black") { -- m_style_name = "ukui-dark"; -- } else if (m_style_name == "ukui-white") { -- m_style_name = "ukui-light"; -- } -- -- if (qApp->property("customStyleName").isValid()) { -- if (qApp->property("customStyleName").toString() == "ukui-light") { -- m_style_name = "ukui-light"; -- } else if (qApp->property("customStyleName").toString() == "ukui-dark") { -- m_style_name = "ukui-dark"; -- } -- } -- -- if (m_style_name == "ukui-default") { -- m_default_palette = true; -- } else if (m_style_name == "ukui-dark") { -- m_drak_palette = true; -- } -- -- m_tab_animation_helper = new TabWidgetAnimationHelper(this); -- m_scrollbar_animation_helper = new ScrollBarAnimationHelper(this); -- m_button_animation_helper = new ButtonAnimationHelper(this); -- m_combobox_animation_helper = new BoxAnimationHelper(this); -- m_animation_helper = new ProgressBarAnimationHelper(this); -- m_shadow_helper = new ShadowHelper(this); -- m_radiobutton_animation_helper = new RadioButtonAnimationHelper(this); -- m_checkbox_animation_helper = new CheckBoxAnimationHelper(this); -- m_slider_animation_helper = new SliderAnimationHelper(this); -- m_tree_animation_helper = new TreeAnimationHelper(this); -- -- //dbus -- m_statusManagerDBus = new QDBusInterface(DBUS_STATUS_MANAGER_IF, "/" ,DBUS_STATUS_MANAGER_IF,QDBusConnection::sessionBus(),this); -- if (m_statusManagerDBus) { -- QDBusReply<bool> message_a = m_statusManagerDBus->call("get_current_tabletmode"); -- if (m_statusManagerDBus->isValid()) { -- //平板模式切换 -- connect(m_statusManagerDBus, SIGNAL(mode_change_signal(bool)), this, SLOT(updateTabletModeValue(bool))); -- } -- -- if (message_a.isValid()) { -- m_is_tablet_mode = message_a.value(); -- } -- else{ -- m_statusManagerDBus->deleteLater(); -- m_statusManagerDBus = nullptr; -- } -- } -- -- sp = new KClassicalStyleParameters(this, isUseDarkPalette()); -- -- qDebug() << "classical setproperty........" << sp->radiusProperty().maxRadius << sp->radiusProperty().normalRadius << sp->radiusProperty().minRadius; -- setProperty("maxRadius", sp->radiusProperty().maxRadius); -- setProperty("normalRadius", sp->radiusProperty().normalRadius); -- setProperty("minRadius", sp->radiusProperty().minRadius); --} -- --Qt5UKUIStyle::~Qt5UKUIStyle() --{ -- if(m_blur_helper){ -- m_blur_helper->deleteLater(); -- m_blur_helper = nullptr; -- } -- if(m_window_manager){ -- m_window_manager->deleteLater(); -- m_window_manager = nullptr; -- } -- -- if(m_tab_animation_helper){ -- m_tab_animation_helper->deleteLater(); -- m_tab_animation_helper = nullptr; -- } -- if(m_scrollbar_animation_helper){ -- m_scrollbar_animation_helper->deleteLater(); -- m_scrollbar_animation_helper = nullptr; -- } -- if(m_button_animation_helper){ -- m_button_animation_helper->deleteLater(); -- m_button_animation_helper = nullptr; -- } -- if(m_combobox_animation_helper){ -- m_combobox_animation_helper->deleteLater(); -- m_combobox_animation_helper = nullptr; -- } -- if(m_animation_helper){ -- m_animation_helper->deleteLater(); -- m_animation_helper = nullptr; -- } -- if(m_shadow_helper){ -- m_shadow_helper->deleteLater(); -- m_shadow_helper = nullptr; -- } -- if(m_statusManagerDBus){ -- m_statusManagerDBus->deleteLater(); -- m_statusManagerDBus = nullptr; -- } -- if(sp){ -- sp->deleteLater(); -- sp = nullptr; -- } --} -- --bool Qt5UKUIStyle::shouldBeTransparent(const QWidget *w) const --{ -- bool should = false; -- -- if (w && w->inherits("QComboBoxPrivateContainer")) -- return true; -- -- if (w && w->inherits("QTipLabel")) { -- return true; -- } -- -- return should; --} -- -- --bool Qt5UKUIStyle::eventFilter(QObject *obj, QEvent *e) --{ -- /*! -- \bug -- There is a bug when use fusion as base style when in qt5 assistant's -- HelperView. ScrollBar will not draw with our overrided function correctly, -- and then it will trigger QEvent::StyleAnimationUpdate. by some how it will let -- HelperView be hidden. -- I eat this event to aviod this bug, but the scrollbar in HelperView still -- display with old fusion style, and the animation will be ineffective. -- -- I don't know why HelperView didn't use our function drawing scrollbar but fusion, that -- makes me stranged. -- */ -- if (e->type() == QEvent::StyleAnimationUpdate) { -- return true; -- } -- --// //button animation cancel temporary --// if (qobject_cast<QPushButton *>(obj) || qobject_cast<QToolButton *>(obj)) { --// if (e->type() == QEvent::Hide) { --// if (QWidget *w = qobject_cast<QWidget *>(obj)) { --// auto animator = m_button_animation_helper->animator(w); --// if (animator) { --// animator->stopAnimator("SunKen"); --// animator->stopAnimator("MouseOver"); --// animator->setAnimatorCurrentTime("SunKen", 0); --// animator->setAnimatorCurrentTime("MouseOver", 0); --// } --// } --// } --// return false; --// } -- if (obj != nullptr && obj->inherits("QTipLabel")) -- { -- auto label = qobject_cast<QLabel *>(obj); -- if(label != nullptr && !(label->alignment() & Qt::AlignVCenter)){ -- label->setAlignment(Qt::AlignVCenter); -- } -- } -- -- if (qobject_cast<QSlider *>(obj)) { --// if (e->type() == QEvent::Wheel) { --// if (QWidget *w = qobject_cast<QWidget *>(obj)) { --// if (!w->hasFocus()) { --// return true; --// } --// } --// } -- auto mousePressEvent = static_cast<QMouseEvent*>(e); -- if((e->type() ==QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) && (proxy()->styleHint(QStyle::SH_Slider_AbsoluteSetButtons) == mousePressEvent->button() || -- proxy()->styleHint(QStyle::SH_Slider_PageSetButtons) == mousePressEvent->button())){ -- //qDebug() << "e->type:" << e->type() << mousePressEvent->button(); -- if(obj->property("animation").isValid() && !obj->property("animation").toBool()) -- return false; -- -- auto *slider = qobject_cast<QSlider *>(obj); -- if(slider == nullptr || !slider->isEnabled()) -- return false; -- -- auto animator = m_slider_animation_helper->animator(slider); -- if(!animator) -- return false; -- -- const bool horizontal = slider->orientation() == Qt::Horizontal; -- --// qDebug() << "MouseButtonPress............"; --// auto mousePressEvent = static_cast<QMouseEvent*>(e); --// if(mousePressEvent) --// qDebug() << "mousepressevent....." << mousePressEvent->pos() << mousePressEvent->localPos() << slider->geometry(); -- -- QStyleOptionSlider *opt = new QStyleOptionSlider(); -- opt->init(slider); --// qDebug() << "pppppppp;;;;;;;;;:" << subControlRect(CC_Slider, opt, SC_SliderHandle, slider); -- -- QRect handleRect = sliderHandleRec(); -- if(horizontal){ -- if(mousePressEvent->pos().x() <= handleRect.x()){ -- animator->setExtraProperty("addValue", false); -- -- } -- else if(mousePressEvent->pos().x() >= handleRect.x() + handleRect.width()){ -- animator->setExtraProperty("addValue", true); -- } -- else -- return false; -- } -- else{ -- if(mousePressEvent->pos().y() <= handleRect.y()){ -- animator->setExtraProperty("addValue", true); -- -- } -- else if(mousePressEvent->pos().y() >= handleRect.y() + handleRect.height()){ -- animator->setExtraProperty("addValue", false); -- } -- else -- return false; -- } -- -- if(!animator->isRunning("move_position")){ -- int startPosition = slider->value();//scrollbar->sliderPosition();//sliderPositionFromValue(bar->minimum, bar->maximum, scrollBar->value(), maxlen - sliderlen, bar->upsideDown); -- if(startPosition <= slider->maximum() && startPosition >= slider->minimum()){ -- if(animator->value("move_position") != 1.0){ -- if(animator->getExtraProperty("addValue").isValid()){ --// qDebug() << "pagestep..." << slider->pageStep() << animator->getExtraProperty("addValue").toBool(); -- int step = (animator->getExtraProperty("addValue").toBool() ? 1 : -1) * slider->pageStep(); --// qDebug() << "step............" << step; -- bool absoluteButton = proxy()->styleHint(QStyle::SH_Slider_AbsoluteSetButtons) == mousePressEvent->button(); -- if(absoluteButton) -- { -- QStyleOptionSlider *opt = new QStyleOptionSlider(); -- opt->init(slider); -- -- QRect gr = proxy()->subControlRect(QStyle::CC_Slider, opt, QStyle::SC_SliderGroove, slider); -- QRect sr = proxy()->subControlRect(QStyle::CC_Slider, opt, QStyle::SC_SliderHandle, slider); -- int sliderMin, sliderMax, sliderLength; -- QPoint center = sr.center() - sr.topLeft(); -- int pos; -- -- if (slider->orientation() == Qt::Horizontal) { -- sliderLength = sr.width(); -- sliderMin = gr.x(); -- sliderMax = gr.right() - sliderLength + 1; -- pos = (mousePressEvent->pos() - center).x(); --// qDebug() << "pos....:" << mousePressEvent->pos() << center << pos; -- } else { -- sliderLength = sr.height(); -- sliderMin = gr.y(); -- sliderMax = gr.bottom() - sliderLength + 1; -- pos = (mousePressEvent->pos() - center).y(); -- } --// qDebug() << "minumum..." << slider->minimum() << slider->maximum() << sliderMin << sliderMax << pos; -- int sliderValue = sliderValueFromPosition(slider->minimum(), slider->maximum(), pos - sliderMin, sliderMax - sliderMin, opt->upsideDown); --// qDebug() << "sliderValue....." << sliderValue << slider->value(); -- step = sliderValue - slider->value(); --// qDebug() << "step0000...." << step; --// qDebug() << "addValue........." << animator->getExtraProperty("addValue"); -- } -- animator->startAnimator("move_position"); -- -- int endPos = (startPosition + step) - (absoluteButton ? 0 : (startPosition + step)%step); --// qDebug() << "endPos0000....." << endPos; -- if(!animator->getExtraProperty("addValue").toBool()) -- endPos = (startPosition + step) + (absoluteButton ? 0 : (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0)); --// qDebug() << "endPos1111....." << endPos; -- -- if(animator->getExtraProperty("addValue").toBool()) -- endPos = qMin(endPos, slider->maximum()); -- else -- endPos = qMax(endPos, slider->minimum()); --// qDebug() << "endPos....." << endPos; -- animator->setExtraProperty("end_position", endPos); -- animator->setExtraProperty("start_position", startPosition); -- --// qApp->sendEvent(slider, e); -- return true; -- } -- } -- } -- } -- else -- return true; -- return false; -- } -- -- } -- -- if(qobject_cast<QScrollBar*>(obj)){ -- auto mousePressEvent = static_cast<QMouseEvent*>(e); -- auto *scrollbar = qobject_cast<QScrollBar *>(obj); -- if(scrollbar == nullptr || !scrollbar->isEnabled()) -- return false; -- -- bool midButtonAbsPos = proxy()->styleHint(QStyle::SH_ScrollBar_MiddleClickAbsolutePosition, 0, scrollbar); --// if(mousePressEvent->button() != Qt::LeftButton) --// return false; --// qDebug() << "e->type......" << e->type(); -- if ((e->type() != QEvent::MouseButtonPress && e->type() != QEvent::MouseButtonDblClick) -- || (!(mousePressEvent->button() == Qt::LeftButton || (midButtonAbsPos && mousePressEvent->button() == Qt::MidButton)))) -- return false; -- -- if(obj->property("animation").isValid() && !obj->property("animation").toBool()) -- return false; -- -- auto animator = m_scrollbar_animation_helper->animator(scrollbar); -- if(!animator) -- return false; --// qDebug() << "event..." << e->type() << mousePressEvent->button(); -- const bool horizontal = scrollbar->orientation() == Qt::Horizontal; -- -- if(horizontal){ -- if(mousePressEvent->pos().x() <= scrollbarSliderRec().x()){ -- animator->setExtraProperty("addValue", scrollbar->layoutDirection() == Qt::RightToLeft ? true : false); -- -- } -- else if(mousePressEvent->pos().x() >= scrollbarSliderRec().x() + scrollbarSliderRec().width()){ -- animator->setExtraProperty("addValue", scrollbar->layoutDirection() == Qt::RightToLeft ? false : true); -- } -- else -- return false; -- } -- else{ -- if(mousePressEvent->pos().y() <= scrollbarSliderRec().y()){ -- animator->setExtraProperty("addValue", false); -- -- } -- else if(mousePressEvent->pos().y() >= scrollbarSliderRec().y() + scrollbarSliderRec().height()){ -- animator->setExtraProperty("addValue", true); -- } -- else -- return false; -- } -- -- if(!animator->isRunning("move_position")){ -- int startPosition = scrollbar->value();//scrollbar->sliderPosition();//sliderPositionFromValue(bar->minimum, bar->maximum, scrollBar->value(), maxlen - sliderlen, bar->upsideDown); --// qDebug() << "startPosition......." << startPosition << scrollbar->value(); -- if(startPosition <= scrollbar->maximum() && startPosition >= scrollbar->minimum()){ --// qDebug() << "CC_ScrollBar............" << animator->isRunning("move_position") << animator->currentAnimatorTime("move_position"); -- if(animator->value("move_position") != 1.0){ -- if(animator->getExtraProperty("addValue").isValid()){ --// qDebug() << "pagestep..." << scrollbar->pageStep() << animator->getExtraProperty("addValue").toBool(); -- int step = (animator->getExtraProperty("addValue").toBool() ? 1 : -1) * scrollbar->pageStep(); --// qDebug() << "step............" << step << animator->getExtraProperty("addValue").toBool(); -- -- QStyleOptionSlider *opt = new QStyleOptionSlider(); -- opt->init(scrollbar); -- --// qDebug() << "scrollbar。。。。。。" << scrollbar; --// qDebug() << "11111111" << scrollbar->property("ScrollBarSliderRect").isValid(); -- -- QRect sr = scrollbar->property("ScrollBarSliderRect").isValid() ? -- scrollbar->property("ScrollBarSliderRect").value<QRect>() : -- QRect(); -- --// qDebug() << "sr......." << sr; --// qDebug() << "12333333" << scrollbar->property("ScrollBarGrooveRect").isValid(); -- QRect gr = scrollbar->property("ScrollBarGrooveRect").isValid() ? -- scrollbar->property("ScrollBarGrooveRect").value<QRect>() : -- QRect(); -- -- bool absoluteButton = (midButtonAbsPos && mousePressEvent->button() == Qt::MidButton) -- || (proxy()->styleHint(QStyle::SH_ScrollBar_LeftClickAbsolutePosition, opt, scrollbar) -- && mousePressEvent->button() == Qt::LeftButton); -- if(absoluteButton){ -- int sliderMin, sliderMax, sliderLength, pos; -- -- if (horizontal == Qt::Horizontal) { -- sliderLength = sr.width(); -- sliderMin = gr.x(); -- sliderMax = gr.right() - sliderLength + 1; --// qDebug() << "sliderLength....." << sliderLength << gr << gr.right(); -- pos = mousePressEvent->pos().x() - sliderLength / 2; -- if (scrollbar->layoutDirection() == Qt::RightToLeft) -- opt->upsideDown = !opt->upsideDown; -- } else { -- sliderLength = sr.height(); -- sliderMin = gr.y(); -- sliderMax = gr.bottom() - sliderLength + 1; -- pos = mousePressEvent->pos().y() - sliderLength / 2; -- -- } -- --// qDebug() << "minimum..." << scrollbar->minimum() << scrollbar->maximum() << pos << sliderMin << sliderMax; -- int scrollValue = sliderValueFromPosition(scrollbar->minimum(), scrollbar->maximum(), pos - sliderMin, -- sliderMax - sliderMin, opt->upsideDown); --// qDebug() << "scrollValue....." << scrollValue << scrollbar->value(); -- step = scrollValue - scrollbar->value(); --// qDebug() << "step0000...." << step; --// qDebug() << "addValue........." << animator->getExtraProperty("addValue"); -- -- } -- animator->startAnimator("move_position"); -- -- int endPos = (startPosition + step) - (absoluteButton ? 0 : (startPosition + step)%step); --// qDebug() << "endPos000....." << startPosition << step << endPos; -- -- if(!animator->getExtraProperty("addValue").toBool()) -- endPos = (startPosition + step) + (absoluteButton ? 0 : (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0)); --// qDebug() << "endPos1111....." << endPos; -- -- if(animator->getExtraProperty("addValue").toBool()) -- endPos = qMin(endPos, scrollbar->maximum()); -- else -- endPos = qMax(endPos, scrollbar->minimum()); --// qDebug() << "endPos....." << endPos; -- animator->setExtraProperty("end_position", endPos); -- animator->setExtraProperty("start_position", startPosition); -- --// qApp->sendEvent(scrollbar, e); -- return true; -- } -- } -- } -- } -- else -- return true; -- -- return false; -- -- } -- -- if (qobject_cast<QMenu *>(obj)) { -- if (e->type() == QEvent::Show) { -- if (QMenu *w = qobject_cast<QMenu *>(obj)) { -- if (!KWindowSystem::compositingActive()) { -- w->setProperty("useSystemStyleBlur", false); -- } -- } -- } -- } -- return false; --} -- --/* -- * Note there are some widgets can not be set as transparent one in polish. -- * Because it has been created as a rgb window. -- * -- * To reslove this problem, we have to let attribute be setted more ahead. -- * Some styleHint() methods are called in the early creation of a widget. -- * So we can real set them as alpha widgets. -- */ --int Qt5UKUIStyle::styleHint(QStyle::StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const --{ -- realSetWindowSurfaceFormatAlpha(widget); -- realSetMenuTypeToMenu(widget); -- -- switch (hint) { -- case SH_ScrollBar_Transient: -- return false; -- case SH_ItemView_ShowDecorationSelected: -- return true; -- case SH_DialogButtonBox_ButtonsHaveIcons: -- return int(true); -- case SH_DialogButtons_DefaultButton: -- return int(true); -- case SH_UnderlineShortcut: -- return true; -- case SH_ComboBox_Popup: -- return true; -- case SH_ComboBox_AllowWheelScrolling: -- return int(false); -- case SH_ComboBox_PopupFrameStyle: -- return QFrame::NoFrame | QFrame::Plain; -- --// case SH_Button_FocusPolicy: --// return Qt::TabFocus; -- -- case SH_Header_ArrowAlignment: -- return Qt::AlignRight | Qt::AlignVCenter; -- -- case SH_Table_GridLineColor: -- return option ? option->palette.color(QPalette::Active, QPalette::Midlight).rgb() : 0; -- -- case SH_ItemView_ActivateItemOnSingleClick: -- if(m_is_tablet_mode){ -- if(widget) -- { -- if(widget->topLevelWidget()) -- { -- if(widget->topLevelWidget()->objectName() == QString::fromUtf8("KyNativeFileDialog")) -- return false; -- } -- } -- } -- return m_is_tablet_mode; -- -- case SH_DialogButtonLayout: -- return QDialogButtonBox::MacLayout; -- -- case SH_Menu_Scrollable: { -- return 1; -- } -- case SH_BlinkCursorWhenTextSelected: { -- return m_blink_cursor; -- } -- -- default: -- break; -- } -- return Style::styleHint(hint, option, widget, returnData); --} --void Qt5UKUIStyle::polish(QPalette &palette){ -- palette = standardPalette(); -- return Style::polish(palette); --} -- --QPalette Qt5UKUIStyle::standardPalette() const --{ -- auto palette = Style::standardPalette(); -- sp->setPalette(palette); -- -- if (auto settings = UKUIStyleSettings::globalInstance()) { -- QString themeColor = settings->get("themeColor").toString(); -- setThemeColor(themeColor, palette); -- } -- -- return palette; --} -- -- --bool Qt5UKUIStyle::isUseDarkPalette() const --{ -- bool usedark = (!useDefaultPaletteList().contains(qAppName()) && (m_drak_palette || (m_default_palette && useDarkPaletteList().contains(qAppName())))); -- -- if (qAppName() == "ukui-screensaver-dialog") { -- usedark = false; -- } -- -- return usedark; --} -- -- -- --QColor Qt5UKUIStyle::button_Click(const QStyleOption *option) const --{ -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- if (isUseDarkPalette()) { -- return mixColor(button, mix, 0.05); -- } -- -- return mixColor(button, mix, 0.2); --} -- -- --QColor Qt5UKUIStyle::button_Hover(const QStyleOption *option) const --{ -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- if (isUseDarkPalette()) { -- return mixColor(button, mix, 0.2); -- } -- -- return mixColor(button, mix, 0.05); --} -- -- --QColor Qt5UKUIStyle::closeButton_Click(const QStyleOption *option) const --{ -- QColor button = sp->ColoseButtonColor; -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- if (isUseDarkPalette()) { -- return mixColor(button, mix, 0.05); -- } -- -- return mixColor(button, mix, 0.2); --} -- -- --QColor Qt5UKUIStyle::closeButton_Hover(const QStyleOption *option) const --{ -- QColor button = sp->ColoseButtonColor; -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- if (isUseDarkPalette()) { -- return mixColor(button, mix, 0.2); -- } -- -- return mixColor(button, mix, 0.05); --} -- -- --QColor Qt5UKUIStyle::transparentButton_Click(const QStyleOption *option) const --{ -- QColor button = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- if (isUseDarkPalette()) { -- button.setAlphaF(0.15); -- } else { -- button.setAlphaF(0.28); -- } -- -- return button; --} -- --QColor Qt5UKUIStyle::transparentButton_Hover(const QStyleOption *option) const --{ -- QColor button = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- if (isUseDarkPalette()) { -- button.setAlphaF(0.28); -- } else { -- button.setAlphaF(0.15); -- } -- -- return button; --} -- -- --QColor Qt5UKUIStyle::highLight_Click(const QStyleOption *option) const --{ -- QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- if (isUseDarkPalette()) { -- return mixColor(highlight, mix, 0.05); -- } -- -- return mixColor(highlight, mix, 0.2); --} -- -- -- --QColor Qt5UKUIStyle::highLight_Hover(const QStyleOption *option) const --{ -- QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- -- if (isUseDarkPalette()) { -- return mixColor(highlight, mix, 0.2); -- } -- -- return mixColor(highlight, mix, 0.05); --} -- --void Qt5UKUIStyle::setThemeColor(QString themeColor, QPalette &palette) const --{ -- if (themeColor == "default") { -- -- } else if (themeColor == "daybreakBlue") { -- palette.setColor(QPalette::Active, QPalette::Highlight, QColor(55, 144, 250)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(55, 144, 250)); -- } else if (themeColor == "jamPurple") { -- palette.setColor(QPalette::Active, QPalette::Highlight, QColor(120, 115, 245)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(120, 115, 245)); -- } else if (themeColor == "magenta") { -- palette.setColor(QPalette::Active, QPalette::Highlight, QColor(235, 48, 150)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(235, 48, 150)); -- } else if (themeColor == "sunRed") { -- palette.setColor(QPalette::Active, QPalette::Highlight, QColor(243, 34, 45)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(243, 34, 45)); -- } else if (themeColor == "sunsetOrange") { -- palette.setColor(QPalette::Active, QPalette::Highlight, QColor(246, 140, 39)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(246, 140, 39)); -- } else if (themeColor == "dustGold") { -- palette.setColor(QPalette::Active, QPalette::Highlight, QColor(249, 197, 61)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(249, 197, 61)); -- } else if (themeColor == "polarGreen") { -- palette.setColor(QPalette::Active, QPalette::Highlight, QColor(82, 196, 41)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(82, 196, 41)); -- } --} -- --void Qt5UKUIStyle::updateTabletModeValue(bool isTabletMode) --{ -- m_is_tablet_mode = isTabletMode; -- sp->updateParameters(m_is_tablet_mode); -- -- qApp->setPalette(qGuiApp->palette()); -- QEvent event(QEvent::ApplicationPaletteChange); -- foreach (QWidget *widget, qApp->allWidgets()) { -- qApp->sendEvent(widget, &event); -- } --} -- --QRect Qt5UKUIStyle::scrollbarSliderRec() --{ -- return m_scrollBarSliderRec; --} -- --void Qt5UKUIStyle::setScrollbarSliderRec(QRect rect) const --{ -- if(m_scrollBarSliderRec != rect) -- m_scrollBarSliderRec = rect; --} -- --QRect Qt5UKUIStyle::sliderHandleRec() --{ -- return m_sliderHandleRec; --} -- --void Qt5UKUIStyle::setSliderHandleRec(QRect rect) const --{ -- if(m_sliderHandleRec != rect) -- m_sliderHandleRec = rect; --} -- -- --void Qt5UKUIStyle::polish(QWidget *widget) --{ -- QLibrary gestureLib("libqt5-gesture-extensions"); -- if (widget && gestureLib.load()) { -- typedef void (*RegisterFun) (QWidget*, QObject*); -- auto fun = (RegisterFun) gestureLib.resolve("registerWidget"); -- fun(widget, widget); -- } -- -- if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget->inherits("QMenu"))) { -- if (widget->testAttribute(Qt::WA_TranslucentBackground) && widget->isTopLevel()) { -- //FIXME: -- #if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) -- m_blur_helper->registerWidget(widget); -- #endif -- -- /* -- if (QString(widget->metaObject()->className())=="QMenu" || -- widget->inherits("Peony::DirectoryViewMenu") || -- widget->inherits("Peony::DesktopMenu")) { -- m_blur_helper->registerWidget(widget); -- } -- */ -- } -- -- if (widget->isWindow()) { -- auto var = widget->property("useStyleWindowManager"); -- -- if (var.isNull()) { -- m_window_manager->registerWidget(widget); -- } else { -- if (var.toBool()) { -- m_window_manager->registerWidget(widget); -- } -- } -- } -- } -- -- if(!widget) -- return; -- -- Style::polish(widget); -- -- realSetWindowSurfaceFormatAlpha(widget); -- -- m_shadow_helper->registerWidget(widget); -- -- if (qobject_cast<QTabWidget*>(widget)) { -- //FIXME: unpolish, extensiable. -- if (qAppName() != "ukui-sidebar") -- m_tab_animation_helper->registerWidget(widget); -- } -- -- if (qobject_cast<QScrollBar*>(widget)) { -- //set scroll must have mouse_hover state -- widget->setAttribute(Qt::WA_Hover); -- -- //cancel scroll right click menu -- widget->setContextMenuPolicy(Qt::NoContextMenu); -- m_scrollbar_animation_helper->registerWidget(widget); -- } -- -- if (auto v = qobject_cast<QAbstractItemView *>(widget)) { -- v->viewport()->setAttribute(Qt::WA_Hover); -- //QCompleter BUG113969 --// v->setAttribute(Qt::WA_InputMethodEnabled); -- } -- -- if(qobject_cast<QToolButton*>(widget)) -- { --// m_button_animation_helper->registerWidget(widget); -- } -- -- if(qobject_cast<QPushButton*>(widget)) -- { --// m_button_animation_helper->registerWidget(widget); -- } -- -- if(qobject_cast<QRadioButton*>(widget)) -- { -- m_radiobutton_animation_helper->registerWidget(widget); -- } -- -- if(qobject_cast<QCheckBox*>(widget)) -- { -- m_checkbox_animation_helper->registerWidget(widget); -- } -- -- if(qobject_cast<QSlider*>(widget)){ -- m_slider_animation_helper->registerWidget(widget); --// auto slider = qobject_cast<QSlider*>(widget); --// connect(slider, &QSlider::valueChanged, this, [=](int value){ --// slide --// qDebug() << "slider valueChanged:" << value; --// }); -- } -- /*! -- \todo QDateTimeEdit widget affected with calendarPopup() draw QComboBox style or QSpinBox style. -- So temporarily haven't added the QDateTimeEdit animation and style. -- */ -- if(qobject_cast<QComboBox*>(widget)) -- { -- auto combobx = qobject_cast<QComboBox *>(widget); -- m_combobox_animation_helper->registerWidget(widget); -- m_button_animation_helper->registerWidget(widget); -- combobx->view()->viewport()->setAutoFillBackground(false); -- } -- -- if(qobject_cast<QSpinBox*>(widget)) -- { -- m_button_animation_helper->registerWidget(widget); -- } -- -- if(qobject_cast<QDoubleSpinBox*>(widget)) -- { -- m_button_animation_helper->registerWidget(widget); -- } -- -- if (widget && widget->inherits("QTipLabel")) { -- auto label = qobject_cast<QLabel *>(widget); -- label->setWordWrap(true); -- label->setScaledContents(true); -- if(sp->m_isTableMode){ -- QFontMetrics fm = label->fontMetrics(); -- int textHeight = fm.height(); -- if(textHeight < sp->ToolTip_Height) -- { -- //PE_PanelTipLabel rec adjusted 8 -- label->setMinimumHeight(sp->ToolTip_Height + 8); -- } -- } -- } -- -- if (qobject_cast<QMessageBox *>(widget)) { -- widget->setAutoFillBackground(true); -- widget->setBackgroundRole(QPalette::Base); -- } -- -- if (qobject_cast<QTabBar *>(widget)) { -- auto tabBar = qobject_cast<QTabBar *>(widget); -- if(tabBar->elideMode() == Qt::ElideNone) -- tabBar->setElideMode(Qt::ElideRight); -- } -- -- if (qobject_cast<QLineEdit *>(widget) || qobject_cast<QTabBar *>(widget)) { -- widget->setAttribute(Qt::WA_Hover); -- } -- -- if (qobject_cast<QLineEdit *>(widget)) { -- //lineedit action use highlight effect -- if (widget->findChild<QAction *>()) { -- QStyleOption subOption; -- subOption.state = State_None; -- subOption.palette = sp->defaultPalette; -- if (widget->isEnabled()) -- subOption.state |= State_Enabled; -- for (QAction *act : widget->findChildren<QAction *>()) { -- act->setIcon(QIcon(HighLightEffect::ordinaryGeneratePixmap(act->icon().pixmap(16, 16), &subOption, widget, HighLightEffect::BothDefaultAndHighlit))); -- } -- } -- } -- -- if(qobject_cast<QTableView*>(widget)) -- { -- auto tableView = qobject_cast<QTableView *>(widget); --// qDebug() << "header height:" << tableView->verticalHeader()->count(); -- bool isInitial = true; -- if (qApp->property("isInitial").isValid()) { -- isInitial = qApp->property("isInitial").toBool(); -- } -- //模式切换时tablewidget中项高度变化 处理得还是有点问题 -- for(int i = 0; i < tableView->verticalHeader()->count(); i++) -- { --// qDebug() << "i........" << i << tableView->rowHeight(i) << sp->m_isTableMode << sp->m_scaleRatio4_3 << (tableView->rowHeight(i) / (4.0/3.0)) << tableView->rowHeight(i) * (4.0/3.0); -- if(tableView->rowHeight(i) == sp->m_headerDefaultSectionSizeVertical1_1 || -- tableView->rowHeight(i) == sp->m_headerDefaultSectionSizeVertical4_3) -- tableView->setRowHeight(i, (isInitial ? tableView->rowHeight(i) : sp->m_headerDefaultSectionSizeVertical)); -- // else //目前没办法用这个方式 因为这个polish可能被同时调用多次 导致高度被进行了多次调整 -- // tableView->setRowHeight(i, (isInitial ? tableView->rowHeight(i) : (sp->m_isTableMode ? tableView->rowHeight(i) * 4.0/3.0 : tableView->rowHeight(i) * 3.0/4.0))); -- -- } -- } -- -- if(widget != nullptr && widget->inherits("QListView")) -- { -- auto listview = qobject_cast<QListView *>(widget); --// qDebug() << "listview is null0000: " << (listview == nullptr); -- if(listview != nullptr) -- { -- connect(listview->selectionModel(), &QItemSelectionModel::selectionChanged, [listview](const QItemSelection &selected, const QItemSelection &deselected){ -- if(!selected.empty() && !deselected.empty()) -- { -- listview->repaint(); -- --// int row = listview->currentIndex().row(); --// int column = listview->currentIndex().column(); --// if(listview->indexWidget(listview->model()->index(row, column)))//widget is null --// listview->indexWidget(listview->model()->index(row, column))->repaint(); -- } -- }); -- } -- } -- -- if(widget != nullptr && widget->inherits("QTreeView")){ -- m_tree_animation_helper->registerWidget(widget); -- if(!qobject_cast<QTreeView *>(widget)->isAnimated() && -- widget->property("animation").isValid() && !widget->property("animation").toBool()){ -- qobject_cast<QTreeView *>(widget)->setAnimated(false); -- } -- else{ -- widget->setProperty("animation", true); -- qobject_cast<QTreeView *>(widget)->setAnimated(true); -- } -- -- auto tree = qobject_cast<QTreeView*>(widget); -- connect(tree, &QTreeView::expanded, this, [=](const QModelIndex &index){ -- if(m_tree_animation_helper){ -- auto treeview = qobject_cast<QTreeView *>(widget); -- auto animator = m_tree_animation_helper->animator(treeview); -- if(!animator) -- return; -- --// qDebug() <<"expanded index:" << index.internalId(); -- -- animator->setExtraProperty("expandItem", QString::number(index.internalId())); -- -- if(animator->isRunning("collaps")){ -- animator->stopAnimator("collaps"); -- animator->setAnimatorCurrentTime("collaps", 0); -- } -- if(!animator->isRunning("expand")){ -- animator->startAnimator("expand"); -- } -- } -- }, Qt::UniqueConnection); -- connect(tree, &QTreeView::collapsed, this, [=](const QModelIndex &index){ -- -- if(m_tree_animation_helper){ -- auto treeview = qobject_cast<QTreeView *>(widget); -- auto animator = m_tree_animation_helper->animator(treeview); -- if(!animator) -- return; --// qDebug() <<"collapsed index:" << index.internalId(); -- -- animator->setExtraProperty("collapsItem", QString::number(index.internalId())); -- -- if(animator->isRunning("expand")){ -- animator->stopAnimator("expand"); -- animator->setAnimatorCurrentTime("expand", 0); -- } -- if(!animator->isRunning("collaps")){ -- animator->startAnimator("collaps"); -- } -- } -- }, Qt::UniqueConnection); -- -- } -- -- widget->installEventFilter(this); --} -- --void Qt5UKUIStyle::unpolish(QWidget *widget) --{ -- QLibrary gestureLib("libqt5-gesture-extensions"); -- if (widget && gestureLib.load()) { -- typedef void (*UnRegisterFun) (QWidget*, QObject*); -- auto fun = (UnRegisterFun) gestureLib.resolve("unregisterWidget"); -- fun(widget, widget); -- } -- if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget->inherits("QMenu"))) { -- if (widget->testAttribute(Qt::WA_TranslucentBackground) && widget->isTopLevel()) { -- #if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) -- m_blur_helper->unregisterWidget(widget); -- #endif -- } -- if (widget->isWindow()) { -- auto var = widget->property("useStyleWindowManager"); -- -- if (var.isNull()) { -- m_window_manager->unregisterWidget(widget); -- } else { -- if (var.toBool()) { -- m_window_manager->unregisterWidget(widget); -- } -- } -- } -- } -- -- m_shadow_helper->unregisterWidget(widget); -- -- widget->removeEventFilter(this); -- -- if (widget && widget->inherits("QTipLabel")) { -- auto label = qobject_cast<QLabel *>(widget); -- label->setWordWrap(false); -- } -- -- if (qobject_cast<QTabWidget*>(widget)) { -- m_tab_animation_helper->unregisterWidget(widget); -- } -- -- if (qobject_cast<QScrollBar*>(widget)) { -- m_scrollbar_animation_helper->unregisterWidget(widget); -- } -- -- if (auto v = qobject_cast<QAbstractItemView *>(widget)) { -- v->viewport()->setAttribute(Qt::WA_Hover); -- } -- -- if(qobject_cast<QToolButton*>(widget)) -- { -- m_button_animation_helper->unregisterWidget(widget); -- } -- -- if(qobject_cast<QPushButton*>(widget)) -- { -- m_button_animation_helper->unregisterWidget(widget); -- } -- -- if(qobject_cast<QComboBox*>(widget)) -- { -- m_combobox_animation_helper->unregisterWidget(widget); -- m_button_animation_helper->unregisterWidget(widget); -- } -- -- if(qobject_cast<QSpinBox*>(widget)) -- { -- m_button_animation_helper->unregisterWidget(widget); -- } -- -- if(qobject_cast<QDoubleSpinBox*>(widget)) -- { -- m_button_animation_helper->unregisterWidget(widget); -- } -- -- if(qobject_cast<QRadioButton*>(widget)) -- { -- m_radiobutton_animation_helper->unregisterWidget(widget); -- } -- -- if(qobject_cast<QCheckBox*>(widget)) -- { -- m_checkbox_animation_helper->unregisterWidget(widget); -- } -- -- if(qobject_cast<QSlider*>(widget)) -- m_slider_animation_helper->unregisterWidget(widget); -- -- if (qobject_cast<QLineEdit *>(widget)) { -- widget->setAttribute(Qt::WA_Hover, false); -- } -- -- if(qobject_cast<QTreeView *>(widget)){ -- m_tree_animation_helper->unregisterWidget(widget); -- } -- -- Style::unpolish(widget); --} -- --QIcon Qt5UKUIStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const --{ -- if (QApplication::desktopSettingsAware() && !QIcon::themeName().isEmpty()) { -- switch (standardIcon) { -- case SP_FileDialogListView: -- { -- return QIcon::fromTheme(QLatin1String("view-list-symbolic")); -- }break; -- -- case SP_FileDialogDetailedView: -- { -- return QIcon::fromTheme(QLatin1String("view-grid-symbolic")); -- }break; -- -- case SP_ToolBarHorizontalExtensionButton: -- { -- //toolbar horizontal extension button icon -- return QIcon::fromTheme(QLatin1String("ukui-end-symbolic")); -- }break; -- -- case SP_LineEditClearButton: -- { -- //lineedit close button icon -- return QIcon::fromTheme(QLatin1String("edit-clear-symbolic")); -- }break; -- -- default: -- break; -- } -- } -- return Style::standardIcon(standardIcon, option, widget); --} -- -- -- --static inline uint qt_intensity(uint r, uint g, uint b) --{ -- // 30% red, 59% green, 11% blue -- return (77 * r + 150 * g + 28 * b) / 255; --} -- --/*! \reimp */ --QPixmap Qt5UKUIStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *option) const --{ -- switch (iconMode) { -- case QIcon::Disabled: { -- QStyleOption tmp = *option; -- tmp.state = State_Enabled; -- QPixmap target = HighLightEffect::ordinaryGeneratePixmap(pixmap, &tmp); -- --// //Fix me:QT original code -- QImage im = target.toImage().convertToFormat(QImage::Format_ARGB32); -- -- // Create a colortable based on the background (black -> bg -> white) -- QColor bg = option->palette.color(QPalette::Disabled, QPalette::ButtonText); -- int red = bg.red(); -- int green = bg.green(); -- int blue = bg.blue(); -- uchar reds[256], greens[256], blues[256]; -- for (int i=0; i<128; ++i) { -- reds[i] = uchar((red * (i<<1)) >> 8); -- greens[i] = uchar((green * (i<<1)) >> 8); -- blues[i] = uchar((blue * (i<<1)) >> 8); -- } -- for (int i=0; i<128; ++i) { -- reds[i+128] = uchar(qMin(red + (i << 1), 255)); -- greens[i+128] = uchar(qMin(green + (i << 1), 255)); -- blues[i+128] = uchar(qMin(blue + (i << 1), 255)); -- } -- -- int intensity = qt_intensity(red, green, blue); -- const int factor = 191; -- -- // High intensity colors needs dark shifting in the color table, while -- // low intensity colors needs light shifting. This is to increase the -- // perceived contrast. -- if ((red - factor > green && red - factor > blue) -- || (green - factor > red && green - factor > blue) -- || (blue - factor > red && blue - factor > green)) -- intensity = qMin(255, intensity + 91); --// else if (intensity <= 128) --// intensity -= 51; -- -- bool isPixmapPureColor = HighLightEffect::isPixmapPureColor(pixmap); -- for (int y=0; y<im.height(); ++y) { -- QRgb *scanLine = (QRgb*)im.scanLine(y); -- for (int x=0; x<im.width(); ++x) { -- QRgb pixel = *scanLine; -- // Calculate color table index, taking intensity adjustment -- // and a magic offset into account. -- uint ci = uint(qGray(pixel)/3 + (130 - intensity / 3)); -- -- int r = int(reds[ci]); -- int g = int(greens[ci]); -- int b = int(blues[ci]); -- int a = qAlpha(pixel)/255.0 > 0.7 ? 0.7 * 255 : qAlpha(pixel); -- if(isPixmapPureColor){ -- r = qMax(int(reds[ci]), bg.red()); -- g = qMax(int(greens[ci]), bg.green()); -- b = qMax(int(blues[ci]), bg.blue()); -- a = qAlpha(pixel); -- } -- *scanLine = qRgba(r, g, b, a); -- ++scanLine; -- } -- } -- -- return QPixmap::fromImage(im); -- -- -- //Fix me:set same color to text when set icon mode disable.But it has error in color icons. -- --// QColor bg = option->palette.color(QPalette::Disabled, QPalette::WindowText); --// bg.setAlphaF(0.5); --// QPainter p(&target); --// p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); --// p.setCompositionMode(QPainter::CompositionMode_SourceIn); --// p.fillRect(target.rect(), bg); --// p.end(); -- --// return target; -- } -- -- default: -- break; -- } -- -- return Style::generatedIconPixmap(iconMode, pixmap, option); --} -- -- -- --void Qt5UKUIStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const --{ -- switch (element) { -- case QStyle::PE_PanelMenu: -- case QStyle::PE_FrameMenu: -- { -- sp->initMenuParameters(isUseDarkPalette(), option, widget); -- painter->save(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- painter->drawPixmap(option->rect, sp->menuParameters.menuFramePixmap, sp->menuParameters.menuFramePixmap.rect());; -- painter->restore(); -- return; -- } -- case PE_FrameFocusRect: { -- if (qobject_cast<const QAbstractItemView *>(widget)) -- return; -- break; -- } -- -- case PE_Frame:{ -- painter->save(); -- painter->setRenderHint(QPainter::Antialiasing); -- painter->setPen(QPen(option->palette.color(QPalette::Active, QPalette::Midlight), 1)); -- painter->setBrush(Qt::NoBrush); -- painter->drawRect(option->rect); -- painter->restore(); -- return; -- } -- -- case PE_PanelButtonCommand: -- { -- if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { --// auto animator = m_button_animation_helper->animator(widget); -- const bool enable = button->state & State_Enabled; -- const bool hover = button->state & State_MouseOver; -- const bool sunken = button->state & State_Sunken; -- const bool on = button->state & State_On; -- const bool focus = button->state & State_HasFocus; -- bool roundButton = false; -- int width = 0; -- QRect rect = option->rect; -- -- if (widget && widget->property("isRoundButton").isValid()) { -- roundButton = widget->property("isRoundButton").toBool(); -- } -- -- painter->save(); -- if (!enable) { --// if (animator) { --// animator->stopAnimator("SunKen"); --// animator->stopAnimator("MouseOver"); --// } -- -- if (on) { -- width = sp->pushButtonParameters.pushButtonCheckDisablePen.width(); -- painter->setPen(sp->pushButtonParameters.pushButtonCheckDisablePen); -- painter->setBrush(sp->pushButtonParameters.pushButtonCheckDisableBrush); -- } -- else if (button->features & QStyleOptionButton::Flat) { -- width = 0; -- painter->setPen(Qt::NoPen); -- painter->setBrush(Qt::NoBrush); -- } -- else { -- width = sp->pushButtonParameters.pushButtonDisablePen.width(); -- painter->setPen(sp->pushButtonParameters.pushButtonDisablePen); -- painter->setBrush(sp->pushButtonParameters.pushButtonDisableBrush); -- } -- } else { -- if (on) { -- if (sunken) { -- width = sp->pushButtonParameters.pushButtonCheckClickPen.width(); -- painter->setPen(sp->pushButtonParameters.pushButtonCheckClickPen); -- painter->setBrush(sp->pushButtonParameters.pushButtonCheckClickBrush); -- } else if (hover) { -- width = sp->pushButtonParameters.pushButtonCheckHoverPen.width(); -- painter->setPen(sp->pushButtonParameters.pushButtonCheckHoverPen); -- painter->setBrush(sp->pushButtonParameters.pushButtonCheckHoverBrush); -- } else { -- width = sp->pushButtonParameters.pushButtonCheckPen.width(); -- painter->setPen(sp->pushButtonParameters.pushButtonCheckPen); -- painter->setBrush(sp->pushButtonParameters.pushButtonCheckBrush); -- } -- } else { -- if (sunken) { -- width = sp->pushButtonParameters.pushButtonClickPen.width(); -- painter->setPen(sp->pushButtonParameters.pushButtonClickPen); -- painter->setBrush(sp->pushButtonParameters.pushButtonClickBrush); -- } else if (hover) { -- width = sp->pushButtonParameters.pushButtonHoverPen.width(); -- painter->setPen(sp->pushButtonParameters.pushButtonHoverPen); -- painter->setBrush(sp->pushButtonParameters.pushButtonHoverBrush); -- } else { -- if (button->features & QStyleOptionButton::Flat) { -- width = 0; -- painter->setPen(Qt::NoPen); -- painter->setBrush(Qt::NoBrush); -- } else { -- width = sp->pushButtonParameters.pushButtonDefaultPen.width(); -- painter->setPen(sp->pushButtonParameters.pushButtonDefaultPen); -- painter->setBrush(sp->pushButtonParameters.pushButtonDefaultBrush); -- } -- -- //focus -- if (focus) { -- width = sp->pushButtonParameters.pushButtonFocusPen.width(); -- painter->setPen(sp->pushButtonParameters.pushButtonFocusPen); -- } -- } -- } -- } -- -- if(sp->pushButtonParameters.radius != 0) -- painter->setRenderHint(QPainter::Antialiasing, true); -- if (roundButton) { -- painter->setRenderHint(QPainter::Antialiasing, true); -- painter->drawEllipse(rect.adjusted(width, width, -width, -width)); -- } else { -- if(width == 1 && sp->pushButtonParameters.radius != 0){ -- painter->translate(0.5, 0.5); -- } -- painter->drawRoundedRect(rect.adjusted(width, width, -width, -width), sp->pushButtonParameters.radius, sp->pushButtonParameters.radius); -- } -- painter->restore(); -- return; -- --// //button animation cancel temporary --// if (sunken || on || animator->isRunning("SunKen") || animator->value("SunKen") == 1.0) { --// double opacity = animator->value("SunKen").toDouble(); --// if (sunken || on) { --// if (opacity == 0.0) { --// animator->setAnimatorDirectionForward("SunKen", true); --// animator->startAnimator("SunKen"); --// } --// } else { --// if (opacity == 1.0) { --// animator->setAnimatorDirectionForward("SunKen",false); --// animator->startAnimator("SunKen"); --// } --// } -- --// QColor hoverColor, sunkenColor; --// painter->save(); --// painter->setPen(Qt::NoPen); --// if (isWindowColoseButton) { --// hoverColor = closeButton_Hover(option); --// sunkenColor = closeButton_Click(option); --// } else if (isWindowButton && useTransparentButtonList().contains(qAppName())) { --// hoverColor = transparentButton_Hover(option); --// sunkenColor = transparentButton_Click(option); --// } else { --// if (isImportant) { --// hoverColor = highLight_Hover(option); --// sunkenColor = highLight_Click(option); --// } else if (useButtonPalette || isWindowButton) { --// hoverColor = button_Hover(option); --// sunkenColor = button_Click(option); --// } else { --// hoverColor = highLight_Hover(option); --// sunkenColor = highLight_Click(option); --// } --// } --// painter->setBrush(mixColor(hoverColor, sunkenColor, opacity)); --// painter->setRenderHint(QPainter::Antialiasing, true); --// painter->drawRoundedRect(option->rect, sp->radius, sp->radius); --// painter->restore(); --// return; --// } -- --// if (hover || animator->isRunning("MouseOver") --// || animator->currentAnimatorTime("MouseOver") == animator->totalAnimationDuration("MouseOver")) { --// double opacity = animator->value("MouseOver").toDouble(); --// if (hover) { --// animator->setAnimatorDirectionForward("MouseOver",true); --// if (opacity == 0.0) { --// animator->startAnimator("MouseOver"); --// } --// } else { --// animator->setAnimatorDirectionForward("MouseOver",false); --// if (opacity == 1.0) { --// animator->startAnimator("MouseOver"); --// } --// } -- --// painter->save(); --// painter->setPen(Qt::NoPen); --// painter->setOpacity(opacity); --// if (isWindowColoseButton) { --// painter->setBrush(closeButton_Hover(option)); --// } else if (isWindowButton && useTransparentButtonList().contains(qAppName())) { --// QColor color = transparentButton_Hover(option); --// painter->setBrush(color); --// } else { --// if (isImportant) { --// painter->setBrush(highLight_Hover(option)); --// } else if (useButtonPalette || isWindowButton) { --// painter->setBrush(button_Hover(option)); --// } else { --// painter->setBrush(highLight_Hover(option)); --// } --// } --// painter->setRenderHint(QPainter::Antialiasing, true); --// painter->drawRoundedRect(option->rect, sp->radius, sp->radius); --// painter->restore(); --// return; --// } -- --// //button inactive state --// if ((button->state & QStyle::State_Enabled) && !(button->state & QStyle::State_Active)) { --// painter->save(); --// painter->setPen(Qt::NoPen); --// painter->setBrush(Qt::red); --// painter->setRenderHint(QPainter::Antialiasing, true); --// painter->drawRoundedRect(option->rect, sp->radius, sp->radius); --// painter->restore(); --// } --// return; -- } -- break; -- } -- -- case PE_PanelTipLabel://UKUI Tip style: Open ground glass -- { -- if (widget && widget->isEnabled()) { -- sp->initToolTipParameters(isUseDarkPalette(), option, widget); -- if (!KWindowSystem::compositingActive()) { -- QColor co = option->palette.color(QPalette::BrightText); -- co.setAlphaF(0.15); -- painter->save(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- painter->setPen(co); -- painter->setBrush(sp->toolTipParameters.toolTipBackgroundBrush.color()); -- painter->drawRect(option->rect); -- painter->restore(); -- return; -- } -- -- QStyleOption opt = *option; -- -- painter->save(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- QPainterPath rectPath; -- rectPath.addRoundedRect(option->rect.adjusted(+4, +4, -4, -4), sp->toolTipParameters.radius, sp->toolTipParameters.radius); -- -- // Draw a black floor -- QPixmap pixmap(option->rect.size()); -- pixmap.fill(Qt::transparent); -- QPainter pixmapPainter(&pixmap); -- pixmapPainter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter.setPen(Qt::transparent); -- pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::BrightText)); -- pixmapPainter.drawPath(rectPath); -- pixmapPainter.end(); -- -- // Blur the black background -- QImage img = pixmap.toImage(); -- qt_blurImage(img, 4, false, false); -- -- // Dig out the center part -- pixmap = QPixmap::fromImage(img); -- QPainter pixmapPainter2(&pixmap); -- pixmapPainter2.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter2.setCompositionMode(QPainter::CompositionMode_Clear); -- pixmapPainter2.setPen(Qt::transparent); -- pixmapPainter2.setBrush(Qt::transparent); -- pixmapPainter2.drawPath(rectPath); -- pixmapPainter2.end(); -- -- //This is the beginning of drawing the bottom of the prompt box -- auto color = sp->toolTipParameters.toolTipBackgroundBrush.color(); -- if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -- auto opacity = UKUIStyleSettings::globalInstance()->get("menuTransparency").toInt()/100.0; -- color.setAlphaF(opacity); -- } -- -- if (qApp->property("blurEnable").isValid()) { -- bool blurEnable = qApp->property("blurEnable").toBool(); -- if (!blurEnable) { -- color.setAlphaF(1); -- } -- } -- -- //if blur effect is not supported, do not use transparent color. -- if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind) || blackAppListWithBlurHelper().contains(qAppName())) { -- color.setAlphaF(1); -- } -- -- QPainterPath path; -- auto region = widget->mask(); -- if (region.isEmpty()) { -- path.addRoundedRect(opt.rect.adjusted(+4, +4, -4, -4), sp->toolTipParameters.radius, sp->toolTipParameters.radius); -- } else { -- path.addRegion(region); -- } -- -- //draw blur background -- QPainter pixmapPainter3(&pixmap); -- pixmapPainter3.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter3.setPen(Qt::transparent); -- pixmapPainter3.setBrush(color); -- pixmapPainter3.drawPath(path); -- pixmapPainter3.end(); -- -- painter->drawPixmap(option->rect, pixmap, pixmap.rect()); -- -- painter->restore(); -- return; -- } -- break; -- } -- -- case PE_FrameStatusBar://UKUI Status style -- { -- painter->save(); -- painter->setRenderHint(QPainter::Antialiasing,true); -- painter->setPen(Qt::NoPen); -- painter->setBrush(option->palette.color(QPalette::Dark)); -- painter->drawRect(option->rect); -- painter->restore(); -- return; -- } -- -- case PE_IndicatorButtonDropDown: //UKUI IndicatorButton style -- { -- painter->save(); -- painter->setRenderHint(QPainter::Antialiasing,true); -- painter->setPen(Qt::NoPen); -- if(widget && widget->isEnabled()){ -- if (option->state & State_MouseOver) { -- painter->setBrush(option->palette.color(QPalette::Highlight)); -- painter->drawRoundedRect(option->rect.left()-4,option->rect.y(),option->rect.width()+4,option->rect.height(), sp->radius, sp->radius); -- } -- } -- painter->restore(); -- return; -- } -- -- case PE_PanelButtonTool: -- { -- sp->initToolButtonPanelParameters(isUseDarkPalette(), option, widget); --// auto animator = m_button_animation_helper->animator(widget); -- -- const bool enable = option->state & State_Enabled; -- const bool raise = option->state & State_AutoRaise; -- const bool sunken = option->state & State_Sunken; -- const bool hover = option->state & State_MouseOver; -- const bool on = option->state & State_On; -- const bool focus = option->state & State_HasFocus; -- bool roundButton = false; -- int width = 0; -- QRect rect = option->rect; -- -- if (widget && widget->property("isRoundButton").isValid()) { -- roundButton = widget->property("isRoundButton").toBool(); -- } -- -- painter->save(); -- if (!enable) { --// if (animator) { --// animator->stopAnimator("SunKen"); --// animator->stopAnimator("MouseOver"); --// } -- -- if (on) { -- width = sp->toolButtonParameters.toolButtonCheckDisablePen.width(); -- painter->setPen(sp->toolButtonParameters.toolButtonCheckDisablePen); -- painter->setBrush(sp->toolButtonParameters.toolButtonCheckDisableBrush); -- } -- else if (raise) { -- width = 0; -- painter->setPen(Qt::NoPen); -- painter->setBrush(Qt::NoBrush); -- } -- else { -- width = sp->toolButtonParameters.toolButtonDisablePen.width(); -- painter->setPen(sp->toolButtonParameters.toolButtonDisablePen); -- painter->setBrush(sp->toolButtonParameters.toolButtonDisableBrush); -- } -- } else { -- if (on) { -- if (sunken) { -- width = sp->toolButtonParameters.toolButtonCheckClickPen.width(); -- painter->setPen(sp->toolButtonParameters.toolButtonCheckClickPen); -- painter->setBrush(sp->toolButtonParameters.toolButtonCheckClickBrush); -- } else if (hover) { -- width = sp->toolButtonParameters.toolButtonCheckHoverPen.width(); -- painter->setPen(sp->toolButtonParameters.toolButtonCheckHoverPen); -- painter->setBrush(sp->toolButtonParameters.toolButtonCheckHoverBrush); -- } else { -- width = sp->toolButtonParameters.toolButtonCheckPen.width(); -- painter->setPen(sp->toolButtonParameters.toolButtonCheckPen); -- painter->setBrush(sp->toolButtonParameters.toolButtonCheckBrush); -- } -- } else { -- if (sunken) { -- width = sp->toolButtonParameters.toolButtonClickPen.width(); -- painter->setPen(sp->toolButtonParameters.toolButtonClickPen); -- painter->setBrush(sp->toolButtonParameters.toolButtonClickBrush); -- } else if (hover) { -- width = sp->toolButtonParameters.toolButtonHoverPen.width(); -- painter->setPen(sp->toolButtonParameters.toolButtonHoverPen); -- painter->setBrush(sp->toolButtonParameters.toolButtonHoverBrush); -- } else { -- if (raise) { -- width = 0; -- painter->setPen(Qt::NoPen); -- painter->setBrush(Qt::NoBrush); -- } else { -- width = sp->toolButtonParameters.toolButtonDefaultPen.width(); -- painter->setPen(sp->toolButtonParameters.toolButtonDefaultPen); -- painter->setBrush(sp->toolButtonParameters.toolButtonDefaultBrush); -- } -- -- //focus -- if (focus) { -- width = sp->toolButtonParameters.toolButtonFocusPen.width(); -- painter->setPen(sp->toolButtonParameters.toolButtonFocusPen); -- } -- } -- } -- } -- -- if(sp->toolButtonParameters.radius != 0) -- painter->setRenderHint(QPainter::Antialiasing, true); -- if (roundButton) { -- painter->setRenderHint(QPainter::Antialiasing, true); -- painter->drawEllipse(rect.adjusted(width, width, -width, -width)); -- } else { -- if(width == 1 && sp->toolButtonParameters.radius != 0) -- painter->translate(0.5, 0.5); -- painter->drawRoundedRect(rect.adjusted(width, width, -width, -width), sp->toolButtonParameters.radius, sp->toolButtonParameters.radius); -- } -- painter->restore(); -- return; -- -- --// if (sunken || on || animator->isRunning("SunKen") --// || animator->currentAnimatorTime("SunKen") == animator->totalAnimationDuration("SunKen")) { --// double opacity = animator->value("SunKen").toDouble(); --// if (sunken || on) { --// if (opacity == 0.0) { --// animator->setAnimatorDirectionForward("SunKen", true); --// animator->startAnimator("SunKen"); --// } --// } else { --// if (animator->currentAnimatorTime("SunKen") == animator->totalAnimationDuration("SunKen")) { --// animator->setAnimatorDirectionForward("SunKen", false); --// animator->startAnimator("SunKen"); --// } --// } --// QColor hoverColor, sunkenColor; --// painter->save(); --// painter->setPen(Qt::NoPen); --// if (isWindowButton && useTransparentButtonList().contains(qAppName())) { --// hoverColor = transparentButton_Hover(option); --// sunkenColor = transparentButton_Click(option); --// } else if (isWindowColoseButton) { --// hoverColor = closeButton_Hover(option); --// sunkenColor = closeButton_Click(option); --// } else if (isWindowButton || useButtonPalette){ --// hoverColor = button_Hover(option); --// sunkenColor = button_Click(option); --// } else { --// hoverColor = highLight_Hover(option); --// sunkenColor = highLight_Click(option); --// } --// painter->setBrush(mixColor(hoverColor, sunkenColor, opacity)); --// painter->setRenderHint(QPainter::Antialiasing, true); --// painter->drawRoundedRect(option->rect, sp->radius, sp->radius); --// painter->restore(); --// return; --// } -- --// if (hover || animator->isRunning("MouseOver") --// || animator->currentAnimatorTime("MouseOver") == animator->totalAnimationDuration("MouseOver")) { --// double opacity = animator->value("MouseOver").toDouble(); --// if (hover) { --// animator->setAnimatorDirectionForward("MouseOver", true); --// if(opacity == 0.0) { --// animator->startAnimator("MouseOver"); --// } --// } else { --// animator->setAnimatorDirectionForward("MouseOver", false); --// if (opacity == 1.0) { --// animator->startAnimator("MouseOver"); --// } --// } --// painter->save(); --// painter->setPen(Qt::NoPen); --// painter->setOpacity(opacity); --// if (isWindowButton && useTransparentButtonList().contains(qAppName())) { --// QColor color = transparentButton_Hover(option); --// painter->setBrush(color); --// } else if (isWindowColoseButton) { --// painter->setBrush(closeButton_Hover(option)); --// } else if (isWindowButton || useButtonPalette){ --// painter->setBrush(button_Hover(option)); --// } else { --// painter->setBrush(highLight_Hover(option)); --// } --// painter->setRenderHint(QPainter::Antialiasing, true); --// painter->drawRoundedRect(option->rect, sp->radius, sp->radius); --// painter->restore(); --// return; --// } --// return; -- } -- -- case PE_IndicatorTabClose: -- { -- QIcon icon = QIcon::fromTheme("window-close-symbolic"); -- QColor color = sp->Indicator_IconDefault; -- if (option->state & (State_On | State_Sunken)) { -- color = sp->Indicator_IconSunken; -- } -- else if (option->state & (State_MouseOver)) { -- color = sp->Indicator_IconHover; -- } -- if (!icon.isNull()) { -- int iconSize = proxy()->pixelMetric(QStyle::PM_SmallIconSize, option, widget); -- QPixmap pixmap = icon.pixmap(QSize(iconSize, iconSize), QIcon::Normal, QIcon::On); -- pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -- painter->save(); -- drawColorPixmap(painter, color, pixmap); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- proxy()->drawItemPixmap(painter, option->rect, Qt::AlignCenter, pixmap); -- painter->restore(); -- } -- return; -- } -- -- case PE_FrameTabBarBase: -- { -- if (const QStyleOptionTabBarBase *tbb = qstyleoption_cast<const QStyleOptionTabBarBase *>(option)) { -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setBrush(sp->tabWidgetParameters.tabBarBackgroundBrush); -- painter->drawRect(tbb->tabBarRect); -- painter->restore(); -- return; -- } -- break; -- } -- -- case PE_FrameTabWidget: { -- if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(option)) { -- sp->initTabWidgetParameters(isUseDarkPalette(), option, widget); -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setBrush(sp->tabWidgetParameters.tabWidgetBackgroundBrush); -- painter->drawRect(twf->rect); -- painter->restore(); -- return; -- } -- break; -- } -- -- case PE_FrameGroupBox: //UKUI GroupBox style: -- { -- /* -- * Remove the style of the bounding box according to the design -- */ -- //painter->save(); -- //painter->setRenderHint(QPainter::Antialiasing,true); -- //painter->setPen(option->palette.color(QPalette::Base)); -- //painter->setBrush(option->palette.color(QPalette::Base)); -- //painter->drawRoundedRect(option->rect,4,4); -- //painter->restore(); -- return; -- } -- -- case PE_PanelLineEdit://UKUI Text edit style -- { -- if (widget) { --// if (widget->findChild<QAction *>()) { --// QStyleOption subOption = *option; --// for (QAction *act : widget->findChildren<QAction *>()) { --// act->setIcon(QIcon(HighLightEffect::ordinaryGeneratePixmap(act->icon().pixmap(16, 16), &subOption, widget, HighLightEffect::BothDefaultAndHighlit))); --// } --// } --// if (QAction *clearAction = widget->findChild<QAction *>(QLatin1String("_q_qlineeditclearaction"))) { --// QStyleOption subOption = *option; --// QColor color = subOption.palette.color(QPalette::Text); --// color.setAlphaF(1.0); --// subOption.palette.setColor(QPalette::Text, color); --// clearAction->setIcon(QIcon(HighLightEffect::ordinaryGeneratePixmap(clearAction->icon().pixmap(16, 16), &subOption, widget, HighLightEffect::BothDefaultAndHighlit))); --// } -- } -- -- // Conflict with qspinbox and so on, The widget text cannot use this style -- if (widget) { -- if (widget->parentWidget()) -- if (widget->parentWidget()->inherits("QDoubleSpinBox") || widget->parentWidget()->inherits("QSpinBox") -- || widget->parentWidget()->inherits("QComboBox") || widget->parentWidget()->inherits("QDateTimeEdit")) -- { -- return; -- } -- } -- -- if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(option)) { -- sp->initLineEditParameters(isUseDarkPalette(), option, widget); -- const bool enable = f->state & State_Enabled; -- const bool hover = f->state & State_MouseOver; -- const bool focus = f->state & State_HasFocus; -- int width = 0; -- -- if (!enable) { -- width = sp->lineEditParameters.lineEditDisablePen.width(); -- painter->save(); -- if(sp->lineEditParameters.radius != 0) -- painter->setRenderHint(QPainter::Antialiasing, true); -- if(width == 1 && sp->lineEditParameters.radius != 0) -- painter->translate(0.5, 0.5); -- painter->setPen(sp->lineEditParameters.lineEditDisablePen); -- painter->setBrush(sp->lineEditParameters.lineEditDisableBrush); -- painter->drawRoundedRect(option->rect.adjusted(width, width, -width, -width), -- sp->lineEditParameters.radius, sp->lineEditParameters.radius); -- painter->restore(); -- return; -- } -- --// //read only mode --// if (f->state & State_ReadOnly) { --// painter->save(); --// painter->setRenderHint(QPainter::Antialiasing, true); --// painter->setPen(Qt::NoPen); --// painter->setBrush(f->palette.brush(QPalette::Active, QPalette::Button)); --// painter->drawRoundedRect(option->rect, sp->radius, sp->radius); --// painter->restore(); --// return; --// } -- -- painter->save(); -- if(sp->lineEditParameters.radius != 0) -- painter->setRenderHint(QPainter::Antialiasing, true); -- if (focus) { -- width = sp->lineEditParameters.lineEditFocusPen.width(); -- painter->setPen(sp->lineEditParameters.lineEditFocusPen); -- painter->setBrush(sp->lineEditParameters.lineEditFocusBrush); -- painter->drawRoundedRect(option->rect.adjusted(width/2, width/2, -1 * width/2, -1 * width/2), -- sp->lineEditParameters.radius, sp->lineEditParameters.radius); -- painter->restore(); -- } else if (hover) { -- width = sp->lineEditParameters.lineEditHoverPen.width(); -- painter->setPen(sp->lineEditParameters.lineEditHoverPen); -- painter->setBrush(sp->lineEditParameters.lineEditHoverBrush); -- } else { -- width = sp->lineEditParameters.lineEditDefaultPen.width(); -- painter->setPen(sp->lineEditParameters.lineEditDefaultPen); -- painter->setBrush(sp->lineEditParameters.lineEditDefaultBrush); -- } -- if(width == 1 && sp->lineEditParameters.radius != 0) -- painter->translate(0.5, 0.5); -- painter->drawRoundedRect(option->rect.adjusted(width, width, -width, -width), -- sp->lineEditParameters.radius, sp->lineEditParameters.radius); -- -- painter->restore(); -- -- return; -- } -- break; -- } -- -- case PE_IndicatorArrowUp: -- { -- QIcon icon = QIcon::fromTheme("ukui-up-symbolic"); -- if(sp->m_isTableMode){ -- if(qobject_cast<const QSpinBox *>(widget)) -- { -- icon = QIcon::fromTheme("list-add-symbolic"); -- } -- else if(qobject_cast<const QDoubleSpinBox *>(widget)) -- { -- icon = QIcon::fromTheme("list-add-symbolic"); -- } -- } -- -- if(!icon.isNull()) { -- int indWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); -- int indHight = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); -- QSize iconsize(indWidth, indHight); -- QRect drawRect(option->rect.topLeft(), iconsize); -- drawRect.moveCenter(option->rect.center()); -- const bool enable(option->state & State_Enabled); -- QIcon::Mode mode = enable ? QIcon::Normal : QIcon::Disabled; -- QPixmap pixmap = icon.pixmap(iconsize, mode, QIcon::Off); -- pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); -- QPixmap target; -- if(widget != nullptr && (widget->inherits("QDoubleSpinBox") || widget->inherits("QSpinBox")) && !sp->spinBoxParameters.spinBoxUpIconHightPixMap) -- target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -- else if(!sp->indicatorIconHoverNeedHighLight) -- target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -- else -- target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -- painter->save(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- painter->drawPixmap(drawRect, target); -- painter->restore(); -- return; -- } -- break; -- } -- -- case PE_IndicatorArrowDown: -- { -- double rotate = 0.0; -- bool startAnimation = false; -- if(auto treeview = qobject_cast<const QTreeView *>(widget)){ -- if(!m_tree_animation_helper) -- break; -- 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()){ -- rotate = animator->value("expand").toDouble(); -- -- if(animator->value("expand").toDouble() == 1){ -- animator->setAnimatorCurrentTime("expand", 0); -- animator->stopAnimator("expand"); -- } -- startAnimation = true; --// qDebug() << "PE_IndicatorArrowDown expand...." << rotate; -- } -- } -- } -- QIcon icon = QIcon::fromTheme("ukui-down-symbolic"); -- if(sp->m_isTableMode){ -- if(qobject_cast<const QSpinBox *>(widget)) -- { -- icon = QIcon::fromTheme("list-remove-symbolic"); -- } -- else if(qobject_cast<const QDoubleSpinBox *>(widget)) -- { -- icon = QIcon::fromTheme("list-remove-symbolic"); -- } -- } -- -- if(!icon.isNull()) { -- int indWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); -- int indHight = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); -- QSize iconsize(indWidth, indHight); -- QRect drawRect(option->rect.topLeft(), iconsize); -- drawRect.moveCenter(option->rect.center()); -- const bool enable(option->state & State_Enabled); -- QIcon::Mode mode = enable ? QIcon::Normal : QIcon::Disabled; -- QPixmap pixmap = icon.pixmap(iconsize, mode, QIcon::Off); -- pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); -- QPixmap target; -- if(widget != nullptr && (widget->inherits("QDoubleSpinBox") || widget->inherits("QSpinBox")) && !sp->spinBoxParameters.spinBoxUpIconHightPixMap) -- target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -- else if(!sp->indicatorIconHoverNeedHighLight) -- target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -- else -- target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -- painter->save(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- if(startAnimation){ -- QMatrix matrix; -- int i = 90.0 * (rotate - 1.0); -- matrix.rotate(i); -- -- target = target.scaled(iconsize.width(), iconsize.height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); --// painter->rotate(i); -- auto pix = target.transformed(matrix); -- QRect rect = QRect(drawRect.x() - (pix.rect().width() - drawRect.width()) / 2, drawRect.y() - (pix.rect().height() - drawRect.height()) / 2, -- pix.rect().width(), pix.rect().height()); -- pix = pix.scaled(rect.width(), rect.height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); -- painter->drawPixmap(rect, pix); -- } -- else -- painter->drawPixmap(drawRect, target); -- painter->restore(); -- return; -- } -- break; -- } -- -- case PE_IndicatorArrowRight: -- { -- double rotate = 0.0; -- bool startAnimation = false; -- if(auto treeview = qobject_cast<const QTreeView *>(widget)){ -- if(!m_tree_animation_helper) -- break; -- auto animator = m_tree_animation_helper->animator(treeview); -- if(animator){ -- if(animator && animator->isRunning("collaps") && -- QString::number(treeview->indexAt(option->rect.center()).internalId()) == animator->getExtraProperty("collapsItem").toString()){ -- rotate = animator->value("collaps").toDouble(); -- if(animator->value("collaps").toDouble() == 1){ -- animator->setAnimatorCurrentTime("collaps", 0); -- animator->stopAnimator("collaps"); -- } -- startAnimation = true; --// qDebug() << "PE_IndicatorArrowRight expand...." << rotate; -- } -- } -- } -- QIcon icon = QIcon::fromTheme("ukui-end-symbolic"); -- if(widget && widget->parent() && widget->parentWidget()->inherits("QTabBar") && -- sp->getTabBarIndicatorLayout() != UKUIStyleParameters::TabBarIndicatorLayout::TabBarIndicator_Horizontal) -- icon = QIcon::fromTheme("ukui-down-symbolic"); -- -- if(!icon.isNull()) { -- int indWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); -- int indHight = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); -- QSize iconsize(indWidth, indHight); -- QRect drawRect(option->rect.topLeft(), iconsize); -- drawRect.moveCenter(option->rect.center()); -- const bool enable(option->state & State_Enabled); -- QIcon::Mode mode = enable ? QIcon::Normal : QIcon::Disabled; -- QPixmap pixmap = icon.pixmap(iconsize, mode, QIcon::Off); -- pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); -- QPixmap target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -- if(widget && !widget->inherits("QMenu") && !sp->indicatorIconHoverNeedHighLight) -- target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -- painter->save(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- if(startAnimation){ -- QMatrix matrix; -- int i = 90.0 * (1.0 - rotate); --// qDebug() << "PE_IndicatorArrowRight i........." << i; -- matrix.rotate(i); -- -- target = target.scaled(iconsize.width(), iconsize.height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); --// painter->rotate(i); -- auto pix = target.transformed(matrix); -- QRect rect = QRect(drawRect.x() - (pix.rect().width() - drawRect.width()) / 2, drawRect.y() - (pix.rect().height() - drawRect.height()) / 2, -- pix.rect().width(), pix.rect().height()); -- pix = pix.scaled(rect.width(), rect.height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); -- painter->drawPixmap(rect, pix); -- } -- else -- painter->drawPixmap(drawRect, target); -- painter->restore(); -- return; -- } -- break; -- } -- -- case PE_IndicatorArrowLeft: -- { -- QIcon icon = QIcon::fromTheme("ukui-start-symbolic"); -- if(widget && widget->parent() && widget->parentWidget()->inherits("QTabBar") && -- sp->getTabBarIndicatorLayout() != UKUIStyleParameters::TabBarIndicatorLayout::TabBarIndicator_Horizontal) -- icon = QIcon::fromTheme("ukui-up-symbolic"); -- -- if(!icon.isNull()) { -- int indWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); -- int indHight = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); -- QSize iconsize(indWidth, indHight); -- QRect drawRect(option->rect.topLeft(), iconsize); -- drawRect.moveCenter(option->rect.center()); -- const bool enable(option->state & State_Enabled); -- QIcon::Mode mode = enable ? QIcon::Normal : QIcon::Disabled; -- QPixmap pixmap = icon.pixmap(iconsize, mode, QIcon::Off); -- pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); -- QPixmap target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -- if(!sp->indicatorIconHoverNeedHighLight) -- target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -- painter->save(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- painter->drawPixmap(drawRect, target); -- painter->restore(); -- return; -- } -- break; -- } -- -- case PE_IndicatorRadioButton: -- { -- if (const QStyleOptionButton* radiobutton = qstyleoption_cast<const QStyleOptionButton*>(option)) { -- sp->initRadioButtonParameters(isUseDarkPalette(), option, widget); -- -- QRectF rect = radiobutton->rect.adjusted(1, 1, -1, -1); -- bool enable = radiobutton->state & State_Enabled; -- bool mouseOver = radiobutton->state & State_MouseOver; -- bool sunKen = radiobutton->state & State_Sunken; -- bool on = radiobutton->state & State_On; -- -- painter->save(); -- painter->setRenderHint(QPainter::Antialiasing, true); -- -- auto animator = m_radiobutton_animation_helper->animator(widget); -- bool hasAnimation = widget &&(!widget->property("animation").isValid() || -- (widget->property("animation").isValid() && widget->property("animation").toBool())); -- -- if (enable && hasAnimation && -- animator != nullptr && animator->isRunning("SunKenOn")) { -- float value = animator->value("SunKenOn").toFloat(); -- QColor clickColor = sp->radioButtonParameters.radioButtonClickBrush.color(); -- QColor onDefaultPenColor = mouseOver ? sp->radioButtonParameters.radioButtonOnHoverPen.color() : -- sp->radioButtonParameters.radioButtonOnDefaultPen.color(); -- QColor onDefaultColor = mouseOver ? sp->radioButtonParameters.radioButtonOnHoverBrush.color() : -- sp->radioButtonParameters.radioButtonOnDefaultBrush.color(); -- QColor frameColor = mouseOver ? sp->radioButtonParameters.radioButtonHoverPen.color() : -- sp->radioButtonParameters.radioButtonDefaultPen.color(); -- QBrush brush(QColor(clickColor.red() + value * (onDefaultColor.red() - clickColor.red()), -- clickColor.green() + value * (onDefaultColor.green() - clickColor.green()), -- clickColor.blue() + value * (onDefaultColor.blue() - clickColor.blue()))); -- QBrush frameBrush(QColor(frameColor.red() + value * (onDefaultPenColor.red() - frameColor.red()), -- frameColor.green() + value * (onDefaultPenColor.green() - frameColor.green()), -- frameColor.blue() + value * (onDefaultPenColor.blue() - frameColor.blue()))); -- QColor penColor = frameBrush.color(); --// qDebug()<<"onDefaultPenColor......." << onDefaultPenColor.red() << onDefaultPenColor.green() << onDefaultPenColor.blue() << onDefaultPenColor.alphaF(); -- penColor.setAlphaF(onDefaultPenColor.alphaF()); -- painter->setPen(QPen(QBrush(penColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); -- -- painter->setBrush(brush); -- painter->drawEllipse(rect); -- painter->restore(); -- painter->save(); -- -- QRectF childRect(rect.x(), rect.y(), value * 1.0 * ( sp->radioButtonParameters.childrenRadius), value * 1.0 * ( sp->radioButtonParameters.childrenRadius)); -- childRect.moveCenter(rect.center()); -- painter->setPen(Qt::NoPen); -- painter->setRenderHint(QPainter::Antialiasing); -- painter->setBrush(sp->radioButtonParameters.radioButtonChildrenOnDefaultBrush); -- painter->drawEllipse(childRect); -- painter->restore(); -- return; -- } -- else if (enable && hasAnimation && -- animator != nullptr && animator->isRunning("Off")) { -- float value = animator->value("Off").toFloat(); --// qDebug() << "off SunKenOn value......" << qobject_cast<const QRadioButton *>(widget)->text() << value; -- QPen pen = sp->radioButtonParameters.radioButtonDefaultPen; -- pen.color().setAlphaF(sp->radioButtonParameters.radioButtonDefaultPen.color().alphaF() * (1.0 - value)); -- painter->setPen(pen); -- QColor defaultColor = sp->radioButtonParameters.radioButtonDefaultBrush.color(); -- QColor onDefaultColor = sp->radioButtonParameters.radioButtonOnDefaultBrush.color(); -- QBrush brush(QColor(defaultColor.red() + value * (onDefaultColor.red() - defaultColor.red()), -- defaultColor.green() + value * (onDefaultColor.green() - defaultColor.green()), -- defaultColor.blue() + value * (onDefaultColor.blue() - defaultColor.blue()))); -- -- painter->setBrush(brush); -- painter->drawEllipse(rect); -- QRectF childRect(rect.x(), rect.y(), ( sp->radioButtonParameters.childrenRadius) * (value) * 1.0, (value) * 1.0 * ( sp->radioButtonParameters.childrenRadius)); -- childRect.moveCenter(rect.center()); -- painter->setPen(Qt::NoPen); -- painter->setRenderHint(QPainter::Antialiasing); -- painter->setBrush(sp->radioButtonParameters.radioButtonChildrenOnDefaultBrush); -- painter->drawEllipse(childRect); -- painter->restore(); -- return; -- } -- -- if (enable) { -- if (on) { -- if (animator != nullptr) { -- if (hasAnimation && !animator->isRunning("SunKenOn") ) { -- // qDebug() << "SunKenOn time....:" << qobject_cast<const QRadioButton *>(widget)->text() << animator->currentAnimatorTime("SunKenOn"); -- if(animator->currentAnimatorTime("SunKenOn") == 0){ -- animator->startAnimator("SunKenOn"); -- animator->setAnimatorCurrentTime("Off", 0); --// qDebug() << "startAnimator SunKenOn......" << qobject_cast<const QRadioButton *>(widget)->text() << animator->currentAnimatorTime("Off"); -- painter->setPen(sp->radioButtonParameters.radioButtonDefaultPen); -- painter->setBrush(sp->radioButtonParameters.radioButtonDefaultBrush); -- painter->drawEllipse(rect); -- painter->restore(); -- return; -- } -- } -- } -- if (sunKen) { -- painter->setPen(sp->radioButtonParameters.radioButtonOnClickPen); -- painter->setBrush(sp->radioButtonParameters.radioButtonOnClickBrush); -- } else if (mouseOver) { -- painter->setPen(sp->radioButtonParameters.radioButtonOnHoverPen); -- painter->setBrush(sp->radioButtonParameters.radioButtonOnHoverBrush); -- } else { -- painter->setPen(sp->radioButtonParameters.radioButtonOnDefaultPen); -- painter->setBrush(sp->radioButtonParameters.radioButtonOnDefaultBrush); -- } -- painter->drawEllipse(rect); -- painter->restore(); -- painter->save(); -- QRectF childRect(rect.x(), rect.y(), sp->radioButtonParameters.childrenRadius, sp->radioButtonParameters.childrenRadius); -- childRect.moveCenter(rect.center()); -- painter->setPen(Qt::NoPen); -- painter->setRenderHint(QPainter::Antialiasing); -- painter->setBrush(sp->radioButtonParameters.radioButtonChildrenOnDefaultBrush); -- painter->drawEllipse(childRect); -- -- painter->restore(); -- return; -- } else { -- if (hasAnimation && animator != nullptr) { -- if (!animator->isRunning("Off") && animator->currentAnimatorTime("SunKenOn") > 0 && animator->currentAnimatorTime("Off") == 0) { -- animator->startAnimator("Off"); -- animator->setAnimatorCurrentTime("SunKenOn", 0); -- painter->restore(); -- return; -- } -- } -- if (sunKen) { -- painter->setPen(sp->radioButtonParameters.radioButtonClickPen); -- painter->setBrush(sp->radioButtonParameters.radioButtonClickBrush); -- } else if (mouseOver) { -- painter->setPen(sp->radioButtonParameters.radioButtonHoverPen); -- painter->setBrush(sp->radioButtonParameters.radioButtonHoverBrush); -- } else { -- painter->setPen(sp->radioButtonParameters.radioButtonDefaultPen); -- painter->setBrush(sp->radioButtonParameters.radioButtonDefaultBrush); -- } -- painter->drawEllipse(rect); -- } -- } else { -- painter->setPen(sp->radioButtonParameters.radioButtonDisablePen); -- painter->setBrush(sp->radioButtonParameters.radioButtonDisableBrush); -- painter->drawEllipse(rect); -- -- if (on) { -- QRectF childRect(rect.x(), rect.y(), sp->radioButtonParameters.childrenRadius, sp->radioButtonParameters.childrenRadius); -- childRect.moveCenter(rect.center()); -- painter->setPen(Qt::NoPen); -- painter->setBrush(sp->radioButtonParameters.radioButtonChildrenOnDisableBrush); -- painter->drawEllipse(childRect); -- } -- } -- painter->restore(); -- return; -- } -- break; -- } -- -- case PE_IndicatorCheckBox: -- { -- if (const QStyleOptionButton *checkbox = qstyleoption_cast<const QStyleOptionButton*>(option)) { -- sp->initCheckBoxParameters(isUseDarkPalette(), option, widget); -- bool enable = checkbox->state & State_Enabled; -- bool mouseOver = checkbox->state & State_MouseOver; -- bool sunKen = checkbox->state & State_Sunken; -- bool on = checkbox->state & State_On; -- bool noChange = checkbox->state & State_NoChange; -- -- QRectF rect = checkbox->rect; -- QRectF pathrect = rect.adjusted(1, 1, -1, -1); -- double width = pathrect.width(); -- double heigth = pathrect.height(); -- int margin = 0; -- -- QPainterPath path; -- painter->save(); -- painter->setClipRect(rect); -- if(sp->checkBoxParameters.radius != 0) -- painter->setRenderHint(QPainter::Antialiasing); -- -- auto animator = m_checkbox_animation_helper->animator(widget); -- bool hasAnimation = widget &&(!widget->property("animation").isValid() || -- (widget->property("animation").isValid() && widget->property("animation").toBool())); -- -- if (hasAnimation && animator != nullptr) { -- if(animator->isRunning("OnBase")) -- { -- float value = animator->value("OnBase").toFloat(); --// qDebug() << "onBase.....value:" << value; -- margin = sp->checkBoxParameters.checkBoxDefaultPen.width(); -- -- QColor onDefaultColor = mouseOver ? (!sp->checkBoxParameters.onHoverBrushIslinearGradient ? -- sp->checkBoxParameters.checkBoxOnHoverBrush.color() : -- sp->checkBoxParameters.checkBoxOnDefaultBrush.color()) : -- sp->checkBoxParameters.checkBoxOnDefaultBrush.color(); -- QColor clickColor = sp->checkBoxParameters.checkBoxClickBrush.color(); -- QColor frameColor = sp->checkBoxParameters.checkBoxHoverPen.color(); -- QColor onDefaultPenColor = mouseOver ? sp->checkBoxParameters.checkBoxOnHoverPen.color() : sp->checkBoxParameters.checkBoxOnDefaultPen.color(); -- QBrush brush(QColor(clickColor.red() + value * (onDefaultColor.red() - clickColor.red()), -- clickColor.green() + value * (onDefaultColor.green() - clickColor.green()), -- clickColor.blue() + value * (onDefaultColor.blue() - clickColor.blue()))); -- QBrush frameBrush(QColor(frameColor.red() + value * (onDefaultPenColor.red() - frameColor.red()), -- frameColor.green() + value * (onDefaultPenColor.green() - frameColor.green()), -- frameColor.blue() + value * (onDefaultPenColor.blue() - frameColor.blue()))); -- -- QColor penColor = frameBrush.color(); -- penColor.setAlphaF(frameColor.alphaF()); -- painter->setPen(QPen(QBrush(penColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));//sp->checkBoxParameters.checkBoxDefaultPen); -- painter->setBrush(brush); -- if(painter->pen().width() == 1 && sp->checkBoxParameters.radius != 0) -- painter->translate(0.5, 0.5); -- painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), sp->checkBoxParameters.radius, sp->checkBoxParameters.radius); -- painter->restore(); -- painter->save(); -- } -- else if (animator->isRunning("OnScale")) { -- margin = sp->checkBoxParameters.checkBoxOnDefaultPen.width(); -- painter->setBrush(mouseOver ? sp->checkBoxParameters.checkBoxOnHoverBrush : sp->checkBoxParameters.checkBoxOnDefaultBrush); -- painter->setPen(mouseOver ? sp->checkBoxParameters.checkBoxOnHoverPen.color() : sp->checkBoxParameters.checkBoxOnDefaultPen.color()); -- if(painter->pen().width() == 1 && sp->checkBoxParameters.radius != 0) -- painter->translate(0.5, 0.5); -- painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), sp->checkBoxParameters.radius, sp->checkBoxParameters.radius); -- painter->restore(); -- painter->save(); -- } -- } -- -- -- if (animator != nullptr) { -- if(hasAnimation && animator->isRunning("OnOpacity")) -- { -- float value = animator->value("OnOpacity").toFloat(); -- --// qDebug() << "OnOpacity.....value00000:" << value; -- if (on) { -- QBrush brush = sp->checkBoxParameters.checkBoxContentPen.brush(); -- QColor color = brush.color(); -- color.setAlphaF(value); -- brush.setColor(color); -- painter->setPen(QPen(brush, 1.5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); -- } else if (noChange) { -- QBrush brush = sp->checkBoxParameters.checkBoxContentPen.brush(); -- QColor color = brush.color(); -- color.setAlphaF(value); -- brush.setColor(color); -- painter->setPen(QPen(brush, 2)); -- } -- } -- else{ -- if (on) { -- painter->setPen(QPen(sp->checkBoxParameters.checkBoxContentPen.brush(), 1.5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); -- } else if (noChange) { -- painter->setPen(QPen(sp->checkBoxParameters.checkBoxContentPen.brush(), 2)); -- } -- } -- } -- -- if (hasAnimation && animator != nullptr && animator->isRunning("OnScale")) { -- float value = animator->value("OnScale").toFloat(); -- if (on) { -- path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.top() + heigth / 2); -- path.lineTo(pathrect.left() + width * 0.45, pathrect.bottom() - heigth / 3 - (1.0 - value) * heigth /8); -- path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0, pathrect.top() + heigth / 3 + (1.0 - value) * heigth /6); -- animator->setExtraProperty("nochange", false); -- } else if (noChange) { -- path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.center().y() - 0.5); -- path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0 , pathrect.center().y() - 0.5); -- animator->setExtraProperty("nochange", true); -- } -- painter->setBrush(Qt::NoBrush); -- painter->drawPath(path); -- painter->restore(); -- return; -- } -- -- if(path.isEmpty()) -- { -- if (on) { -- path.moveTo(pathrect.left() + width / 4, pathrect.top() + heigth / 2); -- path.lineTo(pathrect.left() + width * 0.45, pathrect.bottom() - heigth / 3); -- path.lineTo(pathrect.right() - width / 4, pathrect.top() + heigth / 3); -- if(animator != nullptr) -- animator->setExtraProperty("nochange", false); -- } else if (noChange) { -- path.moveTo(pathrect.left() + width / 4, pathrect.center().y()); -- path.lineTo(pathrect.right() - width / 4, pathrect.center().y()); -- if(animator != nullptr) -- animator->setExtraProperty("nochange", true); -- } -- } -- -- if (hasAnimation && animator != nullptr && animator->isRunning("Off")) { -- float value = animator->value("Off").toFloat(); --// qDebug() << "Off.....value:" << value; -- -- margin = sp->checkBoxParameters.checkBoxDefaultPen.width(); -- QPen pen = mouseOver ? sp->checkBoxParameters.checkBoxHoverPen : sp->checkBoxParameters.checkBoxDefaultPen; -- pen.color().setAlphaF(sp->checkBoxParameters.checkBoxDefaultPen.color().alphaF() * (1.0 - value)); -- painter->setPen(pen); -- QColor defaultColor = mouseOver ? sp->checkBoxParameters.checkBoxHoverBrush.color() : sp->checkBoxParameters.checkBoxDefaultBrush.color(); -- QColor onDefaultColor = sp->checkBoxParameters.checkBoxOnDefaultBrush.color(); -- QBrush brush(QColor(defaultColor.red() + value * (onDefaultColor.red() - defaultColor.red()), -- defaultColor.green() + value * (onDefaultColor.green() - defaultColor.green()), -- defaultColor.blue() + value * (onDefaultColor.blue() - defaultColor.blue()))); -- // qDebug() << "sunkenon brush...." << brush.color().red() << brush.color().green() << brush.color().blue(); -- painter->setBrush(brush); -- if(painter->pen().width() == 1 && sp->checkBoxParameters.radius != 0) -- painter->translate(0.5, 0.5); -- painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), sp->checkBoxParameters.radius, sp->checkBoxParameters.radius); -- painter->restore(); -- painter->save(); -- bool _nochange = animator->getExtraProperty("noChange").toBool(); --// qDebug() << "_nochange.........." << _nochange; -- if (!_nochange) { --// qDebug() << "off ......on,,,,,,,,,,,"; -- path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.top() + heigth / 2); -- path.lineTo(pathrect.left() + width * 0.45, pathrect.bottom() - heigth / 3 - (1.0 - value) * heigth /8); -- path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0, pathrect.top() + heigth / 3 + (1.0 - value) * heigth /6); -- -- QBrush brush = sp->checkBoxParameters.checkBoxContentPen.brush(); -- QColor color = brush.color(); -- color.setAlphaF(value); -- brush.setColor(color); -- painter->setPen(QPen(brush, 1.5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); -- painter->setRenderHint(QPainter::Antialiasing, true); -- -- } else if (_nochange) { --// qDebug() << "off ......noChange,,,,,,,,,,,"; -- -- path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.center().y()); -- path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0 , pathrect.center().y()); -- -- QBrush brush = sp->checkBoxParameters.checkBoxContentPen.brush(); -- QColor color = brush.color(); -- color.setAlphaF(value); -- brush.setColor(color); -- painter->setPen(QPen(brush, 2)); -- } -- -- painter->setBrush(Qt::NoBrush); -- painter->drawPath(path); -- painter->restore(); -- return; -- } -- -- if (enable) { -- if (on | noChange) { -- if(hasAnimation && animator != nullptr) -- { -- if(!animator->isRunning("OnBase") && animator->currentAnimatorTime("OnBase") == 0) -- { -- animator->startAnimator("OnBase"); -- } -- if(!animator->isRunning("OnOpacity") && animator->currentAnimatorTime("OnOpacity") == 0) -- { -- animator->startAnimator("OnOpacity"); -- } -- if(!animator->isRunning("OnScale") && animator->currentAnimatorTime("OnScale") == 0) -- { -- animator->startAnimator("OnScale"); -- margin = sp->checkBoxParameters.checkBoxDefaultPen.width(); -- painter->setPen(sp->checkBoxParameters.checkBoxClickPen); -- painter->setBrush(sp->checkBoxParameters.checkBoxClickBrush); -- --// qDebug() << "start onscale............"; --// painter->setPen(sp->checkBoxParameters.checkBoxDefaultPen); --// painter->setBrush(Qt::yellow);//sp->checkBoxParameters.checkBoxHoverPen); -- if(painter->pen().width() == 1 && sp->checkBoxParameters.radius != 0) -- painter->translate(0.5, 0.5); -- painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), sp->checkBoxParameters.radius, sp->checkBoxParameters.radius); -- painter->restore(); -- animator->setAnimatorCurrentTime("Off", 0); -- animator->setExtraProperty("nochange", false); -- return; -- } -- } -- if (sunKen) { -- margin = sp->checkBoxParameters.checkBoxOnClickPen.width(); -- painter->setPen(sp->checkBoxParameters.checkBoxOnClickPen); -- painter->setBrush(sp->checkBoxParameters.checkBoxOnClickBrush); -- } else if (mouseOver) { -- margin = sp->checkBoxParameters.checkBoxOnHoverPen.width(); -- painter->setPen(sp->checkBoxParameters.checkBoxOnHoverPen); -- painter->setBrush(sp->checkBoxParameters.checkBoxOnHoverBrush); -- } else { -- margin = sp->checkBoxParameters.checkBoxOnDefaultPen.width(); -- painter->setPen(sp->checkBoxParameters.checkBoxOnDefaultPen); -- painter->setBrush(sp->checkBoxParameters.checkBoxOnDefaultBrush); -- } -- if(painter->pen().width() == 1 && sp->checkBoxParameters.radius != 0) -- painter->translate(0.5, 0.5); -- painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), -- sp->checkBoxParameters.radius, sp->checkBoxParameters.radius); -- painter->restore(); -- painter->save(); -- //draw path -- if (on) { -- painter->setPen(QPen(sp->checkBoxParameters.checkBoxPathBrush, 1.5, -- Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); -- painter->setRenderHint(QPainter::Antialiasing, true); -- } else if (noChange) { -- painter->setPen(QPen(sp->checkBoxParameters.checkBoxPathBrush, 2)); -- } -- painter->setBrush(Qt::NoBrush); -- painter->drawPath(path); -- } else { -- if (animator != nullptr) { -- if(hasAnimation && !animator->isRunning("Off") && -- animator->currentAnimatorTime("Off") == 0 && -- animator->currentAnimatorTime("OnScale") > 0 && -- animator->currentAnimatorTime("OnOpacity") > 0 && -- animator->currentAnimatorTime("OnBase") > 0) { -- animator->startAnimator("Off"); -- animator->setAnimatorCurrentTime("OnScale", 0); -- animator->setAnimatorCurrentTime("OnOpacity", 0); -- animator->setAnimatorCurrentTime("OnBase", 0); -- painter->restore(); -- return; -- } -- } -- if (sunKen) { -- margin = sp->checkBoxParameters.checkBoxClickPen.width(); -- painter->setPen(sp->checkBoxParameters.checkBoxClickPen); -- painter->setBrush(sp->checkBoxParameters.checkBoxClickBrush); -- } else if (mouseOver) { -- margin = sp->checkBoxParameters.checkBoxHoverPen.width(); -- painter->setPen(sp->checkBoxParameters.checkBoxHoverPen); -- painter->setBrush(sp->checkBoxParameters.checkBoxHoverBrush); -- } else { -- margin = sp->checkBoxParameters.checkBoxDefaultPen.width(); -- painter->setPen(sp->checkBoxParameters.checkBoxDefaultPen); -- painter->setBrush(sp->checkBoxParameters.checkBoxDefaultBrush); -- } -- if(painter->pen().width() == 1 && sp->checkBoxParameters.radius != 0) -- painter->translate(0.5, 0.5); -- painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), -- sp->checkBoxParameters.radius, sp->checkBoxParameters.radius); -- } -- } else { -- margin = sp->checkBoxParameters.checkBoxDisablePen.width(); -- painter->setPen(sp->checkBoxParameters.checkBoxDisablePen); -- painter->setBrush(sp->checkBoxParameters.checkBoxDisableBrush); -- if(painter->pen().width() == 1 && sp->checkBoxParameters.radius != 0) -- painter->translate(0.5, 0.5); -- painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), -- sp->checkBoxParameters.radius, sp->checkBoxParameters.radius); -- painter->restore(); -- painter->save(); -- if (on | noChange) { -- if (on) { -- painter->setPen(QPen(checkbox->palette.brush(QPalette::Disabled, QPalette::ButtonText), 1.5, -- Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); -- } else if (noChange) { -- painter->setPen(QPen(checkbox->palette.brush(QPalette::Disabled, QPalette::ButtonText), 2)); -- } -- painter->setBrush(Qt::NoBrush); -- painter->drawPath(path); -- } -- } -- painter->restore(); -- return; -- } -- break; -- } -- -- case PE_IndicatorTabTearLeft: -- return; -- -- case PE_IndicatorTabTearRight: -- return; -- -- case PE_PanelScrollAreaCorner: -- { -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setBrush(option->palette.brush(QPalette::Active, QPalette::Base)); -- painter->drawRect(option->rect); -- painter->restore(); -- return; -- } -- -- case PE_IndicatorHeaderArrow: -- { -- if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) { -- if (header->sortIndicator == QStyleOptionHeader::SortDown) -- return proxy()->drawPrimitive(PE_IndicatorArrowDown, header, painter, widget); -- if (header->sortIndicator == QStyleOptionHeader::SortUp) -- return proxy()->drawPrimitive(PE_IndicatorArrowUp, header, painter, widget); -- } -- break; -- } -- -- case PE_PanelItemViewRow: -- { -- if (const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option)) { -- QPalette::ColorGroup cg = (widget ? widget->isEnabled() : (vi->state & QStyle::State_Enabled)) -- ? QPalette::Normal : QPalette::Disabled; -- if (cg == QPalette::Normal && !(vi->state & QStyle::State_Active)) -- cg = QPalette::Inactive; -- -- int Radius = 0;//sp->radius; -- bool isTree = false; -- -- if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) { -- isTree = true; -- } -- -- if (isTree) { -- if (proxy()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, option, widget)) { -- if (vi->features & QStyleOptionViewItem::Alternate) { -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setBrush(vi->palette.brush(cg, QPalette::AlternateBase)); -- painter->drawRect(vi->rect); -- painter->restore(); -- } -- } -- } else if (vi->features & QStyleOptionViewItem::Alternate) { -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setBrush(vi->palette.brush(cg, QPalette::AlternateBase)); -- painter->drawRoundedRect(vi->rect, Radius, Radius); -- painter->restore(); -- } -- return; -- } -- break; -- } -- -- case PE_PanelItemViewItem: -- { -- if (const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option)) { -- bool isIconMode = false; -- const bool enable = vi->state & State_Enabled; -- const bool select = vi->state & State_Selected; -- const bool hover = vi->state & State_MouseOver; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush selectBrush; -- QBrush disableBrush; -- QPen hoverPen = Qt::NoPen; -- QPen selectPen = Qt::NoPen; -- QPainterPath path; -- QPainterPath borderPath0; -- QPainterPath borderPath1; -- QPainterPath borderPath2; -- -- bool isList = false; -- bool isTable = false; -- bool isTree = false; -- if(qobject_cast<const QListView *>(widget) || qobject_cast<const QListWidget *>(widget)) -- isList = true; -- if(qobject_cast<const QTableView *>(widget) || qobject_cast<const QTableWidget *>(widget)) -- isTable = true; -- if(qobject_cast<const QTreeView *>(widget) || qobject_cast<const QTreeView *>(widget)) -- isTree = true; -- -- if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) { -- sp->initTreeParameters(isUseDarkPalette(), option, widget); -- -- defaultBrush = sp->treeParameters.treeDefaultBrush; -- hoverBrush = sp->treeParameters.treeHoverBrush; -- selectBrush = sp->treeParameters.treeSelectBrush; -- disableBrush = sp->treeParameters.treeDisableBrush; -- hoverPen = sp->treeParameters.treeHoverPen; -- selectPen = sp->treeParameters.treeSelectPen; -- -- int borderWidth = hoverPen.width(); -- -- if (vi->viewItemPosition == QStyleOptionViewItem::Beginning) { -- if(vi->rect.left() == 0) { -- QRect rect = vi->rect.adjusted(0, 0, 1, 1); -- path.moveTo(rect.left(), rect.top() + sp->treeParameters.radius); -- path.arcTo(rect.left(), rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 180, -90); -- path.lineTo(rect.right(), rect.top()); -- path.lineTo(rect.right(), rect.bottom()); -- path.lineTo(rect.left() + sp->treeParameters.radius, rect.bottom()); -- path.arcTo(rect.left(), rect.bottom() - 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, -90, -90); -- path.lineTo(rect.left(), rect.top() + sp->treeParameters.radius); -- -- -- borderPath0.moveTo(rect.left(), rect.top() + sp->treeParameters.radius); -- borderPath0.arcTo(rect.left(), rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 180, -90); -- borderPath0.lineTo(rect.right() + borderWidth, rect.top()); -- borderPath1.moveTo(rect.right() + borderWidth, rect.bottom() - 1); -- borderPath1.lineTo(rect.left() + sp->treeParameters.radius, rect.bottom() - 1); -- borderPath1.arcTo(rect.left(), rect.bottom() - 1 - 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, -90, -90); -- borderPath1.lineTo(rect.left(), rect.top() + sp->treeParameters.radius); -- } else { -- path.addRect(vi->rect); -- -- borderPath0.moveTo(vi->rect.left(), vi->rect.top()); -- borderPath0.lineTo(vi->rect.right() + borderWidth, vi->rect.top()); -- borderPath1.moveTo(vi->rect.right() + borderWidth, vi->rect.bottom()); -- borderPath1.lineTo(vi->rect.left(), vi->rect.bottom()); -- } -- } else if (vi->viewItemPosition == QStyleOptionViewItem::Middle) { -- path.addRect(option->rect); -- -- borderPath0.moveTo(option->rect.left(), option->rect.top()); -- borderPath0.lineTo(option->rect.right() + borderWidth, option->rect.top()); -- borderPath1.moveTo(option->rect.left(), option->rect.bottom()); -- borderPath1.lineTo(option->rect.right() + borderWidth, option->rect.bottom()); -- -- } else if (vi->viewItemPosition == QStyleOptionViewItem::End) { -- QRect rect = vi->rect.adjusted(0, 0, 1, 1); -- path.moveTo(rect.left(), rect.top()); -- path.lineTo(rect.right() - sp->treeParameters.radius, rect.top()); -- path.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 90, -90); -- path.lineTo(rect.right(), rect.bottom() - 2 * sp->treeParameters.radius); -- path.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.bottom() - 2 * sp->treeParameters.radius, -- 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 0, -90); -- path.lineTo(rect.left(), rect.bottom()); -- path.lineTo(rect.left(), rect.top()); -- -- borderPath0.moveTo(rect.left(), rect.top()); -- borderPath0.lineTo(rect.right() - sp->treeParameters.radius, rect.top()); -- borderPath0.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 90, -90); -- borderPath2.moveTo(rect.right(), rect.top() + sp->treeParameters.radius); -- borderPath2.lineTo(rect.right(), rect.bottom() -1 - 2 * sp->treeParameters.radius); -- borderPath1.moveTo(rect.right(), rect.bottom() -1 - 2 * sp->treeParameters.radius); -- borderPath1.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.bottom() - 1 - 2 * sp->treeParameters.radius, -- 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 0, -90); -- borderPath1.lineTo(rect.left(), rect.bottom() - 1); -- -- -- } else if (vi->viewItemPosition == QStyleOptionViewItem::OnlyOne) { -- if(vi->rect.left() == 0) { -- path.addRoundedRect(vi->rect, sp->treeParameters.radius, sp->treeParameters.radius); -- -- borderPath0.addRoundedRect(vi->rect, sp->treeParameters.radius, sp->treeParameters.radius); -- } else { -- QRect rect = vi->rect.adjusted(0, 0, 1, 1); -- path.moveTo(rect.left(), rect.top()); -- path.lineTo(rect.right() - sp->treeParameters.radius, rect.top()); -- path.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 90, -90); -- path.lineTo(rect.right(), rect.bottom() - 2 * sp->treeParameters.radius); -- path.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.bottom() - 2 * sp->treeParameters.radius, -- 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 0, -90); -- path.lineTo(rect.left(), rect.bottom()); -- path.lineTo(rect.left(), rect.top()); -- -- borderPath0.moveTo(rect.left(), rect.top()); -- borderPath0.lineTo(rect.right() - sp->treeParameters.radius, rect.top()); -- borderPath0.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 90, -90); -- borderPath2.moveTo(rect.right(), rect.top() + sp->treeParameters.radius); -- borderPath2.lineTo(rect.right(), rect.bottom() -1 - 2 * sp->treeParameters.radius); -- borderPath1.moveTo(rect.right(), rect.bottom() -1 - 2 * sp->treeParameters.radius); -- borderPath1.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.bottom() - 1 - 2 * sp->treeParameters.radius, -- 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 0, -90); -- borderPath1.lineTo(rect.left(), rect.bottom() - 1); -- -- -- } -- } else { -- path.addRect(vi->rect); -- } -- } else if(qobject_cast<const QListView *>(widget) || qobject_cast<const QListWidget *>(widget)){ -- sp->initListParameters(isUseDarkPalette(), option, widget); -- -- defaultBrush = sp->listParameters.listDefaultBrush; -- hoverBrush = sp->listParameters.listHoverBrush; -- selectBrush = sp->listParameters.listSelectBrush; -- disableBrush = sp->listParameters.listDisableBrush; -- hoverPen = sp->listParameters.listHoverPen; -- selectPen = sp->listParameters.listSelectPen; -- -- auto *listView = qobject_cast<const QListView *>(widget); -- if(select && listView != nullptr){ -- -- if(listView == nullptr){ -- path.addRoundedRect(vi->rect, sp->listParameters.radius, sp->listParameters.radius); -- return; -- } -- int currentIndex = vi->index.row(); -- int allNum = listView->model()->rowCount(); -- -- bool begin = false; -- bool end = false; -- bool mid = false; -- bool onlyOne = false; -- if(allNum == 1) -- { -- onlyOne = true; -- } -- else{ -- QList<QModelIndex> selectList = listView->selectionModel()->selectedIndexes(); -- QList<int> selectIndexList; -- foreach (QModelIndex index, selectList) { -- int i = index.row(); -- selectIndexList.append(i); -- } -- if(selectIndexList.contains(currentIndex - 1) && selectIndexList.contains(currentIndex +1) && selectIndexList.contains(currentIndex)) -- mid = true; -- else if(selectIndexList.contains(currentIndex - 1)) -- end = true; -- else if(selectIndexList.contains(currentIndex +1)) -- begin = true; -- } -- -- if(begin){ -- QRect rect = vi->rect; -- path.moveTo(rect.left(), rect.bottom() + 1); -- path.lineTo(rect.left(), rect.top() + sp->listParameters.radius); -- path.arcTo(rect.left(), rect.top(), 2 * sp->listParameters.radius, 2 * sp->listParameters.radius, 180, -90); -- path.lineTo(rect.right() - sp->listParameters.radius, rect.top()); -- path.arcTo(rect.right() - 2 * sp->listParameters.radius, rect.top(), 2 * sp->listParameters.radius, 2 * sp->listParameters.radius, 90, -90); -- path.lineTo(rect.right(), rect.bottom() +1); -- path.lineTo(rect.left(), rect.bottom() + 1); -- } -- else if(mid){ -- QRect rect = vi->rect; -- path.moveTo(rect.left(), rect.bottom() + 1); -- path.lineTo(rect.left(), rect.top()); -- path.lineTo(rect.right(), rect.top()); -- path.lineTo(rect.right(), rect.bottom() +1); -- path.lineTo(rect.left(), rect.bottom() + 1); -- } -- else if(end) -- { -- QRect rect = vi->rect; -- path.moveTo(rect.left(), rect.top()); -- path.lineTo(rect.right(), rect.top()); -- path.lineTo(rect.right(), rect.bottom() - sp->listParameters.radius); -- path.arcTo(rect.right() - 2 * sp->listParameters.radius, rect.bottom() - 2 * sp->listParameters.radius, -- 2 * sp->listParameters.radius, 2 * sp->listParameters.radius, 0, -90); -- path.lineTo(rect.left() + sp->listParameters.radius, rect.bottom()); -- path.arcTo(rect.left(), rect.bottom() - 2 * sp->listParameters.radius, 2 * sp->listParameters.radius, 2 * sp->listParameters.radius, -90, -90); -- path.lineTo(rect.left(), rect.top()); -- } -- else -- { -- path.addRoundedRect(vi->rect, sp->listParameters.radius, sp->listParameters.radius); -- } -- } -- else{ -- path.addRoundedRect(vi->rect, sp->listParameters.radius, sp->listParameters.radius); -- } -- } else if(qobject_cast<const QTableView *>(widget) || qobject_cast<const QTableWidget *>(widget)){ -- sp->initTableParameters(isUseDarkPalette(), option, widget); -- -- defaultBrush = sp->tableParameters.tableDefaultBrush; -- hoverBrush = sp->tableParameters.tableHoverBrush; -- selectBrush = sp->tableParameters.tableSelectBrush; -- disableBrush = sp->tableParameters.tableDisableBrush; -- hoverPen = sp->tableParameters.tableHoverPen; -- selectPen = sp->tableParameters.tableSelectPen; -- path.addRoundedRect(vi->rect, sp->tableParameters.radius, sp->tableParameters.radius); -- } -- else { -- path.addRect(vi->rect); -- defaultBrush = QBrush(Qt::transparent); -- hoverBrush = option->palette.brush(QPalette::Disabled, QPalette::Midlight); -- selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -- disableBrush = QBrush(Qt::transparent); -- } -- -- if ((vi->decorationPosition == QStyleOptionViewItem::Top) || (vi->decorationPosition == QStyleOptionViewItem::Bottom)) -- isIconMode = true; -- -- if (isIconMode) { -- QRect iconRect = proxy()->subElementRect(SE_ItemViewItemDecoration, option, widget); -- QRect textRect = proxy()->subElementRect(SE_ItemViewItemText, option, widget); -- int iconMode_Radius = sp->radius; -- -- if (!enable) -- return; -- -- if (select) { -- if (iconRect.isValid() && textRect.isValid()) { -- int Margin_Height = 2; -- const int Margin = proxy()->pixelMetric(QStyle::PM_FocusFrameHMargin, option, widget); -- iconRect.setRect(option->rect.x(), option->rect.y(), option->rect.width(), iconRect.height() + Margin + Margin_Height); -- textRect.setRect(option->rect.x(), iconRect.bottom() + 1, option->rect.width(), option->rect.height() - iconRect.height()); -- QPainterPath iconPath, textPath; -- iconPath.moveTo(iconRect.x(), iconRect.y() + iconMode_Radius); -- iconPath.arcTo(iconRect.x(), iconRect.y(), iconMode_Radius * 2, iconMode_Radius * 2, 180, -90); -- iconPath.lineTo(iconRect.right() + 1 - iconMode_Radius, iconRect.y()); -- iconPath.arcTo(iconRect.right() + 1 - iconMode_Radius * 2, iconRect.y(), iconMode_Radius * 2, iconMode_Radius * 2, -- 90, -90); -- iconPath.lineTo(iconRect.right() + 1, iconRect.bottom() + 1); -- iconPath.lineTo(iconRect.left(), iconRect.bottom() + 1); -- iconPath.lineTo(iconRect.left(), iconRect.top() + iconMode_Radius); -- -- textPath.moveTo(textRect.x(), textRect.y()); -- textPath.lineTo(textRect.right() + 1, textRect.y()); -- textPath.lineTo(textRect.right() + 1, textRect.bottom() + 1 - iconMode_Radius); -- textPath.arcTo(textRect.right() + 1 - iconMode_Radius * 2, textRect.bottom() + 1 - iconMode_Radius * 2, iconMode_Radius * 2, iconMode_Radius * 2, -- 0, -90); -- textPath.lineTo(textRect.left() + iconMode_Radius, textRect.bottom() + 1); -- textPath.arcTo(textRect.left(), textRect.bottom() + 1 - iconMode_Radius * 2, iconMode_Radius * 2, iconMode_Radius * 2, -- 270, -90); -- textPath.lineTo(textRect.left(), textRect.top()); -- -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setRenderHint(QPainter::Antialiasing, true); -- QColor c = vi->palette.color(QPalette::BrightText); -- c.setAlphaF(isUseDarkPalette() ? 0.20 : 0.10); -- painter->setBrush(QBrush(c));//(vi->palette.brush(QPalette::Active, QPalette::Button)); -- painter->drawPath(iconPath); -- painter->setBrush(vi->palette.brush(QPalette::Active, QPalette::Highlight)); -- painter->drawPath(textPath); -- painter->restore(); -- } else { -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setRenderHint(QPainter::Antialiasing, true); -- painter->setBrush(vi->palette.brush(QPalette::Active, QPalette::Highlight)); -- painter->drawRoundedRect(option->rect, iconMode_Radius, iconMode_Radius); -- painter->restore(); -- } -- } else { -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setRenderHint(QPainter::Antialiasing, true); -- if (hover) { -- QColor c = option->palette.color(QPalette::BrightText); -- c.setAlphaF(isUseDarkPalette() ? 0.15 : 0.05); -- painter->setBrush(QBrush(c));//(button_Hover(option)); -- painter->drawRoundedRect(option->rect, iconMode_Radius, iconMode_Radius); -- } -- else if (vi->backgroundBrush.style() != Qt::NoBrush) { -- QPointF oldBO = painter->brushOrigin(); -- painter->setBrushOrigin(vi->rect.topLeft()); -- painter->setBrush(vi->backgroundBrush); -- painter->drawRoundedRect(vi->rect, iconMode_Radius, iconMode_Radius); -- painter->setBrushOrigin(oldBO); -- } -- -- painter->restore(); -- } -- } else { -- if (vi->backgroundBrush.style() != Qt::NoBrush) { -- QPointF oldBO = painter->brushOrigin(); -- painter->setBrushOrigin(vi->rect.topLeft()); -- painter->fillRect(vi->rect, vi->backgroundBrush); -- painter->setBrushOrigin(oldBO); -- } -- painter->save(); -- -- painter->setRenderHint(QPainter::Antialiasing, true); -- if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) -- painter->setRenderHint(QPainter::Antialiasing, false); -- -- painter->setPen(Qt::NoPen); -- -- if (!enable) { -- painter->setBrush(disableBrush); -- } else if (select) { -- painter->setBrush(selectBrush); -- } else if (hover) { -- painter->setBrush(hoverBrush); -- } else { -- painter->setBrush(defaultBrush); -- } -- painter->drawPath(path); -- painter->restore(); -- -- painter->save(); -- painter->setRenderHint(QPainter::Antialiasing, true); -- painter->setPen(Qt::NoPen); -- painter->setBrush(Qt::NoBrush); -- -- if (enable && select) { -- painter->setPen(selectPen); -- if(isTree){ -- if(painter->pen().width() == 1) -- painter->translate(0, 0.5); -- -- if(!borderPath0.isEmpty()){ -- painter->drawPath(borderPath0); -- } -- if(!borderPath1.isEmpty()){ -- painter->drawPath(borderPath1); -- } -- if(!borderPath2.isEmpty()){ -- if(painter->pen().width() == 1) -- painter->translate(-0.5, 0); -- painter->drawPath(borderPath2); -- } -- } -- else -- painter->drawPath(path); -- } else if (enable && hover) { -- painter->setPen(hoverPen); -- if(isTree){ -- if(painter->pen().width() == 1) -- painter->translate(0, 0.5); -- -- if(!borderPath0.isEmpty()){ -- painter->drawPath(borderPath0); -- } -- if(!borderPath1.isEmpty()){ -- painter->drawPath(borderPath1); -- } -- if(!borderPath2.isEmpty()){ -- if(painter->pen().width() == 1) -- painter->translate(-0.5, 0); -- painter->drawPath(borderPath2); -- } -- -- } -- else -- painter->drawPath(path); -- } -- painter->restore(); -- } -- if (vi->state & State_HasFocus) { -- -- } -- return; -- } -- break; -- } -- -- case PE_IndicatorBranch: -- { -- if (auto tree = qobject_cast<const QTreeView *>(widget)) { -- bool isHover = option->state & State_MouseOver; -- bool isSelected = option->state & State_Selected; -- bool enable = option->state & State_Enabled; -- QBrush brush; -- QPen hoverPen = Qt::NoPen; -- QPen selectPen = Qt::NoPen; -- QPainterPath borderPath0; -- QPainterPath borderPath1; -- -- sp->initTreeParameters(isUseDarkPalette(), option, widget); -- -- hoverPen = sp->treeParameters.treeHoverPen; -- selectPen = sp->treeParameters.treeSelectPen; -- -- if (!enable) { -- brush = sp->treeParameters.treeBranchDisableBrush; -- } else if (isSelected) { -- brush = sp->treeParameters.treeBranchSelectBrush; -- } else if (isHover) { -- brush = sp->treeParameters.treeBranchHoverBrush; -- } else { -- brush = sp->treeParameters.treeBranchDefaultBrush; -- } -- -- QPainterPath path; -- if (option->rect.left() == 0) { -- //raund radius at beginning -- QRect rect = option->rect.adjusted(0, 0, 1, 1); -- path.moveTo(rect.left(), rect.top() + sp->treeParameters.radius); -- path.arcTo(rect.left(), rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 180, -90); -- path.lineTo(rect.right(), rect.top()); -- path.lineTo(rect.right(), rect.bottom()); -- path.lineTo(rect.left() + sp->treeParameters.radius, rect.bottom()); -- path.arcTo(rect.left(), rect.bottom() - 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, -90, -90); -- path.lineTo(rect.left(), rect.top() + sp->treeParameters.radius); -- -- borderPath0.moveTo(rect.left(), rect.top() + sp->treeParameters.radius); -- borderPath0.arcTo(rect.left(), rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 180, -90); -- borderPath0.lineTo(rect.right(), rect.top()); -- borderPath0.moveTo(rect.right(), rect.bottom() - 1); -- borderPath0.lineTo(rect.left() + sp->treeParameters.radius, rect.bottom() - 1); -- borderPath1.moveTo(rect.left() + sp->treeParameters.radius, rect.bottom() - 1); -- borderPath1.arcTo(rect.left(), rect.bottom() - 1 - 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, -90, -90); -- borderPath1.lineTo(rect.left(), rect.top() + sp->treeParameters.radius); -- } else { -- path.addRect(option->rect); -- QRect rect = option->rect.adjusted(0, 0, 1, 1); -- -- borderPath0.moveTo(rect.left(), rect.top()); -- borderPath0.lineTo(rect.right(), rect.top()); -- borderPath1.moveTo(rect.right(), rect.bottom() - 1); -- borderPath1.lineTo(rect.left(), rect.bottom() - 1); -- } -- -- painter->save(); -- painter->setRenderHint(QPainter::Antialiasing, true); -- QPoint oldBO = painter->brushOrigin(); -- if(isHover && tree->verticalScrollMode() == QAbstractItemView::ScrollPerPixel){ -- painter->setBrushOrigin(QPoint(0,0)); -- } -- painter->setPen(Qt::NoPen); -- painter->setBrush(brush); -- painter->drawPath(path); -- painter->setBrushOrigin(oldBO); -- painter->restore(); -- -- painter->save(); -- if(sp->treeParameters.radius != 0) -- painter->setRenderHint(QPainter::Antialiasing, true); -- painter->setPen(Qt::NoPen); -- painter->setBrush(Qt::NoBrush); -- -- -- if (enable && isSelected) { -- painter->setPen(selectPen); -- } else if (enable && isHover) { -- painter->setPen(hoverPen); -- } -- -- if(painter->pen().width() == 1 && sp->treeParameters.radius != 0) -- painter->translate(0.5, 0.5); -- -- if(!borderPath0.isEmpty()){ -- painter->drawPath(borderPath0); -- } -- if(!borderPath1.isEmpty()){ -- painter->drawPath(borderPath1); -- } -- -- painter->restore(); -- -- return Style::drawPrimitive(PE_IndicatorBranch, option, painter, widget); -- -- } -- --// if (!(option->state & State_Children)) { --// return; --// } --// QStyleOption subOption = *option; --// if (proxy()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, option, widget)) --// subOption.state = option->state; --// else --// subOption.state = option->state & State_Enabled ? State_Enabled : State_None; -- --// if (option->state & State_Open) { --// proxy()->drawPrimitive(PE_IndicatorArrowDown, &subOption, painter, widget); --// } else { --// const bool reverse = (option->direction == Qt::RightToLeft); --// proxy()->drawPrimitive(reverse ? PE_IndicatorArrowLeft : PE_IndicatorArrowRight, &subOption, painter, widget); --// } --// return; -- } break; -- -- -- case PE_IndicatorViewItemCheck: -- return proxy()->drawPrimitive(PE_IndicatorCheckBox, option, painter, widget); -- -- case PE_IndicatorItemViewItemDrop: -- { -- QRect rect = option->rect; -- int Radius = 4; -- painter->save(); -- painter->setClipRect(rect); -- if(Radius != 0) -- painter->setRenderHint(QPainter::Antialiasing, true); -- if(painter->pen().width() == 1 && Radius != 0) -- painter->translate(0.5, 0.5); -- painter->setPen(option->palette.color(QPalette::Active, QPalette::Highlight)); -- painter->setBrush(Qt::NoBrush); -- if (option->rect.height() == 0) -- painter->drawLine(rect.topLeft(), rect.topRight()); -- else -- painter->drawRoundedRect(rect, Radius, Radius); -- painter->restore(); -- return; -- } -- -- default: -- break; -- } -- -- return Style::drawPrimitive(element, option, painter, widget); --} -- --void Qt5UKUIStyle::drawComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const --{ -- switch (control) { -- case CC_ScrollBar: { -- if (const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option)) { -- sp->initScrollBarParameters(isUseDarkPalette(), option, widget); -- if (widget && widget->property("drawScrollBarGroove").isValid() && (!widget->property("drawScrollBarGroove").toBool())) { -- /*const bool active = bar->state & State_Active; -- QColor color; -- if (active) { -- color = sp->scrollBarParameters.scrollBarGrooveDefaultBrush.color(); -- auto animator = m_scrollbar_animation_helper->animator(widget); -- if (animator) { -- const bool mouseOver = bar->state & State_MouseOver; -- if(sp->scrollBarParameters.animation) { -- //hover color animation -- animator->setAnimatorDirectionForward("bg_width", mouseOver); -- -- if (mouseOver) { -- if (!animator->isRunning("bg_width") && animator->currentAnimatorTime("bg_width") == 0) { -- animator->startAnimator("bg_width"); -- } -- } else { -- if (!animator->isRunning("bg_width") && animator->currentAnimatorTime("bg_width") > 0) { -- animator->startAnimator("bg_width"); -- } -- } -- if(animator->isRunning("bg_width") || mouseOver){ -- qreal ratio = animator->value("bg_width").toReal(); -- color.setAlphaF(sp->scrollBarParameters.scrollBarGrooveDefaultBrush.color().alphaF() * ratio); -- QRect rect = bar->rect; -- const bool horizontal = bar->orientation == Qt::Horizontal; -- if(horizontal){ -- rect = QRect(bar->rect.x(), (bar->rect.y() + bar->rect.height() * (1 - ratio)), bar->rect.width(), bar->rect.height() * ratio); -- } -- else{ -- rect = QRect((bar->rect.x() + bar->rect.width() * (1 - ratio)), bar->rect.top(), bar->rect.width() * ratio, bar->rect.height()); -- } -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setBrush(color); -- painter->drawRect(rect); -- painter->restore(); -- } -- } -- } -- }*/ -- } else { -- const bool active = bar->state & State_Active; -- painter->save(); -- painter->setPen(Qt::NoPen); -- if (active) { -- painter->setBrush(sp->scrollBarParameters.scrollBarGrooveDefaultBrush); -- } else { -- painter->setBrush(sp->scrollBarParameters.scrollBarGrooveInactiveBrush); -- } -- painter->drawRect(bar->rect); -- painter->restore(); -- } -- --// if (!(bar->activeSubControls & SC_ScrollBarSlider)) { --// newScrollbar.state &= ~(State_Sunken | State_MouseOver); --// } -- -- QStyleOptionSlider newScrollbar = *bar; -- newScrollbar.rect = proxy()->subControlRect(control, option, SC_ScrollBarSlider, widget); -- proxy()->drawControl(CE_ScrollBarSlider, &newScrollbar, painter, widget); -- -- if (sp->ScrooBar_ShowLine && widget && ((widget->property("drawScrollBarGroove").isValid() && -- widget->property("drawScrollBarGroove").toBool()) || !widget->property("drawScrollBarGroove").isValid())) { -- if (bar->subControls & SC_ScrollBarSubLine) { -- QStyleOptionSlider subline = *bar; -- subline.rect = proxy()->subControlRect(control, option, SC_ScrollBarSubLine, widget); -- proxy()->drawControl(CE_ScrollBarSubLine, &subline, painter, widget); -- } -- if (bar->subControls & SC_ScrollBarAddLine) { -- QStyleOptionSlider addline = *bar; -- addline.rect = proxy()->subControlRect(control, option, SC_ScrollBarAddLine, widget); -- proxy()->drawControl(CE_ScrollBarAddLine, &addline, painter, widget); -- } -- -- } -- proxy()->subControlRect(control, option, SC_ScrollBarGroove, widget); -- return; -- } -- break; -- } -- -- case CC_Slider: -- { -- if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) { -- sp->initSliderParameters(isUseDarkPalette(), option, widget); -- QRect groove = proxy()->subControlRect(CC_Slider, option, SC_SliderGroove, widget); -- QRect handle = proxy()->subControlRect(CC_Slider, option, SC_SliderHandle, widget); -- const bool horizontal = slider->orientation == Qt::Horizontal; -- const bool enable = slider->state & State_Enabled; -- const bool hover = slider->state & State_MouseOver; -- const bool suken = slider->state & State_Sunken; -- if (slider->subControls & SC_SliderGroove) { -- if (horizontal) { -- groove.setHeight(sp->Slider_GrooveLength); -- groove.setWidth(groove.width() - 2 * sp->Slider_Margin); -- } else { -- groove.setWidth(sp->Slider_GrooveLength); -- groove.setHeight(groove.height() - 2 * sp->Slider_Margin); -- } -- groove.moveTo((option->rect.width() - groove.width()) / 2, (option->rect.height() - groove.height()) /2); --// groove.moveCenter(option->rect.center()); -- -- QBrush sBrush, gBrush; -- QRect sRect, gRect; -- if (horizontal) { -- if (slider->upsideDown) { -- sRect.setLeft(handle.center().x()); -- sRect.setTop(groove.top()); -- sRect.setRight(groove.right() - 1); -- sRect.setBottom(groove.bottom()); -- gRect.setLeft(groove.left() + 1); -- gRect.setTop(groove.top()); -- gRect.setRight(handle.center().x()); -- gRect.setBottom(groove.bottom()); -- } else { -- gRect.setLeft(handle.center().x()); -- gRect.setTop(groove.top()); -- gRect.setRight(groove.right() - 1); -- gRect.setBottom(groove.bottom()); -- sRect.setLeft(groove.left() + 1); -- sRect.setTop(groove.top()); -- sRect.setRight(handle.center().x()); -- sRect.setBottom(groove.bottom()); -- } -- } else { -- if (slider->upsideDown) { -- gRect.setLeft(groove.left()); -- gRect.setTop(groove.top() + 1); -- gRect.setRight(groove.right()); -- gRect.setBottom(handle.center().y()); -- sRect.setLeft(groove.left()); -- sRect.setTop(handle.center().y()); -- sRect.setRight(groove.right()); -- sRect.setBottom(groove.bottom() - 1); -- } else { -- sRect.setLeft(groove.left()); -- sRect.setTop(groove.top() + 1); -- sRect.setRight(groove.right()); -- sRect.setBottom(handle.center().y()); -- gRect.setLeft(groove.left()); -- gRect.setTop(handle.center().y()); -- gRect.setRight(groove.right()); -- gRect.setBottom(groove.bottom() - 1); -- } -- } -- -- if (!enable) { -- sBrush = sp->sliderParameters.sliderGrooveValueDisableBrush; -- gBrush = sp->sliderParameters.sliderGrooveUnvalueDisableBrush; -- } else if (hover) { -- sBrush = sp->sliderParameters.sliderGrooveValueHoverBrush; -- gBrush = sp->sliderParameters.sliderGrooveUnvalueHoverBrush; -- } else { -- sBrush = sp->sliderParameters.sliderGrooveValueDefaultBrush; -- gBrush = sp->sliderParameters.sliderGrooveUnvalueDefaultBrush; -- } -- -- painter->save(); -- painter->setPen(sp->sliderParameters.sliderGroovePen); -- if(sp->sliderParameters.sliderGrooveRadius != 0) -- painter->setRenderHint(QPainter::Antialiasing, true); -- if(painter->pen().width() == 1 && sp->sliderParameters.sliderGrooveRadius != 0) -- painter->translate(0.5, 0.5); -- painter->setBrush(sBrush); -- painter->drawRoundedRect(sRect, sp->sliderParameters.sliderGrooveRadius, sp->sliderParameters.sliderGrooveRadius); -- painter->setBrush(gBrush); -- painter->drawRoundedRect(gRect, sp->sliderParameters.sliderGrooveRadius, sp->sliderParameters.sliderGrooveRadius); -- painter->restore(); -- } -- -- if (slider->subControls & SC_SliderTickmarks) { -- int tick = 4; -- int interval = slider->tickInterval; -- if (interval < 1) -- interval = slider->pageStep; -- if (interval >= 1) { -- int v = slider->minimum; -- int len = proxy()->pixelMetric(PM_SliderLength, slider, widget); -- const int thickSpace = 2; -- painter->save(); -- painter->setPen(option->palette.color(QPalette::Disabled, QPalette::NoRole)); -- painter->setBrush(Qt::NoBrush); -- while (v <= slider->maximum) { -- int pos = sliderPositionFromValue(slider->minimum, slider->maximum, v, proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), -- slider->upsideDown) + len / 2; -- pos = pos + sp->Slider_Margin; -- if (horizontal) { -- if (slider->tickPosition & QSlider::TicksAbove) -- painter->drawLine(pos, handle.top() - thickSpace, pos, handle.top() - thickSpace + tick); -- if (slider->tickPosition & QSlider::TicksBelow) -- painter->drawLine(pos, handle.bottom() + thickSpace - tick, pos, handle.bottom() + thickSpace); -- } else { -- if (slider->tickPosition & QSlider::TicksAbove) -- painter->drawLine(handle.left() - thickSpace, pos, handle.left() - thickSpace + tick, pos); -- if (slider->tickPosition & QSlider::TicksBelow) -- painter->drawLine(handle.right() + thickSpace, pos, handle.right() + thickSpace - tick, pos); -- } -- v += interval; -- } -- painter->restore(); -- } -- } -- -- if (slider->subControls & SC_SliderHandle) { -- //we need to reinit our brush because it has QGradient without use option rect -- QStyleOptionSlider handleOption = *slider; -- if(horizontal) -- handle.setY((option->rect.height() - handle.height()) / 2); -- else -- handle.setX((option->rect.width() - handle.width()) / 2); -- handleOption.rect = handle; -- setSliderHandleRec(handleOption.rect); -- -- sp->initSliderParameters(isUseDarkPalette(), &handleOption, widget); -- -- QBrush hBrush; -- QPen hPen; -- if (!enable) { -- hBrush = sp->sliderParameters.sliderHandleDisableBrush; -- hPen = sp->sliderParameters.sliderHandleDisablePen; -- } else if (suken) { -- hBrush = sp->sliderParameters.sliderHandleClickBrush; -- hPen = sp->sliderParameters.sliderHandleClickPen; -- } else if (hover) { -- hBrush = sp->sliderParameters.sliderHandleHoverBrush; -- hPen = sp->sliderParameters.sliderHandleHoverPen; -- } else { -- hBrush = sp->sliderParameters.sliderHandleDefaultBrush; -- hPen = sp->sliderParameters.sliderHandleDefaultPen; -- } -- -- painter->save(); -- painter->setRenderHint(QPainter::Antialiasing, true); -- if(painter->pen().width() == 1) -- painter->translate(0.5, 0.5); -- painter->setPen(hPen); -- painter->setBrush(hBrush); -- painter->drawPath(sp->sliderParameters.sliderHandlePath); -- painter->restore(); -- } -- return; -- } -- break; -- } -- -- case CC_ComboBox: -- { -- if (const QStyleOptionComboBox *comboBox = qstyleoption_cast<const QStyleOptionComboBox *>(option)) { -- sp->initComboBoxParameters(isUseDarkPalette(), option, widget); -- const bool enable = comboBox->state & State_Enabled; -- const bool on = comboBox->state & State_On; -- const bool hover = comboBox->state & State_MouseOver; -- int width = 0; -- -- painter->save(); -- if(sp->comboBoxParameters.radius != 0) -- painter->setRenderHint(QPainter::Antialiasing, true); -- if (!enable) { -- width = sp->comboBoxParameters.comboBoxDisablePen.width(); -- painter->setPen(sp->comboBoxParameters.comboBoxDisablePen); -- painter->setBrush(sp->comboBoxParameters.comboBoxDisableBrush); -- } else { -- if (comboBox->editable) { -- if (comboBox->state & (State_HasFocus | State_On)) { -- width = sp->comboBoxParameters.comboBoxEditPen.width(); -- painter->setPen(sp->comboBoxParameters.comboBoxEditPen); -- painter->setBrush(sp->comboBoxParameters.comboBoxEditBrush); -- } else { -- width = sp->comboBoxParameters.comboBoxDefaultPen.width(); -- painter->setPen(sp->comboBoxParameters.comboBoxDefaultPen); -- painter->setBrush(sp->comboBoxParameters.comboBoxDefaultBrush); -- } -- } else { -- if (on) { -- width = sp->comboBoxParameters.comboBoxOnPen.width(); -- painter->setPen(sp->comboBoxParameters.comboBoxOnPen); -- painter->setBrush(sp->comboBoxParameters.comboBoxOnBrush); -- } else if (hover) { -- width = sp->comboBoxParameters.comboBoxHoverPen.width(); -- painter->setPen(sp->comboBoxParameters.comboBoxHoverPen); -- painter->setBrush(sp->comboBoxParameters.comboBoxHoverBrush); -- } else { -- width = sp->comboBoxParameters.comboBoxDefaultPen.width(); -- painter->setPen(sp->comboBoxParameters.comboBoxDefaultPen); -- painter->setBrush(sp->comboBoxParameters.comboBoxDefaultBrush); -- } -- } -- } -- if(width == 1 && sp->comboBoxParameters.radius != 0) -- painter->translate(0.5, 0.5); -- -- painter->drawRoundedRect(option->rect.adjusted(width, width, -width, -width), sp->comboBoxParameters.radius, sp->comboBoxParameters.radius); -- painter->restore(); -- return; -- } -- break; -- } -- -- case CC_SpinBox: -- { -- if (const QStyleOptionSpinBox *sb = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) { -- bool isHorizontalLayout = (sp->getSpinBoxControlLayout() == UKUIStyleParameters::SpinBoxControlLayout::Horizontal); -- sp->initSpinBoxParameters(isUseDarkPalette(), option, widget, isHorizontalLayout); -- bool enable = sb->state & State_Enabled; -- bool up = sb->activeSubControls == SC_SpinBoxUp; -- bool down = sb->activeSubControls == SC_SpinBoxDown; -- bool hover = sb->state & State_MouseOver; -- bool focus = sb->state & State_HasFocus; -- bool sunken = sb->state & State_Sunken; -- int width = 0; -- QRect upRect = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxUp, widget); -- QRect downRect = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxDown, widget); -- -- QStyleOption upOption, downOption; -- upOption.rect = upRect; -- downOption.rect = downRect; -- bool hasBorder = false; -- -- painter->save(); -- if(sp->spinBoxParameters.radius != 0) -- painter->setRenderHint(QPainter::Antialiasing, true); -- -- if(isHorizontalLayout)//xc mode -- { -- if (!enable) { -- upOption.state = State_None; -- downOption.state = State_None; -- painter->setPen(sp->spinBoxParameters.spinBoxDisablePen); -- painter->setBrush(sp->spinBoxParameters.spinBoxDisableBrush); -- hasBorder = false; --// if(painter->pen().width() == 1) --// painter->translate(0.5, 0.5); -- painter->drawRect(option->rect.adjusted(sp->SpinBox_DefaultHeight, 0, -sp->SpinBox_DefaultHeight, -1)); -- painter->restore(); -- } -- else -- { -- if (focus) { -- int width = sp->spinBoxParameters.spinBoxFocusPen.width(); -- hasBorder = true; -- painter->setPen(sp->spinBoxParameters.spinBoxFocusPen); -- painter->setBrush(sp->spinBoxParameters.spinBoxFocusBrush); -- if(painter->pen().width() == 1 && sp->spinBoxParameters.radius != 0) -- painter->translate(0.5, 0.5); -- painter->drawRoundedRect(option->rect.adjusted(width, width, -width, -width), -- sp->spinBoxParameters.radius, sp->spinBoxParameters.radius); -- -- painter->restore(); -- } else if (hover) { -- painter->setPen(sp->spinBoxParameters.spinBoxHoverPen); -- painter->setBrush(sp->spinBoxParameters.spinBoxHoverBrush); --// if(painter->pen().width() == 1) --// painter->translate(0.5, 0.5); -- painter->drawRect(option->rect.adjusted(sp->SpinBox_DefaultHeight, 0, -sp->SpinBox_DefaultHeight, -1)); -- painter->restore(); -- } -- else { -- hasBorder = false; -- painter->setPen(sp->spinBoxParameters.spinBoxDefaultPen); -- painter->setBrush(sp->spinBoxParameters.spinBoxDefaultBrush); -- if(painter->pen().width() == 1 && sp->spinBoxParameters.radius != 0) -- painter->translate(0.5, 0.5); -- painter->drawRect(option->rect.adjusted(sp->SpinBox_DefaultHeight, 0, -sp->SpinBox_DefaultHeight, -1)); -- painter->restore(); -- } -- } -- -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setBrush(Qt::NoBrush); -- int lineWidth = hasBorder ? 2 : 0; -- int radius= sp->spinBoxParameters.radius; -- if (sb->subControls & (SC_SpinBoxUp | SC_SpinBoxDown)) { -- QPainterPath upPath; -- -- upPath.moveTo(upRect.left() + 2, upRect.top() + lineWidth + (hasBorder ? 1 : 0)); -- upPath.lineTo(upRect.right() + 1 - radius - lineWidth, upRect.top() + lineWidth + (hasBorder ? 1 : 0)); -- upPath.arcTo(upRect.right() + 1 - 2 * radius - lineWidth, upRect.top() + lineWidth + (hasBorder ? 1 : 0), radius * 2, radius * 2, 90, -90); -- upPath.lineTo(upRect.right() + 1 - lineWidth, upRect.bottom() - lineWidth - radius); -- upPath.arcTo(upRect.right() + 1 - 2 * radius - lineWidth, upRect.bottom() - lineWidth - 2 * radius, radius * 2, radius * 2, 0, -90); -- upPath.lineTo(upRect.left() + 2, upRect.bottom() - lineWidth); -- upPath.lineTo(upRect.left() + 2, upRect.top() + lineWidth + (hasBorder ? 1 : 0)); -- -- if (sb->stepEnabled & QAbstractSpinBox::StepUpEnabled) { -- upOption.state |= State_Enabled; -- if (up && enable) { -- if (focus) { -- if(sunken) -- painter->setBrush(sp->spinBoxParameters.spinBoxUpClickBrush); -- else -- painter->setBrush(sp->spinBoxParameters.spinBoxUpHoverBrush); -- -- upOption.state |= State_MouseOver; -- } else { -- painter->setBrush(sp->spinBoxParameters.spinBoxUpHoverBrush); -- } -- -- if (option->state & State_Sunken) { -- painter->setBrush(sp->spinBoxParameters.spinBoxUpClickBrush); -- upOption.state |= State_Sunken; -- } -- painter->drawPath(upPath); -- } -- else { -- if(enable) -- { -- painter->setBrush(sp->spinBoxParameters.spinBoxUpDefaultBrush); -- } -- else -- { -- painter->setBrush(sp->spinBoxParameters.spinBoxDisableBrush); -- } -- painter->drawPath(upPath); -- } -- } else { -- if(enable) -- { -- painter->setBrush(sp->spinBoxParameters.spinBoxUpDefaultBrush); -- } -- else -- { -- painter->setBrush(sp->spinBoxParameters.spinBoxUpDefaultBrush); -- } -- painter->drawPath(upPath); -- -- upOption.state = State_None; -- } -- painter->restore(); -- -- QPainterPath downPath; -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setBrush(Qt::NoBrush); -- -- downPath.moveTo(downRect.left() + 1 + radius + lineWidth, downRect.top() + lineWidth + (hasBorder ? 1 : 0)); -- downPath.arcTo(downRect.left() + 1 + lineWidth, downRect.top() + lineWidth + (hasBorder ? 1 : 0), radius * 2, radius * 2, 90, 90); -- downPath.lineTo(downRect.left() + 1 + lineWidth, downRect.bottom() - lineWidth - radius); -- downPath.arcTo(downRect.left() + 1 + lineWidth, downRect.bottom() - lineWidth - 2 * radius, radius * 2, radius * 2, 180, 90); -- downPath.lineTo(downRect.right(), downRect.bottom() - lineWidth); -- downPath.lineTo(downRect.right(), downRect.top() + lineWidth + (hasBorder ? 1 : 0)); -- downPath.lineTo(downRect.left() + 1 + radius, downRect.top() + lineWidth + (hasBorder ? 1 : 0)); -- -- if (sb->stepEnabled & QAbstractSpinBox::StepDownEnabled) { -- downOption.state |= State_Enabled; -- if (down && enable) { -- if (focus) { -- if(sunken) -- painter->setBrush(sp->spinBoxParameters.spinBoxDownClickBrush); -- else -- painter->setBrush(sp->spinBoxParameters.spinBoxDownHoverBrush); -- downOption.state |= State_MouseOver; -- } else { -- painter->setBrush(sp->spinBoxParameters.spinBoxDownHoverBrush); -- } -- -- if (option->state & State_Sunken) { -- painter->setBrush(sp->spinBoxParameters.spinBoxDownClickBrush); -- downOption.state |= State_Sunken; -- } -- painter->drawPath(downPath); -- } -- else { -- if(enable) -- { -- painter->setBrush(sp->spinBoxParameters.spinBoxDownDefaultBrush); -- } -- else -- { -- painter->setBrush(sp->spinBoxParameters.spinBoxDisableBrush); -- } -- painter->drawPath(downPath); -- } -- } -- else { -- if(enable) -- { -- painter->setBrush(sp->spinBoxParameters.spinBoxDownDefaultBrush); -- } -- else -- { -- painter->setBrush(sp->spinBoxParameters.spinBoxDisableBrush); -- } -- painter->drawPath(downPath); -- -- downOption.state = State_None; -- } -- painter->restore(); -- -- if (!enable) { -- upOption.state = State_None; -- downOption.state = State_None; -- } -- -- if (sb->buttonSymbols == QAbstractSpinBox::PlusMinus) { -- -- } else if (sb->buttonSymbols == QAbstractSpinBox::UpDownArrows) { -- proxy()->drawPrimitive(PE_IndicatorArrowUp, &upOption, painter, widget); -- proxy()->drawPrimitive(PE_IndicatorArrowDown, &downOption, painter, widget); -- } -- } -- } -- else{//pc mode -- if (!enable) { -- width = sp->spinBoxParameters.spinBoxDisablePen.width(); -- painter->setPen(sp->spinBoxParameters.spinBoxDisablePen); -- painter->setBrush(sp->spinBoxParameters.spinBoxDisableBrush); -- } else { -- if (focus) { -- width = sp->spinBoxParameters.spinBoxFocusPen.width(); -- painter->setPen(sp->spinBoxParameters.spinBoxFocusPen); -- painter->setBrush(sp->spinBoxParameters.spinBoxFocusBrush); -- } else if (hover) { -- width = sp->spinBoxParameters.spinBoxHoverPen.width(); -- painter->setPen(sp->spinBoxParameters.spinBoxHoverPen); -- painter->setBrush(sp->spinBoxParameters.spinBoxHoverBrush); -- } else { -- width = sp->spinBoxParameters.spinBoxDefaultPen.width(); -- painter->setPen(sp->spinBoxParameters.spinBoxDefaultPen); -- painter->setBrush(sp->spinBoxParameters.spinBoxDefaultBrush); -- } -- } -- -- if(painter->pen().width() == 1 && sp->spinBoxParameters.radius != 0) -- painter->translate(0.5, 0.5); -- -- painter->drawRoundedRect(option->rect.adjusted(width, width, -width, -width), -- sp->spinBoxParameters.radius, sp->spinBoxParameters.radius); -- painter->restore(); -- -- -- //up and down button -- if (sb->subControls & (SC_SpinBoxUp | SC_SpinBoxDown)) { -- -- //up button -- if (sb->stepEnabled & QAbstractSpinBox::StepUpEnabled) { -- QPainterPath upPath; -- -- painter->save(); -- if(sp->spinBoxParameters.radius != 0) -- painter->setRenderHint(QPainter::Antialiasing, true); -- if (!enable) { -- upOption.state = State_None; -- painter->setPen(sp->spinBoxParameters.spinBoxUpDisablePen); -- painter->setBrush(sp->spinBoxParameters.spinBoxUpDisableBrush); -- } else { -- upOption.state |= State_Enabled; -- -- if (up) { -- if (option->state & State_Sunken) { -- upOption.state |= State_Sunken; -- painter->setPen(sp->spinBoxParameters.spinBoxUpClickPen); -- painter->setBrush(sp->spinBoxParameters.spinBoxUpClickBrush); -- } else { -- if (focus) { -- upOption.state |= State_MouseOver; -- painter->setPen(sp->spinBoxParameters.spinBoxUpFocusHoverPen); -- painter->setBrush(sp->spinBoxParameters.spinBoxUpFocusHoverBrush); -- } else { -- painter->setPen(sp->spinBoxParameters.spinBoxUpHoverPen); -- painter->setBrush(sp->spinBoxParameters.spinBoxUpHoverBrush); -- } -- } -- } else { -- painter->setPen(sp->spinBoxParameters.spinBoxUpDefaultPen); -- painter->setBrush(sp->spinBoxParameters.spinBoxUpDefaultBrush); -- } -- } -- upRect.adjust(0, width, 1 - width, 1); -- upPath.moveTo(upRect.left(), upRect.top() + sp->spinBoxParameters.radius); -- upPath.arcTo(upRect.left(), upRect.top(), sp->spinBoxParameters.radius * 2, sp->spinBoxParameters.radius * 2, 180, -90); -- upPath.lineTo(upRect.right() - sp->spinBoxParameters.radius, upRect.top()); -- upPath.arcTo(upRect.right() - 2 * sp->spinBoxParameters.radius, upRect.top(), sp->spinBoxParameters.radius * 2, -- sp->spinBoxParameters.radius * 2, 90, -90); -- upPath.lineTo(upRect.right(), upRect.bottom()); -- upPath.lineTo(upRect.left(), upRect.bottom()); -- upPath.lineTo(upRect.left(), upRect.top() + sp->spinBoxParameters.radius); -- -- if(painter->pen().width() == 1 && sp->spinBoxParameters.radius != 0) -- painter->translate(0.5, 0.5); -- -- painter->drawPath(upPath); --// painter->drawRect(upRect); -- painter->restore(); -- } else { -- upOption.state = State_None; -- } -- -- //down button -- if (sb->stepEnabled & QAbstractSpinBox::StepDownEnabled) { -- QPainterPath downPath; -- -- painter->save(); -- if(sp->spinBoxParameters.radius != 0) -- painter->setRenderHint(QPainter::Antialiasing, true); -- if (!enable) { -- downOption.state = State_None; -- painter->setPen(sp->spinBoxParameters.spinBoxDownDisablePen); -- painter->setBrush(sp->spinBoxParameters.spinBoxDownDisableBrush); -- } else { -- downOption.state |= State_Enabled; -- -- if (down) { -- if (option->state & State_Sunken) { -- downOption.state |= State_Sunken; -- painter->setPen(sp->spinBoxParameters.spinBoxDownClickPen); -- painter->setBrush(sp->spinBoxParameters.spinBoxDownClickBrush); -- } else { -- if (focus) { -- downOption.state |= State_MouseOver; -- painter->setPen(sp->spinBoxParameters.spinBoxDownFocusHoverPen); -- painter->setBrush(sp->spinBoxParameters.spinBoxDownFocusHoverBrush); -- } else { -- painter->setPen(sp->spinBoxParameters.spinBoxDownHoverPen); -- painter->setBrush(sp->spinBoxParameters.spinBoxDownHoverBrush); -- } -- } -- } else { -- painter->setPen(sp->spinBoxParameters.spinBoxDownDefaultPen); -- painter->setBrush(sp->spinBoxParameters.spinBoxDownDefaultBrush); -- } -- } -- downRect.adjust(0, 0, 1 - width, 1 - width); -- downPath.moveTo(downRect.left(), downRect.bottom() - sp->spinBoxParameters.radius); -- downPath.arcTo(downRect.left(), downRect.bottom() - sp->spinBoxParameters.radius * 2, sp->spinBoxParameters.radius * 2, -- sp->spinBoxParameters.radius * 2, 180, 90); -- downPath.lineTo(downRect.right() - sp->spinBoxParameters.radius, downRect.bottom()); -- downPath.arcTo(downRect.right() - sp->spinBoxParameters.radius * 2, downRect.bottom() - sp->spinBoxParameters.radius * 2, -- sp->spinBoxParameters.radius * 2, sp->spinBoxParameters.radius * 2, 270, 90); -- downPath.lineTo(downRect.right(), downRect.top()); -- downPath.lineTo(downRect.left(), downRect.top()); -- downPath.lineTo(downRect.left(), downRect.bottom() - sp->spinBoxParameters.radius); -- -- if(painter->pen().width() == 1 && sp->spinBoxParameters.radius != 0) -- painter->translate(0.5, 0.5); -- -- painter->drawPath(downPath); --// painter->drawRect(downRect); -- painter->restore(); -- } else { -- downOption.state = State_None; -- } -- -- if (!enable) { -- upOption.state = State_None; -- downOption.state = State_None; -- } -- -- if (sb->buttonSymbols == QAbstractSpinBox::PlusMinus) { -- -- } else if (sb->buttonSymbols == QAbstractSpinBox::UpDownArrows) { -- proxy()->drawPrimitive(PE_IndicatorArrowUp, &upOption, painter, widget); -- proxy()->drawPrimitive(PE_IndicatorArrowDown, &downOption, painter, widget); -- } -- } -- } --// painter->restore(); -- return; -- } -- break; -- -- } -- -- case CC_Dial: -- { -- if (const QStyleOptionSlider *dial = qstyleoption_cast<const QStyleOptionSlider *>(option)) { -- const bool enable = dial->state & State_Enabled; -- int tickOffset = 8; -- const int width = option->rect.width(); -- const int height = option->rect.height(); -- qreal r = qMin(dial->rect.width(), dial->rect.height()) / 2; -- qreal r_ = r - tickOffset; -- qreal dx = dial->rect.x() + (width - 2 * r_) / 2; -- qreal dy = dial->rect.y() + (height - 2 * r_) / 2; -- QRectF br(dial->rect.x() + dx, dial->rect.y() + dy, r_ * 2, r_ * 2); -- painter->save(); -- painter->setRenderHint(QPainter::Antialiasing, true); -- painter->setPen(Qt::NoPen); -- painter->setBrush(dial->palette.color(enable ? QPalette::Active : QPalette::Disabled, QPalette::Button)); -- painter->drawEllipse(br); -- painter->restore(); -- -- int tickHandle = 4; -- int handleLength = 8; -- QRectF circleRect(br.adjusted(tickHandle + handleLength, tickHandle + handleLength, -- -(tickHandle + handleLength), -(tickHandle + handleLength))); -- -- QColor highLight = enable ? dial->palette.color(QPalette::Active, QPalette::Highlight) -- : dial->palette.color(QPalette::Disabled, QPalette::ButtonText); -- QColor groove_color = isUseDarkPalette() ? QColor(38, 38, 38) : QColor(191, 191, 191); -- qreal fist = calcRadial(dial, dial->minimum); -- qreal dp = calcRadial(dial, dial->sliderPosition); -- qreal end = calcRadial(dial, dial->maximum); -- QPen pen(groove_color, handleLength, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- painter->save(); -- painter->setPen(pen); -- painter->setBrush(Qt::NoBrush); -- painter->setRenderHint(QPainter::Antialiasing, true); -- painter->drawArc(circleRect, fist * 16 * 180 / M_PI, (end - fist) * 16 * 180 / M_PI); -- pen.setColor(highLight); -- painter->setPen(pen); -- painter->drawArc(circleRect, fist * 16 * 180 / M_PI, (dp - fist) * 16 * 180 / M_PI); -- painter->restore(); -- -- qreal xc = dial->rect.width() / 2; -- qreal yc = dial->rect.height() / 2; -- painter->save(); -- painter->setRenderHint(QPainter::Antialiasing, true); -- painter->setPen(QPen(dial->palette.color(enable ? QPalette::Active : QPalette::Disabled, QPalette::Base), -- 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); -- painter->setBrush(Qt::NoBrush); -- painter->drawLine(QPointF(xc + (r_ - 8 - 2) * qCos(dp), yc - (r_ - 8 - 2) * qSin(dp)), -- QPointF(xc + (r_ - 8 - 2 - 4) * qCos(dp), yc - (r_ - 8 - 2 - 4) * qSin(dp))); -- painter->restore(); -- -- if (dial->subControls & SC_DialTickmarks) { -- painter->save(); -- painter->setRenderHint(QPainter::Antialiasing, true); -- QPen pen(dial->palette.color(enable ? QPalette::Active : QPalette::Disabled, QPalette::WindowText), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- painter->setPen(pen); -- if(painter->pen().width() == 1) -- painter->translate(0.5, 0.5); -- painter->drawLines(calcLines(dial, tickOffset)); -- painter->restore(); -- } -- return; -- } -- break; -- } -- -- case CC_ToolButton: -- { -- if (qstyleoption_cast<const QStyleOptionToolButton *>(option)) { -- proxy()->drawPrimitive(PE_PanelButtonTool, option, painter, widget); -- proxy()->drawControl(CE_ToolButtonLabel, option, painter, widget); -- -- return; -- } -- break; -- } -- -- case CC_GroupBox: //UKUI GroupBox style -- { -- painter->save(); -- if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(option)) { -- // Draw frame -- QRect textRect = proxy()->subControlRect(CC_GroupBox, option, SC_GroupBoxLabel, widget); -- QRect checkBoxRect = proxy()->subControlRect(CC_GroupBox, option, SC_GroupBoxCheckBox, widget); -- //新加 -- QRect groupContents = proxy()->subControlRect(CC_GroupBox, option, SC_GroupBoxContents, widget); -- -- if (groupBox->subControls & QStyle::SC_GroupBoxFrame) { -- QStyleOptionFrame frame; -- frame.QStyleOption::operator=(*groupBox); -- frame.features = groupBox->features; -- frame.lineWidth = groupBox->lineWidth; -- frame.midLineWidth = groupBox->midLineWidth; -- frame.rect = proxy()->subControlRect(CC_GroupBox, option, SC_GroupBoxFrame, widget); -- proxy()->drawPrimitive(PE_FrameGroupBox, &frame, painter, widget); -- } -- -- // Draw title -- if ((groupBox->subControls & QStyle::SC_GroupBoxLabel) && !groupBox->text.isEmpty()) { -- // groupBox->textColor gets the incorrect palette here -- painter->setPen(QPen(option->palette.windowText(), 1)); -- int alignment = int(groupBox->textAlignment); -- if (!proxy()->styleHint(QStyle::SH_UnderlineShortcut, option, widget)) -- alignment |= Qt::TextHideMnemonic; -- -- proxy()->drawItemText(painter, textRect, Qt::TextShowMnemonic | Qt::AlignLeft | alignment, -- groupBox->palette, groupBox->state & State_Enabled, groupBox->text, QPalette::NoRole); -- -- if (groupBox->state & State_HasFocus) { -- QStyleOptionFocusRect fropt; -- fropt.QStyleOption::operator=(*groupBox); -- fropt.rect = textRect.adjusted(-2, -1, 2, 1); -- proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget); -- } -- painter->save(); -- painter->setRenderHint(QPainter::Antialiasing,true); -- painter->setPen(Qt::NoPen); -- painter->setBrush(option->palette.color(QPalette::Base)); -- painter->drawRoundedRect(groupContents, sp->radius, sp->radius); -- painter->restore(); -- -- } -- -- // Draw checkbox -- if (groupBox->subControls & SC_GroupBoxCheckBox) { -- QStyleOptionButton box; -- box.QStyleOption::operator=(*groupBox); -- box.rect = checkBoxRect; -- proxy()->drawPrimitive(PE_IndicatorCheckBox, &box, painter, widget); -- } -- } -- painter->restore(); -- return; -- break; -- -- } -- -- default: return Style::drawComplexControl(control, option, painter, widget); -- } --} -- --void Qt5UKUIStyle::drawControl(QStyle::ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const --{ -- switch (element) { -- case CE_ScrollBarSlider: -- { -- auto animator = m_scrollbar_animation_helper->animator(widget); -- if (!animator) { -- return Style::drawControl(element, option, painter, widget); -- } -- -- if (const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option)) { -- const bool enable = bar->state & State_Enabled; -- const bool sunKen = bar->state & State_Sunken; -- const bool mouseOver = bar->state & State_MouseOver; -- const bool horizontal = (bar->orientation == Qt::Horizontal); -- QRect rect = bar->rect; -- QRect drawRect; -- -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setRenderHint(QPainter::Antialiasing, true); -- -- bool hasAnimation = widget &&(!widget->property("animation").isValid() || -- (widget->property("animation").isValid() && widget->property("animation").toBool())); -- -- if(hasAnimation) { -- qreal len; -- if(sp->scrollBarParameters.grooveWidthAnimation){ -- //width animation -- animator->setAnimatorDirectionForward("groove_width", mouseOver); -- if (mouseOver) { -- if (!animator->isRunning("groove_width") && animator->currentAnimatorTime("groove_width") == 0) { -- animator->startAnimator("groove_width"); -- } -- } else { -- if (!animator->isRunning("groove_width") && animator->currentAnimatorTime("groove_width") > 0) { -- animator->startAnimator("groove_width"); -- } -- } -- len = animator->value("groove_width").toReal() * 4 * sp->m_scaleRatio2_1 + 4; -- } -- else -- len = sp->ScroolBar_Width; -- if (horizontal) { -- drawRect.setRect(rect.x(), rect.y() + (rect.height() - len) / 2, rect.width(), len); -- } else { -- drawRect.setRect(rect.x() + (rect.width() - len) / 2, rect.y(), len, rect.height()); -- } -- }else { -- drawRect = bar->rect; -- } -- -- setScrollbarSliderRec(QRect(drawRect.x(), drawRect.y(), drawRect.width(), drawRect.height())); -- -- //hover color animation --// animator->setAnimatorDirectionForward("slider_opacity", mouseOver); --// if (mouseOver) { --// if (!animator->isRunning("slider_opacity") && animator->currentAnimatorTime("slider_opacity") == 0) { --// animator->startAnimator("slider_opacity"); --// } --// } else { --// if (!animator->isRunning("slider_opacity") && animator->currentAnimatorTime("slider_opacity") > 0) { --// animator->startAnimator("slider_opacity"); --// } --// } --// qreal m_opacity = animator->value("slider_opacity").toReal(); -- --// //click color animation --// animator->setAnimatorDirectionForward("additional_opacity", sunKen); --// if (sunKen) { --// if (animator->currentAnimatorTime("additional_opacity") == 0) { --// animator->startAnimator("additional_opacity"); --// } --// } else { --// if (animator->currentAnimatorTime("additional_opacity") > 0) { --// animator->startAnimator("additional_opacity"); --// } --// } --// qreal s_opacity = animator->value("additional_opacity").toReal(); --// if (isUseDarkPalette()) { --// painter->setBrush(mixColor(sp->scrollBarParameters.scrollBarSliderDefaultBrush.color(), --// bar->palette.color(QPalette::Active, QPalette::WindowText), m_opacity + (0.1 - s_opacity))); --// } else { --// painter->setBrush(mixColor(sp->scrollBarParameters.scrollBarSliderDefaultBrush.color(), --// bar->palette.color(QPalette::Active, QPalette::WindowText), m_opacity + s_opacity)); --// } -- -- QBrush brush; -- if (!enable){ -- brush = sp->scrollBarParameters.scrollBarSliderDisableBrush; -- } -- else if (sunKen && ((bar->activeSubControls & SC_ScrollBarSlider) || -- (bar->activeSubControls & SC_ScrollBarAddPage) || -- (bar->activeSubControls & SC_ScrollBarSubPage))){ -- -- brush = sp->scrollBarParameters.scrollBarSliderClickBrush; -- } -- else if(mouseOver && ((bar->activeSubControls & SC_ScrollBarSlider) || -- (bar->activeSubControls & SC_ScrollBarAddPage) || -- (bar->activeSubControls & SC_ScrollBarSubPage))){ -- -- brush = sp->scrollBarParameters.scrollBarSliderHoverBrush; -- } -- /*else if (animator->isRunning("slider_opacity")) {//fashion style hoverbrush is QLinearGradient -- painter->setOpacity(0.5 * m_opacity); -- QColor hColor = sp->scrollBarParameters.scrollBarSliderHoverBrush.color(); -- QColor dColor = sp->scrollBarParameters.scrollBarSliderDefaultBrush.color(); -- -- color.setRed(dColor.red() + (hColor.red() - dColor.red()) * m_opacity); -- color.setBlue(dColor.blue() + (hColor.blue() - dColor.blue()) * m_opacity); -- color.setGreen(dColor.green() + (hColor.green() - dColor.green()) * m_opacity); -- color.setAlphaF(dColor.alphaF() + (hColor.alphaF() - dColor.alphaF()) * m_opacity); -- }*/ -- else { -- brush = sp->scrollBarParameters.scrollBarSliderDefaultBrush; -- } -- painter->setBrush(brush); -- painter->drawRoundedRect(drawRect, sp->scrollBarParameters.radius, sp->scrollBarParameters.radius); -- painter->restore(); -- return; -- } -- break; -- } -- -- case CE_ScrollBarAddLine: { -- if (const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option)) { -- const bool active = bar->state & State_Active; -- painter->save(); -- painter->setPen(Qt::NoPen); -- if (active) { -- painter->setBrush(sp->scrollBarParameters.scrollBarGrooveDefaultBrush); -- } else { -- painter->setBrush(sp->scrollBarParameters.scrollBarGrooveInactiveBrush); -- } -- painter->drawRect(bar->rect); -- painter->restore(); -- painter->save(); -- -- QColor color = sp->Indicator_IconDefault; -- if(bar->sliderValue == bar->maximum || !(bar->state & State_Enabled)) -- color = sp->Indicator_IconDisable; -- else if((bar->activeSubControls & SC_ScrollBarAddLine) && option->state & State_Enabled){ -- if (option->state & (State_On | State_Sunken)) { -- color = sp->Indicator_IconSunken; -- } -- else if (option->state & State_MouseOver) { -- color = sp->Indicator_IconHover; -- } -- } -- QIcon icon = QIcon::fromTheme("ukui-start-symbolic"); -- -- const bool horizontal = (bar->orientation == Qt::Horizontal); -- if(horizontal) -- icon = QIcon::fromTheme(bar->direction == Qt::LeftToRight ? "ukui-end-symbolic" : "ukui-start-symbolic"); -- else -- icon = QIcon::fromTheme(bar->direction == Qt::LeftToRight ? "ukui-down-symbolic" : "ukui-up-symbolic"); -- -- if (!icon.isNull()) { -- int iconSize = proxy()->pixelMetric(QStyle::PM_SmallIconSize, option, widget); -- QPixmap pixmap = icon.pixmap(QSize(iconSize, iconSize), QIcon::Normal, QIcon::On); -- -- if(!sp->indicatorIconHoverNeedHighLight) -- pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -- else -- pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -- painter->save(); -- drawColorPixmap(painter, color, pixmap); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- proxy()->drawItemPixmap(painter, option->rect, Qt::AlignCenter, pixmap); -- painter->restore(); -- } -- } -- painter->restore(); -- return; -- } -- -- case CE_ScrollBarSubLine: { -- if (const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option)) { -- const bool active = bar->state & State_Active; -- painter->save(); -- painter->setPen(Qt::NoPen); -- if (active) { -- painter->setBrush(sp->scrollBarParameters.scrollBarGrooveDefaultBrush); -- } else { -- painter->setBrush(sp->scrollBarParameters.scrollBarGrooveInactiveBrush); -- } -- painter->drawRect(bar->rect); -- painter->restore(); -- painter->save(); -- QColor color = sp->Indicator_IconDefault; -- if(bar->sliderValue == bar->minimum || !(bar->state & State_Enabled)) -- color = sp->Indicator_IconDisable; -- else if((bar->activeSubControls & SC_ScrollBarSubLine) && option->state & State_Enabled){ -- if (option->state & (State_On | State_Sunken)) { -- color = sp->Indicator_IconSunken; -- } -- else if (option->state & State_MouseOver) { -- color = sp->Indicator_IconHover; -- } -- } -- -- QIcon icon = QIcon::fromTheme("ukui-start-symbolic"); -- -- const bool horizontal = (bar->orientation == Qt::Horizontal); -- if(horizontal) -- icon = QIcon::fromTheme(bar->direction == Qt::LeftToRight ? "ukui-start-symbolic": "ukui-end-symbolic"); -- else -- icon = QIcon::fromTheme(bar->direction == Qt::LeftToRight ? "ukui-up-symbolic" : "ukui-down-symbolic"); -- -- if (!icon.isNull()) { -- int iconSize = proxy()->pixelMetric(QStyle::PM_SmallIconSize, option, widget); -- QPixmap pixmap = icon.pixmap(QSize(iconSize, iconSize), QIcon::Normal, QIcon::On); -- -- if(!sp->indicatorIconHoverNeedHighLight) -- pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -- else -- pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -- painter->save(); -- drawColorPixmap(painter, color, pixmap); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- proxy()->drawItemPixmap(painter, option->rect, Qt::AlignCenter, pixmap); -- painter->restore(); -- } -- } -- painter->restore(); -- return; -- } -- -- case CE_PushButton: -- { -- if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { -- proxy()->drawControl(CE_PushButtonBevel, option, painter, widget); -- QStyleOptionButton subopt = *button; -- subopt.rect = proxy()->subElementRect(SE_PushButtonContents, option, widget); -- proxy()->drawControl(CE_PushButtonLabel, &subopt, painter, widget); -- return; -- } -- break; -- } -- -- case CE_PushButtonBevel: -- { -- sp->initPushButtonBevelParameters(isUseDarkPalette(), option, widget); -- proxy()->drawPrimitive(PE_PanelButtonCommand, option, painter, widget); -- return; -- } -- -- case CE_PushButtonLabel: -- { -- if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { -- sp->initPushButtonLabelParameters(isUseDarkPalette(), option, widget); -- const bool enable = button->state & State_Enabled; -- const bool text = !button->text.isEmpty(); -- const bool icon = !button->icon.isNull(); -- -- bool isImportant = false; -- if (widget && widget->property("isImportant").isValid()) { -- isImportant = widget->property("isImportant").toBool(); -- } -- -- QRect drawRect = button->rect; -- int spacing = 8; -- QStyleOption sub = *option; -- if (!sp->pushButtonParameters.iconHoverClickHighlight) { -- sub.state = enable ? State_Enabled : State_None; -- } else { -- sub.state = option->state; -- if (isImportant && !(button->features & QStyleOptionButton::Flat)) { -- sub.state = option->state | State_On; -- } -- } -- -- if (button->features & QStyleOptionButton::HasMenu) { -- QRect arrowRect; -- int indicator = proxy()->pixelMetric(PM_MenuButtonIndicator, option, widget); -- arrowRect.setRect(drawRect.right() - indicator, drawRect.top() + (drawRect.height() - indicator) / 2, indicator, indicator); -- arrowRect = visualRect(option->direction, option->rect, arrowRect); -- if (!text && !icon) { -- spacing = 0; -- } -- drawRect.setWidth(drawRect.width() - indicator - spacing); -- drawRect = visualRect(button->direction, button->rect, drawRect); -- sub.rect = arrowRect; -- proxy()->drawPrimitive(PE_IndicatorArrowDown, &sub, painter, widget); -- } -- -- int tf = Qt::AlignCenter; -- if (proxy()->styleHint(SH_UnderlineShortcut, button, widget)) { -- tf |= Qt::TextShowMnemonic; -- } -- QPixmap pixmap; -- if (icon) { -- QIcon::Mode mode = button->state & State_Enabled ? QIcon::Normal : QIcon::Disabled; -- if (mode == QIcon::Normal && button->state & State_HasFocus) { -- mode = QIcon::Active; -- } -- QIcon::State state = QIcon::Off; -- if (button->state & State_On) { -- state = QIcon::On; -- } -- pixmap = button->icon.pixmap(button->iconSize, mode, state); -- pixmap = proxy()->generatedIconPixmap(mode, pixmap, button); -- } -- -- QFontMetrics fm = button->fontMetrics; -- int textWidth = fm.boundingRect(option->rect, tf, button->text).width() + 2; -- int iconWidth = icon ? button->iconSize.width() : 0; -- QRect iconRect, textRect; -- if (icon && text) { -- int width = textWidth + spacing + iconWidth; -- if (width > drawRect.width()) { -- width = drawRect.width(); -- textWidth = width - spacing - iconWidth; -- } -- textRect.setRect(drawRect.x(), drawRect.y(), width, drawRect.height()); -- textRect.moveCenter(drawRect.center()); -- iconRect.setRect(textRect.left(), textRect.top(), iconWidth, textRect.height()); -- textRect.setRect(iconRect.right() + spacing + 1, textRect.y(), textWidth, textRect.height()); -- iconRect = visualRect(option->direction, drawRect, iconRect); -- textRect = visualRect(option->direction, drawRect, textRect); -- } else if (icon) { -- iconRect = drawRect; -- } else if (text) { -- textRect = drawRect; -- } -- -- if (iconRect.isValid()) { -- if (widget && !widget->property("useIconHighlightEffect").isValid()) { -- if (!sp->pushButtonParameters.iconHoverClickHighlight) { -- pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, &sub, widget); -- } else { -- pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, &sub, widget); -- } -- } else { -- pixmap = HighLightEffect::generatePixmap(pixmap, &sub, widget); -- } -- painter->save(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- /* -- * Use pushbutton own highlighteffect rule. Do not use ukui drawItemPixmap -- */ --// proxy()->drawItemPixmap(painter, iconRect, Qt::AlignCenter, pixmap); -- QStyle::drawItemPixmap(painter, iconRect, Qt::AlignCenter, pixmap); -- painter->restore(); -- } -- -- if (textRect.isValid()) { -- if (enable) { -- if (sp->pushButtonParameters.textHoverClickHighlight) { -- proxy()->drawItemText(painter, textRect, tf, button->palette, true, button->text, QPalette::HighlightedText); -- } else { -- proxy()->drawItemText(painter, textRect, tf, button->palette, true, button->text, QPalette::Text); -- } -- } else { -- proxy()->drawItemText(painter, textRect, tf, button->palette, false, button->text, QPalette::Text); -- } -- } -- return; -- } -- break; -- } -- -- case CE_ToolButtonLabel: -- { -- if (const QStyleOptionToolButton *tb = qstyleoption_cast<const QStyleOptionToolButton *>(option)) { -- sp->initToolButtonLabelParameters(isUseDarkPalette(), option, widget); -- const bool text = !tb->text.isEmpty(); -- const bool icon = !tb->icon.isNull(); -- const bool arrow = tb->features & QStyleOptionToolButton::MenuButtonPopup; -- const bool ha = tb->features & QStyleOptionToolButton::Arrow; -- const bool enable = tb->state & State_Enabled; -- QFontMetrics fm = tb->fontMetrics; -- int Margin_Height = sp->Button_MarginHeight; -- int ToolButton_MarginWidth = sp->ToolButton_MarginWidth; -- int Button_MarginWidth = proxy()->pixelMetric(PM_ButtonMargin, option, widget); -- -- int iconWidth = (icon || ha) ? tb->iconSize.width() : 0; -- int spacing = 8; -- QRect textRect, iconRect, arrowRect; -- QRect drawRect = tb->rect; -- -- QStyleOption sub = *option; -- if (!sp->toolButtonParameters.iconHoverClickHighlight) { -- sub.state = enable ? State_Enabled : State_None; -- } else { -- sub.state = option->state; -- } -- -- if (arrow) { -- int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, option, widget); -- drawRect.adjust(ToolButton_MarginWidth, Margin_Height, -ToolButton_MarginWidth, -Margin_Height); -- arrowRect.setRect(drawRect.right() - mbi + 1, drawRect.y(), mbi, drawRect.height()); -- drawRect.adjust(0, 0, - (mbi + spacing), 0); -- arrowRect = visualRect(option->direction, option->rect, arrowRect); -- drawRect = visualRect(option->direction, option->rect, drawRect); -- sub.rect = arrowRect; -- proxy()->drawPrimitive(PE_IndicatorArrowDown, &sub, painter, widget); -- } else { -- if (tb->toolButtonStyle == Qt::ToolButtonTextOnly) { -- drawRect.adjust(Button_MarginWidth, 0, -Button_MarginWidth, 0); -- } else if (tb->toolButtonStyle == Qt::ToolButtonIconOnly){ -- drawRect.adjust(0, Margin_Height, 0, -Margin_Height); -- } else { -- drawRect.adjust(ToolButton_MarginWidth, Margin_Height, -ToolButton_MarginWidth, -Margin_Height); -- } -- -- } -- -- int alignment = Qt::AlignCenter; -- if (proxy()->styleHint(SH_UnderlineShortcut, option, widget)) -- alignment |= Qt::TextShowMnemonic; -- int textDis = fm.boundingRect(option->rect, alignment, tb->text).width() + 2; -- QPixmap pixmap; -- if (icon) { -- QIcon::State state = tb->state & State_On ? QIcon::On : QIcon::Off; -- QIcon::Mode mode; -- if (!enable) -- mode = QIcon::Disabled; -- else if ((tb->state & State_MouseOver) && (tb->state & State_AutoRaise)) -- mode = QIcon::Active; -- else -- mode = QIcon::Normal; -- pixmap = tb->icon.pixmap(tb->iconSize, mode, state); -- pixmap = proxy()->generatedIconPixmap(mode, pixmap, tb); -- } -- -- if (tb->toolButtonStyle == Qt::ToolButtonTextOnly && text) { -- textRect = drawRect; -- } else if (tb->toolButtonStyle == Qt::ToolButtonIconOnly) { -- if (icon || ha) { -- iconRect = drawRect; -- } else if (text) { -- textRect = drawRect; -- } -- } else if (tb->toolButtonStyle == Qt::ToolButtonTextBesideIcon) { -- if (text) { -- int width = iconWidth + spacing + textDis; -- if (width > drawRect.width()) { -- width = drawRect.width(); -- textDis = drawRect.width() - iconWidth - spacing; -- } -- textRect.setRect(drawRect.x(), drawRect.y(), width, drawRect.height()); -- textRect.moveCenter(drawRect.center()); -- iconRect.setRect(textRect.x(), textRect.y(), iconWidth, textRect.height()); -- textRect.setRect(iconRect.right() + spacing + 1, textRect.y(), textDis, textRect.height()); -- iconRect = visualRect(option->direction, drawRect, iconRect); -- textRect = visualRect(option->direction, drawRect, textRect); -- } else { -- iconRect = drawRect; -- } -- } else if (tb->toolButtonStyle == Qt::ToolButtonTextUnderIcon) { -- if (text) { -- textDis = qMax(iconWidth, textDis); -- int height = fm.size(Qt::TextShowMnemonic, tb->text).height() + spacing + iconWidth; -- if (textDis > drawRect.width()) -- textDis = drawRect.width(); -- textRect.setRect(drawRect.x(), drawRect.y(), textDis, height); -- textRect.moveCenter(drawRect.center()); -- iconRect.setRect(textRect.x(), textRect.y(), textDis, iconWidth); -- textRect.setRect(textRect.x(), iconRect.bottom() + spacing + 1, textDis, fm.size(Qt::TextShowMnemonic, tb->text).height()); -- } else { -- iconRect = drawRect; -- } -- } -- -- if (textRect.isValid()) { -- if (enable) { -- if (sp->toolButtonParameters.textHoverClickHighlight) { -- proxy()->drawItemText(painter, textRect, alignment, tb->palette, true, tb->text, QPalette::HighlightedText); -- } else { -- proxy()->drawItemText(painter, textRect, alignment, tb->palette, true, tb->text, QPalette::Text); -- } -- } else { -- proxy()->drawItemText(painter, textRect, alignment, tb->palette, false, tb->text, QPalette::Text); -- } -- } -- -- if (iconRect.isValid()) { -- sub.rect = iconRect; -- switch (tb->arrowType) { -- case Qt::UpArrow: -- { -- proxy()->drawPrimitive(PE_IndicatorArrowUp, &sub, painter, widget); -- return; -- } -- case Qt::DownArrow: -- { -- proxy()->drawPrimitive(PE_IndicatorArrowDown, &sub, painter, widget); -- return; -- } -- case Qt::LeftArrow: -- { -- proxy()->drawPrimitive(PE_IndicatorArrowLeft, &sub, painter, widget); -- return; -- } -- case Qt::RightArrow: -- { -- proxy()->drawPrimitive(PE_IndicatorArrowRight, &sub, painter, widget); -- return; -- } -- default: -- break; -- } -- -- if (widget && !widget->property("useIconHighlightEffect").isValid()) { -- if (!sp->toolButtonParameters.iconHoverClickHighlight) { -- pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, &sub, widget); -- } else { -- pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, &sub, widget); -- } -- } else { -- pixmap = HighLightEffect::generatePixmap(pixmap, &sub, widget); -- } -- painter->save(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- /* -- * Use toolbutton own highlighteffect rule. Do not use ukui drawItemPixmap -- */ --// proxy()->drawItemPixmap(painter, iconRect, Qt::AlignCenter, pixmap); -- QStyle::drawItemPixmap(painter, iconRect, Qt::AlignCenter, pixmap); -- painter->restore(); -- } -- return; -- } -- break; -- } -- -- case CE_TabBarTab: -- { -- if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { -- proxy()->drawControl(CE_TabBarTabShape, tab, painter, widget); -- proxy()->drawControl(CE_TabBarTabLabel, tab, painter, widget); -- return; -- } -- break; -- } -- -- case CE_TabBarTabShape: -- { -- if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { -- sp->initTabWidgetParameters(isUseDarkPalette(), option, widget); -- bool selected = tab->state & State_Selected; -- bool hover = tab->state & State_MouseOver; -- bool click = tab->state & (State_On | State_Sunken); -- QRect drawRect = option->rect; -- QTransform rotMatrix; -- bool flip = false; -- painter->save(); -- painter->setPen(Qt::NoPen); --// painter->setRenderHint(QPainter::Antialiasing, true); -- -- switch (tab->shape) { -- case QTabBar::RoundedNorth: -- break; -- case QTabBar::RoundedSouth: -- { -- rotMatrix.rotate(180); -- rotMatrix.translate(0, -tab->rect.height() + 1); -- rotMatrix.scale(-1, 1); -- painter->setTransform(rotMatrix, true); -- break; -- } -- case QTabBar::RoundedWest: -- { -- flip = true; -- rotMatrix.rotate(180 + 90); -- rotMatrix.scale(-1, 1); -- painter->setTransform(rotMatrix, true); -- break; -- } -- case QTabBar::RoundedEast: -- { -- flip = true; -- rotMatrix.rotate(90); -- rotMatrix.translate(0, - tab->rect.width() + 1); -- painter->setTransform(rotMatrix); -- break; -- } -- default: -- painter->restore(); -- QCommonStyle::drawControl(element, tab, painter, widget); -- return; -- } -- -- if (flip) { -- drawRect.adjust(0, 0, 1, 0); -- QRect tmp = drawRect; -- drawRect = QRect(tmp.y(), tmp.x(), tmp.height(), tmp.width()); -- } else { -- drawRect.adjust(0, 0, 0, 1); -- } -- --// bool rtlHorTabs = (tab->direction == Qt::RightToLeft --// && (tab->shape == QTabBar::RoundedNorth || tab->shape == QTabBar::RoundedSouth)); --// bool fisttab = ((!rtlHorTabs && tab->position == QStyleOptionTab::Beginning) --// || (rtlHorTabs && tab->position == QStyleOptionTab::End)); --// bool lastTab = ((!rtlHorTabs && tab->position == QStyleOptionTab::End) --// || (rtlHorTabs && tab->position == QStyleOptionTab::Beginning)); --// bool onlyOne = tab->position == QStyleOptionTab::OnlyOneTab; -- -- int tabOverlap = proxy()->pixelMetric(PM_TabBarTabOverlap, option, widget); -- int TabBarTab_Radius = sp->tabWidgetParameters.radius; -- int moveWidth = 0; -- if(widget != NULL && qobject_cast<const QTabBar*>(widget)){ -- const auto *tabbar = qobject_cast<const QTabBar*>(widget); -- moveWidth = (tabbar->tabAt(QPoint(drawRect.x(),drawRect.y())) == tabbar->count() - 1) ? 1 : 0; -- } -- QPainterPath path; -- QPainterPath penPath; -- QPainterPath linePath; -- -- int penWidth = sp->tabWidgetParameters.tabBarPen.width(); -- -- if (selected) { -- drawRect.adjust(0, 0, tabOverlap, 0); -- path.moveTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); -- path.arcTo(QRect(drawRect.left(), drawRect.top(), TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, 90); -- path.lineTo(drawRect.left(), drawRect.bottom() - TabBarTab_Radius); -- path.arcTo(QRect(drawRect.left() - TabBarTab_Radius * 2, drawRect.bottom() - TabBarTab_Radius * 2, -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, -90); -- path.lineTo(drawRect.right() + TabBarTab_Radius, drawRect.bottom()); -- path.arcTo(QRect(drawRect.right(), drawRect.bottom() - TabBarTab_Radius * 2, -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 270, -90); -- path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); -- path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.top(), -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); -- path.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); -- --// penPath.moveTo(drawRect.left(), drawRect.bottom() - penWidth); --// penPath.lineTo(drawRect.left(), drawRect.top()); --// penPath.lineTo(drawRect.right() - 1, drawRect.top()); --// penPath.lineTo(drawRect.right() - 1, drawRect.bottom() - penWidth); --// penPath.lineTo(drawRect.left, drawRect.bottom() - penWidth); -- --// linePath.moveTo(drawRect.left() + 1, drawRect.bottom() - 1); --// linePath.lineTo(drawRect.right() - 2, drawRect.bottom() - 1); -- } else { -- if (widget != NULL && qobject_cast<const QTabBar*>(widget)) { -- const auto *tabbar = qobject_cast<const QTabBar*>(widget); -- int select_index = tabbar->currentIndex(); -- int now_index = tabbar->tabAt(QPoint(drawRect.x(),drawRect.y())); -- int tab_count = tabbar->count(); -- -- if (select_index - now_index == 1) { -- //select rect left -- drawRect.adjust(0, sp->TabBar_DefaultHeight_aug, tabOverlap, 0); -- if (now_index == 0) { -- path.moveTo(drawRect.left(), drawRect.top() + TabBarTab_Radius); -- path.lineTo(drawRect.left(), drawRect.bottom()); -- path.lineTo(drawRect.right() - TabBarTab_Radius, drawRect.bottom()); -- path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.bottom() - TabBarTab_Radius * 2, -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 270, 90); -- path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); -- path.arcTo(QRect(drawRect.right(), drawRect.top(), -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, -90); -- path.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); -- path.arcTo(QRect(drawRect.left(), drawRect.top(), -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, 90); -- --// penPath.moveTo(drawRect.left(), drawRect.bottom()); --// penPath.lineTo(drawRect.left(), drawRect.top()); --// penPath.lineTo(drawRect.right(), drawRect.top()); -- --// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); --// linePath.lineTo(drawRect.right(), drawRect.bottom() - 1); -- } else { -- path.moveTo(drawRect.left(), drawRect.top()); -- path.lineTo(drawRect.left(), drawRect.bottom()); -- path.lineTo(drawRect.right() - TabBarTab_Radius, drawRect.bottom()); -- path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.bottom() - TabBarTab_Radius * 2, -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 270, 90); -- path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); -- path.arcTo(QRect(drawRect.right(), drawRect.top(), -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, -90); -- path.lineTo(drawRect.left(), drawRect.top()); -- --// penPath.moveTo(drawRect.left(), drawRect.bottom()); --// penPath.lineTo(drawRect.left(), drawRect.top()); --// penPath.lineTo(drawRect.right(), drawRect.top()); -- --// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); --// linePath.lineTo(drawRect.right(), drawRect.bottom() - 1); -- } -- } else if(select_index - now_index == -1) { -- //select rect right -- drawRect.adjust(0, sp->TabBar_DefaultHeight_aug, tabOverlap, 0); -- if (now_index == tab_count - 1) { -- path.moveTo(drawRect.right(), drawRect.bottom()); -- path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); -- path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.top(), -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); -- path.lineTo(drawRect.left() - TabBarTab_Radius, drawRect.top()); -- path.arcTo(QRect(drawRect.left() - TabBarTab_Radius * 2, drawRect.top(), -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, -90); -- path.lineTo(drawRect.left(), drawRect.bottom() - TabBarTab_Radius); -- path.arcTo(QRect(drawRect.left(), drawRect.bottom() - TabBarTab_Radius * 2, -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, 90); -- path.lineTo(drawRect.right(), drawRect.bottom()); -- --// penPath.moveTo(drawRect.right() - moveWidth, drawRect.bottom()); --// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top()); --// penPath.lineTo(drawRect.left() - TabBarTab_Radius, drawRect.top()); -- --// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); --// linePath.lineTo(drawRect.right(), drawRect.bottom() - 1); -- } else { -- path.moveTo(drawRect.right(), drawRect.bottom()); -- path.lineTo(drawRect.right(), drawRect.top()); -- path.lineTo(drawRect.left() - TabBarTab_Radius, drawRect.top()); -- path.arcTo(QRect(drawRect.left() - TabBarTab_Radius * 2, drawRect.top(), TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, -90); -- path.lineTo(drawRect.left(), drawRect.bottom() - TabBarTab_Radius); -- path.arcTo(QRect(drawRect.left(), drawRect.bottom() - TabBarTab_Radius * 2, -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, 90); -- path.lineTo(drawRect.right(), drawRect.bottom()); -- --// penPath.moveTo(drawRect.right() - 1, drawRect.bottom()); --// penPath.lineTo(drawRect.right() - 1, drawRect.top()); --// penPath.lineTo(drawRect.left(), drawRect.top()); -- --// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); --// linePath.lineTo(drawRect.right() - 1, drawRect.bottom() - 1); -- } -- } else { -- if (now_index == 0) { -- drawRect.adjust(0, sp->TabBar_DefaultHeight_aug, tabOverlap, 0); -- path.moveTo(drawRect.left(), drawRect.top() + TabBarTab_Radius); -- path.lineTo(drawRect.left(), drawRect.bottom()); -- path.lineTo(drawRect.right(), drawRect.bottom()); -- path.lineTo(drawRect.right(), drawRect.top()); -- path.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); -- path.arcTo(QRect(drawRect.left(), drawRect.top(), -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, 90); -- --// penPath.moveTo(drawRect.left(), drawRect.bottom()); --// penPath.lineTo(drawRect.left(), drawRect.top()); --// penPath.lineTo(drawRect.right(), drawRect.top()); -- --// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); --// linePath.lineTo(drawRect.right(), drawRect.bottom() - 1); -- } else if (now_index == tab_count - 1) { -- drawRect.adjust(0, sp->TabBar_DefaultHeight_aug, tabOverlap, 0); -- path.moveTo(drawRect.right(), drawRect.bottom()); -- path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); -- path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.top(), -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); -- path.lineTo(drawRect.left(), drawRect.top()); -- path.lineTo(drawRect.left(), drawRect.bottom()); -- path.lineTo(drawRect.right(), drawRect.bottom()); -- --// penPath.moveTo(drawRect.right() - moveWidth, drawRect.bottom()); --// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top()); --// penPath.lineTo(drawRect.left(), drawRect.top()); -- --// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); --// linePath.lineTo(drawRect.right() - moveWidth, drawRect.bottom() - 1); -- } else { -- drawRect.adjust(0, sp->TabBar_DefaultHeight_aug, 0, 0); -- -- path.addRect(drawRect); -- --// if(now_index > select_index){ --// penPath.moveTo(drawRect.right(), drawRect.bottom()); --// penPath.lineTo(drawRect.right(), drawRect.top()); --// penPath.lineTo(drawRect.left(), drawRect.top()); --// } --// else if(now_index < select_index){ --// penPath.moveTo(drawRect.left(), drawRect.bottom()); --// penPath.lineTo(drawRect.left(), drawRect.top()); --// penPath.lineTo(drawRect.right(), drawRect.top()); --// } --// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); --// linePath.lineTo(drawRect.right(), drawRect.bottom() - 1); -- } -- } -- } else { -- path.addRect(drawRect); -- } -- } -- -- drawRect.adjust(0, 0, -1, 0); -- penPath.moveTo(drawRect.left(), drawRect.bottom() - penWidth); -- penPath.lineTo(drawRect.left(), drawRect.top()); -- penPath.lineTo(drawRect.right(), drawRect.top()); -- penPath.lineTo(drawRect.right(), drawRect.bottom() - penWidth); -- penPath.lineTo(drawRect.left(), drawRect.bottom() - penWidth); -- -- --// if(qobject_cast<const QTabBar*>(widget)->count() == 1){ --// penPath.moveTo(drawRect.left(), drawRect.bottom()); --// penPath.lineTo(drawRect.left(), drawRect.top()); --// penPath.lineTo(drawRect.right(), drawRect.top()); --// penPath.lineTo(drawRect.right(), drawRect.bottom()); -- --// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); --// linePath.lineTo(drawRect.right(), drawRect.bottom() - 1); --// } -- -- if(click) { -- painter->setBrush(sp->tabWidgetParameters.tabBarClickBrush); -- } -- else if (selected) { -- painter->setBrush(sp->tabWidgetParameters.tabBarSelectBrush); -- } else if (hover) { -- painter->setBrush(sp->tabWidgetParameters.tabBarHoverBrush); -- } else{ -- painter->setBrush(sp->tabWidgetParameters.tabBarDefaultBrush); -- } -- -- painter->drawPath(path); -- painter->restore(); -- -- if(!sp->TabBar_BorderLine || penWidth == 0) -- return; -- painter->save(); -- -- painter->setPen(sp->tabWidgetParameters.tabBarPen); -- painter->setBrush(Qt::NoBrush); -- if(!penPath.isEmpty()) -- painter->drawPath(penPath); -- painter->restore(); -- return; -- painter->save(); -- if(!hover && !click && selected){ -- painter->setPen( QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Midlight)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); -- } -- else{ -- painter->setPen(sp->tabWidgetParameters.tabBarPen); -- } -- painter->setBrush(Qt::NoBrush); -- painter->setRenderHint(QPainter::Antialiasing, true); -- if(painter->pen().width() == 1) -- painter->translate(0.5, 0.5); -- painter->drawPath(linePath); -- painter->restore(); -- return; -- } -- break; -- } -- -- case CE_TabBarTabLabel: -- { -- if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { -- int iconSize = proxy()->pixelMetric(PM_SmallIconSize, option, widget); -- bool verticalTabs = tab->shape == QTabBar::RoundedEast || tab->shape == QTabBar::RoundedWest -- || tab->shape == QTabBar::TriangularEast || tab->shape == QTabBar::TriangularWest; -- bool useSeparateLine = true; -- uint alignment = Qt::AlignLeft | Qt::AlignVCenter; -- if (proxy()->styleHint(SH_UnderlineShortcut, option, widget)) -- alignment |= Qt::TextShowMnemonic; -- else -- alignment |= Qt::TextHideMnemonic; -- -- QRect drawRect = tab->rect; -- QRect iconRect; -- QRect textRect = proxy()->subElementRect(SE_TabBarTabText, option, widget); -- tabLayout(tab, widget, proxy(), &textRect, &iconRect); -- -- if (widget && widget->property("useTabbarSeparateLine").isValid() && (!widget->property("useTabbarSeparateLine").toBool())){ -- useSeparateLine = false; -- } -- -- if (widget != NULL && qobject_cast<const QTabBar*>(widget)) { -- const auto *tabbar = qobject_cast<const QTabBar*>(widget); -- int now_index = tabbar->tabAt(QPoint(drawRect.x(),drawRect.y())); -- int tab_count = tabbar->count(); -- if(now_index == tab_count - 1) -- useSeparateLine = false; -- } -- -- painter->save(); -- if (verticalTabs) { -- int newX, newY, newRot; -- if (tab->shape == QTabBar::RoundedEast || tab->shape == QTabBar::TriangularEast) { -- newX = drawRect.width() + drawRect.x(); -- newY = drawRect.y(); -- newRot = 90; -- } else { -- newX = drawRect.x(); -- newY = drawRect.y() + drawRect.height(); -- newRot = -90; -- } -- QTransform m; -- m.translate(newX, newY); -- m.rotate(newRot); -- painter->setTransform(m, true); -- } -- -- if (!tab->icon.isNull()) { -- painter->save(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- QIcon::Mode mode = (tab->state & State_Enabled) ? QIcon::Normal : QIcon::Disabled; -- QPixmap pixmap = tab->icon.pixmap(widget ? widget->window()->windowHandle() : 0, tab->iconSize, -- mode, (tab->state & State_Selected) ? QIcon::On : QIcon::Off); -- pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); -- QPixmap drawPixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -- painter->drawPixmap(iconRect.x(), iconRect.y(), drawPixmap); -- painter->restore(); -- } -- -- proxy()->drawItemText(painter, textRect, alignment, tab->palette, tab->state & State_Enabled, tab->text, QPalette::ButtonText); -- painter->restore(); -- -- //draw separate line -- if (useSeparateLine && sp->TabBar_SplitLine) { -- if (true/*!(tab->state & State_Selected) && !(tab->state & State_MouseOver)*/) { -- int dis = ((verticalTabs ? drawRect.width() : drawRect.height()) - iconSize) / 2; -- painter->save(); -- painter->resetTransform(); -- painter->setPen(tab->palette.color(QPalette::Active, QPalette::Midlight)); -- painter->setBrush(Qt::NoBrush); -- if (verticalTabs) { -- if (tab->shape == QTabBar::RoundedEast || tab->shape == QTabBar::TriangularEast) { -- painter->drawLine(drawRect.x() + dis, drawRect.bottom(), drawRect.right() - dis, drawRect.bottom()); -- } else { -- painter->drawLine(drawRect.x() + dis, drawRect.top(), drawRect.right() - dis, drawRect.top()); -- } -- } else if (tab->direction == Qt::RightToLeft) { -- painter->drawLine(drawRect.x(), drawRect.top() + dis, drawRect.x(), drawRect.bottom() - dis); -- } else { -- painter->drawLine(drawRect.right(), drawRect.top() + dis, drawRect.right(), drawRect.bottom() - dis); -- } -- painter->restore(); -- } -- } -- -- return; -- } -- break; -- } -- -- case CE_ComboBoxLabel: -- { -- if (const QStyleOptionComboBox *comboBox = qstyleoption_cast<const QStyleOptionComboBox *>(option)) { -- QRect arrowRect = proxy()->subControlRect(CC_ComboBox, comboBox, SC_ComboBoxArrow, widget); -- QRect editRect = proxy()->subControlRect(CC_ComboBox, comboBox, SC_ComboBoxEditField, widget); -- -- QStyleOption arrow = *option; -- arrow.state = option->state & State_Enabled ? State_Enabled : State_None; -- arrow.rect = arrowRect; -- proxy()->drawPrimitive(PE_IndicatorArrowDown, &arrow, painter, widget); -- -- painter->save(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- if (!comboBox->currentIcon.isNull()) { -- QIcon::Mode mode = comboBox->state & State_Enabled ? QIcon::Normal : QIcon::Disabled; -- QPixmap pixmap = comboBox->currentIcon.pixmap(comboBox->iconSize, mode); -- pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); -- QRect iconRect; -- if (comboBox->direction == Qt::RightToLeft) { -- iconRect.setRect(editRect.right() - comboBox->iconSize.width(), editRect.y(), comboBox->iconSize.width(), editRect.height()); -- editRect.setRect(editRect.x(), editRect.y(), editRect.width() - iconRect.width() - 8, editRect.height()); -- } else { -- iconRect.setRect(editRect.x(), editRect.y(), comboBox->iconSize.width(), editRect.height()); -- editRect.setRect(editRect.x() + iconRect.width() + 8, editRect.y(), editRect.width() - iconRect.width() - 8, editRect.height()); -- } -- pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -- proxy()->drawItemPixmap(painter, iconRect, Qt::AlignCenter, pixmap); -- } -- -- if (!comboBox->currentText.isEmpty() && !comboBox->editable) { -- proxy()->drawItemText(painter, editRect, visualAlignment(option->direction, Qt::AlignLeft | Qt::AlignVCenter), -- option->palette, option->state & State_Enabled, comboBox->currentText); -- } -- painter->restore(); -- return; -- } -- break; -- } -- -- case CE_MenuScroller:{ -- if(widget == nullptr) -- return; -- else -- return Style::drawControl(element, option, painter, widget); -- } -- -- case CE_RadioButton: -- { -- if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { -- QStyleOptionButton subopt = *button; -- subopt.rect = proxy()->subElementRect(SE_RadioButtonIndicator, option, widget); -- proxy()->drawPrimitive(PE_IndicatorRadioButton, &subopt, painter, widget); -- subopt.rect = proxy()->subElementRect(SE_RadioButtonContents, option, widget); -- proxy()->drawControl(CE_RadioButtonLabel, &subopt, painter, widget); -- return; -- } -- break; -- } -- -- case CE_CheckBox: -- { -- if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { -- QStyleOptionButton subopt = *button; -- subopt.rect = proxy()->subElementRect(SE_CheckBoxIndicator, option, widget); -- proxy()->drawPrimitive(PE_IndicatorCheckBox, &subopt, painter, widget); -- subopt.rect = proxy()->subElementRect(SE_CheckBoxContents, option, widget); -- proxy()->drawControl(CE_CheckBoxLabel, &subopt, painter, widget); -- return; -- } -- break; -- } -- -- case CE_RadioButtonLabel: -- case CE_CheckBoxLabel: -- { -- if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { -- uint alignment = visualAlignment(button->direction, Qt::AlignLeft | Qt::AlignVCenter); -- const bool enable = button->state & State_Enabled; -- -- if (!proxy()->styleHint(SH_UnderlineShortcut, button, widget)) -- alignment |= Qt::TextHideMnemonic; -- QPixmap pixmap; -- QRect textRect = button->rect; -- painter->save(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- if (!button->icon.isNull()) { -- QIcon::Mode mode = enable ? QIcon::Normal : QIcon::Disabled; -- pixmap = button->icon.pixmap(button->iconSize, mode); -- pixmap = proxy()->generatedIconPixmap(mode, pixmap, button); -- pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, button, widget); -- proxy()->drawItemPixmap(painter, button->rect, alignment, pixmap); -- if (button->direction == Qt::RightToLeft) -- textRect.setRight(textRect.right() - button->iconSize.width() - sp->IconButton_Distance); -- else -- textRect.setLeft(textRect.left() + button->iconSize.width() + sp->IconButton_Distance); -- } -- if (!button->text.isEmpty()){ -- proxy()->drawItemText(painter, textRect, alignment | Qt::TextShowMnemonic, -- button->palette, button->state & State_Enabled, button->text, QPalette::WindowText); -- } -- painter->restore(); -- return; -- } -- break; -- } -- -- case CE_SizeGrip: -- { -- /* -- * Style is not required here, as required by design -- */ -- return; -- -- }break; -- -- -- //Drawing of single menu item of menu bar -- case CE_MenuBarItem: -- { -- -- painter->save(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- if (const QStyleOptionMenuItem *mbi = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) -- { -- QStyleOptionMenuItem item = *mbi; -- item.rect = mbi->rect.adjusted(0, 1, 0, -3); -- painter->fillRect(option->rect, option->palette.window()); -- -- uint alignment = Qt::AlignCenter | Qt::TextShowMnemonic | Qt::TextDontClip| Qt::TextSingleLine; -- -- if (!proxy()->styleHint(SH_UnderlineShortcut, mbi, widget)) -- alignment |= Qt::TextHideMnemonic; -- -- QPixmap pix = mbi->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize, option, widget), QIcon::Normal); -- if (!pix.isNull()) { -- pix = HighLightEffect::ordinaryGeneratePixmap(pix, mbi, widget); -- proxy()->drawItemPixmap(painter,mbi->rect, alignment, pix); -- } else -- proxy()->drawItemText(painter, mbi->rect, alignment, mbi->palette, mbi->state & State_Enabled, -- mbi->text, QPalette::ButtonText); -- -- bool act = (mbi->state & State_Selected) && ((mbi->state & State_Sunken) | (mbi->state & State_HasFocus)); -- bool dis = !(mbi->state & State_Enabled); -- -- -- QRect r = option->rect; -- //when hover、click and other state, begin to draw style -- if (act) { -- painter->setBrush(option->palette.highlight().color()); -- painter->setPen(Qt::NoPen); -- painter->drawRoundedRect(r.adjusted(0, 0, -1, -1),4,4); -- -- QPalette::ColorRole textRole = dis ? QPalette::Text : QPalette::HighlightedText; -- uint alignment = Qt::AlignCenter | Qt::TextShowMnemonic | Qt::TextDontClip | Qt::TextSingleLine; -- if (!Style::styleHint(SH_UnderlineShortcut, mbi, widget)) -- alignment |= Qt::TextHideMnemonic; -- proxy()->drawItemText(painter, item.rect, alignment, mbi->palette, mbi->state & State_Enabled, mbi->text, textRole); -- } else { -- -- } -- } -- painter->restore(); -- -- return; -- break; -- -- } -- -- -- -- case CE_MenuItem: -- { -- if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) { -- const bool enable(menuItem->state & State_Enabled); -- if (menuItem->menuItemType == QStyleOptionMenuItem::EmptyArea) { -- return; -- } -- sp->initMenuParameters(isUseDarkPalette(), option, widget); -- -- QRect drawRect = menuItem->rect; -- if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) { -- painter->save(); -- QColor SepColor = menuItem->palette.color(QPalette::Active, QPalette::BrightText); -- SepColor.setAlphaF(0.1); -- painter->setPen(QPen(SepColor, 1, Qt::SolidLine, Qt::RoundCap)); -- painter->setBrush(Qt::NoBrush); -- painter->drawLine(QPointF(drawRect.left() + sp->MenuItemSeparator_MarginWidth, drawRect.center().y()), -- QPointF(drawRect.right() - sp->MenuItemSeparator_MarginWidth, drawRect.center().y())); -- painter->restore(); -- return; -- } -- -- const bool sunken(menuItem->state & State_Sunken); -- const bool selected(menuItem->state & State_Selected); -- const bool layout(menuItem->direction == Qt::LeftToRight); -- bool isComboBox = qobject_cast<const QComboBox*>(widget); -- -- //if it's comobobox popup, set combobox popup size rect -- if (isComboBox) { -- int MenuItem_HMargin = proxy()->pixelMetric(PM_MenuHMargin, option, widget); -- drawRect.adjust(MenuItem_HMargin, sp->ComboBox_VMargin, -MenuItem_HMargin, -1 * sp->ComboBox_VMargin); -- } -- -- if (enable && (selected | sunken)) { -- painter->save(); -- painter->setRenderHint(QPainter::Antialiasing); -- painter->setPen(Qt::NoPen); -- painter->setBrush(sp->menuParameters.menuItemSelectBrush); -- painter->drawRoundedRect(drawRect, sp->menuParameters.itemRadius, sp->menuParameters.itemRadius); -- painter->restore(); -- } -- -- int MenuItem_Spacing = sp->MenuItem_Spacing; -- int MenuItem_HMargin = sp->MenuContent_HMargin; -- //去除item边框 -- drawRect = drawRect.adjusted(MenuItem_HMargin, sp->MenuItem_MarginHeight, -MenuItem_HMargin, -sp->MenuItem_MarginHeight); -- -- //Checkable items draw -- if (menuItem->menuHasCheckableItems) { -- const bool checked = menuItem->checked; -- if (menuItem->checkType == QStyleOptionMenuItem::Exclusive) { -- if (checked) { --// QStyleOptionButton radioOption; --// radioOption.QStyleOption::operator=(*option); --// radioOption.rect = drawRect; --// radioOption.state |= State_On; --// radioOption.rect = proxy()->subElementRect(SE_RadioButtonIndicator, &radioOption, widget); --// proxy()->drawPrimitive(PE_IndicatorRadioButton, &radioOption, painter, widget); -- int iconWidth = proxy()->pixelMetric(PM_SmallIconSize, option, widget); -- QIcon icon = QIcon::fromTheme("object-select-symbolic"); -- QIcon::Mode mode = enable ? QIcon::Active : QIcon::Disabled; -- QPixmap pixmap = icon.pixmap(iconWidth, iconWidth, mode , QIcon::On); -- QPixmap drawPixmap; -- drawPixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -- -- QRect iconRect(drawRect.x(), drawRect.y() + (drawRect.height() - iconWidth) / 2, iconWidth, iconWidth); -- iconRect = visualRect(menuItem->direction, drawRect, iconRect); -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setBrush(Qt::NoBrush); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- painter->drawPixmap(iconRect, drawPixmap); -- painter->restore(); -- } -- } else if (menuItem->checkType == QStyleOptionMenuItem::NonExclusive) { -- if (checked) { -- int iconWidth = proxy()->pixelMetric(PM_SmallIconSize, option, widget); -- QIcon icon = QIcon::fromTheme("object-select-symbolic"); -- QIcon::Mode mode = enable ? (selected ? QIcon::Active : QIcon::Normal) : QIcon::Disabled; -- QPixmap pixmap = icon.pixmap(iconWidth, iconWidth, mode , QIcon::On); -- QPixmap drawPixmap; -- drawPixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -- -- QRect iconRect(drawRect.x(), drawRect.y() + (drawRect.height() - iconWidth) / 2, iconWidth, iconWidth); -- iconRect = visualRect(menuItem->direction, drawRect, iconRect); -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setBrush(Qt::NoBrush); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- painter->drawPixmap(iconRect, drawPixmap); -- painter->restore(); -- } -- } -- } -- -- -- bool hasIcon = false; -- if(isComboBox) -- { -- if(!menuItem->icon.isNull()) -- hasIcon = true; --// auto *comboBox = qobject_cast<const QComboBox*>(widget); --// int column = comboBox->count(); --// for(int i = 0; i < column; i++) --// { --// if(!comboBox->itemIcon(i).isNull()){ --// hasIcon = true; --// break; --// } --// } -- } -- else if(menuItem->maxIconWidth != 0) -- hasIcon = true; -- --// if(qobject_cast<const QMenu*>(widget)) --// { --// auto *menu = qobject_cast<const QMenu*>(widget); --// int column = menu->actions().length(); --// for(int i = 0; i < column; i++) --// { --// if(!menu->actions().at(i)->icon().isNull()) --// { --// hasIcon = true; --// } --// } --// } -- -- if (menuItem->menuHasCheckableItems || hasIcon) { -- int iconWidth = proxy()->pixelMetric(PM_SmallIconSize, option, widget); -- int w = (menuItem->menuHasCheckableItems ? iconWidth : 0) + -- (hasIcon ? iconWidth : 0) + -- ((menuItem->menuHasCheckableItems && hasIcon) ? MenuItem_Spacing : 0); -- drawRect = visualRect(menuItem->direction, drawRect, drawRect.adjusted(w + MenuItem_Spacing, 0, 0, 0)); -- } else { -- drawRect = drawRect.adjusted(4, 0, -4, -0);//去除item边框 -- } -- -- -- if (menuItem->menuItemType == QStyleOptionMenuItem::SubMenu) { -- int indWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); -- int indHight = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); -- QRect indRect(drawRect.right() - indWidth, drawRect.y() + (drawRect.height() - indHight)/2, indWidth, indHight);//箭头绘制是居中的,绘制会有写误差。 -- indRect = visualRect(menuItem->direction, drawRect, indRect); -- QStyleOption indOption = *option; -- if (selected) -- indOption.state |= State_MouseOver; -- indOption.rect = indRect; -- proxy()->drawPrimitive(layout ? PE_IndicatorArrowRight : PE_IndicatorArrowLeft, &indOption, painter, widget); -- drawRect = visualRect(menuItem->direction, drawRect, drawRect.adjusted(0, 0, -(indWidth + MenuItem_Spacing), 0)); -- } -- -- if (hasIcon) { -- int smallIconSize = proxy()->pixelMetric(PM_SmallIconSize, option, widget); -- QSize iconSize(smallIconSize, smallIconSize); -- QIcon::Mode mode = enable ? (selected ? QIcon::Active : QIcon::Normal) : QIcon::Disabled; -- QIcon::State state = menuItem->checked ? QIcon::On : QIcon::Off; -- QPixmap pixmap = menuItem->icon.pixmap(iconSize, mode, state); -- pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); -- QPixmap target; -- target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -- -- int recX = drawRect.x() - (MenuItem_Spacing + smallIconSize); -- QRect iconRect(recX, drawRect.y() + (drawRect.height() - smallIconSize)/2, smallIconSize, smallIconSize); -- iconRect = visualRect(menuItem->direction, drawRect, iconRect); -- painter->save(); -- painter->setPen(menuItem->palette.color(QPalette::Active, QPalette::Text)); -- painter->setBrush(Qt::NoBrush); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- painter->drawPixmap(iconRect, target); -- painter->restore(); -- } -- //text -- if (!menuItem->text.isEmpty()) { -- QString text = menuItem->text; -- painter->save(); -- if (enable) { -- if (selected | sunken) { -- painter->setPen(sp->menuParameters.menuTextHoverPen); -- } else { -- painter->setPen(menuItem->palette.color(QPalette::Active, QPalette::Text)); -- } -- } else { -- painter->setPen(menuItem->palette.color(QPalette::Disabled, QPalette::Text)); -- } -- painter->setBrush(Qt::NoBrush); -- -- int text_flags = Qt::AlignVCenter | Qt::TextDontClip | Qt::TextSingleLine; -- if (proxy()->styleHint(SH_UnderlineShortcut, option, widget)) -- text_flags |= Qt::TextShowMnemonic; -- int textToDraw_flags = text_flags; -- int t = menuItem->text.indexOf(QLatin1Char('\t')); -- if (t >=0) { -- const QString textToDraw = menuItem->text.mid(t + 1); -- text = menuItem->text.left(t); -- if (layout) -- textToDraw_flags |= Qt::AlignRight; -- else -- textToDraw_flags |= Qt::AlignLeft; -- painter->drawText(drawRect, textToDraw_flags, textToDraw); -- } -- -- QFont font = menuItem->font; -- font.setPointSizeF(QFontInfo(menuItem->font).pointSizeF()); -- if (menuItem->menuItemType == QStyleOptionMenuItem::DefaultItem) -- font.setBold(true); -- painter->setFont(font); -- -- if (layout) -- text_flags |= Qt::AlignLeft; -- else -- text_flags |= Qt::AlignRight; -- -- QFontMetrics metrics(font); -- QString elidedText = metrics.elidedText(text, Qt::ElideRight, drawRect.width()); -- -- painter->drawText(drawRect, text_flags, elidedText); -- painter->restore(); -- } -- return; -- } -- break; -- } -- -- -- -- // Draw UKUI ToolBoxTab Style -- case CE_ToolBoxTab: -- if (const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(option)) { -- proxy()->drawControl(CE_ToolBoxTabShape, tb, painter, widget); -- proxy()->drawControl(CE_ToolBoxTabLabel, tb, painter, widget); -- return; -- } -- break; -- -- case CE_ToolBoxTabShape: -- if (const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(option)) { -- painter->save(); -- painter->setPen(Qt::NoPen); -- if(widget->isEnabled()){ -- painter->setBrush(tb->palette.button().color()); -- if(option->state & State_MouseOver) -- { -- painter->setBrush(tb->palette.button().color().darker(110)); -- if(option->state & State_Sunken) -- painter->setBrush(tb->palette.button().color().darker(110)); -- } -- } -- else { -- painter->setBrush(tb->palette.color(QPalette::Disabled,QPalette::Button)); -- } -- -- if (tb->direction != Qt::RightToLeft || tb->direction != Qt::RightToLeft) { -- painter->drawRoundedRect(option->rect,4,4); -- } -- painter->restore(); -- return; -- } break; -- -- case CE_ToolBoxTabLabel: -- if (const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(option)) { -- bool enabled = tb->state & State_Enabled; -- bool selected = tb->state & State_Selected; -- int iconExtent = proxy()->pixelMetric(QStyle::PM_SmallIconSize, tb, widget); -- QPixmap pm = tb->icon.pixmap(widget ? widget->window()->windowHandle() : 0, QSize(iconExtent, iconExtent),enabled ? QIcon::Normal : QIcon::Disabled); -- -- QRect cr = subElementRect(QStyle::SE_ToolBoxTabContents, tb, widget); -- QRect tr, ir; -- int ih = 0; -- if (pm.isNull()) { -- tr = cr; -- tr.adjust(4, 0, -8, 0); -- } else { -- int iw = pm.width() / pm.devicePixelRatio() + 4; -- ih = pm.height()/ pm.devicePixelRatio(); -- ir = QRect(cr.left() + 4, cr.top(), iw + 2, ih); -- tr = QRect(ir.right(), cr.top(), cr.width() - ir.right() - 4, cr.height()); -- } -- -- if (selected && proxy()->styleHint(QStyle::SH_ToolBox_SelectedPageTitleBold, tb, widget)) { -- QFont f(painter->font()); -- f.setBold(true); -- painter->setFont(f); -- } -- -- QString txt = tb->fontMetrics.elidedText(tb->text, Qt::ElideRight, tr.width()); -- -- if (ih) { -- painter->save(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- painter->drawPixmap(ir.left(), (tb->rect.height() - ih) / 2, pm); -- painter->restore(); -- } -- -- int alignment = Qt::AlignCenter | Qt::AlignVCenter | Qt::TextShowMnemonic; -- if (!proxy()->styleHint(QStyle::SH_UnderlineShortcut, tb, widget)) -- alignment |= Qt::TextHideMnemonic; -- -- // painter->drawText(option->rect,tb->text, QTextOption(Qt::AlignCenter)); -- proxy()->drawItemText(painter, tr, alignment, tb->palette, enabled, txt, QPalette::ButtonText); -- -- if (!txt.isEmpty() && option->state & State_HasFocus) { -- QStyleOptionFocusRect opt; -- opt.rect = tr; -- opt.palette = tb->palette; -- opt.state = QStyle::State_None; -- proxy()->drawPrimitive(QStyle::PE_FrameFocusRect, &opt, painter, widget); -- } -- return; -- } break; -- -- case CE_ProgressBar: -- { -- if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { -- QStyleOptionProgressBar subOption = *pb; -- subOption.rect = proxy()->subElementRect(SE_ProgressBarGroove, pb, widget); -- proxy()->drawControl(CE_ProgressBarGroove, &subOption, painter, widget); -- subOption.rect = proxy()->subElementRect(SE_ProgressBarContents, pb, widget); -- proxy()->drawControl(CE_ProgressBarContents, &subOption, painter, widget); -- if (pb->textVisible) { -- subOption.rect = proxy()->subElementRect(SE_ProgressBarLabel, pb, widget); -- proxy()->drawControl(CE_ProgressBarLabel, &subOption, painter, widget); -- } -- return; -- } -- break; -- } -- -- case CE_ProgressBarGroove: -- { -- sp->initProgressBarParameters(isUseDarkPalette(), option, widget); -- const bool enable = option->state & State_Enabled; -- int width = 0; -- -- painter->save(); -- if(sp->progressBarParameters.radius != 0) -- painter->setRenderHint(QPainter::Antialiasing, true); -- if (!enable) { -- width = sp->progressBarParameters.progressBarGrooveDisablePen.width(); -- painter->setPen(sp->progressBarParameters.progressBarGrooveDisablePen); -- painter->setBrush(sp->progressBarParameters.progressBarGrooveDisableBrush); -- } else { -- width = sp->progressBarParameters.progressBarGrooveDefaultPen.width(); -- painter->setPen(sp->progressBarParameters.progressBarGrooveDefaultPen); -- painter->setBrush(sp->progressBarParameters.progressBarGrooveDefaultBrush); -- } -- if(width == 1 && sp->progressBarParameters.radius != 0) -- painter->translate(0.5, 0.5); -- painter->drawRoundedRect(option->rect.adjusted(width, width, -width, -width), sp->progressBarParameters.radius, sp->progressBarParameters.radius); -- painter->restore(); -- return; -- } -- -- case CE_ProgressBarContents: -- { -- if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { -- sp->initProgressBarParameters(isUseDarkPalette(), pb, widget); -- -- QBrush brush = sp->progressBarParameters.progressBarContentBrush; -- -- const bool vertical = pb->orientation == Qt::Vertical; -- const bool inverted = pb->invertedAppearance; -- -- bool reverse = (!vertical && (pb->direction == Qt::RightToLeft)) || vertical; -- if (inverted) -- reverse = !reverse; -- -- QColor progressBarContentHightColor = sp->progressBarParameters.progressBarContentHightColor; -- QColor progressBarContentMidLightColor = sp->progressBarParameters.progressBarContentMidLightColor; -- -- QLinearGradient linearGradient; -- if (QVariantAnimation *animation = m_animation_helper->animation(option->styleObject)) { -- if(animation->state() == QAbstractAnimation::Running){ -- bool forward = animation->direction() == QAbstractAnimation::Forward; -- if(!forward) -- reverse = !reverse; -- -- linearGradient.setColorAt(0, progressBarContentMidLightColor); -- linearGradient.setColorAt(1, progressBarContentHightColor); -- -- if (vertical) { -- if (reverse) { -- linearGradient.setStart(pb->rect.bottomLeft()); -- linearGradient.setFinalStop(pb->rect.topLeft()); -- } else { -- linearGradient.setStart(pb->rect.topLeft()); -- linearGradient.setFinalStop(pb->rect.bottomLeft()); -- } -- } else { -- if (reverse) { -- linearGradient.setStart(pb->rect.topRight()); -- linearGradient.setFinalStop(pb->rect.topLeft()); -- } else { -- linearGradient.setStart(pb->rect.topLeft()); -- linearGradient.setFinalStop(pb->rect.topRight()); -- } -- } -- -- brush = QBrush(linearGradient); -- } -- } -- -- -- int width = sp->progressBarParameters.progressBarContentPen.width(); -- painter->save(); -- if(sp->progressBarParameters.radius != 0) -- painter->setRenderHint(QPainter::Antialiasing, true); -- if(width == 1 && sp->progressBarParameters.radius != 0) -- painter->translate(0.5, 0.5); -- painter->setPen(sp->progressBarParameters.progressBarContentPen); -- painter->setBrush(brush); -- painter->drawRoundedRect(pb->rect.adjusted(width, width, -width, -width), sp->progressBarParameters.radius, sp->progressBarParameters.radius); -- painter->restore(); -- return; -- } -- break; -- } -- -- case CE_ProgressBarLabel: -- { -- if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { -- if (pb->textVisible) { -- const auto progress = qMax(pb->progress, pb->minimum); -- const bool vertical = pb->orientation == Qt::Vertical; -- const bool inverted = pb->invertedAppearance; -- const bool indeterminate = (pb->minimum == 0 && pb->maximum == 0); -- -- int maxWidth = vertical ? pb->rect.height() : pb->rect.width(); -- const auto totalSteps = qMax(Q_INT64_C(1), qint64(pb->maximum) - pb->minimum); -- const auto progressSteps = qint64(progress) - pb->minimum; -- const auto progressBarWidth = progressSteps * maxWidth / totalSteps; -- int len = indeterminate ? maxWidth : progressBarWidth; -- -- bool reverse = (!vertical && (pb->direction == Qt::RightToLeft)) || vertical; -- if (inverted) -- reverse = !reverse; -- -- painter->save(); -- painter->setBrush(Qt::NoBrush); -- QRect rect = pb->rect; -- if (pb->orientation == Qt::Vertical) { -- rect.setRect(rect.y(), rect.x(), rect.height(), rect.width()); -- QTransform m; -- m.rotate(90); -- m.translate(0, -rect.height()); -- painter->setTransform(m, true); -- } -- QRect textRect(rect.x(), rect.y(), pb->fontMetrics.horizontalAdvance(pb->text), rect.height()); -- textRect.moveCenter(rect.center()); -- if (len <= textRect.left()) { -- painter->setPen(pb->palette.color(QPalette::Active, QPalette::WindowText)); -- painter->drawText(textRect, pb->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); -- } else if (len >= textRect.right()) { -- painter->setPen(pb->palette.color(QPalette::Active, QPalette::HighlightedText)); -- painter->drawText(textRect, pb->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); -- } else { -- QRect leftRect(textRect.x(), textRect.y(), len - textRect.left(), textRect.height()); -- QRect rightRect(leftRect.right() + 1, textRect.y(), textRect.right() + 1 - len, textRect.height()); -- if (reverse) { -- leftRect.setRect(textRect.left(), textRect.top(), maxWidth - len - textRect.left(), textRect.height()); -- rightRect.setRect(leftRect.right() + 1, textRect.top(), textRect.width() - leftRect.width(), textRect.height()); -- painter->setPen(pb->palette.color(QPalette::Active, QPalette::HighlightedText)); -- painter->setClipRect(rightRect); -- painter->drawText(textRect, pb->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); -- painter->setPen(pb->palette.color(QPalette::Active, QPalette::WindowText)); -- painter->setClipRect(leftRect); -- painter->drawText(textRect, pb->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); -- } else { -- painter->setPen(pb->palette.color(QPalette::Active, QPalette::WindowText)); -- painter->setClipRect(rightRect); -- painter->drawText(textRect, pb->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); -- painter->setPen(pb->palette.color(QPalette::Active, QPalette::HighlightedText)); -- painter->setClipRect(leftRect); -- painter->drawText(textRect, pb->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); -- } -- } -- painter->resetTransform(); -- painter->restore(); -- } -- return; -- } -- break; -- } -- -- case CE_Header: -- { -- if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) { -- QRegion clipRegion = painter->clipRegion(); -- painter->setClipRect(option->rect); -- proxy()->drawControl(CE_HeaderSection, option, painter, widget); -- QStyleOptionHeader subopt = *header; -- subopt.rect = proxy()->subElementRect(SE_HeaderLabel, header, widget); -- if (subopt.rect.isValid()) -- proxy()->drawControl(CE_HeaderLabel, &subopt, painter, widget); -- if (header->sortIndicator != QStyleOptionHeader::None) { -- subopt.rect = proxy()->subElementRect(SE_HeaderArrow, option, widget); -- proxy()->drawPrimitive(PE_IndicatorHeaderArrow, &subopt, painter, widget); -- } -- painter->setClipRegion(clipRegion); -- return; -- } -- break; -- } -- -- case CE_HeaderSection: -- { -- if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) { -- const bool enable = header->state & State_Enabled; -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setBrush(header->palette.brush(enable ? QPalette::Active : QPalette::Disabled, QPalette::Base)); -- painter->drawRect(header->rect); -- painter->restore(); -- painter->save(); -- QColor color = header->palette.color(QPalette::Active, isUseDarkPalette() ? QPalette::Midlight : QPalette::Shadow); -- painter->setPen(color); -- painter->setBrush(Qt::NoBrush); -- if (header->orientation == Qt::Horizontal) { --// int iconSize = proxy()->pixelMetric(PM_SmallIconSize); --// int dis = (header->rect.height() - iconSize) / 2 - 1; -- int dis = (header->rect.height() / 2) / 2; -- if (header->position != QStyleOptionHeader::End && header->position != QStyleOptionHeader::OnlyOneSection) { -- if (header->direction == Qt::LeftToRight) { -- painter->drawLine(header->rect.right(), header->rect.top() + dis, header->rect.right(), header->rect.bottom() - dis); -- } else { -- painter->drawLine(header->rect.left(), header->rect.top() + dis, header->rect.left(), header->rect.bottom() - dis); -- } -- } -- painter->drawLine(header->rect.left(), header->rect.bottom(), header->rect.right(), header->rect.bottom()); -- } -- painter->restore(); -- return; -- } -- break; -- } -- -- case CE_HeaderLabel: -- { -- if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) { -- QRect rect = header->rect; -- QRect textRect = header->rect; -- int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, option, widget); -- textRect.adjust(margin, 0, -margin, -0); -- -- int iconSize = proxy()->pixelMetric(PM_SmallIconSize); -- if (!header->icon.isNull()) { -- QIcon::Mode mode = header->state & State_Enabled ? QIcon::Normal : QIcon::Disabled; -- QPixmap pixmap = header->icon.pixmap(iconSize, iconSize, mode); -- pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); -- pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -- QRect iconRect(textRect.x(), textRect.y() + (textRect.height() - iconSize) / 2, iconSize, iconSize); -- textRect.setRect(iconRect.right() + 1 + 8, textRect.y(), textRect.width() - iconRect.width() - 8, textRect.height()); -- iconRect = visualRect(header->direction, rect, iconRect); -- textRect = visualRect(header->direction, rect, textRect); -- painter->save(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- painter->drawPixmap(iconRect, pixmap); -- painter->restore(); -- } -- -- if (header->state & QStyle::State_On || header->state & QStyle::State_Sunken) { -- QFont font = painter->font(); -- font.setBold(true); -- painter->setFont(font); -- } -- -- proxy()->drawItemText(painter, textRect, header->textAlignment | Qt::AlignVCenter, header->palette, -- (header->state & State_Enabled), header->text, QPalette::ButtonText); -- return; -- } -- break; -- } -- -- case CE_HeaderEmptyArea: -- { -- const bool enable = option->state & State_Enabled; -- painter->save(); -- painter->setPen(Qt::NoPen); -- painter->setBrush(option->palette.brush(enable ? QPalette::Active : QPalette::Disabled, QPalette::Base)); -- painter->drawRect(option->rect); -- painter->restore(); -- return; -- } -- -- case CE_ItemViewItem: -- { -- if (const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option)) { -- painter->save(); -- if (painter->clipPath().isEmpty()) -- painter->setClipRect(option->rect); -- -- QRect checkRect = proxy()->subElementRect(SE_ItemViewItemCheckIndicator, option, widget); -- QRect iconRect = proxy()->subElementRect(SE_ItemViewItemDecoration, option, widget); -- QRect textRect = proxy()->subElementRect(SE_ItemViewItemText, option, widget); -- -- proxy()->drawPrimitive(PE_PanelItemViewItem, option, painter, widget); -- -- if (vi->features & QStyleOptionViewItem::HasCheckIndicator) { -- QStyleOptionButton option; -- option.rect = checkRect; -- option.state = vi->state & ~QStyle::State_HasFocus; -- option.palette = vi->palette; -- -- switch (vi->checkState) { -- case Qt::Unchecked: -- option.state |= QStyle::State_Off; -- break; -- case Qt::PartiallyChecked: -- option.state |= QStyle::State_NoChange; -- break; -- case Qt::Checked: -- option.state |= QStyle::State_On; -- break; -- } -- proxy()->drawPrimitive(QStyle::PE_IndicatorViewItemCheck, &option, painter, widget); -- } -- -- if (!vi->icon.isNull()) { -- QIcon::Mode mode = QIcon::Normal; -- if (!(vi->state & QStyle::State_Enabled)) -- mode = QIcon::Disabled; --// else if (vi->state & QStyle::State_Selected) --// mode = QIcon::Selected; -- QIcon::State state = vi->state & QStyle::State_Open ? QIcon::On : QIcon::Off; -- QPixmap pixmap = vi->icon.pixmap(vi->decorationSize, mode, state); -- pixmap = proxy()->generatedIconPixmap(mode, pixmap, vi); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- proxy()->drawItemPixmap(painter, iconRect, vi->decorationAlignment, HighLightEffect::ordinaryGeneratePixmap(pixmap, vi, widget)); -- } -- -- -- -- QPen ViewItemHover; -- QPen ViewItemSelect; -- if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) { -- ViewItemHover = sp->treeParameters.treeTextHoverPen; -- ViewItemSelect = sp->treeParameters.treeTextSelectPen; -- } else if(qobject_cast<const QListView *>(widget) || qobject_cast<const QListWidget *>(widget)){ -- ViewItemHover = sp->listParameters.listTextHoverPen; -- ViewItemSelect = sp->listParameters.listTextSelectPen; -- } else if(qobject_cast<const QTableView *>(widget) || qobject_cast<const QTableWidget *>(widget)){ -- ViewItemHover = sp->tableParameters.tableTextHoverPen; -- ViewItemSelect = sp->tableParameters.tableTextSelectPen; -- } -- else { -- -- } -- -- -- if (!vi->text.isEmpty()) { -- QPalette::ColorGroup cg = vi->state & QStyle::State_Enabled -- ? QPalette::Normal : QPalette::Disabled; -- if (cg == QPalette::Normal && !(vi->state & QStyle::State_Active)) -- cg = QPalette::Inactive; -- -- if (((vi->decorationPosition == QStyleOptionViewItem::Top) || (vi->decorationPosition == QStyleOptionViewItem::Bottom)) -- && !(vi->state & State_Selected) && (vi->state & QStyle::State_Enabled)) { -- painter->setPen(vi->palette.color(cg, QPalette::Text)); -- } -- else if ((vi->state & (QStyle::State_Selected)) && (vi->state & QStyle::State_Enabled)) { -- painter->setPen(ViewItemSelect); -- } -- else if ((vi->state & (QStyle::State_MouseOver)) && (vi->state & QStyle::State_Enabled)) -- { -- painter->setPen(ViewItemHover); -- } -- else { -- painter->setPen(vi->palette.color(cg, QPalette::Text)); -- } -- -- if (vi->state & QStyle::State_Editing) { -- painter->setPen(vi->palette.color(cg, QPalette::Text)); -- painter->drawRect(textRect.adjusted(0, 0, -1, -1)); -- } -- viewItemDrawText(painter, vi, textRect); -- -- } -- painter->restore(); -- return; -- } -- break; -- } -- -- case CE_ShapedFrame: -- if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(option)) { -- painter->save(); -- int frameShape = f->frameShape; -- int frameShadow = QFrame::Plain; -- if (f->state & QStyle::State_Sunken) { -- frameShadow = QFrame::Sunken; -- } else if (f->state & QStyle::State_Raised) { -- frameShadow = QFrame::Raised; -- } -- -- int lw = f->lineWidth; -- int mlw = f->midLineWidth; -- -- switch (frameShape) { -- case QFrame::HLine: -- case QFrame::VLine: { -- QPoint p1, p2; -- if (frameShape == QFrame::HLine) { -- p1 = QPoint(option->rect.x(), option->rect.y() + option->rect.height() / 2); -- p2 = QPoint(option->rect.x() + option->rect.width(), p1.y()); -- } else { -- p1 = QPoint(option->rect.x() + option->rect.width() / 2, option->rect.y()); -- p2 = QPoint(p1.x(), p1.y() + option->rect.height()); -- } -- if (frameShadow == QFrame::Plain) { -- QPen oldPen = painter->pen(); -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- painter->setPen(QPen(QBrush(f->palette.color(QPalette::Active, QPalette::NoRole)), lw)); -- painter->drawLine(p1, p2); -- painter->setPen(oldPen); -- } else { -- qDrawShadeLine(painter, p1, p2, f->palette, frameShadow == QFrame::Sunken, lw, mlw); -- } -- painter->restore(); -- break; -- } -- case QFrame::WinPanel: -- case QFrame::Panel: -- case QFrame::StyledPanel: -- case QFrame::Box: -- default: -- painter->restore(); -- Style::drawControl(element, option, painter, widget); -- break; -- } -- } -- break; -- default: -- return Style::drawControl(element, option, painter, widget); -- } --} -- --int Qt5UKUIStyle::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, const QWidget *widget) const --{ -- switch (metric) { -- case PM_ScrollBarExtent: -- return sp->ScroolBar_Width; -- case PM_ScrollBarSliderMin: -- return sp->ScroolBar_Height; -- case PM_MaximumDragDistance: -- return -1; -- -- case PM_MenuPanelWidth: -- return sp->Menu_MarginPanelWidth; -- case PM_MenuHMargin: -- { -- if (qobject_cast<const QComboBox*>(widget)) { -- return sp->Menu_Combobox_Popup_MarginWidth; -- } -- return sp->Menu_MarginWidth; -- } -- case PM_MenuVMargin: -- { -- if (qobject_cast<const QComboBox*>(widget)) { -- return sp->Menu_Combobox_Popup_MarginHeight; -- } -- return sp->Menu_MarginHeight; -- } -- case PM_SubMenuOverlap: -- return 8; -- -- case PM_SliderThickness: -- return sp->Slider_Thickness; -- case PM_SliderControlThickness: -- case PM_SliderLength: -- return sp->Slider_Length; -- case PM_SliderTickmarkOffset: -- return 5; -- case PM_SliderSpaceAvailable: -- { -- if (const QStyleOptionSlider *sl = qstyleoption_cast<const QStyleOptionSlider *>(option)) { -- if (sl->orientation == Qt::Horizontal) -- return sl->rect.width() - proxy()->pixelMetric(PM_SliderLength, option, widget) - 2 * sp->Slider_Margin; -- else -- return sl->rect.height() - proxy()->pixelMetric(PM_SliderLength, option, widget)- 2 * sp->Slider_Margin; -- } else { -- return 0; -- } -- break; -- } -- -- case PM_SmallIconSize: -- return sp->SmallIcon_Size; -- -- case PM_MenuScrollerHeight: -- if(widget == nullptr) -- return 0; -- else -- return Style::pixelMetric(metric, option, widget); -- -- case PM_DefaultFrameWidth://qframe margin 边距 -- if (qstyleoption_cast<const QStyleOptionToolButton *>(option)) { -- return 4; -- } -- return 2; -- -- case PM_MenuBarItemSpacing:return 16; -- case PM_MenuBarVMargin:return 4; -- case PM_ToolTipLabelFrameWidth: -- return sp->ToolTip_DefaultMargin; -- -- case PM_LayoutLeftMargin: -- case PM_LayoutTopMargin: -- case PM_LayoutRightMargin: -- case PM_LayoutBottomMargin: -- return 8; -- case PM_LayoutHorizontalSpacing: -- case PM_LayoutVerticalSpacing: -- return 8; -- case PM_ToolBarFrameWidth: -- case PM_ToolBarItemMargin: -- return 0; -- case PM_ToolBarItemSpacing: -- return 4; -- -- case PM_MessageBoxIconSize: -- return 24; -- -- case PM_TabCloseIndicatorWidth: -- case PM_TabCloseIndicatorHeight: -- return 20; -- -- case PM_TabBarTabHSpace: -- return 8 * 2; -- case PM_TabBarTabVSpace: -- return 4 * 2; -- -- case PM_TabBarTabOverlap: -- return 1; -- -- case PM_TabBarScrollButtonWidth: -- return sp->TabBar_ScrollButtonWidth; -- -- case PM_TabBar_ScrollButtonOverlap: -- return sp->TabBar_ScrollButtonOverlap; -- -- case PM_TabBarIconSize: -- return 16; -- -- case PM_TabBarTabShiftVertical: -- return 0; -- case PM_TabBarTabShiftHorizontal: -- return 0; -- -- case PM_TabBarBaseHeight: -- return 2; -- -- case PM_TabBarBaseOverlap: -- return 0; -- -- case PM_ExclusiveIndicatorWidth: -- return sp->ExclusiveIndicator_Width; -- case PM_ExclusiveIndicatorHeight: -- return sp->ExclusiveIndicator_Height; -- case PM_RadioButtonLabelSpacing: -- return sp->RadioButtonLabel_Spacing; -- case PM_IndicatorWidth: -- return sp->Indicator_Width; -- case PM_IndicatorHeight: -- return sp->Indicator_Height; -- -- case PM_ButtonIconSize: -- return sp->Button_IconSize; -- case PM_ButtonMargin: -- return sp->Button_MarginWidth; -- case PM_MenuButtonIndicator: -- return sp->Button_IndicatorSize; -- case PM_ButtonDefaultIndicator: -- return sp->Button_DefaultIndicatorSize; -- -- case PM_ComboBoxFrameWidth: -- return sp->ComboBox_FrameWidth; -- -- case PM_SpinBoxFrameWidth: -- return sp->SpinBox_FrameWidth; -- -- case PM_ProgressBarChunkWidth: -- return 9; -- -- case PM_HeaderMargin: -- return 2; -- case PM_HeaderMarkSize: -- return 16; -- case PM_ScrollView_ScrollBarOverlap: -- return 0; -- -- case PM_ListViewIconSize: -- return 16; -- case PM_IconViewIconSize: -- return 32; -- case PM_FocusFrameHMargin: -- return 4; -- -- case PM_TreeViewIndentation: -- return 20; -- case PM_HeaderDefaultSectionSizeVertical:{ -- return sp->m_headerDefaultSectionSizeVertical; -- } -- default: -- break; -- } -- return Style::pixelMetric(metric, option, widget); --} -- --QRect Qt5UKUIStyle::subControlRect(QStyle::ComplexControl control, const QStyleOptionComplex *option, QStyle::SubControl subControl, const QWidget *widget) const --{ -- switch (control) { -- case CC_ScrollBar: -- { -- if (const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option)) { -- const QRect rect = bar->rect; -- int lineLength = 0; -- int distance = 4; -- if (sp->ScrooBar_ShowLine && widget && ((widget->property("drawScrollBarGroove").isValid() && -- widget->property("drawScrollBarGroove").toBool()) || !widget->property("drawScrollBarGroove").isValid())) -- { -- lineLength = sp->ScroolBar_LineLength; -- distance = 0; -- } -- const bool horizontal = bar->orientation == Qt::Horizontal; -- int maxlen = (horizontal ? rect.width() : rect.height()) - distance - 2 * lineLength; -- int sliderlen = 0; -- if (bar->maximum != bar->minimum) { -- uint range = bar->maximum - bar->minimum; -- sliderlen = (qint64(bar->pageStep) * maxlen) / (range + bar->pageStep); -- -- int slidermin = proxy()->pixelMetric(PM_ScrollBarSliderMin, bar, widget); -- if (sliderlen < slidermin || range > INT_MAX / 2) -- sliderlen = slidermin; -- if (sliderlen > maxlen) -- sliderlen = maxlen; -- } else { -- sliderlen = maxlen; -- } -- -- auto animator = m_scrollbar_animation_helper->animator(widget); -- bool hasAnimation = widget &&(!widget->property("animation").isValid() || -- (widget->property("animation").isValid() && widget->property("animation").toBool())); -- -- if (animator && hasAnimation) { --// qDebug() << "bar value..." << bar->sliderValue << bar->sliderPosition; -- if(animator->isRunning("move_position") || -- (animator->getExtraProperty("start_position").toInt() != -- animator->getExtraProperty("end_position").toInt() && -- bar->sliderValue != animator->getExtraProperty("end_position").toInt())){ -- ///|| (animator->value("move_position").toReal() > animator->animatorStartValue("move_position").toReal() && -- /// animator->value("move_position").toReal() <= animator->animatorEndValue("move_position").toReal())){ -- if(const QScrollBar* scrollbar = qobject_cast<const QScrollBar *>(widget)){ -- QScrollBar *sbar = const_cast<QScrollBar *>(scrollbar); -- if(sbar){ -- int startValue = animator->getExtraProperty("start_position").toInt(); -- int endValue = animator->getExtraProperty("end_position").toInt(); -- int v = startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal(); --// qDebug() << "v...................." << v << startValue << endValue; -- if(v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)) -- sbar->setValue(v); -- } -- } -- } -- } -- -- int sliderstart = lineLength + sliderPositionFromValue(bar->minimum, bar->maximum, bar->sliderPosition, maxlen - sliderlen, bar->upsideDown) + distance / 2; -- switch (subControl) { -- case SC_ScrollBarSubLine: -- { -- if(!sp->ScrooBar_ShowLine) -- return QRect(); -- if (horizontal) -- return QRect(0, 0, lineLength, rect.height()); -- else -- return QRect(0, 0, rect.width(), lineLength); -- } -- case SC_ScrollBarAddLine: -- { -- if(!sp->ScrooBar_ShowLine) -- return QRect(); -- if (horizontal) -- return QRect(rect.right() - lineLength, 0, lineLength, rect.height()); -- else -- return QRect(0, rect.bottom() - lineLength, rect.width(), lineLength); -- } -- case SC_ScrollBarFirst: -- case SC_ScrollBarLast: -- return QRect(); -- -- case SC_ScrollBarSubPage: -- { -- if (horizontal) -- return QRect(lineLength, 0, sliderstart - lineLength, rect.height()); -- else -- return QRect(0, lineLength, rect.width(), sliderstart - lineLength); -- } -- -- case SC_ScrollBarAddPage: -- { -- if (horizontal) -- return QRect(sliderstart + sliderlen, 0, rect.width() - sliderstart - sliderlen - lineLength, rect.height()); -- else -- return QRect(0, sliderstart + sliderlen, rect.width(), rect.height() - sliderstart - sliderlen - lineLength); -- } -- -- -- case SC_ScrollBarSlider: -- { -- if(!animator->isRunning("move_position") && animator->currentAnimatorTime("move_position") != 0){ --// qDebug() << "stop animator time........."; -- animator->setAnimatorCurrentTime("move_position", 0); -- animator->setExtraProperty("end_position", 0); -- animator->setExtraProperty("start_position", 0); -- } -- QRect r; -- if (horizontal) -- r = QRect(sliderstart, 0, sliderlen, rect.height()); -- else -- r = QRect(0, sliderstart, rect.width(), sliderlen); -- QWidget *w = const_cast<QWidget *>(widget); --// qDebug() << "SC_ScrollBarSlider......" << w << r; -- w->setProperty("ScrollBarSliderRect", r); -- return r; -- } -- -- case SC_ScrollBarGroove: -- { -- QRect r; -- if (horizontal) -- r = QRect(rect.x() + lineLength, rect.y(), rect.width() - 2 * lineLength, rect.height()); -- else -- r = QRect(rect.x(), rect.y() + lineLength, rect.width(), rect.height() - 2 * lineLength); -- QWidget *w = const_cast<QWidget *>(widget); --// qDebug() << "SC_ScrollBarGroove......" << w << r; -- w->setProperty("ScrollBarGrooveRect", r); -- return r; -- } -- -- default: -- break; -- } -- } -- break; -- } -- -- case CC_Slider: -- { -- if (const QStyleOptionSlider* slider = qstyleoption_cast<const QStyleOptionSlider*>(option)) { -- QRect rect = option->rect; -- const bool horizontal(slider->orientation == Qt::Horizontal); -- const int thickSpace = 2; -- if (horizontal) { -- if (slider->tickPosition & QSlider::TicksAbove) -- rect.adjust(0, thickSpace, 0, 0); -- if (slider->tickPosition & QSlider::TicksBelow) -- rect.adjust(0, 0, 0, -thickSpace); -- } else { -- if (slider->tickPosition & QSlider::TicksAbove) -- rect.adjust(thickSpace, 0, 0, 0); -- if (slider->tickPosition & QSlider::TicksBelow) -- rect.adjust(0, 0, -thickSpace, 0); -- } -- -- switch (subControl) { -- case SC_SliderHandle: -- { -- auto animator = m_slider_animation_helper->animator(widget); -- bool hasAnimation = widget &&(!widget->property("animation").isValid() || -- (widget->property("animation").isValid() && widget->property("animation").toBool())); -- -- if (slider && animator && hasAnimation){ -- if(animator->isRunning("move_position") || -- (animator->getExtraProperty("start_position").toInt() != -- animator->getExtraProperty("end_position").toInt() && -- slider->sliderValue != animator->getExtraProperty("end_position").toInt())) { -- auto sliderBar = qobject_cast<const QAbstractSlider *>(widget); --// qDebug() << "value......." << subControl << slider->sliderValue << animator->getExtraProperty("start_position").toInt(); --// qDebug() << "isrunning............." << animator->isRunning("move_position"); --// qDebug() << "CC_Slider.....:" << animator->isRunning("move_position") << animator->value("move_position").toReal(); --// qDebug() << "value:.........." << animator->value("move_position").toReal(); -- -- QAbstractSlider *sbar = const_cast<QAbstractSlider *>(sliderBar); -- if(sbar){ -- int startValue = animator->getExtraProperty("start_position").toInt(); -- int endValue = animator->getExtraProperty("end_position").toInt(); --// qDebug() << "startvalue:" << startValue << "endvalue:" << endValue --// << animator->getExtraProperty("start_position").toInt() --// << animator->getExtraProperty("end_position").toInt(); -- int v = startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal(); -- if(v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)) -- sbar->setValue(startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal()); -- } -- } -- } -- -- -- if (animator && hasAnimation) { -- if(!animator->isRunning("move_position") && animator->currentAnimatorTime("move_position") != 0){ -- animator->setAnimatorCurrentTime("move_position", 0); -- animator->setExtraProperty("end_position", 0); -- animator->setExtraProperty("start_position", 0); --// qDebug() << "setAnimatorCurrentTime0000000000000000" << animator->getExtraProperty("start_position").toInt() << animator->getExtraProperty("end_position").toInt(); -- } -- } -- -- QRect handleRect = option->rect; -- int handleThickness = proxy()->pixelMetric(PM_SliderThickness, option, widget); -- int handleLength = proxy()->pixelMetric(PM_SliderLength, option, widget); -- if(horizontal) -- handleRect.setSize(QSize(handleLength, handleThickness)); -- else -- handleRect.setSize(QSize(handleThickness, handleLength)); -- handleRect.moveCenter(rect.center()); -- int sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum, slider->sliderValue, -- proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); -- if (horizontal) { -- handleRect.moveLeft(sliderPos + sp->Slider_Margin); -- } else { -- handleRect.moveTop((sliderPos + sp->Slider_Margin)); -- } -- return visualRect(slider->direction, slider->rect, handleRect); -- } -- -- case SC_SliderGroove: -- { -- QRect grooveRect = rect; -- return grooveRect; -- } -- -- case SC_SliderTickmarks: -- break; -- -- default: -- break; -- } -- } -- break; -- } -- -- case CC_ToolButton: -- { -- if (const QStyleOptionToolButton *tb = qstyleoption_cast<const QStyleOptionToolButton *>(option)) { -- int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, tb, widget); -- QRect rect = tb->rect; -- switch (subControl) { -- case SC_ToolButton: -- { -- if ((tb->features & (QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay)) -- == QStyleOptionToolButton::MenuButtonPopup) -- rect.adjust(0, 0, - (mbi + sp->ToolButton_MarginWidth), 0); -- break; -- } -- case SC_ToolButtonMenu: -- { -- if ((tb->features & (QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay)) -- == QStyleOptionToolButton::MenuButtonPopup) -- rect.adjust(rect.width() - (mbi + sp->ToolButton_MarginWidth), 0, 0, 0); -- break; -- } -- default: -- break; -- } -- rect = visualRect(tb->direction, tb->rect, rect); -- return rect; -- } -- break; -- } -- -- case CC_ComboBox: -- { -- if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(option)) { -- int comboBox_Margin = proxy()->pixelMetric(PM_ComboBoxFrameWidth, option, widget); -- int comboBox_MarginWidth = 8; -- int indicator = proxy()->pixelMetric(PM_MenuButtonIndicator, option, widget); -- QRect rect = option->rect.adjusted(comboBox_MarginWidth, comboBox_Margin, -comboBox_MarginWidth, -comboBox_Margin); -- -- switch (subControl) { -- case SC_ComboBoxArrow: -- { -- QRect arrowRect(rect.right() - indicator, rect.top(), indicator, rect.height()); -- return visualRect(option->direction, rect, arrowRect); -- } -- -- case SC_ComboBoxEditField: -- { -- QRect textRect = option->rect; -- if (cb->editable) { -- textRect.setRect(rect.left() - 2, rect.top(), rect.width() - indicator - 4, rect.height()); -- -- } else { -- textRect.setRect(rect.left(), rect.top(), rect.width() - indicator - 8, rect.height()); -- } -- -- return visualRect(option->direction, option->rect, textRect); -- } -- -- case SC_ComboBoxListBoxPopup: -- { -- return option->rect.adjusted(0, 0, 0, 4); -- } -- -- default: -- break; -- } -- } -- break; -- } -- -- case CC_SpinBox: -- { -- if (const QStyleOptionSpinBox *sb = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) { -- int center = sb->rect.height() / 2; -- const int fw = sb->frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth, sb, widget) : 0; -- int buttonWidth = 32; -- bool isHorizonLayout = (sp->getSpinBoxControlLayout() == UKUIStyleParameters::SpinBoxControlLayout::Horizontal); -- if(isHorizonLayout) -- { -- center = sb->rect.height(); -- buttonWidth = sp->SpinBox_DefaultHeight; -- } -- QRect rect = option->rect; -- switch (subControl) { -- case SC_SpinBoxUp: -- { -- if (sb->buttonSymbols == QAbstractSpinBox::NoButtons) -- return QRect(); -- if(isHorizonLayout) -- rect = QRect(rect.right() - buttonWidth, rect.top(), buttonWidth, center); -- else{ -- rect = QRect(rect.right() - buttonWidth + 1, rect.top(), buttonWidth, center); -- } -- -- break; -- } -- case SC_SpinBoxDown: -- { -- if (sb->buttonSymbols == QAbstractSpinBox::NoButtons) -- return QRect(); -- if(sp->getSpinBoxControlLayout() == UKUIStyleParameters::SpinBoxControlLayout::Vertical) -- rect = QRect(rect.right() - buttonWidth + 1, rect.top() + center, buttonWidth, center); -- else -- rect = QRect(rect.left(), rect.top(), buttonWidth, center); -- break; -- } -- case SC_SpinBoxEditField: -- { -- if (sb->buttonSymbols == QAbstractSpinBox::NoButtons) { -- rect = rect.adjusted(fw, 0, -fw, 0); -- } else { -- if(sp->getSpinBoxControlLayout() == UKUIStyleParameters::SpinBoxControlLayout::Vertical) -- rect = rect.adjusted(fw, 0, -(fw + buttonWidth), 0); -- else -- rect = rect.adjusted(buttonWidth, 0, -(fw + buttonWidth), 0); -- } -- break; -- } -- case SC_SpinBoxFrame: -- if(!isHorizonLayout) -- rect = sb->rect; -- else -- rect = sb->rect.adjusted(buttonWidth, 0, -(fw + buttonWidth), 0); -- -- default: -- break; -- } -- -- return visualRect(sb->direction, sb->rect, rect); -- } -- } -- -- default: -- break; -- } -- -- return Style::subControlRect(control, option, subControl, widget); --} -- --QRect Qt5UKUIStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const --{ -- switch (element) { -- case SE_TabBarScrollLeftButton: -- { -- const bool verticalTabs = option->rect.width() < option->rect.height(); -- const int buttonWidth = qMax(proxy()->pixelMetric(QStyle::PM_TabBarScrollButtonWidth, 0, widget), QApplication::globalStrut().width()); -- const int lap = proxy()->pixelMetric(QStyle::PM_TabBar_ScrollButtonOverlap, 0, widget); -- -- if(sp->getTabBarIndicatorLayout() != UKUIStyleParameters::TabBarIndicatorLayout::TabBarIndicator_Horizontal){ -- QRect rect = QStyle::visualRect(option->direction, option->rect, -- QRect(option->rect.right() - buttonWidth, option->rect.top() + 2, -- buttonWidth, (option->rect.height() - 4) / 2)); -- return rect; -- } -- -- QRect rect = verticalTabs ? QRect(-lap, option->rect.height() - (buttonWidth * 2), option->rect.width() + 2 * lap, buttonWidth) -- : QStyle::visualRect(option->direction, option->rect, -- QRect(option->rect.left(), option->rect.top(), -- buttonWidth, option->rect.height())); -- return rect; -- } -- -- case SE_TabBarScrollRightButton: -- { -- const bool verticalTabs = option->rect.width() < option->rect.height(); -- const int lap = proxy()->pixelMetric(QStyle::PM_TabBar_ScrollButtonOverlap, 0, widget); -- const int buttonWidth = qMax(proxy()->pixelMetric(QStyle::PM_TabBarScrollButtonWidth, 0, widget), QApplication::globalStrut().width()); -- -- if(sp->getTabBarIndicatorLayout() != UKUIStyleParameters::TabBarIndicatorLayout::TabBarIndicator_Horizontal){ -- QRect rect = QStyle::visualRect(option->direction, option->rect, -- QRect(option->rect.right() - buttonWidth, option->rect.top() + (option->rect.height()) / 2, -- buttonWidth, (option->rect.height() - 4) / 2)); -- return rect; -- } -- -- QRect rect = verticalTabs ? QRect(-lap, option->rect.height() - buttonWidth, option->rect.width() + 2 * lap, buttonWidth) -- : QStyle::visualRect(option->direction, option->rect, -- QRect(option->rect.right() - buttonWidth - lap, option->rect.top() + lap, -- buttonWidth, option->rect.height() - 2 * lap)); -- return rect; -- } -- -- case SE_TabBarTabLeftButton: -- { -- if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { -- int hpadding = proxy()->pixelMetric(QStyle::PM_TabBarTabHSpace, option, widget) / 2; -- QRect buttonRect(QPoint(0, 0), tab->leftButtonSize); -- switch (tab->shape) { -- case QTabBar::RoundedNorth: -- case QTabBar::RoundedSouth: -- case QTabBar::TriangularNorth: -- case QTabBar::TriangularSouth: -- { -- buttonRect.moveTop((tab->rect.height() - buttonRect.height()) / 2); -- buttonRect.moveLeft(tab->rect.left() + hpadding); -- buttonRect = visualRect(tab->direction, tab->rect, buttonRect); -- break; -- } -- case QTabBar::RoundedWest: -- case QTabBar::TriangularWest: -- { -- buttonRect.moveLeft((tab->rect.width() - buttonRect.width()) / 2); -- buttonRect.moveBottom(tab->rect.bottom() - hpadding); -- break; -- } -- case QTabBar::RoundedEast: -- case QTabBar::TriangularEast: -- { -- buttonRect.moveLeft((tab->rect.width() - buttonRect.width()) / 2); -- buttonRect.moveTop(tab->rect.top() + hpadding); -- break; -- } -- default: -- break; -- } -- return buttonRect; -- } -- break; -- } -- -- case SE_TabBarTabRightButton: -- { -- if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { -- int hpadding = proxy()->pixelMetric(QStyle::PM_TabBarTabHSpace, option, widget) / 2; -- QRect buttonRect(QPoint(0, 0), tab->rightButtonSize); -- switch (tab->shape) { -- case QTabBar::RoundedNorth: -- case QTabBar::RoundedSouth: -- case QTabBar::TriangularNorth: -- case QTabBar::TriangularSouth: -- { -- buttonRect.moveTop((tab->rect.height() - buttonRect.height()) / 2); -- buttonRect.moveRight(tab->rect.right() - hpadding); -- buttonRect = visualRect(tab->direction, tab->rect, buttonRect); -- break; -- } -- case QTabBar::RoundedWest: -- case QTabBar::TriangularWest: -- { -- buttonRect.moveLeft((tab->rect.width() - buttonRect.width()) / 2); -- buttonRect.moveTop(tab->rect.top() + hpadding); -- break; -- } -- case QTabBar::RoundedEast: -- case QTabBar::TriangularEast: -- { -- buttonRect.moveLeft((tab->rect.width() - buttonRect.width()) / 2); -- buttonRect.moveBottom(tab->rect.bottom() - hpadding); -- break; -- } -- default: -- break; -- } -- return buttonRect; -- } -- break; -- } -- -- case SE_TabBarTabText: -- { -- if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { -- QRect rect = tab->rect; -- QRect iconRect = tab->rect; -- tabLayout(tab, widget, proxy(), &rect, &iconRect); -- return rect; -- } -- break; -- } -- -- case SE_TabWidgetTabPane: -- { -- if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(option)) { -- int overlap = proxy()->pixelMetric(PM_TabBarBaseOverlap, option, widget); -- if (twf->lineWidth == 0) -- overlap = 0; -- const QSize tabBarSize(twf->tabBarSize - QSize(overlap, overlap)); -- QRect rect(twf->rect); -- switch (twf->shape) { -- case QTabBar::RoundedNorth: -- case QTabBar::TriangularNorth: -- rect.adjust(0, tabBarSize.height(), 0, 0); -- break; -- -- case QTabBar::RoundedSouth: -- case QTabBar::TriangularSouth: -- rect.adjust(0, 0, 0, -tabBarSize.height()); -- break; -- -- case QTabBar::RoundedEast: -- case QTabBar::TriangularEast: -- rect.adjust(0, 0, -tabBarSize.width(), 0); -- break; -- -- case QTabBar::RoundedWest: -- case QTabBar::TriangularWest: -- rect.adjust(tabBarSize.width(), 0, 0, 0); -- break; -- -- default: -- break; -- } -- return rect; -- } -- break; -- } -- -- case SE_TabWidgetTabContents: -- { -- if (qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(option)) { -- const QRect rect = proxy()->subElementRect(SE_TabWidgetTabPane, option, widget); -- int TabWidget_Margin = 0; -- return rect.adjusted(TabWidget_Margin, TabWidget_Margin, -TabWidget_Margin, -TabWidget_Margin); -- } -- break; -- } -- -- case SE_TabWidgetTabBar: -- { -- if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(option)) { -- QRect rect = QRect(QPoint(0, 0), twf->tabBarSize); -- const uint alingMask = Qt::AlignLeft | Qt::AlignRight | Qt::AlignHCenter; -- switch (twf->shape) { -- case QTabBar::RoundedNorth: -- case QTabBar::TriangularNorth: -- case QTabBar::RoundedSouth: -- case QTabBar::TriangularSouth: -- { -- rect.setWidth(qMin(rect.width(), twf->rect.width() - twf->leftCornerWidgetSize.width() - twf->rightCornerWidgetSize.width())); -- switch (proxy()->styleHint(SH_TabBar_Alignment, twf, widget) & alingMask) { -- case Qt::AlignLeft: -- { -- rect.moveLeft(twf->leftCornerWidgetSize.width()); -- break; -- } -- case Qt::AlignHCenter: -- { -- rect.moveLeft((twf->rect.size() - twf->leftCornerWidgetSize - twf->rightCornerWidgetSize - twf->tabBarSize).width() / 2); -- break; -- } -- case Qt::AlignRight: -- { -- rect.moveLeft(twf->rect.width() - twf->tabBarSize.width() - twf->rightCornerWidgetSize.width()); -- break; -- } -- default: -- break; -- } -- rect = visualRect(twf->direction, twf->rect, rect); -- switch (twf->shape) { -- case QTabBar::RoundedSouth: -- case QTabBar::TriangularSouth: -- { -- rect.moveTop(twf->rect.height() - twf->tabBarSize.height()); -- } -- default: -- break; -- } -- return rect; -- } -- -- case QTabBar::RoundedEast: -- case QTabBar::TriangularEast: -- { -- rect.setHeight(qMin(rect.height(), twf->rect.height())); -- switch (proxy()->styleHint(SH_TabBar_Alignment, twf, widget) & alingMask) { -- case Qt::AlignLeft: -- { -- rect.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width(), 0)); -- break; -- } -- case Qt::AlignHCenter: -- { -- rect.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width(), (twf->rect.height() - twf->tabBarSize.height()) / 2)); -- break; -- } -- case Qt::AlignRight: -- { -- rect.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width(), twf->rect.height() - twf->tabBarSize.height())); -- break; -- } -- default: -- break; -- } -- return rect; -- } -- -- case QTabBar::RoundedWest: -- case QTabBar::TriangularWest: -- { -- rect.setHeight(qMin(rect.height(), twf->rect.height())); -- switch (proxy()->styleHint(SH_TabBar_Alignment, twf, widget) & alingMask) { -- case Qt::AlignLeft: -- { -- rect.moveTop(0); -- break; -- } -- case Qt::AlignHCenter: -- { -- rect.moveTop((twf->rect.height() - twf->tabBarSize.height()) / 2); -- break; -- } -- case Qt::AlignRight: -- { -- rect.moveTop(twf->rect.height() - twf->tabBarSize.height()); -- break; -- } -- default: -- break; -- } -- return rect; -- } -- default: -- break; -- } -- } -- break; -- } -- -- case SE_TabWidgetLeftCorner: -- { -- if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(option)) { -- QRect paneRect = proxy()->subElementRect(SE_TabWidgetTabPane, twf, widget); -- QRect rect; -- switch (twf->shape) { -- case QTabBar::RoundedNorth: -- case QTabBar::TriangularNorth: -- rect = QRect(QPoint(paneRect.x(), paneRect.y() - twf->leftCornerWidgetSize.height()), twf->leftCornerWidgetSize); -- break; -- case QTabBar::RoundedSouth: -- case QTabBar::TriangularSouth: -- rect = QRect(QPoint(paneRect.x(), paneRect.height()), twf->leftCornerWidgetSize); -- break; -- default: -- break; -- } -- rect = visualRect(twf->direction, twf->rect, rect); -- return rect; -- } -- break; -- } -- -- case SE_TabWidgetRightCorner: -- { -- if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(option)) { -- QRect paneRect = proxy()->subElementRect(SE_TabWidgetTabPane, twf, widget); -- QRect rect; -- switch (twf->shape) { -- case QTabBar::RoundedNorth: -- case QTabBar::TriangularNorth: -- rect = QRect(QPoint(paneRect.width() - twf->rightCornerWidgetSize.width(), -- paneRect.y() - twf->rightCornerWidgetSize.height()), twf->rightCornerWidgetSize); -- break; -- case QTabBar::RoundedSouth: -- case QTabBar::TriangularSouth: -- rect = QRect(QPoint(paneRect.width() - twf->rightCornerWidgetSize.width(), -- paneRect.height()), twf->rightCornerWidgetSize); -- break; -- default: -- break; -- } -- rect = visualRect(twf->direction, twf->rect, rect); -- return rect; -- } -- break; -- } -- -- case SE_RadioButtonIndicator: -- { -- QRect rect; -- int h = proxy()->pixelMetric(PM_ExclusiveIndicatorHeight, option, widget); -- rect.setRect(option->rect.x(), option->rect.y() + ((option->rect.height() - h) / 2), -- proxy()->pixelMetric(PM_ExclusiveIndicatorWidth, option, widget), h); -- rect = visualRect(option->direction, option->rect, rect); -- return rect; -- } -- -- case SE_RadioButtonContents: -- { -- int radioWidth = proxy()->pixelMetric(PM_ExclusiveIndicatorWidth, option, widget); -- int spacing = proxy()->pixelMetric(PM_RadioButtonLabelSpacing, option, widget); -- return visualRect(option->direction, option->rect, option->rect.adjusted(radioWidth + spacing, 0, 0, 0)); -- } -- -- case SE_CheckBoxIndicator: -- { -- QRect rect; -- int h = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); -- rect.setRect(option->rect.x() + 1, option->rect.y() + ((option->rect.height() - h) / 2), -- proxy()->pixelMetric(PM_IndicatorWidth, option, widget), h); -- rect = visualRect(option->direction, option->rect, rect); -- return rect; -- } -- -- case SE_CheckBoxContents: -- { -- int radioWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); -- int spacing = proxy()->pixelMetric(PM_RadioButtonLabelSpacing, option, widget); -- return visualRect(option->direction, option->rect, option->rect.adjusted(radioWidth + spacing, 0, 0, 0)); -- } -- -- case SE_PushButtonContents: -- { -- if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { -- const bool icon = !button->icon.isNull(); -- const bool text = !button->text.isEmpty(); -- QRect rect = option->rect; -- int Button_MarginWidth = proxy()->pixelMetric(PM_ButtonMargin, option, widget); -- if (text && !icon && !(button->features & QStyleOptionButton::HasMenu)) { -- rect.adjust(Button_MarginWidth, 0, -Button_MarginWidth, 0); -- } else if (!text && icon && !(button->features & QStyleOptionButton::HasMenu)) { -- -- } else { -- rect.adjust(sp->ToolButton_MarginWidth, sp->Button_MarginHeight, -sp->ToolButton_MarginWidth, -sp->Button_MarginHeight); -- } -- if (button->features & (QStyleOptionButton::AutoDefaultButton | QStyleOptionButton::DefaultButton)) { -- int dbw = proxy()->pixelMetric(PM_ButtonDefaultIndicator, option, widget); -- rect.adjust(dbw, dbw, -dbw, -dbw); -- } -- return rect; -- } -- break; -- } -- -- case SE_LineEditContents: -- { -- if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(option)) { -- bool clear = false; -- if (widget) { -- if (qobject_cast<QComboBox *>(widget->parent())) -- { -- return option->rect; -- } -- if (widget->findChild<QAction *>(QLatin1String("_q_qlineeditclearaction"))) -- clear = true; -- } -- -- QRect rect = f->rect; -- if (clear) { -- rect.adjust(f->lineWidth + 4, f->lineWidth, 0, -f->lineWidth); -- rect = visualRect(option->direction, option->rect, rect); -- } else { -- rect.adjust(f->lineWidth + 4, f->lineWidth, -(f->lineWidth + 4), -f->lineWidth); -- } -- -- return rect; -- } -- break; -- } -- -- case SE_ProgressBarGroove: -- case SE_ProgressBarLabel: -- { -- if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { -- return pb->rect; -- } -- break; -- } -- -- case SE_ProgressBarContents: -- { -- if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { -- const auto progress = qMax(pb->progress, pb->minimum); // workaround for bug in QProgressBar -- const bool vertical = pb->orientation == Qt::Vertical; -- const bool inverted = pb->invertedAppearance; -- const bool indeterminate = (pb->minimum == 0 && pb->maximum == 0); -- -- int maxWidth = vertical ? pb->rect.height() : pb->rect.width(); -- const auto totalSteps = qMax(Q_INT64_C(1), qint64(pb->maximum) - pb->minimum); -- const auto progressSteps = qint64(progress) - pb->minimum; -- const auto progressBarWidth = progressSteps * maxWidth / totalSteps; -- int len = indeterminate ? maxWidth : progressBarWidth; -- -- bool reverse = (!vertical && (pb->direction == Qt::RightToLeft)) || vertical; -- if (inverted) -- reverse = !reverse; -- -- int diff = 0; -- if (indeterminate) { -- len = 56; -- double currentValue = 0; -- if (QVariantAnimation *animation = m_animation_helper->animation(option->styleObject)) { -- currentValue = animation->currentValue().toDouble(); -- int barLength = pb->rect.width(); -- if(vertical) -- barLength = pb->rect.height(); -- double speed = 0.5; -- if (animation->currentTime() == 0) { -- animation->setDirection(QAbstractAnimation::Forward); -- animation->setDuration(500 + barLength * speed); -- animation->start(); -- } else if (animation->currentTime() == animation->totalDuration()) { -- animation->setDirection(QAbstractAnimation::Backward); -- animation->setDuration(500 + barLength * speed); -- animation->start(); -- } -- } else { -- m_animation_helper->startAnimation(new ProgressBarAnimation(option->styleObject)); -- } -- diff = currentValue * (maxWidth - len); -- } else { -- m_animation_helper->stopAnimation(option->styleObject); -- } -- -- QRect rect = proxy()->subElementRect(SE_ProgressBarGroove, pb, widget); -- QRect progressRect; -- if (vertical) { -- if (reverse) { -- progressRect.setRect(rect.left(), rect.bottom() + 1 - len - diff, rect.width(), len); -- } else { -- progressRect.setRect(rect.x(), rect.top() + diff, rect.width(), len); -- } -- } else { -- if (reverse) { -- progressRect.setRect(rect.right() + 1 - len - diff, rect.top(), len, rect.height()); -- } else { -- progressRect.setRect(rect.x() + diff, rect.y(), len, rect.height()); -- } -- } -- -- return progressRect; -- } -- break; -- } -- -- case SE_HeaderLabel: -- { -- if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) { -- QRect rect = header->rect; -- int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, option, widget); -- int Header_MarginWidth = 8; -- rect.adjust(Header_MarginWidth - margin, margin, -Header_MarginWidth + margin, -margin); -- if (header->sortIndicator != QStyleOptionHeader::None && header->state & State_Horizontal) { -- int arrowSize = proxy()->pixelMetric(QStyle::PM_HeaderMarkSize, option, widget); -- rect.adjust(0, 0, -arrowSize - Header_MarginWidth, 0); -- } -- return visualRect(option->direction, header->rect, rect); -- } -- break; -- } -- -- case SE_HeaderArrow: -- { -- if (qstyleoption_cast<const QStyleOptionHeader *>(option)) { -- int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, option, widget); -- int Header_MarginWidth = 8; -- int arrowSize = proxy()->pixelMetric(QStyle::PM_HeaderMarkSize, option, widget); -- QRect rect = option->rect.adjusted(Header_MarginWidth, margin, -Header_MarginWidth, -margin); -- QRect arrowRect(rect.right() + 1 - arrowSize, rect.y() + (rect.height() - arrowSize) / 2, arrowSize, arrowSize); -- return visualRect(option->direction, rect, arrowRect); -- } -- break; -- } -- -- case SE_ItemViewItemCheckIndicator: -- if (!qstyleoption_cast<const QStyleOptionViewItem *>(option)) { -- return proxy()->subElementRect(SE_CheckBoxIndicator, option, widget); -- } -- Q_FALLTHROUGH(); -- -- case SE_ItemViewItemDecoration: -- case SE_ItemViewItemText: -- case SE_ItemViewItemFocusRect: -- { -- if (const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option)) { -- QRect checkRect, decorationRect, displayRect; -- viewItemLayout(vi, &checkRect, &decorationRect, &displayRect, false); -- if (element == SE_ViewItemCheckIndicator) -- return checkRect; -- else if (element == SE_ItemViewItemDecoration) -- return decorationRect; -- else if (element == SE_ItemViewItemText || element == SE_ItemViewItemFocusRect){ --// displayRect.setHeight(sp->ViewItem_DefaultHeight * m_scaleRatio4_3); -- return displayRect; -- } -- } -- break; -- } -- -- case SE_TreeViewDisclosureItem: -- return option->rect; -- -- default: -- break; -- } -- -- return Style::subElementRect(element,option,widget); --} -- -- --// change control Qsize --QSize Qt5UKUIStyle::sizeFromContents(ContentsType ct, const QStyleOption *option, -- const QSize &size, const QWidget *widget) const --{ -- QSize newSize = size; -- switch (ct) { -- case CT_MenuItem: { -- if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) { -- bool isComboBox = qobject_cast<const QComboBox*>(widget); -- int w = newSize.width(); -- int MenuItem_Spacing = 8; -- if (menuItem->text.contains(QLatin1Char('\t'))) { -- w += 20; -- } -- -- switch (menuItem->menuItemType) { -- case QStyleOptionMenuItem::SubMenu: -- case QStyleOptionMenuItem::Normal: -- case QStyleOptionMenuItem::DefaultItem: -- { -- //Combobox popup menu item -- if (isComboBox) { -- newSize.setHeight(menuItem->fontMetrics.height()); -- } -- -- bool hasIcon = false; -- if(isComboBox) -- { -- if(!menuItem->icon.isNull()) -- hasIcon = true; --// auto *comboBox = qobject_cast<const QComboBox*>(widget); --// int column = comboBox->count(); --// for(int i = 0; i < column; i++) --// { --// if(!comboBox->itemIcon(i).isNull()){ --// hasIcon = true; --// break; --// } --// } -- } -- else if(menuItem->maxIconWidth != 0) -- { -- hasIcon = true; -- } -- -- if (menuItem->menuHasCheckableItems || hasIcon) { -- int iconWidth = proxy()->pixelMetric(QStyle::PM_SmallIconSize, option, widget); -- w += ((hasIcon && menuItem->menuHasCheckableItems) ? 2 : 1) * (iconWidth + MenuItem_Spacing); -- newSize.setHeight(qMax(iconWidth, newSize.height())); -- } else { -- w += 8; -- } -- -- if(!isComboBox) -- w += proxy()->pixelMetric(PM_IndicatorWidth, option, widget) + MenuItem_Spacing; -- newSize.setHeight(qMax(newSize.height(), proxy()->pixelMetric(PM_IndicatorHeight, option, widget))); -- -- int MenuItem_HMargin = 12 + 4; -- // int MenuItem_VMargin = 3; -- w += MenuItem_HMargin; -- newSize.setWidth(qMax(w, 152)); -- -- -- newSize.setWidth(qMax(w + sp->MenuItem_MarginWidth, sp->MenuItem_DefaultWidght)); -- newSize.setHeight(qMax(newSize.height() + sp->MenuItem_MarginHeight * 2, -- sp->MenuItem_DefaultHeight + (isComboBox ? (2 * sp->ComboBox_VMargin) : 0))); -- -- -- if (widget) { -- if(newSize.width() > widget->maximumWidth()) { -- //Fix me:size no more than max size.At least set size 1.BUG 133590 ,support application to set fix width -- newSize.setWidth((widget->maximumWidth() - 20 > 1)?widget->maximumWidth() - 20 : 1); -- } -- } -- -- return newSize; -- } -- -- case QStyleOptionMenuItem::Separator: -- { -- newSize.setHeight(sp->MenuItemSeparator_MarginHeight * 2 + 1); -- return newSize; -- } -- -- default: -- break; -- } -- return newSize; -- } -- break; -- } -- -- case CT_LineEdit: -- { -- if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(option)) { -- newSize += QSize(f->lineWidth * 2 + 8, f->lineWidth * 2); -- newSize.setWidth(qMax(newSize.width(), sp->LineEdit_DefaultWidth)); -- newSize.setHeight(qMax(newSize.height(), sp->LineEdit_DefaultHeight)); -- return newSize; -- } -- break; -- } -- -- case CT_TabBarTab: -- { -- int padding = 0; -- if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { -- if (!tab->icon.isNull()) -- padding += 4; -- -- if (!tab->leftButtonSize.isEmpty() || !tab->rightButtonSize.isEmpty()) -- padding += 4; -- -- if (tab->shape == QTabBar::RoundedWest || tab->shape == QTabBar::RoundedEast -- || tab->shape == QTabBar::TriangularWest || tab->shape == QTabBar::TriangularEast) { -- newSize.setWidth(qMax(newSize.width(), sp->TabBar_DefaultHeight)); -- -- newSize.setHeight(qMax(newSize.height() + padding, sp->TabBar_DefaultMinWidth)); -- newSize.setHeight(qMin(newSize.height(), sp->TabBar_DefaultMaxWidth)); -- } else { -- newSize.setHeight(qMax(newSize.height(), sp->TabBar_DefaultHeight)); -- -- newSize.setWidth(qMax(newSize.width() + padding, sp->TabBar_DefaultMinWidth)); -- newSize.setWidth(qMin(newSize.width(), sp->TabBar_DefaultMaxWidth)); -- } -- -- if (qobject_cast<const QTabBar*>(widget)) { -- //set height between min and max -- newSize.setHeight(qMax(newSize.height(), widget->minimumHeight())); -- newSize.setHeight(qMin(newSize.height(), widget->maximumHeight())); -- } -- return newSize; -- } -- break; -- } -- -- case CT_RadioButton: -- { -- if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { -- int w = proxy()->pixelMetric(PM_ExclusiveIndicatorWidth, option, widget); -- int h = proxy()->pixelMetric(PM_ExclusiveIndicatorHeight, option, widget); -- int spacing = proxy()->pixelMetric(PM_RadioButtonLabelSpacing, option, widget); -- if (!button->icon.isNull()) -- spacing += 4; -- newSize.setWidth(newSize.width() + w + spacing); -- newSize.setHeight(qMax(qMax(newSize.height(), h), sp->RadioButton_DefaultHeight)); -- return newSize; -- } -- break; -- } -- -- case CT_CheckBox: -- { -- if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { -- int w = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); -- int h = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); -- int spacing = proxy()->pixelMetric(PM_RadioButtonLabelSpacing, option, widget); -- if (!button->icon.isNull()) -- spacing += 4; -- newSize.setWidth(newSize.width() + w + spacing); -- newSize.setHeight(qMax(qMax(newSize.height(), h), sp->CheckBox_DefaultHeight)); -- return newSize; -- } -- break; -- } -- -- case CT_ToolButton: -- { -- if (const QStyleOptionToolButton *tb = qstyleoption_cast<const QStyleOptionToolButton *>(option)) { -- const bool icon = !tb->icon.isNull(); -- const bool text = !tb->text.isEmpty(); -- int w = size.width(); -- int h = size.height(); -- int Button_MarginWidth = proxy()->pixelMetric(PM_ButtonMargin, option, widget); -- if (tb->toolButtonStyle == Qt::ToolButtonTextOnly && !(tb->features & QStyleOptionToolButton::MenuButtonPopup)) { -- w += Button_MarginWidth * 2; -- } else { -- w += sp->ToolButton_MarginWidth * 2; -- } -- h += sp->Button_MarginHeight * 2; -- -- if (tb->toolButtonStyle != Qt::ToolButtonIconOnly) { -- QFontMetrics fm = tb->fontMetrics; -- w -= fm.horizontalAdvance(QLatin1Char(' ')) * 2; -- if (tb->toolButtonStyle == Qt::ToolButtonTextBesideIcon) { -- if (text && icon) -- w += 4; -- else -- w -= 4; -- } else if (tb->toolButtonStyle == Qt::ToolButtonTextUnderIcon) { -- if (text && icon) -- h += 4; -- else -- h -= 4; -- } -- } -- if (tb->features & QStyleOptionToolButton::MenuButtonPopup) { -- w += 8; -- newSize.setWidth(qMax(w, sp->ToolButton_DefaultWidth)); -- } else { -- newSize.setWidth(qMax(w, sp->IconButton_DefaultWidth)); -- } -- newSize.setHeight(h > sp->Button_DefaultHeight ? h : sp->Button_DefaultHeight); -- return newSize; -- } -- break; -- } -- -- case CT_PushButton: -- { -- if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { -- const bool icon = !button->icon.isNull(); -- const bool text = !button->text.isEmpty(); -- int w = size.width(); -- int h = size.height(); -- int Button_MarginWidth = proxy()->pixelMetric(PM_ButtonMargin, option, widget); -- if (text && !icon && !(button->features & QStyleOptionButton::HasMenu)) { -- w += Button_MarginWidth * 2; -- } else { -- w += sp->ToolButton_MarginWidth * 2; -- } -- h += sp->Button_MarginHeight * 2; -- -- int spacing = 0; -- if (text && icon) -- spacing += 4; -- if (!text && icon) -- spacing -= 4; -- if (button->features & QStyleOptionButton::HasMenu) { -- if (icon || text) -- spacing += 8; -- } -- w += spacing; -- if (button->features & (QStyleOptionButton::AutoDefaultButton | QStyleOptionButton::DefaultButton)) { -- int dbw = proxy()->pixelMetric(PM_ButtonDefaultIndicator, option, widget) * 2; -- w += dbw; -- h += dbw; -- } -- -- newSize.setWidth(w > sp->Button_DefaultWidth ? w : sp->Button_DefaultWidth); -- newSize.setHeight(h > sp->Button_DefaultHeight ? h : sp->Button_DefaultHeight); -- return newSize; -- } -- break; -- } -- -- case CT_ComboBox: -- { -- if (const QStyleOptionComboBox *comboBox = qstyleoption_cast<const QStyleOptionComboBox *>(option)) { -- QSize newSize = size; -- int indicator = proxy()->pixelMetric(PM_MenuButtonIndicator, option, widget); -- int comboBox_Margin = proxy()->pixelMetric(PM_ComboBoxFrameWidth, option, widget); -- int comboBox_MarginWidth = 8 + 8 + 8 + 8; -- bool hasIcon = false; -- if(qobject_cast<const QComboBox*>(widget)) -- { -- auto *box = qobject_cast<const QComboBox*>(widget); -- for(int i = 0; i < box->count(); i++) -- { -- if(!box->itemIcon(i).isNull()) -- { -- hasIcon = true; -- break; -- } -- } -- } -- if(hasIcon) -- { -- int iconWidth = proxy()->pixelMetric(PM_SmallIconSize, option, widget); -- comboBox_MarginWidth += 8 + iconWidth; -- } -- -- newSize.setWidth(qMax(newSize.width() + indicator + comboBox_MarginWidth, sp->ComboBox_DefaultWidth)); -- newSize.setHeight(qMax(newSize.height() + comboBox_Margin * 2, sp->ComboBox_DefaultHeight)); -- -- return newSize; -- } -- break; -- } -- -- case CT_SpinBox: -- { -- if (const QStyleOptionSpinBox *sb = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) { -- const int buttonWidth = (sb->subControls & (QStyle::SC_SpinBoxUp | QStyle::SC_SpinBoxDown)) != 0 ? 32 : 0; -- const int fw = sb->frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth, sb, widget) : 0; -- newSize += QSize(buttonWidth + 2 * fw, 0); -- newSize.setWidth(qMax(newSize.width(), sp->SpinBox_DefaultWidth)); -- newSize.setHeight(qMax(newSize.height(), sp->SpinBox_DefaultHeight)); -- return newSize; -- } -- break; -- } -- -- case CT_ProgressBar: -- { -- if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { -- if (pb->orientation == Qt::Vertical) { -- newSize.setWidth(qMax(newSize.width() - 8, sp->ProgressBar_DefaultThick)); -- newSize.setHeight(qMax(newSize.height(), sp->ProgressBar_DefaultLength)); -- } else { -- newSize.setWidth(qMax(newSize.width(), sp->ProgressBar_DefaultLength)); -- newSize.setHeight(qMax(newSize.height() - 8, sp->ProgressBar_DefaultThick)); -- } -- return newSize; -- } -- break; -- } -- -- case CT_Slider: -- { -- if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) { -- const bool horizontal(slider->orientation == Qt::Horizontal); -- if (horizontal) { -- newSize.setHeight(newSize.height() + 2 * sp->Slider_Margin); -- newSize.setWidth(qMax(newSize.width(), sp->Slider_DefaultLength)); -- } else { -- newSize.setWidth(newSize.width() + 2 * sp->Slider_Margin); -- newSize.setHeight(qMax(newSize.height(), sp->Slider_DefaultLength)); -- } -- return newSize; -- } -- break; -- } -- -- case CT_HeaderSection: -- { -- if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) { -- const bool horizontal(header->orientation == Qt::Horizontal); -- const bool text(!header->text.isEmpty()); -- const bool icon(!header->icon.isNull()); -- int w = header->fontMetrics.size(Qt::TextShowMnemonic, header->text).width(); -- int h = header->fontMetrics.size(Qt::TextShowMnemonic, header->text).height(); -- int Header_MarginWidth = 8; -- int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, option, widget); -- -- if (icon) { -- int iconSize = proxy()->pixelMetric(QStyle::PM_SmallIconSize, option, widget); -- w += iconSize; -- h = qMax(iconSize, h); -- if (text) -- w += 8; -- } -- if (/*horizontal && */header->sortIndicator != QStyleOptionHeader::None) { -- int arrowSize = proxy()->pixelMetric(QStyle::PM_HeaderMarkSize, option, widget); -- w += arrowSize; -- h = qMax(arrowSize, h); -- if (text || icon) -- w += 8; -- } -- h += margin * 2; -- w += Header_MarginWidth * 2; -- newSize.setWidth(w); -- newSize.setHeight(qMax(h, sp->Table_HeaderHeight)); -- return newSize; -- } -- break; -- } -- -- case CT_ItemViewItem: -- { -- if (const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option)) { -- QRect decorationRect, displayRect, checkRect; -- viewItemLayout(vi, &checkRect, &decorationRect, &displayRect, true); -- newSize = (decorationRect | displayRect | checkRect).size(); -- -- int Margin_Width = 2; -- int Margin_Height = 0; -- newSize.setWidth(newSize.width() + Margin_Width * 2); -- newSize.setHeight(newSize.height() + Margin_Height * 2); -- newSize.setHeight(qMax(newSize.height(), sp->ViewItem_DefaultHeight)); -- -- return newSize; -- } -- break; -- } -- -- default: -- break; -- } -- -- return QFusionStyle::sizeFromContents(ct, option, size, widget); --} -- -- --QPixmap Qt5UKUIStyle::drawColorPixmap(QPainter *painter, QColor color, QPixmap &pixmap) const --{ -- QPainter p(&pixmap); -- p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- p.setCompositionMode(QPainter::CompositionMode_SourceIn); -- p.fillRect(pixmap.rect(), color); -- p.end(); -- -- return pixmap; --} -- --void Qt5UKUIStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const --{ -- qreal scale = pixmap.devicePixelRatio(); -- QRect aligned = alignedRect(QApplication::layoutDirection(), QFlag(alignment), pixmap.size() / scale, rect); -- QRect inter = aligned.intersected(rect); -- -- QPixmap target = pixmap; -- -- auto device = painter->device(); -- auto widget = dynamic_cast<QWidget *>(device); -- if (widget) { -- if (HighLightEffect::isWidgetIconUseHighlightEffect(widget)) { -- QStyleOption opt; -- opt.initFrom(widget); -- target = HighLightEffect::generatePixmap(pixmap, &opt, widget); -- } -- } -- -- painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- painter->drawPixmap(inter.x(), inter.y(), target, inter.x() - aligned.x(), inter.y() - aligned.y(), inter.width() * scale, inter.height() *scale); --} -- -- -- --void Qt5UKUIStyle::realSetWindowSurfaceFormatAlpha(const QWidget *widget) const --{ -- if (!widget) -- return; -- -- if (widget->testAttribute(Qt::WA_WState_Created)) -- return; -- -- if (qobject_cast<const QMenu *>(widget)) { -- const_cast<QWidget *>(widget)->setAttribute(Qt::WA_TranslucentBackground); -- } -- -- if (shouldBeTransparent(widget)) -- const_cast<QWidget *>(widget)->setAttribute(Qt::WA_TranslucentBackground); --} -- --void Qt5UKUIStyle::realSetMenuTypeToMenu(const QWidget *widget) const --{ -- if (auto menu = qobject_cast<const QMenu *>(widget)) { -- if (menu->testAttribute(Qt::WA_X11NetWmWindowTypeMenu) -- || !menu->windowHandle()) -- return; -- -- int wmWindowType = 0; -- if (menu->testAttribute(Qt::WA_X11NetWmWindowTypeDropDownMenu)) -- wmWindowType |= QXcbWindowFunctions::DropDownMenu; -- if (menu->testAttribute(Qt::WA_X11NetWmWindowTypePopupMenu)) -- wmWindowType |= QXcbWindowFunctions::PopupMenu; -- if (wmWindowType == 0) return; -- QXcbWindowFunctions::setWmWindowType(menu->windowHandle(), -- static_cast<QXcbWindowFunctions::WmWindowType>(wmWindowType)); -- } --} -- -- -- --QRect Qt5UKUIStyle::centerRect(const QRect &rect, int width, int height) const --{ return QRect(rect.left() + (rect.width() - width)/2, rect.top() + (rect.height() - height)/2, width, height); } -- -diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style.h b/ukui-styles/qt5-style-ukui/qt5-ukui-style.h -deleted file mode 100644 -index d5bf066..0000000 ---- a/ukui-styles/qt5-style-ukui/qt5-ukui-style.h -+++ /dev/null -@@ -1,206 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef QT5UKUISTYLE_H --#define QT5UKUISTYLE_H -- --#include <QProxyStyle> -- -- --class TabWidgetAnimationHelper; --class ScrollBarAnimationHelper; --class ButtonAnimationHelper; --class BoxAnimationHelper; --class ProgressBarAnimationHelper; --class ShadowHelper; --class RadioButtonAnimationHelper; --class CheckBoxAnimationHelper; --class SliderAnimationHelper; --class TreeAnimationHelper; -- --class QStyleOptionViewItem; --class QDBusInterface; --class UKUIStyleParameters; -- --#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) --#include <private/qfusionstyle_p.h> --#define Style QFusionStyle --#else --#define Style QProxyStyle --#endif -- --#include <QFontMetrics> --#include <QStyleOption> --#include <private/qtextengine_p.h> --#include <qmath.h> --#include <QGSettings> -- --class BlurHelper; --class GestureHelper; --class WindowManager; -- --class ApplicationStyleSettings; -- --/*! -- * \brief The Qt5UKUIStyle class -- * \details -- * This class provide the default ukui style in UKUI desktop enviroment. -- */ --class Qt5UKUIStyle : public Style --{ -- Q_OBJECT --public: -- explicit Qt5UKUIStyle(QString name); -- -- ~Qt5UKUIStyle(); -- -- bool shouldBeTransparent(const QWidget *w) const; -- -- //debuger -- bool eventFilter(QObject *obj, QEvent *e); -- -- int styleHint(StyleHint hint, -- const QStyleOption *option, -- const QWidget *widget, -- QStyleHintReturn *returnData) const; -- -- void polish(QWidget *widget); -- void unpolish(QWidget *widget); -- void polish(QPalette& palette) ; -- -- QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = nullptr, -- const QWidget *widget = nullptr) const override; -- -- QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *option) const override; -- -- QPalette standardPalette() const; -- -- void drawPrimitive(QStyle::PrimitiveElement element, -- const QStyleOption *option, -- QPainter *painter, -- const QWidget *widget = nullptr) const; -- -- void drawComplexControl(QStyle::ComplexControl control, -- const QStyleOptionComplex *option, -- QPainter *painter, -- const QWidget *widget = nullptr) const; -- -- void drawControl(QStyle::ControlElement element, -- const QStyleOption *option, -- QPainter *painter, -- const QWidget *widget = nullptr) const; -- -- int pixelMetric(QStyle::PixelMetric metric, -- const QStyleOption *option = nullptr, -- const QWidget *widget = nullptr) const; -- -- QRect subControlRect(QStyle::ComplexControl control, -- const QStyleOptionComplex *option, -- QStyle::SubControl subControl, -- const QWidget *widget = nullptr) const; -- -- void drawItemPixmap(QPainter *painter, -- const QRect &rect, -- int alignment, -- const QPixmap &pixmap) const; -- -- QRect subElementRect(SubElement element, -- const QStyleOption *option, -- const QWidget *widget = nullptr) const; -- QSize sizeFromContents(ContentsType ct, const QStyleOption *option, -- const QSize &size, const QWidget *widget) const; -- -- -- QPixmap drawColorPixmap(QPainter *p, QColor color, QPixmap &pixmap) const; --protected: -- -- void realSetWindowSurfaceFormatAlpha(const QWidget *widget) const; -- void realSetMenuTypeToMenu(const QWidget *widget) const; -- QRect centerRect(const QRect &rect, int width, int height) const; -- --private: -- TabWidgetAnimationHelper *m_tab_animation_helper = nullptr; -- ScrollBarAnimationHelper *m_scrollbar_animation_helper = nullptr; -- ButtonAnimationHelper* m_button_animation_helper = nullptr; -- BoxAnimationHelper* m_combobox_animation_helper = nullptr; -- ShadowHelper *m_shadow_helper = nullptr; -- ProgressBarAnimationHelper *m_animation_helper = nullptr; -- RadioButtonAnimationHelper *m_radiobutton_animation_helper = nullptr; -- CheckBoxAnimationHelper *m_checkbox_animation_helper = nullptr; -- SliderAnimationHelper *m_slider_animation_helper = nullptr; -- TreeAnimationHelper *m_tree_animation_helper = nullptr; -- -- bool m_drak_palette = false; -- bool m_default_palette = false; -- QString m_widget_theme = "ukui-default"; -- QString m_style_name = "ukui-default"; -- -- bool m_is_tablet_mode = false; -- QDBusInterface *m_statusManagerDBus = nullptr; -- -- // UKUIStyleParameters -- UKUIStyleParameters *sp = nullptr; -- -- mutable QRect m_scrollBarSliderRec; -- mutable QRect m_sliderHandleRec; -- -- BlurHelper *m_blur_helper = nullptr; -- GestureHelper *m_gesture_helper = nullptr; -- WindowManager *m_window_manager = nullptr; -- -- ApplicationStyleSettings *m_app_style_settings = nullptr; -- -- bool m_blink_cursor = true; -- int m_blink_cursor_time = 1200; -- -- -- bool isUseDarkPalette() const; -- -- QColor button_Click(const QStyleOption *option) const; -- QColor button_Hover(const QStyleOption *option) const; -- QColor closeButton_Click(const QStyleOption *option) const; -- QColor closeButton_Hover(const QStyleOption *option) const; -- QColor transparentButton_Click(const QStyleOption *option) const; -- QColor transparentButton_Hover(const QStyleOption *option) const; -- QColor highLight_Click(const QStyleOption *option) const; -- QColor highLight_Hover(const QStyleOption *option) const; -- -- void setThemeColor(QString themeColor, QPalette &palette) const; -- -- // view -- QString calculateElidedText(const QString &text, const QTextOption &textOption, -- const QFont &font, const QRect &textRect, const Qt::Alignment valign, -- Qt::TextElideMode textElideMode, int flags, -- bool lastVisibleLineShouldBeElided, QPointF *paintStartPosition) const; -- void viewItemDrawText(QPainter *painter, const QStyleOptionViewItem *option, const QRect &rect) const; -- void viewItemLayout(const QStyleOptionViewItem *option, QRect *checkRect, QRect *pixmapRect, QRect *textRect, bool sizehint) const; -- QSize viewItemSize(const QStyleOptionViewItem *option, int role) const; -- --private Q_SLOTS: -- void updateTabletModeValue(bool isTabletMode); -- QRect scrollbarSliderRec(); -- void setScrollbarSliderRec(QRect rect) const; -- QRect sliderHandleRec(); -- void setSliderHandleRec(QRect rect) const; --}; -- --#endif // QT5UKUISTYLE_H -diff --git a/ukui-styles/qt5-style-ukui/shadow-helper.cpp b/ukui-styles/qt5-style-ukui/shadow-helper.cpp -deleted file mode 100644 -index 46f29d7..0000000 ---- a/ukui-styles/qt5-style-ukui/shadow-helper.cpp -+++ /dev/null -@@ -1,387 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "shadow-helper.h" -- --#include <QPainter> --#include <QPainterPath> --#include <QPoint> --#include <QImage> -- --#include <QWidget> --#include <QVector4D> --#include <QMargins> -- --#include <QX11Info> -- --#include <QApplication> -- --#include <QDebug> -- --#define INNERRECT_WIDTH 1 -- --extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); -- --ShadowHelper::ShadowHelper(QObject *parent) : QObject(parent) --{ -- --} -- --ShadowHelper::~ShadowHelper() --{ -- m_shadows.clear(); --} -- --bool ShadowHelper::isWidgetNeedDecoShadow(const QWidget *widget) --{ -- if (!widget) -- return false; -- -- auto value = widget->property("useCustomShadow"); -- if (!value.isValid()) { -- if (widget->inherits("QComboBoxPrivateContainer")) { -- return true; -- } -- } else { -- return value.toBool(); -- } -- -- return false; --} -- --void ShadowHelper::registerWidget(QWidget *widget) --{ -- widget->removeEventFilter(this); -- -- bool needCreateShadowInstantly = false; -- if (isWidgetNeedDecoShadow(widget)) { -- widget->installEventFilter(this); -- needCreateShadowInstantly = true; -- } else { -- if (widget && widget->inherits("QComboBoxPrivateContainer")) { -- widget->installEventFilter(this); -- needCreateShadowInstantly = true; -- } -- } -- if (!widget->isVisible()) { -- needCreateShadowInstantly = false; -- } -- if(widget && widget->inherits("QMenu")){ -- needCreateShadowInstantly = true; -- } -- -- if (needCreateShadowInstantly) { -- auto shadowColor = widget->palette().text().color(); -- -- int shadowBorder = widget->property("customShadowWidth").toInt(); -- bool ok = false; -- qreal darkness = widget->property("customShadowDarkness").toReal(&ok); -- if (!ok) { -- darkness = 1.0; -- } -- QVector4D radius = qvariant_cast<QVector4D>(widget->property("customShadowRadius")); -- QVector4D margins = qvariant_cast<QVector4D>(widget->property("customShadowMargins")); -- -- if (auto tmp = m_shadows.value(widget)) { -- if (tmp->isCreated()) { -- m_shadows.remove(widget); -- tmp->destroy(); -- tmp->deleteLater(); -- } -- } -- -- auto shadow = getShadow(shadowColor, shadowBorder, darkness, radius.x(), radius.y(), radius.z(), radius.w()); -- shadow->setPadding(QMargins(margins.x(), margins.y(), margins.z(), margins.w())); -- shadow->setWindow(widget->windowHandle()); -- shadow->create(); -- -- //qInfo()<<"try set custom shadow"<<shadowBorder<<darkness<<radius<<margins; -- -- m_shadows.insert(widget, shadow); -- -- connect(widget, &QWidget::destroyed, this, [=](){ -- if (auto shadowToBeDelete = m_shadows.value(widget)) { -- if (shadowToBeDelete->isCreated()) -- shadowToBeDelete->destroy(); -- shadowToBeDelete->deleteLater(); -- m_shadows.remove(widget); -- } -- }); -- } --} -- --void ShadowHelper::unregisterWidget(const QWidget *widget) --{ -- if (m_shadows.contains(widget)) { -- auto shadow = m_shadows.value(widget); -- if (shadow->isCreated()) -- shadow->destroy(); -- shadow->deleteLater(); -- m_shadows.remove(widget); -- } --} -- --QPixmap ShadowHelper::getShadowPixmap(QColor color, /*ShadowHelper::State state,*/ int shadow_border, qreal darkness, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight) --{ -- int maxTopRadius = qMax(borderRadiusTopLeft, borderRadiusTopRight); -- int maxBottomRadius = qMax(borderRadiusBottomLeft, borderRadiusBottomRight); -- int maxRadius = qMax(maxTopRadius, maxBottomRadius); -- maxRadius = qMax(12, maxRadius); -- QPixmap pix(QSize(2 * maxRadius + 2 * shadow_border + INNERRECT_WIDTH, 2 * maxRadius + 2 * shadow_border + INNERRECT_WIDTH)); -- pix.fill(Qt::transparent); -- -- int squareWidth = 2 * maxRadius + INNERRECT_WIDTH; -- -- QPainterPath windowRelativePath; -- windowRelativePath.setFillRule(Qt::WindingFill); -- QPoint currentPos; -- -- // move to top left arc start point -- windowRelativePath.moveTo(borderRadiusTopLeft, 0); -- // top left arc -- auto topLeftBorderRadiusRect = QRect(0, 0, 2 * borderRadiusTopLeft, 2 * borderRadiusTopLeft); -- windowRelativePath.arcTo(topLeftBorderRadiusRect, 90, 90); -- // move to bottom left arc start point -- currentPos = QPoint(0, maxRadius + INNERRECT_WIDTH + maxRadius - borderRadiusBottomLeft); -- //windowRelativePath.moveTo(currentPos); -- // bottom left arc -- auto bottomLeftRect = QRect(0, currentPos.y() - borderRadiusBottomLeft, 2 * borderRadiusBottomLeft, 2 * borderRadiusBottomLeft); -- windowRelativePath.arcTo(bottomLeftRect, 180, 90); -- // move to bottom right arc start point -- currentPos = QPoint(2 * maxRadius + INNERRECT_WIDTH - borderRadiusBottomRight, 2 * maxRadius + INNERRECT_WIDTH); -- //windowRelativePath.moveTo(currentPos); -- // bottom right arc -- auto bottomRightRect = QRect(currentPos.x() - borderRadiusBottomRight, currentPos.y() - 2 * borderRadiusBottomRight, 2 * borderRadiusBottomRight, 2 * borderRadiusBottomRight); -- windowRelativePath.arcTo(bottomRightRect, 270, 90); -- // move to top right arc start point -- currentPos = QPoint(2 * maxRadius + INNERRECT_WIDTH, borderRadiusTopRight); -- //windowRelativePath.moveTo(currentPos); -- // top right arc -- auto topRightRect = QRect(squareWidth - 2 * borderRadiusTopRight, 0, 2 * borderRadiusTopRight, 2 * borderRadiusTopRight); -- windowRelativePath.arcTo(topRightRect, 0, 90); -- -- QPainter painter(&pix); -- painter.save(); -- painter.translate(shadow_border, shadow_border); -- painter.fillPath(windowRelativePath, QColor(26,26,26)); -- painter.restore(); -- -- QImage rawImg = pix.toImage(); -- qt_blurImage(rawImg, shadow_border, true, true); -- -- QPixmap target = QPixmap::fromImage(rawImg); -- QPainter painter2(&target); -- painter2.save(); -- painter2.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- painter2.translate(shadow_border, shadow_border); -- painter2.setCompositionMode(QPainter::CompositionMode_Clear); -- painter2.fillPath(windowRelativePath, Qt::transparent); -- painter2.restore(); -- painter2.end(); -- -- // handle darkness -- QImage newImg = target.toImage(); -- for (int x = 0; x < newImg.width(); x++) { -- for (int y = 0; y < newImg.height(); y++) { -- auto color = newImg.pixelColor(x, y); -- if (color.alpha() == 0) -- continue; -- color.setAlphaF(darkness * color.alphaF()); -- newImg.setPixelColor(x, y, color); -- } -- } -- -- QPixmap darkerTarget = QPixmap::fromImage(newImg); -- painter2.begin(&darkerTarget); -- -- auto borderPath = caculateRelativePainterPath(borderRadiusTopLeft + 0.5, borderRadiusTopRight + 0.5, borderRadiusBottomLeft + 0.5, borderRadiusBottomRight + 0.5); -- painter2.setCompositionMode(QPainter::CompositionMode_DestinationOver); -- painter2.setRenderHint(QPainter::HighQualityAntialiasing); -- QColor borderColor = color; -- borderColor.setAlphaF(0.05); -- painter2.setPen(borderColor); -- painter2.setBrush(Qt::NoBrush); -- painter2.translate(shadow_border, shadow_border); -- painter2.translate(-0.5, -0.5); -- painter2.drawPath(borderPath); -- -- return darkerTarget; --} -- --QPainterPath ShadowHelper::caculateRelativePainterPath(qreal borderRadiusTopLeft, qreal borderRadiusTopRight, qreal borderRadiusBottomLeft, qreal borderRadiusBottomRight) --{ -- qreal maxTopRadius = qMax(borderRadiusTopLeft, borderRadiusTopRight); -- qreal maxBottomRadius = qMax(borderRadiusBottomLeft, borderRadiusBottomRight); -- qreal maxRadius = qMax(maxTopRadius, maxBottomRadius); -- maxRadius = qMax(12.0, maxRadius); -- -- qreal squareWidth = 2 * maxRadius + INNERRECT_WIDTH; -- -- QPainterPath windowRelativePath; -- windowRelativePath.setFillRule(Qt::WindingFill); -- QPointF currentPos; -- -- // move to top left arc start point -- windowRelativePath.moveTo(borderRadiusTopLeft, 0); -- // top left arc -- auto topLeftBorderRadiusRect = QRectF(0, 0, 2 * borderRadiusTopLeft, 2 * borderRadiusTopLeft); -- windowRelativePath.arcTo(topLeftBorderRadiusRect, 90, 90); -- // move to bottom left arc start point -- currentPos = QPointF(0, maxRadius + INNERRECT_WIDTH + maxRadius - borderRadiusBottomLeft); -- //windowRelativePath.moveTo(currentPos); -- // bottom left arc -- auto bottomLeftRect = QRectF(0, currentPos.y() - borderRadiusBottomLeft, 2 * borderRadiusBottomLeft, 2 * borderRadiusBottomLeft); -- windowRelativePath.arcTo(bottomLeftRect, 180, 90); -- // move to bottom right arc start point -- currentPos = QPointF(2 * maxRadius + INNERRECT_WIDTH - borderRadiusBottomRight, 2 * maxRadius + INNERRECT_WIDTH); -- //windowRelativePath.moveTo(currentPos); -- // bottom right arc -- auto bottomRightRect = QRectF(currentPos.x() - borderRadiusBottomRight, currentPos.y() - 2 * borderRadiusBottomRight, 2 * borderRadiusBottomRight, 2 * borderRadiusBottomRight); -- windowRelativePath.arcTo(bottomRightRect, 270, 90); -- // move to top right arc start point -- currentPos = QPointF(2 * maxRadius + INNERRECT_WIDTH, borderRadiusTopRight); -- //windowRelativePath.moveTo(currentPos); -- // top right arc -- auto topRightRect = QRectF(squareWidth - 2 * borderRadiusTopRight, 0, 2 * borderRadiusTopRight, 2 * borderRadiusTopRight); -- windowRelativePath.arcTo(topRightRect, 0, 90); -- -- return windowRelativePath; --} -- --KWindowShadow *ShadowHelper::getShadow(QColor color, int shadow_border, qreal darkness, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight) --{ -- QPixmap shadowPixmap = getShadowPixmap(color, shadow_border, darkness, borderRadiusTopLeft, borderRadiusTopRight, borderRadiusBottomLeft, borderRadiusBottomRight); -- qreal maxTopRadius = qMax(borderRadiusTopLeft, borderRadiusTopRight); -- qreal maxBottomRadius = qMax(borderRadiusBottomLeft, borderRadiusBottomRight); -- int maxRadius = qMax(maxTopRadius, maxBottomRadius); -- maxRadius = qMax(12, maxRadius); -- -- QPixmap topLeftPixmap = shadowPixmap.copy(0, 0, maxRadius + shadow_border, maxRadius + shadow_border); -- QPixmap topPixmap = shadowPixmap.copy(maxRadius + shadow_border, 0, INNERRECT_WIDTH, maxRadius + shadow_border); -- QPixmap topRightPixmap = shadowPixmap.copy(maxRadius + shadow_border + INNERRECT_WIDTH, 0, maxRadius + shadow_border, maxRadius + shadow_border); -- QPixmap leftPixmap = shadowPixmap.copy(0, maxRadius + shadow_border, maxRadius + shadow_border, INNERRECT_WIDTH); -- QPixmap rightPixmap = shadowPixmap.copy(maxRadius + shadow_border + INNERRECT_WIDTH, maxRadius + shadow_border, maxRadius + shadow_border, INNERRECT_WIDTH); -- QPixmap bottomLeftPixmap = shadowPixmap.copy(0, maxRadius + shadow_border + INNERRECT_WIDTH, maxRadius + shadow_border, maxRadius + shadow_border); -- QPixmap bottomPixmap = shadowPixmap.copy(maxRadius + shadow_border, maxRadius + shadow_border + INNERRECT_WIDTH, INNERRECT_WIDTH, maxRadius + shadow_border); -- QPixmap bottomRightPixmap = shadowPixmap.copy(maxRadius + shadow_border + INNERRECT_WIDTH, maxRadius + shadow_border + INNERRECT_WIDTH, maxRadius + shadow_border, maxRadius + shadow_border); -- -- KWindowShadow *shadow = new KWindowShadow; -- KWindowShadowTile::Ptr topLeftTile = KWindowShadowTile::Ptr::create(); -- topLeftTile.get()->setImage(topLeftPixmap.toImage()); -- shadow->setTopLeftTile(topLeftTile); -- KWindowShadowTile::Ptr topTile = KWindowShadowTile::Ptr::create(); -- topTile.get()->setImage(topPixmap.toImage()); -- shadow->setTopTile(topTile); -- KWindowShadowTile::Ptr topRightTile = KWindowShadowTile::Ptr::create(); -- topRightTile.get()->setImage(topRightPixmap.toImage()); -- shadow->setTopRightTile(topRightTile); -- KWindowShadowTile::Ptr leftTile = KWindowShadowTile::Ptr::create(); -- leftTile.get()->setImage(leftPixmap.toImage()); -- shadow->setLeftTile(leftTile); -- KWindowShadowTile::Ptr rightTile = KWindowShadowTile::Ptr::create(); -- rightTile.get()->setImage(rightPixmap.toImage()); -- shadow->setRightTile(rightTile); -- KWindowShadowTile::Ptr bottomLeftTile = KWindowShadowTile::Ptr::create(); -- bottomLeftTile.get()->setImage(bottomLeftPixmap.toImage()); -- shadow->setBottomLeftTile(bottomLeftTile); -- KWindowShadowTile::Ptr bottomTile = KWindowShadowTile::Ptr::create(); -- bottomTile.get()->setImage(bottomPixmap.toImage()); -- shadow->setBottomTile(bottomTile); -- KWindowShadowTile::Ptr bottomRightTile = KWindowShadowTile::Ptr::create(); -- bottomRightTile.get()->setImage(bottomRightPixmap.toImage()); -- shadow->setBottomRightTile(bottomRightTile); -- -- return shadow; --} -- --bool ShadowHelper::eventFilter(QObject *watched, QEvent *event) --{ -- if (watched->isWidgetType()) { -- auto widget = qobject_cast<QWidget *>(watched); -- if (QX11Info::isPlatformX11() && event->type() == QEvent::Show) { -- if (watched->property("useCustomShadow").toBool() && widget->isTopLevel()) { -- auto shadowColor = widget->palette().text().color(); -- -- int shadowBorder = widget->property("customShadowWidth").toInt(); -- bool ok = false; -- qreal darkness = widget->property("customShadowDarkness").toReal(&ok); -- if (!ok) { -- darkness = 1.0; -- } -- QVector4D radius = qvariant_cast<QVector4D>(widget->property("customShadowRadius")); -- QVector4D margins = qvariant_cast<QVector4D>(widget->property("customShadowMargins")); -- -- if (auto tmp = m_shadows.value(widget)) { -- if (tmp->isCreated()) -- return false; -- } -- -- auto shadow = getShadow(shadowColor, shadowBorder, darkness, radius.x(), radius.y(), radius.z(), radius.w()); -- shadow->setPadding(QMargins(margins.x(), margins.y(), margins.z(), margins.w())); -- shadow->setWindow(widget->windowHandle()); -- shadow->create(); -- -- //qInfo()<<"try set custom shadow"<<shadowBorder<<darkness<<radius<<margins; -- -- m_shadows.insert(widget, shadow); -- -- connect(widget, &QWidget::destroyed, this, [=](){ -- if (auto shadowToBeDelete = m_shadows.value(widget)) { -- if (shadowToBeDelete->isCreated()) -- shadowToBeDelete->destroy(); -- shadowToBeDelete->deleteLater(); -- m_shadows.remove(widget); -- } -- }); -- } else { -- if (!widget->testAttribute(Qt::WA_WState_Created) && !widget->isTopLevel()) -- return false; -- -- if (auto tmp = m_shadows.value(widget)) { -- if (tmp->isCreated()) -- tmp->destroy(); -- tmp->deleteLater(); -- m_shadows.remove(widget); -- } -- -- auto shadowColor = widget->palette().text().color(); -- -- auto shadow = getShadow(shadowColor, 15, 0.5, 10, 10, 10, 10); -- shadow->setPadding(QMargins(15, 15, 15, 15)); -- shadow->setWindow(widget->windowHandle()); -- shadow->create(); -- m_shadows.insert(widget, shadow); -- -- connect(widget, &QWidget::destroyed, this, [=](){ -- if (auto shadowToBeDelete = m_shadows.value(widget)) { -- if (shadowToBeDelete->isCreated()) -- shadowToBeDelete->destroy(); -- shadowToBeDelete->deleteLater(); -- m_shadows.remove(widget); -- } -- }); -- } -- } -- } -- -- return false; --} -diff --git a/ukui-styles/qt5-style-ukui/shadow-helper.h b/ukui-styles/qt5-style-ukui/shadow-helper.h -deleted file mode 100644 -index 3b8f766..0000000 ---- a/ukui-styles/qt5-style-ukui/shadow-helper.h -+++ /dev/null -@@ -1,74 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef SHADOWHELPER_H --#define SHADOWHELPER_H -- --#include <QMap> --#include <QSharedPointer> --#include <QPixmap> -- --#include <KWindowShadow> --#include <KWindowShadowTile> --//#include "breezeboxshadowrenderer.h" -- --class ShadowHelper : public QObject --{ -- Q_OBJECT --public: -- explicit ShadowHelper(QObject *parent = nullptr); -- ~ShadowHelper(); -- -- bool isWidgetNeedDecoShadow(const QWidget *widget); -- -- void registerWidget(QWidget *widget); -- void unregisterWidget(const QWidget *widget); -- -- QPixmap getShadowPixmap(/*State state,*/ -- QColor color, -- int shadow_border, -- qreal darkness, -- int borderRadiusTopLeft = 0, -- int borderRadiusTopRight = 0, -- int borderRadiusBottomLeft = 0, -- int borderRadiusBottomRight = 0); -- -- QPainterPath caculateRelativePainterPath(qreal borderRadiusTopLeft = 0, -- qreal borderRadiusTopRight = 0, -- qreal borderRadiusBottomLeft = 0, -- qreal borderRadiusBottomRight = 0); -- -- -- KWindowShadow *getShadow(QColor color, int shadow_border, -- qreal darkness, -- int borderRadiusTopLeft = 0, -- int borderRadiusTopRight = 0, -- int borderRadiusBottomLeft = 0, -- int borderRadiusBottomRight = 0); -- -- bool eventFilter(QObject *watched, QEvent *event) override; -- --private: -- QMap<const QWidget *, KWindowShadow *> m_shadows; --}; -- --#endif // SHADOWHELPER_H -diff --git a/ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json b/ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json -deleted file mode 100644 -index 45be0db..0000000 ---- a/ukui-styles/qt5-style-ukui/themeconfig/style-ukui-classical.json -+++ /dev/null -@@ -1,7 +0,0 @@ --{ -- "Radius":{ -- "Max_Radius" : {"value": "0", "type": "int"}, -- "Normal_Radius" : {"value": "0", "type": "int"}, -- "Min_Radius" : {"value": "0", "type": "int"} -- } --} -diff --git a/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp b/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp -deleted file mode 100644 -index dae27b5..0000000 ---- a/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp -+++ /dev/null -@@ -1,2495 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <xibowen@kylinos.cn> -- * -- */ -- -- --#include <QPushButton> --#include <QToolButton> --#include <QApplication> --#include <QPainter> --#include <KWindowEffects> --#include <QPainterPath> --#include <QDebug> --#include <QObject> --#include <QGSettings> --#include <QDBusMessage> --#include <QDBusArgument> --#include <QDBusConnection> --#include <QFile> --#include <QStyle> --#include <QStandardPaths> -- --#include "ukui-style-settings.h" --#include "ukui-style-parameters.h" --#include "black-list.h" -- --#include "themeinformation.h" --#include "readconfig.h" -- --extern QColor mixColor(const QColor &c1, const QColor &c2, qreal bias); --extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); -- --UKUIStyleParameters::UKUIStyleParameters(QObject *parent, bool isDark) --{ -- QDBusMessage message = QDBusMessage::createMethodCall("com.kylin.statusmanager.interface", -- "/", -- "com.kylin.statusmanager.interface", -- "get_current_tabletmode"); -- QDBusMessage ret = QDBusConnection::sessionBus().call(message); -- if (ret.type() != QDBusMessage::ReplyMessage) -- { -- //从返回参数获取返回值 -- qDebug() << "complex type failed!"; -- } -- else -- { -- m_isTableMode = ret.arguments()[0].value<bool>(); -- } -- -- updateParameters(m_isTableMode); -- auto settings = UKUIStyleSettings::globalInstance(); -- auto styleName = settings->get("styleName").toString(); -- -- initRadius(); --} -- --QPalette UKUIStyleParameters::setPalette(QPalette &palette) --{ -- palette.setColor(QPalette::Active, QPalette::WindowText, defaultPalette.color(QPalette::Active, QPalette::WindowText)); -- palette.setColor(QPalette::Inactive, QPalette::WindowText, defaultPalette.color(QPalette::Inactive, QPalette::WindowText)); -- palette.setColor(QPalette::Disabled, QPalette::WindowText, defaultPalette.color(QPalette::Disabled, QPalette::WindowText)); -- -- palette.setColor(QPalette::Active, QPalette::Button, defaultPalette.color(QPalette::Active, QPalette::Button)); -- palette.setColor(QPalette::Inactive, QPalette::Button, defaultPalette.color(QPalette::Inactive, QPalette::Button)); -- palette.setColor(QPalette::Disabled, QPalette::Button, defaultPalette.color(QPalette::Disabled, QPalette::Button)); -- -- palette.setColor(QPalette::Active, QPalette::Light, defaultPalette.color(QPalette::Active, QPalette::Light)); -- palette.setColor(QPalette::Inactive, QPalette::Light, defaultPalette.color(QPalette::Inactive, QPalette::Light)); -- palette.setColor(QPalette::Disabled, QPalette::Light, defaultPalette.color(QPalette::Disabled, QPalette::Light)); -- -- palette.setColor(QPalette::Active, QPalette::Midlight, defaultPalette.color(QPalette::Active, QPalette::Midlight)); -- palette.setColor(QPalette::Inactive, QPalette::Midlight, defaultPalette.color(QPalette::Inactive, QPalette::Midlight)); -- palette.setColor(QPalette::Disabled, QPalette::Midlight, defaultPalette.color(QPalette::Disabled, QPalette::Midlight)); -- -- palette.setColor(QPalette::Active, QPalette::Dark, defaultPalette.color(QPalette::Active, QPalette::Dark)); -- palette.setColor(QPalette::Inactive, QPalette::Dark, defaultPalette.color(QPalette::Inactive, QPalette::Dark)); -- palette.setColor(QPalette::Disabled, QPalette::Dark, defaultPalette.color(QPalette::Disabled, QPalette::Dark)); -- -- palette.setColor(QPalette::Active, QPalette::Mid, defaultPalette.color(QPalette::Active, QPalette::Mid)); -- palette.setColor(QPalette::Inactive, QPalette::Mid, defaultPalette.color(QPalette::Inactive, QPalette::Mid)); -- palette.setColor(QPalette::Disabled, QPalette::Mid, defaultPalette.color(QPalette::Disabled, QPalette::Mid)); -- -- palette.setColor(QPalette::Active, QPalette::Text, defaultPalette.color(QPalette::Active, QPalette::Text)); -- palette.setColor(QPalette::Inactive, QPalette::Text, defaultPalette.color(QPalette::Inactive, QPalette::Text)); -- palette.setColor(QPalette::Disabled, QPalette::Text, defaultPalette.color(QPalette::Disabled, QPalette::Text)); -- -- palette.setColor(QPalette::Active, QPalette::BrightText, defaultPalette.color(QPalette::Active, QPalette::BrightText)); -- palette.setColor(QPalette::Inactive, QPalette::BrightText, defaultPalette.color(QPalette::Inactive, QPalette::BrightText)); -- palette.setColor(QPalette::Disabled, QPalette::BrightText, defaultPalette.color(QPalette::Disabled, QPalette::BrightText)); -- -- palette.setColor(QPalette::Active, QPalette::ButtonText, defaultPalette.color(QPalette::Active, QPalette::ButtonText)); -- palette.setColor(QPalette::Inactive, QPalette::ButtonText, defaultPalette.color(QPalette::Inactive, QPalette::ButtonText)); -- palette.setColor(QPalette::Disabled, QPalette::ButtonText, defaultPalette.color(QPalette::Disabled, QPalette::ButtonText)); -- -- palette.setColor(QPalette::Active, QPalette::Base, defaultPalette.color(QPalette::Active, QPalette::Base)); -- palette.setColor(QPalette::Inactive, QPalette::Base, defaultPalette.color(QPalette::Inactive, QPalette::Base)); -- palette.setColor(QPalette::Disabled, QPalette::Base, defaultPalette.color(QPalette::Disabled, QPalette::Base)); -- -- palette.setColor(QPalette::Active, QPalette::Window, defaultPalette.color(QPalette::Active, QPalette::Window)); -- palette.setColor(QPalette::Inactive, QPalette::Window, defaultPalette.color(QPalette::Inactive, QPalette::Window)); -- palette.setColor(QPalette::Disabled, QPalette::Window, defaultPalette.color(QPalette::Disabled, QPalette::Window)); -- -- palette.setColor(QPalette::Active, QPalette::Shadow, defaultPalette.color(QPalette::Active, QPalette::Shadow)); -- palette.setColor(QPalette::Inactive, QPalette::Shadow, defaultPalette.color(QPalette::Inactive, QPalette::Shadow)); -- palette.setColor(QPalette::Disabled, QPalette::Shadow, defaultPalette.color(QPalette::Disabled, QPalette::Shadow)); -- -- palette.setColor(QPalette::Active, QPalette::Highlight, defaultPalette.color(QPalette::Active, QPalette::Highlight)); -- palette.setColor(QPalette::Inactive, QPalette::Highlight, defaultPalette.color(QPalette::Inactive, QPalette::Highlight)); -- palette.setColor(QPalette::Disabled, QPalette::Highlight, defaultPalette.color(QPalette::Disabled, QPalette::Highlight)); -- -- palette.setColor(QPalette::Active, QPalette::HighlightedText, defaultPalette.color(QPalette::Active, QPalette::HighlightedText)); -- palette.setColor(QPalette::Inactive, QPalette::HighlightedText, defaultPalette.color(QPalette::Inactive, QPalette::HighlightedText)); -- palette.setColor(QPalette::Disabled, QPalette::HighlightedText, defaultPalette.color(QPalette::Disabled, QPalette::HighlightedText)); -- -- palette.setColor(QPalette::Active, QPalette::Link, defaultPalette.color(QPalette::Active, QPalette::Link)); -- palette.setColor(QPalette::Inactive, QPalette::Link, defaultPalette.color(QPalette::Inactive, QPalette::Link)); -- palette.setColor(QPalette::Disabled, QPalette::Link, defaultPalette.color(QPalette::Disabled, QPalette::Link)); -- -- palette.setColor(QPalette::Active, QPalette::LinkVisited, defaultPalette.color(QPalette::Active, QPalette::LinkVisited)); -- palette.setColor(QPalette::Inactive, QPalette::LinkVisited, defaultPalette.color(QPalette::Inactive, QPalette::LinkVisited)); -- palette.setColor(QPalette::Disabled, QPalette::LinkVisited, defaultPalette.color(QPalette::Disabled, QPalette::LinkVisited)); -- -- palette.setColor(QPalette::Active, QPalette::AlternateBase, defaultPalette.color(QPalette::Active, QPalette::AlternateBase)); -- palette.setColor(QPalette::Inactive, QPalette::AlternateBase, defaultPalette.color(QPalette::Inactive, QPalette::AlternateBase)); -- palette.setColor(QPalette::Disabled, QPalette::AlternateBase, defaultPalette.color(QPalette::Disabled, QPalette::AlternateBase)); -- -- palette.setColor(QPalette::Active, QPalette::NoRole, defaultPalette.color(QPalette::Active, QPalette::NoRole)); -- palette.setColor(QPalette::Inactive, QPalette::NoRole, defaultPalette.color(QPalette::Inactive, QPalette::NoRole)); -- palette.setColor(QPalette::Disabled, QPalette::NoRole, defaultPalette.color(QPalette::Disabled, QPalette::NoRole)); -- -- palette.setColor(QPalette::Active, QPalette::ToolTipBase, defaultPalette.color(QPalette::Active, QPalette::ToolTipBase)); -- palette.setColor(QPalette::Inactive, QPalette::ToolTipBase, defaultPalette.color(QPalette::Inactive, QPalette::ToolTipBase)); -- palette.setColor(QPalette::Disabled, QPalette::ToolTipBase, defaultPalette.color(QPalette::Disabled, QPalette::ToolTipBase)); -- -- palette.setColor(QPalette::Active, QPalette::ToolTipText, defaultPalette.color(QPalette::Active, QPalette::ToolTipText)); -- palette.setColor(QPalette::Inactive, QPalette::ToolTipText, defaultPalette.color(QPalette::Inactive, QPalette::ToolTipText)); -- palette.setColor(QPalette::Disabled, QPalette::ToolTipText, defaultPalette.color(QPalette::Disabled, QPalette::ToolTipText)); -- --#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) -- palette.setColor(QPalette::Active, QPalette::PlaceholderText, defaultPalette.color(QPalette::Active, QPalette::PlaceholderText)); -- palette.setColor(QPalette::Inactive, QPalette::PlaceholderText, defaultPalette.color(QPalette::Inactive, QPalette::PlaceholderText)); -- palette.setColor(QPalette::Disabled, QPalette::PlaceholderText, defaultPalette.color(QPalette::Disabled, QPalette::PlaceholderText)); --#endif -- -- return palette; --} -- --int UKUIStyleParameters::getSpinBoxControlLayout() --{ -- return m_spinBoxControlLayout; --} -- --int UKUIStyleParameters::getTabBarIndicatorLayout() --{ -- return m_tabBarIndicatorLayout; --} -- --void UKUIStyleParameters::setTabBarIndicatorLayout(TabBarIndicatorLayout layout) --{ -- m_tabBarIndicatorLayout = layout; --} -- --void UKUIStyleParameters::updateParameters(bool isTabletMode) --{ -- if(isTabletMode){//styleName == "ukui-dark"){// -- m_scaleRatio4_3 = (4 * 1.0) / 3.0; -- m_scaleRatio3_2 = (3 * 1.0) / 2.0; -- m_scaleRatio2_1 = (2 * 1.0) / 1.0; -- m_scaleSliderDefaultLength = (241 * 1.0) / (94 * 1.0); -- m_ScaleComboBoxDefaultLength = (49 * 1.0) / (40 * 1.0); -- m_ScaleLineEditDefaultLength = (49 * 1.0) / (40 * 1.0); -- m_scaleTabBarHeight6_5 = (6 *1.0) / (5 * 1.0); -- -- m_isTableMode = true; -- m_spinBoxControlLayout = SpinBoxControlLayout::Horizontal; -- m_headerDefaultSectionSizeVertical = m_headerDefaultSectionSizeVertical4_3; -- } -- else{ -- m_scaleRatio4_3 = 1.0; -- m_scaleRatio3_2 = 1.0; -- m_scaleRatio2_1 = 1.0; -- m_scaleSliderDefaultLength = 1.0; -- m_ScaleComboBoxDefaultLength = 1.0; -- m_ScaleLineEditDefaultLength = 1.0; -- m_scaleTabBarHeight6_5 = 1.0; -- -- m_isTableMode = false; -- m_spinBoxControlLayout = SpinBoxControlLayout::Vertical; -- m_headerDefaultSectionSizeVertical = m_headerDefaultSectionSizeVertical1_1; -- } -- -- ComboBox_DefaultMenuItemHeight = ComboBox_DefaultMenuItemHeight_original * m_scaleRatio4_3; -- MenuItem_DefaultHeight = MenuItem_DefaultHeight_origin * m_scaleRatio4_3; -- MenuItemSeparator_MarginHeight = MenuItemSeparator_MarginHeight_origin * m_scaleRatio4_3; -- LineEdit_DefaultHeight = LineEdit_DefaultHeight_origin * m_scaleRatio4_3; -- IconButton_DefaultWidth = IconButton_DefaultWidth_origin * m_scaleRatio4_3; -- Button_DefaultHeight = Button_DefaultHeight_origin * m_scaleRatio4_3; -- SpinBox_DefaultHeight = SpinBox_DefaultHeight_origin * m_scaleRatio4_3; -- ComboBox_DefaultHeight = ComboBox_DefaultHeight_origin * m_scaleRatio4_3; -- RadioButton_DefaultHeight = RadioButton_DefaultHeight_origin * m_scaleRatio4_3; -- CheckBox_DefaultHeight = CheckBox_DefaultHeight_origin * m_scaleRatio4_3; -- Table_HeaderHeight = Table_HeaderHeight_origin * m_scaleRatio4_3; -- ScroolBar_Width = ScroolBar_Width_origin * m_scaleRatio3_2; -- Slider_Length = Slider_Length_origin * m_scaleRatio2_1; -- Slider_Thickness = Slider_Thickness_origin * m_scaleRatio2_1; -- Slider_GrooveLength = Slider_GrooveLength_origin * m_scaleRatio2_1; -- Slider_DefaultLength = Slider_DefaultLength_origin * m_scaleSliderDefaultLength; -- LineEdit_DefaultWidth = LineEdit_DefaultWidth_origin * m_ScaleLineEditDefaultLength; -- TabBar_DefaultHeight = TabBar_DefaultHeight_origin * m_scaleTabBarHeight6_5; -- ViewItem_DefaultHeight = ViewItem_DefaultHeight_origin * m_scaleRatio4_3; -- ToolTip_Height = ToolTip_Height_origin * m_scaleRatio4_3; -- qDebug() << "updateParameters......... "; --} -- --QColor UKUIStyleParameters::lanhuHSLToQtHsl(int h, int s, int l, int a) --{ -- QColor c; -- c.setHsl(h, s * 255.0 /100.0, l * 255.0 /100.0, a); -- return c; --} -- --QColor UKUIStyleParameters::adjustColor(const QColor c, int hRange, int sRange, int lRange, int aRange) --{ --// qDebug() << "22222" << c.red() << c.green() << c.blue() << --// c.hslHue() << c.hslSaturationF() << c.lightnessF() << --// hRange << sRange << lRange; -- QColor cc; -- int s, l, a; -- -- if((c.hslSaturationF() + sRange * 1.0 / 100.0) > 1){ -- qWarning() << "adjustColor s out of range1"; -- s = 255; -- } -- else if((c.hslSaturationF() + sRange * 1.0 / 100.0) < 0){ -- qWarning() << "adjustColor s out of range0"; -- s = 0; -- } -- else -- s = (c.hslSaturationF() + sRange * 1.0 / 100.0) *255.0; -- -- if((c.lightnessF() + lRange * 1.0 / 100.0) > 0.97){//根据设计稿寻光色彩识别 l应<=0.97 -- qWarning() << "adjustColor l out of range1" << c.lightnessF() << lRange << (c.lightnessF() + lRange * 1.0 / 100.0); -- l = 255.0 * 0.97; -- } -- else if((c.lightnessF() + lRange * 1.0 / 100.0) < 0.15){//根据设计稿上l最小取的均值 -- qWarning() << "adjustColor l out of range0"; -- l = 0.15 * 255.0; -- } -- else -- l = (c.lightnessF() + lRange * 1.0 / 100.0) *255.0; -- -- if((c.alphaF() + aRange * 1.0 / 100.0) > 1){ -- qWarning() << "adjustColor a out of range1"; -- a = 255; -- } -- else if((c.alphaF() + aRange * 1.0 / 100.0) < 0){ -- qWarning() << "adjustColor a out of range0"; -- a = 0; -- } -- else -- a = (c.alphaF() + aRange * 1.0 / 100.0) *255.0; -- cc.setHsl(c.hslHue() + hRange, s, l, a); --// qDebug() << "33333" << c.hslHue() + hRange << (c.hslSaturationF() + sRange * 1.0 / 100.0) *255.0 << --// (c.lightnessF() + lRange * 1.0 / 100.0) * 255.0 << --// (c.alphaF() + aRange * 1.0 / 100.0) * 255.0; -- -- return cc; --} -- --QColor UKUIStyleParameters::adjustH(const QColor c, int range) --{ -- QColor cc; -- cc.setHsl(c.hslHue() + range, c.hslSaturation(), c.lightness(), c.alpha()); -- return cc; --} -- --QColor UKUIStyleParameters::adjustS(const QColor c, int range) --{ -- QColor cc; -- int s; -- -- if((c.hslSaturationF() + range * 1.0 / 100.0) > 1){ -- qWarning() << "adjustS s out of range1"; -- s = 255; -- } -- else if((c.hslSaturationF() + range * 1.0 / 100.0) < 0){ -- qWarning() << "adjustS s out of range0"; -- s = 0; -- } -- else -- s = (c.hslSaturationF() + range * 1.0 / 100.0) *255.0; -- cc.setHsl(c.hslHue(), s, c.lightness(), c.alpha()); -- return cc; --} -- --QColor UKUIStyleParameters::adjustL(const QColor c, int range) --{ -- QColor cc; -- int l; -- -- if((c.lightnessF() + range * 1.0 / 100.0) > 0.97){ -- qWarning() << "adjustL l out of range1"; -- l = 255.0 * 0.97; -- } -- else if((c.lightnessF() + range * 1.0 / 100.0) < 0.15){ -- qWarning() << "adjustL l out of range0" << c.lightnessF() << range << (c.lightnessF() + range * 1.0 / 100.0); -- l = 255.0 * 0.15; -- } -- else -- l = (c.lightnessF() + range * 1.0 / 100.0) *255.0; -- -- cc.setHsl(c.hslHue(), c.hslSaturation(), l, c.alpha()); -- return cc; --} -- --QColor UKUIStyleParameters::adjustA(const QColor c, int range) --{ -- QColor cc; -- int a; -- if((c.alphaF() + range * 1.0 / 100.0) > 1){ -- qWarning() << "adjustA a out of range1"; -- a = 255; -- } -- else if((c.alphaF() + range * 1.0 / 100.0) < 0){ -- qWarning() << "adjustA a out of range0"; -- a = 0; -- } -- else -- a = (c.alphaF() + range * 1.0 / 100.0) *255.0; -- -- -- cc.setHsl(c.hslHue(), c.hslSaturation(), c.lightness(), a); -- return cc; --} -- --QColor UKUIStyleParameters::highlightClick(bool isDark, QPalette p) --{ -- if(isDark){ -- return adjustColor(p.color(QPalette::Active, QPalette::Highlight), 0, -25, -34);//hightlight->210,72%,71% 210,47%,37% -- } -- return adjustColor(p.color(QPalette::Active, QPalette::Highlight), 3, 10, 31);//hightlight->209,87%,57% 212,97%,88% --} -- --QColor UKUIStyleParameters::highlightHover(bool isDark, QPalette p) --{ -- if(isDark){ -- return adjustColor(p.color(QPalette::Active, QPalette::Highlight), 0, -26, -40);//210,46%,31% -- } -- return adjustColor(p.color(QPalette::Active, QPalette::Highlight), 4, 2, 36);//213,89%,93% --} -- --QColor UKUIStyleParameters::buttonDarkClick(bool isDark, QPalette p) --{ -- if(isDark){ -- return adjustColor(p.color(QPalette::Disabled, QPalette::ButtonText), 0, 1, 5); -- } -- return QColor(); --} -- --void UKUIStyleParameters::normalButtonColor(bool isDark, QPalette p, QPen &defaultPen, QBrush &defaultBrush, QPen &hoverPen, -- QBrush &hoverBrush, QPen &clickPen, QBrush &clickBrush, QPen &disablePen, QBrush &disableBrush) --{ -- //default -- if(isDark){ -- defaultPen = QPen(QBrush(adjustColor(p.color(QPalette::Active, QPalette::Button), 0, 0, 8)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else -- defaultPen = QPen(QBrush(adjustColor(p.color(QPalette::Active, QPalette::Button), 0, 0, -25)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- defaultBrush = p.brush(QPalette::Active, QPalette::Button); -- -- //hover -- if (isDark) { -- //hightlight->210,72%,71% 210,67%,56% -- hoverPen = QPen(QBrush(adjustColor(p.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } else { -- //hightlight->209,87%,57% 213,73%,72% -- hoverPen = QPen(QBrush(adjustColor(p.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- hoverBrush = QBrush(highlightHover(isDark, p)); -- -- -- //click -- if (isDark) { -- //hightlight->210,72%,71% -- clickPen = QPen(p.brush(QPalette::Active, QPalette::Highlight), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } else { -- //hightlight->209,87%,57% 214,66%,60% -- clickPen = QPen(QBrush(adjustColor(p.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- clickBrush = QBrush(highlightClick(isDark, p)); -- -- //disable -- if (isDark) { -- disablePen = QPen(QBrush(adjustL(p.color(QPalette::Disabled, QPalette::Button), 18)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- disableBrush = p.brush(QPalette::Disabled, QPalette::Button); -- -- } else { -- disablePen = QPen(p.brush(QPalette::Disabled, QPalette::Button), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- disableBrush = p.brush(QPalette::Inactive, QPalette::Button); -- } --} -- --void UKUIStyleParameters::initRadius() --{ -- qDebug() << "homelocation:" << QStandardPaths::writableLocation(QStandardPaths::HomeLocation); -- QString cfgPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + -- HomeCFGColorPath + "style-ukui-classical.json"; -- if(!QFile::exists(cfgPath)){ -- cfgPath = UsrRadiusPath; -- cfgPath += "style-ukui-classical.json"; -- } -- -- if (!QFile(cfgPath).exists()) { -- qDebug() << "cfgPath:" << cfgPath << "is not exists"; -- return; -- } -- qDebug() << "cfgPath......" << cfgPath; -- if (m_readCfg == nullptr) { -- m_readCfg = new ReadThemeConfig(cfgPath); -- } -- m_radiusStruct = m_readCfg->getRadiusStruct(UKUI_Radius); -- radius = m_radiusStruct.normalRadius; -- qDebug() << "classical min:" << m_radiusStruct.minRadius << "normal:" << m_radiusStruct.normalRadius << "max:" << m_radiusStruct.maxRadius; --} -- --UKUIRadiusInformation::UKUIRadiusStruct UKUIStyleParameters::radiusProperty() --{ -- return m_radiusStruct; --} -- --//Classical widget theme --KClassicalStyleParameters::KClassicalStyleParameters(QObject *parent, bool isDark) : UKUIStyleParameters(parent, isDark) --{ -- radius = 0; -- MenuItem_Spacing = 8; -- MenuItem_HMargin = 0; -- MenuContent_HMargin = 8; -- Menu_MarginWidth = 2; -- Menu_Combobox_Popup_MarginWidth = 0; -- CheckBox_Radius = 0; -- Menu_Combobox_Popup_MarginHeight = 4; -- ComboBox_VMargin = 1; -- TabBar_ScrollButtonOverlap = 0; -- indicatorIconHoverNeedHighLight = false; -- ScrooBar_ShowLine = true; -- TabBar_SplitLine = true; -- TabBar_DefaultHeight_aug = 0; -- TabBar_DefaultHeight = 42; -- TabBar_ScrollButtonWidth = 32; -- -- initPalette(isDark); -- setTabBarIndicatorLayout(TabBarIndicatorLayout::TabBarIndicator_Vertical); -- -- if(isDark){ -- Indicator_IconDefault = defaultPalette.color(QPalette::Active, QPalette::ButtonText); -- Indicator_IconHover = defaultPalette.color(QPalette::Active, QPalette::ButtonText); -- Indicator_IconSunken = defaultPalette.color(QPalette::Active, QPalette::ButtonText); -- Indicator_IconDisable = defaultPalette.color(QPalette::Disabled, QPalette::ButtonText); -- } -- else{ -- Indicator_IconDefault = defaultPalette.color(QPalette::Active, QPalette::ButtonText); -- Indicator_IconHover = defaultPalette.color(QPalette::Active, QPalette::ButtonText); -- Indicator_IconSunken = defaultPalette.color(QPalette::Active, QPalette::ButtonText); -- Indicator_IconDisable = defaultPalette.color(QPalette::Disabled, QPalette::ButtonText); -- } --} -- --void KClassicalStyleParameters::initPalette(bool isDark) --{ -- QColor windowText_at = lanhuHSLToQtHsl(0, 0, 15), -- windowText_iat = lanhuHSLToQtHsl(0, 0, 15), -- windowText_dis = lanhuHSLToQtHsl(0, 0, 65), -- button_at = lanhuHSLToQtHsl(0, 0, 98), -- button_iat = lanhuHSLToQtHsl(0, 0, 98), -- button_dis = lanhuHSLToQtHsl(0, 0, 85), -- light_at = lanhuHSLToQtHsl(0, 0, 100), -- light_iat = lanhuHSLToQtHsl(0, 0, 100), -- light_dis = lanhuHSLToQtHsl(0, 0, 95), -- midlight_at = lanhuHSLToQtHsl(0, 0, 67), -- midlight_iat = lanhuHSLToQtHsl(0, 0, 67), -- midlight_dis = lanhuHSLToQtHsl(0, 0, 90), -- dark_at = lanhuHSLToQtHsl(0, 0, 30), -- dark_iat = lanhuHSLToQtHsl(0, 0, 30), -- dark_dis = lanhuHSLToQtHsl(0, 0, 25), -- mid_at = lanhuHSLToQtHsl(0, 0, 45), -- mid_iat = lanhuHSLToQtHsl(0, 0, 45), -- mid_dis = lanhuHSLToQtHsl(0, 0, 40), -- text_at = lanhuHSLToQtHsl(0, 0, 15), -- text_iat = lanhuHSLToQtHsl(0, 0, 15), -- text_dis = lanhuHSLToQtHsl(0, 0, 55), -- brightText_at = lanhuHSLToQtHsl(0, 0, 35), -- brightText_iat = lanhuHSLToQtHsl(0, 0, 35), -- brightText_dis = lanhuHSLToQtHsl(0, 0, 30), -- buttonText_at = lanhuHSLToQtHsl(0, 0, 15), -- buttonText_iat = lanhuHSLToQtHsl(0, 0, 15), -- buttonText_dis = lanhuHSLToQtHsl(0, 0, 70), -- base_at = lanhuHSLToQtHsl(0, 0, 100), -- base_iat = lanhuHSLToQtHsl(0, 0, 96), -- base_dis = lanhuHSLToQtHsl(0, 0, 93), -- window_at = lanhuHSLToQtHsl(0, 0, 96), -- window_iat = lanhuHSLToQtHsl(0, 0, 93), -- window_dis = lanhuHSLToQtHsl(0, 0, 90), -- shadow_at = lanhuHSLToQtHsl(0, 0, 0, 0.16 * 255), -- shadow_iat = lanhuHSLToQtHsl(0, 0, 0, 0.16 * 255), -- shadow_dis = lanhuHSLToQtHsl(0, 0, 0, 0.21 * 255), -- highLight_at = lanhuHSLToQtHsl(209, 87, 57), -- highLight_iat = lanhuHSLToQtHsl(213, 73, 72), -- highLight_dis = lanhuHSLToQtHsl(0, 0, 85), -- highLightText_at = lanhuHSLToQtHsl(0, 0, 100), -- highLightText_iat = lanhuHSLToQtHsl(0, 0, 100), -- highLightText_dis = lanhuHSLToQtHsl(0, 0, 70), -- link_at = lanhuHSLToQtHsl(213, 70, 51), -- link_iat = lanhuHSLToQtHsl(213, 70, 51), -- link_dis = lanhuHSLToQtHsl(213, 70, 51), -- linkVisited_at = lanhuHSLToQtHsl(285, 46, 55), -- linkVisited_iat = lanhuHSLToQtHsl(285, 46, 55), -- linkVisited_dis = lanhuHSLToQtHsl(285, 46, 55), -- alternateBase_at = lanhuHSLToQtHsl(180, 5, 96), -- alternateBase_iat = lanhuHSLToQtHsl(180, 5, 96), -- alternateBase_dis = lanhuHSLToQtHsl(180, 5, 96), -- noRole_at = lanhuHSLToQtHsl(0, 0, 94), -- noRole_iat = lanhuHSLToQtHsl(0, 0, 94), -- noRole_dis = lanhuHSLToQtHsl(0, 0, 85), -- toolTipBase_at = lanhuHSLToQtHsl(0, 0, 100), -- toolTipBase_iat = lanhuHSLToQtHsl(0, 0, 100), -- toolTipBase_dis = lanhuHSLToQtHsl(0, 0, 100), -- toolTipText_at = lanhuHSLToQtHsl(0, 0, 15), -- toolTipText_iat = lanhuHSLToQtHsl(0, 0, 15), -- toolTipText_dis = lanhuHSLToQtHsl(0, 0, 15), -- placeholderText_at = lanhuHSLToQtHsl(0, 0, 0, 0.35 * 255), -- placeholderText_iat = lanhuHSLToQtHsl(0, 0, 0, 0.35 * 255), -- placeholderText_dis = lanhuHSLToQtHsl(0, 0, 0, 0.35 * 255); -- -- if (isDark) { -- windowText_at = lanhuHSLToQtHsl(0, 0, 85), -- windowText_iat = lanhuHSLToQtHsl(0, 0, 85), -- windowText_dis = lanhuHSLToQtHsl(0, 0, 30), -- button_at = lanhuHSLToQtHsl(0, 0, 27), -- button_iat = lanhuHSLToQtHsl(0, 0, 27), -- button_dis = lanhuHSLToQtHsl(0, 0, 17), -- light_at = lanhuHSLToQtHsl(0, 0, 100), -- light_iat = lanhuHSLToQtHsl(0, 0, 100), -- light_dis = lanhuHSLToQtHsl(0, 0, 95), -- midlight_at = lanhuHSLToQtHsl(0, 0, 30), -- midlight_iat = lanhuHSLToQtHsl(0, 0, 30), -- midlight_dis = lanhuHSLToQtHsl(0, 0, 25), -- dark_at = lanhuHSLToQtHsl(0, 0, 15), -- dark_iat = lanhuHSLToQtHsl(0, 0, 15), -- dark_dis = lanhuHSLToQtHsl(0, 0, 10), -- mid_at = lanhuHSLToQtHsl(0, 0, 45), -- mid_iat = lanhuHSLToQtHsl(0, 0, 45), -- mid_dis = lanhuHSLToQtHsl(0, 0, 40), -- text_at = lanhuHSLToQtHsl(0, 0, 85), -- text_iat = lanhuHSLToQtHsl(0, 0, 85), -- text_dis = lanhuHSLToQtHsl(0, 0, 30), -- brightText_at = lanhuHSLToQtHsl(0, 0, 100), -- brightText_iat = lanhuHSLToQtHsl(0, 0, 100), -- brightText_dis = lanhuHSLToQtHsl(0, 0, 30), -- buttonText_at = lanhuHSLToQtHsl(0, 0, 85), -- buttonText_iat = lanhuHSLToQtHsl(0, 0, 85), -- buttonText_dis = lanhuHSLToQtHsl(240, 2, 30), -- base_at = lanhuHSLToQtHsl(0, 0, 7), -- base_iat = lanhuHSLToQtHsl(0, 0, 11), -- base_dis = lanhuHSLToQtHsl(0, 0, 14), -- window_at = lanhuHSLToQtHsl(220, 4, 14), -- window_iat = lanhuHSLToQtHsl(0, 0, 13), -- window_dis = lanhuHSLToQtHsl(0, 0, 7), -- shadow_at = lanhuHSLToQtHsl(0, 0, 0, 0.16 * 255), -- shadow_iat = lanhuHSLToQtHsl(0, 0, 0, 0.16 * 255), -- shadow_dis = lanhuHSLToQtHsl(0, 0, 0, 0.21 * 255), -- highLight_at = lanhuHSLToQtHsl(210, 72, 71), -- highLight_iat = lanhuHSLToQtHsl(210, 67, 56), -- highLight_dis = lanhuHSLToQtHsl(0, 0, 17), -- highLightText_at = lanhuHSLToQtHsl(0, 0, 100), -- highLightText_iat = lanhuHSLToQtHsl(0, 0, 100), -- highLightText_dis = lanhuHSLToQtHsl(0, 0, 30), -- link_at = lanhuHSLToQtHsl(213, 70, 51), -- link_iat = lanhuHSLToQtHsl(213, 70, 51), -- link_dis = lanhuHSLToQtHsl(213, 70, 51), -- linkVisited_at = lanhuHSLToQtHsl(285, 46, 55), -- linkVisited_iat = lanhuHSLToQtHsl(285, 46, 55), -- linkVisited_dis = lanhuHSLToQtHsl(285, 46, 55), -- alternateBase_at = lanhuHSLToQtHsl(0, 0, 15), -- alternateBase_iat = lanhuHSLToQtHsl(0, 0, 15), -- alternateBase_dis = lanhuHSLToQtHsl(0, 0, 15), -- noRole_at = lanhuHSLToQtHsl(0, 0, 20), -- noRole_iat = lanhuHSLToQtHsl(0, 0, 20), -- noRole_dis = lanhuHSLToQtHsl(240, 3, 24), -- toolTipBase_at = lanhuHSLToQtHsl(0, 0, 15), -- toolTipBase_iat = lanhuHSLToQtHsl(0, 0, 15), -- toolTipBase_dis = lanhuHSLToQtHsl(0, 0, 15), -- toolTipText_at = lanhuHSLToQtHsl(0, 0, 85), -- toolTipText_iat = lanhuHSLToQtHsl(0, 0, 85), -- toolTipText_dis = lanhuHSLToQtHsl(0, 0, 85), -- placeholderText_at = lanhuHSLToQtHsl(0, 0, 100, 0.35 * 255), -- placeholderText_iat = lanhuHSLToQtHsl(0, 0, 100, 0.35 * 255), -- placeholderText_dis = lanhuHSLToQtHsl(0, 0, 100, 0.35 * 255); -- } -- -- defaultPalette.setColor(QPalette::Active, QPalette::WindowText, windowText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::WindowText, windowText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::WindowText, windowText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Button, button_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Button, button_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Button, button_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Light, light_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Light, light_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Light, light_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Midlight, midlight_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Midlight, midlight_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Midlight, midlight_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Dark, dark_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Dark, dark_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Dark, dark_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Mid, mid_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Mid, mid_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Mid, mid_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Text, text_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Text, text_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Text, text_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::BrightText, brightText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::BrightText, brightText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::BrightText, brightText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::ButtonText, buttonText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::ButtonText, buttonText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::ButtonText, buttonText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Base, base_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Base, base_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Base, base_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Window, window_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Window, window_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Window, window_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Shadow, shadow_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Shadow, shadow_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Shadow, shadow_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Highlight, highLight_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Highlight, highLight_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Highlight, highLight_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::HighlightedText, highLightText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::HighlightedText, highLightText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::HighlightedText, highLightText_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::Link, link_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::Link, link_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::Link, link_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::LinkVisited, linkVisited_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::LinkVisited, linkVisited_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::LinkVisited, linkVisited_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::AlternateBase, alternateBase_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::AlternateBase, alternateBase_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::AlternateBase, alternateBase_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::NoRole, noRole_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::NoRole, noRole_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::NoRole, noRole_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::ToolTipBase, toolTipBase_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipBase, toolTipBase_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipBase, toolTipBase_dis); -- -- defaultPalette.setColor(QPalette::Active, QPalette::ToolTipText, toolTipText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipText, toolTipText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipText, toolTipText_dis); -- --#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) -- defaultPalette.setColor(QPalette::Active, QPalette::PlaceholderText, placeholderText_at); -- defaultPalette.setColor(QPalette::Inactive, QPalette::PlaceholderText, placeholderText_iat); -- defaultPalette.setColor(QPalette::Disabled, QPalette::PlaceholderText, placeholderText_dis); --#endif -- ColoseButtonColor = lanhuHSLToQtHsl(0, 0, 85); -- --} -- --void KClassicalStyleParameters::initPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int radius = radiusProperty().normalRadius; -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush clickBrush; -- QBrush disableBrush; -- QBrush checkBrush; -- QBrush checkHoverBrush; -- QBrush checkClickBrush; -- QBrush checkDisableBrush; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen clickPen; -- QPen disablePen; -- QPen checkPen; -- QPen checkHoverPen; -- QPen checkClickPen; -- QPen checkDisablePen; -- QPen focusPen; -- -- normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, -- clickPen, clickBrush, disablePen, disableBrush); -- //check -- checkPen = defaultPen; -- checkHoverPen = hoverPen; -- checkClickPen = clickPen; -- checkDisablePen = disablePen; -- checkBrush = defaultBrush; -- checkHoverBrush = hoverBrush; -- checkClickBrush = clickBrush; -- checkDisableBrush = disableBrush; -- -- //focus -- focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- if (qobject_cast<const QPushButton *>(widget)) { -- bool isWindowColoseButton = false; -- -- if (widget->property("isWindowButton").isValid()) { -- if (widget->property("isWindowButton").toInt() == 0x02) { -- isWindowColoseButton = true; -- } -- } -- -- if (isWindowColoseButton) { -- hoverPen = QPen(QBrush(QColor(207, 20, 34)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- hoverBrush = QBrush(QColor(244, 78, 80)); -- -- clickPen = QPen(QBrush(QColor(161, 0, 12)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- clickBrush = QBrush(QColor(207, 20, 34)); -- } -- } -- -- if(widget){ -- if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -- radius = widget->property("setRadius").value<int>(); -- } -- if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { -- defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setClickBrush").isValid() && widget->property("setClickBrush").canConvert<QBrush>()) { -- clickBrush = widget->property("setClickBrush").value<QBrush>(); -- } -- if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { -- hoverBrush = widget->property("setHoverBrush").value<QBrush>(); -- } -- if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { -- disableBrush = widget->property("setDisableBrush").value<QBrush>(); -- } -- if (widget->property("setCheckBrush").isValid() && widget->property("setCheckBrush").canConvert<QBrush>()) { -- checkBrush = widget->property("setCheckBrush").value<QBrush>(); -- } -- if (widget->property("setCheckHoverBrush").isValid() && widget->property("setCheckHoverBrush").canConvert<QBrush>()) { -- checkHoverBrush = widget->property("setCheckHoverBrush").value<QBrush>(); -- } -- if (widget->property("setCheckClickBrush").isValid() && widget->property("setCheckClickBrush").canConvert<QBrush>()) { -- checkClickBrush = widget->property("setCheckClickBrush").value<QBrush>(); -- } -- if (widget->property("setCheckDisableBrush").isValid() && widget->property("setCheckDisableBrush").canConvert<QBrush>()) { -- checkDisableBrush = widget->property("setCheckDisableBrush").value<QBrush>(); -- } -- if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { -- defaultPen = widget->property("setDefaultPen").value<QPen>(); -- } -- if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { -- clickPen = widget->property("setClickPen").value<QPen>(); -- } -- if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { -- hoverPen = widget->property("setHoverPen").value<QPen>(); -- } -- if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { -- disablePen = widget->property("setDisablePen").value<QPen>(); -- } -- if (widget->property("setCheckPen").isValid() && widget->property("setCheckPen").canConvert<QPen>()) { -- checkPen = widget->property("setCheckPen").value<QPen>(); -- } -- if (widget->property("setCheckHoverPen").isValid() && widget->property("setCheckHoverPen").canConvert<QPen>()) { -- checkHoverPen = widget->property("setCheckHoverPen").value<QPen>(); -- } -- if (widget->property("setCheckClickPen").isValid() && widget->property("setCheckClickPen").canConvert<QPen>()) { -- checkClickPen = widget->property("setCheckClickPen").value<QPen>(); -- } -- if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { -- checkDisablePen = widget->property("setDisablePen").value<QPen>(); -- } -- if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { -- focusPen = widget->property("setFocusPen").value<QPen>(); -- } -- } -- -- pushButtonParameters.radius = radius; -- pushButtonParameters.pushButtonDefaultBrush = defaultBrush; -- pushButtonParameters.pushButtonClickBrush = clickBrush; -- pushButtonParameters.pushButtonHoverBrush = hoverBrush; -- pushButtonParameters.pushButtonDisableBrush = disableBrush; -- pushButtonParameters.pushButtonCheckBrush = checkBrush; -- pushButtonParameters.pushButtonCheckHoverBrush = checkHoverBrush; -- pushButtonParameters.pushButtonCheckClickBrush = checkClickBrush; -- pushButtonParameters.pushButtonCheckDisableBrush = checkDisableBrush; -- pushButtonParameters.pushButtonDefaultPen = defaultPen; -- pushButtonParameters.pushButtonClickPen = clickPen; -- pushButtonParameters.pushButtonHoverPen = hoverPen; -- pushButtonParameters.pushButtonDisablePen = disablePen; -- pushButtonParameters.pushButtonCheckPen = checkPen; -- pushButtonParameters.pushButtonCheckHoverPen = checkHoverPen; -- pushButtonParameters.pushButtonCheckClickPen = checkClickPen; -- pushButtonParameters.pushButtonCheckDisablePen = checkDisablePen; -- pushButtonParameters.pushButtonFocusPen = focusPen; --} -- --void KClassicalStyleParameters::initPushButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- bool iconHighlight = false; -- bool textHighlight = false; -- -- const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option); -- bool isWindowCloseButton = false; -- -- if (qobject_cast<const QPushButton *>(widget)) { -- if (widget->property("isWindowButton").isValid()) { -- if (widget->property("isWindowButton").toInt() == 0x02) { -- isWindowCloseButton = true; -- } -- } -- } -- -- //icon -- if ((isWindowCloseButton) && !(button->state & QStyle::State_On)) { -- iconHighlight = true; -- } -- -- //text -- if (isWindowCloseButton && (button->state & (QStyle::State_MouseOver | QStyle::State_Sunken | QStyle::State_On))) { -- textHighlight = true; -- } else { -- textHighlight = false; -- } -- -- if(widget){ -- if (widget->property("setIconHoverClickHighlight").isValid() && widget->property("setIconHoverClickHighlight").canConvert<bool>()) { -- iconHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); -- } -- if (widget->property("setTextHoverClickHighlight").isValid() && widget->property("setTextHoverClickHighlight").canConvert<bool>()) { -- textHighlight = widget->property("setTextHoverClickHighlight").value<bool>(); -- } -- } -- -- pushButtonParameters.iconHoverClickHighlight = iconHighlight; -- pushButtonParameters.textHoverClickHighlight = textHighlight; --} -- --void KClassicalStyleParameters::initToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int radius = radiusProperty().normalRadius; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush clickBrush; -- QBrush disableBrush; -- QBrush checkBrush; -- QBrush checkHoverBrush; -- QBrush checkClickBrush; -- QBrush checkDisableBrush; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen clickPen; -- QPen disablePen; -- QPen checkPen; -- QPen checkHoverPen; -- QPen checkClickPen; -- QPen checkDisablePen; -- QPen focusPen; -- -- -- normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, -- clickPen, clickBrush, disablePen, disableBrush); -- //check -- checkPen = defaultPen; -- checkHoverPen = hoverPen; -- checkClickPen = clickPen; -- checkDisablePen = disablePen; -- checkBrush = defaultBrush; -- checkHoverBrush = hoverBrush; -- checkClickBrush = clickBrush; -- checkDisableBrush = disableBrush; -- -- //focus -- focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- if (qobject_cast<const QPushButton *>(widget)) { -- bool isWindowColoseButton = false; -- -- if (widget->property("isWindowButton").isValid()) { -- if (widget->property("isWindowButton").toInt() == 0x02) { -- isWindowColoseButton = true; -- } -- } -- -- if (isWindowColoseButton) { -- hoverPen = QPen(QBrush(QColor(207, 20, 34)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- hoverBrush = QBrush(QColor(244, 78, 80)); -- -- clickPen = QPen(QBrush(QColor(161, 0, 12)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- clickBrush = QBrush(QColor(207, 20, 34)); -- } -- } -- -- if(widget){ -- if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -- radius = widget->property("setRadius").value<int>(); -- } -- if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { -- defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setClickBrush").isValid() && widget->property("setClickBrush").canConvert<QBrush>()) { -- clickBrush = widget->property("setClickBrush").value<QBrush>(); -- } -- if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { -- hoverBrush = widget->property("setHoverBrush").value<QBrush>(); -- } -- if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { -- disableBrush = widget->property("setDisableBrush").value<QBrush>(); -- } -- if (widget->property("setCheckBrush").isValid() && widget->property("setCheckBrush").canConvert<QBrush>()) { -- checkBrush = widget->property("setCheckBrush").value<QBrush>(); -- } -- if (widget->property("setCheckHoverBrush").isValid() && widget->property("setCheckHoverBrush").canConvert<QBrush>()) { -- checkHoverBrush = widget->property("setCheckHoverBrush").value<QBrush>(); -- } -- if (widget->property("setCheckClickBrush").isValid() && widget->property("setCheckClickBrush").canConvert<QBrush>()) { -- checkClickBrush = widget->property("setCheckClickBrush").value<QBrush>(); -- } -- if (widget->property("setCheckDisableBrush").isValid() && widget->property("setCheckDisableBrush").canConvert<QBrush>()) { -- checkDisableBrush = widget->property("setCheckDisableBrush").value<QBrush>(); -- } -- if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { -- defaultPen = widget->property("setDefaultPen").value<QPen>(); -- } -- if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { -- clickPen = widget->property("setDefaultPen").value<QPen>(); -- } -- if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { -- hoverPen = widget->property("setClickPen").value<QPen>(); -- } -- if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { -- disablePen = widget->property("setHoverPen").value<QPen>(); -- } -- if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { -- checkPen = widget->property("setDisablePen").value<QPen>(); -- } -- if (widget->property("setCheckHoverPen").isValid() && widget->property("setCheckHoverPen").canConvert<QPen>()) { -- checkHoverPen = widget->property("setCheckHoverPen").value<QPen>(); -- } -- if (widget->property("setCheckClickPen").isValid() && widget->property("setCheckClickPen").canConvert<QPen>()) { -- checkClickPen = widget->property("setCheckClickPen").value<QPen>(); -- } -- if (widget->property("setCheckDisablePen").isValid() && widget->property("setCheckDisablePen").canConvert<QPen>()) { -- checkDisablePen = widget->property("setCheckDisablePen").value<QPen>(); -- } -- if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { -- focusPen = widget->property("setFocusPen").value<QPen>(); -- } -- } -- -- toolButtonParameters.radius = radius; -- toolButtonParameters.toolButtonDefaultBrush = defaultBrush; -- toolButtonParameters.toolButtonClickBrush = clickBrush; -- toolButtonParameters.toolButtonHoverBrush = hoverBrush; -- toolButtonParameters.toolButtonDisableBrush = disableBrush; -- toolButtonParameters.toolButtonCheckBrush = checkBrush; -- toolButtonParameters.toolButtonCheckHoverBrush = checkHoverBrush; -- toolButtonParameters.toolButtonCheckClickBrush = checkClickBrush; -- toolButtonParameters.toolButtonCheckDisableBrush = checkDisableBrush; -- toolButtonParameters.toolButtonDefaultPen = defaultPen; -- toolButtonParameters.toolButtonClickPen = clickPen; -- toolButtonParameters.toolButtonHoverPen = hoverPen; -- toolButtonParameters.toolButtonDisablePen = disablePen; -- toolButtonParameters.toolButtonCheckPen = checkPen; -- toolButtonParameters.toolButtonCheckHoverPen = checkHoverPen; -- toolButtonParameters.toolButtonCheckClickPen = checkClickPen; -- toolButtonParameters.toolButtonCheckDisablePen = checkDisablePen; -- toolButtonParameters.toolButtonFocusPen = focusPen; --} -- --void KClassicalStyleParameters::initToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- bool iconHighlight = false; -- bool textHighlight = false; -- --// const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option); -- -- if(widget){ -- if (widget->property("setIconHoverClickHighlight").isValid() && widget->property("setIconHoverClickHighlight").canConvert<bool>()) { -- iconHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); -- } -- if (widget->property("setTextHoverClickHighlight").isValid() && widget->property("setTextHoverClickHighlight").canConvert<bool>()) { -- iconHighlight = widget->property("setTextHoverClickHighlight").value<bool>(); -- } -- } -- -- toolButtonParameters.iconHoverClickHighlight = iconHighlight; -- toolButtonParameters.textHoverClickHighlight = textHighlight; --} -- --void KClassicalStyleParameters::initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int radius = radiusProperty().normalRadius; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush focusBrush; -- QBrush disableBrush; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen focusPen; -- QPen disablePen; -- -- //default state -- defaultBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- if(isDark){ -- defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else -- defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- //hover state -- hoverBrush = defaultBrush; -- hoverPen = defaultPen; -- -- //focus state -- focusBrush = defaultBrush; -- focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- //disable state -- if (isDark) { -- disablePen = QPen(QBrush(adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), 18)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- -- } else { -- disablePen = QPen(option->palette.brush(QPalette::Disabled, QPalette::Button), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- disableBrush = option->palette.brush(QPalette::Inactive, QPalette::Button); -- } -- -- if(widget){ -- if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -- radius = widget->property("setRadius").value<int>(); -- } -- if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { -- defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { -- hoverBrush = widget->property("setHoverBrush").value<QBrush>(); -- } -- if (widget->property("setFocusBrush").isValid() && widget->property("setFocusBrush").canConvert<QBrush>()) { -- focusBrush = widget->property("setFocusBrush").value<QBrush>(); -- } -- if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { -- disableBrush = widget->property("setDisableBrush").value<QBrush>(); -- } -- if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { -- defaultPen = widget->property("setDefaultPen").value<QPen>(); -- } -- if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { -- hoverPen = widget->property("setHoverPen").value<QPen>(); -- } -- if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { -- focusPen = widget->property("setFocusPen").value<QPen>(); -- } -- if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { -- disablePen = widget->property("setDisablePen").value<QPen>(); -- } -- } -- lineEditParameters.radius = radius; -- lineEditParameters.lineEditDefaultBrush = defaultBrush; -- lineEditParameters.lineEditHoverBrush = hoverBrush; -- lineEditParameters.lineEditFocusBrush = focusBrush; -- lineEditParameters.lineEditDisableBrush = disableBrush; -- -- lineEditParameters.lineEditDefaultPen = defaultPen; -- lineEditParameters.lineEditHoverPen = hoverPen; -- lineEditParameters.lineEditFocusPen = focusPen; -- lineEditParameters.lineEditDisablePen = disablePen; --} -- --void KClassicalStyleParameters::initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout) --{ -- spinBoxParameters.radius = radiusProperty().normalRadius; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush focusBrush; -- QBrush disableBrush; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen focusPen; -- QPen disablePen; -- -- QBrush upDefaultBrush; -- QBrush upHoverBrush; -- QBrush upFocusHoverBrush; -- QBrush upClickBrush; -- QBrush upDisableBrush; -- QBrush downDefaultBrush; -- QBrush downHoverBrush; -- QBrush downFocusHoverBrush; -- QBrush downClickBrush; -- QBrush downDisableBrush; -- -- QPen upDefaultPen; -- QPen upHoverPen; -- QPen upFocusHoverPen; -- QPen upClickPen; -- QPen upDisablePen; -- QPen downDefaultPen; -- QPen downHoverPen; -- QPen downFocusHoverPen; -- QPen downClickPen; -- QPen downDisablePen; -- -- -- //default state -- defaultBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- if(isDark) -- defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else -- defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- //hover state -- hoverBrush = defaultBrush; -- hoverPen = defaultPen; -- -- //focus state -- focusBrush = defaultBrush; -- focusPen = QPen(option->palette.color(QPalette::Active, QPalette::Highlight), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- //disable state -- if (isDark) { -- disablePen = QPen(QBrush(adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), 18)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- -- } else { -- disablePen = QPen(option->palette.brush(QPalette::Disabled, QPalette::Button), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- disableBrush = option->palette.brush(QPalette::Inactive, QPalette::Button); -- } -- -- -- //up default -- if(isDark) -- upDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else -- upDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- upDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- -- //up hover -- if (isDark) { -- upHoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } else { -- upHoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- upHoverBrush = QBrush(highlightHover(isDark, option->palette)); -- -- //up focus hover -- upFocusHoverBrush = upHoverBrush; -- upFocusHoverPen = upHoverPen; -- -- //up click -- if (isDark) { -- upClickPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } else { -- upClickPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- upClickBrush = QBrush(highlightClick(isDark, option->palette)); -- -- //up disable -- upDisableBrush = disableBrush; -- upDisablePen = disablePen; -- -- //down default -- downDefaultBrush = upDefaultBrush; -- downDefaultPen = upDefaultPen; -- -- //down hover -- downHoverBrush = upHoverBrush; -- downHoverPen = upHoverPen; -- -- //down focus hover -- downFocusHoverPen = upFocusHoverPen; -- downFocusHoverBrush = upFocusHoverBrush; -- -- //down click -- downClickBrush = upClickBrush; -- downClickPen = upClickPen; -- -- //down disable -- downDisableBrush = upDisableBrush; -- downDisablePen = upDisablePen; -- -- -- spinBoxParameters.spinBoxDefaultBrush = defaultBrush; -- spinBoxParameters.spinBoxHoverBrush = hoverBrush; -- spinBoxParameters.spinBoxFocusBrush = focusBrush; -- spinBoxParameters.spinBoxDisableBrush = disableBrush; -- -- spinBoxParameters.spinBoxDefaultPen = defaultPen; -- spinBoxParameters.spinBoxHoverPen = hoverPen; -- spinBoxParameters.spinBoxFocusPen = focusPen; -- spinBoxParameters.spinBoxDisablePen = disablePen; -- -- spinBoxParameters.spinBoxUpDefaultBrush = upDefaultBrush; -- spinBoxParameters.spinBoxUpHoverBrush = upHoverBrush; -- spinBoxParameters.spinBoxUpFocusHoverBrush = upFocusHoverBrush; -- spinBoxParameters.spinBoxUpClickBrush = upClickBrush; -- spinBoxParameters.spinBoxUpDisableBrush = upDisableBrush; -- -- spinBoxParameters.spinBoxDownDefaultBrush = downDefaultBrush; -- spinBoxParameters.spinBoxDownHoverBrush = downHoverBrush; -- spinBoxParameters.spinBoxDownFocusHoverBrush = downFocusHoverBrush; -- spinBoxParameters.spinBoxDownClickBrush = downClickBrush; -- spinBoxParameters.spinBoxDownDisableBrush = downDisableBrush; -- -- spinBoxParameters.spinBoxUpDefaultPen = upDefaultPen; -- spinBoxParameters.spinBoxUpHoverPen = upHoverPen; -- spinBoxParameters.spinBoxUpFocusHoverPen = upFocusHoverPen; -- spinBoxParameters.spinBoxUpClickPen = upClickPen; -- spinBoxParameters.spinBoxUpDisablePen = upDisablePen; -- -- spinBoxParameters.spinBoxDownDefaultPen = downDefaultPen; -- spinBoxParameters.spinBoxDownHoverPen = downHoverPen; -- spinBoxParameters.spinBoxDownFocusHoverPen = downFocusHoverPen; -- spinBoxParameters.spinBoxDownClickPen = downClickPen; -- spinBoxParameters.spinBoxDownDisablePen = downDisablePen; -- -- spinBoxParameters.spinBoxUpIconHightPixMap = false; -- spinBoxParameters.spinBoxDownIconHightPixMap = false; --} -- --void KClassicalStyleParameters::initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int radius = radiusProperty().normalRadius; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush onBrush; -- QBrush editBrush; -- QBrush disableBrush; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen onPen; -- QPen editPen; -- QPen disablePen; -- -- -- normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, -- onPen, onBrush, disablePen, disableBrush); -- -- //edit -- editBrush = onBrush; -- editPen = onPen; -- if(widget){ -- if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -- radius = widget->property("setRadius").value<int>(); -- } -- if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { -- defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { -- hoverBrush = widget->property("setHoverBrush").value<QBrush>(); -- } -- if (widget->property("setOnBrush").isValid() && widget->property("setOnBrush").canConvert<QBrush>()) { -- onBrush = widget->property("setOnBrush").value<QBrush>(); -- } -- if (widget->property("setBoxEditBrush").isValid() && widget->property("setBoxEditBrush").canConvert<QBrush>()) { -- editBrush = widget->property("setBoxEditBrush").value<QBrush>(); -- } -- if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { -- disableBrush = widget->property("setDisableBrush").value<QBrush>(); -- } -- if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { -- defaultPen = widget->property("setDefaultPen").value<QPen>(); -- } -- if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { -- hoverPen = widget->property("setHoverPen").value<QPen>(); -- } -- if (widget->property("setOnPen").isValid() && widget->property("setOnPen").canConvert<QPen>()) { -- onPen = widget->property("setOnPen").value<QPen>(); -- } -- if (widget->property("setEditPen").isValid() && widget->property("setEditPen").canConvert<QPen>()) { -- editPen = widget->property("setEditPen").value<QPen>(); -- } -- if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { -- disablePen = widget->property("setDisablePen").value<QPen>(); -- } -- } -- -- comboBoxParameters.radius = radius; -- -- comboBoxParameters.comboBoxDefaultBrush = defaultBrush; -- comboBoxParameters.comboBoxHoverBrush = hoverBrush; -- comboBoxParameters.comboBoxOnBrush = onBrush; -- comboBoxParameters.comboBoxEditBrush = editBrush; -- comboBoxParameters.comboBoxDisableBrush = disableBrush; -- -- comboBoxParameters.comboBoxDefaultPen = defaultPen; -- comboBoxParameters.comboBoxHoverPen = hoverPen; -- comboBoxParameters.comboBoxOnPen = onPen; -- comboBoxParameters.comboBoxEditPen = editPen; -- comboBoxParameters.comboBoxDisablePen = disablePen; --} -- --void KClassicalStyleParameters::initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int radius = radiusProperty().normalRadius; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush selectBrush; -- QBrush disableBrush; -- QPen hoverPen ; -- QPen selectPen ; -- QPen textHoverPen ; -- QPen textSelectPen ; -- -- //default -- defaultBrush = QBrush(Qt::transparent); -- -- //hover -- //hoverBrush = option->palette.brush(QPalette::Disabled, QPalette::Midlight); -- hoverBrush = QBrush(highlightHover(isDark, option->palette)); -- textHoverPen = option->palette.color(QPalette::Normal, QPalette::Text); -- -- //select -- //selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -- selectBrush = QBrush(highlightClick(isDark, option->palette)); -- textSelectPen = option->palette.color(QPalette::Normal, QPalette::Text); -- -- if(isDark) -- hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else -- hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- if(isDark) -- -- selectPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else -- selectPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- -- //disable -- disableBrush = QBrush(Qt::transparent); -- -- const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option); -- QPalette::ColorGroup cg = vi->state & QStyle::State_Enabled -- ? QPalette::Normal : QPalette::Disabled; -- if (cg == QPalette::Normal && !(vi->state & QStyle::State_Active)) -- cg = QPalette::Inactive; -- -- if(widget){ -- if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -- radius = widget->property("setRadius").value<int>(); -- } -- if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { -- defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { -- hoverBrush = widget->property("setHoverBrush").value<QBrush>(); -- } -- if (widget->property("setSelectBrush").isValid() && widget->property("setSelectBrush").canConvert<QBrush>()) { -- selectBrush = widget->property("setSelectBrush").value<QBrush>(); -- } -- if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { -- disableBrush = widget->property("setDisableBrush").value<QBrush>(); -- } -- if (widget->property("setTextHoverPen").isValid() && widget->property("setTextHoverPen").canConvert<QPen>()) { -- textHoverPen = widget->property("setTextHoverPen").value<QPen>(); -- } -- if (widget->property("setTextSelectPen").isValid() && widget->property("setTextSelectPen").canConvert<QPen>()) { -- textSelectPen = widget->property("setTextSelectPen").value<QPen>(); -- } -- } -- -- listParameters.radius = radius; -- listParameters.listDefaultBrush = defaultBrush; -- listParameters.listHoverBrush = hoverBrush; -- listParameters.listSelectBrush = selectBrush; -- listParameters.listHoverPen = hoverPen; -- listParameters.listSelectPen = selectPen; -- listParameters.listDisableBrush = disableBrush; -- listParameters.listTextHoverPen = textHoverPen; -- listParameters.listTextSelectPen = textSelectPen; -- --} -- --void KClassicalStyleParameters::initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int radius = radiusProperty().normalRadius; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush selectBrush; -- QBrush disableBrush; -- QPen hoverPen; -- QPen selectPen; -- -- QBrush branchDefaultBrush; -- QBrush branchHoverBrush; -- QBrush branchSelectBrush; -- QBrush branchDisableBrush; -- QPen textHoverPen; -- QPen textSelectPen; -- -- //default -- defaultBrush = QBrush(Qt::transparent); -- branchDefaultBrush = defaultBrush; -- -- //hover -- //hoverBrush = option->palette.brush(QPalette::Disabled, QPalette::Midlight); -- hoverBrush = QBrush(highlightHover(isDark, option->palette)); -- branchHoverBrush = hoverBrush; -- textHoverPen = option->palette.color(QPalette::Normal, QPalette::Text); -- -- //select -- //selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -- selectBrush = QBrush(highlightClick(isDark, option->palette)); -- branchSelectBrush = selectBrush; -- textSelectPen = option->palette.color(QPalette::Normal, QPalette::Text); -- -- if(isDark) -- hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else -- hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- if(isDark) -- -- selectPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else -- selectPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- //disable -- disableBrush = QBrush(Qt::transparent); -- branchDisableBrush = disableBrush; -- --// if(widget->property("animation").isValid()) --// treeParameters.animation = widget->property("animation").toBool(); -- -- if(widget){ -- if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -- radius = widget->property("setRadius").value<int>(); -- } -- if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { -- defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { -- hoverBrush = widget->property("setHoverBrush").value<QBrush>(); -- } -- if (widget->property("setSelectBrush").isValid() && widget->property("setSelectBrush").canConvert<QBrush>()) { -- selectBrush = widget->property("setSelectBrush").value<QBrush>(); -- } -- if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { -- disableBrush = widget->property("setDisableBrush").value<QBrush>(); -- } -- if (widget->property("setBranchDefaultBrush").isValid() && widget->property("setBranchDefaultBrush").canConvert<QBrush>()) { -- branchDefaultBrush = widget->property("setBranchDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setBranchHoverBrush").isValid() && widget->property("setBranchHoverBrush").canConvert<QBrush>()) { -- branchHoverBrush = widget->property("setBranchHoverBrush").value<QBrush>(); -- } -- if (widget->property("setBranchSelectBrush").isValid() && widget->property("setBranchSelectBrush").canConvert<QBrush>()) { -- branchSelectBrush = widget->property("setBranchSelectBrush").value<QBrush>(); -- } -- if (widget->property("setBranchDisableBrush").isValid() && widget->property("setBranchDisableBrush").canConvert<QBrush>()) { -- branchDisableBrush = widget->property("setBranchDisableBrush").value<QBrush>(); -- } -- if (widget->property("setTextHoverPen").isValid() && widget->property("setTextHoverPen").canConvert<QPen>()) { -- textHoverPen = widget->property("setTextHoverPen").value<QPen>(); -- } -- if (widget->property("setTextSelectPen").isValid() && widget->property("setTextSelectPen").canConvert<QPen>()) { -- textSelectPen = widget->property("setTextSelectPen").value<QPen>(); -- } -- } -- -- treeParameters.radius = radius; -- treeParameters.treeDefaultBrush = defaultBrush; -- treeParameters.treeHoverBrush = hoverBrush; -- treeParameters.treeSelectBrush = selectBrush; -- treeParameters.treeDisableBrush = disableBrush; -- -- treeParameters.treeHoverPen = hoverPen; -- treeParameters.treeSelectPen = selectPen; -- -- treeParameters.treeBranchDefaultBrush = branchDefaultBrush; -- treeParameters.treeBranchHoverBrush = branchHoverBrush; -- treeParameters.treeBranchSelectBrush = branchSelectBrush; -- treeParameters.treeBranchDisableBrush = branchDisableBrush; -- -- treeParameters.treeTextHoverPen = textHoverPen; -- treeParameters.treeTextSelectPen = textSelectPen; --} -- --void KClassicalStyleParameters::initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int radius = radiusProperty().normalRadius; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush selectBrush; -- QBrush disableBrush; -- QPen hoverPen; -- QPen selectPen; -- QPen textHoverPen; -- QPen textSelectPen; -- -- -- //default -- defaultBrush = QBrush(Qt::transparent); -- -- //hover -- hoverBrush = QBrush(highlightHover(isDark, option->palette)); -- textHoverPen = option->palette.color(QPalette::Normal, QPalette::Text); -- -- //select -- selectBrush = QBrush(highlightClick(isDark, option->palette)); -- textSelectPen = option->palette.color(QPalette::Normal, QPalette::Text); -- -- if(isDark) -- hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else -- hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- if(isDark) -- -- selectPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else -- selectPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- -- //disable -- disableBrush = QBrush(Qt::transparent); -- -- if(widget){ -- if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -- radius = widget->property("setRadius").value<int>(); -- } -- if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { -- defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { -- hoverBrush = widget->property("setHoverBrush").value<QBrush>(); -- } -- if (widget->property("setSelectBrush").isValid() && widget->property("setSelectBrush").canConvert<QBrush>()) { -- selectBrush = widget->property("setSelectBrush").value<QBrush>(); -- } -- if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { -- disableBrush = widget->property("setDisableBrush").value<QBrush>(); -- } -- if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { -- hoverPen = widget->property("setHoverPen").value<QPen>(); -- } -- if (widget->property("setSelectPen").isValid() && widget->property("setSelectPen").canConvert<QPen>()) { -- selectPen = widget->property("setSelectPen").value<QPen>(); -- } -- if (widget->property("setTextHoverPen").isValid() && widget->property("setTextHoverPen").canConvert<QPen>()) { -- textHoverPen = widget->property("setTextHoverPen").value<QPen>(); -- } -- if (widget->property("setTextSelectPen").isValid() && widget->property("setTextSelectPen").canConvert<QPen>()) { -- textSelectPen = widget->property("setTextSelectPen").value<QPen>(); -- } -- } -- -- tableParameters.radius = radius; -- -- tableParameters.tableDefaultBrush = defaultBrush; -- tableParameters.tableHoverBrush = hoverBrush; -- tableParameters.tableSelectBrush = selectBrush; -- tableParameters.tableDisableBrush = disableBrush; -- tableParameters.tableHoverPen = hoverPen; -- tableParameters.tableSelectPen = selectPen; -- tableParameters.tableTextHoverPen = textHoverPen; -- tableParameters.tableTextSelectPen = textSelectPen; -- --} -- --void KClassicalStyleParameters::initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int radius = radiusProperty().minRadius; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen clickPen; -- QPen disablePen; -- QPen onDefaultPen; -- QPen onHoverPen; -- QPen onClickPen; -- QPen contentPen; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush clickBrush; -- QBrush disableBrush; -- QBrush onDefaultBrush; -- QBrush onHoverBrush; -- QBrush onClickBrush; -- QBrush pathBrush; -- QBrush pathDisableBrush; -- -- bool onHoverBrushIslinearGradient = false; -- -- normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, -- clickPen, clickBrush, disablePen, disableBrush); -- -- //on default -- onDefaultPen = defaultPen; -- onDefaultBrush = defaultBrush; -- -- //on hover -- onHoverPen = hoverPen; -- onHoverBrush = hoverBrush; -- -- //on click -- onClickPen = clickPen; -- onClickBrush = clickBrush; -- -- //path -- pathBrush = option->palette.brush(QPalette::Active, QPalette::Text); -- pathDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::ButtonText); -- --// if(widget->property("animation").isValid()) --// checkBoxParameters.animation = widget->property("animation").toBool(); -- -- checkBoxParameters.checkBoxContentPen = QPen(QBrush(option->palette.brush(QPalette::Active, QPalette::ButtonText)), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- if(widget){ -- if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -- radius = widget->property("setRadius").value<int>(); -- } -- if (widget->property("setContentPen").isValid() && widget->property("setContentPen").canConvert<QPen>()) { -- contentPen = widget->property("setContentPen").value<QPen>(); -- } -- if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { -- defaultPen = widget->property("setDefaultPen").value<QPen>(); -- } -- if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { -- hoverPen = widget->property("setHoverPen").value<QPen>(); -- } -- if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { -- clickPen = widget->property("setClickPen").value<QPen>(); -- } -- if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { -- disablePen = widget->property("setDisablePen").value<QPen>(); -- } -- if (widget->property("setOnDefaultPen").isValid() && widget->property("setOnDefaultPen").canConvert<QPen>()) { -- onDefaultPen = widget->property("setOnDefaultPen").value<QPen>(); -- } -- if (widget->property("setOnHoverPen").isValid() && widget->property("setOnHoverPen").canConvert<QPen>()) { -- onHoverPen = widget->property("setOnHoverPen").value<QPen>(); -- } -- if (widget->property("setOnClickPen").isValid() && widget->property("setOnClickPen").canConvert<QPen>()) { -- onClickPen = widget->property("setOnClickPen").value<QPen>(); -- } -- if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { -- defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { -- hoverBrush = widget->property("setHoverBrush").value<QBrush>(); -- } -- if (widget->property("setClickBrush").isValid() && widget->property("setClickBrush").canConvert<QBrush>()) { -- clickBrush = widget->property("setClickBrush").value<QBrush>(); -- } -- if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { -- disableBrush = widget->property("setDisableBrush").value<QBrush>(); -- } -- if (widget->property("setOnDefaultBrush").isValid() && widget->property("setOnDefaultBrush").canConvert<QBrush>()) { -- onDefaultBrush = widget->property("setOnDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setOnHoverBrush").isValid() && widget->property("setOnHoverBrush").canConvert<QBrush>()) { -- onHoverBrush = widget->property("setOnHoverBrush").value<QBrush>(); -- } -- if (widget->property("setOnClickBrush").isValid() && widget->property("setOnClickBrush").canConvert<QBrush>()) { -- onClickBrush = widget->property("setOnClickBrush").value<QBrush>(); -- } -- if (widget->property("setPathBrush").isValid() && widget->property("setPathBrush").canConvert<QBrush>()) { -- pathBrush = widget->property("setPathBrush").value<QBrush>(); -- } -- if (widget->property("setPathDisableBrush").isValid() && widget->property("setPathDisableBrush").canConvert<QBrush>()) { -- pathDisableBrush = widget->property("setPathDisableBrush").value<QBrush>(); -- } -- if (widget->property("setOnHoverBrushIslinearGradient").isValid() && widget->property("setOnHoverBrushIslinearGradient").canConvert<bool>()) { -- onHoverBrushIslinearGradient = widget->property("setOnHoverBrushIslinearGradient").value<bool>(); -- } -- } -- -- checkBoxParameters.radius = radius; -- checkBoxParameters.checkBoxContentPen = contentPen; -- checkBoxParameters.checkBoxDefaultPen = defaultPen; -- checkBoxParameters.checkBoxHoverPen = hoverPen; -- checkBoxParameters.checkBoxClickPen = clickPen; -- checkBoxParameters.checkBoxDisablePen = disablePen; -- checkBoxParameters.checkBoxOnDefaultPen = onDefaultPen; -- checkBoxParameters.checkBoxOnHoverPen = onHoverPen; -- checkBoxParameters.checkBoxOnClickPen = onClickPen; -- -- checkBoxParameters.checkBoxDefaultBrush = defaultBrush; -- checkBoxParameters.checkBoxHoverBrush = hoverBrush; -- checkBoxParameters.checkBoxClickBrush = clickBrush; -- checkBoxParameters.checkBoxDisableBrush = disableBrush; -- checkBoxParameters.checkBoxOnDefaultBrush = onDefaultBrush; -- checkBoxParameters.checkBoxOnHoverBrush = onHoverBrush; -- checkBoxParameters.checkBoxOnClickBrush = onClickBrush; -- checkBoxParameters.checkBoxPathBrush = pathBrush; -- checkBoxParameters.checkBoxPathDisableBrush = pathDisableBrush; -- -- checkBoxParameters.onHoverBrushIslinearGradient = onHoverBrushIslinearGradient; --} -- --void KClassicalStyleParameters::initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- radioButtonParameters.radius = radiusProperty().normalRadius; -- radioButtonParameters.childrenRadius = (qstyleoption_cast<const QStyleOptionButton*>(option)->rect.adjusted(1, 1, -1, -1).width()) / 2; -- -- QPen defaultPen; -- QPen hoverPen; -- QPen clickPen; -- QPen disablePen; -- QPen onDefaultPen; -- QPen onHoverPen; -- QPen onClickPen; -- -- QBrush defaultBrush; -- QBrush hoverBrush; -- QBrush clickBrush; -- QBrush disableBrush; -- QBrush onDefaultBrush; -- QBrush onHoverBrush; -- QBrush onClickBrush; -- QBrush childrenOnDefaultBrush; -- QBrush childrenOnHoverBrush; -- QBrush childrenOnClickBrush; -- QBrush childrenOnDisableBrush; -- -- normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, -- clickPen, clickBrush, disablePen, disableBrush); -- -- //on default -- onDefaultPen = defaultPen; -- onDefaultBrush = defaultBrush; -- -- //on hover -- onHoverPen = hoverPen; -- onHoverBrush = hoverBrush; -- -- -- //on click -- onClickPen = clickPen; -- onClickBrush = clickBrush; -- -- if(isDark) -- childrenOnDefaultBrush = option->palette.brush(QPalette::Active, QPalette::BrightText); -- else -- childrenOnDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Text); -- -- childrenOnHoverBrush = childrenOnDefaultBrush; -- childrenOnClickBrush = childrenOnDefaultBrush; -- childrenOnDisableBrush = childrenOnDefaultBrush; -- if(isDark) -- childrenOnDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::ButtonText); -- else -- childrenOnDisableBrush = QBrush(adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), -15)); -- -- //if set property -- if (widget) { -- if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { -- defaultPen = widget->property("setDefaultPen").value<QPen>(); -- } -- if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { -- hoverPen = widget->property("setHoverPen").value<QPen>(); -- } -- if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { -- clickPen = widget->property("setClickPen").value<QPen>(); -- } -- if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { -- disablePen = widget->property("setDisablePen").value<QPen>(); -- } -- if (widget->property("setOnDefaultPen").isValid() && widget->property("setOnDefaultPen").canConvert<QPen>()) { -- onDefaultPen = widget->property("setOnDefaultPen").value<QPen>(); -- } -- if (widget->property("setOnHoverPen").isValid() && widget->property("setOnHoverPen").canConvert<QPen>()) { -- onHoverPen = widget->property("setOnHoverPen").value<QPen>(); -- } -- if (widget->property("setOnClickPen").isValid() && widget->property("setOnClickPen").canConvert<QPen>()) { -- onClickPen = widget->property("setOnClickPen").value<QPen>(); -- } -- if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { -- defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { -- hoverBrush = widget->property("setHoverBrush").value<QBrush>(); -- } -- if (widget->property("setClickBrush").isValid() && widget->property("setClickBrush").canConvert<QBrush>()) { -- clickBrush = widget->property("setClickBrush").value<QBrush>(); -- } -- if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { -- disableBrush = widget->property("setDisableBrush").value<QBrush>(); -- } -- if (widget->property("setOnDefaultBrush").isValid() && widget->property("setOnDefaultBrush").canConvert<QBrush>()) { -- onDefaultBrush = widget->property("setOnDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setOnHoverBrush").isValid() && widget->property("setOnHoverBrush").canConvert<QBrush>()) { -- onHoverBrush = widget->property("setOnHoverBrush").value<QBrush>(); -- } -- if (widget->property("setOnClickBrush").isValid() && widget->property("setOnClickBrush").canConvert<QBrush>()) { -- onClickBrush = widget->property("setOnClickBrush").value<QBrush>(); -- } -- } -- --// if(widget->property("animation").isValid()) --// radioButtonParameters.animation = widget->property("animation").toBool(); -- -- radioButtonParameters.radioButtonDefaultPen = defaultPen; -- radioButtonParameters.radioButtonHoverPen = hoverPen; -- radioButtonParameters.radioButtonClickPen = clickPen; -- radioButtonParameters.radioButtonDisablePen = disablePen; -- radioButtonParameters.radioButtonOnDefaultPen = onDefaultPen; -- radioButtonParameters.radioButtonOnHoverPen = onHoverPen; -- radioButtonParameters.radioButtonOnClickPen = onClickPen; -- -- radioButtonParameters.radioButtonDefaultBrush = defaultBrush; -- radioButtonParameters.radioButtonHoverBrush = hoverBrush; -- radioButtonParameters.radioButtonClickBrush = clickBrush; -- radioButtonParameters.radioButtonDisableBrush = disableBrush; -- radioButtonParameters.radioButtonOnDefaultBrush = onDefaultBrush; -- radioButtonParameters.radioButtonOnHoverBrush = onHoverBrush; -- radioButtonParameters.radioButtonOnClickBrush = onClickBrush; -- -- radioButtonParameters.radioButtonChildrenOnDefaultBrush = childrenOnDefaultBrush; -- radioButtonParameters.radioButtonChildrenOnHoverBrush = childrenOnHoverBrush; -- radioButtonParameters.radioButtonChildrenOnClickBrush = childrenOnClickBrush; -- radioButtonParameters.radioButtonChildrenOnDisableBrush = childrenOnDisableBrush; --} -- --void KClassicalStyleParameters::initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int grooveRadius = radiusProperty().normalRadius; -- -- QBrush handleDefaultBrush; -- QBrush handleHoverBrush; -- QBrush handleClickBrush; -- QBrush handleDisableBrush; -- -- QBrush grooveValueDefaultBrush; -- QBrush grooveValueHoverBrush; -- QBrush grooveValueDisableBrush; -- QBrush grooveUnvalueDefaultBrush; -- QBrush grooveUnvalueHoverBrush; -- QBrush grooveUnvalueDisableBrush; -- QPainterPath handlePath; -- QPen handleDefaultPen; -- QPen handleHoverPen; -- QPen handleClickPen; -- QPen handleDisablePen; -- QPen sliderGroovePen; -- QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option); -- const bool horizontal = slider->orientation == Qt::Horizontal; -- bool needTranslucent = false; -- -- //handle default -- -- if (isDark) { -- handleDefaultBrush = option->palette.color(QPalette::Active, QPalette::Button); -- handleDefaultPen = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15); -- } else { -- handleDefaultBrush = option->palette.color(QPalette::Active, QPalette::Button); -- handleDefaultPen = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3); -- } -- handleDefaultPen.setWidth(1); -- -- //handle hover -- handleHoverPen = handleDefaultPen; -- handleHoverPen.setWidth(1); -- handleHoverBrush = highlightHover(isDark, option->palette); -- -- -- //handle click -- handleClickPen = handleDefaultPen; -- handleHoverPen.setWidth(1); -- handleClickBrush = highlightClick(isDark, option->palette); -- -- //handle disable -- if(isDark) -- { -- handleDisablePen = adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), 18); -- } -- else -- handleDisablePen = adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), -12); -- handleDisablePen.setWidth(1); -- if(isDark) -- handleDisableBrush = option->palette.color(QPalette::Disabled, QPalette::ButtonText); -- else -- handleDisableBrush = option->palette.color(QPalette::Active, QPalette::Button); -- -- //groove value default -- if (isDark) { -- grooveValueDefaultBrush = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15); -- } else { -- grooveValueDefaultBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -- } -- -- //groove value hover -- grooveValueHoverBrush = grooveValueDefaultBrush; -- -- //groove value disable -- if(isDark) -- grooveValueDisableBrush = option->palette.color(QPalette::Disabled, QPalette::ButtonText); -- else -- grooveValueDisableBrush = option->palette.color(QPalette::Disabled, QPalette::Button); -- -- //groove unvalue default -- if(isDark) -- grooveUnvalueDefaultBrush = option->palette.color(QPalette::Disabled, QPalette::Button); -- else -- grooveUnvalueDefaultBrush = option->palette.color(QPalette::Active, QPalette::Button); -- -- //groove unvalue hover -- grooveUnvalueHoverBrush = grooveUnvalueDefaultBrush; -- -- //groove unvalue disable -- grooveUnvalueDisableBrush = grooveUnvalueDefaultBrush; -- -- -- if(isDark){ -- sliderGroovePen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else -- sliderGroovePen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- -- QRect handleRect = option->rect; -- -- if(horizontal){ -- handlePath.moveTo(handleRect.left(), handleRect.top()); -- handlePath.lineTo(handleRect.left(), handleRect.top() + (2 * (handleRect.height())/3)); -- handlePath.lineTo(handleRect.center().x(), handleRect.bottom()); -- handlePath.lineTo(handleRect.right(), handleRect.top() + (2 * (handleRect.height())/3)); -- handlePath.lineTo(handleRect.right(), handleRect.top()); -- handlePath.lineTo(handleRect.left(), handleRect.top()); -- -- }else { -- handlePath.moveTo(handleRect.right(),handleRect.top()); -- handlePath.lineTo(handleRect.right() - (2 * (handleRect.width())/3) , handleRect.top()); -- handlePath.lineTo(handleRect.left(), handleRect.center().y() ); -- handlePath.lineTo(handleRect.right() - (2 * (handleRect.width())/3), handleRect.bottom()); -- handlePath.lineTo(handleRect.right(), handleRect.bottom()); -- handlePath.lineTo(handleRect.right(),handleRect.top()); -- } -- -- qDebug() << "sloder animation 00000000000" << widget->property("animation").isValid(); --// if(widget->property("animation").isValid()){ --// sliderParameters.animation = widget->property("animation").toBool(); --// qDebug() << "slider animation11111" << widget->property("animation").toBool(); --// } -- -- if(widget){ -- if (widget->property("setGrooveRadius").isValid() && widget->property("setGrooveRadius").canConvert<int>()) { -- grooveRadius = widget->property("setGrooveRadius").value<int>(); -- } -- if (widget->property("setHandleDefaultBrush").isValid() && widget->property("setHandleDefaultBrush").canConvert<QBrush>()) { -- handleDefaultBrush = widget->property("setHandleDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setHandleHoverBrush").isValid() && widget->property("setHandleHoverBrush").canConvert<QBrush>()) { -- handleHoverBrush = widget->property("setHandleHoverBrush").value<QBrush>(); -- } -- if (widget->property("setHandleClickBrush").isValid() && widget->property("setHandleClickBrush").canConvert<QBrush>()) { -- handleClickBrush = widget->property("setHandleClickBrush").value<QBrush>(); -- } -- if (widget->property("setHandleDisableBrush").isValid() && widget->property("setHandleDisableBrush").canConvert<QBrush>()) { -- handleDisableBrush = widget->property("setHandleDisableBrush").value<QBrush>(); -- } -- if (widget->property("setGrooveValueDefaultBrush").isValid() && widget->property("setGrooveValueDefaultBrush").canConvert<QBrush>()) { -- grooveValueDefaultBrush = widget->property("setGrooveValueDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setGrooveValueHoverBrush").isValid() && widget->property("setGrooveValueHoverBrush").canConvert<QBrush>()) { -- grooveValueHoverBrush = widget->property("setGrooveValueHoverBrush").value<QBrush>(); -- } -- if (widget->property("setGrooveValueDisableBrush").isValid() && widget->property("setGrooveValueDisableBrush").canConvert<QBrush>()) { -- grooveValueDisableBrush = widget->property("setGrooveValueDisableBrush").value<QBrush>(); -- } -- if (widget->property("setGrooveUnvalueDefaultBrush").isValid() && widget->property("setGrooveUnvalueDefaultBrush").canConvert<QBrush>()) { -- grooveUnvalueDefaultBrush = widget->property("setGrooveUnvalueDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setGrooveUnvalueHoverBrush").isValid() && widget->property("setGrooveUnvalueHoverBrush").canConvert<QBrush>()) { -- grooveUnvalueHoverBrush = widget->property("setGrooveUnvalueHoverBrush").value<QBrush>(); -- } -- if (widget->property("setGrooveUnvalueDisableBrush").isValid() && widget->property("setGrooveUnvalueDisableBrush").canConvert<QBrush>()) { -- grooveUnvalueDisableBrush = widget->property("setGrooveUnvalueDisableBrush").value<QBrush>(); -- } -- } -- -- sliderParameters.sliderHandleDefaultBrush = handleDefaultBrush; -- sliderParameters.sliderHandleHoverBrush = handleHoverBrush; -- sliderParameters.sliderHandleClickBrush = handleClickBrush; -- sliderParameters.sliderHandleDisableBrush = handleDisableBrush; -- -- sliderParameters.sliderGrooveValueDefaultBrush = grooveValueDefaultBrush; -- sliderParameters.sliderGrooveValueHoverBrush = grooveValueHoverBrush; -- sliderParameters.sliderGrooveValueDisableBrush = grooveValueDisableBrush; -- -- sliderParameters.sliderGrooveUnvalueDefaultBrush = grooveUnvalueDefaultBrush; -- sliderParameters.sliderGrooveUnvalueHoverBrush = grooveUnvalueHoverBrush; -- sliderParameters.sliderGrooveUnvalueDisableBrush = grooveUnvalueDisableBrush; -- sliderParameters.sliderHandlePath = handlePath; -- -- sliderParameters.sliderHandleDefaultPen = handleDefaultPen; -- sliderParameters.sliderHandleHoverPen = handleHoverPen; -- sliderParameters.sliderHandleClickPen = handleClickPen; -- sliderParameters.sliderHandleDisablePen = handleDisablePen; -- sliderParameters.sliderGroovePen = sliderGroovePen; -- -- Slider_Thickness = 18; -- Slider_Length = 9; -- Slider_GrooveLength = 6; -- sliderParameters.sliderGrooveRadius = grooveRadius; --} -- -- --void KClassicalStyleParameters::initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int radius = radiusProperty().normalRadius; -- QPen contentPen; -- QPen grooveDefaultPen; -- QPen grooveDisablePen; -- -- QBrush contentBrush; -- QBrush grooveDefaultBrush; -- QBrush grooveDisableBrush; -- -- -- const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option); -- -- //content -- if(isDark) -- contentBrush = QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), -1, 15, -14)); -- else -- contentBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -- contentPen = Qt::NoPen; -- -- //groove default -- grooveDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- if(isDark){ -- grooveDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else -- grooveDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- //groove disable -- grooveDisablePen = grooveDefaultPen; -- grooveDisableBrush = pb->palette.brush(QPalette::Disabled, QPalette::Button); -- -- if(widget){ -- if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -- radius = widget->property("setRadius").value<int>(); -- } -- if (widget->property("setContentPen").isValid() && widget->property("setContentPen").canConvert<QPen>()) { -- contentPen = widget->property("setContentPen").value<QPen>(); -- } -- if (widget->property("setGrooveDefaultPen").isValid() && widget->property("setGrooveDefaultPen").canConvert<QPen>()) { -- grooveDefaultPen = widget->property("setGrooveDefaultPen").value<QPen>(); -- } -- if (widget->property("setGrooveDisablePen").isValid() && widget->property("setGrooveDisablePen").canConvert<QPen>()) { -- grooveDisablePen = widget->property("setGrooveDisablePen").value<QPen>(); -- } -- if (widget->property("setContentBrush").isValid() && widget->property("setContentBrush").canConvert<QBrush>()) { -- contentBrush = widget->property("setContentBrush").value<QBrush>(); -- } -- if (widget->property("setGrooveDefaultBrush").isValid() && widget->property("setGrooveDefaultBrush").canConvert<QBrush>()) { -- grooveDefaultBrush = widget->property("setGrooveDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setGrooveDisableBrush").isValid() && widget->property("setGrooveDisableBrush").canConvert<QBrush>()) { -- grooveDisableBrush = widget->property("setGrooveDisableBrush").value<QBrush>(); -- } -- } -- -- -- progressBarParameters.radius = radius; -- progressBarParameters.progressBarContentPen = contentPen; -- progressBarParameters.progressBarGrooveDefaultPen = grooveDefaultPen; -- progressBarParameters.progressBarGrooveDisablePen = grooveDisablePen; -- -- progressBarParameters.progressBarContentBrush = contentBrush; -- progressBarParameters.progressBarGrooveDefaultBrush = grooveDefaultBrush; -- progressBarParameters.progressBarGrooveDisableBrush = grooveDisableBrush; -- -- progressBarParameters.progressBarContentHightColor = contentBrush.color(); -- progressBarParameters.progressBarContentMidLightColor = contentBrush.color(); --} -- --void KClassicalStyleParameters::initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int sliderRadius; -- QBrush grooveDefaultBrush; -- QBrush grooveInactiveBrush; -- QBrush sliderDefaultBrush; -- QBrush sliderHoverBrush; -- QBrush sliderClickBrush; -- QBrush sliderDisableBrush; --// if(widget->property("animation").isValid()) --// scrollBarParameters.animation = widget->property("animation").toBool(); -- -- const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option); -- -- //radius -- if (bar->orientation == Qt::Horizontal) { -- sliderRadius = radiusProperty().normalRadius; -- } else { -- sliderRadius = radiusProperty().normalRadius; -- } -- -- //groove default -- if (isDark) { -- grooveDefaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- }else { -- grooveDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- } -- -- //groove inactive -- grooveInactiveBrush = option->palette.brush(QPalette::Inactive, QPalette::Base); -- -- //slider default -- if (isDark) { -- sliderDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- }else { -- sliderDefaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- } -- //slider hover -- if (isDark) { -- sliderHoverBrush = buttonDarkClick(isDark, option->palette); -- } else { -- sliderHoverBrush = option->palette.brush(QPalette::Active, QPalette::Midlight); -- } -- -- //slider click -- if (isDark) { -- sliderClickBrush = adjustL(option->palette.color(QPalette::Active, QPalette::Button), 13); -- sliderDisableBrush = option->palette.color(QPalette::Disabled, QPalette::Midlight); -- } else { -- sliderClickBrush = adjustL(option->palette.color(QPalette::Active, QPalette::Button), -45); -- sliderDisableBrush = option->palette.color(QPalette::Disabled, QPalette::Midlight); -- } -- -- -- scrollBarParameters.grooveWidthAnimation = false; -- scrollBarParameters.radius = sliderRadius; -- ScroolBar_LineLength = 16; -- ScroolBar_Height= 24; -- scrollBarParameters.scrollBarGrooveDefaultBrush = grooveDefaultBrush; -- scrollBarParameters.scrollBarGrooveInactiveBrush = grooveDefaultBrush; -- scrollBarParameters.scrollBarSliderDefaultBrush = sliderDefaultBrush; -- scrollBarParameters.scrollBarSliderHoverBrush = sliderHoverBrush; -- scrollBarParameters.scrollBarSliderClickBrush = sliderClickBrush; -- scrollBarParameters.scrollBarSliderDisableBrush = sliderDisableBrush; --} -- --void KClassicalStyleParameters::initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int radius = radiusProperty().normalRadius; -- QBrush backgroundBrush; -- -- if(isDark) { -- //background -- backgroundBrush = option->palette.color(QPalette::Active, QPalette::Window); -- } else { -- //background -- backgroundBrush = option->palette.color(QPalette::Active, QPalette::Base); -- } -- -- if(widget){ -- if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -- radius = widget->property("setRadius").value<int>(); -- } -- if (widget->property("setBackgroundBrush").isValid() && widget->property("setBackgroundBrush").canConvert<QBrush>()) { -- backgroundBrush = widget->property("setBackgroundBrush").value<QBrush>(); -- } -- } -- -- toolTipParameters.radius = radius; -- toolTipParameters.toolTipBackgroundBrush = backgroundBrush; -- --} -- --void KClassicalStyleParameters::initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int tabradius = radiusProperty().normalRadius; -- TabBar_BorderLine = true; -- QBrush widgetBackgroundBrush; -- QBrush tabBarBackgroundBrush; -- QBrush tabBarDefaultBrush; -- QBrush tabBarHoverBrush; -- QBrush tabBarClickBrush; -- QBrush tabBarSelectBrush; -- QPen tabBarPen; -- -- bool selected = option->state & QStyle::State_Selected; -- bool hover = option->state & QStyle::State_MouseOver; -- bool click = option->state & (QStyle::State_On | QStyle::State_Sunken); -- -- if (isDark) { -- //tab widget background -- widgetBackgroundBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- -- //tabbar background -- tabBarBackgroundBrush = Qt::NoBrush;//option->palette.brush(QPalette::Active, QPalette::Midlight); -- -- //tabbar default -- tabBarDefaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); -- -- //tabbar hover -- // QColor hover_color = option->palette.color(QPalette::Active, QPalette::Window); -- // QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- //tabBarHoverBrush = QBrush(mixColor(hover_color, mix, 0.1)); -- tabBarHoverBrush = highlightHover(isDark, option->palette); -- -- //tabbar select -- //tabBarSelectBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- tabBarSelectBrush= widgetBackgroundBrush; -- -- tabBarClickBrush = highlightClick(isDark, option->palette); -- --// tabBarPen = QPen(QBrush(adjustL(option->palette.color(QPalette::Active, QPalette::Midlight), 5)), --// 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- tabBarPen = QPen(QBrush(Qt::NoBrush), 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- if(click) -- tabBarPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else if(hover && !selected) -- tabBarPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- -- }else { -- //tab widget background -- widgetBackgroundBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- -- //tabbar background -- tabBarBackgroundBrush = Qt::NoBrush;//option->palette.brush(QPalette::Disabled, QPalette::Light); -- -- //tabbar default -- tabBarDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); -- -- //tabbar hover -- // QColor hover_color = option->palette.color(QPalette::Active, QPalette::Window); -- // QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- //tabBarHoverBrush = QBrush(mixColor(hover_color, mix, 0.1)); -- tabBarHoverBrush = highlightHover(isDark, option->palette); -- -- //tabbar select -- //tabBarSelectBrush = option->palette.brush(QPalette::Active, QPalette::Base); -- tabBarSelectBrush = widgetBackgroundBrush; -- -- tabBarClickBrush =highlightClick(isDark, option->palette); -- -- if(click){ -- tabBarPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 1, -21, 3)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else if(hover && !selected){ -- tabBarPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else{ -- tabBarPen = QPen(QBrush(Qt::NoBrush), 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- } -- } --// if (widget && widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { --// tabradius = widget->property("setRadius").value<int>(); --// } -- -- if(widget){ -- if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -- tabradius = widget->property("setRadius").value<int>(); -- } -- if (widget->property("setWidgetBackgroundBrush").isValid() && widget->property("setWidgetBackgroundBrush").canConvert<QBrush>()) { -- widgetBackgroundBrush = widget->property("setWidgetBackgroundBrush").value<QBrush>(); -- } -- if (widget->property("setTabBarBackgroundBrush").isValid() && widget->property("setTabBarBackgroundBrush").canConvert<QBrush>()) { -- tabBarBackgroundBrush = widget->property("setTabBarBackgroundBrush").value<QBrush>(); -- } -- if (widget->property("setTabBarDefaultBrush").isValid() && widget->property("setTabBarDefaultBrush").canConvert<QBrush>()) { -- tabBarDefaultBrush = widget->property("setTabBarDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setTabBarHoverBrush").isValid() && widget->property("setTabBarHoverBrush").canConvert<QBrush>()) { -- tabBarHoverBrush = widget->property("setTabBarHoverBrush").value<QBrush>(); -- } -- if (widget->property("setTabBarClickBrush").isValid() && widget->property("setTabBarClickBrush").canConvert<QBrush>()) { -- tabBarClickBrush = widget->property("setTabBarClickBrush").value<QBrush>(); -- } -- if (widget->property("setTabBarSelectBrush").isValid() && widget->property("setTabBarSelectBrush").canConvert<QBrush>()) { -- tabBarSelectBrush = widget->property("setTabBarSelectBrush").value<QBrush>(); -- } -- if (widget->property("setTabBarPen").isValid() && widget->property("setTabBarPen").canConvert<QPen>()) { -- tabBarPen = widget->property("setTabBarPen").value<QPen>(); -- } -- } -- -- tabWidgetParameters.radius = tabradius; -- tabWidgetParameters.tabWidgetBackgroundBrush = widgetBackgroundBrush; -- tabWidgetParameters.tabBarBackgroundBrush = tabBarBackgroundBrush; -- tabWidgetParameters.tabBarDefaultBrush = tabBarDefaultBrush; -- tabWidgetParameters.tabBarHoverBrush = tabBarHoverBrush; -- tabWidgetParameters.tabBarClickBrush = tabBarClickBrush; -- tabWidgetParameters.tabBarSelectBrush = tabBarSelectBrush; -- tabWidgetParameters.tabBarPen = tabBarPen; --} -- --void KClassicalStyleParameters::initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) --{ -- int frameradius = radiusProperty().normalRadius; -- int itemradius = radiusProperty().normalRadius; -- QPixmap framePixmap(option->rect.size()); -- QBrush itemSelectBrush; -- QPen menuHoverPen; -- if(isDark) -- menuHoverPen = option->palette.color(QPalette::Normal, QPalette::Light); -- else -- menuHoverPen = option->palette.color(QPalette::Active, QPalette::HighlightedText); -- -- //frame Pixmap -- framePixmap.fill(Qt::transparent); -- if (qobject_cast<const QFrame*>(widget)) { -- QPainter pixmapPainter(&framePixmap); -- pixmapPainter.setPen(Qt::NoPen); -- if(isDark) -- pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::NoRole)); -- else -- pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::Base)); -- -- pixmapPainter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter.drawRect(option->rect); -- } else { -- int rander = 2; -- -- // Draw a black floor -- QPainter pixmapPainter(&framePixmap); -- pixmapPainter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter.setPen(Qt::transparent); -- pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::BrightText)); -- pixmapPainter.drawRoundedRect(option->rect.adjusted(+rander, +rander+6, -rander, -rander-6), frameradius, frameradius); -- pixmapPainter.end(); -- -- // Blur the black background -- QImage img = framePixmap.toImage(); -- qt_blurImage(img, 4, false, false); -- -- // Dig out the center part, Shadow rendering -- framePixmap = QPixmap::fromImage(img); -- -- QPainter pixmapPainter2(&framePixmap); -- pixmapPainter2.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter2.setCompositionMode(QPainter::CompositionMode_Clear); -- pixmapPainter2.setPen(Qt::transparent); -- pixmapPainter2.setBrush(Qt::transparent); -- pixmapPainter2.drawRoundedRect(option->rect.adjusted(+rander, +rander+6, -rander, -rander-6), frameradius, frameradius); -- pixmapPainter2.end(); -- -- //That's when I started drawing the frame floor -- auto color = option->palette.color(QPalette::Base); -- color.setAlphaF(1); -- -- QPainterPath path; -- QRegion region; -- if (widget) { -- region = widget->mask(); -- } -- if (region.isEmpty()) { -- path.addRoundedRect(option->rect.adjusted(+rander, +rander+6, -rander, -rander-6), frameradius, frameradius); -- } else { -- path.addRegion(region); -- } -- -- //draw blur background -- QPainter pixmapPainter3(&framePixmap); -- pixmapPainter3.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -- pixmapPainter3.setPen(Qt::transparent); -- pixmapPainter3.setBrush(color); -- pixmapPainter3.drawPath(path); -- } -- -- -- if(isDark) -- itemSelectBrush = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 3, 23, -11); -- else{ -- itemSelectBrush = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -17, -6); -- } -- -- if(widget){ -- if (widget->property("setFrameRadius").isValid() && widget->property("setFrameRadius").canConvert<int>()) { -- frameradius = widget->property("setFrameRadius").value<int>(); -- } -- if (widget->property("setItemRadius").isValid() && widget->property("setItemRadius").canConvert<int>()) { -- itemradius = widget->property("setItemRadius").value<int>(); -- } -- if (widget->property("setFramePixmap").isValid() && widget->property("setFramePixmap").canConvert<QPixmap>()) { -- framePixmap = widget->property("setFramePixmap").value<QPixmap>(); -- } -- if (widget->property("setItemSelectBrush").isValid() && widget->property("setItemSelectBrush").canConvert<QBrush>()) { -- itemSelectBrush = widget->property("setItemSelectBrush").value<QBrush>(); -- } -- if (widget->property("setTextHoverPen").isValid() && widget->property("setTextHoverPen").canConvert<QPen>()) { -- menuHoverPen = widget->property("setTextHoverPen").value<QPen>(); -- } -- } -- -- menuParameters.frameRadius = frameradius; -- menuParameters.itemRadius = itemradius; -- menuParameters.menuFramePixmap = framePixmap; -- menuParameters.menuItemSelectBrush = itemSelectBrush; -- -- menuParameters.menuTextHoverPen = menuHoverPen; -- --} -diff --git a/ukui-styles/qt5-style-ukui/ukui-style-parameters.h b/ukui-styles/qt5-style-ukui/ukui-style-parameters.h -deleted file mode 100644 -index d652d56..0000000 ---- a/ukui-styles/qt5-style-ukui/ukui-style-parameters.h -+++ /dev/null -@@ -1,340 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <xibowen@kylinos.cn> -- * -- */ -- --#ifndef UKUISTYLEPARAMETERS_H --#define UKUISTYLEPARAMETERS_H -- --#include <QObject> --#include <QPalette> --#include <QStyleOption> -- --#include "pushbutton-parameters.h" --#include "toolbutton-parameters.h" --#include "lineedit-parameters.h" --#include "spinbox-parameters.h" --#include "combobox-parameters.h" --#include "list-parameters.h" --#include "tree-parameters.h" --#include "table-parameters.h" --#include "checkbox-parameters.h" --#include "radiobutton-parameters.h" --#include "slider-parameters.h" --#include "progressbar-parameters.h" --#include "scrollbar-parameters.h" --#include "tooltip-parameters.h" --#include "tabwidget-parameters.h" --#include "menu-parameters.h" --#include "../readconfig.h" -- --class UKUIStyleParameters: public QObject --{ -- Q_OBJECT --public: -- UKUIStyleParameters(QObject *parent, bool isDark); -- -- enum SpinBoxControlLayout { -- Horizontal, -- Vertical -- }; -- Q_ENUM(SpinBoxControlLayout) -- -- enum TabBarIndicatorLayout { -- TabBarIndicator_Horizontal, -- TabBarIndicator_Vertical -- }; -- Q_ENUM(TabBarIndicatorLayout) -- -- void updateParameters(bool isTabletMode); -- -- ~UKUIStyleParameters(){} -- // radius -- int radius = 6; -- -- // common -- int SmallIcon_Size = 16; -- int IconButton_Distance = 8; -- -- // button -- int Button_MarginHeight = 0; -- int ToolButton_MarginWidth = 8; -- int Button_MarginWidth = 8; -- int Button_IconSize = 16; -- int Button_IndicatorSize = 16; -- int Button_DefaultIndicatorSize = 0; -- int Button_DefaultWidth = 96; -- int Button_DefaultHeight = 36; -- int Button_DefaultHeight_origin = 36; -- int ToolButton_DefaultWidth = 60; -- int IconButton_DefaultWidth = 36; -- int IconButton_DefaultWidth_origin = 36; -- -- QColor DarkColoseButtonColor = QColor(242, 116, 133); -- -- QColor LightColoseButtonColor = QColor(242, 82, 117); -- QColor EndColoseButtonColor = QColor(221, 44, 68); -- -- QColor ColoseButtonColor = QColor(198, 42, 63); -- -- QColor Indicator_IconDefault; -- QColor Indicator_IconHover; -- QColor Indicator_IconSunken; -- QColor Indicator_IconDisable; -- -- // menu -- int Menu_MarginHeight = 4 + 8; -- int Menu_Combobox_Popup_MarginHeight = 4; -- int Menu_MarginWidth = 4 + 2; -- int Menu_Combobox_Popup_MarginWidth = 4 + 2; -- int Menu_MarginPanelWidth = 0; -- int MenuItem_Spacing = 8; -- int MenuItem_HMargin = 8; -- int MenuContent_HMargin = 8; -- -- // menu-item -- int MenuItem_MarginHeight = 2; -- int MenuItem_MarginWidth = 12 + 4; -- int MenuItemSeparator_MarginHeight = 4; -- int MenuItemSeparator_MarginHeight_origin = 4; -- int MenuItemSeparator_MarginWidth = 4; -- int MenuItem_DefaultHeight = 36; -- int MenuItem_DefaultHeight_origin = 36; -- int MenuItem_DefaultWidght = 152; -- -- // scrollbar -- int ScroolBar_Width = 16; -- int ScroolBar_Width_origin = 16; -- int ScroolBar_Height = 68; -- int ScroolBar_LineLength = 16; -- bool ScrooBar_ShowLine = false; -- -- // progressbar -- int ProgressBar_DefaultLength = 388; -- int ProgressBar_DefaultThick = 16; -- -- // slider -- int Slider_DefaultLength = 94; -- int Slider_DefaultLength_origin = 94; -- int Slider_DefaultWidth = 94; -- int Slider_Length = 20; -- int Slider_Length_origin = 20; -- int Slider_Thickness = 20; -- int Slider_Thickness_origin = 20; -- -- int Slider_GrooveLength = 4; -- int Slider_GrooveLength_origin = 4; -- int Slider_Margin = 2; -- -- // radiobutton -- int ExclusiveIndicator_Width = 16; -- int ExclusiveIndicator_Height = 16; -- int RadioButtonLabel_Spacing = 8; -- int RadioButton_DefaultHeight = 36; -- int RadioButton_DefaultHeight_origin = 36; -- -- // checkbox -- int Indicator_Width = 16; -- int Indicator_Height = 16; -- int CheckBox_DefaultHeight = 36; -- int CheckBox_DefaultHeight_origin = 36; -- int CheckBox_Radius = 4; -- -- // lineedit -- int LineEdit_DefaultWidth = 160; -- int LineEdit_DefaultWidth_origin = 160; -- int LineEdit_DefaultHeight = 36; -- int LineEdit_DefaultHeight_origin = 36; -- -- // combobox -- int ComboBox_DefaultWidth = 160; -- int ComboBox_DefaultHeight = 36; -- int ComboBox_DefaultHeight_origin = 36; -- int ComboBox_DefaultMenuItemHeight = 36; -- int ComboBox_DefaultMenuItemHeight_original = 36; -- int ComboBox_FrameWidth = 2; -- int ComboBox_VMargin = 1; -- -- // spinbox -- int SpinBox_DefaultWidth = 160; -- int SpinBox_DefaultHeight = 36; -- int SpinBox_DefaultHeight_origin = 36; -- int SpinBox_FrameWidth = 2; -- -- // tabbar -- int TabBar_DefaultMinWidth = 168; -- int TabBar_DefaultMaxWidth = 248; -- int TabBar_DefaultHeight = 40; -- int TabBar_DefaultHeight_origin = 40; -- int TabBar_DefaultHeight_aug = 0; -- int TabBar_ScrollButtonWidth = 16; -- int TabBar_ScrollButtonOverlap = 2; -- bool TabBar_SplitLine = true; -- bool TabBar_BorderLine = false; -- -- // tooltip -- int ToolTip_DefaultMargin = 10; -- int ToolTip_Height = 36; -- int ToolTip_Height_origin = 36; -- -- //viewitem FIX:Separate to list,tree and table after -- int ViewItem_DefaultHeight = 36; -- int ViewItem_DefaultHeight_origin = 36; -- -- //table -- int Table_HeaderHeight = 36; -- int Table_HeaderHeight_origin = 36; -- -- float m_scaleRatio4_3 = 1.0; -- float m_scaleRatio3_2 = 1.0; -- float m_scaleRatio2_1 = 1.0; -- -- int m_headerDefaultSectionSizeVertical = 36; -- int m_headerDefaultSectionSizeVertical1_1 = 36; -- int m_headerDefaultSectionSizeVertical4_3 = 48; -- bool m_isTableMode = false; -- bool m_isInitial = true; -- -- float m_scaleSliderDefaultLength = 1.0; -- float m_ScaleComboBoxDefaultLength = 1.0; -- float m_ScaleLineEditDefaultLength = 1.0; -- float m_scaleTabBarHeight6_5 = 1.0; -- -- bool indicatorIconHoverNeedHighLight = true; -- -- QPalette defaultPalette; -- -- PushButtonParameters pushButtonParameters; -- ToolButtonParameters toolButtonParameters; -- LineEditParameters lineEditParameters; -- SpinBoxParameters spinBoxParameters; -- ComboBoxParameters comboBoxParameters; -- ListParameters listParameters; -- TreeParameters treeParameters; -- TableParameters tableParameters; -- CheckBoxParameters checkBoxParameters; -- RadioButtonParameters radioButtonParameters; -- SliderParameters sliderParameters; -- ProgressBarParameters progressBarParameters; -- ScrollBarParameters scrollBarParameters; -- ToolTipParameters toolTipParameters; -- TabWidgetParameters tabWidgetParameters; -- MenuParameters menuParameters; -- -- QPalette setPalette(QPalette &palette); -- int getSpinBoxControlLayout(); -- int getTabBarIndicatorLayout(); -- void setTabBarIndicatorLayout(TabBarIndicatorLayout layout); -- -- virtual void initPalette(bool isDark) = 0; -- -- //pushbutton -- virtual void initPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initPushButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- -- //toolbutton -- virtual void initToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- virtual void initToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- -- virtual void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- -- virtual void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) = 0; -- -- virtual void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- -- virtual void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- -- virtual void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- -- virtual void initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- -- virtual void initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- -- virtual void initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- -- virtual void initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- -- virtual void initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- -- virtual void initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- -- virtual void initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- -- virtual void initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- -- virtual void initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; -- -- virtual QColor lanhuHSLToQtHsl(int h, int s, int l, int a = 255); -- virtual QColor adjustColor(const QColor c, int hRange = 0, int sRange = 0, int lRange = 0, int aRange = 0); -- virtual QColor adjustH(const QColor c, int range); -- virtual QColor adjustS(const QColor c, int range); -- virtual QColor adjustL(const QColor c, int range); -- virtual QColor adjustA(const QColor c, int range); -- virtual QColor highlightClick(bool isDark, QPalette p); -- virtual QColor highlightHover(bool isDark, QPalette p); -- virtual QColor buttonDarkClick(bool isDark, QPalette p); -- virtual void normalButtonColor(bool isDark, QPalette p, QPen &defaultPen, QBrush &defaultBrush, QPen &hoverPen, QBrush &hoverBrush, -- QPen &clickPen, QBrush &clickBrush, QPen &disablePen, QBrush &disableBrush); -- -- void initRadius(); -- UKUIRadiusInformation::UKUIRadiusStruct radiusProperty(); --private: -- int m_spinBoxControlLayout = SpinBoxControlLayout::Vertical; -- int m_tabBarIndicatorLayout = TabBarIndicatorLayout::TabBarIndicator_Horizontal; -- UKUIRadiusInformation::UKUIRadiusStruct m_radiusStruct; -- ReadThemeConfig *m_readCfg = nullptr; -- --}; -- -- --class KClassicalStyleParameters : public UKUIStyleParameters --{ -- Q_OBJECT --public: -- KClassicalStyleParameters(QObject *parent, bool isDark); -- ~KClassicalStyleParameters(){} -- -- void initPalette(bool isDark) override; -- -- //pushbutton -- void initPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initPushButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- -- //toolbutton -- void initToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- -- void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) override; -- void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -- void initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; --}; -- --#endif // UKUISTYLEPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/view-helper.cpp b/ukui-styles/qt5-style-ukui/view-helper.cpp -deleted file mode 100644 -index 5652aa9..0000000 ---- a/ukui-styles/qt5-style-ukui/view-helper.cpp -+++ /dev/null -@@ -1,384 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "qt5-ukui-style.h" --#include <QListView> --#include <QTreeView> -- -- --static QSizeF viewItemTextLayout(QTextLayout &textLayout, int lineWidth, int maxHeight = -1, int *lastVisibleLine = nullptr) --{ -- if (lastVisibleLine) -- *lastVisibleLine = -1; -- qreal height = 0; -- qreal widthUsed = 0; -- textLayout.beginLayout(); -- int i = 0; -- while (true) { -- QTextLine line = textLayout.createLine(); -- if (!line.isValid()) -- break; -- line.setLineWidth(lineWidth); -- line.setPosition(QPointF(0, height)); -- height += line.height(); -- widthUsed = qMax(widthUsed, line.naturalTextWidth()); -- // we assume that the height of the next line is the same as the current one -- if (maxHeight > 0 && lastVisibleLine && height + line.height() > maxHeight) { -- const QTextLine nextLine = textLayout.createLine(); -- *lastVisibleLine = nextLine.isValid() ? i : -1; -- break; -- } -- ++i; -- } -- textLayout.endLayout(); -- return QSizeF(widthUsed, height); --} -- --QString Qt5UKUIStyle::calculateElidedText(const QString &text, const QTextOption &textOption, -- const QFont &font, const QRect &textRect, const Qt::Alignment valign, -- Qt::TextElideMode textElideMode, int flags, -- bool lastVisibleLineShouldBeElided, QPointF *paintStartPosition) const --{ -- QTextLayout textLayout(text, font); -- textLayout.setTextOption(textOption); -- -- // In AlignVCenter mode when more than one line is displayed and the height only allows -- // some of the lines it makes no sense to display those. From a users perspective it makes -- // more sense to see the start of the text instead something inbetween. -- const bool vAlignmentOptimization = paintStartPosition && valign.testFlag(Qt::AlignVCenter); -- -- int lastVisibleLine = -1; -- viewItemTextLayout(textLayout, textRect.width(), vAlignmentOptimization ? textRect.height() : -1, &lastVisibleLine); -- -- const QRectF boundingRect = textLayout.boundingRect(); -- // don't care about LTR/RTL here, only need the height -- const QRect layoutRect = QStyle::alignedRect(Qt::LayoutDirectionAuto, valign, -- boundingRect.size().toSize(), textRect); -- -- if (paintStartPosition) -- *paintStartPosition = QPointF(textRect.x(), layoutRect.top()); -- -- QString ret; -- qreal height = 0; -- const int lineCount = textLayout.lineCount(); -- for (int i = 0; i < lineCount; ++i) { -- const QTextLine line = textLayout.lineAt(i); -- height += line.height(); -- -- // above visible rect -- if (height + layoutRect.top() <= textRect.top()) { -- if (paintStartPosition) -- paintStartPosition->ry() += line.height(); -- continue; -- } -- -- const int start = line.textStart(); -- const int length = line.textLength(); -- const bool drawElided = line.naturalTextWidth() > textRect.width(); -- bool elideLastVisibleLine = lastVisibleLine == i; -- if (!drawElided && i + 1 < lineCount && lastVisibleLineShouldBeElided) { -- const QTextLine nextLine = textLayout.lineAt(i + 1); -- const int nextHeight = height + nextLine.height() / 2; -- // elide when less than the next half line is visible -- if (nextHeight + layoutRect.top() > textRect.height() + textRect.top()) -- elideLastVisibleLine = true; -- } -- -- QString text = textLayout.text().mid(start, length); -- if (drawElided || elideLastVisibleLine) { -- if (elideLastVisibleLine) { -- if (text.endsWith(QChar::LineSeparator)) -- text.chop(1); -- text += QChar(0x2026); -- } -- const QStackTextEngine engine(text, font); -- ret += engine.elidedText(textElideMode, textRect.width(), flags); -- -- // no newline for the last line (last visible or real) -- // sometimes drawElided is true but no eliding is done so the text ends -- // with QChar::LineSeparator - don't add another one. This happened with -- // arabic text in the testcase for QTBUG-72805 -- if (i < lineCount - 1 && -- !ret.endsWith(QChar::LineSeparator)) -- ret += QChar::LineSeparator; -- } else { -- ret += text; -- } -- -- // below visible text, can stop -- if ((height + layoutRect.top() >= textRect.bottom()) || -- (lastVisibleLine >= 0 && lastVisibleLine == i)) -- break; -- } -- return ret; --} -- -- -- --void Qt5UKUIStyle::viewItemDrawText(QPainter *painter, const QStyleOptionViewItem *option, const QRect &rect) const --{ -- const QWidget *widget = option->widget; -- const int textMargin = proxy()->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, widget) + 1; -- -- QRect textRect = rect.adjusted(textMargin, 0, -textMargin, 0); // remove width padding -- const bool wrapText = option->features & QStyleOptionViewItem::WrapText; -- QTextOption textOption; -- textOption.setWrapMode(wrapText ? QTextOption::WordWrap : QTextOption::ManualWrap); -- //FIX ME,bug106749::QTablewidget text cannot be aligned, forced changed it wrap mode to wrapanywhere -- if(wrapText && (widget->inherits("QTableWidget") || widget->inherits("QTableView"))) -- { -- textOption.setWrapMode(QTextOption::WrapAnywhere); -- } -- textOption.setTextDirection(option->direction); -- textOption.setAlignment(QStyle::visualAlignment(option->direction, option->displayAlignment)); -- -- QPointF paintPosition; -- const QString newText = calculateElidedText(option->text, textOption, -- option->font, textRect, option->displayAlignment, -- option->textElideMode, 0, -- true, &paintPosition); -- -- QTextLayout textLayout(newText, option->font); -- textLayout.setTextOption(textOption); -- viewItemTextLayout(textLayout, textRect.width()); -- textLayout.draw(painter, paintPosition); --} -- -- -- --void Qt5UKUIStyle::viewItemLayout(const QStyleOptionViewItem *option, QRect *checkRect, QRect *pixmapRect, QRect *textRect, bool sizehint) const --{ -- Q_ASSERT(checkRect && pixmapRect && textRect); -- *pixmapRect = QRect(QPoint(0, 0), viewItemSize(option, Qt::DecorationRole)); -- *textRect = QRect(QPoint(0, 0), viewItemSize(option, Qt::DisplayRole)); -- *checkRect = QRect(QPoint(0, 0), viewItemSize(option, Qt::CheckStateRole)); -- -- int Margin_Width = 2; -- int Margin_Height = 0; -- -- const QWidget *widget = option->widget; -- const bool hasCheck = checkRect->isValid(); -- const bool hasPixmap = pixmapRect->isValid(); -- const bool hasText = textRect->isValid(); -- const bool hasMargin = (hasText | hasPixmap | hasCheck); -- const int frameHMargin = hasMargin ? -- proxy()->pixelMetric(QStyle::PM_FocusFrameHMargin, option, widget) + 1 : 0; -- const int textMargin = hasText ? frameHMargin : 0; -- const int pixmapMargin = hasPixmap ? frameHMargin : 0; -- const int checkMargin = hasCheck ? frameHMargin : 0; -- const int x = option->rect.left() + Margin_Width; -- const int y = option->rect.top() + Margin_Height; -- int w, h; -- -- if (textRect->height() == 0 && (!hasPixmap || !sizehint)) { -- //if there is no text, we still want to have a decent height for the item sizeHint and the editor size -- textRect->setHeight(option->fontMetrics.height()); -- } -- -- QSize pm(0, 0); -- if (hasPixmap) { -- pm = pixmapRect->size(); -- pm.rwidth() += 2 * pixmapMargin; -- } -- if (sizehint) { -- h = qMax(checkRect->height(), qMax(textRect->height(), pm.height())); -- if (option->decorationPosition == QStyleOptionViewItem::Left || option->decorationPosition == QStyleOptionViewItem::Right) { -- w = textRect->width() + pm.width(); -- } else { -- w = qMax(textRect->width(), pm.width()); -- } -- } else { -- w = option->rect.width() - Margin_Width * 2; -- h = option->rect.height() - Margin_Height * 2; -- } -- -- int cw = 0; -- QRect check; -- if (hasCheck) { -- cw = checkRect->width() + 2 * checkMargin; -- if (sizehint) w += cw; -- if (option->direction == Qt::RightToLeft) { -- check.setRect(x + w - cw, y, cw, h); -- } else { -- check.setRect(x, y, cw, h); -- } -- } -- -- QRect display; -- QRect decoration; -- switch (option->decorationPosition) { -- case QStyleOptionViewItem::Top: -- { -- h = sizehint ? textRect->height() : h - pm.height() - pixmapMargin; -- -- if (option->direction == Qt::RightToLeft) { -- decoration.setRect(x, y, w - cw, pm.height()); -- display.setRect(x, y + pm.height() + pixmapMargin, w - cw, h); -- } else { -- decoration.setRect(x + cw, y, w - cw, pm.height()); -- display.setRect(x + cw, y + pm.height() + pixmapMargin, w - cw, h); -- } -- break; -- } -- case QStyleOptionViewItem::Bottom: -- { -- h = sizehint ? textRect->height() + textMargin + pm.height() : h; -- -- if (option->direction == Qt::RightToLeft) { -- display.setRect(x, y, w - cw, textRect->height()); -- decoration.setRect(x, y + textRect->height() + textMargin, w - cw, h - textRect->height() - textMargin); -- } else { -- display.setRect(x + cw, y, w - cw, textRect->height()); -- decoration.setRect(x + cw, y + textRect->height() + textMargin, w - cw, h - textRect->height() - textMargin); -- } -- break; -- } -- case QStyleOptionViewItem::Left: -- { -- if (option->direction == Qt::LeftToRight) { -- decoration.setRect(x + cw, y, pm.width(), h); -- display.setRect(decoration.right() + 1, y, w - pm.width() - cw, h); -- } else { -- display.setRect(x, y, w - pm.width() - cw, h); -- decoration.setRect(display.right() + 1, y, pm.width(), h); -- } -- break; -- } -- case QStyleOptionViewItem::Right: -- { -- if (option->direction == Qt::LeftToRight) { -- display.setRect(x + cw, y, w - pm.width() - cw, h); -- decoration.setRect(display.right() + 1, y, pm.width(), h); -- } else { -- decoration.setRect(x, y, pm.width(), h); -- display.setRect(decoration.right() + 1, y, w - pm.width() - cw, h); -- } -- break; -- } -- -- default: -- { -- qWarning("doLayout: decoration position is invalid"); -- decoration = *pixmapRect; -- break; -- } -- } -- -- if (!sizehint) { // we only need to do the internal layout if we are going to paint -- *checkRect = QStyle::alignedRect(option->direction, Qt::AlignCenter, -- checkRect->size(), check); -- *pixmapRect = QStyle::alignedRect(option->direction, option->decorationAlignment, -- pixmapRect->size(), decoration); -- // the text takes up all available space, unless the decoration is not shown as selected -- if (option->showDecorationSelected) -- *textRect = display; -- else -- *textRect = QStyle::alignedRect(option->direction, option->displayAlignment, -- textRect->size().boundedTo(display.size()), display); -- } else { -- *checkRect = check; -- *pixmapRect = decoration; -- *textRect = display; -- } --} -- -- -- --QSize Qt5UKUIStyle::viewItemSize(const QStyleOptionViewItem *option, int role) const --{ -- const QWidget *widget = option->widget; -- switch (role) { -- case Qt::CheckStateRole: -- { -- if (option->features & QStyleOptionViewItem::HasCheckIndicator) -- return QSize(proxy()->pixelMetric(QStyle::PM_IndicatorWidth, option, widget), -- proxy()->pixelMetric(QStyle::PM_IndicatorHeight, option, widget)); -- break; -- } -- -- case Qt::DisplayRole: -- { -- if (option->features & QStyleOptionViewItem::HasDisplay) { -- QTextOption textOption; -- textOption.setWrapMode(QTextOption::WordWrap); -- QTextLayout textLayout(option->text, option->font); -- textLayout.setTextOption(textOption); -- const bool wrapText = option->features & QStyleOptionViewItem::WrapText; -- const int textMargin = proxy()->pixelMetric(QStyle::PM_FocusFrameHMargin, option, widget) + 1; -- QRect bounds = option->rect; -- switch (option->decorationPosition) { -- case QStyleOptionViewItem::Left: -- case QStyleOptionViewItem::Right: { -- if (wrapText && bounds.isValid()) { -- int width = bounds.width() - 2 * textMargin; -- if (option->features & QStyleOptionViewItem::HasDecoration) -- width -= option->decorationSize.width() + 2 * textMargin; -- bounds.setWidth(width); -- } else -- bounds.setWidth(QFIXED_MAX); -- break; -- } -- case QStyleOptionViewItem::Top: -- case QStyleOptionViewItem::Bottom: -- if (wrapText) -- bounds.setWidth(bounds.isValid() ? bounds.width() - 2 * textMargin : option->decorationSize.width()); -- else -- bounds.setWidth(QFIXED_MAX); -- break; -- default: -- break; -- } -- -- if (wrapText && option->features & QStyleOptionViewItem::HasCheckIndicator) -- bounds.setWidth(bounds.width() - proxy()->pixelMetric(QStyle::PM_IndicatorWidth) - 2 * textMargin); -- -- const int lineWidth = bounds.width(); -- const QSizeF size = viewItemTextLayout(textLayout, lineWidth); -- return QSize(qCeil(size.width()) + 2 * textMargin, qCeil(size.height())); -- } -- break; -- } -- -- case Qt::DecorationRole: -- { -- if (option->features & QStyleOptionViewItem::HasDecoration) { -- if(widget){ -- if(qobject_cast<const QListView *>(widget)){ -- QSize size = qobject_cast<const QListView *>(widget)->iconSize(); -- return QSize(qMax(option->decorationSize.width(), size.width()), -- qMax(option->decorationSize.height(), size.height())); -- } -- if(qobject_cast<const QTreeView *>(widget)){ -- QSize size = qobject_cast<const QTreeView *>(widget)->iconSize(); -- return QSize(qMax(option->decorationSize.width(), size.width()), -- qMax(option->decorationSize.height(), size.height())); -- } -- } -- return option->decorationSize; -- } -- break; -- } -- default: -- break; -- } -- return QSize(0, 0); --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.cpp -deleted file mode 100644 -index d77b234..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.cpp -+++ /dev/null -@@ -1,54 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#include "checkbox-parameters.h" -- --CheckBoxParameters::CheckBoxParameters() --{ -- radius = 0; -- -- checkBoxDefaultBrush = QBrush(Qt::NoBrush); -- checkBoxHoverBrush = QBrush(Qt::NoBrush); -- checkBoxClickBrush = QBrush(Qt::NoBrush); -- checkBoxDisableBrush = QBrush(Qt::NoBrush); -- checkBoxOnDefaultBrush = QBrush(Qt::NoBrush); -- checkBoxOnHoverBrush = QBrush(Qt::NoBrush); -- checkBoxOnClickBrush = QBrush(Qt::NoBrush); -- checkBoxPathBrush = QBrush(Qt::NoBrush); -- checkBoxPathDisableBrush = QBrush(Qt::NoBrush); -- -- checkBoxDefaultPen = QPen(Qt::NoPen); -- checkBoxHoverPen = QPen(Qt::NoPen); -- checkBoxClickPen = QPen(Qt::NoPen); -- checkBoxDisablePen = QPen(Qt::NoPen); -- checkBoxOnDefaultPen = QPen(Qt::NoPen); -- checkBoxOnHoverPen = QPen(Qt::NoPen); -- checkBoxOnClickPen = QPen(Qt::NoPen); -- checkBoxDefaultPen.setWidth(0); -- checkBoxHoverPen.setWidth(0); -- checkBoxClickPen.setWidth(0); -- checkBoxDisablePen.setWidth(0); -- checkBoxOnDefaultPen.setWidth(0); -- checkBoxOnHoverPen.setWidth(0); -- checkBoxOnClickPen.setWidth(0); --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h -deleted file mode 100644 -index 5645ce3..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h -+++ /dev/null -@@ -1,59 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#ifndef CHECKBOXPARAMETERS_H --#define CHECKBOXPARAMETERS_H -- --#include <QBrush> --#include <QPen> -- --class CheckBoxParameters --{ --public: -- CheckBoxParameters(); -- ~CheckBoxParameters(){} --//private: -- int radius; -- -- QBrush checkBoxDefaultBrush; -- QBrush checkBoxHoverBrush; -- QBrush checkBoxClickBrush; -- QBrush checkBoxDisableBrush; -- QBrush checkBoxOnDefaultBrush; -- QBrush checkBoxOnHoverBrush; -- QBrush checkBoxOnClickBrush; -- QBrush checkBoxPathBrush; -- QBrush checkBoxPathDisableBrush; -- -- QPen checkBoxDefaultPen; -- QPen checkBoxHoverPen; -- QPen checkBoxClickPen; -- QPen checkBoxDisablePen; -- QPen checkBoxOnDefaultPen; -- QPen checkBoxOnHoverPen; -- QPen checkBoxOnClickPen; -- QPen checkBoxContentPen; -- bool onHoverBrushIslinearGradient = false; --}; -- --#endif // CHECKBOXPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.cpp -deleted file mode 100644 -index 0573c53..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.cpp -+++ /dev/null -@@ -1,44 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <xibowen@kylinos.cn> -- * -- */ -- --#include "combobox-parameters.h" -- --ComboBoxParameters::ComboBoxParameters() --{ -- radius = 0; -- comboBoxDefaultBrush = QBrush(Qt::NoBrush); -- comboBoxHoverBrush = QBrush(Qt::NoBrush); -- comboBoxOnBrush = QBrush(Qt::NoBrush); -- comboBoxEditBrush = QBrush(Qt::NoBrush); -- comboBoxDisableBrush = QBrush(Qt::NoBrush); -- -- comboBoxDefaultPen = QPen(Qt::NoPen); -- comboBoxHoverPen = QPen(Qt::NoPen); -- comboBoxOnPen = QPen(Qt::NoPen); -- comboBoxEditPen = QPen(Qt::NoPen); -- comboBoxDisablePen = QPen(Qt::NoPen); -- comboBoxDefaultPen.setWidth(0); -- comboBoxHoverPen.setWidth(0); -- comboBoxOnPen.setWidth(0); -- comboBoxEditPen.setWidth(0); -- comboBoxDisablePen.setWidth(0); --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.h -deleted file mode 100644 -index 23a8ea7..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.h -+++ /dev/null -@@ -1,51 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- --#ifndef COMBOBOXPARAMETERS_H --#define COMBOBOXPARAMETERS_H -- --#include <QBrush> --#include <QPen> -- --class ComboBoxParameters --{ --public: -- ComboBoxParameters(); -- ~ComboBoxParameters(){} -- -- --//private: -- int radius; -- QBrush comboBoxDefaultBrush; -- QBrush comboBoxHoverBrush; -- QBrush comboBoxOnBrush; -- QBrush comboBoxEditBrush; -- QBrush comboBoxDisableBrush; -- -- QPen comboBoxDefaultPen; -- QPen comboBoxHoverPen; -- QPen comboBoxOnPen; -- QPen comboBoxEditPen; -- QPen comboBoxDisablePen; --}; -- --#endif // COMBOBOXPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.cpp -deleted file mode 100644 -index a5fe2a0..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.cpp -+++ /dev/null -@@ -1,42 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- --#include "lineedit-parameters.h" -- --LineEditParameters::LineEditParameters() --{ -- radius = 0; -- -- lineEditDefaultBrush = QBrush(Qt::NoBrush); -- lineEditHoverBrush = QBrush(Qt::NoBrush); -- lineEditFocusBrush = QBrush(Qt::NoBrush); -- lineEditDisableBrush = QBrush(Qt::NoBrush); -- -- lineEditDefaultPen = QPen(Qt::NoPen); -- lineEditHoverPen = QPen(Qt::NoPen); -- lineEditFocusPen = QPen(Qt::NoPen); -- lineEditDisablePen = QPen(Qt::NoPen); -- lineEditDefaultPen.setWidth(0); -- lineEditHoverPen.setWidth(0); -- lineEditFocusPen.setWidth(0); -- lineEditDisablePen.setWidth(0); --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.h -deleted file mode 100644 -index 6b4ba0a..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.h -+++ /dev/null -@@ -1,51 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#ifndef LINEEDITPARAMETERS_H --#define LINEEDITPARAMETERS_H -- -- --#include <QBrush> --#include <QPen> -- --class LineEditParameters --{ --public: -- LineEditParameters(); -- ~LineEditParameters(){} -- --//private: -- int radius; -- -- QBrush lineEditDefaultBrush; -- QBrush lineEditHoverBrush; -- QBrush lineEditFocusBrush; -- QBrush lineEditDisableBrush; -- -- QPen lineEditDefaultPen; -- QPen lineEditHoverPen; -- QPen lineEditFocusPen; -- QPen lineEditDisablePen; --}; -- --#endif // LINEEDITPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.cpp -deleted file mode 100644 -index 03e5a1e..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.cpp -+++ /dev/null -@@ -1,36 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- --#include "list-parameters.h" -- --ListParameters::ListParameters() --{ -- listDefaultBrush = QBrush(Qt::NoBrush); -- listHoverBrush = QBrush(Qt::NoBrush); -- listSelectBrush = QBrush(Qt::NoBrush); -- listDisableBrush = QBrush(Qt::NoBrush); -- listTextHoverPen = QPen(Qt::NoPen); -- listTextSelectPen = QPen(Qt::NoPen); -- listHoverPen = QPen(Qt::NoPen); -- listSelectPen = QPen(Qt::NoPen); -- --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.h -deleted file mode 100644 -index aa07c3a..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.h -+++ /dev/null -@@ -1,50 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#ifndef LISTPARAMETERS_H --#define LISTPARAMETERS_H -- --#include <QBrush> --#include <QPen> -- --class ListParameters --{ --public: -- ListParameters(); -- ~ListParameters(){} -- --//private: -- int radius; -- -- QBrush listDefaultBrush; -- QBrush listHoverBrush; -- QBrush listSelectBrush; -- QBrush listDisableBrush; -- QPen listTextHoverPen; -- QPen listTextSelectPen; -- QPen listHoverPen; -- QPen listSelectPen; -- --}; -- --#endif // LISTPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.cpp -deleted file mode 100644 -index 37ad797..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.cpp -+++ /dev/null -@@ -1,32 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#include "menu-parameters.h" -- --MenuParameters::MenuParameters() --{ -- menuItemSelectBrush = QBrush(Qt::NoBrush); -- -- menuTextHoverPen = QPen(Qt::NoPen); -- --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.h -deleted file mode 100644 -index d9230af..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.h -+++ /dev/null -@@ -1,47 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#ifndef MENUPARAMETERS_H --#define MENUPARAMETERS_H -- --#include <QPixmap> --#include <QBrush> --#include <QPen> -- --class MenuParameters --{ --public: -- MenuParameters(); -- ~MenuParameters(){} -- -- int frameRadius; -- int itemRadius; -- -- QBrush menuItemSelectBrush; -- -- QPixmap menuFramePixmap; -- -- QPen menuTextHoverPen; --}; -- --#endif // MENUPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.cpp -deleted file mode 100644 -index 7904a57..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.cpp -+++ /dev/null -@@ -1,40 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#include "progressbar-parameters.h" -- --ProgressBarParameters::ProgressBarParameters() --{ -- radius = 0; -- -- progressBarContentBrush = QBrush(Qt::NoBrush); -- progressBarGrooveDefaultBrush = QBrush(Qt::NoBrush); -- progressBarGrooveDisableBrush = QBrush(Qt::NoBrush); -- -- progressBarContentPen = QPen(Qt::NoPen); -- progressBarGrooveDefaultPen = QPen(Qt::NoPen); -- progressBarGrooveDisablePen = QPen(Qt::NoPen); -- progressBarContentPen.setWidth(0); -- progressBarGrooveDefaultPen.setWidth(0); -- progressBarGrooveDisablePen.setWidth(0); --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.h -deleted file mode 100644 -index a8e0849..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.h -+++ /dev/null -@@ -1,50 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#ifndef PROGRESSBARPARAMETERS_H --#define PROGRESSBARPARAMETERS_H -- --#include <QBrush> --#include <QPen> -- --class ProgressBarParameters --{ --public: -- ProgressBarParameters(); -- ~ProgressBarParameters(){} -- --//private: -- int radius; -- -- QBrush progressBarContentBrush; -- QBrush progressBarGrooveDefaultBrush; -- QBrush progressBarGrooveDisableBrush; -- QColor progressBarContentMidLightColor; -- QColor progressBarContentHightColor; -- -- QPen progressBarContentPen; -- QPen progressBarGrooveDefaultPen; -- QPen progressBarGrooveDisablePen; --}; -- --#endif // PROGRESSBARPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.cpp -deleted file mode 100644 -index 75c7ac1..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.cpp -+++ /dev/null -@@ -1,59 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <xibowen@kylinos.cn> -- * -- */ -- --#include "pushbutton-parameters.h" -- --PushButtonParameters::PushButtonParameters() --{ -- radius = 0; -- -- iconHoverClickHighlight = false; -- textHoverClickHighlight = false; -- -- pushButtonDefaultBrush = QBrush(Qt::NoBrush); -- pushButtonHoverBrush = QBrush(Qt::NoBrush); -- pushButtonClickBrush = QBrush(Qt::NoBrush); -- pushButtonDisableBrush = QBrush(Qt::NoBrush); -- pushButtonCheckBrush = QBrush(Qt::NoBrush); -- pushButtonCheckHoverBrush = QBrush(Qt::NoBrush); -- pushButtonCheckClickBrush = QBrush(Qt::NoBrush); -- pushButtonCheckDisableBrush = QBrush(Qt::NoBrush); -- -- pushButtonDefaultPen = QPen(Qt::NoPen); -- pushButtonHoverPen = QPen(Qt::NoPen); -- pushButtonClickPen = QPen(Qt::NoPen); -- pushButtonDisablePen = QPen(Qt::NoPen); -- pushButtonCheckPen = QPen(Qt::NoPen); -- pushButtonCheckHoverPen = QPen(Qt::NoPen); -- pushButtonCheckClickPen = QPen(Qt::NoPen); -- pushButtonCheckDisablePen = QPen(Qt::NoPen); -- pushButtonFocusPen = QPen(Qt::NoPen); -- pushButtonDefaultPen.setWidth(0); -- pushButtonHoverPen.setWidth(0); -- pushButtonClickPen.setWidth(0); -- pushButtonDisablePen.setWidth(0); -- pushButtonCheckPen.setWidth(0); -- pushButtonCheckHoverPen.setWidth(0); -- pushButtonCheckClickPen.setWidth(0); -- pushButtonCheckDisablePen.setWidth(0); -- pushButtonFocusPen.setWidth(0); --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.h -deleted file mode 100644 -index 8439c50..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.h -+++ /dev/null -@@ -1,72 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- -- --#ifndef PUSHBUTTONPARAMETERS_H --#define PUSHBUTTONPARAMETERS_H -- --#include <QBrush> --#include <QPen> -- --class PushButtonParameters --{ --public: -- PushButtonParameters(); -- ~PushButtonParameters(){} -- --//private: -- int radius; -- -- bool iconHoverClickHighlight; -- bool textHoverClickHighlight; -- -- QBrush pushButtonDefaultBrush; -- QBrush pushButtonHoverBrush; -- QBrush pushButtonClickBrush; -- QBrush pushButtonDisableBrush; -- QBrush pushButtonCheckBrush; -- QBrush pushButtonCheckHoverBrush; -- QBrush pushButtonCheckClickBrush; -- QBrush pushButtonCheckDisableBrush; -- -- QPen pushButtonDefaultPen; -- QPen pushButtonHoverPen; -- QPen pushButtonClickPen; -- QPen pushButtonDisablePen; -- QPen pushButtonCheckPen; -- QPen pushButtonCheckHoverPen; -- QPen pushButtonCheckClickPen; -- QPen pushButtonCheckDisablePen; -- QPen pushButtonFocusPen; -- -- --// QColor PushButtonInactiveColor; -- --// QColor PushButtonTextDefaultColor; --// QColor PushButtonTextHoverColor; --// QColor PushButtonTextClickColor; --// QColor PushButtonTextInactiveColor; --// QColor PushButtonTextDisableColor; --}; -- --#endif // PUSHBUTTONPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.cpp -deleted file mode 100644 -index fe0ff09..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.cpp -+++ /dev/null -@@ -1,28 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- --#include "radiobutton-parameters.h" -- --RadioButtonParameters::RadioButtonParameters() --{ -- --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h -deleted file mode 100644 -index ad64acb..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h -+++ /dev/null -@@ -1,60 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- --#ifndef RADIOBUTTONPARAMETERS_H --#define RADIOBUTTONPARAMETERS_H -- --#include <QBrush> --#include <QPen> -- --class RadioButtonParameters --{ --public: -- RadioButtonParameters(); -- ~RadioButtonParameters(){} -- --//private: -- int radius; -- int childrenRadius; -- -- QBrush radioButtonDefaultBrush; -- QBrush radioButtonHoverBrush; -- QBrush radioButtonClickBrush; -- QBrush radioButtonDisableBrush; -- QBrush radioButtonOnDefaultBrush; -- QBrush radioButtonOnHoverBrush; -- QBrush radioButtonOnClickBrush; -- QBrush radioButtonChildrenOnDefaultBrush; -- QBrush radioButtonChildrenOnHoverBrush; -- QBrush radioButtonChildrenOnClickBrush; -- QBrush radioButtonChildrenOnDisableBrush; -- -- QPen radioButtonDefaultPen; -- QPen radioButtonHoverPen; -- QPen radioButtonClickPen; -- QPen radioButtonDisablePen; -- QPen radioButtonOnDefaultPen; -- QPen radioButtonOnHoverPen; -- QPen radioButtonOnClickPen; --}; -- --#endif // RADIOBUTTONPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp -deleted file mode 100644 -index 67984a3..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp -+++ /dev/null -@@ -1,28 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#include "scrollbar-parameters.h" -- --ScrollBarParameters::ScrollBarParameters() --{ --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h -deleted file mode 100644 -index 9bb7616..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h -+++ /dev/null -@@ -1,47 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#ifndef SCROLLBARPARAMETERS_H --#define SCROLLBARPARAMETERS_H -- --#include <QBrush> -- --class ScrollBarParameters --{ --public: -- ScrollBarParameters(); -- ~ScrollBarParameters(){} -- --//private: -- int radius; -- bool grooveWidthAnimation = true; -- QBrush scrollBarGrooveDefaultBrush; -- QBrush scrollBarGrooveInactiveBrush; -- -- QBrush scrollBarSliderDefaultBrush; -- QBrush scrollBarSliderHoverBrush; -- QBrush scrollBarSliderClickBrush; -- QBrush scrollBarSliderDisableBrush; --}; -- --#endif // SCROLLBARPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp -deleted file mode 100644 -index 0e269a7..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp -+++ /dev/null -@@ -1,47 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#include "slider-parameters.h" -- -- --SliderParameters::SliderParameters() --{ -- -- sliderHandleDefaultPen = QPen(Qt::NoPen); -- sliderHandleHoverPen = QPen(Qt::NoPen);; -- sliderHandleClickPen = QPen(Qt::NoPen);; -- sliderHandleDisablePen = QPen(Qt::NoPen);; -- -- sliderHandleDefaultBrush = QBrush(Qt::NoBrush); -- sliderHandleHoverBrush = QBrush(Qt::NoBrush); -- sliderHandleClickBrush = QBrush(Qt::NoBrush); -- sliderHandleDisableBrush = QBrush(Qt::NoBrush); -- -- sliderGrooveValueDefaultBrush = QBrush(Qt::NoBrush); -- sliderGrooveValueHoverBrush = QBrush(Qt::NoBrush); -- sliderGrooveValueDisableBrush = QBrush(Qt::NoBrush); -- -- sliderGrooveUnvalueDefaultBrush = QBrush(Qt::NoBrush); -- sliderGrooveUnvalueHoverBrush = QBrush(Qt::NoBrush); -- sliderGrooveUnvalueDisableBrush = QBrush(Qt::NoBrush); --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h -deleted file mode 100644 -index f658b0c..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h -+++ /dev/null -@@ -1,62 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#ifndef SLIDERPARAMETERS_H --#define SLIDERPARAMETERS_H -- --#include <QBrush> --#include <QPainterPath> --#include <QPen> -- --class SliderParameters --{ --public: -- SliderParameters(); -- ~SliderParameters(){} -- --//private: --// int radius; -- QBrush sliderHandleDefaultBrush; -- QBrush sliderHandleHoverBrush; -- QBrush sliderHandleClickBrush; -- QBrush sliderHandleDisableBrush; -- -- QBrush sliderGrooveValueDefaultBrush; -- QBrush sliderGrooveValueHoverBrush; -- QBrush sliderGrooveValueDisableBrush; -- -- QBrush sliderGrooveUnvalueDefaultBrush; -- QBrush sliderGrooveUnvalueHoverBrush; -- QBrush sliderGrooveUnvalueDisableBrush; -- -- QPen sliderHandleDefaultPen = Qt::NoPen; -- QPen sliderHandleHoverPen = Qt::NoPen; -- QPen sliderHandleClickPen = Qt::NoPen; -- QPen sliderHandleDisablePen = Qt::NoPen; -- QPen sliderGroovePen = Qt::NoPen; -- QPainterPath sliderHandlePath; -- -- int sliderGrooveRadius = 2; --}; -- --#endif // SLIDERPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.cpp -deleted file mode 100644 -index 41be5b6..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.cpp -+++ /dev/null -@@ -1,76 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#include "spinbox-parameters.h" -- --SpinBoxParameters::SpinBoxParameters() --{ -- radius = 0; -- -- spinBoxDefaultBrush = QBrush(Qt::NoBrush); -- spinBoxHoverBrush = QBrush(Qt::NoBrush); -- spinBoxFocusBrush = QBrush(Qt::NoBrush); -- spinBoxDisableBrush = QBrush(Qt::NoBrush); -- spinBoxDefaultPen = QPen(Qt::NoPen); -- spinBoxHoverPen = QPen(Qt::NoPen); -- spinBoxFocusPen = QPen(Qt::NoPen); -- spinBoxDisablePen = QPen(Qt::NoPen); -- spinBoxDefaultPen.setWidth(0); -- spinBoxHoverPen.setWidth(0); -- spinBoxFocusPen.setWidth(0); -- spinBoxDisablePen.setWidth(0); -- -- //up button -- spinBoxUpDefaultBrush = QBrush(Qt::NoBrush); -- spinBoxUpHoverBrush = QBrush(Qt::NoBrush); -- spinBoxUpFocusHoverBrush = QBrush(Qt::NoBrush); -- spinBoxUpClickBrush = QBrush(Qt::NoBrush); -- spinBoxUpDisableBrush = QBrush(Qt::NoBrush); -- spinBoxUpDefaultPen = QPen(Qt::NoPen); -- spinBoxUpHoverPen = QPen(Qt::NoPen); -- spinBoxUpFocusHoverPen = QPen(Qt::NoPen); -- spinBoxUpClickPen = QPen(Qt::NoPen); -- spinBoxUpDisablePen = QPen(Qt::NoPen); -- spinBoxUpDefaultPen.setWidth(0); -- spinBoxUpHoverPen.setWidth(0); -- spinBoxUpFocusHoverPen.setWidth(0); -- spinBoxUpClickPen.setWidth(0); -- spinBoxUpDisablePen.setWidth(0); -- -- //down button -- spinBoxDownDefaultBrush = QBrush(Qt::NoBrush); -- spinBoxDownHoverBrush = QBrush(Qt::NoBrush); -- spinBoxDownFocusHoverBrush = QBrush(Qt::NoBrush); -- spinBoxDownClickBrush = QBrush(Qt::NoBrush); -- spinBoxDownDisableBrush = QBrush(Qt::NoBrush); -- spinBoxDownDefaultPen = QPen(Qt::NoPen); -- spinBoxDownHoverPen = QPen(Qt::NoPen); -- spinBoxDownFocusHoverPen = QPen(Qt::NoPen); -- spinBoxDownClickPen = QPen(Qt::NoPen); -- spinBoxDownDisablePen = QPen(Qt::NoPen); -- spinBoxDownDefaultPen.setWidth(0); -- spinBoxDownHoverPen.setWidth(0); -- spinBoxDownFocusHoverPen.setWidth(0); -- spinBoxDownClickPen.setWidth(0); -- spinBoxDownDisablePen.setWidth(0); --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.h -deleted file mode 100644 -index 55e911f..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.h -+++ /dev/null -@@ -1,77 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#ifndef SPINBOXPARAMETERS_H --#define SPINBOXPARAMETERS_H -- --#include <QBrush> --#include <QPen> -- -- --class SpinBoxParameters --{ --public: -- SpinBoxParameters(); -- ~SpinBoxParameters(){} -- --//private: -- int radius; -- -- QBrush spinBoxDefaultBrush; -- QBrush spinBoxHoverBrush; -- QBrush spinBoxFocusBrush; -- QBrush spinBoxDisableBrush; -- QPen spinBoxDefaultPen; -- QPen spinBoxHoverPen; -- QPen spinBoxFocusPen; -- QPen spinBoxDisablePen; -- -- //up button -- QBrush spinBoxUpDefaultBrush; -- QBrush spinBoxUpHoverBrush; -- QBrush spinBoxUpFocusHoverBrush; -- QBrush spinBoxUpClickBrush; -- QBrush spinBoxUpDisableBrush; -- QPen spinBoxUpDefaultPen; -- QPen spinBoxUpHoverPen; -- QPen spinBoxUpFocusHoverPen; -- QPen spinBoxUpClickPen; -- QPen spinBoxUpDisablePen; -- -- //down button -- QBrush spinBoxDownDefaultBrush; -- QBrush spinBoxDownHoverBrush; -- QBrush spinBoxDownFocusHoverBrush; -- QBrush spinBoxDownClickBrush; -- QBrush spinBoxDownDisableBrush; -- QPen spinBoxDownDefaultPen; -- QPen spinBoxDownHoverPen; -- QPen spinBoxDownFocusHoverPen; -- QPen spinBoxDownClickPen; -- QPen spinBoxDownDisablePen; -- -- bool spinBoxUpIconHightPixMap = true; -- bool spinBoxDownIconHightPixMap = true; --}; -- --#endif // SPINBOXPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.cpp -deleted file mode 100644 -index b267e15..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.cpp -+++ /dev/null -@@ -1,36 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- --#include "table-parameters.h" -- --TableParameters::TableParameters() --{ -- tableTextHoverPen = QPen(Qt::NoPen); -- tableTextSelectPen = QPen(Qt::NoPen); -- tableDefaultBrush = QBrush(Qt::NoBrush); -- tableHoverBrush = QBrush(Qt::NoBrush); -- tableSelectBrush = QBrush(Qt::NoBrush); -- tableDisableBrush = QBrush(Qt::NoBrush); -- tableHoverPen = QPen(Qt::NoPen); -- tableSelectPen = QPen(Qt::NoPen); -- --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.h -deleted file mode 100644 -index 55521ab..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.h -+++ /dev/null -@@ -1,49 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- --#ifndef TABLEPARAMETERS_H --#define TABLEPARAMETERS_H -- --#include <QBrush> --#include <QPen> -- -- --class TableParameters --{ --public: -- TableParameters(); -- ~TableParameters(){} -- --//private: -- int radius; -- -- QBrush tableDefaultBrush; -- QBrush tableHoverBrush; -- QBrush tableSelectBrush; -- QBrush tableDisableBrush; -- QPen tableHoverPen; -- QPen tableSelectPen; -- QPen tableTextHoverPen; -- QPen tableTextSelectPen; --}; -- --#endif // TABLEPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.cpp -deleted file mode 100644 -index 8ece588..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.cpp -+++ /dev/null -@@ -1,29 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <xibowen@kylinos.cn> -- * -- */ -- -- --#include "tabwidget-parameters.h" -- --TabWidgetParameters::TabWidgetParameters() --{ -- --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.h -deleted file mode 100644 -index 6b1c8e0..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.h -+++ /dev/null -@@ -1,49 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <xibowen@kylinos.cn> -- * -- */ -- -- --#ifndef TABWIDGETPARAMETERS_H --#define TABWIDGETPARAMETERS_H -- --#include <QBrush> --#include <QPen> -- --class TabWidgetParameters --{ --public: -- TabWidgetParameters(); -- ~TabWidgetParameters(){} -- --//private: -- int radius; -- -- QBrush tabWidgetBackgroundBrush; -- QBrush tabBarBackgroundBrush; -- QBrush tabBarDefaultBrush; -- QBrush tabBarHoverBrush; -- QBrush tabBarClickBrush; -- QBrush tabBarSelectBrush; -- QPen tabBarPen = Qt::NoPen; -- --}; -- --#endif // TABWIDGETPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.cpp -deleted file mode 100644 -index 539ff98..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.cpp -+++ /dev/null -@@ -1,59 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <xibowen@kylinos.cn> -- * -- */ -- --#include "toolbutton-parameters.h" -- --ToolButtonParameters::ToolButtonParameters() --{ -- radius = 0; -- -- iconHoverClickHighlight = false; -- textHoverClickHighlight = false; -- -- toolButtonDefaultBrush = QBrush(Qt::NoBrush); -- toolButtonHoverBrush = QBrush(Qt::NoBrush); -- toolButtonClickBrush = QBrush(Qt::NoBrush); -- toolButtonDisableBrush = QBrush(Qt::NoBrush); -- toolButtonCheckBrush = QBrush(Qt::NoBrush); -- toolButtonCheckHoverBrush = QBrush(Qt::NoBrush); -- toolButtonCheckClickBrush = QBrush(Qt::NoBrush); -- toolButtonCheckDisableBrush = QBrush(Qt::NoBrush); -- -- toolButtonDefaultPen = QPen(Qt::NoPen); -- toolButtonHoverPen = QPen(Qt::NoPen); -- toolButtonClickPen = QPen(Qt::NoPen); -- toolButtonDisablePen = QPen(Qt::NoPen); -- toolButtonCheckPen = QPen(Qt::NoPen); -- toolButtonCheckHoverPen = QPen(Qt::NoPen); -- toolButtonCheckClickPen = QPen(Qt::NoPen); -- toolButtonCheckDisablePen = QPen(Qt::NoPen); -- toolButtonFocusPen = QPen(Qt::NoPen); -- toolButtonDefaultPen.setWidth(0); -- toolButtonHoverPen.setWidth(0); -- toolButtonClickPen.setWidth(0); -- toolButtonDisablePen.setWidth(0); -- toolButtonCheckPen.setWidth(0); -- toolButtonCheckHoverPen.setWidth(0); -- toolButtonCheckClickPen.setWidth(0); -- toolButtonCheckDisablePen.setWidth(0); -- toolButtonFocusPen.setWidth(0); --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.h -deleted file mode 100644 -index 0d258c4..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.h -+++ /dev/null -@@ -1,61 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#ifndef TOOLBUTTONPARAMETERS_H --#define TOOLBUTTONPARAMETERS_H -- --#include <QBrush> --#include <QPen> -- --class ToolButtonParameters --{ --public: -- ToolButtonParameters(); -- ~ToolButtonParameters(){} --//private: -- int radius; -- -- bool iconHoverClickHighlight; -- bool textHoverClickHighlight; -- -- QBrush toolButtonDefaultBrush; -- QBrush toolButtonHoverBrush; -- QBrush toolButtonClickBrush; -- QBrush toolButtonDisableBrush; -- QBrush toolButtonCheckBrush; -- QBrush toolButtonCheckHoverBrush; -- QBrush toolButtonCheckClickBrush; -- QBrush toolButtonCheckDisableBrush; -- -- QPen toolButtonDefaultPen; -- QPen toolButtonHoverPen; -- QPen toolButtonClickPen; -- QPen toolButtonDisablePen; -- QPen toolButtonCheckPen; -- QPen toolButtonCheckHoverPen; -- QPen toolButtonCheckClickPen; -- QPen toolButtonCheckDisablePen; -- QPen toolButtonFocusPen; --}; -- --#endif // TOOLBUTTONPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.cpp -deleted file mode 100644 -index 362cf47..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.cpp -+++ /dev/null -@@ -1,29 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#include "tooltip-parameters.h" -- --ToolTipParameters::ToolTipParameters() --{ -- --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.h -deleted file mode 100644 -index d46f60a..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.h -+++ /dev/null -@@ -1,41 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#ifndef TOOLTIPPARAMETERS_H --#define TOOLTIPPARAMETERS_H -- --#include <QBrush> -- --class ToolTipParameters --{ --public: -- ToolTipParameters(); -- ~ToolTipParameters(){} -- --//private: -- int radius; -- -- QBrush toolTipBackgroundBrush; --}; -- --#endif // TOOLTIPPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.cpp b/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.cpp -deleted file mode 100644 -index 2c63639..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.cpp -+++ /dev/null -@@ -1,41 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <xibowen@kylinos.cn> -- * -- */ -- --#include "tree-parameters.h" -- --TreeParameters::TreeParameters() --{ -- treeTextHoverPen = QPen(Qt::NoPen); -- treeTextSelectPen = QPen(Qt::NoPen); -- treeDefaultBrush = QBrush(Qt::NoBrush); -- treeHoverBrush = QBrush(Qt::NoBrush); -- treeSelectBrush = QBrush(Qt::NoBrush); -- treeDisableBrush = QBrush(Qt::NoBrush); -- treeHoverPen = QPen(Qt::NoPen); -- treeSelectPen = QPen(Qt::NoPen); -- -- treeBranchDefaultBrush = QBrush(Qt::NoBrush); -- treeBranchHoverBrush = QBrush(Qt::NoBrush); -- treeBranchSelectBrush = QBrush(Qt::NoBrush); -- treeBranchDisableBrush = QBrush(Qt::NoBrush); -- --} -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h b/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h -deleted file mode 100644 -index f747ea4..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h -+++ /dev/null -@@ -1,56 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <xibowen@kylinos.cn> -- * -- */ -- --#ifndef TREEPARAMETERS_H --#define TREEPARAMETERS_H -- --#include <QBrush> --#include <QPen> -- --class TreeParameters --{ --public: -- TreeParameters(); -- ~TreeParameters(){} -- --//private: -- int radius; -- -- QBrush treeDefaultBrush; -- QBrush treeHoverBrush; -- QBrush treeSelectBrush; -- QBrush treeDisableBrush; -- QPen treeHoverPen; -- QPen treeSelectPen; -- -- QBrush treeBranchDefaultBrush; -- QBrush treeBranchHoverBrush; -- QBrush treeBranchSelectBrush; -- QBrush treeBranchDisableBrush; -- QPen treeTextHoverPen; -- QPen treeTextSelectPen; -- -- bool indicatorIconHoverNeedHighLight = true; -- --}; -- --#endif // TREEPARAMETERS_H -diff --git a/ukui-styles/qt5-style-ukui/widget-parameters/widget-parameters.pri b/ukui-styles/qt5-style-ukui/widget-parameters/widget-parameters.pri -deleted file mode 100644 -index 2cccd41..0000000 ---- a/ukui-styles/qt5-style-ukui/widget-parameters/widget-parameters.pri -+++ /dev/null -@@ -1,39 +0,0 @@ --INCLUDEPATH += $$PWD -- --HEADERS += \ -- $$PWD/checkbox-parameters.h \ -- $$PWD/combobox-parameters.h \ -- $$PWD/lineedit-parameters.h \ -- $$PWD/list-parameters.h \ -- $$PWD/menu-parameters.h \ -- $$PWD/progressbar-parameters.h \ -- $$PWD/pushbutton-parameters.h \ -- $$PWD/radiobutton-parameters.h \ -- $$PWD/scrollbar-parameters.h \ -- $$PWD/slider-parameters.h \ -- $$PWD/spinbox-parameters.h \ -- $$PWD/table-parameters.h \ -- $$PWD/tabwidget-parameters.h \ -- $$PWD/toolbutton-parameters.h \ -- $$PWD/tooltip-parameters.h \ -- $$PWD/tree-parameters.h -- --SOURCES += \ -- $$PWD/checkbox-parameters.cpp \ -- $$PWD/combobox-parameters.cpp \ -- $$PWD/lineedit-parameters.cpp \ -- $$PWD/list-parameters.cpp \ -- $$PWD/menu-parameters.cpp \ -- $$PWD/progressbar-parameters.cpp \ -- $$PWD/pushbutton-parameters.cpp \ -- $$PWD/radiobutton-parameters.cpp \ -- $$PWD/scrollbar-parameters.cpp \ -- $$PWD/slider-parameters.cpp \ -- $$PWD/spinbox-parameters.cpp \ -- $$PWD/table-parameters.cpp \ -- $$PWD/tabwidget-parameters.cpp \ -- $$PWD/toolbutton-parameters.cpp \ -- $$PWD/tooltip-parameters.cpp \ -- $$PWD/tree-parameters.cpp -- -- -diff --git a/ukui-styles/ukui-style-plugin.cpp b/ukui-styles/ukui-style-plugin.cpp -index e411b3e..691a026 100644 ---- a/ukui-styles/ukui-style-plugin.cpp -+++ b/ukui-styles/ukui-style-plugin.cpp -@@ -22,7 +22,6 @@ - - #include "ukui-style-plugin.h" - #include "../qt5-config-style-ukui/ukui-config-style.h" --#include "../qt5-style-ukui/qt5-ukui-style.h" - - #include "black-list.h" - #include "ukui-style-settings.h" -diff --git a/ukui-styles/ukui-styles.pro b/ukui-styles/ukui-styles.pro -index 34c086b..2275336 100644 ---- a/ukui-styles/ukui-styles.pro -+++ b/ukui-styles/ukui-styles.pro -@@ -13,7 +13,6 @@ PKGCONFIG += gsettings-qt - LIBS += -lxcb - - include(../libqt5-ukui-style/libqt5-ukui-style.pri) --include(qt5-style-ukui/qt5-style-ukui.pri) - include(qt5-config-style-ukui/qt5-config-style-ukui.pri) - - # The following define makes your compiler emit warnings if you use diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0013-Update-changelog-4.1.0.0-0k14.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0013-Update-changelog-4.1.0.0-0k14.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0013-Update-changelog-4.1.0.0-0k14.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0013-Update-changelog-4.1.0.0-0k14.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,27329 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Tue, 28 Nov 2023 17:54:37 +0800 -Subject: Update changelog 4.1.0.0-0k14 - ---- - qt5-ukui-filedialog/debug.h | 63 + - qt5-ukui-filedialog/filedialoginterface.h | 17 + - qt5-ukui-filedialog/filedialogplugin.cpp | 12 + - qt5-ukui-filedialog/filedialogplugin.h | 15 + - qt5-ukui-filedialog/filedialogplugin.json | 0 - qt5-ukui-filedialog/filedialogplugin_global.h | 12 + - qt5-ukui-filedialog/kyfiledialog.cpp | 3007 ++++++++++++++++++++ - qt5-ukui-filedialog/kyfiledialog.h | 312 ++ - qt5-ukui-filedialog/kyfiledialogprivate.cpp | 80 + - qt5-ukui-filedialog/kyfiledialogprivate.h | 104 + - qt5-ukui-filedialog/menutoolbutoon.cpp | 99 + - qt5-ukui-filedialog/menutoolbutoon.h | 62 + - qt5-ukui-filedialog/pathbar.cpp | 104 + - qt5-ukui-filedialog/pathbar.h | 54 + - qt5-ukui-filedialog/qt5-ukui-filedialog.pro | 124 + - qt5-ukui-filedialog/sidebar.cpp | 495 ++++ - qt5-ukui-filedialog/sidebar.h | 105 + - .../translations/qt5-ukui-filedialog_bo_CN.ts | 252 ++ - .../translations/qt5-ukui-filedialog_cs.ts | 212 ++ - .../translations/qt5-ukui-filedialog_de.ts | 361 +++ - .../translations/qt5-ukui-filedialog_en_US.ts | 252 ++ - .../translations/qt5-ukui-filedialog_es.ts | 361 +++ - .../translations/qt5-ukui-filedialog_fa.ts | 212 ++ - .../translations/qt5-ukui-filedialog_fr.ts | 252 ++ - .../translations/qt5-ukui-filedialog_kk.ts | 252 ++ - .../translations/qt5-ukui-filedialog_ky.ts | 252 ++ - .../translations/qt5-ukui-filedialog_mn.ts | 237 ++ - .../translations/qt5-ukui-filedialog_tr.ts | 212 ++ - .../translations/qt5-ukui-filedialog_ug.ts | 252 ++ - .../translations/qt5-ukui-filedialog_zh_CN.ts | 252 ++ - .../translations/qt5-ukui-filedialog_zh_HK.ts | 252 ++ - .../translations/qt5-ukui-filedialog_zh_Hans.ts | 258 ++ - .../translations/qt5-ukui-filedialog_zh_Hant.ts | 386 +++ - qt5-ukui-filedialog/ui_kyfiledialog.cpp | 505 ++++ - qt5-ukui-filedialog/ui_kyfiledialog.h | 126 + - qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp | 16 +- - qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro | 33 +- - .../translations/qt5-ukui-platformtheme_bo_CN.ts | 237 +- - .../translations/qt5-ukui-platformtheme_cs.ts | 315 -- - .../translations/qt5-ukui-platformtheme_de.ts | 181 +- - .../translations/qt5-ukui-platformtheme_en_US.ts | 237 +- - .../translations/qt5-ukui-platformtheme_es.ts | 181 +- - .../translations/qt5-ukui-platformtheme_fa.ts | 315 -- - .../translations/qt5-ukui-platformtheme_fr.ts | 237 +- - .../translations/qt5-ukui-platformtheme_kk.ts | 237 +- - .../translations/qt5-ukui-platformtheme_ky.ts | 237 +- - .../translations/qt5-ukui-platformtheme_mn.ts | 237 +- - .../translations/qt5-ukui-platformtheme_tr.ts | 315 -- - .../translations/qt5-ukui-platformtheme_ug.ts | 237 +- - .../translations/qt5-ukui-platformtheme_zh_CN.ts | 237 +- - .../translations/qt5-ukui-platformtheme_zh_HK.ts | 237 +- - qt5-ukui-platformtheme/widget/filedialog/debug.h | 63 - - .../widget/filedialog/kyfiledialog.cpp | 2998 ------------------- - .../widget/filedialog/kyfiledialog.h | 311 -- - .../widget/filedialog/kyfiledialogprivate.cpp | 80 - - .../widget/filedialog/kyfiledialogprivate.h | 104 - - .../widget/filedialog/menutoolbutoon.cpp | 99 - - .../widget/filedialog/menutoolbutoon.h | 62 - - .../widget/filedialog/pathbar.cpp | 104 - - qt5-ukui-platformtheme/widget/filedialog/pathbar.h | 54 - - .../widget/filedialog/sidebar.cpp | 495 ---- - qt5-ukui-platformtheme/widget/filedialog/sidebar.h | 105 - - .../widget/filedialog/ui_kyfiledialog.cpp | 505 ---- - .../widget/filedialog/ui_kyfiledialog.h | 126 - - .../widget/messagebox/message-box.cpp | 2 +- - qt5-ukui-platformtheme/widget/widget.pri | 50 - - qt5-ukui-platformtheme/widget/xatom-helper.cpp | 215 -- - qt5-ukui-platformtheme/widget/xatom-helper.h | 108 - - qt5-ukui-platformtheme/xatom-helper.cpp | 215 ++ - qt5-ukui-platformtheme/xatom-helper.h | 108 + - qt5-ukui.pro | 1 + - translations/qt5-ukui-platformtheme_bo_CN.ts | 361 +++ - translations/qt5-ukui-platformtheme_cs.ts | 361 +++ - translations/qt5-ukui-platformtheme_de.ts | 361 +++ - translations/qt5-ukui-platformtheme_en_US.ts | 361 +++ - translations/qt5-ukui-platformtheme_es.ts | 361 +++ - translations/qt5-ukui-platformtheme_fa.ts | 361 +++ - translations/qt5-ukui-platformtheme_fr.ts | 361 +++ - translations/qt5-ukui-platformtheme_kk.ts | 361 +++ - translations/qt5-ukui-platformtheme_ky.ts | 361 +++ - translations/qt5-ukui-platformtheme_mn.ts | 361 +++ - translations/qt5-ukui-platformtheme_tr.ts | 361 +++ - translations/qt5-ukui-platformtheme_ug.ts | 361 +++ - translations/qt5-ukui-platformtheme_zh_CN.ts | 361 +++ - translations/qt5-ukui-platformtheme_zh_HK.ts | 361 +++ - translations/qt5-ukui-platformtheme_zh_Hans.ts | 258 ++ - translations/qt5-ukui-platformtheme_zh_Hant.ts | 386 +++ - .../themeconfig/classical.json | 8 +- - .../qt5-config-style-ukui/themeconfig/default.json | 10 +- - .../qt5-config-style-ukui/themeconfig/fashion.json | 10 +- - .../qt5-config-style-ukui/ukui-config-style.cpp | 18 +- - 91 files changed, 16112 insertions(+), 8477 deletions(-) - create mode 100644 qt5-ukui-filedialog/debug.h - create mode 100644 qt5-ukui-filedialog/filedialoginterface.h - create mode 100644 qt5-ukui-filedialog/filedialogplugin.cpp - create mode 100644 qt5-ukui-filedialog/filedialogplugin.h - create mode 100644 qt5-ukui-filedialog/filedialogplugin.json - create mode 100644 qt5-ukui-filedialog/filedialogplugin_global.h - create mode 100644 qt5-ukui-filedialog/kyfiledialog.cpp - create mode 100644 qt5-ukui-filedialog/kyfiledialog.h - create mode 100644 qt5-ukui-filedialog/kyfiledialogprivate.cpp - create mode 100644 qt5-ukui-filedialog/kyfiledialogprivate.h - create mode 100644 qt5-ukui-filedialog/menutoolbutoon.cpp - create mode 100644 qt5-ukui-filedialog/menutoolbutoon.h - create mode 100644 qt5-ukui-filedialog/pathbar.cpp - create mode 100644 qt5-ukui-filedialog/pathbar.h - create mode 100644 qt5-ukui-filedialog/qt5-ukui-filedialog.pro - create mode 100644 qt5-ukui-filedialog/sidebar.cpp - create mode 100644 qt5-ukui-filedialog/sidebar.h - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_bo_CN.ts - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_cs.ts - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_de.ts - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_en_US.ts - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_es.ts - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fa.ts - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fr.ts - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_mn.ts - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_tr.ts - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_CN.ts - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_HK.ts - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hans.ts - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hant.ts - create mode 100644 qt5-ukui-filedialog/ui_kyfiledialog.cpp - create mode 100644 qt5-ukui-filedialog/ui_kyfiledialog.h - delete mode 100644 qt5-ukui-platformtheme/widget/filedialog/debug.h - delete mode 100644 qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp - delete mode 100644 qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h - delete mode 100644 qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.cpp - delete mode 100644 qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.h - delete mode 100644 qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.cpp - delete mode 100644 qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.h - delete mode 100644 qt5-ukui-platformtheme/widget/filedialog/pathbar.cpp - delete mode 100644 qt5-ukui-platformtheme/widget/filedialog/pathbar.h - delete mode 100644 qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp - delete mode 100644 qt5-ukui-platformtheme/widget/filedialog/sidebar.h - delete mode 100644 qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.cpp - delete mode 100644 qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.h - delete mode 100644 qt5-ukui-platformtheme/widget/xatom-helper.cpp - delete mode 100644 qt5-ukui-platformtheme/widget/xatom-helper.h - create mode 100644 qt5-ukui-platformtheme/xatom-helper.cpp - create mode 100644 qt5-ukui-platformtheme/xatom-helper.h - create mode 100644 translations/qt5-ukui-platformtheme_bo_CN.ts - create mode 100644 translations/qt5-ukui-platformtheme_cs.ts - create mode 100644 translations/qt5-ukui-platformtheme_de.ts - create mode 100644 translations/qt5-ukui-platformtheme_en_US.ts - create mode 100644 translations/qt5-ukui-platformtheme_es.ts - create mode 100644 translations/qt5-ukui-platformtheme_fa.ts - create mode 100644 translations/qt5-ukui-platformtheme_fr.ts - create mode 100644 translations/qt5-ukui-platformtheme_kk.ts - create mode 100644 translations/qt5-ukui-platformtheme_ky.ts - create mode 100644 translations/qt5-ukui-platformtheme_mn.ts - create mode 100644 translations/qt5-ukui-platformtheme_tr.ts - create mode 100644 translations/qt5-ukui-platformtheme_ug.ts - create mode 100644 translations/qt5-ukui-platformtheme_zh_CN.ts - create mode 100644 translations/qt5-ukui-platformtheme_zh_HK.ts - create mode 100644 translations/qt5-ukui-platformtheme_zh_Hans.ts - create mode 100644 translations/qt5-ukui-platformtheme_zh_Hant.ts - -diff --git a/qt5-ukui-filedialog/debug.h b/qt5-ukui-filedialog/debug.h -new file mode 100644 -index 0000000..7c8edbc ---- /dev/null -+++ b/qt5-ukui-filedialog/debug.h -@@ -0,0 +1,63 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#ifndef PDEBUG_H -+#define PDEBUG_H -+#include <QDebug> -+#include <QDateTime> -+ -+#define SERVICE "com.kylin.statusmanager.interface" -+#define PATH "/" -+#define INTERFACE "com.kylin.statusmanager.interface" -+ -+#define UKUI_SEARCH_SCHEMAS "org.ukui.search.settings" -+#define SEARCH_METHOD_KEY "fileIndexEnable" -+ -+namespace UKUIFileDialog { -+ -+class NullDebug -+ -+{ -+ -+public: -+ -+template<typename T> -+ -+NullDebug & operator <<(const T&){return *this;} -+ -+}; -+inline NullDebug nullDebug(){return NullDebug();} -+} -+ -+//#define LOG_TIMI -+ -+#ifdef LOG_TIMI -+ -+# define pDebug qDebug() << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss:zzz") << " platformtheme input:" -+ -+#else -+ -+# define pDebug UKUIFileDialog::nullDebug() -+ -+#endif -+ -+#endif // KYFILEDIALOG_H -diff --git a/qt5-ukui-filedialog/filedialoginterface.h b/qt5-ukui-filedialog/filedialoginterface.h -new file mode 100644 -index 0000000..c5a6a58 ---- /dev/null -+++ b/qt5-ukui-filedialog/filedialoginterface.h -@@ -0,0 +1,17 @@ -+#ifndef FILEDIALOGINTERFACE_H -+#define FILEDIALOGINTERFACE_H -+#include "qpa/qplatformdialoghelper.h" -+//定义接口 -+class FileDialogInterface -+{ -+public: -+ virtual ~FileDialogInterface() {} -+ virtual QPlatformDialogHelper* create() = 0; -+}; -+ -+//一定是唯一的标识符 -+#define FileDialogInterface_iid "UKUIPlatformTheme.Plugin.FileDialogInterface" -+ -+Q_DECLARE_INTERFACE(FileDialogInterface, FileDialogInterface_iid) -+ -+#endif // FILEDIALOGINTERFACE_H -diff --git a/qt5-ukui-filedialog/filedialogplugin.cpp b/qt5-ukui-filedialog/filedialogplugin.cpp -new file mode 100644 -index 0000000..50cc1ff ---- /dev/null -+++ b/qt5-ukui-filedialog/filedialogplugin.cpp -@@ -0,0 +1,12 @@ -+#include "filedialogplugin.h" -+#include <QDebug> -+#include "kyfiledialog.h" -+#if QT_VERSION < 0x050000 -+Q_EXPORT_PLUGIN2(plugin, myPlugin) -+#endif // QT_VERSION < 0x050000 -+ -+QPlatformDialogHelper *FileDialogPlugin::create() -+{ -+ return new UKUIFileDialog::KyFileDialogHelper; -+} -+ -diff --git a/qt5-ukui-filedialog/filedialogplugin.h b/qt5-ukui-filedialog/filedialogplugin.h -new file mode 100644 -index 0000000..5f5502e ---- /dev/null -+++ b/qt5-ukui-filedialog/filedialogplugin.h -@@ -0,0 +1,15 @@ -+#ifndef MYPLUGIN_H -+#define MYPLUGIN_H -+#include <QtPlugin> -+#include "filedialoginterface.h" -+class FileDialogPlugin : public QObject,public FileDialogInterface -+{ -+ Q_OBJECT -+#if QT_VERSION >= 0x050000 -+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QGenericPluginFactoryInterface" FILE "filedialogplugin.json") -+ Q_INTERFACES(FileDialogInterface); -+#endif // QT_VERSION >= 0x050000 -+public: -+ QPlatformDialogHelper *create(); -+}; -+#endif -diff --git a/qt5-ukui-filedialog/filedialogplugin.json b/qt5-ukui-filedialog/filedialogplugin.json -new file mode 100644 -index 0000000..e69de29 -diff --git a/qt5-ukui-filedialog/filedialogplugin_global.h b/qt5-ukui-filedialog/filedialogplugin_global.h -new file mode 100644 -index 0000000..af97589 ---- /dev/null -+++ b/qt5-ukui-filedialog/filedialogplugin_global.h -@@ -0,0 +1,12 @@ -+#ifndef FILEDIALOGPLUGIN_GLOBAL_H -+#define FILEDIALOGPLUGIN_GLOBAL_H -+ -+#include <QtCore/qglobal.h> -+ -+#if defined(QT5UKUIFILEDIALOG_LIBRARY) -+# define FILEDIALOGPLUGIN_EXPORT Q_DECL_EXPORT -+#else -+# define FILEDIALOGPLUGIN_EXPORT Q_DECL_IMPORT -+#endif -+ -+#endif // FILEDIALOGPLUGIN_GLOBAL_H -diff --git a/qt5-ukui-filedialog/kyfiledialog.cpp b/qt5-ukui-filedialog/kyfiledialog.cpp -new file mode 100644 -index 0000000..f583064 ---- /dev/null -+++ b/qt5-ukui-filedialog/kyfiledialog.cpp -@@ -0,0 +1,3007 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#include "debug.h" -+#include "kyfiledialog.h" -+#include <QDebug> -+#include "ui_kyfiledialog.h" -+#include "kyfiledialogprivate.h" -+#include "sidebar.h" -+#include "pathbar.h" -+#include "ukuistylehelper/ukuistylehelper.h" -+#include <peony-qt/controls/directory-view/directory-view-container.h> -+#include <peony-qt/controls/menu/directory-view-menu/directory-view-menu.h> -+#include <peony-qt/controls/directory-view/directory-view-widget.h> -+#include <peony-qt/controls/directory-view/directory-view-factory/directory-view-factory-manager.h> -+#include <peony-qt/file-operation-utils.h> -+#include <QDesktopServices> -+#include <QUrl> -+#include <PeonyFileInfo> -+#include <PeonyFileItemModel> -+#include <QDebug> -+#include <QMimeDatabase> -+#include <QMimeType> -+#include <KWindowEffects> -+#include <QPainter> -+#include <QRect> -+#include <QVector4D> -+#include <QRegExp> -+#include <QMessageBox> -+#include <QScrollBar> -+#include <QCoreApplication> -+#include <QTranslator> -+#include <qwindow.h> -+#include <QScreen> -+#include <QDesktopWidget> -+#include <QPainterPath> -+#include <QDBusInterface> -+#include <QDBusMessage> -+#include <qpa/qplatformdialoghelper.h> -+#include "../qt5-ukui-platformtheme/xatom-helper.h" -+#include <peony-qt/file-utils.h> -+#include <peony-qt/create-template-operation.h> -+#include <peony-qt/global-settings.h> -+#include <peony-qt/search-vfs-uri-parser.h> -+#include <peony-qt/file-meta-info.h> -+#include <peony-qt/clipboard-utils.h> -+#include "debug.h" -+#include "ukui-style-settings.h" -+ -+using namespace UKUIFileDialog; -+ -+KyNativeFileDialog::KyNativeFileDialog(QWidget *parent) -+ : QDialog(parent), -+ d_ptr(new KyNativeFileDialogPrivate) -+{ -+ QString locale = QLocale::system().name(); -+ -+ if(qApp->property("Language").isValid()) -+ { -+ QString language = qApp->property("Language").toString(); -+ QFile file("/usr/share/qt5-ukui-platformtheme/qt5-ukui-filedialog_" + language + ".qm"); -+ if(file.exists()) -+ locale = language; -+ } -+ installTranslate(locale); -+ -+ mKyFileDialogUi = new Ui_KyFileDialog(this); -+ -+// setStyle(nullptr); -+ -+// m_fileSystemModel = new QFileSystemModel(); -+ -+ connect(d_ptr.get()->m_timer, &QTimer::timeout, this, [&](){ -+// pDebug << "timeout isActive:..........." << d_ptr.get()->m_timer->isActive(); -+ this->show(); -+ if(d_ptr.get()->m_timer->isActive()){ -+ pDebug << "timer stop...."; -+ d_ptr.get()->m_timer->stop(); -+ } -+ }); -+ -+ mKyFileDialogUi->setupUi(this); -+ d_ptr.get()->m_container = mKyFileDialogUi->m_container; -+ -+// QString path = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); -+// pDebug << "initialDirPath:" << path << selectedUrls(); -+// goToUri(path, false); -+ getCurrentPage()->setContextMenuPolicy(Qt::CustomContextMenu); -+ -+ connect(mKyFileDialogUi->m_sider, &FileDialogSideBar::goToUriRequest, this, [this](const QString &uri, bool addToHistory, bool forceUpdate){ -+ pDebug << "goToUri0000"; -+ if (uri.startsWith("favorite://")) { -+ QString u = Peony::FileUtils::getTargetUri(uri); -+ goToUri(u, addToHistory, forceUpdate); -+ -+ } -+ else -+ goToUri(uri, addToHistory, forceUpdate); -+ }); -+ -+ connect(getCurrentPage(), &Peony::DirectoryViewContainer::directoryChanged, this, &KyNativeFileDialog::updateWindowState); -+ -+ connect(getCurrentPage(), &Peony::DirectoryViewContainer::directoryChanged, this, [=](){ -+ pDebug << "directoryChanged........" << getCurrentUri(); -+ -+ Q_EMIT directoryEntered(QUrl(getCurrentUri())); -+ pDebug << "locationChangeEnd...."; -+ QCursor c; -+ c.setShape(Qt::ArrowCursor); -+ this->setCursor(c); -+ mKyFileDialogUi->m_sider->setCursor(c); -+ -+ if(m_fileDialogHelper->isViewInitialFinished()) -+ intiContainerSort(); -+ -+// mKyFileDialogUi->m_fileNameEdit->setText(""); -+ setShortCuts(); -+ }); -+ -+// connect(getCurrentPage(), &Peony::DirectoryViewContainer::directoryChanged, this, [=](){ -+// updateSearchProgressBar(); -+// }); -+ connect(getCurrentPage(), &Peony::DirectoryViewContainer::viewDoubleClicked, this, [=](const QString &uri){ -+ auto info = Peony::FileInfo::fromUri(uri); -+ pDebug << "viewDoubleClicked....." << uri << info->isDir() << info->isVolume(); -+ if (info->isDir() || info->isVolume()) { -+ pDebug << "goToUrixxxxxxx...."; -+ goToUri(uri); -+ } else { -+ onAcceptButtonClicked(); -+ } -+ }); -+ -+ connect(getCurrentPage(), &Peony::DirectoryViewContainer::selectionChanged, this, &KyNativeFileDialog::updateStatusBar); -+ -+ connect(getCurrentPage(), &Peony::DirectoryViewContainer::menuRequest, this, &KyNativeFileDialog::containerMenuRequest); -+ -+ connect(getCurrentPage(), &Peony::DirectoryViewContainer::signal_itemAdded, this, [=](const QString& uri){ -+ pDebug << "signal_itemAdded....." << m_uris_to_edit << uri; -+ if(m_uris_to_edit.isEmpty()) -+ return; -+ QString editUri = Peony::FileUtils::urlDecode(m_uris_to_edit.first()); -+ QString infoUri = Peony::FileUtils::urlDecode(uri); -+ if (editUri == infoUri ) { -+ getCurrentPage()->getView()->scrollToSelection(uri); -+ getCurrentPage()->getView()->editUri(uri); -+ } -+ m_uris_to_edit.clear(); -+ }); -+ -+ connect(getCurrentPage(), &Peony::DirectoryViewContainer::updateWindowLocationRequest, this, [=](const QString &uri, bool addToHistory, bool forceUpdate){ -+ pDebug << "page updateWindowLocationRequest.....uri:" << uri << getCurrentUri() << forceUpdate; -+ if(uri == "") -+ return; -+ QString s = uri; -+ QString s1 = s.endsWith("/") ? s.remove(s.length() - 1, 1) : s; -+ QString s2 = getCurrentUri(); -+ QString s3 = s2.endsWith("/") ? s2.remove(s2.length() - 1, 1) : s2; -+ if(s1 != s3 && m_fileDialogHelper->isViewInitialFinished()) -+ { -+ pDebug << "s1:" << s1 << "s3:" << s3; -+ goToUri(uri, addToHistory); -+ } -+ }); -+ -+ connect(mKyFileDialogUi->m_pathbar, &Peony::AdvancedLocationBar::updateWindowLocationRequest, -+ this, [this](const QString &uri, bool addHistory, bool forceUpdate){ -+ pDebug << "goToUrijjjjj...."; -+ goToUri(uri, addHistory, forceUpdate); -+ }); -+ -+ connect(mKyFileDialogUi->m_pathbar, &Peony::AdvancedLocationBar::refreshRequest, this, [](){ -+ -+ }); -+ connect(mKyFileDialogUi->m_pathbar, &Peony::AdvancedLocationBar::searchRequest, this, [=](const QString &path, const QString &key){ -+ pDebug << "path.....:" << path << "key:" << key << m_lastSearchPath; -+ if(key == "") -+ { -+ forceStopLoading(); -+ pDebug << "key is null m_lastSearchPath:" << m_lastSearchPath; -+ m_isClearSearchKey = true; -+// m_needSearch = false; -+ goToUri(m_lastSearchPath, true); -+ -+// QCursor c; -+// c.setShape(Qt::ArrowCursor); -+// this->setCursor(c); -+// getCurrentPage()->getView()->setCursor(c); -+// mKyFileDialogUi->m_sider->setCursor(c); -+ -+ } -+ else -+ { -+ auto targetUri = Peony::SearchVFSUriParser::parseSearchKey(path, key, true, false, "", true); -+ pDebug << "updateSearch targetUri:" <<targetUri; -+ pDebug << "updateSearch path:" <<path; -+ goToUri(targetUri, true); -+ -+ } -+ }); -+ -+ mKyFileDialogUi->m_backButton->setToolTip(tr("Go Back")); -+ mKyFileDialogUi->m_backButton->setIcon(QIcon::fromTheme("go-previous-symbolic")); -+ mKyFileDialogUi->m_backButton->setAutoRaise(true); -+ mKyFileDialogUi->m_backButton->setEnabled(false); -+ connect(mKyFileDialogUi->m_backButton, &QToolButton::clicked, this, &KyNativeFileDialog::goBack); -+ -+ -+ mKyFileDialogUi->m_forwardButton->setToolTip(tr("Go Forward")); -+ mKyFileDialogUi->m_forwardButton->setIcon(QIcon::fromTheme("go-next-symbolic")); -+ mKyFileDialogUi->m_forwardButton->setAutoRaise(true); -+ mKyFileDialogUi->m_forwardButton->setEnabled(false); -+ connect(mKyFileDialogUi->m_forwardButton, &QToolButton::clicked, this, &KyNativeFileDialog::goForward); -+ -+ mKyFileDialogUi->m_toParentButton->setToolTip(tr("Cd Up")); -+ mKyFileDialogUi->m_toParentButton->setIcon(QIcon::fromTheme("go-up-symbolic")); -+ mKyFileDialogUi->m_toParentButton->setAutoRaise(true); -+ mKyFileDialogUi->m_toParentButton->setEnabled(false); -+ connect(mKyFileDialogUi->m_toParentButton, &QToolButton::clicked, this, &KyNativeFileDialog::goToParent); -+ -+ mKyFileDialogUi->m_searchBtn->setIcon(QIcon::fromTheme("edit-find-symbolic")); -+ mKyFileDialogUi->m_searchBtn->setToolTip(tr("Search")); -+ mKyFileDialogUi->m_searchBtn->setIconSize(QSize(16, 16)); -+ mKyFileDialogUi->m_searchBtn->setAutoRaise(true); -+ -+ mKyFileDialogUi->m_searchBtn->setProperty("useIconHighlightEffect", true); -+ mKyFileDialogUi->m_searchBtn->setProperty("iconHighlightEffectMode", 1); -+ connect(mKyFileDialogUi->m_searchBtn, &QToolButton::clicked, this, &KyNativeFileDialog::searchButtonClicked); -+ -+ mKyFileDialogUi->m_modeButton->setToolTip(tr("View Type")); -+ mKyFileDialogUi->m_modeButton->setIcon(QIcon::fromTheme("view-grid-symbolic")); -+ mKyFileDialogUi->m_modeButton->setProperty("isWindowButton", 1); -+ mKyFileDialogUi->m_modeButton->setProperty("useIconHighlightEffect", 0x2); -+ mKyFileDialogUi->m_modeButton->setAutoRaise(true); -+ -+ mKyFileDialogUi->m_useGlobalSortAction->setChecked(Peony::GlobalSettings::getInstance()->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()); -+ connect(mKyFileDialogUi->m_useGlobalSortAction, &QAction::triggered, this, [=](bool checked){ -+ Peony::GlobalSettings::getInstance()->setValue(USE_GLOBAL_DEFAULT_SORTING, checked); -+ }); -+ -+ mKyFileDialogUi->m_sortButton->setToolTip(tr("Sort Type")); -+ mKyFileDialogUi->m_sortButton->setProperty("isWindowButton", 1); -+ mKyFileDialogUi->m_sortButton->setProperty("useIconHighlightEffect", 0x2); -+ mKyFileDialogUi->m_sortButton->setAutoRaise(true); -+ -+ mKyFileDialogUi->m_maximizeAndRestore->setToolTip(tr("Maximize")); -+ mKyFileDialogUi->m_maximizeAndRestore->setIcon(QIcon::fromTheme("window-close-symbolic")); -+ mKyFileDialogUi->m_maximizeAndRestore->setAutoRaise(true); -+ mKyFileDialogUi->m_maximizeAndRestore->setProperty("isWindowButton", 1); -+ mKyFileDialogUi->m_maximizeAndRestore->setProperty("useIconHighlightEffect", 0x2); -+ connect(mKyFileDialogUi->m_maximizeAndRestore, &QToolButton::clicked, this, [=]() { -+ if (!this->isMaximized()) { -+ this->showMaximized(); -+ } else { -+ this->showNormal(); -+ } -+ updateMaximizeState(); -+ }); -+ -+ mKyFileDialogUi->m_closeButton->setToolTip(tr("Close")); -+ mKyFileDialogUi->m_closeButton->setIcon(QIcon::fromTheme("window-close-symbolic")); -+ mKyFileDialogUi->m_closeButton->setAutoRaise(true); -+ mKyFileDialogUi->m_closeButton->setProperty("isWindowButton", 0x2); -+ -+ connect(mKyFileDialogUi->m_modeMenu, &QMenu::triggered, this, [=](QAction *action) { -+ if (action == mKyFileDialogUi->m_listModeAction) { -+ this->getCurrentPage()->switchViewType("List View"); -+ } else { -+ this->getCurrentPage()->switchViewType("Icon View"); -+ } -+ }); -+ -+ connect(mKyFileDialogUi->m_acceptButton, &QPushButton::clicked, this, &KyNativeFileDialog::onAcceptButtonClicked); -+ -+ connect(mKyFileDialogUi->m_rejectButton, &QPushButton::clicked, this, &KyNativeFileDialog::onRejectButtonClicked); -+ -+ connect(mKyFileDialogUi->m_fileTypeCombo, -+ static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated), -+ this, [this](const QString s){ -+ pDebug << "activated..." << s; -+ selectNameFilter(s);}); -+ -+ connect(mKyFileDialogUi->m_fileTypeCombo, -+ static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated), -+ this, &KyNativeFileDialog::selectedNameFilterChanged); -+ -+ connect(mKyFileDialogUi->m_fileTypeCombo, -+ static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged), -+ this, [this](const QString s){ -+ pDebug << "currentIndexChanged..." << s; -+ selectNameFilter(s);}); -+ -+ connect(mKyFileDialogUi->m_closeButton, &QToolButton::clicked, this, &KyNativeFileDialog::onRejectButtonClicked); -+ -+ connect(mKyFileDialogUi->m_fileNameEdit, &QLineEdit::textChanged, this, &KyNativeFileDialog::lineEditTextChange); -+ -+ connect(getCurrentPage(), &Peony::DirectoryViewContainer::viewTypeChanged, this, &KyNativeFileDialog::onSwitchView); -+ -+ connect(mKyFileDialogUi->m_sortOrderGroup, &QActionGroup::triggered, this, [=](QAction *action) { -+ int index = mKyFileDialogUi->m_sortOrderGroup->actions().indexOf(action); -+ getCurrentPage()->setSortOrder(Qt::SortOrder(index)); -+ setSortType(); -+ }); -+ -+ connect(mKyFileDialogUi->m_sortTypeGroup, &QActionGroup::triggered, this, [=](QAction *action) { -+ int index = mKyFileDialogUi->m_sortTypeGroup->actions().indexOf(action); -+ getCurrentPage()->setSortType(Peony::FileItemModel::ColumnType(index)); -+ }); -+ -+ connect(mKyFileDialogUi->m_sortMenu, &QMenu::aboutToShow, this, [=]() { -+ bool originPathVisible = getCurrentUri()== "trash:///"; -+ mKyFileDialogUi->m_originalPath->setVisible(originPathVisible); -+ mKyFileDialogUi->m_sortTypeGroup->actions().at(getCurrentSortColumn())->setChecked(true); -+ mKyFileDialogUi->m_sortOrderGroup->actions().at(getCurrentSortOrder())->setChecked(true); -+ }); -+ -+ foreach (QAction *action, mKyFileDialogUi->m_sortTypeGroup->actions()) -+ { -+ bool checked = (int(getCurrentPage()->getSortType()) == -+ mKyFileDialogUi->m_sortTypeGroup->actions().indexOf(action) ? true : false); -+ action->setChecked(checked); -+ } -+ -+ refreshContainerSort(); -+ updateMaximizeState(); -+ onSwitchView(); -+ isTableModel(); -+ -+ m_model = new QStringListModel(); -+ m_completer = new QCompleter(mKyFileDialogUi->m_fileNameEdit); -+ m_completer->setModel(m_model); -+ m_completer->setMaxVisibleItems(10); -+ m_completer->setModelSorting(QCompleter::CaseInsensitivelySortedModel); -+// m_completer->setCompletionMode(QCompleter::UnfilteredPopupCompletion); -+ mKyFileDialogUi->m_fileNameEdit->setCompleter(m_completer); -+ -+ int number = QApplication::desktop()->screenNumber(QCursor::pos()); -+ if(number<0){ -+ number=0; -+ } -+ QSize size = QGuiApplication::screens().at(number)->geometry().size(); -+ pDebug << "setmaxsize:" << size; -+ this->setMaximumSize(size); -+} -+ -+KyNativeFileDialog::~KyNativeFileDialog() -+{ -+ pDebug << "~~~~~~~~KyNativeFileDialog"; -+ -+} -+ -+void KyNativeFileDialog::updateMaximizeState() -+{ -+ bool maximized = this->isMaximized(); -+ if (maximized) { -+ mKyFileDialogUi->m_maximizeAndRestore->setToolTip(tr("Restore")); -+ mKyFileDialogUi->m_maximizeAndRestore->setIcon(QIcon::fromTheme("window-restore-symbolic")); -+ } else { -+ mKyFileDialogUi->m_maximizeAndRestore->setToolTip(tr("Maximize")); -+ mKyFileDialogUi->m_maximizeAndRestore->setIcon(QIcon::fromTheme("window-maximize-symbolic")); -+ } -+} -+ -+Peony::FMWindowIface *KyNativeFileDialog::create(const QString &uri) -+{ -+ auto dialog = new KyNativeFileDialog(); -+ -+ return dialog; -+} -+ -+Peony::FMWindowIface *KyNativeFileDialog::create(const QStringList &uris) -+{ -+ auto dialog = new KyNativeFileDialog(); -+ -+ return dialog; -+} -+ -+const QStringList KyNativeFileDialog::getCurrentSelections() -+{ -+ if(containerView()) -+ return containerView()->getSelections(); -+ else -+ return QStringList(); -+} -+ -+const QStringList KyNativeFileDialog::getCurrentSelectionsList() -+{ -+ QStringList list; -+ foreach (QString str, getCurrentSelections()) { -+ list.append(Peony::FileUtils::urlDecode(str)); -+ } -+ return list; -+} -+ -+const QStringList KyNativeFileDialog::getCurrentAllFileUris() -+{ -+ if(containerView()) -+ return containerView()->getAllFileUris(); -+ return QStringList(); -+} -+const QList<std::shared_ptr<Peony::FileInfo>> KyNativeFileDialog::getCurrentSelectionFileInfos() -+{ -+ const QStringList uris = getCurrentSelections(); -+ QList<std::shared_ptr<Peony::FileInfo>> infos; -+ for(auto uri : uris) { -+ auto info = Peony::FileInfo::fromUri(uri); -+ infos<<info; -+ } -+ return infos; -+} -+ -+void KyNativeFileDialog::setCurrentSelections(QStringList selections) -+{ -+ QStringList list; -+ foreach (QString str, selections) { -+ list.append(Peony::FileUtils::urlEncode(str)); -+ } -+ if(containerView()){ -+ containerView()->setSelections(list); -+ pDebug << "get setCurrentSelections....:" << containerView()->getSelections(); -+ } -+} -+ -+Qt::SortOrder KyNativeFileDialog::getCurrentSortOrder() -+{ -+ return getCurrentPage()->getSortOrder(); -+} -+ -+int KyNativeFileDialog::getCurrentSortColumn() -+{ -+ return getCurrentPage()->getSortType(); -+} -+ -+bool KyNativeFileDialog::getWindowShowHidden() -+{ -+ auto settings = Peony::GlobalSettings::getInstance(); -+ if (settings->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()) { -+ return settings->getValue(SHOW_HIDDEN_PREFERENCE).toBool(); -+ } else { -+ auto uri = getCurrentUri(); -+ auto metaInfo = Peony::FileMetaInfo::fromUri(uri); -+ if (metaInfo) { -+ return metaInfo->getMetaInfoVariant(SHOW_HIDDEN_PREFERENCE).isValid()? metaInfo->getMetaInfoVariant(SHOW_HIDDEN_PREFERENCE).toBool(): (settings->getValue(SHOW_HIDDEN_PREFERENCE).toBool()); -+ } else { -+ pDebug<<"can not get file meta info"<<uri; -+ return settings->getValue(SHOW_HIDDEN_PREFERENCE).toBool(); -+ } -+ } -+} -+bool KyNativeFileDialog::getWindowUseDefaultNameSortOrder() -+{ -+ auto settings = Peony::GlobalSettings::getInstance(); -+ if (settings->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()) { -+ return settings->getValue(SORT_CHINESE_FIRST).isValid()? settings->getValue(SORT_CHINESE_FIRST).toBool(): true; -+ } else { -+ auto uri = getCurrentUri(); -+ auto metaInfo = Peony::FileMetaInfo::fromUri(uri); -+ if (metaInfo) { -+ return metaInfo->getMetaInfoVariant(SORT_CHINESE_FIRST).isValid()? metaInfo->getMetaInfoVariant(SORT_CHINESE_FIRST).toBool(): (settings->getValue(SORT_CHINESE_FIRST).isValid()? settings->getValue(SORT_CHINESE_FIRST).toBool(): true); -+ } else { -+ pDebug<<"can not get file meta info"<<uri; -+ return settings->getValue(SORT_CHINESE_FIRST).isValid()? settings->getValue(SORT_CHINESE_FIRST).toBool(): true; -+ } -+ } -+} -+bool KyNativeFileDialog::getWindowSortFolderFirst() -+{ -+ auto settings = Peony::GlobalSettings::getInstance(); -+ if (settings->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()) { -+ return settings->getValue(SORT_FOLDER_FIRST).isValid()? settings->getValue(SORT_FOLDER_FIRST).toBool(): true; -+ } else { -+ auto uri = getCurrentUri(); -+ auto metaInfo = Peony::FileMetaInfo::fromUri(uri); -+ if (metaInfo) { -+ return metaInfo->getMetaInfoVariant(SORT_FOLDER_FIRST).isValid()? metaInfo->getMetaInfoVariant(SORT_FOLDER_FIRST).toBool(): (settings->getValue(SORT_FOLDER_FIRST).isValid()? settings->getValue(SORT_FOLDER_FIRST).toBool(): true); -+ } else { -+ pDebug<<"can not get file meta info"<<uri; -+ return settings->getValue(SORT_FOLDER_FIRST).isValid()? settings->getValue(SORT_FOLDER_FIRST).toBool(): true; -+ } -+ } -+} -+ -+void KyNativeFileDialog::refresh() -+{ -+ getCurrentPage()->refresh(); -+} -+ -+void KyNativeFileDialog::forceStopLoading() -+{ -+ getCurrentPage()->stopLoading(); -+ -+ //Key_escape also use as cancel -+ if (Peony::ClipboardUtils::isClipboardHasFiles()) -+ { -+ Peony::ClipboardUtils::clearClipboard(); -+ if(containerView()) -+ containerView()->repaintView(); -+ } -+} -+ -+void KyNativeFileDialog::setShowHidden(bool showHidden) -+{ -+ getCurrentPage()->setShowHidden(showHidden); -+} -+ -+void KyNativeFileDialog::setUseDefaultNameSortOrder(bool use) -+{ -+ if (!getCurrentPage()) { -+ return; -+ } -+ getCurrentPage()->setUseDefaultNameSortOrder(use); -+} -+ -+void KyNativeFileDialog::setSortFolderFirst(bool set) -+{ -+ if (!getCurrentPage()) { -+ return; -+ } -+ getCurrentPage()->setSortFolderFirst(set); -+} -+ -+void KyNativeFileDialog::setCurrentSelectionUris(const QStringList &uris) -+{ -+ getCurrentPage()->stopLoading(); -+ -+ //Key_escape also use as cancel -+ if (Peony::ClipboardUtils::isClipboardHasFiles()) -+ { -+ Peony::ClipboardUtils::clearClipboard(); -+ if(containerView()) -+ containerView()->repaintView(); -+ } -+} -+ -+void KyNativeFileDialog::setCurrentSortOrder (Qt::SortOrder order) -+{ -+ getCurrentPage()->setSortOrder(order); -+} -+ -+void KyNativeFileDialog::setCurrentSortColumn (int sortColumn) -+{ -+ getCurrentPage()->setSortType(Peony::FileItemModel::ColumnType(sortColumn)); -+} -+ -+void KyNativeFileDialog::editUri(const QString &uri) -+{ -+ if(containerView()) -+ containerView()->editUri(uri); -+} -+ -+void KyNativeFileDialog::editUris(const QStringList &uris) -+{ -+ if(containerView()) -+ containerView()->editUris(uris); -+} -+ -+bool KyNativeFileDialog::getFilterWorking() -+{ -+ return false; -+} -+ -+void KyNativeFileDialog::beginSwitchView(const QString &viewId) -+{ -+ if (getCurrentUri() == "computer:///") -+ return; -+ auto selection = getCurrentSelections(); -+ if(!getCurrentPage()||!(getCurrentPage()->getView())) -+ return; -+ -+ if (getCurrentPage()->getView()->viewId() == viewId) -+ return; -+ -+ getCurrentPage()->switchViewType(viewId); -+ -+ // change default view id -+ auto factoryManager = Peony::DirectoryViewFactoryManager2::getInstance(); -+ auto internalViews = factoryManager->internalViews(); -+ if (internalViews.contains(viewId)) -+ Peony::GlobalSettings::getInstance()->setValue(DEFAULT_VIEW_ID, viewId); -+ -+ setCurrentSelections(selection); -+ if (selection.count() >0) -+ getCurrentPage()->getView()->scrollToSelection(selection.first()); -+ -+} -+ -+ -+/** -+ * @brief 当前目录 -+ */ -+const QString KyNativeFileDialog::getCurrentUri() -+{ -+ return Peony::FileUtils::urlDecode(getCurrentPage()->getCurrentUri()); -+} -+ -+/** -+ * @param directory 路径 -+ * @brief 设置路径为directory -+ */ -+void KyNativeFileDialog::setDirectory(const QString &directory) -+{ -+ pDebug << "setDirectoryoooo...:" << directory; -+ setDirectoryUrl(QUrl(directory)); -+} -+ -+void KyNativeFileDialog::setDirectory(const QDir &directory) -+{ -+ setDirectoryUrl(QUrl::fromLocalFile(directory.absolutePath())); -+} -+ -+QDir KyNativeFileDialog::directory() const -+{ -+ return QDir(directoryUrl().toLocalFile()); -+} -+ -+void KyNativeFileDialog::setDirectoryUrl(const QUrl &directory) -+{ -+ pDebug << "setDirectoryUrl.....:" << directory; -+ if (!getCurrentPage()) { -+ return; -+ } -+ goToUri(directory.toString(), true); -+} -+ -+QUrl KyNativeFileDialog::directoryUrl() const -+{ -+ if (!getCurrentPage()) { -+ return QUrl(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)); -+ } else { -+ return QUrl(Peony::FileUtils::urlDecode(getCurrentPage()->getCurrentUri())); -+ } -+} -+ -+void KyNativeFileDialog::goToUri(const QString &uri, bool addToHistory, bool forceUpdate) -+{ -+ pDebug << "goToUri....,,,,:" << uri << getCurrentUri(); -+ -+ if(containerView() && m_fileDialogHelper){ -+ pDebug << "connect............"; -+ connect(containerView(), &Peony::DirectoryViewWidget::viewDirectoryChanged, -+ m_fileDialogHelper, &KyFileDialogHelper::viewInitialFinished, Qt::UniqueConnection); -+ } -+ -+ if(uri.isEmpty() || uri == getCurrentUri()) -+ return; -+ QString nUri = uri, nCurrentUri = getCurrentUri(); -+ pDebug << "nUri000..." << nUri << "nCurrentUri...." << nCurrentUri; -+ if(nUri.endsWith("/")){ -+ if((nUri.length() >= 2 && nUri[nUri.length() - 2] != "/") || nUri.length() <2) -+ nUri = nUri.remove(nUri.length() - 1, 1); -+ } -+ if(nCurrentUri.endsWith("/")){ -+ if((nCurrentUri.length() >= 2 && nCurrentUri[nCurrentUri.length() - 2] != "/") || nCurrentUri.length() <2) -+ nCurrentUri = nCurrentUri.remove(nCurrentUri.length() - 1, 1); -+ } -+ pDebug << "nUri..." << nUri << "nCurrentUri...." << nCurrentUri; -+ if(nUri == nCurrentUri) { -+ return; -+ } -+ pDebug << "getCurrentUri....,,,,:" << getCurrentUri(); -+ pDebug << "isShow......:" << (m_fileDialogHelper == nullptr) << m_fileDialogHelper->isShow() << isInitialGoToUriNum; -+ if(true)//(isInitialGoToUriNum || (m_fileDialogHelper != nullptr && m_fileDialogHelper->isShow())) -+ { -+ isInitialGoToUriNum = false; -+ getCurrentPage()->stopLoading(); -+ if(!m_fileDialogHelper->isShow()) -+ addToHistory = false; -+ pDebug << "getCurrentUri....,,,,:" << m_fileDialogHelper->isShow() << getCurrentUri(); -+ pDebug << "gotouri123123:" << uri << addToHistory << forceUpdate; -+ if(uri.startsWith("search:///search_uris=")) -+ getCurrentPage()->goToUri(uri, addToHistory, forceUpdate); -+ else -+ getCurrentPage()->goToUri(Peony::FileUtils::urlEncode(uri), addToHistory, forceUpdate); -+ } -+} -+ -+/** -+ * @param filename文件名 -+ * @brief 选择指定文件 -+ */ -+void KyNativeFileDialog::selectFile(const QString &filename) -+{ -+ QUrl url = getCurrentUri(); -+ pDebug << "selectFileoooo..........:" << filename; -+// if(!QFile::exists(filename.remove(0,7))) -+// { -+// pDebug << "selectFile not exist:" << filename.remove(0,7); -+// return; -+// } -+ QString path = filename; -+ -+ if(url.toString() != path) -+ { -+ if(path.startsWith("/")) -+ path = ("file://" + path); -+ -+ pDebug << "select filename path:" << path; -+ -+ QUrl pathUrl(path); -+ pDebug << "select pathUrl:" << pathUrl.path(); -+ -+ QDir dir(pathUrl.path()); -+ -+ if(!path.endsWith("/")) -+ dir.cdUp(); -+ setDirectoryUrl(QUrl("file://" + dir.path())); -+ pDebug << "url2222:" << dir.path(); -+ } -+ pDebug << "select url...."; -+ QList<QUrl> urls; -+ if(path.startsWith("/")) -+ path = "file://" + path; -+ pDebug << "filename:...." << path; -+ urls.append(QUrl(path)); -+ pDebug << "setInitiallySelectedFiles......" << path; -+ m_fileDialogHelper->options()->setInitiallySelectedFiles(urls); -+// QDir dir(url.path()); -+// url.setPath(dir.absoluteFilePath(filename)); -+// pDebug << "selectFile url:" << url << dir.absoluteFilePath(filename) << filename; -+ selectUrl(QUrl(path)); -+} -+ -+QStringList KyNativeFileDialog::selectedFiles() const -+{ -+ QStringList list; -+ for (const QUrl &url : selectedUrls()) { -+ QUrl fileUrl(url); -+ pDebug << "selectedFiles fileUrl.....:" << fileUrl.toString() << fileUrl.path(); -+// if(!fileUrl.toString().startsWith("recent://") && !fileUrl.toString().startsWith("trash://")) -+// list << fileUrl.toLocalFile(); -+// else{ -+// list << Peony::FileUtils::getEncodedUri(fileUrl.toString()); -+// } -+ list << Peony::FileUtils::getEncodedUri(fileUrl.toString()); -+ } -+ pDebug << "selectedFiles...." << list; -+ return list; -+} -+ -+void KyNativeFileDialog::selectUrl(const QUrl &url) -+{ -+ return; -+ Q_D(KyNativeFileDialog); -+ pDebug << "selectUrlkkkkk........url.path:" << url.path() << isDir(url.path()); -+ if(d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory && isDir(url.path())) -+ setCurrentInputName(QFileInfo(url.path()).fileName()); -+} -+ -+QList<QUrl> KyNativeFileDialog::selectedUrls() const -+{ -+ pDebug << "selectedUrls........:"; -+ if (!getCurrentPage()) { -+ return QList<QUrl>(); -+ } -+ pDebug << "selectedUrls........:" << getCurrentPage()->getCurrentSelections(); -+ QStringList urlStrList = getCurrentPage()->getCurrentSelections(); -+ QList<QUrl> urls; -+ for (auto uri : urlStrList) { -+ pDebug << "selectedUrls urlDecode....:" << Peony::FileUtils::urlDecode(uri) << QUrl(Peony::FileUtils::urlDecode(uri)) << Peony::FileUtils::getTargetUri(uri); -+ if (uri.startsWith("trash://") || uri.startsWith("recent://") -+ || uri.startsWith("computer://") || uri.startsWith("favorite://") -+ || uri.startsWith("filesafe://")) -+ urls << Peony::FileUtils::getTargetUri(uri); -+ else{ -+// pDebug << "1123456789...." << Peony::FileUtils::getUriBaseName(uri) << Peony::FileUtils::getFileDisplayName(uri) << -+// Peony::FileUtils::toDisplayUris(QStringList() << uri) << Peony::FileUtils::getParentUri(uri) << Peony::FileUtils::getOriginalUri(uri); -+// pDebug << "4567545678...." << QUrl(Peony::FileUtils::urlDecode(uri)).path() << QUrl(Peony::FileUtils::urlDecode(uri)).toDisplayString() << -+// QUrl(Peony::FileUtils::urlDecode(uri)).toLocalFile(); -+// pDebug << "4567545678...." << QUrl(uri).path() << QUrl(uri).toDisplayString() << -+// QUrl(uri).toLocalFile(); -+ uri = uri.remove(0, 7); -+ pDebug << "target uri...." << Peony::FileUtils::getTargetUri(uri) << Peony::FileUtils::urlDecode(uri); -+ urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(uri));//Peony::FileUtils::urlDecode(uri); -+ } -+ pDebug << "selectedUrls uri test......." << uri << urls; -+ } -+ pDebug << "selectedUrls..." << urls; -+ return urls; -+} -+ -+QStringList qt_strip_filters(const QStringList &filters) -+{ -+ QStringList strippedFilters; -+ QRegExp r(QString::fromLatin1("^(.*)\\(([^()]*)\\)$")); -+ const int numFilters = filters.count(); -+ strippedFilters.reserve(numFilters); -+ for (int i = 0; i < numFilters; ++i) { -+ QString filterName; -+ int index = r.indexIn(filters[i]); -+ if (index >= 0) -+ filterName = r.cap(1); -+ strippedFilters.append(filterName.simplified()); -+ } -+ return strippedFilters; -+} -+ -+void KyNativeFileDialog::setComBoxItems(const QStringList &filters) -+{ -+ mKyFileDialogUi->m_fileTypeCombo->clear(); -+ mKyFileDialogUi->m_fileTypeCombo->addItems(filters); -+} -+ -+void KyNativeFileDialog::setNameFilters(const QStringList &filters) -+{ -+ Q_D(KyNativeFileDialog); -+ d->nameFilters = filters; -+ pDebug << "setNameFilters filters..... :" << filters; -+ m_nameFilterMap.clear(); -+ -+ QStringList l; -+ if (testOption(QFileDialog::HideNameFilterDetails) && (d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory)) { -+ l = qt_strip_filters(filters); -+ pDebug << "HideNameFilterDetails..." << l; -+ setComBoxItems(l); -+ } else { -+ l = filters; -+ setComBoxItems(filters); -+ } -+ for(int i = 0; i < filters.length(); i++) -+ m_nameFilterMap.insert(i, l[i]); -+ -+ int index = mKyFileDialogUi->m_fileTypeCombo->currentIndex(); -+ pDebug << "setNameFilters index.....:" << index; -+ selectNameFilterCurrentIndex(index); -+} -+ -+QStringList KyNativeFileDialog::nameFilters() const -+{ -+ Q_D( const KyNativeFileDialog); -+ return d->nameFilters; -+} -+ -+void KyNativeFileDialog::selectNameFilter(const QString &filter) -+{ -+ Q_D( const KyNativeFileDialog); -+ -+ pDebug << "selectNameFilter.,,,,,....." << filter; -+ QString key = filter; -+ int index = 0; -+ if(!mKyFileDialogUi->m_fileTypeCombo->findText(key)){ -+ if (testOption(QFileDialog::HideNameFilterDetails) && (d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory)) { -+ QStringList l = qt_strip_filters(QStringList(filter)); -+ pDebug << "llllllllllll" << l << l.length(); -+ if(l.length() > 0) -+ key = l.first(); -+ } else { -+ key = filter; -+ } -+ } -+ pDebug << "key:" << key; -+ if(!key.isEmpty()) -+ index = mKyFileDialogUi->m_fileTypeCombo->findText(key); -+ if(index < 0) -+ return; -+ pDebug << "index:" << index; -+ -+ selectNameFilterByIndex(index); -+ selectNameFilterCurrentIndex(index); -+ Q_EMIT filterSelected(filter); -+} -+ -+ -+QString KyNativeFileDialog::selectedNameFilter() const -+{ -+ Q_D(const KyNativeFileDialog); -+ const QComboBox *box = mKyFileDialogUi->m_fileTypeCombo; -+ return box ? d->nameFilters.value(box->currentIndex()) : QString(); -+} -+ -+void KyNativeFileDialog::selectNameFilterByIndex(int index) -+{ -+ Q_D(KyNativeFileDialog); -+ if (index < 0 || index >= d->nameFilters.length() || !getCurrentPage()) { -+ return; -+ } -+ mKyFileDialogUi->m_fileTypeCombo->setCurrentIndex(index); -+ QStringList nameFilters = d->nameFilters; -+ if (index == nameFilters.size()) { -+ nameFilters.append(d->nameFilters[d->nameFilters.length() - 1]); -+ setNameFilters(nameFilters); -+ } -+ QString nameFilter = nameFilters.at(index); -+ QStringList newNameFilters = QPlatformFileDialogHelper::cleanFilterList(nameFilter); -+ pDebug << "selectNameFilterByIndex00000000000"; -+ if (/*d->acceptMode == QFileDialog::AcceptSave &&*/ !newNameFilters.isEmpty() && (d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory)) { -+ QMimeDatabase db; -+ QString text = copyEditText();//mKyFileDialogUi->m_fileNameEdit->text(); -+ pDebug << "selectNameFilterByIndex text...." << text; -+ pDebug << "selectNameFilterByIndex newNameFilters...." << newNameFilters; -+ QStringList list = text.split("."); -+ pDebug << "selectNameFilterByIndex11111111 list" << list; -+ if(list.length() > 1) -+ { -+ if("." + list[list.length() - 1] != newNameFilters[0]) -+ { -+ int m = list[list.length() - 1].length(); -+ int n = text.length() - m; -+ pDebug << "mmmmmmmmmm..." << m << " nnnnnnnn.... " << n; -+ QString s = text.remove(n, m); -+ pDebug << "s000000....." << s; -+ QStringList filters = newNameFilters[0].split("."); -+ s = s + filters[filters.length() - 1]; -+ pDebug << "s11111111....." << s; -+ mKyFileDialogUi->m_fileNameEdit->setText(s); -+ } -+ }else{ -+ -+ } -+ } -+ if ((d->fileMode == QFileDialog::DirectoryOnly || d->fileMode == QFileDialog::Directory) && QStringList("/") != newNameFilters) { -+ newNameFilters = QStringList("/"); -+ } -+} -+ -+void KyNativeFileDialog::selectNameFilterCurrentIndex(int index) -+{ -+ Q_D(KyNativeFileDialog); -+ -+ if(index < 0 || index >= d->nameFilters.length()) -+ return; -+ QString nameFilter = d->nameFilters[index]; -+ pDebug << "selectNameFilterCurrentIndex nameFilter..." << nameFilter; -+ -+ if(nameFilter.isEmpty()) -+ return; -+ QStringList filterList = QPlatformFileDialogHelper::cleanFilterList(nameFilter); -+ -+ pDebug << "selectNameFilterCurrentIndex filterList:" << filterList; -+ QStringList mimeTypeFilterList; -+ -+ pDebug << "selectNameFilterCurrentIndex filemode.....:" << fileMode(); -+ if(fileMode() == QFileDialog::Directory || fileMode() == QFileDialog::DirectoryOnly) -+ { -+ getCurrentPage()->addFileDialogFiltersCondition(mimeTypeFilterList, filterList, QDir::Dirs, Qt::CaseInsensitive); -+ } -+ else -+ getCurrentPage()->addFileDialogFiltersCondition(mimeTypeFilterList, filterList, filter(), Qt::CaseInsensitive); -+ if(m_fileDialogHelper->isViewInitialFinished()){ -+ refreshContainerSort(); -+ refreshCompleter(); -+ } -+} -+ -+int KyNativeFileDialog::selectNameFilterIndex() const -+{ -+ const QComboBox *box = mKyFileDialogUi->m_fileTypeCombo; -+ return box ? box->currentIndex() : -1; -+} -+ -+QDir::Filters KyNativeFileDialog::filter() -+{ -+ Q_D(KyNativeFileDialog); -+ return d->filters; -+} -+ -+void KyNativeFileDialog::setFilter(QDir::Filters filters) -+{ -+ Q_D(KyNativeFileDialog); -+ d->filters = filters; -+} -+ -+void KyNativeFileDialog::setAcceptMode(QFileDialog::AcceptMode mode) -+{ -+ Q_D(KyNativeFileDialog); -+ d->acceptMode = mode; -+ updateAcceptButtonState(); -+ if (mode == QFileDialog::AcceptOpen) { -+ mKyFileDialogUi->m_fileNameLabel->setText(tr("Name"));//文件名 -+ mKyFileDialogUi->m_fileNameLabel->setAlignment(Qt::AlignCenter); -+ mKyFileDialogUi->m_newFolderButton->hide(); -+ mKyFileDialogUi->m_acceptButton->setText(tr("Open")); -+ mKyFileDialogUi->m_rejectButton->setText(tr("Cancel")); -+ connect(mKyFileDialogUi->m_fileNameEdit , &QLineEdit::textChanged, this, &KyNativeFileDialog::onCurrentInputNameChanged); -+ -+ } else { -+ mKyFileDialogUi->m_fileNameLabel->setText(tr("Save as")); -+ mKyFileDialogUi->m_fileNameLabel->setAlignment(Qt::AlignCenter); -+ mKyFileDialogUi->m_newFolderButton->setText(tr("New Folder")); -+ mKyFileDialogUi->m_newFolderButton->show(); -+ mKyFileDialogUi->m_acceptButton->setText(tr("Save")); -+ mKyFileDialogUi->m_rejectButton->setText(tr("Cancel")); -+ mKyFileDialogUi->m_acceptButton->setDefault(true); -+ connect(mKyFileDialogUi->m_fileNameEdit, &QLineEdit::textChanged, this, &KyNativeFileDialog::onCurrentInputNameChanged); -+ connect(mKyFileDialogUi->m_newFolderButton, &QPushButton::clicked, this, &KyNativeFileDialog::onNewFolder); -+ } -+} -+ -+QFileDialog::AcceptMode KyNativeFileDialog::acceptMode() const -+{ -+ Q_D(const KyNativeFileDialog); -+ return d->acceptMode; -+} -+ -+void KyNativeFileDialog::setFileMode(QFileDialog::FileMode mode) -+{ -+ Q_D(KyNativeFileDialog); -+// if (d->fileMode == QFileDialog::DirectoryOnly || d->fileMode == QFileDialog::Directory) { -+// mKyFileDialog->setNameFilters(QStringList()); -+// } -+ if(mode == QFileDialog::ExistingFile || mode == QFileDialog::AnyFile || -+ mode == QFileDialog::DirectoryOnly) -+ { -+ pDebug << "setFileMode000................" << mode; -+ -+ getCurrentPage()->setSelectionMode(QAbstractItemView::SingleSelection); -+ } -+ else -+ { -+ pDebug << "setFileMode00011111................" << mode; -+ -+ getCurrentPage()->setSelectionMode(QAbstractItemView::ExtendedSelection); -+ } -+ -+ if (mode == QFileDialog::DirectoryOnly || mode == QFileDialog::Directory) { -+ pDebug << "m_fileDialogHelper options setNameFilters...."; -+ m_fileDialogHelper->options()->setNameFilters(QStringList() << tr("Directories")); -+ setNameFilters(QStringList() << tr("Directories")); -+ mKyFileDialogUi->m_fileTypeCombo->clear(); -+ mKyFileDialogUi->m_fileTypeCombo->addItem(tr("Directories")); -+ mKyFileDialogUi->m_fileTypeCombo->setEnabled(false); -+ } -+ -+ d->fileMode = mode; -+ updateAcceptButtonState(); -+} -+ -+QFileDialog::FileMode KyNativeFileDialog::fileMode() -+{ -+ Q_D(KyNativeFileDialog); -+ return d->fileMode; -+} -+ -+void KyNativeFileDialog::setViewMode(ViewMode mode) -+{ -+ if(containerView()){ -+ pDebug << "setViewMode...." << mode << containerView()->viewId(); -+ if(mode == ViewMode::List && containerView()->viewId() != "List View") -+ { -+ this->getCurrentPage()->switchViewType("List View"); -+ } -+ else if(mode == ViewMode::Icon && containerView()->viewId() != "Icon View") -+ this->getCurrentPage()->switchViewType("Icon View"); -+ onSwitchView(); -+ } -+} -+ -+KyNativeFileDialog::ViewMode KyNativeFileDialog::viewMode() const -+{ -+// this->getCurrentPage()->switchViewType("List View"); -+ -+ if(containerView() && containerView()->viewId() == "List View") -+ return ViewMode::List; -+ return ViewMode::Icon; -+} -+ -+void KyNativeFileDialog::setLabelText(QFileDialog::DialogLabel label, const QString &text) -+{ -+ switch (static_cast<int>(label)) { -+ case QFileDialog::Accept: -+ mKyFileDialogUi->m_acceptButton->setText(text); -+ break; -+ case QFileDialog::Reject: -+ mKyFileDialogUi->m_rejectButton->setText(text); -+ default: -+ break; -+ } -+} -+ -+QString KyNativeFileDialog::labelText(QFileDialog::DialogLabel label) const -+{ -+ switch (static_cast<int>(label)) { -+ case QFileDialog::Accept: -+ return mKyFileDialogUi->m_acceptButton->text(); -+ case QFileDialog::Reject: -+ return mKyFileDialogUi->m_rejectButton->text(); -+ default: -+ break; -+ } -+ -+ return QString(); -+} -+ -+void KyNativeFileDialog::setOptions(QFileDialog::Options options) -+{ -+ Q_D(KyNativeFileDialog); -+ d->options = options; -+ if (options.testFlag(QFileDialog::ShowDirsOnly)) { -+ d->m_container->setFilterLabelConditions(selectedNameFilter()); -+ } -+} -+ -+void KyNativeFileDialog::setOption(QFileDialog::Option option, bool on) -+{ -+ Q_D(KyNativeFileDialog); -+ QFileDialog::Options options = d->options; -+ if (on) { -+ options |= option; -+ } else { -+ options &= ~option; -+ } -+ setOptions(options); -+} -+ -+bool KyNativeFileDialog::testOption(QFileDialog::Option option) const -+{ -+ Q_D(const KyNativeFileDialog); -+ return m_fileDialogHelper->options()->testOption(static_cast<QFileDialogOptions::FileDialogOption>(option)); -+} -+ -+QFileDialog::Options KyNativeFileDialog::options() const -+{ -+ Q_D(const KyNativeFileDialog); -+ return d->options; -+} -+ -+void KyNativeFileDialog::setCurrentInputName(const QString &name) -+{ -+ pDebug << "setCurrentInputName.........:" << name; -+ m_copyEditText = name; -+// mKyFileDialogUi->m_fileNameEdit->setText(name); -+ QMimeDatabase db; -+ const QString &suffix = db.suffixForFileName(name); -+ if (suffix.isEmpty()) { -+ mKyFileDialogUi->m_fileNameEdit->selectAll(); -+ } else { -+ mKyFileDialogUi->m_fileNameEdit->setSelection(0, name.length() - suffix.length() - 1); -+ } -+} -+ -+void KyNativeFileDialog::onAcceptButtonClicked() -+{ -+ Q_D(KyNativeFileDialog); -+ if (!getCurrentPage()) { -+ return; -+ } -+ pDebug << "onAcceptButtonClicked:" << d->acceptMode << d->fileMode; -+ pDebug << "onAcceptButtonClicked000 sfiles..........:" << getCurrentSelectionsList(); -+ pDebug << "onAcceptButtonClicked111 sfiles..........:" << selectedFiles(); -+ -+ if(d->fileMode == QFileDialog::ExistingFile || d->fileMode == QFileDialog::ExistingFiles || d->fileMode == QFileDialog::AnyFile) -+ { -+ QList<QString> sFiles = selectedFiles(); -+ for (int i = 0; i < sFiles.length(); ++i) { -+ if(isDir(sFiles[i])) -+ { -+ pDebug << "gotouri666666" << "file://" + sFiles[i]; -+ goToUri(sFiles[i], true); -+ return; -+ } -+ } -+ } -+ -+ if(copyEditText() != "") -+ { -+ lineEditTextChange(copyEditText()); -+ } -+ pDebug << "onAcceptButtonClicked directoryUrl:" << directoryUrl() << directory(); -+ QList<QString> sFiles = selectedFiles(); -+ pDebug << "onAcceptButtonClicked sfiles..........:" << sFiles; -+// pDebug << "getSelections........:" << containerView()->getSelections(); -+// pDebug << "uri:" << Peony::FileUtils::getTargetUri(getCurrentUri()); -+// pDebug << "uri1111111111:" << Peony::FileUtils::getParentUri(getCurrentUri()); -+ if(!m_searchMode) -+ { -+ pDebug << "onAcceptButtonClicked getCurrentUri........:" << getCurrentUri(); -+ if(!Peony::FileUtils::isFileExsit(getCurrentUri())){ -+ pDebug << directory().path() << "getCurrentUri directory not exists" << getCurrentUri(); -+ return; -+ } -+ } -+ else -+ { -+ foreach (QString str, sFiles) { -+ if(!Peony::FileUtils::isFileExsit(str))// -+ { -+ pDebug << "FileUtils path,,,:" << str << "not exists!"; -+ return; -+ } -+ } -+ } -+ -+ if (d->acceptMode == QFileDialog::AcceptSave) -+ { -+ if(!doSave(sFiles)) -+ { -+ pDebug << "da save faile!"; -+ return; -+ } -+ else -+ pDebug << "da save success!"; -+ -+ } -+ else if(d->acceptMode == QFileDialog::AcceptOpen) -+ { -+ if(!doOpen(sFiles)) -+ { -+ pDebug << "da open faile!"; -+ return; -+ } -+ else -+ pDebug << "da open success!"; -+ } -+ Q_EMIT m_fileDialogHelper->accept(); -+} -+ -+bool KyNativeFileDialog::saveMessageBox(QString name) -+{ -+ if(QMessageBox::warning(this, tr("Warning"), name + " " + tr("exist, are you sure replace?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) -+ { -+ return true; -+ } -+ return false; -+} -+ -+bool KyNativeFileDialog::checkSaveFileExsits(QString path) -+{ -+ bool exists = false; -+ if(fileMode() == QFileDialog::Directory || fileMode() == QFileDialog::DirectoryOnly) -+ { -+ QDir dir(path); -+ exists = dir.exists(); -+ } -+ else{ -+ QFile file(path); -+ exists = file.exists(); -+ } -+ pDebug << "checkSaveFileExsits path...." << path << exists; -+ return exists; -+} -+ -+bool KyNativeFileDialog::doSave(QStringList sFiles) -+{ -+ Q_D(KyNativeFileDialog); -+ -+ QString file_name = copyEditText(); -+ bool suffixCheck = false; -+ QStringList nameFilters = d->nameFilters; -+ for (QString nameFilterList : nameFilters) { -+ for (QString nameFilter : QPlatformFileDialogHelper::cleanFilterList(nameFilterList)) { -+ pDebug << "nameFilter:" << nameFilter << "nameFilterList:" << nameFilterList; -+ if(nameFilter == "*") -+ break; -+ QRegExp re(nameFilter, Qt::CaseInsensitive, QRegExp::Wildcard); -+ if (re.exactMatch(file_name)) { -+ pDebug << "file_name:" << file_name; -+ suffixCheck = true; -+ }; -+ } -+ if (suffixCheck) { -+ break; -+ } -+ } -+ pDebug << "suffixCheck:" << suffixCheck << "nameFilters:" << nameFilters; -+ if (!suffixCheck && !nameFilters.isEmpty()) { -+ QMimeDatabase mdb; -+ if(mKyFileDialogUi->m_fileTypeCombo->currentIndex() < 0 || -+ mKyFileDialogUi->m_fileTypeCombo->currentIndex() >= nameFilters.length()) -+ return false; -+ QString nameFilter = nameFilters[mKyFileDialogUi->m_fileTypeCombo->currentIndex()]; -+ QStringList newNameFilters = QPlatformFileDialogHelper::cleanFilterList(nameFilter); -+ if (!newNameFilters.isEmpty()) { -+ if(m_fileDialogHelper->options()->defaultSuffix() == ""){ -+ -+ for (const QString &filter : newNameFilters) { -+ QString suffix = mdb.suffixForFileName(filter); -+ pDebug << "suffix....." << suffix; -+ if (suffix.isEmpty()) { -+ QRegExp regExp(filter.mid(2), Qt::CaseInsensitive, QRegExp::Wildcard); -+ mdb.allMimeTypes().first().suffixes().first(); -+ for (QMimeType m : mdb.allMimeTypes()) { -+ for (QString suffixe : m.suffixes()) { -+ if (regExp.exactMatch(suffixe)) { -+ suffix = suffixe; -+ break; -+ } -+ } -+ if (!suffix.isEmpty()) { -+ break; -+ } -+ } -+ -+ } -+ -+ pDebug << "suffix:" << suffix; -+ if (!suffix.isEmpty()) { -+ QString oldName = file_name; -+ oldName.append('.' + suffix); -+ setCurrentInputName(oldName); -+ pDebug << "path///:" << directory().path() + "/" + oldName; -+ if(checkSaveFileExsits(directory().path() + "/" + oldName)){ -+ if(!saveMessageBox(oldName)) -+ return false; -+ break; -+ } -+ if(filter == newNameFilters[newNameFilters.length() - 1]) -+ { -+ QString oldName = file_name; -+ oldName.append('.' + mdb.suffixForFileName(newNameFilters[0])); -+ if(checkSaveFileExsits(directory().path() + "/" + oldName)){ -+ if(!saveMessageBox(oldName)) -+ return false; -+ break; -+ } -+ setCurrentInputName(oldName); -+ return true; -+ } -+ } -+ } -+ } -+ else{ -+ file_name.append('.' + m_fileDialogHelper->options()->defaultSuffix()); -+ if(checkSaveFileExsits(directory().path() + "/" + file_name)){ -+ if(!saveMessageBox(file_name)) -+ return false; -+ } -+ setCurrentInputName(file_name); -+ pDebug << "path///:" << directory().path() + "/" + file_name; -+ } -+ } -+ } -+ else if(suffixCheck) -+ { -+ pDebug << "suffixCheck.....:" << suffixCheck << "path///:" << directory().path() + "/" + file_name; -+ if(checkSaveFileExsits(directory().path() + "/" + file_name)){ -+ if(!saveMessageBox(file_name)) -+ return false; -+ } -+ } -+ return true; -+} -+ -+bool KyNativeFileDialog::doOpen(QStringList sFiles) -+{ -+ Q_D(KyNativeFileDialog); -+ -+// if(d->fileMode != QFileDialog::AnyFile && sFiles.length() == 0) -+// return false; -+// if(d->fileMode == QFileDialog::DirectoryOnly && sFiles.length() > 1) -+// return false; -+ pDebug << "doOpen fileMode:" << d->fileMode; -+ if(d->fileMode == QFileDialog::ExistingFile || d->fileMode == QFileDialog::ExistingFiles) -+ { -+ int isfiles = 0; -+ int isDirctory = 0; -+ foreach (QString files, sFiles) -+ { -+ if(isDir(files)) -+ { -+ isDirctory++; -+ } -+ else -+ isfiles++; -+ } -+ pDebug << "isfiles:" << isfiles << "isDirctory:" << isDirctory; -+ if((isfiles > 0 && isDirctory > 0) || (isDirctory > 1) || (isfiles <= 0 && isDirctory <= 0)) -+ return false; -+ else{ -+ pDebug << "open setSelected..."; -+ Q_EMIT filesSelected(selectedUrls()); -+ } -+ } -+ else if(d->fileMode == QFileDialog::AnyFile) -+ { -+ if(sFiles.length() > 0) -+ { -+ Q_EMIT filesSelected(selectedUrls()); -+ } -+ else if(copyEditText() != "") -+ { -+ QList<QUrl> urlList; -+ pDebug << "directory path:" << directory().path() << directoryUrl().path(); -+ urlList.append(QUrl(directory().path() + "/" + copyEditText())); -+ Q_EMIT filesSelected(urlList); -+ } -+ else -+ return false; -+ } -+ else if(d->fileMode == QFileDialog::DirectoryOnly || d->fileMode == QFileDialog::Directory) -+ { -+ if(copyEditText() != "") -+ { -+ if(sFiles.isEmpty() || (!sFiles.isEmpty() && !isDir(sFiles[0]))) -+ { -+ return false; -+ } -+ else -+ Q_EMIT filesSelected(selectedUrls()); -+ } -+ else -+ { -+ if (!getCurrentPage()) { -+ return false; -+ } -+ QList<QUrl> urls; -+ QString uri = getCurrentPage()->getCurrentUri(); -+ pDebug << "current uri........:" << uri; -+ -+ if (uri.startsWith("trash://") || uri.startsWith("recent://") -+ || uri.startsWith("computer://") || uri.startsWith("favorite://") -+ || uri.startsWith("filesafe://")) -+ { -+ urls << Peony::FileUtils::getTargetUri(uri); -+ } -+ else -+ { -+ urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(uri)); -+ } -+ if(containerView()) -+ pDebug << "select uri....:" << containerView()->getSelections(); -+ -+ Q_EMIT filesSelected(urls); -+ } -+ } -+ pDebug << "onAcceptButtonClicked selectedfiles:" << sFiles; -+ -+ return true; -+} -+ -+ -+void KyNativeFileDialog::onRejectButtonClicked() -+{ -+ Q_EMIT m_fileDialogHelper->reject(); -+} -+ -+bool KyNativeFileDialog::isDir(QString path) -+{ -+ auto fileSymLinkInfo = Peony::FileInfo::fromUri(path); -+ if(fileSymLinkInfo->isSymbolLink()) { -+ path = fileSymLinkInfo->symlinkTarget(); -+ } -+ else -+ path = Peony::FileUtils::urlEncode(path); -+ -+ QFile file(path); -+ QFileInfo fileInfo(file); -+ pDebug << "isDir path1111:" << path << fileInfo.isDir() << Peony::FileUtils::isFileDirectory(path) << Peony::FileUtils::getFileIsFolder(path);; -+ if(fileInfo.isDir()) -+ return true; -+ -+ pDebug << "isDir path2222222..:" << path << Peony::FileUtils::isFileDirectory(path) << Peony::FileUtils::getFileIsFolder(path); -+ return Peony::FileUtils::isFileDirectory(path);; -+} -+ -+void KyNativeFileDialog::goBack() -+{ -+ pDebug << "goback...." << getCurrentPage()->canGoBack(); -+ getCurrentPage()->goBack(); -+} -+ -+void KyNativeFileDialog::goForward() -+{ -+ pDebug << "goForward...." << getCurrentPage()->canGoForward(); -+ getCurrentPage()->goForward(); -+} -+ -+void KyNativeFileDialog::goToParent() -+{ -+ pDebug << "goToParent...." << getCurrentPage()->canCdUp(); -+ getCurrentPage()->cdUp(); -+ -+} -+ -+void KyNativeFileDialog::setHelper(KyFileDialogHelper* helepr) -+{ -+ if(helepr != nullptr) -+ m_fileDialogHelper = helepr; -+} -+ -+void KyNativeFileDialog::onSwitchView() -+{ -+ pDebug << "onSwitchView containerView:" << (containerView() == nullptr); -+ if(containerView() != nullptr) -+ { -+ QString viewId = containerView()->viewId(); -+ pDebug << "onSwitchView:" << viewId; -+ if (viewId == "List View") { -+ mKyFileDialogUi->m_modeButton->setIcon(QIcon::fromTheme("view-list-symbolic")); -+ this->mKyFileDialogUi->m_listModeAction->setChecked(true); -+ this->mKyFileDialogUi->m_iconModeAction->setChecked(false); -+ } else { -+ mKyFileDialogUi->m_modeButton->setIcon(QIcon::fromTheme("view-grid-symbolic")); -+ this->mKyFileDialogUi->m_listModeAction->setChecked(false); -+ this->mKyFileDialogUi->m_iconModeAction->setChecked(true); -+ } -+ } -+} -+ -+void KyNativeFileDialog::updateWindowState() -+{ -+ Q_D(KyNativeFileDialog); -+ pDebug << "updateWindowState.............." << getCurrentUri() << directory() << directoryUrl() << mKyFileDialogUi->m_fileNameEdit->text() << copyEditText(); -+ //mKyFileDialogUi->m_fileNameEdit->setText(""); -+ pDebug << "updateWindowState m_searchMode.............." <<m_searchMode << getCurrentUri() << m_isClearSearchKey; -+ -+// if(m_searchMode && !getCurrentUri().startsWith("search:///") && !m_isClearSearchKey) -+// { -+// m_isClearSearchKey = false; -+// searchButtonClicked(); -+// } -+ -+ refreshCompleter(); -+// const QStringList list = getCurrentPage()->getAllFileUris(); -+// pDebug << "getAllFileUris:" << list; -+// pDebug << "getselectUris:" << getCurrentSelectionsList(); -+ -+// m_CurrentPathAllFiles.clear(); -+ -+// foreach (QString str, list) { -+// str = Peony::FileUtils::urlDecode(str); -+// m_CurrentPathAllFiles.append(str.split("/").last()); -+// } -+ -+// pDebug << "updateWindowState 1111111111111"; -+// QStringListModel *model = (QStringListModel *)(m_completer->model()); -+// model->setStringList(m_CurrentPathAllFiles); -+// pDebug << "updateWindowState 2222222222222"; -+ -+ auto uri = getCurrentUri(); -+ pDebug << "updateWindowState uri updatePath....." << uri << getCurrentPage()->canGoBack(); -+ mKyFileDialogUi->m_pathbarWidget->updatePath(uri); -+ mKyFileDialogUi->m_backButton->setEnabled(getCurrentPage()->canGoBack()); -+ mKyFileDialogUi->m_forwardButton->setEnabled(getCurrentPage()->canGoForward()); -+ mKyFileDialogUi->m_toParentButton->setEnabled(getCurrentPage()->canCdUp()); -+ updateStatusBar(); -+ pDebug << "updateWindowState 44444"; -+ lineEditTextChange(copyEditText()); -+ pDebug << "updateWindowState 55555555555555555555" << uri; -+ -+} -+ -+QString KyNativeFileDialog::selectName() -+{ -+ QStringList selectList = getCurrentPage()->getCurrentSelections(); -+ QString nameStr = ""; -+ for(int i = 0; i < selectList.length(); i++) -+ { -+ pDebug << "selectName ....i:" << i << Peony::FileUtils::getFileDisplayName(selectList[i]) << isDir(selectList[i]); -+ if(acceptMode() == QFileDialog::AcceptSave && isDir(selectList[i])){ -+ continue; -+ } -+ if(acceptMode() == QFileDialog::AcceptOpen && (fileMode() == QFileDialog::ExistingFile || -+ fileMode() == QFileDialog::ExistingFiles || fileMode() == QFileDialog::AnyFile) && isDir(selectList[i])){ -+ continue; -+ } -+ QString str = Peony::FileUtils::getFileDisplayName(selectList[i]);//Peony::FileUtils::urlDecode(selectList[i]); -+ QString name = ""; -+ if(selectList.length() == 1) -+ name += str.split("/").last(); -+ else if(i < (selectList.length() -1)) -+ name += "\"" + str.split("/").last() + "\" "; -+ else -+ name += "\"" + str.split("/").last() + "\""; -+ nameStr += name; -+ } -+ -+ if(acceptMode() == QFileDialog::AcceptSave){ -+ for(int i = 0; i < selectList.length(); i++) { -+ if(isDir(selectList[i])) { -+ mKyFileDialogUi->m_acceptButton->setText(tr("Open")); -+ return nameStr; -+ } -+ } -+ mKyFileDialogUi->m_acceptButton->setText(tr("Save")); -+ } -+ return nameStr; -+} -+ -+void KyNativeFileDialog::updateStatusBar() -+{ -+ if(getCurrentSelectionsList().length() > 0) -+ { -+ foreach (QString str, getCurrentSelections()) { -+ pDebug << "updateStatusBar str" << str; -+ Q_EMIT currentChanged(QUrl(QUrl(str).path())); -+ } -+ } -+ updateAcceptButtonState(); -+ QString nameStr = selectName(); -+ if(nameStr != "" && !mKyFileDialogUi->m_fileNameEdit->hasFocus()) -+ mKyFileDialogUi->m_fileNameEdit->setText(nameStr); -+ pDebug << "updateStatusBar............" << mKyFileDialogUi->m_fileNameEdit->hasFocus() << getCurrentUri(); -+} -+ -+void KyNativeFileDialog::containerMenuRequest(const QPoint &pos) -+{ -+ pDebug << "menuRequest....00000" << pos << QCursor::pos() << (this->getCurrentPage() == nullptr); -+ if(this->getCurrentPage()) -+ pDebug << "menuRequest....1111111" << (this->getCurrentPage()->getView() == nullptr); -+ Peony::DirectoryViewMenu menu(this); -+ QStringList hideActionsName; -+ hideActionsName.append(OPEN_IN_NEW_WINDOW_ACTION); -+ hideActionsName.append(OPEN_IN_NEW_TAB_ACTION); -+ pDebug << "hideActionsName...." << hideActionsName; -+ menu.setHiddenActionsByObjectName(hideActionsName); -+ pDebug << "menuRequest....11111"; -+ menu.exec(QCursor::pos()); -+ m_uris_to_edit = menu.urisToEdit(); -+} -+ -+void KyNativeFileDialog::delayShow() -+{ -+ Q_D(const KyNativeFileDialog); -+ //QTBUG48248 借鉴kde plasma-integration里用的QTimer -+ pDebug << "delayShow start..........." << getCurrentUri(); -+ d->m_timer->start(); -+} -+ -+void KyNativeFileDialog::discardDelayedShow() -+{ -+ Q_D(const KyNativeFileDialog); -+ pDebug << "discardDelayedShow stop..........."; -+ d->m_timer->stop(); -+} -+ -+ -+void KyNativeFileDialog::resizeEvent(QResizeEvent *e) -+{ -+ pDebug << "resizeEvent....." << this->width() << mKyFileDialogUi->m_siderWidget->width() << mKyFileDialogUi->m_container->width(); -+ QDialog::resizeEvent(e); -+} -+ -+void KyNativeFileDialog::paintEvent(QPaintEvent *e) -+{ -+ KWindowEffects::enableBlurBehind(this->winId(), true); -+ -+ QColor color = this->palette().base().color(); -+ QColor colorBase = QColor(this->palette().base().color()); -+ -+ int R1 = color.red(); -+ int G1 = color.green(); -+ int B1 = color.blue(); -+ qreal a1 = 0.3; -+ -+ int R2 = colorBase.red(); -+ int G2 = colorBase.green(); -+ int B2 = colorBase.blue(); -+ qreal a2 = 1; -+ -+ qreal a = 1 - (1 - a1)*(1 - a2); -+ -+ qreal R = (a1*R1 + (1 - a1)*a2*R2) / a; -+ qreal G = (a1*G1 + (1 - a1)*a2*G2) / a; -+ qreal B = (a1*B1 + (1 - a1)*a2*B2) / a; -+ -+ colorBase.setRed(R); -+ colorBase.setGreen(G); -+ colorBase.setBlue(B); -+ auto sidebarOpacity = Peony::GlobalSettings::getInstance()->getValue(SIDEBAR_BG_OPACITY).toInt(); -+ -+ if(sidebarOpacity != 100) -+ mKyFileDialogUi->m_sider->viewport()->setAttribute(Qt::WA_TranslucentBackground); -+ -+ colorBase.setAlphaF(sidebarOpacity/100.0); -+ -+ QPainterPath sidebarPath; -+ //sidebarPath.setFillRule(Qt::FillRule::WindingFill); -+ QRect sideBarRect = QRect(mKyFileDialogUi->m_sider->mapTo(this, QPoint()), mKyFileDialogUi->m_sider->size()); -+ auto adjustedRect = sideBarRect.adjusted(0, 0, 0, 0); -+ int radius = 6; -+ if(this && this->property("normalRadius").isValid()) -+ radius = this->property("normalRadius").toInt(); -+ sidebarPath.addRoundedRect(adjustedRect, radius, radius); -+ -+// sidebarPath.addRect(adjustedRect.adjusted(0, 0, 0, -6)); -+// sidebarPath.addRect(adjustedRect.adjusted(6, 0, 0, 0)); -+ QPainter p(this); -+ QPainterPath contentPath; -+ -+ -+ if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -+ auto settings = UKUIStyleSettings::globalInstance(); -+ if(settings->keys().contains("windowRadius")) -+ radius = settings->get("windowRadius").toInt(); -+ else if(this && this->property("maxRadius").isValid()) -+ radius = this->property("maxRadius").toInt(); -+ } -+ else if(this && this->property("maxRadius").isValid()) -+ radius = this->property("maxRadius").toInt(); -+ -+// qDebug() << "KyNativeFileDialog radius........" << radius; -+ contentPath.addRoundedRect(this->rect(), radius, radius); -+ auto bgPath = contentPath - sidebarPath; -+ p.fillPath(bgPath, color); -+ p.fillPath(sidebarPath, colorBase); -+ -+ QPalette palette = mKyFileDialogUi->m_sider->viewport()->palette(); -+ -+ palette.setColor(QPalette::Base, colorBase);//window AlternateBase Base NoRole -+// pDebug << "viewport color:" << palette.color(QPalette::AlternateBase) << -+// palette.color(QPalette::Window) << palette.color(QPalette::Base) -+// << palette.color(QPalette::NoRole) << palette.color(QPalette::Shadow); -+ -+ mKyFileDialogUi->m_sider->viewport()->setPalette(palette); -+ -+ QPalette sPalette = mKyFileDialogUi->m_sider->verticalScrollBar()->palette(); -+ //sPalette.setColor(QPalette::Button, Qt::red);//window AlternateBase Base NoRole -+ sPalette.setColor(QPalette::Base, colorBase);//window AlternateBase Base NoRole -+ -+// pDebug << "scrollbar color:" << sPalette.color(QPalette::AlternateBase) << -+// sPalette.color(QPalette::Window) << sPalette.color(QPalette::Base) -+// << sPalette.color(QPalette::NoRole) << sPalette.color(QPalette::Shadow); -+ -+ mKyFileDialogUi->m_sider->verticalScrollBar()->setPalette(sPalette); -+ -+ -+// mKyFileDialogUi->m_sider->viewport()->setAttribute(Qt::WA_StyleSheet); -+// mKyFileDialogUi->m_sider->viewport()->setObjectName("viewport"); -+// mKyFileDialogUi->m_sider->viewport()->setStyleSheet("QWidget#viewport{background-color:red}"); -+// mKyFileDialogUi->m_sider->viewport()->setAttribute(Qt::WA_TranslucentBackground); -+ -+ // mKyFileDialogUi->m_sider->verticalScrollBar()->setObjectName("scrollbar"); -+ // mKyFileDialogUi->m_sider->verticalScrollBar()->setAttribute(Qt::WA_StyleSheet); -+ // mKyFileDialogUi->m_sider->verticalScrollBar()->setStyleSheet("QWidget#scrollbar{background-color:red}"); -+// m_effect->setTransParentPath(sidebarPath); -+// m_effect->setTransParentAreaBg(colorBase); -+ -+// //color.setAlphaF(0.5); -+// m_effect->setWindowBackground(color); -+ -+// m_effect->drawWindowShadowManually(&p, this->rect(), false); -+ QDialog::paintEvent(e); -+} -+ -+void KyNativeFileDialog::keyPressEvent(QKeyEvent *e) -+{ -+ if (e->key() == Qt::Key_Backspace) -+ { -+ auto uri = Peony::FileUtils::getParentUri(getCurrentUri()); -+ //qDebug() << "goUp Action" << getCurrentUri() << uri; -+ if (uri.isNull()) -+ return; -+ goToUri(uri, true, true); -+ } -+ -+ return QDialog::keyPressEvent(e); -+} -+ -+ -+Peony::DirectoryViewContainer *KyNativeFileDialog::getCurrentPage() -+{ -+ Q_D(const KyNativeFileDialog); -+ return d->m_container; -+} -+ -+Peony::DirectoryViewContainer *KyNativeFileDialog::getCurrentPage() const -+{ -+ Q_D(const KyNativeFileDialog); -+ return d->m_container; -+} -+ -+Peony::DirectoryViewWidget *KyNativeFileDialog::containerView() const -+{ -+ return getCurrentPage()->getView(); -+} -+ -+void KyNativeFileDialog::updateAcceptButtonState() -+{ -+ Q_D(const KyNativeFileDialog); -+ -+ pDebug << "updateAcceptButtonState......" << getCurrentUri() << d->acceptMode << d->fileMode; -+ if(d->acceptMode == QFileDialog::AcceptOpen) -+ { -+ if(d->fileMode != QFileDialog::Directory && d->fileMode != QFileDialog::DirectoryOnly) -+ { -+ mKyFileDialogUi->m_acceptButton->setEnabled(!(getCurrentSelectionsList().length() == 0)); -+ return; -+ bool isSelectFile = false; -+ if(copyEditText() == "") -+ mKyFileDialogUi->m_acceptButton->setEnabled(!(getCurrentSelectionsList().length() == 0)); -+ -+ if(copyEditText() != "") -+ { -+ QString text = copyEditText(); -+ QStringList list = text.split("\""); -+ pDebug << "list234565432............" << list; -+ for (int i = list.length() - 1; i >= 0; i--) { -+ if(list[i] == "" || list[i] == " ") -+ list.removeAt(i); -+ } -+ pDebug << "list testtttttt..............:" << list; -+ -+ foreach (QString str, list) { -+ if(str.length() > 0 && str[0] == "\"") -+ str = str.remove(0, 1); -+ if(str.length() > 0 && str[str.length() - 1] == "\"") -+ str = str.remove(str.length() - 1, 1); -+ QString parentPath = getCurrentUri(); -+ -+ if(parentPath.endsWith("/")) -+ parentPath.remove(parentPath.length() - 1, 1); -+ pDebug << "updateAcceptButtonState str0000:" << (parentPath + "/" + str);//parentPath.startsWith("recent://") -+ -+ if ((parentPath.startsWith("trash://") || parentPath.startsWith("recent://") -+ || parentPath.startsWith("computer://") || parentPath.startsWith("favorite://") -+ || parentPath.startsWith("filesafe://")) && getCurrentSelections().length() > 0) -+ { -+ QString targetUri = Peony::FileUtils::getTargetUri(getCurrentSelections()[0]); -+ QString targetPath = Peony::FileUtils::urlDecode(targetUri); -+ pDebug << "getTargetUri uri....." << targetUri; -+ pDebug << "uriiiiii...." << targetPath; -+ if(Peony::FileUtils::isFileExsit(targetPath)) -+ { -+ isSelectFile = true; -+ pDebug << "isSelectFileeeeeeee11111...." << isSelectFile; -+ break; -+ } -+ } -+ else -+ { -+ QString targetPath = Peony::FileUtils::urlDecode(parentPath + "/" + str); -+ pDebug << "targetPath11111 uri....." << targetPath << Peony::FileUtils::isFileExsit(targetPath); -+ -+ QString targetPath1 = Peony::FileUtils::urlEncode(parentPath + "/" + str); -+ pDebug << "targetPath123432 uri....." << targetPath1 << Peony::FileUtils::isFileExsit(targetPath1); -+ -+ if(Peony::FileUtils::isFileExsit(parentPath + "/" + str)) -+ isSelectFile = true; -+ pDebug << "isSelectFileeeeeee22222...." << isSelectFile; -+ break; -+ } -+ } -+ mKyFileDialogUi->m_acceptButton->setEnabled(isSelectFile); -+ return; -+ } -+ } -+ else -+ { -+ bool isSelectFile = true; -+ if(copyEditText() != "") -+ { -+ QString text = copyEditText(); -+ QStringList list = text.split("\""); -+ pDebug << "list0000............" << list; -+ for (int i = list.length() - 1; i >= 0; i--) { -+ if(list[i] == "" || list[i] == " ") -+ list.removeAt(i); -+ } -+ pDebug << "list1111..............:" << list; -+ -+ foreach (QString str, list) { -+ pDebug << "strrrrrrrrr....." << str; -+ if(str.length() > 0 && str[0] == "\"") -+ str = str.remove(0, 1); -+ if(str.length() > 0 && str[str.length() - 1] == "\"") -+ str = str.remove(str.length() - 1, 1); -+ QString parentPath = getCurrentUri(); -+ -+ pDebug << "parentPath......" << parentPath; -+ if(parentPath.endsWith("/")) -+ parentPath.remove(parentPath.length() - 1, 1); -+ pDebug << "updateAcceptButtonState str,,,,,,:" << (parentPath + "/" + str) << Peony::FileUtils::isFileExsit(parentPath + "/" + str); -+ -+ if(isDir(parentPath + "/" + str)) -+ { -+ pDebug << "isSelectFile000000...:" << isSelectFile << (parentPath + "/" + str); -+ isSelectFile = true; -+ break; -+ } -+ else -+ { -+ isSelectFile = false; -+ } -+ } -+ } -+ pDebug << "isSelectFile...." << isSelectFile; -+ mKyFileDialogUi->m_acceptButton->setEnabled(isSelectFile); -+ } -+ } -+ else -+ { -+ if(getCurrentSelectionsList().length() != 0){ -+ mKyFileDialogUi->m_acceptButton->setEnabled(true); -+ return; -+ } -+ if(copyEditText() == "") -+ mKyFileDialogUi->m_acceptButton->setEnabled(false); -+ else -+ mKyFileDialogUi->m_acceptButton->setEnabled(true); -+ pDebug << "isenabled......:" << mKyFileDialogUi->m_acceptButton->isEnabled(); -+ } -+ pDebug << "acceptButton isEnabled:" << mKyFileDialogUi->m_acceptButton->isEnabled(); -+} -+ -+void KyNativeFileDialog::onCurrentInputNameChanged() -+{ -+ Q_D(KyNativeFileDialog); -+ d->currentInputName = copyEditText(); -+ updateAcceptButtonState(); -+} -+ -+void KyNativeFileDialog::onNewFolder() -+{ -+ Peony::CreateTemplateOperation op(getCurrentUri(), Peony::CreateTemplateOperation::EmptyFolder); -+ op.run(); -+ return; -+ QDir dir = directory(); -+ pDebug << "onNewFolder getCurrentUri:" << getCurrentUri() << directory() << directoryUrl(); -+ QString path = ""; -+ if(directory().path() != "/") -+ path = directory().path(); -+ path += "/" + tr("NewFolder"); -+ if(!dir.exists(path)) -+ { -+ bool newFolder = dir.mkdir(path); -+ pDebug << "newFolder:" << newFolder; -+ } -+} -+ -+void KyNativeFileDialog::setSortType() -+{ -+ if(getCurrentPage()->getSortOrder() == Qt::AscendingOrder) -+ { -+ mKyFileDialogUi->m_sortButton->setIcon(QIcon::fromTheme("view-sort-descending-symbolic")); -+ mKyFileDialogUi->m_descending->setChecked(true); -+ mKyFileDialogUi->m_ascending->setChecked(false); -+ } -+ else -+ { -+ mKyFileDialogUi->m_sortButton->setIcon(QIcon::fromTheme("view-sort-ascending-symbolic")); -+ mKyFileDialogUi->m_ascending->setChecked(true); -+ mKyFileDialogUi->m_descending->setChecked(false); -+ } -+} -+ -+void KyNativeFileDialog::intiContainerSort() -+{ -+ auto settings = Peony::GlobalSettings::getInstance(); -+ auto sortType = settings->isExist(SORT_COLUMN)? settings->getValue(SORT_COLUMN).toInt() : 0; -+ auto sortOrder = settings->isExist(SORT_ORDER)? settings->getValue(SORT_ORDER).toInt() : 0; -+ pDebug << "sortType:" << sortType << sortOrder; -+ getCurrentPage()->setSortType(Peony::FileItemModel::ColumnType(sortType)); -+ getCurrentPage()->setSortOrder(Qt::SortOrder(sortOrder)); -+ setSortType(); -+ setShowHidden(getWindowShowHidden()); -+} -+ -+void KyNativeFileDialog::refreshContainerSort() -+{ -+ intiContainerSort(); -+ setUseDefaultNameSortOrder(getWindowUseDefaultNameSortOrder()); -+ setSortFolderFirst(getWindowSortFolderFirst()); -+} -+ -+void KyNativeFileDialog::refreshCompleter() -+{ -+ const QStringList list = getCurrentPage()->getAllFileUris(); -+ pDebug << "getAllFileUris:" << list; -+ pDebug << "getselectUris:" << getCurrentSelectionsList(); -+ -+ m_CurrentPathAllFiles.clear(); -+ -+ foreach (QString str, list) { -+ str = Peony::FileUtils::urlDecode(str); -+ m_CurrentPathAllFiles.append(str.split("/").last()); -+ } -+ -+ pDebug << "updateWindowState 1111111111111"; -+ QStringListModel *model = (QStringListModel *)(m_completer->model()); -+ model->setStringList(m_CurrentPathAllFiles); -+ pDebug << "updateWindowState 2222222222222"; -+} -+ -+void KyNativeFileDialog::searchButtonClicked() -+{ -+ m_searchMode = ! m_searchMode; -+ if(m_searchMode) -+ { -+ mKyFileDialogUi->m_fileNameEdit->setText(""); -+ mKyFileDialogUi->m_fileNameEdit->setReadOnly(true); -+ setCurrentSelections(QStringList()); -+ } -+ else -+ { -+ mKyFileDialogUi->m_fileNameEdit->setReadOnly(false); -+ } -+ pDebug << "searchButtonClicked searchButtonClicked" <<m_searchMode; -+ m_lastSearchPath = getCurrentUri(); -+ pDebug << "m_lastSearchPath....." << m_lastSearchPath << getCurrentUri() << getCurrentPage()->getCurrentUri(); -+ //Q_EMIT this->updateSearchRequest(m_search_mode); -+ setSearchMode(m_searchMode); -+} -+ -+void KyNativeFileDialog::setSearchMode(bool mode) -+{ -+ mKyFileDialogUi->m_searchBtn->setCheckable(mode); -+ mKyFileDialogUi->m_searchBtn->setChecked(mode); -+ mKyFileDialogUi->m_searchBtn->setDown(mode); -+ mKyFileDialogUi->m_pathbar->switchEditMode(mode); -+} -+ -+void KyNativeFileDialog::lineEditTextChange(QString text) -+{ -+ m_copyEditText = text; -+ if(m_searchMode) -+ return; -+ QString url; -+ if(directory().path() != "/") -+ url = QUrl(getCurrentUri()).path();//directoryUrl().toString();//getCurrentUri() -+ pDebug << "mKyFileDialogUi->m_fileNameEdit......:" << getCurrentUri() << url << text; -+ pDebug << "listview55555555555555.........." << m_CurrentPathAllFiles.length(); -+ QString parentPath = getCurrentUri(); -+ -+ if(parentPath.endsWith("/")) -+ parentPath.remove(parentPath.length() - 1, 1); -+ if(url.endsWith("/")) -+ url.remove(url.length() - 1, 1); -+ -+ pDebug << "parentPath:" << parentPath; -+ pDebug << "getCurrentSelections......:" << getCurrentSelectionsList() << text; -+ -+ if(!text.contains("\""))//输入框中只有1个文件 -+ { -+ if ((parentPath.startsWith("trash://") || parentPath.startsWith("recent://") -+ || parentPath.startsWith("computer://") || parentPath.startsWith("favorite://") -+ || parentPath.startsWith("filesafe://")) && getCurrentSelections().length() > 0) -+ { -+ for(int i = 0; i < getCurrentSelections().length(); i++) -+ { -+ QString targetUri = Peony::FileUtils::getTargetUri(getCurrentSelections()[i]); -+ Peony::FileInfo fileInfo(targetUri); -+ pDebug << "text:" << text << "displayName:" << fileInfo.displayName(); -+ if(fileInfo.displayName() == text){ -+ updateAcceptButtonState(); -+ return; -+ } -+ } -+ QString targetUri = Peony::FileUtils::getTargetUri(getCurrentSelections()[0]); -+ QString targetPath = Peony::FileUtils::urlDecode(targetUri); -+ pDebug << "getTargetUri uri....." << targetUri; -+ pDebug << "uriiiiii...." << targetPath; -+ if(Peony::FileUtils::isFileExsit(targetPath)) -+ { -+ QStringList selectList; -+ selectList.append(getCurrentSelections()[0]); -+ pDebug << "selectList...000000" << selectList; -+ setCurrentSelections(selectList); -+ updateAcceptButtonState(); -+ return; -+ } -+ } -+ else -+ { -+ pDebug << "Peony::FileUtils::isFileExsit123:" << (parentPath + "/" + text) << Peony::FileUtils::isFileExsit(parentPath + "/" + text); -+ // pDebug << "Peony::FileUtils::isFileExsit:" << (parentPath + "/" + text) << Peony::FileUtils::isFileExsit(parentPath + "/" + text); -+ for(int i = 0; i < getCurrentSelections().length(); i++) -+ { -+ if(Peony::FileUtils::getFileDisplayName(getCurrentSelections()[i]) == text){ -+ updateAcceptButtonState(); -+ return; -+ } -+ } -+ -+ if(Peony::FileUtils::isFileExsit(parentPath + "/" + text)){ -+ pDebug << "file exists...."; -+ //m_container选择指定文件 -+ QStringList selectList; -+ selectList.append(parentPath + "/" + text); -+ pDebug << "selectList...1111111" << selectList; -+ setCurrentSelections(selectList); -+ if(containerView()) -+ pDebug << "selectList...22222222222" << containerView()->getSelections(); -+ updateAcceptButtonState(); -+ return; -+ } -+ else -+ { -+ QString path = parentPath + "/" + text; -+ pDebug << path << "not exists!"; -+ setCurrentSelections(QStringList()); -+ updateAcceptButtonState(); -+ return; -+ } -+ } -+ } -+ else -+ { -+ if ((parentPath.startsWith("trash://") || parentPath.startsWith("recent://") -+ || parentPath.startsWith("computer://") || parentPath.startsWith("favorite://") -+ || parentPath.startsWith("filesafe://"))) -+ { -+ QStringList list = text.split("\""); -+ pDebug << "listttt1111............" << list; -+ for (int i = list.length() - 1; i >= 0; i--) { -+ if(list[i] == "" || list[i] == " ") -+ list.removeAt(i); -+ } -+ QStringList displayNameList; -+ for(int i = 0; i < getCurrentSelections().length(); i++) -+ { -+ QString targetUri = Peony::FileUtils::getTargetUri(getCurrentSelections()[i]); -+ Peony::FileInfo fileInfo(targetUri); -+ pDebug << "text:" << text << "displayName:" << fileInfo.displayName(); -+ displayNameList.append(fileInfo.displayName()); -+ } -+ pDebug << "list:" << list; -+ pDebug << "displayNameList:" << displayNameList; -+ for(int i = 0; i < list.length(); i++){ -+ if(!displayNameList.contains(list[i])) -+ break; -+ else if(i == list.length() - 1){ -+ updateAcceptButtonState(); -+ return; -+ } -+ } -+ -+ QStringList selectList; -+ foreach (QString str, getCurrentSelections()) -+ { -+ QString targetUri = Peony::FileUtils::getTargetUri(str); -+ QString targetPath = Peony::FileUtils::urlDecode(targetUri); -+ pDebug << "getTargetUri uri0000....." << targetUri; -+ pDebug << "uriiiiii00000...." << targetPath; -+ if(Peony::FileUtils::isFileExsit(targetPath)) -+ { -+ selectList.append(str); -+ } -+ } -+ pDebug << "selectList...222222222" << selectList; -+ setCurrentSelections(selectList); -+ updateAcceptButtonState(); -+ return; -+ } -+ else{ -+ QStringList selectList; -+ QStringList list = text.split("\""); -+ pDebug << "listttt1111............" << list; -+ for (int i = list.length() - 1; i >= 0; i--) { -+ if(list[i] == "" || list[i] == " ") -+ list.removeAt(i); -+ } -+ pDebug << "listtttt22222222..............:" << list; -+ -+ QStringList displayNameList; -+ for(int i = 0; i < getCurrentSelections().length(); i++) -+ { -+ QString displayName = Peony::FileUtils::getFileDisplayName(getCurrentSelections()[i]); -+ displayNameList.append(displayName); -+ } -+ pDebug << "list:" << list; -+ pDebug << "displayNameList:" << displayNameList; -+ for(int i = 0; i < list.length(); i++){ -+ if(!displayNameList.contains(list[i])) -+ break; -+ else if(i == list.length() - 1){ -+ updateAcceptButtonState(); -+ return; -+ } -+ } -+ -+ pDebug << "listtttttt3333333........................."; -+ foreach (QString str, list) { -+ if(str.length() > 0 && str[0] == "\"") -+ str = str.remove(0, 1); -+ if(str.length() > 0 && str[str.length() - 1] == "\"") -+ str = str.remove(str.length() - 1, 1); -+ pDebug << "str:" << str; -+ QFile file(url + "/" + str); -+ -+ if(Peony::FileUtils::isFileExsit(parentPath + "/" + str))//(file.exists()) -+ selectList.append(parentPath + "/" + str); -+ } -+ pDebug << "selectList...333333" << selectList; -+ setCurrentSelections(selectList); -+ updateAcceptButtonState(); -+ } -+ return; -+ } -+} -+ -+void KyNativeFileDialog::setShortCuts() -+{ -+ if (!m_shortcutsSet) { -+ //stop loading action -+ QAction *stopLoadingAction = new QAction(this); -+ stopLoadingAction->setShortcut(QKeySequence(Qt::Key_Escape)); -+ addAction(stopLoadingAction); -+ connect(stopLoadingAction, &QAction::triggered, this, &KyNativeFileDialog::forceStopLoading); -+ -+ //show hidden action -+ QAction *showHiddenAction = new QAction(this); -+ showHiddenAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_H)); -+ showHiddenAction->setCheckable(true); -+ addAction(showHiddenAction); -+ connect(showHiddenAction, &QAction::triggered, this, [=]() { -+ //qDebug() << "show hidden"; -+ this->setShowHidden(!getWindowShowHidden()); -+ }); -+ -+ auto undoAction = new QAction(QIcon::fromTheme("edit-undo-symbolic"), tr("Undo"), this); -+ undoAction->setShortcut(QKeySequence::Undo); -+ addAction(undoAction); -+ connect(undoAction, &QAction::triggered, [=]() { -+ Peony::FileOperationManager::getInstance()->undo(); -+ }); -+ -+ auto redoAction = new QAction(QIcon::fromTheme("edit-redo-symbolic"), tr("Redo"), this); -+ redoAction->setShortcut(QKeySequence::Redo); -+ addAction(redoAction); -+ connect(redoAction, &QAction::triggered, [=]() { -+ Peony::FileOperationManager::getInstance()->redo(); -+ }); -+ -+ //add CTRL+D for delete operation -+ auto trashAction = new QAction(this); -+ trashAction->setShortcuts(QList<QKeySequence>()<<Qt::Key_Delete<<QKeySequence(Qt::CTRL + Qt::Key_D)); -+ connect(trashAction, &QAction::triggered, [=]() { -+ auto currentUri = getCurrentUri(); -+ if (currentUri.startsWith("search://") -+ || currentUri.startsWith("favorite://") || currentUri == "filesafe:///" -+ || currentUri.startsWith("kmre://") || currentUri.startsWith("kydroid://")) -+ return; -+ -+ auto uris = this->getCurrentSelections(); -+ -+ QString desktopPath = "file://" + QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); -+ QString desktopUri = Peony::FileUtils::getEncodedUri(desktopPath); -+ QString homeUri = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); -+ QString documentPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)); -+ QString musicPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MusicLocation)); -+ QString moviesPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MoviesLocation)); -+ QString picturespPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::PicturesLocation)); -+ QString downloadPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)); -+ if (!uris.isEmpty() && !uris.contains(desktopUri) && !uris.contains(homeUri) && !uris.contains(documentPath) && !uris.contains(musicPath) -+ && !uris.contains(moviesPath) && !uris.contains(picturespPath) && !uris.contains(downloadPath)) { -+ bool isTrash = this->getCurrentUri() == "trash:///"; -+ if (!isTrash) { -+ Peony::FileOperationUtils::trash(uris, true); -+ } else { -+ Peony::FileOperationUtils::executeRemoveActionWithDialog(uris); -+ } -+ } -+ }); -+ addAction(trashAction); -+ -+ auto deleteAction = new QAction(this); -+ deleteAction->setShortcuts(QList<QKeySequence>()<<QKeySequence(Qt::SHIFT + Qt::Key_Delete)); -+ addAction(deleteAction); -+ connect(deleteAction, &QAction::triggered, [=]() { -+ auto currentUri = getCurrentUri(); -+ if (currentUri.startsWith("search://") || currentUri == "filesafe:///" -+ || currentUri.startsWith("kmre://") || currentUri.startsWith("kydroid://")) -+ return; -+ -+ auto uris = this->getCurrentSelections(); -+ -+ QString desktopPath = "file://" + QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); -+ QString documentPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)); -+ QString musicPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MusicLocation)); -+ QString moviesPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MoviesLocation)); -+ QString picturespPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::PicturesLocation)); -+ QString downloadPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)); -+ QString desktopUri = Peony::FileUtils::getEncodedUri(desktopPath); -+ QString homeUri = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); -+ if (! uris.contains(desktopUri) && !uris.contains(homeUri) && !uris.contains(documentPath) && !uris.contains(musicPath) -+ && !uris.contains(moviesPath) && !uris.contains(picturespPath) && !uris.contains(downloadPath)) { -+ Peony::FileOperationUtils::executeRemoveActionWithDialog(uris); -+ } -+ }); -+ -+ auto searchAction = new QAction(this); -+ searchAction->setShortcuts(QList<QKeySequence>()<<QKeySequence(Qt::CTRL + Qt::Key_F)); -+ connect(searchAction, &QAction::triggered, this, [=]() { -+ searchButtonClicked(); -+ }); -+ addAction(searchAction); -+ -+ //F4 or Alt+D, change to address -+ auto locationAction = new QAction(this); -+ locationAction->setShortcuts(QList<QKeySequence>()<<Qt::Key_F4<<QKeySequence(Qt::ALT + Qt::Key_D)); -+ connect(locationAction, &QAction::triggered, this, [=]() { -+ mKyFileDialogUi->m_pathbar->startEdit(); -+ }); -+ addAction(locationAction); -+ -+ auto closeWindowAction = new QAction(this); -+ closeWindowAction->setShortcuts(QList<QKeySequence>()<<QKeySequence(Qt::ALT + Qt::Key_F4)); -+ connect(closeWindowAction, &QAction::triggered, this, [=]() { -+ this->close(); -+ }); -+ addAction(closeWindowAction); -+ -+ auto maxAction = new QAction(this); -+ maxAction->setShortcut(QKeySequence(Qt::Key_F11)); -+ connect(maxAction, &QAction::triggered, this, [=]() { -+ if(!m_istableModel){ -+ //showFullScreen has some issue, change to showMaximized, fix #20043 -+ mKyFileDialogUi->m_pathbar->cancelEdit(); -+ if (!this->isMaximized()) { -+ this->showMaximized(); -+ } else { -+ this->showNormal(); -+ } -+ updateMaximizeState(); -+ } -+ }); -+ addAction(maxAction); -+ -+ auto refreshWindowAction = new QAction(this); -+ refreshWindowAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_R)); -+ connect(refreshWindowAction, &QAction::triggered, this, [=]() { -+ this->refresh(); -+ }); -+ addAction(refreshWindowAction); -+ -+ auto listToIconViewAction = new QAction(this); -+ listToIconViewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_1)); -+ connect(listToIconViewAction, &QAction::triggered, this, [=]() { -+ this->beginSwitchView(QString("Icon View")); -+ }); -+ addAction(listToIconViewAction); -+ -+ auto iconToListViewAction = new QAction(this); -+ iconToListViewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_2)); -+ connect(iconToListViewAction, &QAction::triggered, this, [=]() { -+ this->beginSwitchView(QString("List View")); -+ }); -+ addAction(iconToListViewAction); -+ -+ auto reverseSelectAction = new QAction(this); -+ reverseSelectAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_L)); -+ connect(reverseSelectAction, &QAction::triggered, this, [=]() { -+ this->getCurrentPage()->getView()->invertSelections(); -+ }); -+ addAction(reverseSelectAction); -+ -+ auto refreshAction = new QAction(this); -+ refreshAction->setShortcut(Qt::Key_F5); -+ connect(refreshAction, &QAction::triggered, this, [=]() { -+ this->refresh(); -+ }); -+ addAction(refreshAction); -+ -+ //select all files in view, fix bug#115442 -+ auto *selectAllAction = new QAction(this); -+ selectAllAction->setShortcut(QKeySequence::SelectAll); -+ connect(selectAllAction, &QAction::triggered, this, [=]() { -+ if (this->getCurrentPage()->getView()) -+ { -+ /// note: 通过getAllFileUris设置的全选效率过低,如果增加接口则会导致二进制兼容性问题 -+ /// 所以这里使用现有的反选接口实现高效的全选,这个方法在mainwindow中也有用到 -+ //auto allFiles = this->getCurrentPage()->getView()->getAllFileUris(); -+ //this->getCurrentPage()->getView()->setSelections(allFiles); -+ setCurrentSelections(QStringList()); -+ this->getCurrentPage()->getView()->invertSelections(); -+ } -+ }); -+ addAction(selectAllAction); -+ -+ //file operations -+ auto *copyAction = new QAction(this); -+ copyAction->setShortcut(QKeySequence::Copy); -+ connect(copyAction, &QAction::triggered, [=]() { -+ bool is_recent = false; -+ if (!this->getCurrentSelections().isEmpty()) -+ { -+ // if (this->getCurrentSelections().first().startsWith("trash://", Qt::CaseInsensitive)) { -+ // return ; -+ // } -+ if (this->getCurrentSelections().first().startsWith("recent://", Qt::CaseInsensitive)) { -+ is_recent = true; -+ } -+ if (this->getCurrentSelections().first().startsWith("favorite://", Qt::CaseInsensitive)) { -+ return ; -+ } -+ } -+ else -+ return; -+ -+ QStringList selections; -+ if (is_recent) -+ { -+ for(auto uri:this->getCurrentSelections()) -+ { -+ uri = Peony::FileUtils::getTargetUri(uri); -+ selections << uri; -+ } -+ } -+ else{ -+ selections = this->getCurrentSelections(); -+ } -+ -+ Peony::ClipboardUtils::setClipboardFiles(selections, false); -+ }); -+ addAction(copyAction); -+ -+ auto *pasteAction = new QAction(this); -+ pasteAction->setShortcut(QKeySequence::Paste); -+ connect(pasteAction, &QAction::triggered, [=]() { -+ auto currentUri = getCurrentUri(); -+ if (currentUri.startsWith("trash://") || currentUri.startsWith("recent://") -+ || currentUri.startsWith("computer://") || currentUri.startsWith("favorite://") -+ || currentUri.startsWith("search://") || currentUri == "filesafe:///") -+ { -+ /* Add hint information,link to bug#107640. */ -+ QMessageBox::warning(this, tr("warn"), tr("This operation is not supported.")); -+ return; -+ } -+ if (Peony::ClipboardUtils::isClipboardHasFiles()) { -+ //FIXME: how about duplicated copy? -+ //FIXME: how to deal with a failed move? -+ auto op = Peony::ClipboardUtils::pasteClipboardFiles(this->getCurrentUri()); -+ if (op) { -+ connect(op, &Peony::FileOperation::operationFinished, this, [=](){ -+ auto opInfo = op->getOperationInfo(); -+ auto targetUirs = opInfo->dests(); -+ setCurrentSelectionUris(targetUirs); -+ }, Qt::BlockingQueuedConnection); -+ } -+ else{ -+ //fix paste file in old path not update issue, link to bug#71627 -+ this->getCurrentPage()->getView()->repaintView(); -+ } -+ } -+ }); -+ addAction(pasteAction); -+ -+ auto *cutAction = new QAction(this); -+ cutAction->setShortcut(QKeySequence::Cut); -+ connect(cutAction, &QAction::triggered, [=]() { -+ if (!this->getCurrentSelections().isEmpty()) { -+ // if (this->getCurrentSelections().first().startsWith("trash://", Qt::CaseInsensitive)) { -+ // return ; -+ // } -+ if (this->getCurrentSelections().first().startsWith("recent://", Qt::CaseInsensitive)) { -+ return ; -+ } -+ if (this->getCurrentSelections().first().startsWith("favorite://", Qt::CaseInsensitive)) { -+ return ; -+ } -+ -+ auto currentUri = getCurrentUri(); -+ if (currentUri.startsWith("search://")) -+ return; -+ -+ QString desktopPath = "file://" + QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); -+ QString desktopUri = Peony::FileUtils::getEncodedUri(desktopPath); -+ QString homeUri = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); -+ if (! this->getCurrentSelections().contains(desktopUri) && ! this->getCurrentSelections().contains(homeUri)) -+ { -+ Peony::ClipboardUtils::setClipboardFiles(this->getCurrentSelections(), true); -+ this->getCurrentPage()->getView()->repaintView(); -+ } -+ } -+ }); -+ addAction(cutAction); -+ -+ m_shortcutsSet = true; -+ } -+} -+ -+void KyNativeFileDialog::initialViewId() -+{ -+ if(!containerView()) -+ return; -+ int zoomLevel = containerView()->currentZoomLevel(); -+ -+ auto viewId = Peony::DirectoryViewFactoryManager2::getInstance()->getDefaultViewId(zoomLevel, getCurrentUri()); -+ pDebug << "initialViewId viewId:" << viewId; -+ beginSwitchView(viewId); -+} -+ -+QString KyNativeFileDialog::copyEditText() -+{ -+ return m_copyEditText; -+} -+ -+void KyNativeFileDialog::isTableModel() -+{ -+ QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); -+ if(interFace->isValid()){ -+ connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(updateTableModel(bool))); -+ } -+ QDBusMessage message = QDBusMessage::createMethodCall(SERVICE, PATH, INTERFACE, "get_current_tabletmode"); -+ QDBusMessage ret = QDBusConnection::sessionBus().call(message); -+ if (ret.type() != QDBusMessage::ReplyMessage) -+ { -+ //从返回参数获取返回值 -+ pDebug << "complex type failed!"; -+ updateTableModel(false); -+ } -+ else -+ { -+ updateTableModel(ret.arguments()[0].value<bool>()); -+ } -+} -+ -+void KyNativeFileDialog::updateTableModel(bool tableModel) -+{ -+ m_istableModel = tableModel; -+ mKyFileDialogUi->m_maximizeAndRestore->setVisible(!tableModel); -+} -+ -+void KyNativeFileDialog::updateSearchProgressBar() -+{ -+// if(m_needSearch){ -+// pDebug << "updateSearchProgressBar...." << m_searchMode << m_needSearch; -+// Q_EMIT mKyFileDialogUi->m_pathbar->updateSearchProgress(false); -+// QCursor c; -+// c.setShape(Qt::ArrowCursor); -+// this->setCursor(c); -+// getCurrentPage()->getView()->setCursor(c); -+// mKyFileDialogUi->m_sider->setCursor(c); -+// } -+} -+ -+void KyNativeFileDialog::installTranslate(QString locale) -+{ -+ m_translator = new QTranslator(this); -+ pDebug << "local: " << locale; -+ if (m_translator->load("/usr/share/qt5-ukui-platformtheme/qt5-ukui-filedialog_" + locale)) { -+ pDebug << "Load translations file success!"; -+ QApplication::installTranslator(m_translator); -+ } else { -+ pDebug << "Load translations file failed!"; -+ } -+ -+ m_translator0 = new QTranslator(this); -+ pDebug << "local: " << locale; -+ if (m_translator0->load("/usr/share/qt5-ukui-platformtheme/qt5-ukui-platformtheme_" + locale)) { -+ pDebug << "Load translations file success!"; -+ QApplication::installTranslator(m_translator0); -+ } else { -+ pDebug << "Load translations file failed!"; -+ } -+ -+ m_translator1 = new QTranslator(this); -+ pDebug << "QTranslator t load" << m_translator1->load("/usr/share/libpeony-qt/libpeony-qt_" + locale); -+ QApplication::installTranslator(m_translator1); -+ m_translator2 = new QTranslator(this); -+ pDebug << "QTranslator t2 load" << m_translator2->load("/usr/share/peony-qt-desktop/peony-qt-desktop_" + locale); -+ QApplication::installTranslator(m_translator2); -+ m_translator3 = new QTranslator(this); -+ pDebug << "QTranslator t3 load" << m_translator3->load("/usr/share/qt5/translations/qt_" + locale); -+ QApplication::installTranslator(m_translator3); -+} -+ -+KyFileDialogHelper::KyFileDialogHelper() : QPlatformFileDialogHelper(), mKyFileDialog(new KyNativeFileDialog) -+{ -+ mKyFileDialog->setHelper(this); -+ -+ pDebug << "KyFileDialogHelper........." << (options() == nullptr); -+ connect(mKyFileDialog, &KyNativeFileDialog::currentChanged, this, &KyFileDialogHelper::currentChanged); -+ connect(mKyFileDialog, &KyNativeFileDialog::directoryEntered, this, &KyFileDialogHelper::directoryEntered); -+ //QFileDialog::accept()里_q_emitUrlSelected会发送fileSelected信号 这里会导致发两次fileSelected的信号 -+ // connect(mKyFileDialog, &KyNativeFileDialog::fileSelected, this, &KyFileDialogHelper::fileSelected); -+ //QFileDialog::accept()里_q_emitUrlsSelected会发送filesSelected信号 这里会导致发两次filesSelected的信号 -+ // connect(mKyFileDialog, &KyNativeFileDialog::filesSelected, this, &KyFileDialogHelper::filesSelected); -+ connect(mKyFileDialog, &KyNativeFileDialog::filterSelected, this, &KyFileDialogHelper::filterSelected); -+ connect(mKyFileDialog, &QDialog::accepted, this, &KyFileDialogHelper::accept); -+ connect(mKyFileDialog, &QDialog::rejected, this, &KyFileDialogHelper::reject); -+ -+} -+ -+KyFileDialogHelper::~KyFileDialogHelper() -+{ -+ pDebug << "~~~~~~~~KyFileDialogHelper"; -+ ///不可以析构 普通函数里QFileDialog::show不显示和QFiledialog->show()会显示 析构的话BT下载工具打开不显示界面 -+// if(mKyFileDialog){ -+// mKyFileDialog->deleteLater(); -+// mKyFileDialog = nullptr; -+// } -+ -+} -+ -+void KyFileDialogHelper::exec() -+{ -+ mKyFileDialog->discardDelayedShow(); -+ pDebug << "KyFileDialogHelper::exec.............."; -+ mKyFileDialog->exec(); -+} -+ -+void KyFileDialogHelper::hide() -+{ -+ mKyFileDialog->discardDelayedShow(); -+ mKyFileDialog->hide(); -+} -+ -+bool KyFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) -+{ -+ if(m_isShow){ -+ mKyFileDialog->delayShow(); -+ return true; -+ } -+ pDebug << "show........." << (options() == nullptr); -+ pDebug << "option initialselectfiles..." << options()->initiallySelectedFiles(); -+ pDebug << "option initialDirectory..." << options()->initialDirectory(); -+ -+ m_initialDirectory = options()->initialDirectory(); -+ m_initialSelectFiles = options()->initiallySelectedFiles(); -+ -+ if(parent != nullptr) -+ pDebug << "window....:" << parent->x() << parent->y() << parent->width() << parent->height(); -+ else -+ pDebug << "window is nullptr...."; -+ initDialog(); -+ -+ mKyFileDialog->setAttribute(Qt::WA_NativeWindow, true); -+ mKyFileDialog->setWindowFlags(windowFlags); -+ mKyFileDialog->setWindowModality(windowModality); -+ -+ if(parent){ -+ if(QWidget *p = mKyFileDialog->find(parent->winId())){ -+ for(QFileDialog *fd : p->findChildren<QFileDialog *>()){ -+ if(options()->windowTitle() == fd->windowTitle()){ -+ pDebug << "filedoalog set parent...." << fd->geometry(); -+ if(mKyFileDialog->parentWidget() != fd){ -+ ///设置parent是QFiledialog 之前设置的是p 会有问题 showevent里有时候会找不到对应name的 -+ mKyFileDialog->setParent(fd, windowFlags); -+ } -+ pDebug << "filediaog directory000...." << fd->directory(); -+ pDebug << "filedialog select000....." << fd->selectedFiles(); -+ pDebug << "filedialog selectUrls000....." << fd->selectedUrls(); -+ pDebug << "filedialog directoryUrl000....." << fd->directoryUrl(); -+ if(m_initialSelectFiles.length() > 0 && QFile::exists(m_initialSelectFiles.value(0).path())){ -+ QDir dir(m_initialSelectFiles.value(0).path()); -+ dir.cdUp(); -+ pDebug <<"dirrrrr..." << dir.path(); -+ mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(dir.absolutePath()).toString()); -+ mKyFileDialog->setDirectory(dir); -+ } else if(fd->directory().exists()){ -+ mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(fd->directory().absolutePath()).toString()); -+ -+ mKyFileDialog->setDirectory(fd->directory()); -+ } -+// if(fd->directoryUrl().) -+ -+ // for(QPushButton *btn : mKyFileDialog->findChildren<QPushButton*>()) -+ // { -+ // if(btn->objectName() == "acceptButton") -+ // { -+ // pDebug << "mydialog find object acceptButton"; -+ // } -+ // } -+ break; -+ } -+ } -+ } -+ } -+ else{ -+ for(QWidget *widget : qApp->allWidgets()){ -+ if(QFileDialog *fd = qobject_cast<QFileDialog *>(widget)){ -+ if(options()->windowTitle() == fd->windowTitle()){ -+ pDebug << "parent us null filedoalog set parent...." << fd->geometry() << options()->windowTitle() << fd->objectName(); -+ if(mKyFileDialog->parentWidget() != fd){ -+ mKyFileDialog->setParent(fd, windowFlags); -+ } -+ pDebug << "parent us null filedoalog directory...." << fd->directory(); -+ pDebug << "parent us null filedoalog selectedFiles...." << m_initialSelectFiles.value(0).path() << QFile::exists(m_initialSelectFiles.value(0).path()); -+ if(m_initialSelectFiles.length() > 0 && QFile::exists(m_initialSelectFiles.value(0).path())){ -+ QDir dir(m_initialSelectFiles.value(0).path()); -+ dir.cdUp(); -+ pDebug <<"dirrrrr..." << dir.path(); -+ mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(dir.absolutePath()).toString()); -+ -+ mKyFileDialog->setDirectory(dir); -+ } -+ else if(fd->directory().exists()){ -+ mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(fd->directory().absolutePath()).toString()); -+ -+ mKyFileDialog->setDirectory(fd->directory()); -+ } -+ break; -+ } -+ } -+ } -+ } -+ -+ if(options()->viewMode() == QFileDialog::List && mKyFileDialog->viewMode() != KyNativeFileDialog::Icon) -+ mKyFileDialog->setViewMode(KyNativeFileDialog::Icon); -+ else if(options()->viewMode() == QFileDialog::Detail && mKyFileDialog->viewMode() != KyNativeFileDialog::List) -+ mKyFileDialog->setViewMode(KyNativeFileDialog::List); -+ -+ QString platform = QGuiApplication::platformName(); -+ if(platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) -+ { -+ kdk::UkuiStyleHelper::self()->removeHeader(mKyFileDialog); -+ } else { -+ MotifWmHints hints; -+ hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; -+ hints.functions = MWM_FUNC_ALL; -+ hints.decorations = MWM_DECOR_BORDER; -+ XAtomHelper::getInstance()->setWindowMotifHint(mKyFileDialog->winId(), hints); -+ } -+ -+ mKyFileDialog->delayShow(); -+ viewInitialFinished(); -+ return true; -+} -+ -+void KyFileDialogHelper::initDialog() -+{ -+ m_isShow = true; -+ -+ pDebug << "initDialog filter...." << options()->filter() << options()->nameFilters() << options()->mimeTypeFilters() << options()->viewMode(); -+ if (options()->windowTitle().isEmpty()) { -+ mKyFileDialog->setWindowTitle(options()->acceptMode() == QFileDialogOptions::AcceptOpen ? tr("Open File") -+ : tr("Save File")); -+ } else { -+ mKyFileDialog->setWindowTitle(options()->windowTitle()); -+ } -+ QStringList nameFilters; -+ foreach (QString nameFilter, options()->nameFilters()) { -+ nameFilters.append(QPlatformFileDialogHelper::cleanFilterList(nameFilter)); -+ } -+ pDebug << "nameFilters....:" << nameFilters; -+ if(nameFilters.length() < 1) -+ { -+ pDebug << "contains *...."; -+ QStringList list = options()->nameFilters(); -+ list.append(tr("All Files (*)")); -+ options()->setNameFilters(list); -+ } -+ pDebug << "option NameFilters:" << options()->nameFilters(); -+ pDebug << "option mode:" << options()->acceptMode() << options()->fileMode() << options()->viewMode(); -+ mKyFileDialog->setFilter(options()->filter()); -+ mKyFileDialog->setFileMode(QFileDialog::FileMode(options()->fileMode())); -+ mKyFileDialog->setAcceptMode(QFileDialog::AcceptMode(options()->acceptMode())); -+ pDebug << "initDialog filters:" << options()->nameFilters(); -+ mKyFileDialog->setNameFilters(options()->nameFilters()); -+ pDebug << "view mode:" << options()->viewMode() << mKyFileDialog->viewMode(); -+ -+ for(int i = 0; i < QFileDialogOptions::DialogLabelCount; ++i) { -+ auto label = static_cast<QFileDialogOptions::DialogLabel>(i); -+ if(options()->isLabelExplicitlySet(label)) { -+ mKyFileDialog->setLabelText(static_cast<QFileDialog::DialogLabel>(label), options()->labelText(label)); -+ } -+ } -+// pDebug << "initiallySelectedMimeTypeFilter,,,,:" << options()->initiallySelectedMimeTypeFilter() << options()->initiallySelectedNameFilter(); -+ auto filter = options()->initiallySelectedMimeTypeFilter(); -+ pDebug << "filter.........." << filter; -+ if(!filter.isEmpty()) { -+ selectMimeTypeFilter(filter); -+ } -+ else { -+ filter = options()->initiallySelectedNameFilter(); -+ if(!filter.isEmpty()) { -+ pDebug << "initiallySelectedNameFilter...." << filter; -+ selectNameFilter(filter); -+ } -+ } -+ -+ connect(mKyFileDialog->containerView(), &Peony::DirectoryViewWidget::viewDirectoryChanged, -+ this, &KyFileDialogHelper::viewInitialFinished, Qt::UniqueConnection); -+} -+ -+void KyFileDialogHelper::viewInitialFinished() -+{ -+ if(m_viewInitialFinished) -+ return; -+ pDebug << "viewInitialFinished...."; -+ QTimer::singleShot(100, this, [this](){ -+ pDebug << "viewport update1111111......."; -+ mKyFileDialog->mKyFileDialogUi->m_sider->viewport()->update(); -+ }); -+ -+ QTimer::singleShot(500, this, [this](){ -+ -+ auto selectirectory = m_initialDirectory;// options()->initialDirectory(); -+ auto selectedFiles = m_initialSelectFiles; //options()->initiallySelectedFiles(); -+ QStringList strList; -+ -+ pDebug << "m_viewInitialFinished:" << m_viewInitialFinished; -+ pDebug << "viewInitialFinished selectirectory:" << selectirectory; -+ pDebug << "viewInitialFinished selectedFiles:" << selectedFiles; -+ -+ if(m_viewInitialFinished) -+ return; -+ if(selectedFiles.length() > 0) -+ { -+ pDebug << "initiallySelectedFiles:" << selectedFiles; -+ -+ for(const auto& selectedFile: selectedFiles) { -+ auto info = Peony::FileInfo::fromUri(selectedFile.path()); -+// if (!info->isDir() && !info->isVolume()) -+// { -+ selectFile(selectedFile); -+ strList.append(selectedFile.toString()); -+// } -+ } -+ pDebug << "strList.......:" << strList; -+ pDebug << "getCurrentUri,,.......:" << mKyFileDialog->getCurrentUri(); -+ -+ if(strList.length() > 0){ -+ QString path; -+ QUrl url(strList[0]); -+ if(mKyFileDialog->isDir(url.path()) && options()->fileMode() != QFileDialog::Directory && -+ options()->fileMode() != QFileDialog::DirectoryOnly){ -+ path = url.path(); -+ } -+ else{ -+ QDir dir(url.path()); -+ dir.cdUp(); -+ path = dir.path(); -+ } -+ pDebug << "initial path:" << path << url; -+ if(mKyFileDialog->getCurrentUri() != ("file://" + path)) -+ { -+ pDebug << "initial change directory..." << ("file://" + path); -+ mKyFileDialog->setDirectoryUrl(QUrl("file://" + path)); -+ } -+ -+ pDebug << "setSelections...." << strList << (mKyFileDialog->containerView() == nullptr); -+ -+ mKyFileDialog->setCurrentSelections(strList); -+ pDebug << "initial getselections:" << mKyFileDialog->getCurrentSelectionsList(); -+ //mKyFileDialog->containerView()->scrollToSelection(strList[0]); -+ QString selectName = mKyFileDialog->selectName(); -+ if(selectName == "" && strList.length() > 0) -+ { -+ QString str0 = strList[0]; -+ selectName = str0.split("/").last(); -+ } -+ pDebug << "initial selectName:" << selectName; -+ mKyFileDialog->mKyFileDialogUi->m_fileNameEdit->setText(selectName); -+ } -+ } -+ -+ pDebug << "initially selectirectory:" << selectirectory.toString() << selectirectory.path() << QFile::exists(selectirectory.path()) << Peony::FileUtils::isFileExsit(selectirectory.toString()); -+ pDebug << "current path....." << mKyFileDialog->getCurrentUri(); -+ if(strList.length() <= 0 && Peony::FileUtils::isFileExsit(selectirectory.toString()))//QFile::exists(selectirectory.path())) -+ { -+ QString cStr = mKyFileDialog->getCurrentUri(); -+ QString sStr = selectirectory.toString(); -+ -+ if(cStr.endsWith("/")) -+ cStr = cStr.remove(cStr.length() - 1, 1); -+ if(sStr.endsWith("/")) -+ sStr = sStr.remove(sStr.length() - 1, 1); -+ pDebug << "cStr...." << cStr << "sStr...." << sStr; -+ if(cStr != sStr) -+ mKyFileDialog->setDirectoryUrl(selectirectory); -+ } -+ -+ mKyFileDialog->intiContainerSort(); -+ mKyFileDialog->initialViewId(); -+ pDebug << "viewport update222222......."; -+ mKyFileDialog->mKyFileDialogUi->m_sider->viewport()->update(); -+// mKyFileDialog->refresh(); -+ m_viewInitialFinished = true; -+ }); -+} -+ -+bool KyFileDialogHelper::isViewInitialFinished() -+{ -+ return m_viewInitialFinished; -+} -+ -+bool KyFileDialogHelper::isShow() -+{ -+ return m_isShow; -+} -+ -+bool KyFileDialogHelper::defaultNameFilterDisables() const -+{ -+ return false; -+} -+ -+void KyFileDialogHelper::setDirectory(const QUrl &directory) -+{ -+ QString path = directory.path(); -+ if(path.startsWith("/")) -+ path = "file://" + path; -+ pDebug << "helper setDirectory...." << directory.toString() << directory.path() << path; -+ mKyFileDialog->setDirectory(path); -+// pDebug << "setInitialDirectory....."; -+// options()->setInitialDirectory(directory); -+} -+ -+QUrl KyFileDialogHelper::directory() const -+{ -+ return QUrl(mKyFileDialog->directory().absolutePath()); -+} -+ -+void KyFileDialogHelper::selectFile(const QUrl &filename) -+{ -+ pDebug << "KyFileDialogHelper selectFile.............:" << filename; -+ m_selectedFiles = filename; -+ mKyFileDialog->selectFile(filename.toString()); -+} -+ -+QList<QUrl> KyFileDialogHelper::selectedFiles() const -+{ -+ pDebug << "selectedFiles0000..........:" << mKyFileDialog->directoryUrl() << mKyFileDialog->directory() << mKyFileDialog->getCurrentUri() << mKyFileDialog->acceptMode(); -+ if(options()->acceptMode() == QFileDialogOptions::AcceptOpen) -+ { -+ QList<QUrl> urlList = mKyFileDialog->selectedUrls(); -+ if((options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly) && -+ mKyFileDialog->copyEditText() == "" && m_viewInitialFinished) -+ { -+ if (!mKyFileDialog->getCurrentPage()) { -+ return QList<QUrl>(); -+ } -+ QList<QUrl> urls; -+ QString uri = mKyFileDialog->getCurrentPage()->getCurrentUri(); -+ pDebug << "KyFileDialogHelper selectedFiles current uri........:" << uri; -+ -+ if (uri.startsWith("trash://") || uri.startsWith("recent://") -+ || uri.startsWith("computer://") || uri.startsWith("favorite://") -+ || uri.startsWith("filesafe://")) -+ { -+ urls << Peony::FileUtils::getTargetUri(uri); -+ } -+ else -+ { -+ if(uri.startsWith("file:///")) -+ uri = uri.remove(0,7); -+ pDebug << "open selectedFiles00000..........:" << uri; -+ urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(uri)); -+ } -+ -+ return urls; -+ } -+ if(options()->fileMode() != QFileDialogOptions::AnyFile || urlList.length() > 0) -+ return urlList; -+ else if(urlList.length() == 0) -+ { -+ QString path = mKyFileDialog->getCurrentUri(); -+ if(path.isEmpty()) -+ return urlList; -+ if(!path.endsWith("/")) -+ path += "/"; -+ pDebug << "selected filesss...:" << path + mKyFileDialog->copyEditText(); -+ urlList.append(QUrl(path + mKyFileDialog->copyEditText())); -+ return urlList; -+ } -+ } -+ else -+ { -+ QList<QUrl> urls; -+ QString path = mKyFileDialog->getCurrentUri(); -+ if(path.isEmpty()) -+ return urls; -+ if(!path.endsWith("/")) -+ path += "/"; -+ path += mKyFileDialog->copyEditText(); -+ if(path.startsWith("file:///")) -+ path = path.remove(0,7); -+ pDebug << "save selectedFiles00000..........:" << path; -+ urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(path)); -+ pDebug << "save selectedFiles2222..........:" << urls; -+ return urls; -+ } -+} -+ -+void KyFileDialogHelper::setFilter() -+{ -+} -+ -+void KyFileDialogHelper::selectNameFilter(const QString &filter) -+{ -+ pDebug << "helper selectNameFilter......" << filter; -+ mKyFileDialog->selectNameFilter(filter); -+} -+ -+void KyFileDialogHelper::selectMimeTypeFilter(const QString &filter) -+{ -+ pDebug << "selectMimeTypeFilter0000001111....." << filter; -+ QMimeDatabase db; -+ QMimeType mimetype = db.mimeTypeForName(filter); -+ if(!mimetype.isValid()) -+ return; -+ mKyFileDialog->selectNameFilter(mimetype.filterString()); -+} -+ -+QString KyFileDialogHelper::selectedNameFilter() const -+{ -+ return mKyFileDialog->selectedNameFilter(); -+} -+ -+QString KyFileDialogHelper::selectedMimeTypeFilter() const -+{ -+ pDebug << "selectMimeTypeFilter0000002222222......"; -+ return QString(); -+} -+ -+bool KyFileDialogHelper::isSupportedUrl(const QUrl &url) const -+{ -+ pDebug << "options initialdirectory...." << options()->initialDirectory(); -+ pDebug << "options selectfiles..." << options()->initiallySelectedFiles(); -+ pDebug << "isSupportedUrl..." << url << url.isLocalFile(); -+ pDebug << "options windowTitle" << options()->windowTitle(); -+ if(!mKyFileDialog->isVisible()){ -+ return false; -+ } -+// return false; -+ return url.isLocalFile(); -+ -+} -diff --git a/qt5-ukui-filedialog/kyfiledialog.h b/qt5-ukui-filedialog/kyfiledialog.h -new file mode 100644 -index 0000000..ece467e ---- /dev/null -+++ b/qt5-ukui-filedialog/kyfiledialog.h -@@ -0,0 +1,312 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#include "debug.h" -+#ifndef KYNATIVEFILEDIALOG_H -+#define KYNATIVEFILEDIALOG_H -+#include <QDialog> -+#include <QDir> -+#include <QFileDialog> -+#include <QFileSystemModel> -+#include <QCompleter> -+#include <QListView> -+#include <QStringListModel> -+#include <QTranslator> -+#include "qpa/qplatformdialoghelper.h" -+#include <peony-qt/FMWindowIface.h> -+ -+QT_BEGIN_NAMESPACE -+namespace Ui { class KyNativeFileDialog; } -+QT_END_NAMESPACE -+ -+namespace Peony { -+class DirectoryViewContainer; -+class DirectoryViewWidget; -+class FMWindowIface; -+} -+ -+namespace UKUIFileDialog { -+ -+class Ui_KyFileDialog; -+class FileDialogSideBar; -+class FileDialogPathBar; -+class KyNativeFileDialogPrivate; -+class KyFileDialogHelper; -+ -+class KyNativeFileDialog : public QDialog, public Peony::FMWindowIface -+{ -+ Q_OBJECT -+ friend class KyFileDialogHelper; -+ -+public: -+ enum ViewMode { List, Icon }; -+ KyNativeFileDialog(QWidget *parent = nullptr); -+ ~KyNativeFileDialog(); -+ -+ Peony::FMWindowIface *create(const QString &uri); -+ Peony::FMWindowIface *create(const QStringList &uris); -+ -+ -+ const QString getCurrentUri(); -+ const QStringList getCurrentSelections(); -+ const QStringList getCurrentAllFileUris(); -+ const QStringList getCurrentSelectionsList(); -+ const QList<std::shared_ptr<Peony::FileInfo>> getCurrentSelectionFileInfos(); -+ -+ void setCurrentSelections(QStringList selections); -+ -+ Qt::SortOrder getCurrentSortOrder(); -+ int getCurrentSortColumn(); -+ -+ bool getWindowShowHidden(); -+ bool getWindowUseDefaultNameSortOrder(); -+ bool getWindowSortFolderFirst(); -+ -+ void refresh(); -+ void forceStopLoading(); -+ -+ void setShowHidden(bool showHidden); -+ void setUseDefaultNameSortOrder(bool use); -+ void setSortFolderFirst(bool set); -+ -+ void setCurrentSelectionUris(const QStringList &uris); -+ void setCurrentSortOrder (Qt::SortOrder order); -+ void setCurrentSortColumn (int sortColumn); -+ -+ void editUri(const QString &uri); -+ void editUris(const QStringList &uris); -+ -+ bool getFilterWorking(); -+ -+ void beginSwitchView(const QString &viewId); -+ -+ -+ void setDirectory(const QString &directory); -+ void setDirectory(const QDir &directory); -+ QDir directory() const; -+ -+ void selectFile(const QString &filename); -+ QStringList selectedFiles() const; -+ -+ void setDirectoryUrl(const QUrl &directory); -+ QUrl directoryUrl() const; -+ -+ void selectUrl(const QUrl &url); -+ QList<QUrl> selectedUrls() const; -+ -+ void setNameFilterDetailsVisible(bool enabled); -+ bool isNameFilterDetailsVisible() const; -+ -+ void setNameFilter(const QString &filter); -+ void setNameFilters(const QStringList &filters); -+ QStringList nameFilters() const; -+ void selectNameFilter(const QString &filter); -+ QString selectedMimeTypeFilter() const; -+ QString selectedNameFilter() const; -+ void selectNameFilterByIndex(int index); -+ void selectNameFilterCurrentIndex(int index); -+ int selectNameFilterIndex() const; -+ -+ QDir::Filters filter(); -+ void setFilter(QDir::Filters filters); -+ -+ void setViewMode(ViewMode mode); -+ ViewMode viewMode() const; -+ -+ void setFileMode(QFileDialog::FileMode mode); -+ QFileDialog::FileMode fileMode(); -+ -+ void setAcceptMode(QFileDialog::AcceptMode mode); -+ QFileDialog::AcceptMode acceptMode() const; -+ -+ void setLabelText(QFileDialog::DialogLabel label, const QString &text); -+ QString labelText(QFileDialog::DialogLabel label) const; -+ -+ void setOptions(QFileDialog::Options options); -+ void setOption(QFileDialog::Option option, bool on = true); -+ bool testOption(QFileDialog::Option option) const; -+ QFileDialog::Options options() const; -+ void setCurrentInputName(const QString &name); -+ Peony::DirectoryViewContainer *getCurrentPage(); -+ Peony::DirectoryViewContainer *getCurrentPage() const; -+ -+ Peony::DirectoryViewWidget *containerView() const; -+ -+ void setComBoxItems(const QStringList &filters); -+ -+ bool isDir(QString path); -+ -+ void updateMaximizeState(); -+ -+ void intiContainerSort(); -+ -+ void refreshContainerSort(); -+ -+ void refreshCompleter(); -+ -+ bool doSave(QStringList sFiles); -+ -+ bool doOpen(QStringList sFiles); -+ -+ bool saveMessageBox(QString name); -+ -+ void setHelper(KyFileDialogHelper* helepr); -+ -+ void setShortCuts(); -+ -+ void initialViewId(); -+ -+ void delayShow(); -+ -+ void discardDelayedShow(); -+ -+ QString copyEditText(); -+ -+ void installTranslate(QString local); -+ -+Q_SIGNALS: -+ void switchViewRequest(const QString &viewId); -+ -+ void fileSelected(const QUrl &file); -+ void filesSelected(const QList<QUrl> &files); -+ void currentChanged(const QUrl &path); -+ void directoryEntered(const QUrl &directory); -+ void selectedNameFilterChanged(); -+ void filterSelected(const QString &filter); -+ void locationChangeEnd(); -+ -+public Q_SLOTS: -+ void goToUri(const QString &uri, bool addToHistory = true, bool forceUpdate = false); -+ void goBack(); -+ void goForward(); -+ void goToParent(); -+ void onSwitchView(); -+ void updateWindowState(); -+ QString selectName(); -+ void updateStatusBar(); -+ void onNewFolder(); -+ void setSortType(); -+ void searchButtonClicked(); -+ void setSearchMode(bool mode); -+ void lineEditTextChange(QString text); -+ void containerMenuRequest(const QPoint &pos); -+ void updateTableModel(bool tableMode); -+ void updateSearchProgressBar(); -+ -+protected: -+ void resizeEvent(QResizeEvent *e); -+ void paintEvent(QPaintEvent *e); -+ void keyPressEvent(QKeyEvent *e); -+ -+private: -+ Ui_KyFileDialog *mKyFileDialogUi = nullptr; -+ QScopedPointer<KyNativeFileDialogPrivate> d_ptr; -+ Q_DECLARE_PRIVATE_D(qGetPtrHelper(d_ptr), KyNativeFileDialog) -+ void onAcceptButtonClicked(); -+ void onRejectButtonClicked(); -+ void onCurrentInputNameChanged(); -+ void handleEnterPressed(); -+ void updateAcceptButtonState(); -+ bool checkSaveFileExsits(QString path); -+ void isTableModel(); -+ -+private: -+ bool m_searchMode = false; -+// QFileSystemModel *m_fileSystemModel = nullptr; -+ QCompleter * m_completer = nullptr; -+ QListView *m_listView = nullptr; -+ QStringList m_CurrentPathAllFiles; -+ KyFileDialogHelper *m_fileDialogHelper = nullptr; -+ bool isInitialGoToUriNum = true; -+ bool m_shortcutsSet = false; -+ QString m_lastSearchPath; -+ bool m_isClearSearchKey = false; -+ QStringListModel *m_model = nullptr; -+ QString m_copyEditText; -+ bool m_istableModel = false; -+ QMap<int, QString> m_nameFilterMap; -+ QStringList m_uris_to_edit; -+ bool m_needSearch = false; -+ -+ QTranslator *m_translator = nullptr; -+ QTranslator *m_translator0 = nullptr; -+ QTranslator *m_translator1 = nullptr; -+ QTranslator *m_translator2 = nullptr; -+ QTranslator *m_translator3 = nullptr; -+ -+}; -+ -+class KyFileDialogHelper : public QPlatformFileDialogHelper -+{ -+ Q_OBJECT -+public: -+ explicit KyFileDialogHelper(); -+ -+ ~KyFileDialogHelper() override; -+ -+ -+ virtual void exec() override; -+ virtual bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) override; -+ virtual void hide() override; -+ -+ virtual bool defaultNameFilterDisables() const override; -+ virtual void setDirectory(const QUrl &directory) override; -+ virtual QUrl directory() const override; -+ virtual void selectFile(const QUrl &filename) override; -+ virtual QList<QUrl> selectedFiles() const override; -+ virtual void setFilter() override; -+ virtual void selectNameFilter(const QString &filter) override; -+ -+ virtual void selectMimeTypeFilter(const QString &filter) override; -+ virtual QString selectedNameFilter() const override; -+ virtual QString selectedMimeTypeFilter() const override; -+ -+ virtual bool isSupportedUrl(const QUrl &url) const override; -+ -+ bool isViewInitialFinished(); -+ -+ bool isShow(); -+ -+public Q_SLOTS: -+ void viewInitialFinished(); -+Q_SIGNALS: -+ void fileSelected(const QUrl &file); -+ void filesSelected(const QList<QUrl> &files); -+ void currentChanged(const QUrl &path); -+ void directoryEntered(const QUrl &directory); -+ void filterSelected(const QString &filter); -+ -+ -+private: -+ KyNativeFileDialog* mKyFileDialog = nullptr; -+ QUrl m_selectedFiles; -+ bool m_viewInitialFinished = false; -+ bool m_isShow = false; -+ QUrl m_initialDirectory; -+ QList<QUrl> m_initialSelectFiles; -+ -+private: -+ void initDialog(); -+}; -+} -+ -+#endif // KYNATIVEFILEDIALOG_H -diff --git a/qt5-ukui-filedialog/kyfiledialogprivate.cpp b/qt5-ukui-filedialog/kyfiledialogprivate.cpp -new file mode 100644 -index 0000000..40225fb ---- /dev/null -+++ b/qt5-ukui-filedialog/kyfiledialogprivate.cpp -@@ -0,0 +1,80 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#include "debug.h" -+ -+#include "kyfiledialogprivate.h" -+#include <QFileDialog> -+#include <QTimer> -+#include <QLineEdit> -+#include "kyfiledialog.h" -+#include "ui_kyfiledialog.h" -+using namespace UKUIFileDialog; -+KyNativeFileDialogPrivate::KyNativeFileDialogPrivate() -+{ -+// Q_Q(KyNativeFileDialog); -+ -+ m_timer = new QTimer; -+// m_container = q->m_container; -+} -+ -+QStringList KyNativeFileDialogPrivate::typedFiles() -+{ -+ /* -+ Q_Q(KyNativeFileDialog); -+ QStringList files; -+ QString editText = q->mKyFileDialogUi->m_fileNameEdit->text(); -+ if (!editText.contains(QLatin1Char('"'))) { -+#ifdef Q_OS_UNIX -+ const QString prefix = q->directory().absolutePath() + QDir::separator(); -+ if (QFile::exists(prefix + editText)) -+ files << editText; -+ else -+ files << qt_tildeExpansion(editText); -+#else -+ files << editText; -+ Q_UNUSED(q) -+#endif -+ } else { -+ // " is used to separate files like so: "file1" "file2" "file3" ... -+ // ### need escape character for filenames with quotes (") -+ QStringList tokens = editText.split(QLatin1Char('\"')); -+ for (int i=0; i<tokens.size(); ++i) { -+ if ((i % 2) == 0) -+ continue; // Every even token is a separator -+#ifdef Q_OS_UNIX -+ const QString token = tokens.at(i); -+ const QString prefix = q->directory().absolutePath() + QDir::separator(); -+ if (QFile::exists(prefix + token)) -+ files << token; -+ else -+ files << qt_tildeExpansion(token); -+#else -+ files << toInternal(tokens.at(i)); -+#endif -+ } -+ } -+ return addDefaultSuffixToFiles(files); -+ -+ */ -+ return QStringList(); -+} -diff --git a/qt5-ukui-filedialog/kyfiledialogprivate.h b/qt5-ukui-filedialog/kyfiledialogprivate.h -new file mode 100644 -index 0000000..7af515b ---- /dev/null -+++ b/qt5-ukui-filedialog/kyfiledialogprivate.h -@@ -0,0 +1,104 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#include "debug.h" -+#ifndef KYNATIVEFILEDIALOGPRIVATE_H -+#define KYNATIVEFILEDIALOGPRIVATE_H -+ -+#include <QFileDialog> -+#include <QTimer> -+ -+namespace Peony { -+class DirectoryViewContainer; -+} -+namespace UKUIFileDialog { -+ -+class KyFileDialogHelper; -+class KyNativeFileDialogPrivate -+{ -+ friend class KyNativeFileDialog; -+private: -+ KyNativeFileDialogPrivate(); -+ -+ QStringList typedFiles(); -+ -+ QStringList nameFilters; -+ QFileDialog::AcceptMode acceptMode; -+ QFileDialog::FileMode fileMode; -+ QFileDialog::Options options; -+ Peony::DirectoryViewContainer *m_container = nullptr; -+ QString currentInputName; -+ QTimer *m_timer = nullptr; -+ QDir::Filters filters = QDir::AllEntries; -+}; -+} -+ -+#endif // KYNATIVEFILEDIALOGPRIVATE_H -+/* -+KyNativeFileDialogPrivate::KyNativeFileDialogPrivate() -+{ -+// Q_Q(KyNativeFileDialog); -+ -+ m_timer = new QTimer; -+// m_container = q->m_container; -+} -+ -+QStringList KyNativeFileDialogPrivate::typedFiles() const -+{ -+ Q_Q(KyNativeFileDialog); -+ QStringList files; -+ QString editText = q->mk ->text(); -+ if (!editText.contains(QLatin1Char('"'))) { -+#ifdef Q_OS_UNIX -+ const QString prefix = q->directory().absolutePath() + QDir::separator(); -+ if (QFile::exists(prefix + editText)) -+ files << editText; -+ else -+ files << qt_tildeExpansion(editText); -+#else -+ files << editText; -+ Q_UNUSED(q) -+#endif -+ } else { -+ // " is used to separate files like so: "file1" "file2" "file3" ... -+ // ### need escape character for filenames with quotes (") -+ QStringList tokens = editText.split(QLatin1Char('\"')); -+ for (int i=0; i<tokens.size(); ++i) { -+ if ((i % 2) == 0) -+ continue; // Every even token is a separator -+#ifdef Q_OS_UNIX -+ const QString token = tokens.at(i); -+ const QString prefix = q->directory().absolutePath() + QDir::separator(); -+ if (QFile::exists(prefix + token)) -+ files << token; -+ else -+ files << qt_tildeExpansion(token); -+#else -+ files << toInternal(tokens.at(i)); -+#endif -+ } -+ } -+ return addDefaultSuffixToFiles(files); -+ -+ return QStringList(); -+} -+*/ -diff --git a/qt5-ukui-filedialog/menutoolbutoon.cpp b/qt5-ukui-filedialog/menutoolbutoon.cpp -new file mode 100644 -index 0000000..9493854 ---- /dev/null -+++ b/qt5-ukui-filedialog/menutoolbutoon.cpp -@@ -0,0 +1,99 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#include "debug.h" -+#include "menutoolbutoon.h" -+#include <QApplication> -+#include <QDBusInterface> -+using namespace UKUIFileDialog; -+ -+static ToolButtonStyle *global_instance = nullptr; -+ -+MenuToolButton::MenuToolButton(QWidget *parent) : QToolButton(parent) -+{ -+ setStyle(ToolButtonStyle::getStyle()); -+ -+ QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); -+ if(interFace->isValid()){ -+ connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(tableModeChanged(bool))); -+ } -+} -+ -+void MenuToolButton::tableModeChanged(bool isTableMode) -+{ -+ qDebug() << "tableModeChanged......" << isTableMode; -+ setStyle(ToolButtonStyle::getStyle()); -+} -+ -+ToolButtonStyle *ToolButtonStyle::getStyle() -+{ -+ if (!global_instance) { -+ global_instance = new ToolButtonStyle; -+ } -+ return global_instance; -+} -+ -+int ToolButtonStyle::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, const QWidget *widget) const -+{ -+ if (qobject_cast<const QToolButton *>(widget)) -+ return 0; -+ -+ switch (metric) { -+ case PM_ToolBarIconSize: -+ return 16; -+ case PM_ToolBarSeparatorExtent: -+ return 1; -+ case PM_ToolBarItemSpacing: { -+ return 1; -+ } -+ default: -+ return QProxyStyle::pixelMetric(metric, option, widget); -+ } -+} -+ -+void ToolButtonStyle::drawComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const -+{ -+ //This is a "lie". We want to use instant popup menu for tool button, and we aslo -+ //want use popup menu style with this tool button, so we change the related flags -+ //to draw in our expected. -+ if (control == CC_ToolButton) { -+ QStyleOptionToolButton button = *qstyleoption_cast<const QStyleOptionToolButton *>(option); -+ if (button.features.testFlag(QStyleOptionToolButton::HasMenu)) { -+ button.features = QStyleOptionToolButton::None; -+ if (!widget->property("isOptionButton").toBool()) { -+ button.features |= QStyleOptionToolButton::HasMenu; -+ button.features |= QStyleOptionToolButton::MenuButtonPopup; -+ button.subControls |= QStyle::SC_ToolButtonMenu; -+ } -+ return qApp->style()->drawComplexControl(control, &button, painter, widget); -+ } -+ } -+ return qApp->style()->drawComplexControl(control, option, painter, widget); -+} -+ -+void ToolButtonStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const -+{ -+ if (element == PE_IndicatorToolBarSeparator) { -+ return; -+ } -+ return qApp->style()->drawPrimitive(element, option, painter, widget); -+} -diff --git a/qt5-ukui-filedialog/menutoolbutoon.h b/qt5-ukui-filedialog/menutoolbutoon.h -new file mode 100644 -index 0000000..2854992 ---- /dev/null -+++ b/qt5-ukui-filedialog/menutoolbutoon.h -@@ -0,0 +1,62 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#include "debug.h" -+ -+#ifndef MENUTOOLBUTTON_H -+#define MENUTOOLBUTTON_H -+#include <QToolButton> -+#include <QProxyStyle> -+#include <QStyleOption> -+#include <QPainter> -+namespace UKUIFileDialog { -+class MenuToolButton : public QToolButton -+{ -+ Q_OBJECT -+public: -+ explicit MenuToolButton(QWidget *parent = nullptr); -+ ~MenuToolButton(){} -+ -+Q_SIGNALS: -+ -+ -+public Q_SLOTS: -+ void tableModeChanged(bool isTableMode); -+ -+}; -+ -+class ToolButtonStyle : public QProxyStyle -+{ -+ friend class MenuToolButton; -+ friend class HeaderBarContainer; -+ static ToolButtonStyle *getStyle(); -+ -+ ToolButtonStyle() {} -+ ~ToolButtonStyle() {} -+ -+ int pixelMetric(PixelMetric metric, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override; -+ -+ void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget = nullptr) const override; -+ void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = nullptr) const override; -+}; -+} -+#endif // MENUTOOLBUTTON_H -diff --git a/qt5-ukui-filedialog/pathbar.cpp b/qt5-ukui-filedialog/pathbar.cpp -new file mode 100644 -index 0000000..9f47383 ---- /dev/null -+++ b/qt5-ukui-filedialog/pathbar.cpp -@@ -0,0 +1,104 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#include "debug.h" -+ -+#include "pathbar.h" -+#include <PeonyPathCompleter> -+#include <PeonyPathBarModel> -+#include <QDebug> -+#include <QObject> -+#include <QDBusInterface> -+#include <QDBusMessage> -+#include <peony-qt/file-utils.h> -+#include "debug.h" -+#include "ukui-style-settings.h" -+using namespace UKUIFileDialog; -+ -+FileDialogPathBar::FileDialogPathBar(QWidget *parent) : QWidget(parent)//Peony::AdvancedLocationBar(parent)//QLineEdit(parent)// -+{ -+ setAttribute(Qt::WA_TranslucentBackground); -+ setContentsMargins(0,0,0,0); -+ m_pathBar = new Peony::AdvancedLocationBar(this); -+ -+ QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); -+ if(interFace->isValid()){ -+ connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(updateTableModel(bool))); -+ } -+ -+ -+ QDBusMessage message = QDBusMessage::createMethodCall("com.kylin.statusmanager.interface", -+ "/", -+ "com.kylin.statusmanager.interface", -+ "get_current_tabletmode"); -+ QDBusMessage ret = QDBusConnection::sessionBus().call(message); -+ if (ret.type() != QDBusMessage::ReplyMessage) -+ { -+ //从返回参数获取返回值 -+ pDebug << "complex type failed!"; -+ updateTableModel(false); -+ } -+ else -+ { -+ updateTableModel(ret.arguments()[0].value<bool>()); -+ } -+} -+ -+FileDialogPathBar::~FileDialogPathBar() -+{ -+ m_pathBar->deleteLater(); -+ m_pathBar = nullptr; -+} -+ -+void FileDialogPathBar::updatePath(const QString &uri) -+{ -+ pDebug << "m_pathBar........ updatePath:" << uri << Peony::FileUtils::getEncodedUri(uri); -+ m_pathBar->updateLocation(Peony::FileUtils::urlEncode(uri)); -+// setText(uri); -+// clearFocus(); -+} -+ -+void FileDialogPathBar::resizeEvent(QResizeEvent *e) -+{ -+ m_pathBar->setFixedWidth(this->width()); -+ m_pathBar->setGeometry(0, (this->height() - m_pathBar->height()) / 2, this->width(), m_pathBar->height()); -+} -+ -+Peony::AdvancedLocationBar *FileDialogPathBar::getPathBar() -+{ -+ return m_pathBar; -+} -+ -+void FileDialogPathBar::updateTableModel(bool isTable) -+{ -+ pDebug << "updateTableModel...." << isTable; -+// m_pathBar->updateTabletModeValue(isTable); -+ if(isTable){ -+ m_pathBar->setFixedHeight(48); -+ this->setFixedHeight(48); -+ } -+ else{ -+ m_pathBar->setFixedHeight(36); -+ this->setFixedHeight(36); -+ } -+ pDebug << "m_pathBar height1111:" << m_pathBar->height() << this->height(); -+} -diff --git a/qt5-ukui-filedialog/pathbar.h b/qt5-ukui-filedialog/pathbar.h -new file mode 100644 -index 0000000..0a64214 ---- /dev/null -+++ b/qt5-ukui-filedialog/pathbar.h -@@ -0,0 +1,54 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#include "debug.h" -+ -+#ifndef PATHBAR_H -+#define PATHBAR_H -+#include <QLineEdit> -+#include <QResizeEvent> -+#include <peony-qt/controls/navigation-bar/advanced-location-bar.h> -+ -+namespace UKUIFileDialog { -+class FileDialogPathBar : public QWidget//public QLineEdit// -+{ -+ Q_OBJECT -+public: -+ explicit FileDialogPathBar(QWidget *parent = nullptr); -+ ~FileDialogPathBar(); -+ void resizeEvent(QResizeEvent *e); -+ Peony::AdvancedLocationBar *getPathBar(); -+ -+Q_SIGNALS: -+ void goToUriRequest(const QString &uri, bool addToHistory = true); -+ void updateWindowLocationRequest(const QString &uri, bool addHistory, bool forceUpdate = false); -+ void refreshRequest(); -+ void searchRequest(const QString &path, const QString &key); -+ -+public Q_SLOTS: -+ void updateTableModel(bool isTable); -+ void updatePath(const QString &uri); -+private: -+ Peony::AdvancedLocationBar *m_pathBar = nullptr; -+}; -+} -+#endif // PATHBAR_H -diff --git a/qt5-ukui-filedialog/qt5-ukui-filedialog.pro b/qt5-ukui-filedialog/qt5-ukui-filedialog.pro -new file mode 100644 -index 0000000..65da40b ---- /dev/null -+++ b/qt5-ukui-filedialog/qt5-ukui-filedialog.pro -@@ -0,0 +1,124 @@ -+#------------------------------------------------- -+# -+# Project created by QtCreator 2019-12-31T14:19:01 -+# -+#------------------------------------------------- -+ -+QT += widgets dbus x11extras quickcontrols2 KWindowSystem -+ -+greaterThan(QT_MAJOR_VERSION, 5)|greaterThan(QT_MINOR_VERSION, 7): \ -+ QT += theme_support-private -+else: \ -+ QT += platformsupport-private -+ -+TARGET = qt5-ukui-filedialog -+TEMPLATE = lib -+CONFIG += plugin -+CONFIG += c++11 link_pkgconfig lrelease -+PKGCONFIG += gsettings-qt peony kysdk-waylandhelper -+LIBS += -lX11 -+ -+include(../libqt5-ukui-style/libqt5-ukui-style.pri) -+ -+DEFINES += QT5UKUIFILEDIALOG_LIBRARY -+ -+XDG_ICON_ENGINE = $$[QT_INSTALL_PLUGINS]/iconengines/libQt5XdgIconPlugin.so -+DEFINES += XDG_ICON_ENGINE_PATH='\\"$${XDG_ICON_ENGINE}\\"' -+ -+QT_PLUGIN_INSTALL_DIRS = $$[QT_INSTALL_PLUGINS] -+DEFINES += QT_PLUGIN_INSTALL_DIRS='\\"$${QT_PLUGIN_INSTALL_DIRS}\\"' -+ -+# The following define makes your compiler emit warnings if you use -+# any feature of Qt which has been marked as deprecated (the exact warnings -+# depend on your compiler). Please consult the documentation of the -+# deprecated API in order to know how to port your code away from it. -+DEFINES += QT_DEPRECATED_WARNINGS -+#DEFINES += QT_NO_DEBUG_OUTPUT -+DEFINES += QT_MESSAGELOGCONTEXT -+ -+# You can also make your code fail to compile if you use deprecated APIs. -+# In order to do so, uncomment the following line. -+# You can also select to disable deprecated APIs only up to a certain version of Qt. -+#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -+ -+HEADERS += \ -+ filedialogplugin.h \ -+ filedialogplugin_global.h \ -+ kyfiledialog.h \ -+ kyfiledialogprivate.h \ -+ pathbar.h \ -+ sidebar.h \ -+ ui_kyfiledialog.h \ -+ ../qt5-ukui-platformtheme/xatom-helper.h \ -+ menutoolbutoon.h \ -+ debug.h \ -+ filedialoginterface.h -+ -+SOURCES += \ -+ filedialogplugin.cpp \ -+ kyfiledialog.cpp \ -+ pathbar.cpp \ -+ sidebar.cpp \ -+ ../qt5-ukui-platformtheme/xatom-helper.cpp \ -+ menutoolbutoon.cpp \ -+ kyfiledialogprivate.cpp \ -+ ui_kyfiledialog.cpp -+ -+TRANSLATIONS += \ -+ translations/qt5-ukui-filedialog_zh_CN.ts \ -+ translations/qt5-ukui-filedialog_en_US.ts \ -+ translations/qt5-ukui-filedialog_fa.ts \ -+ translations/qt5-ukui-filedialog_fr.ts \ -+ translations/qt5-ukui-filedialog_cs.ts \ -+ translations/qt5-ukui-filedialog_bo_CN.ts \ -+ translations/qt5-ukui-filedialog_tr.ts \ -+ translations/qt5-ukui-filedialog_mn.ts \ -+ translations/qt5-ukui-filedialog_kk.ts \ -+ translations/qt5-ukui-filedialog_ky.ts \ -+ translations/qt5-ukui-filedialog_ug.ts \ -+ translations/qt5-ukui-filedialog_zh_HK.ts -+ -+unix { -+ target.path = $$[QT_INSTALL_PLUGINS]/platformthemes -+ INSTALLS += target -+ -+ QM_FILES_INSTALL_PATH=/usr/share/qt5-ukui-platformtheme -+} -+ -+DISTFILES += \ -+ ukui.json -+ -+DEFINES += OPEN_ACTIONS_SEPARATOR='\\"open-actions-seperator\\"' -+DEFINES += CREATE_ACTIONS_SEPARATOR='\\"create-actions-seperator\\"' -+DEFINES += VIEW_ACTIONS_SEPARATOR='\\"view-actions-seperator\\"' -+DEFINES += FILE_OPERATION_ACTIONS_SEPARATOR='\\"file-operation-actions-seperator\\"' -+DEFINES += PLUGIN_ACTIONS_SEPARATOR='\\"plugin-actions-seperator\\"' -+DEFINES += PROPERTIES_ACTIONS_SEPARATOR='\\"properties-actions-seperator\\"' -+DEFINES += COMPUTER_ACTIONS_SEPARATOR='\\"computer-actions-seperator\\"' -+DEFINES += TRASH_ACTIONS_SEPARATOR='\\"trash-actions-seperator\\"' -+ -+DEFINES += OPEN_IN_NEW_WINDOW_ACTION='\\"open-in-new-window-action\\"' -+DEFINES += OPEN_IN_NEW_TAB_ACTION='\\"open-in-new-tab-action\\"' -+DEFINES += ADD_TO_BOOKMARK_ACTION='\\"add-to-bookmark-action\\"' -+DEFINES += OPEN_ACTION='\\"open-action\\"' -+DEFINES += OPEN_WITH_ACTION='\\"open-with-action\\"' -+DEFINES += OPEN_SELECTED_FILES_ACTION='\\"open-selected-files-action\\"' -+DEFINES += CREATE_ACTION='\\"create-action\\"' -+DEFINES += VIEW_TYPE_ACTION='\\"view-type-action\\"' -+DEFINES += SORT_TYPE_ACTION='\\"sort-type-action\\"' -+DEFINES += SORT_ORDER_ACTION='\\"sort-order-action\\"' -+DEFINES += SORT_PREFERENCES_ACTION='\\"sort-preferences-action\\"' -+DEFINES += COPY_ACTION='\\"copy-action\\"' -+DEFINES += CUT_ACTION='\\"cut-action\\"' -+DEFINES += TRASH_ACTION='\\"trash-action\\"' -+DEFINES += DELETE_ACTION='\\"delete-action\\"' -+DEFINES += RENAME_ACTION='\\"rename-action\\"' -+DEFINES += PASTE_ACTION='\\"paste-action\\"' -+DEFINES += REFRESH_ACTION='\\"refresh-action\\"' -+DEFINES += SELECT_ALL_ACTION='\\"select-all-action\\"' -+DEFINES += REVERSE_SELECT_ACTION='\\"reverse-select-action\\"' -+DEFINES += PROPERTIES_ACTION='\\"properties-action\\"' -+DEFINES += FORMAT_ACTION='\\"format-action\\"' -+DEFINES += CLEAN_THE_TRASH_ACTION='\\"clean-the-trash-action\\"' -+DEFINES += RESTORE_ACTION='\\"restore-action\\"' -+DEFINES += CLEAN_THE_RECENT_ACTION='\\"clean-the-recent-action\\"' -diff --git a/qt5-ukui-filedialog/sidebar.cpp b/qt5-ukui-filedialog/sidebar.cpp -new file mode 100644 -index 0000000..2194f14 ---- /dev/null -+++ b/qt5-ukui-filedialog/sidebar.cpp -@@ -0,0 +1,495 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#include "debug.h" -+#include "sidebar.h" -+#include <QTimer> -+#include <PeonySideBarModel> -+#include <QScrollBar> -+#include <QHeaderView> -+#include <QPainterPath> -+#include <QPainter> -+#include <QDebug> -+#include <QApplication> -+#include <QTreeWidget> -+#include <QMessageBox> -+#include <QToolTip> -+#include <QScreen> -+#include <QDBusInterface> -+#include "kyfiledialog.h" -+#include "peony-qt/controls/menu/side-bar-menu/side-bar-menu.h" -+#include "peony-qt/side-bar-abstract-item.h" -+#include "peony-qt/volume-manager.h" -+#include "peony-qt/file-enumerator.h" -+#include "peony-qt/file-utils.h" -+#include "peony-qt/file-info.h" -+#include "ukui-style-settings.h" -+#include "debug.h" -+using namespace UKUIFileDialog; -+ -+FileDialogComboBox::FileDialogComboBox(QWidget *parent):QComboBox(parent) -+{ -+ if (QGSettings::isSchemaInstalled("org.ukui.style")) { -+ auto settings = UKUIStyleSettings::globalInstance(); -+ connect(settings, &QGSettings::changed, this, [=](const QString &key){ -+ pDebug << "key changed:" << key << this->size(); -+ m_styleChanged = true; -+ }); -+ } -+ -+ connect(this, &FileDialogComboBox::setStyleChanged, this, [=](bool change){ -+ pDebug << "setStyleChanged m_styleChanged:" << change; -+ m_styleChanged = change; -+ }); -+ QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); -+ if(interFace->isValid()){ -+ connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(tableModeChanged(bool))); -+ } -+ m_minSize = this->minimumSize(); -+ pDebug << "combobox minsize...." << m_minSize; -+} -+ -+void FileDialogComboBox::tableModeChanged(bool isTableMode) -+{ -+ m_styleChanged = true; -+} -+ -+QSize FileDialogComboBox::minimumSizeHint() const -+{ -+ pDebug << "minimumSizeHint...." << m_styleChanged << this->size() << m_minSize; -+ if(m_styleChanged || (qApp->screenAt(QCursor::pos())->availableSize().width() - 300) < QComboBox::minimumSizeHint().width()) -+ { -+ Q_EMIT setStyleChanged(false); -+ return m_minSize;//this->size(); -+ } -+ QSize size = QComboBox::minimumSizeHint(); -+ -+ -+ return size; -+} -+ -+ -+FileDialogSideBar::FileDialogSideBar(QWidget *parent) : QTreeView(parent) -+{ -+// setStyle(SideBarStyle::getStyle()); -+ -+ setIconSize(QSize(16, 16)); -+ -+// header()->setSectionResizeMode(QHeaderView::Stretch ); -+ header()->setStretchLastSection(false); -+ header()->hide(); -+ -+ this->verticalScrollBar()->setProperty("drawScrollBarGroove", false); -+ setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); -+ this->setFrameStyle(QFrame::NoFrame); -+ setSortingEnabled(true); -+ -+ setProperty("useIconHighlightEffect", true); -+ setDragDropMode(QTreeView::NoDragDrop); -+ setProperty("doNotBlur", true); -+ viewport()->setProperty("doNotBlur", true); -+ setContextMenuPolicy(Qt::CustomContextMenu); -+ -+ setExpandsOnDoubleClick(false); -+ setMouseTracking(true);//追踪鼠标 -+ setAutoScrollMargin(0); -+ -+ -+ auto delegate = new SideBarItemDelegate(this); -+ setItemDelegate(delegate); -+ -+ m_model = new Peony::SideBarModel(this); -+ m_proxyModel = new Peony::SideBarProxyFilterSortModel(this); -+ m_proxyModel->setSourceModel(m_model); -+ setModel(m_proxyModel); -+ -+ Peony::VolumeManager *volumeManager = Peony::VolumeManager::getInstance(); -+ connect(volumeManager,&Peony::VolumeManager::volumeAdded,this,[=](const std::shared_ptr<Peony::Volume> &volume){ -+ m_proxyModel->invalidate();//display DVD device in real time. -+ }); -+ connect(volumeManager,&Peony::VolumeManager::volumeRemoved,this,[=](const std::shared_ptr<Peony::Volume> &volume){ -+ m_proxyModel->invalidate();//The drive does not display when the DVD device is removed. -+ //pDebug << "volumeRemoved:" <<QToolTip::text(); -+ //fix abnormal pull out usb device tips not hide issue, link to bug#81190 -+ if (QToolTip::isVisible()) { -+ QToolTip::hideText(); -+ } -+ }); -+ connect(volumeManager,&Peony::VolumeManager::driveDisconnected,this,[=](const std::shared_ptr<Peony::Drive> &drive){ -+ m_proxyModel->invalidate();//Multiple udisk eject display problem -+ }); -+ connect(volumeManager,&Peony::VolumeManager::mountAdded,this,[=](const std::shared_ptr<Peony::Mount> &mount){ -+ m_proxyModel->invalidate();//display udisk in real time after format it. -+ }); -+ -+ -+ connect(this, &FileDialogSideBar::clicked, this, [=](const QModelIndex &index){ -+ switch (index.column()) { -+ case 0: { -+ auto item = m_proxyModel->itemFromIndex(index); -+ -+ if (! item) -+ break; -+ //continue to fix crash issue, related to bug#116201,116589 -+ if(item->isMountable()&&!item->isMounted()) -+ item->mount(); -+ else{ -+ auto uri = item->uri(); -+ -+ if (!item->uri().isEmpty()){ -+ if (uri == "computer:///ukui-data-volume") { -+ uri = "file:///data"; -+ } -+ Q_EMIT goToUriRequest(uri); -+ } -+ } -+ break; -+ } -+ case 1: { -+ auto item = m_proxyModel->itemFromIndex(index); -+ if (item->isMounted() || item->isEjectable()||item->isStopable()) { -+ auto leftIndex = m_proxyModel->index(index.row(), 0, index.parent()); -+ this->collapse(leftIndex); -+ item->ejectOrUnmount(); -+ } else { -+ // if item is not unmountable, just be same with first column. -+ // fix #39716 -+ auto uri = item->uri(); -+ -+ if (!item->uri().isNull()){ -+ if (uri == "computer:///ukui-data-volume") { -+ uri = "file:///data"; -+ } -+ Q_EMIT goToUriRequest(uri); -+ } -+ } -+ break; -+ } -+ default: -+ break; -+ } -+ }); -+ -+ connect(this, &FileDialogSideBar::expanded, this, [=](const QModelIndex &index){ -+ auto item = m_proxyModel->itemFromIndex(index); -+ item->findChildrenAsync(); -+ }); -+ -+ connect(this, &FileDialogSideBar::collapsed, this, [=](const QModelIndex &index){ -+ auto item = m_proxyModel->itemFromIndex(index); -+ item->clearChildren(); -+ }); -+ -+ connect(this, &QTreeView::customContextMenuRequested, this, [=](const QPoint &pos){ -+ auto index = indexAt(pos); -+ auto item = m_proxyModel->itemFromIndex(index); -+ if (item) { -+ if (item->type() != Peony::SideBarAbstractItem::SeparatorItem) { -+ Peony::SideBarMenu menu(item, nullptr); -+ QList<QAction *> actionList; -+ if (item->type() == Peony::SideBarAbstractItem::FileSystemItem) { -+ if ((0 != QString::compare(item->uri(), "computer:///")) && -+ (0 != QString::compare(item->uri(), "filesafe:///"))) { -+ for (const auto &actionItem : actionList) { -+ if(item->isVolume())/* 分区才去需要判断是否已挂载 */ -+ actionItem->setEnabled(item->isMounted()); -+ } -+ } -+ } -+ -+ menu.exec(QCursor::pos()); -+ } -+ } -+ }); -+ -+ QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); -+ if(interFace->isValid()){ -+ connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(tableModeChanged(bool))); -+ } -+ -+// if (QGSettings::isSchemaInstalled("org.ukui.style")) { -+// auto settings = UKUIStyleSettings::globalInstance(); -+// connect(settings, &QGSettings::changed, this, [=](const QString &key){ -+// pDebug << "key changed:" << key << width(); -+// if (key == "styleName") { -+// m_siderWidth = this->width(); -+// } -+// }); -+// } -+ expandToDepth(1); -+ setViewportMargins(4, 4, 0, 0); -+ -+ pDebug << "columndffffffffffffffff"; -+// setColumnHidden(1, true); -+} -+ -+FileDialogSideBar::~FileDialogSideBar() -+{ -+ m_proxyModel->deleteLater(); -+ m_proxyModel = nullptr; -+ m_model->deleteLater(); -+ m_model = nullptr; -+} -+ -+void FileDialogSideBar::tableModeChanged(bool isTableMode) -+{ -+ pDebug << "tableModeChanged........"; -+// setStyle(SideBarStyle::getStyle()); -+} -+ -+void FileDialogSideBar::resizeEvent(QResizeEvent *e) -+{ -+ setViewportMargins(4, 4, 0, 0); -+ -+// this->setGeometry(this->x(), this->y(), m_siderWidth, this->height()); -+ QTreeView::resizeEvent(e); -+ pDebug << "FileDialogSideBar resizeEvent header count......:" << header()->count() << this->viewport()->width() << this->columnWidth(0) << this->columnWidth(1); -+ if (header()->count() > 0) { -+ this->setColumnWidth(1, 20); -+ header()->resizeSection(0, this->viewport()->width() - this->columnWidth(1)); -+ } -+} -+ -+void FileDialogSideBar::menuRequest(const QPoint &pos) -+{ -+// auto index = indexAt(pos); -+// auto item = proxyModel->itemFromIndex(index); -+// if (item) { -+// pDebug << "sider bar menu00000" << item->type() << index; -+// if (item->type() != Peony::SideBarAbstractItem::SeparatorItem) { -+// pDebug << "sider bar menu11111"; -+//// Peony::SideBarMenu *menu = new Peony::SideBarMenu(item, this); -+// pDebug << "sider bar menu22222222"; -+//// menu->exec(QCursor::pos()); -+// pDebug << "sider bar menu3333333"; -+// } -+// } -+} -+ -+void FileDialogSideBar::paintEvent(QPaintEvent *event) -+{ -+// pDebug << "sidebar paintEvent.......:" << this->size(); -+ QTreeView::paintEvent(event); -+} -+ -+//void FileDialogSideBar::paintEvent(QPaintEvent *e) -+//{ -+// QColor color = this->palette().window().color(); -+// QColor colorBase = QColor(Qt::red); //this->palette().base().color(); -+ -+// int R1 = color.red(); -+// int G1 = color.green(); -+// int B1 = color.blue(); -+// qreal a1 = 0.3; -+ -+// int R2 = colorBase.red(); -+// int G2 = colorBase.green(); -+// int B2 = colorBase.blue(); -+// qreal a2 = 1; -+ -+// qreal a = 1 - (1 - a1)*(1 - a2); -+ -+// qreal R = (a1*R1 + (1 - a1)*a2*R2) / a; -+// qreal G = (a1*G1 + (1 - a1)*a2*G2) / a; -+// qreal B = (a1*B1 + (1 - a1)*a2*B2) / a; -+ -+// colorBase.setRed(R); -+// colorBase.setGreen(G); -+// colorBase.setBlue(B); -+// colorBase.setAlphaF(1); -+ -+//// QPainter p(this); -+//// QPainterPath sidebarPath; -+//// sidebarPath.addRoundedRect(this->geometry(), 6, 6); -+//// p.fillPath(sidebarPath, colorBase); -+//// viewport()->setObjectName("viewport"); -+//// viewport()->setStyleSheet("QWidget#viewport{background-color:rgba(255,255,255,0.5)");////" + QString::number(colorBase.red()) + "," + QString::number(colorBase.green()) + "," + QString::number(colorBase.blue()) + "," + QString::number(colorBase.alpha()) + "}"); -+// QTreeView::paintEvent(e); -+//} -+ -+ -+SideBarItemDelegate::SideBarItemDelegate(QObject *parent) -+{ -+// if (QGSettings::isSchemaInstalled("org.ukui.style")) { -+// auto settings = UKUIStyleSettings::globalInstance(); -+// connect(settings, &QGSettings::changed, this, [=](const QString &key){ -+// pDebug << "key changed:" << key; -+// if (key == "styleName") { -+// pDebug << "key changed...."; -+// this->paint(); -+// this->update(); -+// } -+// }); -+// } -+} -+ -+//QSize SideBarItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const -+//{ -+// auto size = QStyledItemDelegate::sizeHint(option, index); -+// size.setHeight(36); -+// return size; -+//} -+ -+ -+void SideBarItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const -+{ -+ painter->save(); -+ if (index.column() == 1) { -+ QPainterPath rightRoundedRegion; -+ rightRoundedRegion.setFillRule(Qt::WindingFill); -+ auto rect = option.rect; -+ auto view = qobject_cast<const QAbstractItemView *>(option.widget); -+ if (view) { -+ rect.setRight(view->viewport()->rect().right()); -+ } -+ int radius = 4; -+ if(view && view->property("minRadius").isValid()) -+ radius = view->property("minRadius").toInt(); -+ -+ rightRoundedRegion.addRoundedRect(rect, radius, radius); -+ rightRoundedRegion.addRect(rect.adjusted(0, 0, -1 * radius, 0)); -+ painter->setClipPath(rightRoundedRegion); -+ } -+ -+ painter->setRenderHint(QPainter::Antialiasing); -+ QStyledItemDelegate::paint(painter, option, index); -+ painter->restore(); -+} -+ -+static SideBarStyle *global_instance = nullptr; -+SideBarStyle::SideBarStyle() -+{ -+ -+} -+ -+SideBarStyle* SideBarStyle::getStyle() -+{ -+ if (!global_instance) { -+ global_instance = new SideBarStyle; -+ } -+ return global_instance; -+} -+ -+void SideBarStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const -+{ -+ painter->save(); -+ switch (element) { -+ case QStyle::PE_IndicatorItemViewItemDrop: { -+ painter->setRenderHint(QPainter::Antialiasing, true);/* 反锯齿 */ -+ /* 按设计要求,边框颜色为调色板highlight值,圆角为6px */ -+ QColor color = option->palette.color(QPalette::Highlight); -+ painter->setPen(color); -+ int radius = 6; -+ if(widget && widget->property("normalRadius").isValid()) -+ radius = widget->property("normalRadius").toInt(); -+ -+ painter->drawRoundedRect(option->rect, radius, radius); -+ painter->restore(); -+ return; -+ } -+ -+ case QStyle::PE_IndicatorBranch: { -+ painter->setRenderHint(QPainter::Antialiasing, true); -+ if (option->rect.x() == 0) { -+ QPainterPath leftRoundedRegion; -+ leftRoundedRegion.setFillRule(Qt::WindingFill); -+ int radius = 4; -+ if(widget && widget->property("minRadius").isValid()) -+ radius = widget->property("minRadius").toInt(); -+ -+ leftRoundedRegion.addRoundedRect(option->rect, radius, radius); -+ leftRoundedRegion.addRect(option->rect.adjusted(radius, 0, 0, 0)); -+ painter->setClipPath(leftRoundedRegion); -+ } -+ const QStyleOptionViewItem *tmp = qstyleoption_cast<const QStyleOptionViewItem *>(option); -+ QStyleOptionViewItem opt = *tmp; -+ if (!opt.state.testFlag(QStyle::State_Selected)) { -+ if (opt.state & QStyle::State_Sunken) { -+ opt.palette.setColor(QPalette::Highlight, opt.palette.button().color()); -+// opt.palette.setColor(QPalette::Highlight, Qt::red); -+ } -+ if (opt.state & QStyle::State_MouseOver) { -+ opt.palette.setColor(QPalette::Highlight, opt.palette.mid().color()); -+// opt.palette.setColor(QPalette::Highlight, Qt::green); -+ } -+ } -+ qApp->style()->drawPrimitive(element, &opt, painter, widget); -+ painter->restore(); -+ return; -+ } -+ case QStyle::PE_PanelItemViewRow: { -+ painter->restore(); -+ return; -+ break; -+ } -+ case QStyle::PE_PanelItemViewItem: { -+ /* -+ const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option); -+ QStyleOptionViewItem opt = *vi; -+ painter->save(); -+ painter->setPen(Qt::NoPen); -+ QPainterPath path; -+ if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) { -+ path.addRoundedRect(vi->rect, 6, 6); -+ } -+ else { -+ path.addRect(vi->rect); -+ } -+// pDebug << "vi->rect:" << vi->rect; -+ -+ if (!opt.state.testFlag(QStyle::State_Selected)) { -+ if (opt.state & QStyle::State_Sunken) { -+ opt.palette.setColor(QPalette::Highlight, opt.palette.button().color()); -+ } -+ if (opt.state & QStyle::State_MouseOver) { -+ opt.palette.setColor(QPalette::Highlight, opt.palette.mid().color()); -+ } -+ } -+ painter->drawPath(path); -+ */ -+ break; -+ } -+ -+ default: -+ break; -+ } -+ -+ qApp->style()->drawPrimitive(element, option, painter, widget); -+ painter->restore(); -+} -+ -+void SideBarStyle::drawControl(QStyle::ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const -+{ -+ if (element == QStyle::CE_ItemViewItem) { -+ const QStyleOptionViewItem *tmp = qstyleoption_cast<const QStyleOptionViewItem *>(option); -+ QStyleOptionViewItem opt = *tmp; -+ if (!opt.state.testFlag(QStyle::State_Selected)) { -+ if (opt.state & QStyle::State_Sunken) { -+ opt.palette.setColor(QPalette::Highlight, opt.palette.button().color()); -+ } -+ if (opt.state & QStyle::State_MouseOver) { -+ opt.palette.setColor(QPalette::Highlight, opt.palette.mid().color()); -+ } -+ } -+ return qApp->style()->drawControl(element, &opt, painter, widget); -+ } -+} -diff --git a/qt5-ukui-filedialog/sidebar.h b/qt5-ukui-filedialog/sidebar.h -new file mode 100644 -index 0000000..48112e9 ---- /dev/null -+++ b/qt5-ukui-filedialog/sidebar.h -@@ -0,0 +1,105 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#include "debug.h" -+#ifndef SIDEBAR_H -+#define SIDEBAR_H -+#include <QTreeView> -+#include <QPaintEvent> -+#include <QStyledItemDelegate> -+#include <QStyleOptionViewItem> -+#include <QModelIndex> -+#include <QPainter> -+#include <QProxyStyle> -+#include <QStyleOption> -+#include <PeonySideBarProxyModel> -+#include <QComboBox> -+#include <QSize> -+#include <PeonySideBarModel> -+ -+namespace UKUIFileDialog { -+class FileDialogComboBox : public QComboBox -+{ -+ Q_OBJECT -+public: -+ explicit FileDialogComboBox(QWidget *parent = nullptr); -+ ~FileDialogComboBox(){} -+ QSize minimumSizeHint() const; -+ -+public Q_SLOTS: -+ void tableModeChanged(bool isTableMode); -+ -+Q_SIGNALS: -+ void setStyleChanged(bool change) const; -+ -+private: -+ bool m_styleChanged = false; -+ QSize m_minSize; -+}; -+ -+ -+class FileDialogSideBar : public QTreeView -+{ -+ -+ Q_OBJECT -+public: -+ explicit FileDialogSideBar(QWidget *parent = nullptr); -+ ~FileDialogSideBar(); -+ void resizeEvent(QResizeEvent *e); -+ void paintEvent(QPaintEvent *event); -+ -+public Q_SLOTS: -+ void menuRequest(const QPoint &pos); -+ void tableModeChanged(bool isTableMode); -+ -+private: -+ Peony::SideBarProxyFilterSortModel *m_proxyModel = nullptr; -+ Peony::SideBarModel *m_model = nullptr; -+ -+Q_SIGNALS: -+ void goToUriRequest(const QString &uri, bool addToHistory = true, bool forceUpdate = false); -+ -+}; -+ -+ -+class SideBarItemDelegate : public QStyledItemDelegate -+{ -+ friend class FileDialogSideBar; -+ explicit SideBarItemDelegate(QObject *parent = nullptr); -+ ~SideBarItemDelegate(){} -+ -+// QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; -+ void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; -+}; -+ -+ -+class SideBarStyle : public QProxyStyle -+{ -+public: -+ explicit SideBarStyle(); -+ static SideBarStyle* getStyle(); -+ ~SideBarStyle(){} -+ void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override; -+ void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override; -+}; -+} -+#endif // SIDEBAR_H -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_bo_CN.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_bo_CN.ts -new file mode 100644 -index 0000000..76c7ef5 ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_bo_CN.ts -@@ -0,0 +1,252 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="bo_CN"> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">ཁ་རྒྱག་པ།</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="vanished">ལག་བསྟར་བྱེད་ཆོག་པའི་'%1'ལ་Qt %2,Qt%3རྙེད་པ་རེད།</translation> -+ </message> -+ <message> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="vanished">ཕན་ཚུན་མཐུན་ཐབས་མེད་པའི་Qt དཔེ་མཛོད་ཁང་གི་ནོར་འཁྲུལ།</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <source>OK</source> -+ <translation type="vanished">འགྲིགས།</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <source>Show Details...</source> -+ <translation type="vanished">ཞིབ་ཕྲའི་གནས་ཚུལ་གསལ་བཤད་བྱ་དགོས།</translation> -+ </message> -+ <message> -+ <source>Hide Details...</source> -+ <translation type="vanished">གནས་ཚུལ་ཞིབ་ཕྲ་སྦས་སྐུང་བྱེད་</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>ཡིག་ཆའི་མིང་།</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>བཟོ་བཅོས་བརྒྱབ་པའི་དུས་ཚོད།</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>ཡིག་ཆའི་རིགས་གྲས།</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>ཡིག་ཆའི་ཆེ་ཆུང་།</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>ཐོག་མའི་འགྲོ་ལམ།</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>མར་འབབ་པ།</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>རིམ་པ་ཇེ་མང་དུ་འགྲོ་བཞིན།</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>ཁྱོན་ཡོངས་ཀྱི་གོ་རིམ་བེད་སྤྱོད།</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>མཐོང་རིས་རེའུ་མིག</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>མཚོན་རྟགས་ལྟ་ཚུལ།</translation> -+ </message> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">ཁ་རྒྱག་པ།</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>ཁ་ཆད་བཞག་པའི་སྒྲོན་བརྙན</translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>སྒྲོན་བརྙན་གྱི་འགུལ་རིས་ལ་བརྟེན་ནས་ཤོག་བྱང་ཆུང་ཆུང་བརྗེ་རེས་བྱེད་དུ་འཇུག་དགོས།</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2715"/> -+ <source>Open File</source> -+ <translation>ཁ་ཕྱེ་བའི་ཡིག་ཆ།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2716"/> -+ <source>Save File</source> -+ <translation>ཡིག་ཆ་ཉར་ཚགས་བྱེད་པ།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2729"/> -+ <source>All Files (*)</source> -+ <translation>ཡིག་ཆ་ཡོད་ཚད་(*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>ཕྱིར་ལོག</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>མདུན་སྐྱོད།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>གོང་ཕྱོགས།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>འཚོལ་ཞིབ།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>མཐོང་རིས་ཀྱི་རིགས།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>གོ་རིམ་གྱི་རིགས།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="265"/> -+ <location filename="../kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>ཆེས་ཆེ་བསྒྱུར།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>ཁ་རྒྱག་པ།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>སླར་གསོ་བྱེད་པ།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>ཡིག་ཆའི་མིང་།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="990"/> -+ <location filename="../kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>སྒོ་ཕྱེ་བ།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="991"/> -+ <location filename="../kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>ཕྱིར་འཐེན།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>ཉར་ཚགས་གཞན།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>ཡིག་ཁུག་གསར་འཛུགས།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="999"/> -+ <location filename="../kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>གྲོན་ཆུང་བྱེད་དགོས།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1035"/> -+ <location filename="../kyfiledialog.cpp" line="1036"/> -+ <location filename="../kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>དཀར་ཆག</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>ཐ་ཚིག་སྒྲོག་པ།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>གནས་ཡོད་པས། ཁྱོད་ཀྱིས་དངོས་གནས་ཚབ་བྱེད་ཐུབ་བམ།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>དཀར་ཆག་གསར་བ།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>ཁ་ཕྱིར་འཐེན་བྱ་དགོས།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>ཡང་བསྐྱར་ལས།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>ཉེན་བརྡ་བཏང་བ།</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>བཀོལ་སྤྱོད་འདི་ལ་རྒྱབ་སྐྱོར་མི་བྱེད།</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_cs.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_cs.ts -new file mode 100644 -index 0000000..d87d4a1 ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_cs.ts -@@ -0,0 +1,212 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="cs_CZ"> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2715"/> -+ <source>Open File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2716"/> -+ <source>Save File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2729"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="265"/> -+ <location filename="../kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="990"/> -+ <location filename="../kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="991"/> -+ <location filename="../kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="999"/> -+ <location filename="../kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1035"/> -+ <location filename="../kyfiledialog.cpp" line="1036"/> -+ <location filename="../kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_de.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_de.ts -new file mode 100644 -index 0000000..4a62991 ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_de.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="de"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation>Schließen</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>Die ausführbare Datei '%1' erfordert Qt %2, Qt %3 gefunden.</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>Fehler in der inkompatiblen Qt-Bibliothek</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation>OKAY</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation>Details anzeigen...</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation>Details ausblenden...</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>Dateiname</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>Änderungsdatum</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>Dateityp</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>Dateigröße</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>Ursprünglicher Pfad</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>Absteigend</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>Aufsteigend</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>Globale Sortierung verwenden</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>Listenansicht</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>Icon-Ansicht</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation>Schließen</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>Standard-Folie</translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>Lassen Sie das Tab-Widget mit einer Folienanimation wechseln.</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation>Offene Linie</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation>Datei speichern</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation>Alle Dateien (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>Zurück</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>Vorwärts gehen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>Cd nach oben</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>Suchen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>Typ der Ansicht</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>Art der Sortierung</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>Maximieren</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>Schließen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>Wiederherstellen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>Name</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>Offen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>Abbrechen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>Speichern unter</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>Neuer Ordner</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>Retten</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>Verzeichnisse</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>Warnung</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>existieren, sind Sie sicher, ersetzen?</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>Neuer Ordner</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>Aufmachen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>Noch einmal machen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>warnen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>Dieser Vorgang wird nicht unterstützt.</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_en_US.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_en_US.ts -new file mode 100644 -index 0000000..9bfaf48 ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_en_US.ts -@@ -0,0 +1,252 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="en_US"> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">Close</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="vanished">Executable '%1' requires Qt %2, found Qt %3.</translation> -+ </message> -+ <message> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="vanished">Incompatible Qt Library Error</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <source>OK</source> -+ <translation type="vanished">OK</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <source>Show Details...</source> -+ <translation type="vanished">Show Details...</translation> -+ </message> -+ <message> -+ <source>Hide Details...</source> -+ <translation type="vanished">Hide Details...</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>File Name</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>Modified Date</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>File Type</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>File Size</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>Original Path</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>Descending</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>Ascending</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>Use global sorting</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>List View</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>Icon View</translation> -+ </message> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">Close</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2715"/> -+ <source>Open File</source> -+ <translation>Open File</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2716"/> -+ <source>Save File</source> -+ <translation>Save File</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2729"/> -+ <source>All Files (*)</source> -+ <translation>All Files (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>Go Back</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>Go Forward</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>Cd Up</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>Search</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>View Type</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>Sort Type</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="265"/> -+ <location filename="../kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>Maximize</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>Close</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>Restore</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>Name</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="990"/> -+ <location filename="../kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>Open</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="991"/> -+ <location filename="../kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>Cancel</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>Save as</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>New Folder</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="999"/> -+ <location filename="../kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>Save</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1035"/> -+ <location filename="../kyfiledialog.cpp" line="1036"/> -+ <location filename="../kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>Directories</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>Warning</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>exist, are you sure replace?</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>NewFolder</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>Undo</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>Redo</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>warn</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>This operation is not supported.</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_es.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_es.ts -new file mode 100644 -index 0000000..33a8685 ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_es.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="es"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fa.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fa.ts -new file mode 100644 -index 0000000..67f8915 ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fa.ts -@@ -0,0 +1,212 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="fa_IR"> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2715"/> -+ <source>Open File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2716"/> -+ <source>Save File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2729"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="265"/> -+ <location filename="../kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="990"/> -+ <location filename="../kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="991"/> -+ <location filename="../kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="999"/> -+ <location filename="../kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1035"/> -+ <location filename="../kyfiledialog.cpp" line="1036"/> -+ <location filename="../kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fr.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fr.ts -new file mode 100644 -index 0000000..195679c ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fr.ts -@@ -0,0 +1,252 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="fr_FR"> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">Fermer</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="vanished">L’exécutable '%1' nécessite Qt %2, trouvé Qt %3.</translation> -+ </message> -+ <message> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="vanished">Erreur de bibliothèque Qt incompatible</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <source>OK</source> -+ <translation type="vanished">D’ACCORD</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <source>Show Details...</source> -+ <translation type="vanished">Afficher les détails...</translation> -+ </message> -+ <message> -+ <source>Hide Details...</source> -+ <translation type="vanished">Masquer les détails...</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>Nom du fichier</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>Date de modification</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>Type de fichier</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>Taille du fichier</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>Chemin d’accès d’origine</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>Descendant</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>Ascendant</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>Utiliser le tri global</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>Affichage en liste</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>Affichage de l’icône</translation> -+ </message> -+ <message> -+ <source>Close</source> -+ <translation type="obsolete">Fermer</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>Diapositive par défaut</translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>Laissez le widget d’onglet basculer avec une animation de diapositive.</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2715"/> -+ <source>Open File</source> -+ <translation>Ouvrir un fichier</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2716"/> -+ <source>Save File</source> -+ <translation>Enregistrer le fichier</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2729"/> -+ <source>All Files (*)</source> -+ <translation>Tous les fichiers (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>Retour</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>Avancer</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>Cd Up</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>Rechercher</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>Type de vue</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>Type de tri</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="265"/> -+ <location filename="../kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>Maximiser</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>Fermer</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>Restaurer</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>Nom</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="990"/> -+ <location filename="../kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>Ouvrir</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="991"/> -+ <location filename="../kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>Annuler</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>Enregistrer sous</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>Nouveau dossier</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="999"/> -+ <location filename="../kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>Sauvegarder</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1035"/> -+ <location filename="../kyfiledialog.cpp" line="1036"/> -+ <location filename="../kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>Téléphonique</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>Avertissement</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>exister, êtes-vous sûr de remplacer ?</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>NouveauDossier</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>Défaire</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>Refaire</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>avertir</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>Cette opération n’est pas prise en charge.</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts -new file mode 100644 -index 0000000..491611c ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts -@@ -0,0 +1,252 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="kk_KZ"> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">Жабу</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="vanished">Орындалатын '% 1' Qt% 2 дегенді қажет етеді, табылған Qt% 3.</translation> -+ </message> -+ <message> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="vanished">Үйлеспейтін Qt кітапхана қатесі</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <source>OK</source> -+ <translation type="vanished">ЖАҚСЫ</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <source>Show Details...</source> -+ <translation type="vanished">Егжей-тегжейін көрсету...</translation> -+ </message> -+ <message> -+ <source>Hide Details...</source> -+ <translation type="vanished">Мәліметтерді жасыру...</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>Файл атауы</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>Өзгертілген күн</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>Файл түрі</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>Файл өлшемі</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>Бастапқы жол</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>Кему</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>Көтерілу</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>Ғаламдық сұрыптауды пайдалану</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>Тізім көрінісі</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>Белгіше көрінісі</translation> -+ </message> -+ <message> -+ <source>Close</source> -+ <translation type="obsolete">Жабу</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>Әдетті слайд</translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>Слайд анимациясы бар tab widget ауыстырып қосқышына рұқсат етіңіз.</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2715"/> -+ <source>Open File</source> -+ <translation>Файлды ашу</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2716"/> -+ <source>Save File</source> -+ <translation>Файлды сақтау</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2729"/> -+ <source>All Files (*)</source> -+ <translation>Барлық файлдар (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>Қайтып бар</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>Алға жылжу</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>Cd Up</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>Іздеу</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>Көрініс түрі</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>Сұрыптау түрі</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="265"/> -+ <location filename="../kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>Барынша көбейту</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>Жабу</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>Қалпына келтіру</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>Атауы</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="990"/> -+ <location filename="../kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>Ашу</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="991"/> -+ <location filename="../kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>Болдырмау</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>Басқаша сақтау</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>Жаңа қапшық</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="999"/> -+ <location filename="../kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>Сақтау</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1035"/> -+ <location filename="../kyfiledialog.cpp" line="1036"/> -+ <location filename="../kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>Каталогтар</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>Ескерту</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>бар, сіз алмастырасыз ба?</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>NewFolder</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>Болдырмау</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>Редо</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>Ескерту</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>Бұл операцияға қолдау көрсетілмеген.</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts -new file mode 100644 -index 0000000..f946fbb ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts -@@ -0,0 +1,252 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="ky_KG"> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">Жабуу</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="vanished">Аткарыла турган '%1' Qt %2 талап кылынат, Qt %3 табылган.</translation> -+ </message> -+ <message> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="vanished">Qt китепканасынын шайкеш келбеген катасы</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <source>OK</source> -+ <translation type="vanished">МАКУЛ</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <source>Show Details...</source> -+ <translation type="vanished">Егжей-тегжейин</translation> -+ </message> -+ <message> -+ <source>Hide Details...</source> -+ <translation type="vanished">Маалымат жашыруу...</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>Файлдын аты</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>Өзгөртүлгөн дата</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>Файл түрү</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>Файл өлчөмү</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>Оригиналдуу жол</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>Түшүп</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>Көтөрүлүш</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>Глобалдык сорттоону колдонуу</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>Тизменин көрүнүшү</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>Икона көрүнүшү</translation> -+ </message> -+ <message> -+ <source>Close</source> -+ <translation type="obsolete">Жабуу</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>Дефолт слайды</translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>Таблица виджет слайд анимациясы менен которуп берсин.</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2715"/> -+ <source>Open File</source> -+ <translation>Файлды ачуу</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2716"/> -+ <source>Save File</source> -+ <translation>Файлды сактоо</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2729"/> -+ <source>All Files (*)</source> -+ <translation>Бардык файлдар (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>Артка кайрыл</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>Алга илгерилетүү</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>Cd Up</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>Издөө</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>Көрүү түрү</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>Түрүн сорттоо</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="265"/> -+ <location filename="../kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>Максималдуу</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>Жабуу</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>Калыбына келтирүү</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>Аты-жөнү</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="990"/> -+ <location filename="../kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>Ачуу</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="991"/> -+ <location filename="../kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>Жокко чыгаруу</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>Үнөмдөө</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>Жаңы папка</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="999"/> -+ <location filename="../kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>Сактоо</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1035"/> -+ <location filename="../kyfiledialog.cpp" line="1036"/> -+ <location filename="../kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>Каталогдор</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>Эскертүү</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>бар, сиз сөзсүз алмаштырып жатасызбы?</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>Жаңы папкалар</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>Ундо</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>Редо</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>эскертүү</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>Бул операция колдолбойт.</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_mn.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_mn.ts -new file mode 100644 -index 0000000..05173c7 ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_mn.ts -@@ -0,0 +1,237 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="mn_MN"> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">ᠬᠠᠭᠠᠬᠤ</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="vanished">ᠭᠦᠢᠴᠡᠳᠬᠡᠵᠦ ᠪᠣᠯᠬᠤ ᠹᠠᠢᠯ '%1' Qt% 2 ᠬᠡᠷᠡᠭᠰᠡᠵᠦ ᠂ Qt% 3 ᠢ᠋/ ᠵᠢ ᠡᠷᠢᠵᠦ ᠣᠯᠬᠤ ᠬᠡᠷᠡᠭᠲᠡᠶ .</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <source>OK</source> -+ <translation type="vanished">OK</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡᠢᠳᠦᠯ</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>ᠵᠠᠰᠠᠭᠰᠠᠨ ᠡᠳᠦᠷ ᠰᠠᠷᠠ</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠶᠡᠬᠡ ᠪᠠᠭᠠ</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>ᠤᠭ ᠤ᠋ᠨ ᠵᠠᠮ ᠱᠤᠭᠤᠮ</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>ᠪᠠᠭᠠᠰᠬᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>ᠶᠡᠬᠡᠰᠬᠡᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>ᠪᠦᠬᠦ ᠪᠠᠢᠳᠠᠯ ᠤ᠋ᠨ ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠢ᠋ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>ᠵᠢᠭᠰᠠᠭᠠᠯᠳᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>ᠰᠢᠪᠠᠭᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> -+ </message> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">ᠬᠠᠭᠠᠬᠤ</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>Default Slide</translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2715"/> -+ <source>Open File</source> -+ <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2716"/> -+ <source>Save File</source> -+ <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2729"/> -+ <source>All Files (*)</source> -+ <translation>ᠪᠦᠬᠦᠢᠯᠡ (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>ᠤᠬᠤᠷᠢᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>ᠤᠷᠤᠭᠰᠢᠯᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>ᠳᠡᠭᠡᠭᠰᠢ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>ᠬᠠᠢᠯᠳᠠ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="265"/> -+ <location filename="../kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>ᠬᠠᠮᠤᠭ ᠤ᠋ᠨ ᠶᠡᠬᠡᠴᠢᠯᠡᠯ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>ᠬᠠᠭᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>ᠡᠬᠡᠬᠦᠯᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="990"/> -+ <location filename="../kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="991"/> -+ <location filename="../kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>ᠦᠬᠡᠢᠰᠭᠡᠬᠦ᠌</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>ᠦᠭᠡᠷᠡ ᠭᠠᠵᠠᠷ ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="999"/> -+ <location filename="../kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1035"/> -+ <location filename="../kyfiledialog.cpp" line="1036"/> -+ <location filename="../kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>ᠭᠠᠷᠴᠠᠭ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠦᠯ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>ᠪᠠᠢᠨᠠ᠂ ᠰᠤᠯᠢᠬᠤ ᠤᠤ?</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>ᠬᠦᠴᠦᠨ ᠦᠬᠡᠢ ᠪᠤᠯᠭᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>ᠳᠠᠬᠢᠵᠤ ᠬᠢᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>ᠳᠤᠰ ᠠᠵᠢᠯᠯᠠᠬᠤᠢ ᠵᠢ ᠳᠡᠮᠵᠢᠬᠦ ᠦᠬᠡᠢ.</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_tr.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_tr.ts -new file mode 100644 -index 0000000..d440f36 ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_tr.ts -@@ -0,0 +1,212 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="tr_TR"> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2715"/> -+ <source>Open File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2716"/> -+ <source>Save File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2729"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="265"/> -+ <location filename="../kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="990"/> -+ <location filename="../kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="991"/> -+ <location filename="../kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="999"/> -+ <location filename="../kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1035"/> -+ <location filename="../kyfiledialog.cpp" line="1036"/> -+ <location filename="../kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts -new file mode 100644 -index 0000000..68c3584 ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts -@@ -0,0 +1,252 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="ug_CN"> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">ياپ</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="vanished">ئىجرا قىلىشقا بولىدىغان '٪1' Qt ٪2 نى تەلەپ قىلىدۇ، تېپىلغان Qt ٪3.</translation> -+ </message> -+ <message> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="vanished">بىردەك بولمىغان QT ئامبىرى خاتالىقى</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <source>OK</source> -+ <translation type="vanished">ماقۇل</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <source>Show Details...</source> -+ <translation type="vanished">تەپسىلاتىنى كۆرسەت...</translation> -+ </message> -+ <message> -+ <source>Hide Details...</source> -+ <translation type="vanished">تەپسىلاتىنى يوشۇرۇش...</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>ھۆججەت نامى</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>ئۆزگەرتىلگەن ۋاقتى</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>ھۆججەت تۈرى</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>ھۆججەت چوڭلۇقى</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>ئەسلى يول</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>پەسكە چۈشمەكتە</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>ئۆرلەش</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>يەر شارىنى تۈرگە ئايرىشنى ئىشلىتىش</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>تىزىملىك كۆرۈش</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>ئايكون كۆرۈش</translation> -+ </message> -+ <message> -+ <source>Close</source> -+ <translation type="obsolete">ياپ</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>كۆڭۈلدىكى سىيرىلما</translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>سىيرىلما كارتون ئارقىلىق تاختا ۋىكىپات ئالماشتۇرسۇن.</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2715"/> -+ <source>Open File</source> -+ <translation type="unfinished">ھۆججەتنى ئېچىش</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2716"/> -+ <source>Save File</source> -+ <translation type="unfinished">ھۆججەت ساقلاش</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2729"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished">بارلىق ھۆججەتلەر (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished">قايت</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished">ئالدىغا ماڭ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished">Cd Up</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished">ئىزدە</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished">كۆرۈش تىپى</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished">تۈر تۈرى</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="265"/> -+ <location filename="../kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished">ئەڭ چوڭ چەككە</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished">ياپ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished">ئەسلىگە كەلتۈرۈش</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished">ئىسىم-فامىلىسى</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="990"/> -+ <location filename="../kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished">ئېچىش</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="991"/> -+ <location filename="../kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished">ئەمەلدىن قالدۇرۇش</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished">تېجەش</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished">يېڭى ھۆججەت قىسقۇچ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="999"/> -+ <location filename="../kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished">ساقلاش</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1035"/> -+ <location filename="../kyfiledialog.cpp" line="1036"/> -+ <location filename="../kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished">مۇندەرىجىلەر</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished">دىققەت</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished">مەۋجۇت، سىز راستىنلا ئالماشتۇرۇۋاتامسىز؟</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation type="unfinished">يېڭى قاتلىغۇچ</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation type="unfinished">Undo</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation type="unfinished">قايتا-قايتا</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation type="unfinished">ئاگاھلاندۇرۇش</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished">بۇ مەشغۇلات قوللىمايدۇ.</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_CN.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_CN.ts -new file mode 100644 -index 0000000..3267b88 ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_CN.ts -@@ -0,0 +1,252 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="zh_CN"> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">关闭</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="vanished">可执行文件“%1”需要数量%2,找到数量%3。</translation> -+ </message> -+ <message> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="vanished">不兼容的Qt库错误</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <source>OK</source> -+ <translation type="vanished">确认</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <source>Show Details...</source> -+ <translation type="vanished">显示细节……</translation> -+ </message> -+ <message> -+ <source>Hide Details...</source> -+ <translation type="vanished">隐藏细节……</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>文件名称</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>修改日期</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>文件类型</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>文件大小</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>原始路径</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>降序</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>升序</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>使用全局排序</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>列表视图</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>图标视图</translation> -+ </message> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">关闭</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>默认slide</translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>让选项卡小部件切换为幻灯片动画。</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2715"/> -+ <source>Open File</source> -+ <translation>打开</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2716"/> -+ <source>Save File</source> -+ <translation>保存</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2729"/> -+ <source>All Files (*)</source> -+ <translation>所有(*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>后退</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>前进</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>向上</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>搜索</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>视图类型</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>排序类型</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="265"/> -+ <location filename="../kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>最大化</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>关闭</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>还原</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>文件名</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="990"/> -+ <location filename="../kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>打开</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="991"/> -+ <location filename="../kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>取消</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>另存为</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>新建文件夹</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="999"/> -+ <location filename="../kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>保存</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1035"/> -+ <location filename="../kyfiledialog.cpp" line="1036"/> -+ <location filename="../kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>目录</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>警告</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>已存在,是否替换?</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>新建文件夹</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>撤销</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>重做</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>警告</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>不支持此操作。</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_HK.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_HK.ts -new file mode 100644 -index 0000000..3743345 ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_HK.ts -@@ -0,0 +1,252 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="zh_HK"> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">關閉</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="vanished">可執行檔「%1」 需要數量%2,找到數量%3。</translation> -+ </message> -+ <message> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="vanished">不相容的Qt庫錯誤</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <source>OK</source> -+ <translation type="vanished">確認</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <source>Show Details...</source> -+ <translation type="vanished">顯示細節......</translation> -+ </message> -+ <message> -+ <source>Hide Details...</source> -+ <translation type="vanished">隱藏細節......</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>檔名稱</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>修改日期</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>檔案類型</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>檔大小</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>原始路徑</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>降序</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>升序</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>使用全域排序</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>清單檢視</translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>圖示檢視</translation> -+ </message> -+ <message> -+ <source>Close</source> -+ <translation type="obsolete">關閉</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>默認slide</translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>讓選項卡小部件切換為幻燈片動畫。</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2715"/> -+ <source>Open File</source> -+ <translation type="unfinished">打開</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2716"/> -+ <source>Save File</source> -+ <translation type="unfinished">保存</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2729"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished">所有(*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished">後退</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished">前進</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished">向上</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished">搜索</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished">視圖類型</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished">排序類型</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="265"/> -+ <location filename="../kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished">最大化</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished">關閉</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished">還原</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished">檔名</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="990"/> -+ <location filename="../kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished">打開</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="991"/> -+ <location filename="../kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished">取消</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished">另存為</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished">新建資料夾</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="999"/> -+ <location filename="../kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished">保存</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1035"/> -+ <location filename="../kyfiledialog.cpp" line="1036"/> -+ <location filename="../kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished">目錄</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished">警告</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished">已存在,是否替換?</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation type="unfinished">新建資料夾</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation type="unfinished">撤銷</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation type="unfinished">重做</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation type="unfinished">警告</translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished">不支援此操作。</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hans.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hans.ts -new file mode 100644 -index 0000000..7380cc3 ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hans.ts -@@ -0,0 +1,258 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="zh_Hans"> -+<context> -+ <name>KyFileDialogHelper</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2524"/> -+ <source>Open File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2525"/> -+ <source>Save File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2538"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>KyNativeFileDialog</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="192"/> -+ <source>Go Back</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="199"/> -+ <source>Go Forward</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="205"/> -+ <source>Cd Up</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="212"/> -+ <source>Search</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="220"/> -+ <source>View Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="231"/> -+ <source>Sort Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="348"/> -+ <source>Maximize</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="250"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="345"/> -+ <source>Restore</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="941"/> -+ <source>Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="944"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1532"/> -+ <source>Open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="945"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="954"/> -+ <source>Cancel</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="949"/> -+ <source>Save as</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -+ <source>New Folder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="953"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1536"/> -+ <source>Save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="989"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="992"/> -+ <source>Directories</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -+ <source>Warning</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1858"/> -+ <source>NewFolder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2146"/> -+ <source>Undo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2153"/> -+ <source>Redo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -+ <source>warn</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="166"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="190"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="192"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="423"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1106"/> -+ <source>OK</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="479"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="897"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <source>Show Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="897"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <source>Hide Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="19"/> -+ <source>File Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="23"/> -+ <source>Modified Date</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="27"/> -+ <source>File Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="31"/> -+ <source>File Size</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="35"/> -+ <source>Original Path</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="44"/> -+ <source>Descending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="49"/> -+ <source>Ascending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="55"/> -+ <source>Use global sorting</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="75"/> -+ <source>List View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="76"/> -+ <source>Icon View</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hant.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hant.ts -new file mode 100644 -index 0000000..39df820 ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hant.ts -@@ -0,0 +1,386 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="zh"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation>關閉</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>可執行檔「%1」 需要數量%2,找到數量%3。</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>不相容的Qt庫錯誤</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation>確認</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation>顯示細節......</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation>隱藏細節......</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>檔名稱</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>修改日期</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>檔案類型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>檔大小</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>原始路徑</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>降序</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>升序</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>使用全域排序</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>清單檢視</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>圖示檢視</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished">關閉</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>默認slide</translation> -+ </message> -+ <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>讓選項卡小部件切換為幻燈片動畫。</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> -+ <source>Open File</source> -+ <translation>打開</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> -+ <source>Save File</source> -+ <translation>保存</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> -+ <source>All Files (*)</source> -+ <translation>所有(*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>後退</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>前進</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>向上</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>搜索</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>視圖類型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>排序類型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>最大化</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>關閉</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>還原</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>檔名</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>打開</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>取消</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>另存為</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>新建資料夾</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>保存</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>目錄</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>警告</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>已存在,是否替換?</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> -+ <source>NewFolder</source> -+ <translation>新建資料夾</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> -+ <source>Undo</source> -+ <translation>撤銷</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> -+ <source>Redo</source> -+ <translation>重做</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>warn</source> -+ <translation>警告</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>This operation is not supported.</source> -+ <translation>不支援此操作。</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-filedialog/ui_kyfiledialog.cpp b/qt5-ukui-filedialog/ui_kyfiledialog.cpp -new file mode 100644 -index 0000000..04e1679 ---- /dev/null -+++ b/qt5-ukui-filedialog/ui_kyfiledialog.cpp -@@ -0,0 +1,505 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#include "debug.h" -+#include "ui_kyfiledialog.h" -+#include <QFileDialog> -+#include "kyfiledialog.h" -+#include "debug.h" -+using namespace UKUIFileDialog; -+//Ui_KyFileDialog::Ui_KyFileDialog(QDialog *parent) -+//{ -+// setupUi(parent); -+//} -+ -+Ui_KyFileDialog::Ui_KyFileDialog(QWidget *parent) : QWidget(parent) -+{ -+ -+} -+ -+Ui_KyFileDialog::~Ui_KyFileDialog() -+{ -+ pDebug << "Ui_KyFileDialog destory111.........."; -+/* -+ if(m_pathbarWidget){ -+ m_pathbarWidget->deleteLater(); -+ m_pathbarWidget = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory122222.........."; -+ -+ if(m_pathbar){ -+ m_pathbar->deleteLater(); -+ m_pathbar = nullptr; -+ } -+ if(m_searchBtn){ -+ m_searchBtn->deleteLater(); -+ m_searchBtn = nullptr; -+ } -+ if(m_backButton){ -+ m_backButton->deleteLater(); -+ m_backButton = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory3223.........."; -+ -+ if(m_forwardButton){ -+ m_forwardButton->deleteLater(); -+ m_forwardButton = nullptr; -+ } -+ if(m_toParentButton){ -+ m_toParentButton->deleteLater(); -+ m_toParentButton = nullptr; -+ } -+ if(m_modeButton){ -+ m_modeButton->deleteLater(); -+ m_modeButton = nullptr; -+ } -+ if(m_sortButton){ -+ m_sortButton->deleteLater(); -+ m_sortButton = nullptr; -+ } -+ if(m_maximizeAndRestore){ -+ m_maximizeAndRestore->deleteLater(); -+ m_maximizeAndRestore = nullptr; -+ } -+ if(m_closeButton){ -+ m_closeButton->deleteLater(); -+ m_closeButton = nullptr; -+ } -+ if(m_modeMenu){ -+ m_modeMenu->deleteLater(); -+ m_modeMenu = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory3555423.........."; -+ -+ if(m_sortMenu){ -+ m_sortMenu->deleteLater(); -+ m_sortMenu = nullptr; -+ } -+ if(m_listModeAction){ -+ m_listModeAction->deleteLater(); -+ m_listModeAction = nullptr; -+ } -+ if(m_iconModeAction){ -+ m_iconModeAction->deleteLater(); -+ m_iconModeAction = nullptr; -+ } -+ if(m_sider){ -+ m_sider->deleteLater(); -+ m_sider = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory223322.........."; -+ -+ if(m_frame){ -+ m_frame->deleteLater(); -+ m_frame = nullptr; -+ } -+ if(m_splitter){ -+ m_splitter->deleteLater(); -+ m_splitter = nullptr; -+ } -+ if(vboxLayout){ -+ vboxLayout->deleteLater(); -+ vboxLayout = nullptr; -+ } -+ if(m_treeView){ -+ m_treeView->deleteLater(); -+ m_treeView = nullptr; -+ } -+ if(m_fileNameLabel){ -+ m_fileNameLabel->deleteLater(); -+ m_fileNameLabel = nullptr; -+ } -+ if(m_fileNameEdit){ -+ m_fileNameEdit->deleteLater(); -+ m_fileNameEdit = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory1245677.........."; -+ -+ if(m_fileTypeCombo){ -+ m_fileTypeCombo->deleteLater(); -+ m_fileTypeCombo = nullptr; -+ } -+ if(m_newFolderButton){ -+ m_newFolderButton->deleteLater(); -+ m_newFolderButton = nullptr; -+ } -+ if(m_acceptButton){ -+ m_acceptButton->deleteLater(); -+ m_acceptButton = nullptr; -+ } -+ if(m_rejectButton){ -+ m_rejectButton->deleteLater(); -+ m_rejectButton = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory23467899.........."; -+ -+ if(m_upSeperate){ -+ m_upSeperate->deleteLater(); -+ m_upSeperate = nullptr; -+ } -+ if(m_downSeperate){ -+ m_downSeperate->deleteLater(); -+ m_downSeperate = nullptr; -+ } -+ if(m_widget){ -+ m_widget->deleteLater(); -+ m_widget = nullptr; -+ } -+ qDebug() << "destory345.........."; -+ -+ if(m_container){ -+ qDebug() << "destory555.........."; -+ -+ m_container->deleteLater(); -+ m_container = nullptr; -+ qDebug() << "destory666.........."; -+ -+ } -+ qDebug() << "destory777.........."; -+ -+ if(m_siderWidget){ -+ m_siderWidget->deleteLater(); -+ m_siderWidget = nullptr; -+ } -+ -+ if(m_sortTypeGroup){ -+ m_sortTypeGroup->deleteLater(); -+ m_sortTypeGroup = nullptr; -+ } -+ if(m_fileName){ -+ m_fileName->deleteLater(); -+ m_fileName = nullptr; -+ } -+ if(m_modifiedDate){ -+ m_modifiedDate->deleteLater(); -+ m_modifiedDate = nullptr; -+ } -+ if(m_fileType){ -+ m_fileType->deleteLater(); -+ m_fileType = nullptr; -+ } -+ if(m_fileSize){ -+ m_fileSize->deleteLater(); -+ m_fileSize = nullptr; -+ } -+ if(m_originalPath){ -+ m_originalPath->deleteLater(); -+ m_originalPath = nullptr; -+ } -+ if(m_sortOrderGroup){ -+ m_sortOrderGroup->deleteLater(); -+ m_sortOrderGroup = nullptr; -+ } -+ if(m_descending){ -+ m_descending->deleteLater(); -+ m_descending = nullptr; -+ } -+ if(m_ascending){ -+ m_ascending->deleteLater(); -+ m_ascending = nullptr; -+ } -+ if(m_useGlobalSortAction){ -+ m_useGlobalSortAction->deleteLater(); -+ m_useGlobalSortAction = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory8888.........."; -+ -+ if(m_siderLayout){ -+ m_siderLayout->deleteLater(); -+ m_siderLayout = nullptr; -+ } -+// if(m_gridLayout){ -+// m_gridLayout->deleteLater(); -+// m_gridLayout= nullptr; -+// } -+ -+ if(m_hHeaderLayout){ -+ m_hHeaderLayout->deleteLater(); -+ m_hHeaderLayout = nullptr; -+ } -+ if(m_hLineEditLayout){ -+ m_hLineEditLayout->deleteLater(); -+ m_hLineEditLayout = nullptr; -+ } -+ if(m_hBtnLayout){ -+ m_hBtnLayout->deleteLater(); -+ m_hBtnLayout = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory123.........."; -+*/ -+} -+ -+void Ui_KyFileDialog::initSortMenu(QDialog *mKyFileDialog) -+{ -+ m_sortButton = new MenuToolButton(this); -+ m_sortMenu = new QMenu(m_sortButton); -+ -+ m_sortTypeGroup = new QActionGroup(m_sortMenu); -+ m_sortTypeGroup->setExclusive(true); -+ -+ m_fileName = m_sortMenu->addAction(QObject::tr("File Name")); -+ m_fileName->setCheckable(true); -+ m_sortTypeGroup->addAction(m_fileName); -+ -+ m_modifiedDate = m_sortMenu->addAction(QObject::tr("Modified Date")); -+ m_modifiedDate->setCheckable(true); -+ m_sortTypeGroup->addAction(m_modifiedDate); -+ -+ m_fileType = m_sortMenu->addAction(QObject::tr("File Type")); -+ m_fileType->setCheckable(true); -+ m_sortTypeGroup->addAction(m_fileType); -+ -+ m_fileSize = m_sortMenu->addAction(QObject::tr("File Size")); -+ m_fileSize->setCheckable(true); -+ m_sortTypeGroup->addAction(m_fileSize); -+ -+ m_originalPath = m_sortMenu->addAction(QObject::tr("Original Path")); -+ m_originalPath->setCheckable(true); -+ m_sortTypeGroup->addAction(m_originalPath); -+ -+ m_sortMenu->addSeparator(); -+ -+ m_sortOrderGroup = new QActionGroup(m_sortMenu); -+ m_sortOrderGroup->setExclusive(true); -+ -+ m_descending = m_sortMenu->addAction(QObject::tr("Descending")); -+ m_descending->setCheckable(true); -+ m_sortOrderGroup->addAction(m_descending); -+ -+ //switch defautl Descending Ascending order, fix bug#99924 -+ m_ascending = m_sortMenu->addAction(QObject::tr("Ascending")); -+ m_ascending->setCheckable(true); -+ m_sortOrderGroup->addAction(m_ascending); -+ -+ m_sortMenu->addSeparator(); -+ -+ m_useGlobalSortAction = m_sortMenu->addAction(QObject::tr("Use global sorting")); -+ m_useGlobalSortAction->setCheckable(true); -+ -+ m_sortButton->setMenu(m_sortMenu); -+ m_sortButton->setPopupMode(QToolButton::InstantPopup); -+ m_sortButton->setAutoRaise(true); -+ m_sortButton->setFixedSize(QSize(57, 40)); -+ m_sortButton->setIconSize(QSize(16, 16)); -+ -+} -+ -+void Ui_KyFileDialog::initModeMenu(QDialog *mKyFileDialog) -+{ -+ m_modeButton = new MenuToolButton(this); -+ m_modeButton->setPopupMode(QToolButton::InstantPopup); -+ m_modeButton->setAutoRaise(true); -+ m_modeButton->setFixedSize(QSize(57, 40)); -+ m_modeButton->setIconSize(QSize(16, 16)); -+ -+ m_modeMenu = new QMenu(m_modeButton); -+ m_listModeAction = m_modeMenu->addAction(QIcon::fromTheme("view-list-symbolic"), QObject::tr("List View")); -+ m_iconModeAction = m_modeMenu->addAction(QIcon::fromTheme("view-grid-symbolic"), QObject::tr("Icon View")); -+ m_listModeAction->setCheckable(true); -+ m_iconModeAction->setCheckable(true); -+ m_modeButton->setMenu(m_modeMenu); -+} -+ -+void Ui_KyFileDialog::initSiderBar(QDialog *mKyFileDialog) -+{ -+ m_siderWidget = new QWidget(this); -+ m_siderLayout = new QVBoxLayout(); -+ m_siderLayout->setContentsMargins(0,0,0,0); -+ -+ m_sider = new FileDialogSideBar(this); -+ m_sider->setAttribute(Qt::WA_TranslucentBackground); -+} -+ -+void Ui_KyFileDialog::initHeaderBar(QDialog *mKyFileDialog) -+{ -+ m_hHeaderLayout = new QHBoxLayout(this); -+ initModeMenu(mKyFileDialog); -+ initSortMenu(mKyFileDialog); -+ -+ m_hHeaderLayout->setContentsMargins(0,0,8,0); -+ m_hHeaderLayout->setObjectName(QString::fromUtf8("hboxLayout")); -+ m_backButton = new QToolButton(this); -+ m_forwardButton = new QToolButton(this); -+ m_toParentButton = new QToolButton(this); -+ -+ m_pathbarWidget = new FileDialogPathBar(this);//new Peony::AdvancedLocationBar(mKyFileDialog);// -+ m_pathbar = m_pathbarWidget->getPathBar(); -+ m_pathbar->setMinimumWidth(250); -+ m_pathbar->setFocusPolicy(Qt::FocusPolicy(m_pathbar->focusPolicy() & ~Qt::TabFocus)); -+ -+ m_searchBtn = new QToolButton(this); -+ -+ m_maximizeAndRestore = new QToolButton(this); -+ -+ m_closeButton = new QToolButton(this); -+ m_hHeaderLayout->setAlignment(Qt::AlignVCenter); -+ -+ m_hHeaderLayout->addWidget(m_backButton); -+ m_hHeaderLayout->addWidget(m_forwardButton); -+ m_hHeaderLayout->addWidget(m_toParentButton); -+ m_hHeaderLayout->addWidget(m_pathbarWidget); -+ m_hHeaderLayout->addWidget(m_searchBtn); -+ m_hHeaderLayout->addWidget(m_modeButton); -+ m_hHeaderLayout->addWidget(m_sortButton); -+ m_hHeaderLayout->addWidget(m_maximizeAndRestore); -+ m_hHeaderLayout->addWidget(m_closeButton); -+ -+} -+ -+void Ui_KyFileDialog::initLineEditLayout(QDialog *mKyFileDialog) -+{ -+ m_hLineEditLayout = new QHBoxLayout(this); -+ m_hLineEditLayout->setContentsMargins(4,0,24,0); -+ m_fileNameLabel = new QLabel(this); -+ m_fileNameLabel->setObjectName(QString::fromUtf8("fileNameLabel")); -+ QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred); -+ sizePolicy2.setHorizontalStretch(0); -+ sizePolicy2.setVerticalStretch(0); -+ sizePolicy2.setHeightForWidth(m_fileNameLabel->sizePolicy().hasHeightForWidth()); -+ m_fileNameLabel->setSizePolicy(sizePolicy2); -+ m_fileNameLabel->setMinimumSize(QSize(0, 0)); -+ pDebug << "3333333333333333333"; -+ -+ m_fileNameEdit = new QLineEdit(mKyFileDialog); -+ m_fileNameEdit->setObjectName("fileNameEdit"); -+ QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Fixed); -+ sizePolicy3.setHorizontalStretch(1); -+ sizePolicy3.setVerticalStretch(0); -+ sizePolicy3.setHeightForWidth(m_fileNameEdit->sizePolicy().hasHeightForWidth()); -+ m_fileNameEdit->setSizePolicy(sizePolicy3); -+ pDebug << "44444444444444444"; -+ -+ m_fileTypeCombo = new FileDialogComboBox(this); -+ QSizePolicy sizePolicy4(QSizePolicy::Expanding, QSizePolicy::Fixed); -+ sizePolicy4.setHorizontalStretch(0); -+ sizePolicy4.setVerticalStretch(0); -+ sizePolicy4.setHeightForWidth(m_fileTypeCombo->sizePolicy().hasHeightForWidth()); -+ m_fileTypeCombo->setSizePolicy(sizePolicy4); -+// m_fileTypeCombo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength); -+ //m_fileTypeCombo->setVisible(false); -+ -+ m_hLineEditLayout->addWidget(m_fileNameLabel); -+ m_hLineEditLayout->addWidget(m_fileNameEdit); -+ m_hLineEditLayout->addWidget(m_fileTypeCombo); -+ m_hLineEditLayout->setSpacing(15); -+} -+ -+void Ui_KyFileDialog::intiBtnLayout(QDialog *mKyFileDialog) -+{ -+ m_hBtnLayout = new QHBoxLayout(this); -+ m_hBtnLayout->addSpacing(20); -+ m_hBtnLayout->setContentsMargins(0,0,24,0); -+ m_newFolderButton =new QPushButton(mKyFileDialog); -+ m_newFolderButton->setObjectName(QString::fromUtf8("newFolderButton")); -+ m_hBtnLayout->addWidget(m_newFolderButton); -+ -+ -+ m_acceptButton = new QPushButton(mKyFileDialog); -+ m_rejectButton = new QPushButton(mKyFileDialog); -+ m_acceptButton->setEnabled(false); -+ m_hBtnLayout->addStretch(); -+ m_hBtnLayout->addWidget(m_rejectButton, 0, Qt::AlignRight | Qt::AlignVCenter); -+ m_hBtnLayout->addSpacing(15); -+ m_hBtnLayout->addWidget(m_acceptButton, 0, Qt::AlignRight | Qt::AlignVCenter); -+ -+ m_acceptButton->setObjectName(QString::fromUtf8("acceptButton")); -+ m_rejectButton->setObjectName(QString::fromUtf8("rejectButton")); -+ -+ pDebug << "6666666666666666"; -+} -+ -+void Ui_KyFileDialog::setupUi(QDialog *mKyFileDialog) -+{ -+ if(mKyFileDialog->objectName().isEmpty()) { -+ mKyFileDialog->setObjectName(QString::fromUtf8("KyNativeFileDialog")); -+ } -+ mKyFileDialog->resize(1160, 635); -+ -+ mKyFileDialog->setSizeGripEnabled(true); -+ mKyFileDialog->setAttribute(Qt::WA_TranslucentBackground); -+ mKyFileDialog->setContentsMargins(0,0,0,0); -+ -+ m_gridLayout = new QGridLayout(mKyFileDialog); -+ m_gridLayout->setObjectName(QString::fromUtf8("gridLayout")); -+ -+ m_container = new Peony::DirectoryViewContainer(this); -+ m_frame = new QFrame(this); -+ vboxLayout = new QVBoxLayout(this); -+ -+ initSiderBar(mKyFileDialog); -+ -+ initHeaderBar(mKyFileDialog); -+ initLineEditLayout(mKyFileDialog); -+ intiBtnLayout(mKyFileDialog); -+ -+ vboxLayout->addSpacing(8); -+ vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); -+ vboxLayout->setContentsMargins(0, 0, 0, 0); -+ -+ vboxLayout->addLayout(m_hHeaderLayout); -+ vboxLayout->addSpacing(6); -+ m_upSeperate = new QFrame(mKyFileDialog); -+ m_upSeperate->setFrameShape(QFrame::HLine); -+ m_upSeperate->setFrameShadow(QFrame::Plain); -+ vboxLayout->addWidget(m_upSeperate); -+ vboxLayout->addSpacing(6); -+ vboxLayout->addWidget(m_container); -+ vboxLayout->addSpacing(15); -+ -+ vboxLayout->addLayout(m_hLineEditLayout); -+ vboxLayout->addSpacing(16); -+ -+ m_downSeperate = new QFrame(mKyFileDialog); -+ m_downSeperate->setFrameShape(QFrame::HLine); -+ m_downSeperate->setFrameShadow(QFrame::Plain); -+ vboxLayout->addWidget(m_downSeperate); -+ vboxLayout->addSpacing(16); -+ -+ vboxLayout->addLayout(m_hBtnLayout); -+ vboxLayout->addSpacing(25); -+ -+ m_frame->setFrameShadow(QFrame::Raised); -+ m_frame->setFrameShape(QFrame::NoFrame); -+ m_frame->setLayout(vboxLayout); -+ -+ m_splitter = new QSplitter(this); -+ m_splitter->setAttribute(Qt::WA_TranslucentBackground); -+ QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding); -+ sizePolicy1.setHorizontalStretch(0); -+ sizePolicy1.setVerticalStretch(0); -+ sizePolicy1.setHeightForWidth(m_splitter->sizePolicy().hasHeightForWidth()); -+ m_splitter->setSizePolicy(sizePolicy1); -+ m_splitter->setOrientation(Qt::Horizontal); -+ m_splitter->setHandleWidth(0); -+ m_siderLayout->addWidget(m_sider); -+ m_siderWidget->setLayout(m_siderLayout); -+ m_splitter->addWidget(m_siderWidget); -+ m_splitter->setStretchFactor(0, 20); -+ m_splitter->addWidget(m_frame); -+ m_splitter->setStretchFactor(1, 40); -+ int siderWidIndex = m_splitter->indexOf(m_siderWidget); -+ int frameIndex = m_splitter->indexOf(m_frame); -+ m_splitter->setCollapsible(siderWidIndex, false); -+ m_splitter->setCollapsible(frameIndex, false); -+ m_gridLayout->addWidget(m_splitter); -+ m_gridLayout->setContentsMargins(0,0,0,0); -+} -diff --git a/qt5-ukui-filedialog/ui_kyfiledialog.h b/qt5-ukui-filedialog/ui_kyfiledialog.h -new file mode 100644 -index 0000000..106aaa7 ---- /dev/null -+++ b/qt5-ukui-filedialog/ui_kyfiledialog.h -@@ -0,0 +1,126 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#include "debug.h" -+#ifndef UI_KYFILEDIALOG_H -+#define UI_KYFILEDIALOG_H -+#include <QApplication> -+#include <QComboBox> -+#include <QTreeView> -+#include <QToolButton> -+#include <QLineEdit> -+#include <QFrame> -+#include <QSplitter> -+#include <QLabel> -+#include <QMenu> -+#include <QAction> -+#include <QGridLayout> -+#include <QHBoxLayout> -+#include <QVBoxLayout> -+#include <QDialogButtonBox> -+#include <QDebug> -+#include "sidebar.h" -+#include <QSizePolicy> -+#include "kyfiledialog.h" -+#include <peony-qt/controls/directory-view/directory-view-container.h> -+#include <peony-qt/controls/navigation-bar/advanced-location-bar.h> -+#include "pathbar.h" -+#include <QPushButton> -+#include <QToolBar> -+#include <QObject> -+#include <QDialog> -+#include "menutoolbutoon.h" -+ -+namespace Peony { -+class DirectoryViewContainer; -+} -+namespace UKUIFileDialog { -+class Ui_KyFileDialog: public QWidget -+{ -+ QOBJECT_H -+ public: -+ explicit Ui_KyFileDialog(QWidget *parent = nullptr); -+ ~Ui_KyFileDialog(); -+ -+ QGridLayout *m_gridLayout = nullptr; -+ QHBoxLayout *m_hHeaderLayout = nullptr; -+ QHBoxLayout *m_hLineEditLayout = nullptr; -+ QHBoxLayout *m_hBtnLayout = nullptr; -+ FileDialogPathBar *m_pathbarWidget = nullptr; -+ Peony::AdvancedLocationBar *m_pathbar = nullptr; -+ QToolButton *m_searchBtn = nullptr; -+ //QWidget *m_pathbar = nullptr; -+ QToolButton *m_backButton = nullptr; -+ QToolButton *m_forwardButton = nullptr; -+ QToolButton *m_toParentButton = nullptr; -+ MenuToolButton *m_modeButton = nullptr; -+ MenuToolButton *m_sortButton = nullptr; -+ QToolButton *m_maximizeAndRestore = nullptr; -+ QToolButton *m_closeButton = nullptr; -+ QMenu *m_modeMenu = nullptr; -+ QMenu *m_sortMenu = nullptr; -+ QAction *m_listModeAction = nullptr; -+ QAction *m_iconModeAction = nullptr; -+ FileDialogSideBar *m_sider = nullptr; -+ QFrame *m_frame = nullptr; -+ QSplitter *m_splitter = nullptr; -+ QVBoxLayout *vboxLayout = nullptr; -+ QTreeView *m_treeView = nullptr; -+ QLabel *m_fileNameLabel = nullptr; -+ QLineEdit *m_fileNameEdit = nullptr; -+ FileDialogComboBox *m_fileTypeCombo = nullptr; -+ QPushButton *m_newFolderButton = nullptr; -+ QPushButton *m_acceptButton = nullptr; -+ QPushButton *m_rejectButton = nullptr; -+ QFrame *m_upSeperate = nullptr; -+ QFrame *m_downSeperate = nullptr; -+ -+ QWidget *m_widget = nullptr; -+ Peony::DirectoryViewContainer *m_container = nullptr; -+ -+ QWidget *m_siderWidget = nullptr; -+ QVBoxLayout *m_siderLayout = nullptr; -+ -+ QActionGroup *m_sortTypeGroup = nullptr; -+ QAction *m_fileName = nullptr; -+ QAction *m_modifiedDate = nullptr; -+ QAction *m_fileType = nullptr; -+ QAction *m_fileSize = nullptr; -+ QAction *m_originalPath = nullptr; -+ QActionGroup *m_sortOrderGroup = nullptr; -+ QAction *m_descending = nullptr; -+ QAction *m_ascending = nullptr; -+ QAction *m_useGlobalSortAction = nullptr; -+ -+public: -+ void setupUi(QDialog *mKyFileDialog); -+ -+private: -+ void initSortMenu(QDialog *mKyFileDialog); -+ void initModeMenu(QDialog *mKyFileDialog); -+ void initSiderBar(QDialog *mKyFileDialog); -+ void initHeaderBar(QDialog *mKyFileDialog); -+ void initLineEditLayout(QDialog *mKyFileDialog); -+ void intiBtnLayout(QDialog *mKyFileDialog); -+}; -+} -+#endif // UI_KYFILEDIALOG_H -diff --git a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -index c056682..12215ed 100644 ---- a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -+++ b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -@@ -48,10 +48,9 @@ - #include <QQuickStyle> - - #include "widget/messagebox/message-box.h" --#include "widget/filedialog/kyfiledialog.h" --#include "widget/filedialog/debug.h" -+//#include "widget/filedialog/kyfiledialog.h" - #include "platform-theme-fontdata.h" --using namespace UKUIFileDialog; -+#include "../qt5-ukui-filedialog/filedialoginterface.h" - - #if !defined(QT_NO_DBUS) && !defined(QT_NO_SYSTEMTRAYICON) - static bool isDBusTrayAvailable() { -@@ -291,9 +290,18 @@ bool Qt5UKUIPlatformTheme::usePlatformNativeDialog(DialogType type) const - - QPlatformDialogHelper *Qt5UKUIPlatformTheme::createPlatformDialogHelper(DialogType type) const - { -+ QObject* plugin = nullptr; -+ if (QFile::exists(QString("%1/platformthemes/libqt5-ukui-filedialog.so").arg(QT_PLUGIN_INSTALL_DIRS))) { -+ QPluginLoader loader(QString("%1/platformthemes/libqt5-ukui-filedialog.so").arg(QT_PLUGIN_INSTALL_DIRS)); -+ plugin = loader.instance(); -+ } -+ - switch (type) { - case QPlatformTheme::FileDialog: -- return new KyFileDialogHelper; -+ if (plugin) { -+ return qobject_cast<FileDialogInterface *>(plugin)->create(); -+ } -+ //return new KyFileDialogHelper; - case QPlatformTheme::FontDialog: - case QPlatformTheme::ColorDialog: - return QPlatformTheme::createPlatformDialogHelper(type); -diff --git a/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro b/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro -index 90842aa..c47c5cd 100644 ---- a/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro -+++ b/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro -@@ -15,7 +15,7 @@ TARGET = qt5-ukui-platformtheme - TEMPLATE = lib - CONFIG += plugin - CONFIG += c++11 link_pkgconfig lrelease --PKGCONFIG += gsettings-qt Qt5XdgIconLoader peony kysdk-waylandhelper fontconfig freetype2 -+PKGCONFIG += gsettings-qt Qt5XdgIconLoader kysdk-waylandhelper fontconfig freetype2 gio-2.0 - LIBS += -lX11 -lfontconfig -lfreetype - - include(../libqt5-ukui-style/libqt5-ukui-style.pri) -@@ -46,26 +46,29 @@ include(widget/widget.pri) - SOURCES += \ - qt5-ukui-platform-theme.cpp \ - platform-theme-fontdata.cpp \ -- main.cpp -+ xatom-helper.cpp \ -+ main.cpp - - HEADERS += \ - qt5-ukui-platform-theme.h \ - qt5-ukui-platformtheme_global.h \ -- platform-theme-fontdata.h -+ platform-theme-fontdata.h \ -+ ../qt5-ukui-filedialog/filedialoginterface.h \ -+ xatom-helper.h - - TRANSLATIONS += \ -- $$PWD/translations/qt5-ukui-platformtheme_zh_CN.ts \ -- $$PWD/translations/qt5-ukui-platformtheme_en_US.ts \ -- $$PWD/translations/qt5-ukui-platformtheme_fa.ts \ -- $$PWD/translations/qt5-ukui-platformtheme_fr.ts \ -- $$PWD/translations/qt5-ukui-platformtheme_cs.ts \ -- $$PWD/translations/qt5-ukui-platformtheme_bo_CN.ts \ -- $$PWD/translations/qt5-ukui-platformtheme_tr.ts \ -- $$PWD/translations/qt5-ukui-platformtheme_mn.ts \ -- $$PWD/translations/qt5-ukui-platformtheme_kk.ts \ -- $$PWD/translations/qt5-ukui-platformtheme_ky.ts \ -- $$PWD/translations/qt5-ukui-platformtheme_ug.ts \ -- $$PWD/translations/qt5-ukui-platformtheme_zh_HK.ts -+ translations/qt5-ukui-platformtheme_zh_CN.ts \ -+ translations/qt5-ukui-platformtheme_en_US.ts \ -+ translations/qt5-ukui-platformtheme_fa.ts \ -+ translations/qt5-ukui-platformtheme_fr.ts \ -+ translations/qt5-ukui-platformtheme_cs.ts \ -+ translations/qt5-ukui-platformtheme_bo_CN.ts \ -+ translations/qt5-ukui-platformtheme_tr.ts \ -+ translations/qt5-ukui-platformtheme_mn.ts \ -+ translations/qt5-ukui-platformtheme_kk.ts \ -+ translations/qt5-ukui-platformtheme_ky.ts \ -+ translations/qt5-ukui-platformtheme_ug.ts \ -+ translations/qt5-ukui-platformtheme_zh_HK.ts - - unix { - target.path = $$[QT_INSTALL_PLUGINS]/platformthemes -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_bo_CN.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_bo_CN.ts -index e612f92..90264f6 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_bo_CN.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_bo_CN.ts -@@ -1,127 +1,6 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="bo_CN"> --<context> -- <name>MainWindow</name> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -- <source>MainWindow</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -- <source>test open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -- <source>directory</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -- <source>selected uri</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -- <source>test show</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -- <source>test exec</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -- <source>test save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -- <source>test static open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -- <source>PushButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -- <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -- <source>...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -- <source>highlightOnly</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -- <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -- <source>RadioButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -- <source>style</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -- <source>icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -- <source>menu opacity</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -- <source>font</source> -- <translation type="unfinished"></translation> -- </message> --</context> - <context> - <name>MessageBox</name> - <message> -@@ -171,54 +50,44 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation>ཡིག་ཆའི་མིང་།</translation> -+ <translation type="vanished">ཡིག་ཆའི་མིང་།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation>བཟོ་བཅོས་བརྒྱབ་པའི་དུས་ཚོད།</translation> -+ <translation type="vanished">བཟོ་བཅོས་བརྒྱབ་པའི་དུས་ཚོད།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation>ཡིག་ཆའི་རིགས་གྲས།</translation> -+ <translation type="vanished">ཡིག་ཆའི་རིགས་གྲས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation>ཡིག་ཆའི་ཆེ་ཆུང་།</translation> -+ <translation type="vanished">ཡིག་ཆའི་ཆེ་ཆུང་།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation>ཐོག་མའི་འགྲོ་ལམ།</translation> -+ <translation type="vanished">ཐོག་མའི་འགྲོ་ལམ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation>མར་འབབ་པ།</translation> -+ <translation type="vanished">མར་འབབ་པ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation>རིམ་པ་ཇེ་མང་དུ་འགྲོ་བཞིན།</translation> -+ <translation type="vanished">རིམ་པ་ཇེ་མང་དུ་འགྲོ་བཞིན།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation>ཁྱོན་ཡོངས་ཀྱི་གོ་རིམ་བེད་སྤྱོད།</translation> -+ <translation type="vanished">ཁྱོན་ཡོངས་ཀྱི་གོ་རིམ་བེད་སྤྱོད།</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation>མཐོང་རིས་རེའུ་མིག</translation> -+ <translation type="vanished">མཐོང་རིས་རེའུ་མིག</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation>མཚོན་རྟགས་ལྟ་ཚུལ།</translation> -+ <translation type="vanished">མཚོན་རྟགས་ལྟ་ཚུལ།</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="730"/> -@@ -229,13 +98,11 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation>ཁ་ཆད་བཞག་པའི་སྒྲོན་བརྙན</translation> - </message> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation>སྒྲོན་བརྙན་གྱི་འགུལ་རིས་ལ་བརྟེན་ནས་ཤོག་བྱང་ཆུང་ཆུང་བརྗེ་རེས་བྱེད་དུ་འཇུག་དགོས།</translation> -@@ -244,143 +111,111 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> -- <translation>ཁ་ཕྱེ་བའི་ཡིག་ཆ།</translation> -+ <translation type="vanished">ཁ་ཕྱེ་བའི་ཡིག་ཆ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> -- <translation>ཡིག་ཆ་ཉར་ཚགས་བྱེད་པ།</translation> -+ <translation type="vanished">ཡིག་ཆ་ཉར་ཚགས་བྱེད་པ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> -- <translation>ཡིག་ཆ་ཡོད་ཚད་(*)</translation> -+ <translation type="vanished">ཡིག་ཆ་ཡོད་ཚད་(*)</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation>ཕྱིར་ལོག</translation> -+ <translation type="vanished">ཕྱིར་ལོག</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation>མདུན་སྐྱོད།</translation> -+ <translation type="vanished">མདུན་སྐྱོད།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation>གོང་ཕྱོགས།</translation> -+ <translation type="vanished">གོང་ཕྱོགས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation>འཚོལ་ཞིབ།</translation> -+ <translation type="vanished">འཚོལ་ཞིབ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation>མཐོང་རིས་ཀྱི་རིགས།</translation> -+ <translation type="vanished">མཐོང་རིས་ཀྱི་རིགས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation>གོ་རིམ་གྱི་རིགས།</translation> -+ <translation type="vanished">གོ་རིམ་གྱི་རིགས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation>ཆེས་ཆེ་བསྒྱུར།</translation> -+ <translation type="vanished">ཆེས་ཆེ་བསྒྱུར།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation>ཁ་རྒྱག་པ།</translation> -+ <translation type="vanished">ཁ་རྒྱག་པ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation>སླར་གསོ་བྱེད་པ།</translation> -+ <translation type="vanished">སླར་གསོ་བྱེད་པ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation>ཡིག་ཆའི་མིང་།</translation> -+ <translation type="vanished">ཡིག་ཆའི་མིང་།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation>སྒོ་ཕྱེ་བ།</translation> -+ <translation type="vanished">སྒོ་ཕྱེ་བ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation>ཕྱིར་འཐེན།</translation> -+ <translation type="vanished">ཕྱིར་འཐེན།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation>ཉར་ཚགས་གཞན།</translation> -+ <translation type="vanished">ཉར་ཚགས་གཞན།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation>ཡིག་ཁུག་གསར་འཛུགས།</translation> -+ <translation type="vanished">ཡིག་ཁུག་གསར་འཛུགས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation>གྲོན་ཆུང་བྱེད་དགོས།</translation> -+ <translation type="vanished">གྲོན་ཆུང་བྱེད་དགོས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation>དཀར་ཆག</translation> -+ <translation type="vanished">དཀར་ཆག</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation>ཐ་ཚིག་སྒྲོག་པ།</translation> -+ <translation type="vanished">ཐ་ཚིག་སྒྲོག་པ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation>གནས་ཡོད་པས། ཁྱོད་ཀྱིས་དངོས་གནས་ཚབ་བྱེད་ཐུབ་བམ།</translation> -+ <translation type="vanished">གནས་ཡོད་པས། ཁྱོད་ཀྱིས་དངོས་གནས་ཚབ་བྱེད་ཐུབ་བམ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> -- <translation>དཀར་ཆག་གསར་བ།</translation> -+ <translation type="vanished">དཀར་ཆག་གསར་བ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> -- <translation>ཁ་ཕྱིར་འཐེན་བྱ་དགོས།</translation> -+ <translation type="vanished">ཁ་ཕྱིར་འཐེན་བྱ་དགོས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> -- <translation>ཡང་བསྐྱར་ལས།</translation> -+ <translation type="vanished">ཡང་བསྐྱར་ལས།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> -- <translation>ཉེན་བརྡ་བཏང་བ།</translation> -+ <translation type="vanished">ཉེན་བརྡ་བཏང་བ།</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> -- <translation>བཀོལ་སྤྱོད་འདི་ལ་རྒྱབ་སྐྱོར་མི་བྱེད།</translation> -+ <translation type="vanished">བཀོལ་སྤྱོད་འདི་ལ་རྒྱབ་སྐྱོར་མི་བྱེད།</translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_cs.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_cs.ts -index 4dead9a..e5044d1 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_cs.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_cs.ts -@@ -1,127 +1,6 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="cs_CZ"> --<context> -- <name>MainWindow</name> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -- <source>MainWindow</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -- <source>test open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -- <source>directory</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -- <source>selected uri</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -- <source>test show</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -- <source>test exec</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -- <source>test save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -- <source>test static open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -- <source>PushButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -- <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -- <source>...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -- <source>highlightOnly</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -- <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -- <source>RadioButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -- <source>style</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -- <source>icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -- <source>menu opacity</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -- <source>font</source> -- <translation type="unfinished"></translation> -- </message> --</context> - <context> - <name>MessageBox</name> - <message> -@@ -170,56 +49,6 @@ - </context> - <context> - <name>QObject</name> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> -- <source>File Name</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> -- <source>Modified Date</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> -- <source>File Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> -- <source>File Size</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> -- <source>Original Path</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> -- <source>Descending</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> -- <source>Ascending</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> -- <source>Use global sorting</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> -- <source>List View</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> -- <source>Icon View</source> -- <translation type="unfinished"></translation> -- </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> -@@ -229,158 +58,14 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> - </message> - </context> --<context> -- <name>UKUIFileDialog::KyFileDialogHelper</name> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> -- <source>Open File</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> -- <source>Save File</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> -- <source>All Files (*)</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyNativeFileDialog</name> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> -- <source>Go Back</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> -- <source>Go Forward</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> -- <source>Cd Up</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -- <source>Search</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> -- <source>View Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> -- <source>Sort Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> -- <source>Maximize</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> -- <source>Close</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> -- <source>Restore</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> -- <source>Name</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> -- <source>Open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> -- <source>Cancel</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -- <source>Save as</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> -- <source>New Folder</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> -- <source>Save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> -- <source>Directories</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -- <source>Warning</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -- <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> -- <source>NewFolder</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> -- <source>Undo</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> -- <source>Redo</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -- <source>warn</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -- <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -- </message> --</context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_de.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_de.ts -index 2f059f1..4a62991 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_de.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_de.ts -@@ -4,120 +4,97 @@ - <context> - <name>MainWindow</name> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> - <source>MainWindow</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> - <source>test open</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> - <source>directory</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> - <source>selected uri</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> - <source>test show</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> - <source>test exec</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> - <source>test save</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> - <source>test static open</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> - <source>PushButton</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> - <source>use auto highlight icon</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> - <source>...</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> - <source>highlightOnly</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> - <source>bothDefaultAndHighlight</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> - <source>RadioButton</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> - <source>style</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> - <source>icon</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> - <source>menu opacity</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> - <source>font</source> - <translation type="unfinished"></translation> - </message> -@@ -125,7 +102,7 @@ - <context> - <name>MessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="97"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> - <translation>Schließen</translation> - </message> -@@ -133,12 +110,12 @@ - <context> - <name>QApplication</name> - <message> -- <location filename="../widget/messagebox/message-box.h" line="272"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> - <translation>Die ausführbare Datei '%1' erfordert Qt %2, Qt %3 gefunden.</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.h" line="274"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> - <translation>Fehler in der inkompatiblen Qt-Bibliothek</translation> - </message> -@@ -146,8 +123,8 @@ - <context> - <name>QDialogButtonBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="362"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1090"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> - <translation>OKAY</translation> - </message> -@@ -155,15 +132,15 @@ - <context> - <name>QMessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="418"/> -- <location filename="../widget/messagebox/message-box.cpp" line="881"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> - <translation>Details anzeigen...</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="881"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> - <translation>Details ausblenden...</translation> - </message> -@@ -171,57 +148,57 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> - <translation>Dateiname</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> - <translation>Änderungsdatum</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> - <translation>Dateityp</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> - <translation>Dateigröße</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> - <translation>Ursprünglicher Pfad</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> - <translation>Absteigend</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> - <translation>Aufsteigend</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> - <translation>Globale Sortierung verwenden</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> - <translation>Listenansicht</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> - <translation>Icon-Ansicht</translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="730"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> - <translation>Schließen</translation> - </message> -@@ -229,14 +206,12 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation>Standard-Folie</translation> - </message> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation>Lassen Sie das Tab-Widget mit einer Folienanimation wechseln.</translation> - </message> -@@ -244,17 +219,17 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> - <source>Open File</source> - <translation>Offene Linie</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> - <source>Save File</source> - <translation>Datei speichern</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> - <source>All Files (*)</source> - <translation>Alle Dateien (*)</translation> - </message> -@@ -262,123 +237,123 @@ - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> - <translation>Zurück</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> - <translation>Vorwärts gehen</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> - <translation>Cd nach oben</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> - <translation>Suchen</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> - <translation>Typ der Ansicht</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> - <translation>Art der Sortierung</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> - <translation>Maximieren</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> - <translation>Schließen</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> - <translation>Wiederherstellen</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> - <translation>Name</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> - <translation>Offen</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> - <translation>Abbrechen</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> - <translation>Speichern unter</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> - <translation>Neuer Ordner</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> - <translation>Retten</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> - <translation>Verzeichnisse</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> - <translation>Warnung</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> - <translation>existieren, sind Sie sicher, ersetzen?</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> - <source>NewFolder</source> - <translation>Neuer Ordner</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> - <source>Undo</source> - <translation>Aufmachen</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> - <source>Redo</source> - <translation>Noch einmal machen</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> - <source>warn</source> - <translation>warnen</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> - <source>This operation is not supported.</source> - <translation>Dieser Vorgang wird nicht unterstützt.</translation> - </message> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_en_US.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_en_US.ts -index e31ff34..84b60c3 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_en_US.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_en_US.ts -@@ -1,127 +1,6 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="en_US"> --<context> -- <name>MainWindow</name> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -- <source>MainWindow</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -- <source>test open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -- <source>directory</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -- <source>selected uri</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -- <source>test show</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -- <source>test exec</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -- <source>test save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -- <source>test static open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -- <source>PushButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -- <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -- <source>...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -- <source>highlightOnly</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -- <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -- <source>RadioButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -- <source>style</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -- <source>icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -- <source>menu opacity</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -- <source>font</source> -- <translation type="unfinished"></translation> -- </message> --</context> - <context> - <name>MessageBox</name> - <message> -@@ -171,54 +50,44 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation>File Name</translation> -+ <translation type="vanished">File Name</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation>Modified Date</translation> -+ <translation type="vanished">Modified Date</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation>File Type</translation> -+ <translation type="vanished">File Type</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation>File Size</translation> -+ <translation type="vanished">File Size</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation>Original Path</translation> -+ <translation type="vanished">Original Path</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation>Descending</translation> -+ <translation type="vanished">Descending</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation>Ascending</translation> -+ <translation type="vanished">Ascending</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation>Use global sorting</translation> -+ <translation type="vanished">Use global sorting</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation>List View</translation> -+ <translation type="vanished">List View</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation>Icon View</translation> -+ <translation type="vanished">Icon View</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="730"/> -@@ -229,13 +98,11 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> -@@ -244,143 +111,111 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> -- <translation>Open File</translation> -+ <translation type="vanished">Open File</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> -- <translation>Save File</translation> -+ <translation type="vanished">Save File</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> -- <translation>All Files (*)</translation> -+ <translation type="vanished">All Files (*)</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation>Go Back</translation> -+ <translation type="vanished">Go Back</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation>Go Forward</translation> -+ <translation type="vanished">Go Forward</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation>Cd Up</translation> -+ <translation type="vanished">Cd Up</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation>Search</translation> -+ <translation type="vanished">Search</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation>View Type</translation> -+ <translation type="vanished">View Type</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation>Sort Type</translation> -+ <translation type="vanished">Sort Type</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation>Maximize</translation> -+ <translation type="vanished">Maximize</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation>Close</translation> -+ <translation type="vanished">Close</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation>Restore</translation> -+ <translation type="vanished">Restore</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation>Name</translation> -+ <translation type="vanished">Name</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation>Open</translation> -+ <translation type="vanished">Open</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation>Cancel</translation> -+ <translation type="vanished">Cancel</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation>Save as</translation> -+ <translation type="vanished">Save as</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation>New Folder</translation> -+ <translation type="vanished">New Folder</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation>Save</translation> -+ <translation type="vanished">Save</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation>Directories</translation> -+ <translation type="vanished">Directories</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation>Warning</translation> -+ <translation type="vanished">Warning</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation>exist, are you sure replace?</translation> -+ <translation type="vanished">exist, are you sure replace?</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> -- <translation>NewFolder</translation> -+ <translation type="vanished">NewFolder</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> -- <translation>Undo</translation> -+ <translation type="vanished">Undo</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> -- <translation>Redo</translation> -+ <translation type="vanished">Redo</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> -- <translation>warn</translation> -+ <translation type="vanished">warn</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> -- <translation>This operation is not supported.</translation> -+ <translation type="vanished">This operation is not supported.</translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_es.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_es.ts -index ed31441..33a8685 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_es.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_es.ts -@@ -4,120 +4,97 @@ - <context> - <name>MainWindow</name> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> - <source>MainWindow</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> - <source>test open</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> - <source>directory</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> - <source>selected uri</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> - <source>test show</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> - <source>test exec</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> - <source>test save</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> - <source>test static open</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> - <source>PushButton</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> - <source>use auto highlight icon</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> - <source>...</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> - <source>highlightOnly</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> - <source>bothDefaultAndHighlight</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> - <source>RadioButton</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> - <source>style</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> - <source>icon</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> - <source>menu opacity</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> - <source>font</source> - <translation type="unfinished"></translation> - </message> -@@ -125,7 +102,7 @@ - <context> - <name>MessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="97"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> - <translation type="unfinished"></translation> - </message> -@@ -133,12 +110,12 @@ - <context> - <name>QApplication</name> - <message> -- <location filename="../widget/messagebox/message-box.h" line="272"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.h" line="274"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> - <translation type="unfinished"></translation> - </message> -@@ -146,8 +123,8 @@ - <context> - <name>QDialogButtonBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="362"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1090"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> - <translation type="unfinished"></translation> - </message> -@@ -155,15 +132,15 @@ - <context> - <name>QMessageBox</name> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="418"/> -- <location filename="../widget/messagebox/message-box.cpp" line="881"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="881"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> - <translation type="unfinished"></translation> - </message> -@@ -171,57 +148,57 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/messagebox/message-box.cpp" line="730"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> - <translation type="unfinished"></translation> - </message> -@@ -229,14 +206,12 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> - </message> -@@ -244,17 +219,17 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> - <source>Open File</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> - <source>Save File</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> - <source>All Files (*)</source> - <translation type="unfinished"></translation> - </message> -@@ -262,123 +237,123 @@ - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> - <source>NewFolder</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> - <source>Undo</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> - <source>Redo</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> - <source>warn</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> - <source>This operation is not supported.</source> - <translation type="unfinished"></translation> - </message> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fa.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fa.ts -index e225ee6..0683e2e 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fa.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fa.ts -@@ -1,127 +1,6 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="fa_IR"> --<context> -- <name>MainWindow</name> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -- <source>MainWindow</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -- <source>test open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -- <source>directory</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -- <source>selected uri</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -- <source>test show</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -- <source>test exec</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -- <source>test save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -- <source>test static open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -- <source>PushButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -- <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -- <source>...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -- <source>highlightOnly</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -- <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -- <source>RadioButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -- <source>style</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -- <source>icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -- <source>menu opacity</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -- <source>font</source> -- <translation type="unfinished"></translation> -- </message> --</context> - <context> - <name>MessageBox</name> - <message> -@@ -170,56 +49,6 @@ - </context> - <context> - <name>QObject</name> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> -- <source>File Name</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> -- <source>Modified Date</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> -- <source>File Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> -- <source>File Size</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> -- <source>Original Path</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> -- <source>Descending</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> -- <source>Ascending</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> -- <source>Use global sorting</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> -- <source>List View</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> -- <source>Icon View</source> -- <translation type="unfinished"></translation> -- </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> -@@ -229,158 +58,14 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> - </message> - </context> --<context> -- <name>UKUIFileDialog::KyFileDialogHelper</name> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> -- <source>Open File</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> -- <source>Save File</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> -- <source>All Files (*)</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyNativeFileDialog</name> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> -- <source>Go Back</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> -- <source>Go Forward</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> -- <source>Cd Up</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -- <source>Search</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> -- <source>View Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> -- <source>Sort Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> -- <source>Maximize</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> -- <source>Close</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> -- <source>Restore</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> -- <source>Name</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> -- <source>Open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> -- <source>Cancel</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -- <source>Save as</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> -- <source>New Folder</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> -- <source>Save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> -- <source>Directories</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -- <source>Warning</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -- <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> -- <source>NewFolder</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> -- <source>Undo</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> -- <source>Redo</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -- <source>warn</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -- <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -- </message> --</context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fr.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fr.ts -index faf3d4a..627da2b 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fr.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fr.ts -@@ -1,127 +1,6 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="fr_FR"> --<context> -- <name>MainWindow</name> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -- <source>MainWindow</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -- <source>test open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -- <source>directory</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -- <source>selected uri</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -- <source>test show</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -- <source>test exec</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -- <source>test save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -- <source>test static open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -- <source>PushButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -- <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -- <source>...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -- <source>highlightOnly</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -- <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -- <source>RadioButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -- <source>style</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -- <source>icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -- <source>menu opacity</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -- <source>font</source> -- <translation type="unfinished"></translation> -- </message> --</context> - <context> - <name>MessageBox</name> - <message> -@@ -171,54 +50,44 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation>Nom du fichier</translation> -+ <translation type="vanished">Nom du fichier</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation>Date de modification</translation> -+ <translation type="vanished">Date de modification</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation>Type de fichier</translation> -+ <translation type="vanished">Type de fichier</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation>Taille du fichier</translation> -+ <translation type="vanished">Taille du fichier</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation>Chemin d’accès d’origine</translation> -+ <translation type="vanished">Chemin d’accès d’origine</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation>Descendant</translation> -+ <translation type="vanished">Descendant</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation>Ascendant</translation> -+ <translation type="vanished">Ascendant</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation>Utiliser le tri global</translation> -+ <translation type="vanished">Utiliser le tri global</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation>Affichage en liste</translation> -+ <translation type="vanished">Affichage en liste</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation>Affichage de l’icône</translation> -+ <translation type="vanished">Affichage de l’icône</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="730"/> -@@ -229,13 +98,11 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation>Diapositive par défaut</translation> - </message> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation>Laissez le widget d’onglet basculer avec une animation de diapositive.</translation> -@@ -244,143 +111,111 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> -- <translation>Ouvrir un fichier</translation> -+ <translation type="vanished">Ouvrir un fichier</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> -- <translation>Enregistrer le fichier</translation> -+ <translation type="vanished">Enregistrer le fichier</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> -- <translation>Tous les fichiers (*)</translation> -+ <translation type="vanished">Tous les fichiers (*)</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation>Retour</translation> -+ <translation type="vanished">Retour</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation>Avancer</translation> -+ <translation type="vanished">Avancer</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation>Cd Up</translation> -+ <translation type="vanished">Cd Up</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation>Rechercher</translation> -+ <translation type="vanished">Rechercher</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation>Type de vue</translation> -+ <translation type="vanished">Type de vue</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation>Type de tri</translation> -+ <translation type="vanished">Type de tri</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation>Maximiser</translation> -+ <translation type="vanished">Maximiser</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation>Fermer</translation> -+ <translation type="vanished">Fermer</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation>Restaurer</translation> -+ <translation type="vanished">Restaurer</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation>Nom</translation> -+ <translation type="vanished">Nom</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation>Ouvrir</translation> -+ <translation type="vanished">Ouvrir</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation>Annuler</translation> -+ <translation type="vanished">Annuler</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation>Enregistrer sous</translation> -+ <translation type="vanished">Enregistrer sous</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation>Nouveau dossier</translation> -+ <translation type="vanished">Nouveau dossier</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation>Sauvegarder</translation> -+ <translation type="vanished">Sauvegarder</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation>Téléphonique</translation> -+ <translation type="vanished">Téléphonique</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation>Avertissement</translation> -+ <translation type="vanished">Avertissement</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation>exister, êtes-vous sûr de remplacer ?</translation> -+ <translation type="vanished">exister, êtes-vous sûr de remplacer ?</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> -- <translation>NouveauDossier</translation> -+ <translation type="vanished">NouveauDossier</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> -- <translation>Défaire</translation> -+ <translation type="vanished">Défaire</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> -- <translation>Refaire</translation> -+ <translation type="vanished">Refaire</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> -- <translation>avertir</translation> -+ <translation type="vanished">avertir</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> -- <translation>Cette opération n’est pas prise en charge.</translation> -+ <translation type="vanished">Cette opération n’est pas prise en charge.</translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts -index 19ff081..ef6c812 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts -@@ -1,127 +1,6 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="kk_KZ"> --<context> -- <name>MainWindow</name> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -- <source>MainWindow</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -- <source>test open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -- <source>directory</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -- <source>selected uri</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -- <source>test show</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -- <source>test exec</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -- <source>test save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -- <source>test static open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -- <source>PushButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -- <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -- <source>...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -- <source>highlightOnly</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -- <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -- <source>RadioButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -- <source>style</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -- <source>icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -- <source>menu opacity</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -- <source>font</source> -- <translation type="unfinished"></translation> -- </message> --</context> - <context> - <name>MessageBox</name> - <message> -@@ -171,54 +50,44 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation>Файл атауы</translation> -+ <translation type="vanished">Файл атауы</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation>Өзгертілген күн</translation> -+ <translation type="vanished">Өзгертілген күн</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation>Файл түрі</translation> -+ <translation type="vanished">Файл түрі</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation>Файл өлшемі</translation> -+ <translation type="vanished">Файл өлшемі</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation>Бастапқы жол</translation> -+ <translation type="vanished">Бастапқы жол</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation>Кему</translation> -+ <translation type="vanished">Кему</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation>Көтерілу</translation> -+ <translation type="vanished">Көтерілу</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation>Ғаламдық сұрыптауды пайдалану</translation> -+ <translation type="vanished">Ғаламдық сұрыптауды пайдалану</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation>Тізім көрінісі</translation> -+ <translation type="vanished">Тізім көрінісі</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation>Белгіше көрінісі</translation> -+ <translation type="vanished">Белгіше көрінісі</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="730"/> -@@ -229,13 +98,11 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation>Әдетті слайд</translation> - </message> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation>Слайд анимациясы бар tab widget ауыстырып қосқышына рұқсат етіңіз.</translation> -@@ -244,143 +111,111 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> -- <translation>Файлды ашу</translation> -+ <translation type="vanished">Файлды ашу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> -- <translation>Файлды сақтау</translation> -+ <translation type="vanished">Файлды сақтау</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> -- <translation>Барлық файлдар (*)</translation> -+ <translation type="vanished">Барлық файлдар (*)</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation>Қайтып бар</translation> -+ <translation type="vanished">Қайтып бар</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation>Алға жылжу</translation> -+ <translation type="vanished">Алға жылжу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation>Cd Up</translation> -+ <translation type="vanished">Cd Up</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation>Іздеу</translation> -+ <translation type="vanished">Іздеу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation>Көрініс түрі</translation> -+ <translation type="vanished">Көрініс түрі</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation>Сұрыптау түрі</translation> -+ <translation type="vanished">Сұрыптау түрі</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation>Барынша көбейту</translation> -+ <translation type="vanished">Барынша көбейту</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation>Жабу</translation> -+ <translation type="vanished">Жабу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation>Қалпына келтіру</translation> -+ <translation type="vanished">Қалпына келтіру</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation>Атауы</translation> -+ <translation type="vanished">Атауы</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation>Ашу</translation> -+ <translation type="vanished">Ашу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation>Болдырмау</translation> -+ <translation type="vanished">Болдырмау</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation>Басқаша сақтау</translation> -+ <translation type="vanished">Басқаша сақтау</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation>Жаңа қапшық</translation> -+ <translation type="vanished">Жаңа қапшық</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation>Сақтау</translation> -+ <translation type="vanished">Сақтау</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation>Каталогтар</translation> -+ <translation type="vanished">Каталогтар</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation>Ескерту</translation> -+ <translation type="vanished">Ескерту</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation>бар, сіз алмастырасыз ба?</translation> -+ <translation type="vanished">бар, сіз алмастырасыз ба?</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> -- <translation>NewFolder</translation> -+ <translation type="vanished">NewFolder</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> -- <translation>Болдырмау</translation> -+ <translation type="vanished">Болдырмау</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> -- <translation>Редо</translation> -+ <translation type="vanished">Редо</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> -- <translation>Ескерту</translation> -+ <translation type="vanished">Ескерту</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> -- <translation>Бұл операцияға қолдау көрсетілмеген.</translation> -+ <translation type="vanished">Бұл операцияға қолдау көрсетілмеген.</translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts -index eb92b8c..026c8ac 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts -@@ -1,127 +1,6 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="ky_KG"> --<context> -- <name>MainWindow</name> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -- <source>MainWindow</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -- <source>test open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -- <source>directory</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -- <source>selected uri</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -- <source>test show</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -- <source>test exec</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -- <source>test save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -- <source>test static open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -- <source>PushButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -- <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -- <source>...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -- <source>highlightOnly</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -- <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -- <source>RadioButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -- <source>style</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -- <source>icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -- <source>menu opacity</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -- <source>font</source> -- <translation type="unfinished"></translation> -- </message> --</context> - <context> - <name>MessageBox</name> - <message> -@@ -171,54 +50,44 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation>Файлдын аты</translation> -+ <translation type="vanished">Файлдын аты</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation>Өзгөртүлгөн дата</translation> -+ <translation type="vanished">Өзгөртүлгөн дата</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation>Файл түрү</translation> -+ <translation type="vanished">Файл түрү</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation>Файл өлчөмү</translation> -+ <translation type="vanished">Файл өлчөмү</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation>Оригиналдуу жол</translation> -+ <translation type="vanished">Оригиналдуу жол</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation>Түшүп</translation> -+ <translation type="vanished">Түшүп</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation>Көтөрүлүш</translation> -+ <translation type="vanished">Көтөрүлүш</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation>Глобалдык сорттоону колдонуу</translation> -+ <translation type="vanished">Глобалдык сорттоону колдонуу</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation>Тизменин көрүнүшү</translation> -+ <translation type="vanished">Тизменин көрүнүшү</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation>Икона көрүнүшү</translation> -+ <translation type="vanished">Икона көрүнүшү</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="730"/> -@@ -229,13 +98,11 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation>Дефолт слайды</translation> - </message> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation>Таблица виджет слайд анимациясы менен которуп берсин.</translation> -@@ -244,143 +111,111 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> -- <translation>Файлды ачуу</translation> -+ <translation type="vanished">Файлды ачуу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> -- <translation>Файлды сактоо</translation> -+ <translation type="vanished">Файлды сактоо</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> -- <translation>Бардык файлдар (*)</translation> -+ <translation type="vanished">Бардык файлдар (*)</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation>Артка кайрыл</translation> -+ <translation type="vanished">Артка кайрыл</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation>Алга илгерилетүү</translation> -+ <translation type="vanished">Алга илгерилетүү</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation>Cd Up</translation> -+ <translation type="vanished">Cd Up</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation>Издөө</translation> -+ <translation type="vanished">Издөө</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation>Көрүү түрү</translation> -+ <translation type="vanished">Көрүү түрү</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation>Түрүн сорттоо</translation> -+ <translation type="vanished">Түрүн сорттоо</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation>Максималдуу</translation> -+ <translation type="vanished">Максималдуу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation>Жабуу</translation> -+ <translation type="vanished">Жабуу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation>Калыбына келтирүү</translation> -+ <translation type="vanished">Калыбына келтирүү</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation>Аты-жөнү</translation> -+ <translation type="vanished">Аты-жөнү</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation>Ачуу</translation> -+ <translation type="vanished">Ачуу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation>Жокко чыгаруу</translation> -+ <translation type="vanished">Жокко чыгаруу</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation>Үнөмдөө</translation> -+ <translation type="vanished">Үнөмдөө</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation>Жаңы папка</translation> -+ <translation type="vanished">Жаңы папка</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation>Сактоо</translation> -+ <translation type="vanished">Сактоо</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation>Каталогдор</translation> -+ <translation type="vanished">Каталогдор</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation>Эскертүү</translation> -+ <translation type="vanished">Эскертүү</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation>бар, сиз сөзсүз алмаштырып жатасызбы?</translation> -+ <translation type="vanished">бар, сиз сөзсүз алмаштырып жатасызбы?</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> -- <translation>Жаңы папкалар</translation> -+ <translation type="vanished">Жаңы папкалар</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> -- <translation>Ундо</translation> -+ <translation type="vanished">Ундо</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> -- <translation>Редо</translation> -+ <translation type="vanished">Редо</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> -- <translation>эскертүү</translation> -+ <translation type="vanished">эскертүү</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> -- <translation>Бул операция колдолбойт.</translation> -+ <translation type="vanished">Бул операция колдолбойт.</translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_mn.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_mn.ts -index 46cb344..e63a9a7 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_mn.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_mn.ts -@@ -1,127 +1,6 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="mn_MN"> --<context> -- <name>MainWindow</name> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -- <source>MainWindow</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -- <source>test open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -- <source>directory</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -- <source>selected uri</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -- <source>test show</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -- <source>test exec</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -- <source>test save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -- <source>test static open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -- <source>PushButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -- <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -- <source>...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -- <source>highlightOnly</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -- <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -- <source>RadioButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -- <source>style</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -- <source>icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -- <source>menu opacity</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -- <source>font</source> -- <translation type="unfinished"></translation> -- </message> --</context> - <context> - <name>MessageBox</name> - <message> -@@ -171,54 +50,44 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡᠢᠳᠦᠯ</translation> -+ <translation type="vanished">ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡᠢᠳᠦᠯ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation>ᠵᠠᠰᠠᠭᠰᠠᠨ ᠡᠳᠦᠷ ᠰᠠᠷᠠ</translation> -+ <translation type="vanished">ᠵᠠᠰᠠᠭᠰᠠᠨ ᠡᠳᠦᠷ ᠰᠠᠷᠠ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> -+ <translation type="vanished">ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠶᠡᠬᠡ ᠪᠠᠭᠠ</translation> -+ <translation type="vanished">ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠶᠡᠬᠡ ᠪᠠᠭᠠ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation>ᠤᠭ ᠤ᠋ᠨ ᠵᠠᠮ ᠱᠤᠭᠤᠮ</translation> -+ <translation type="vanished">ᠤᠭ ᠤ᠋ᠨ ᠵᠠᠮ ᠱᠤᠭᠤᠮ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation>ᠪᠠᠭᠠᠰᠬᠠᠬᠤ</translation> -+ <translation type="vanished">ᠪᠠᠭᠠᠰᠬᠠᠬᠤ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation>ᠶᠡᠬᠡᠰᠬᠡᠬᠦ</translation> -+ <translation type="vanished">ᠶᠡᠬᠡᠰᠬᠡᠬᠦ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation>ᠪᠦᠬᠦ ᠪᠠᠢᠳᠠᠯ ᠤ᠋ᠨ ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠢ᠋ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ</translation> -+ <translation type="vanished">ᠪᠦᠬᠦ ᠪᠠᠢᠳᠠᠯ ᠤ᠋ᠨ ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠢ᠋ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation>ᠵᠢᠭᠰᠠᠭᠠᠯᠳᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> -+ <translation type="vanished">ᠵᠢᠭᠰᠠᠭᠠᠯᠳᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation>ᠰᠢᠪᠠᠭᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> -+ <translation type="vanished">ᠰᠢᠪᠠᠭᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="730"/> -@@ -229,13 +98,11 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation>Default Slide</translation> - </message> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> -@@ -244,143 +111,111 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> -- <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> -+ <translation type="vanished">ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> -- <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> -+ <translation type="vanished">ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> -- <translation>ᠪᠦᠬᠦᠢᠯᠡ (*)</translation> -+ <translation type="vanished">ᠪᠦᠬᠦᠢᠯᠡ (*)</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation>ᠤᠬᠤᠷᠢᠬᠤ</translation> -+ <translation type="vanished">ᠤᠬᠤᠷᠢᠬᠤ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation>ᠤᠷᠤᠭᠰᠢᠯᠠᠬᠤ</translation> -+ <translation type="vanished">ᠤᠷᠤᠭᠰᠢᠯᠠᠬᠤ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation>ᠳᠡᠭᠡᠭᠰᠢ</translation> -+ <translation type="vanished">ᠳᠡᠭᠡᠭᠰᠢ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation>ᠬᠠᠢᠯᠳᠠ</translation> -+ <translation type="vanished">ᠬᠠᠢᠯᠳᠠ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation>ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> -+ <translation type="vanished">ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation>ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> -+ <translation type="vanished">ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation>ᠬᠠᠮᠤᠭ ᠤ᠋ᠨ ᠶᠡᠬᠡᠴᠢᠯᠡᠯ</translation> -+ <translation type="vanished">ᠬᠠᠮᠤᠭ ᠤ᠋ᠨ ᠶᠡᠬᠡᠴᠢᠯᠡᠯ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation>ᠬᠠᠭᠠᠬᠤ</translation> -+ <translation type="vanished">ᠬᠠᠭᠠᠬᠤ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation>ᠡᠬᠡᠬᠦᠯᠬᠦ</translation> -+ <translation type="vanished">ᠡᠬᠡᠬᠦᠯᠬᠦ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡ</translation> -+ <translation type="vanished">ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> -+ <translation type="vanished">ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation>ᠦᠬᠡᠢᠰᠭᠡᠬᠦ᠌</translation> -+ <translation type="vanished">ᠦᠬᠡᠢᠰᠭᠡᠬᠦ᠌</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation>ᠦᠭᠡᠷᠡ ᠭᠠᠵᠠᠷ ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> -+ <translation type="vanished">ᠦᠭᠡᠷᠡ ᠭᠠᠵᠠᠷ ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> -+ <translation type="vanished">ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> -+ <translation type="vanished">ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation>ᠭᠠᠷᠴᠠᠭ</translation> -+ <translation type="vanished">ᠭᠠᠷᠴᠠᠭ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠦᠯ</translation> -+ <translation type="vanished">ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠦᠯ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation>ᠪᠠᠢᠨᠠ᠂ ᠰᠤᠯᠢᠬᠤ ᠤᠤ?</translation> -+ <translation type="vanished">ᠪᠠᠢᠨᠠ᠂ ᠰᠤᠯᠢᠬᠤ ᠤᠤ?</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> -- <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> -+ <translation type="vanished">ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> -- <translation>ᠬᠦᠴᠦᠨ ᠦᠬᠡᠢ ᠪᠤᠯᠭᠠᠬᠤ</translation> -+ <translation type="vanished">ᠬᠦᠴᠦᠨ ᠦᠬᠡᠢ ᠪᠤᠯᠭᠠᠬᠤ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> -- <translation>ᠳᠠᠬᠢᠵᠤ ᠬᠢᠬᠦ</translation> -+ <translation type="vanished">ᠳᠠᠬᠢᠵᠤ ᠬᠢᠬᠦ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> -- <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠬᠦ</translation> -+ <translation type="vanished">ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠬᠦ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> -- <translation>ᠳᠤᠰ ᠠᠵᠢᠯᠯᠠᠬᠤᠢ ᠵᠢ ᠳᠡᠮᠵᠢᠬᠦ ᠦᠬᠡᠢ.</translation> -+ <translation type="vanished">ᠳᠤᠰ ᠠᠵᠢᠯᠯᠠᠬᠤᠢ ᠵᠢ ᠳᠡᠮᠵᠢᠬᠦ ᠦᠬᠡᠢ.</translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_tr.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_tr.ts -index a819154..debf9dc 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_tr.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_tr.ts -@@ -1,127 +1,6 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="tr_TR"> --<context> -- <name>MainWindow</name> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -- <source>MainWindow</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -- <source>test open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -- <source>directory</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -- <source>selected uri</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -- <source>test show</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -- <source>test exec</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -- <source>test save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -- <source>test static open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -- <source>PushButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -- <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -- <source>...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -- <source>highlightOnly</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -- <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -- <source>RadioButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -- <source>style</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -- <source>icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -- <source>menu opacity</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -- <source>font</source> -- <translation type="unfinished"></translation> -- </message> --</context> - <context> - <name>MessageBox</name> - <message> -@@ -170,56 +49,6 @@ - </context> - <context> - <name>QObject</name> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> -- <source>File Name</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> -- <source>Modified Date</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> -- <source>File Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> -- <source>File Size</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> -- <source>Original Path</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> -- <source>Descending</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> -- <source>Ascending</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> -- <source>Use global sorting</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> -- <source>List View</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> -- <source>Icon View</source> -- <translation type="unfinished"></translation> -- </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> -@@ -229,158 +58,14 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation type="unfinished"></translation> - </message> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> - </message> - </context> --<context> -- <name>UKUIFileDialog::KyFileDialogHelper</name> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> -- <source>Open File</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> -- <source>Save File</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> -- <source>All Files (*)</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyNativeFileDialog</name> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> -- <source>Go Back</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> -- <source>Go Forward</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> -- <source>Cd Up</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -- <source>Search</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> -- <source>View Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> -- <source>Sort Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> -- <source>Maximize</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> -- <source>Close</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> -- <source>Restore</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> -- <source>Name</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> -- <source>Open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> -- <source>Cancel</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -- <source>Save as</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> -- <source>New Folder</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> -- <source>Save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> -- <source>Directories</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -- <source>Warning</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -- <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> -- <source>NewFolder</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> -- <source>Undo</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> -- <source>Redo</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -- <source>warn</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -- <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -- </message> --</context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts -index d0d4a2b..712e12a 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts -@@ -1,127 +1,6 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="ug_CN"> --<context> -- <name>MainWindow</name> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -- <source>MainWindow</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -- <source>test open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -- <source>directory</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -- <source>selected uri</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -- <source>test show</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -- <source>test exec</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -- <source>test save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -- <source>test static open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -- <source>PushButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -- <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -- <source>...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -- <source>highlightOnly</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -- <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -- <source>RadioButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -- <source>style</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -- <source>icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -- <source>menu opacity</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -- <source>font</source> -- <translation type="unfinished"></translation> -- </message> --</context> - <context> - <name>MessageBox</name> - <message> -@@ -171,54 +50,44 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation>ھۆججەت نامى</translation> -+ <translation type="vanished">ھۆججەت نامى</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation>ئۆزگەرتىلگەن ۋاقتى</translation> -+ <translation type="vanished">ئۆزگەرتىلگەن ۋاقتى</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation>ھۆججەت تۈرى</translation> -+ <translation type="vanished">ھۆججەت تۈرى</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation>ھۆججەت چوڭلۇقى</translation> -+ <translation type="vanished">ھۆججەت چوڭلۇقى</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation>ئەسلى يول</translation> -+ <translation type="vanished">ئەسلى يول</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation>پەسكە چۈشمەكتە</translation> -+ <translation type="vanished">پەسكە چۈشمەكتە</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation>ئۆرلەش</translation> -+ <translation type="vanished">ئۆرلەش</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation>يەر شارىنى تۈرگە ئايرىشنى ئىشلىتىش</translation> -+ <translation type="vanished">يەر شارىنى تۈرگە ئايرىشنى ئىشلىتىش</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation>تىزىملىك كۆرۈش</translation> -+ <translation type="vanished">تىزىملىك كۆرۈش</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation>ئايكون كۆرۈش</translation> -+ <translation type="vanished">ئايكون كۆرۈش</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="730"/> -@@ -229,13 +98,11 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation>كۆڭۈلدىكى سىيرىلما</translation> - </message> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation>سىيرىلما كارتون ئارقىلىق تاختا ۋىكىپات ئالماشتۇرسۇن.</translation> -@@ -244,143 +111,111 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> -- <translation type="unfinished">ھۆججەتنى ئېچىش</translation> -+ <translation type="obsolete">ھۆججەتنى ئېچىش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> -- <translation type="unfinished">ھۆججەت ساقلاش</translation> -+ <translation type="obsolete">ھۆججەت ساقلاش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> -- <translation type="unfinished">بارلىق ھۆججەتلەر (*)</translation> -+ <translation type="obsolete">بارلىق ھۆججەتلەر (*)</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation type="unfinished">قايت</translation> -+ <translation type="obsolete">قايت</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation type="unfinished">ئالدىغا ماڭ</translation> -+ <translation type="obsolete">ئالدىغا ماڭ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation type="unfinished">Cd Up</translation> -+ <translation type="obsolete">Cd Up</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation type="unfinished">ئىزدە</translation> -+ <translation type="obsolete">ئىزدە</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation type="unfinished">كۆرۈش تىپى</translation> -+ <translation type="obsolete">كۆرۈش تىپى</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation type="unfinished">تۈر تۈرى</translation> -+ <translation type="obsolete">تۈر تۈرى</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation type="unfinished">ئەڭ چوڭ چەككە</translation> -+ <translation type="obsolete">ئەڭ چوڭ چەككە</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation type="unfinished">ياپ</translation> -+ <translation type="obsolete">ياپ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation type="unfinished">ئەسلىگە كەلتۈرۈش</translation> -+ <translation type="obsolete">ئەسلىگە كەلتۈرۈش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation type="unfinished">ئىسىم-فامىلىسى</translation> -+ <translation type="obsolete">ئىسىم-فامىلىسى</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation type="unfinished">ئېچىش</translation> -+ <translation type="obsolete">ئېچىش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation type="unfinished">ئەمەلدىن قالدۇرۇش</translation> -+ <translation type="obsolete">ئەمەلدىن قالدۇرۇش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation type="unfinished">تېجەش</translation> -+ <translation type="obsolete">تېجەش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation type="unfinished">يېڭى ھۆججەت قىسقۇچ</translation> -+ <translation type="obsolete">يېڭى ھۆججەت قىسقۇچ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation type="unfinished">ساقلاش</translation> -+ <translation type="obsolete">ساقلاش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation type="unfinished">مۇندەرىجىلەر</translation> -+ <translation type="obsolete">مۇندەرىجىلەر</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation type="unfinished">دىققەت</translation> -+ <translation type="obsolete">دىققەت</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation type="unfinished">مەۋجۇت، سىز راستىنلا ئالماشتۇرۇۋاتامسىز؟</translation> -+ <translation type="obsolete">مەۋجۇت، سىز راستىنلا ئالماشتۇرۇۋاتامسىز؟</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> -- <translation type="unfinished">يېڭى قاتلىغۇچ</translation> -+ <translation type="obsolete">يېڭى قاتلىغۇچ</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> -- <translation type="unfinished">Undo</translation> -+ <translation type="obsolete">Undo</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> -- <translation type="unfinished">قايتا-قايتا</translation> -+ <translation type="obsolete">قايتا-قايتا</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> -- <translation type="unfinished">ئاگاھلاندۇرۇش</translation> -+ <translation type="obsolete">ئاگاھلاندۇرۇش</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> -- <translation type="unfinished">بۇ مەشغۇلات قوللىمايدۇ.</translation> -+ <translation type="obsolete">بۇ مەشغۇلات قوللىمايدۇ.</translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts -index 73efbce..74010b5 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts -@@ -1,127 +1,6 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="zh_CN"> --<context> -- <name>MainWindow</name> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -- <source>MainWindow</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -- <source>test open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -- <source>directory</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -- <source>selected uri</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -- <source>test show</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -- <source>test exec</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -- <source>test save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -- <source>test static open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -- <source>PushButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -- <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -- <source>...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -- <source>highlightOnly</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -- <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -- <source>RadioButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -- <source>style</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -- <source>icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -- <source>menu opacity</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -- <source>font</source> -- <translation type="unfinished"></translation> -- </message> --</context> - <context> - <name>MessageBox</name> - <message> -@@ -171,54 +50,44 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation>文件名称</translation> -+ <translation type="vanished">文件名称</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation>修改日期</translation> -+ <translation type="vanished">修改日期</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation>文件类型</translation> -+ <translation type="vanished">文件类型</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation>文件大小</translation> -+ <translation type="vanished">文件大小</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation>原始路径</translation> -+ <translation type="vanished">原始路径</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation>降序</translation> -+ <translation type="vanished">降序</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation>升序</translation> -+ <translation type="vanished">升序</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation>使用全局排序</translation> -+ <translation type="vanished">使用全局排序</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation>列表视图</translation> -+ <translation type="vanished">列表视图</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation>图标视图</translation> -+ <translation type="vanished">图标视图</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="730"/> -@@ -229,13 +98,11 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation>默认slide</translation> - </message> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation>让选项卡小部件切换为幻灯片动画。</translation> -@@ -244,143 +111,111 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> -- <translation>打开</translation> -+ <translation type="vanished">打开</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> -- <translation>保存</translation> -+ <translation type="vanished">保存</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> -- <translation>所有(*)</translation> -+ <translation type="vanished">所有(*)</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation>后退</translation> -+ <translation type="vanished">后退</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation>前进</translation> -+ <translation type="vanished">前进</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation>向上</translation> -+ <translation type="vanished">向上</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation>搜索</translation> -+ <translation type="vanished">搜索</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation>视图类型</translation> -+ <translation type="vanished">视图类型</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation>排序类型</translation> -+ <translation type="vanished">排序类型</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation>最大化</translation> -+ <translation type="vanished">最大化</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation>关闭</translation> -+ <translation type="vanished">关闭</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation>还原</translation> -+ <translation type="vanished">还原</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation>文件名</translation> -+ <translation type="vanished">文件名</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation>打开</translation> -+ <translation type="vanished">打开</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation>取消</translation> -+ <translation type="vanished">取消</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation>另存为</translation> -+ <translation type="vanished">另存为</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation>新建文件夹</translation> -+ <translation type="vanished">新建文件夹</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation>保存</translation> -+ <translation type="vanished">保存</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation>目录</translation> -+ <translation type="vanished">目录</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation>警告</translation> -+ <translation type="vanished">警告</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation>已存在,是否替换?</translation> -+ <translation type="vanished">已存在,是否替换?</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> -- <translation>新建文件夹</translation> -+ <translation type="vanished">新建文件夹</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> -- <translation>撤销</translation> -+ <translation type="vanished">撤销</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> -- <translation>重做</translation> -+ <translation type="vanished">重做</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> -- <translation>警告</translation> -+ <translation type="vanished">警告</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> -- <translation>不支持此操作。</translation> -+ <translation type="vanished">不支持此操作。</translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts -index a667954..584a449 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts -@@ -1,127 +1,6 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> - <TS version="2.1" language="zh_HK"> --<context> -- <name>MainWindow</name> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -- <source>MainWindow</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -- <source>test open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -- <source>directory</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -- <source>selected uri</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -- <source>test show</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -- <source>test exec</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -- <source>test save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -- <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -- <source>test static open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -- <source>PushButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -- <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -- <source>...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -- <source>highlightOnly</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -- <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -- <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -- <source>RadioButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -- <source>style</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -- <source>icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -- <source>menu opacity</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -- <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -- <source>font</source> -- <translation type="unfinished"></translation> -- </message> --</context> - <context> - <name>MessageBox</name> - <message> -@@ -171,54 +50,44 @@ - <context> - <name>QObject</name> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation>檔名稱</translation> -+ <translation type="vanished">檔名稱</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation>修改日期</translation> -+ <translation type="vanished">修改日期</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation>檔案類型</translation> -+ <translation type="vanished">檔案類型</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation>檔大小</translation> -+ <translation type="vanished">檔大小</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation>原始路徑</translation> -+ <translation type="vanished">原始路徑</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation>降序</translation> -+ <translation type="vanished">降序</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation>升序</translation> -+ <translation type="vanished">升序</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation>使用全域排序</translation> -+ <translation type="vanished">使用全域排序</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation>清單檢視</translation> -+ <translation type="vanished">清單檢視</translation> - </message> - <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation>圖示檢視</translation> -+ <translation type="vanished">圖示檢視</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="730"/> -@@ -229,13 +98,11 @@ - <context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation>默認slide</translation> - </message> - <message> -- <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation>讓選項卡小部件切換為幻燈片動畫。</translation> -@@ -244,143 +111,111 @@ - <context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> - <source>Open File</source> -- <translation type="unfinished">打開</translation> -+ <translation type="obsolete">打開</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> - <source>Save File</source> -- <translation type="unfinished">保存</translation> -+ <translation type="obsolete">保存</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> - <source>All Files (*)</source> -- <translation type="unfinished">所有(*)</translation> -+ <translation type="obsolete">所有(*)</translation> - </message> - </context> - <context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation type="unfinished">後退</translation> -+ <translation type="obsolete">後退</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation type="unfinished">前進</translation> -+ <translation type="obsolete">前進</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation type="unfinished">向上</translation> -+ <translation type="obsolete">向上</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation type="unfinished">搜索</translation> -+ <translation type="obsolete">搜索</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation type="unfinished">視圖類型</translation> -+ <translation type="obsolete">視圖類型</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation type="unfinished">排序類型</translation> -+ <translation type="obsolete">排序類型</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation type="unfinished">最大化</translation> -+ <translation type="obsolete">最大化</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation type="unfinished">關閉</translation> -+ <translation type="obsolete">關閉</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation type="unfinished">還原</translation> -+ <translation type="obsolete">還原</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation type="unfinished">檔名</translation> -+ <translation type="obsolete">檔名</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation type="unfinished">打開</translation> -+ <translation type="obsolete">打開</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation type="unfinished">取消</translation> -+ <translation type="obsolete">取消</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation type="unfinished">另存為</translation> -+ <translation type="obsolete">另存為</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation type="unfinished">新建資料夾</translation> -+ <translation type="obsolete">新建資料夾</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation type="unfinished">保存</translation> -+ <translation type="obsolete">保存</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation type="unfinished">目錄</translation> -+ <translation type="obsolete">目錄</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation type="unfinished">警告</translation> -+ <translation type="obsolete">警告</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation type="unfinished">已存在,是否替換?</translation> -+ <translation type="obsolete">已存在,是否替換?</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> - <source>NewFolder</source> -- <translation type="unfinished">新建資料夾</translation> -+ <translation type="obsolete">新建資料夾</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> - <source>Undo</source> -- <translation type="unfinished">撤銷</translation> -+ <translation type="obsolete">撤銷</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> - <source>Redo</source> -- <translation type="unfinished">重做</translation> -+ <translation type="obsolete">重做</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>warn</source> -- <translation type="unfinished">警告</translation> -+ <translation type="obsolete">警告</translation> - </message> - <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> - <source>This operation is not supported.</source> -- <translation type="unfinished">不支援此操作。</translation> -+ <translation type="obsolete">不支援此操作。</translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-platformtheme/widget/filedialog/debug.h b/qt5-ukui-platformtheme/widget/filedialog/debug.h -deleted file mode 100644 -index 7c8edbc..0000000 ---- a/qt5-ukui-platformtheme/widget/filedialog/debug.h -+++ /dev/null -@@ -1,63 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Jing Tan <tanjing@kylinos.cn> -- * -- */ -- --#ifndef PDEBUG_H --#define PDEBUG_H --#include <QDebug> --#include <QDateTime> -- --#define SERVICE "com.kylin.statusmanager.interface" --#define PATH "/" --#define INTERFACE "com.kylin.statusmanager.interface" -- --#define UKUI_SEARCH_SCHEMAS "org.ukui.search.settings" --#define SEARCH_METHOD_KEY "fileIndexEnable" -- --namespace UKUIFileDialog { -- --class NullDebug -- --{ -- --public: -- --template<typename T> -- --NullDebug & operator <<(const T&){return *this;} -- --}; --inline NullDebug nullDebug(){return NullDebug();} --} -- --//#define LOG_TIMI -- --#ifdef LOG_TIMI -- --# define pDebug qDebug() << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss:zzz") << " platformtheme input:" -- --#else -- --# define pDebug UKUIFileDialog::nullDebug() -- --#endif -- --#endif // KYFILEDIALOG_H -diff --git a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -deleted file mode 100644 -index e0906fd..0000000 ---- a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp -+++ /dev/null -@@ -1,2998 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Jing Tan <tanjing@kylinos.cn> -- * -- */ -- --#include "debug.h" --#include "kyfiledialog.h" --#include <QDebug> --#include "ui_kyfiledialog.h" --#include "kyfiledialogprivate.h" --#include "sidebar.h" --#include "pathbar.h" --#include "ukuistylehelper/ukuistylehelper.h" --#include <peony-qt/controls/directory-view/directory-view-container.h> --#include <peony-qt/controls/menu/directory-view-menu/directory-view-menu.h> --#include <peony-qt/controls/directory-view/directory-view-widget.h> --#include <peony-qt/controls/directory-view/directory-view-factory/directory-view-factory-manager.h> --#include <peony-qt/file-operation-utils.h> --#include <QDesktopServices> --#include <QUrl> --#include <PeonyFileInfo> --#include <PeonyFileItemModel> --#include <QDebug> --#include <QMimeDatabase> --#include <QMimeType> --#include <KWindowEffects> --#include <QPainter> --#include <QRect> --#include <QVector4D> --#include <QRegExp> --#include <QMessageBox> --#include <QScrollBar> --#include <QCoreApplication> --#include <QTranslator> --#include <qwindow.h> --#include <QScreen> --#include <QDesktopWidget> --#include <QPainterPath> --#include <QDBusInterface> --#include <QDBusMessage> --#include <qpa/qplatformdialoghelper.h> --#include "xatom-helper.h" --#include <peony-qt/file-utils.h> --#include <peony-qt/create-template-operation.h> --#include <peony-qt/global-settings.h> --#include <peony-qt/search-vfs-uri-parser.h> --#include <peony-qt/file-meta-info.h> --#include <peony-qt/clipboard-utils.h> --#include "debug.h" --#include "ukui-style-settings.h" -- --using namespace UKUIFileDialog; -- --KyNativeFileDialog::KyNativeFileDialog(QWidget *parent) -- : QDialog(parent), -- d_ptr(new KyNativeFileDialogPrivate) --{ -- QString locale = QLocale::system().name(); -- -- if(qApp->property("Language").isValid()) -- { -- QString language = qApp->property("Language").toString(); -- QFile file("/usr/share/qt5-ukui-platformtheme/qt5-ukui-platformtheme_" + language + ".qm"); -- if(file.exists()) -- locale = language; -- } -- installTranslate(locale); -- -- mKyFileDialogUi = new Ui_KyFileDialog(this); -- --// setStyle(nullptr); -- --// m_fileSystemModel = new QFileSystemModel(); -- -- connect(d_ptr.get()->m_timer, &QTimer::timeout, this, [&](){ --// pDebug << "timeout isActive:..........." << d_ptr.get()->m_timer->isActive(); -- this->show(); -- if(d_ptr.get()->m_timer->isActive()){ -- pDebug << "timer stop...."; -- d_ptr.get()->m_timer->stop(); -- } -- }); -- -- mKyFileDialogUi->setupUi(this); -- d_ptr.get()->m_container = mKyFileDialogUi->m_container; -- --// QString path = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); --// pDebug << "initialDirPath:" << path << selectedUrls(); --// goToUri(path, false); -- getCurrentPage()->setContextMenuPolicy(Qt::CustomContextMenu); -- -- connect(mKyFileDialogUi->m_sider, &FileDialogSideBar::goToUriRequest, this, [this](const QString &uri, bool addToHistory, bool forceUpdate){ -- pDebug << "goToUri0000"; -- if (uri.startsWith("favorite://")) { -- QString u = Peony::FileUtils::getTargetUri(uri); -- goToUri(u, addToHistory, forceUpdate); -- -- } -- else -- goToUri(uri, addToHistory, forceUpdate); -- }); -- -- connect(getCurrentPage(), &Peony::DirectoryViewContainer::directoryChanged, this, &KyNativeFileDialog::updateWindowState); -- -- connect(getCurrentPage(), &Peony::DirectoryViewContainer::directoryChanged, this, [=](){ -- pDebug << "directoryChanged........" << getCurrentUri(); -- -- Q_EMIT directoryEntered(QUrl(getCurrentUri())); -- pDebug << "locationChangeEnd...."; -- QCursor c; -- c.setShape(Qt::ArrowCursor); -- this->setCursor(c); -- mKyFileDialogUi->m_sider->setCursor(c); -- -- if(m_fileDialogHelper->isViewInitialFinished()) -- intiContainerSort(); -- --// mKyFileDialogUi->m_fileNameEdit->setText(""); -- setShortCuts(); -- }); -- --// connect(getCurrentPage(), &Peony::DirectoryViewContainer::directoryChanged, this, [=](){ --// updateSearchProgressBar(); --// }); -- connect(getCurrentPage(), &Peony::DirectoryViewContainer::viewDoubleClicked, this, [=](const QString &uri){ -- auto info = Peony::FileInfo::fromUri(uri); -- pDebug << "viewDoubleClicked....." << uri << info->isDir() << info->isVolume(); -- if (info->isDir() || info->isVolume()) { -- pDebug << "goToUrixxxxxxx...."; -- goToUri(uri); -- } else { -- onAcceptButtonClicked(); -- } -- }); -- -- connect(getCurrentPage(), &Peony::DirectoryViewContainer::selectionChanged, this, &KyNativeFileDialog::updateStatusBar); -- -- connect(getCurrentPage(), &Peony::DirectoryViewContainer::menuRequest, this, &KyNativeFileDialog::containerMenuRequest); -- -- connect(getCurrentPage(), &Peony::DirectoryViewContainer::signal_itemAdded, this, [=](const QString& uri){ -- pDebug << "signal_itemAdded....." << m_uris_to_edit << uri; -- if(m_uris_to_edit.isEmpty()) -- return; -- QString editUri = Peony::FileUtils::urlDecode(m_uris_to_edit.first()); -- QString infoUri = Peony::FileUtils::urlDecode(uri); -- if (editUri == infoUri ) { -- getCurrentPage()->getView()->scrollToSelection(uri); -- getCurrentPage()->getView()->editUri(uri); -- } -- m_uris_to_edit.clear(); -- }); -- -- connect(getCurrentPage(), &Peony::DirectoryViewContainer::updateWindowLocationRequest, this, [=](const QString &uri, bool addToHistory, bool forceUpdate){ -- pDebug << "page updateWindowLocationRequest.....uri:" << uri << getCurrentUri() << forceUpdate; -- if(uri == "") -- return; -- QString s = uri; -- QString s1 = s.endsWith("/") ? s.remove(s.length() - 1, 1) : s; -- QString s2 = getCurrentUri(); -- QString s3 = s2.endsWith("/") ? s2.remove(s2.length() - 1, 1) : s2; -- if(s1 != s3 && m_fileDialogHelper->isViewInitialFinished()) -- { -- pDebug << "s1:" << s1 << "s3:" << s3; -- goToUri(uri, addToHistory); -- } -- }); -- -- connect(mKyFileDialogUi->m_pathbar, &Peony::AdvancedLocationBar::updateWindowLocationRequest, -- this, [this](const QString &uri, bool addHistory, bool forceUpdate){ -- pDebug << "goToUrijjjjj...."; -- goToUri(uri, addHistory, forceUpdate); -- }); -- -- connect(mKyFileDialogUi->m_pathbar, &Peony::AdvancedLocationBar::refreshRequest, this, [](){ -- -- }); -- connect(mKyFileDialogUi->m_pathbar, &Peony::AdvancedLocationBar::searchRequest, this, [=](const QString &path, const QString &key){ -- pDebug << "path.....:" << path << "key:" << key << m_lastSearchPath; -- if(key == "") -- { -- forceStopLoading(); -- pDebug << "key is null m_lastSearchPath:" << m_lastSearchPath; -- m_isClearSearchKey = true; --// m_needSearch = false; -- goToUri(m_lastSearchPath, true); -- --// QCursor c; --// c.setShape(Qt::ArrowCursor); --// this->setCursor(c); --// getCurrentPage()->getView()->setCursor(c); --// mKyFileDialogUi->m_sider->setCursor(c); -- -- } -- else -- { -- auto targetUri = Peony::SearchVFSUriParser::parseSearchKey(path, key, true, false, "", true); -- pDebug << "updateSearch targetUri:" <<targetUri; -- pDebug << "updateSearch path:" <<path; -- goToUri(targetUri, true); -- -- } -- }); -- -- mKyFileDialogUi->m_backButton->setToolTip(tr("Go Back")); -- mKyFileDialogUi->m_backButton->setIcon(QIcon::fromTheme("go-previous-symbolic")); -- mKyFileDialogUi->m_backButton->setAutoRaise(true); -- mKyFileDialogUi->m_backButton->setEnabled(false); -- connect(mKyFileDialogUi->m_backButton, &QToolButton::clicked, this, &KyNativeFileDialog::goBack); -- -- -- mKyFileDialogUi->m_forwardButton->setToolTip(tr("Go Forward")); -- mKyFileDialogUi->m_forwardButton->setIcon(QIcon::fromTheme("go-next-symbolic")); -- mKyFileDialogUi->m_forwardButton->setAutoRaise(true); -- mKyFileDialogUi->m_forwardButton->setEnabled(false); -- connect(mKyFileDialogUi->m_forwardButton, &QToolButton::clicked, this, &KyNativeFileDialog::goForward); -- -- mKyFileDialogUi->m_toParentButton->setToolTip(tr("Cd Up")); -- mKyFileDialogUi->m_toParentButton->setIcon(QIcon::fromTheme("go-up-symbolic")); -- mKyFileDialogUi->m_toParentButton->setAutoRaise(true); -- mKyFileDialogUi->m_toParentButton->setEnabled(false); -- connect(mKyFileDialogUi->m_toParentButton, &QToolButton::clicked, this, &KyNativeFileDialog::goToParent); -- -- mKyFileDialogUi->m_searchBtn->setIcon(QIcon::fromTheme("edit-find-symbolic")); -- mKyFileDialogUi->m_searchBtn->setToolTip(tr("Search")); -- mKyFileDialogUi->m_searchBtn->setIconSize(QSize(16, 16)); -- mKyFileDialogUi->m_searchBtn->setAutoRaise(true); -- -- mKyFileDialogUi->m_searchBtn->setProperty("useIconHighlightEffect", true); -- mKyFileDialogUi->m_searchBtn->setProperty("iconHighlightEffectMode", 1); -- connect(mKyFileDialogUi->m_searchBtn, &QToolButton::clicked, this, &KyNativeFileDialog::searchButtonClicked); -- -- mKyFileDialogUi->m_modeButton->setToolTip(tr("View Type")); -- mKyFileDialogUi->m_modeButton->setIcon(QIcon::fromTheme("view-grid-symbolic")); -- mKyFileDialogUi->m_modeButton->setProperty("isWindowButton", 1); -- mKyFileDialogUi->m_modeButton->setProperty("useIconHighlightEffect", 0x2); -- mKyFileDialogUi->m_modeButton->setAutoRaise(true); -- -- mKyFileDialogUi->m_useGlobalSortAction->setChecked(Peony::GlobalSettings::getInstance()->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()); -- connect(mKyFileDialogUi->m_useGlobalSortAction, &QAction::triggered, this, [=](bool checked){ -- Peony::GlobalSettings::getInstance()->setValue(USE_GLOBAL_DEFAULT_SORTING, checked); -- }); -- -- mKyFileDialogUi->m_sortButton->setToolTip(tr("Sort Type")); -- mKyFileDialogUi->m_sortButton->setProperty("isWindowButton", 1); -- mKyFileDialogUi->m_sortButton->setProperty("useIconHighlightEffect", 0x2); -- mKyFileDialogUi->m_sortButton->setAutoRaise(true); -- -- mKyFileDialogUi->m_maximizeAndRestore->setToolTip(tr("Maximize")); -- mKyFileDialogUi->m_maximizeAndRestore->setIcon(QIcon::fromTheme("window-close-symbolic")); -- mKyFileDialogUi->m_maximizeAndRestore->setAutoRaise(true); -- mKyFileDialogUi->m_maximizeAndRestore->setProperty("isWindowButton", 1); -- mKyFileDialogUi->m_maximizeAndRestore->setProperty("useIconHighlightEffect", 0x2); -- connect(mKyFileDialogUi->m_maximizeAndRestore, &QToolButton::clicked, this, [=]() { -- if (!this->isMaximized()) { -- this->showMaximized(); -- } else { -- this->showNormal(); -- } -- updateMaximizeState(); -- }); -- -- mKyFileDialogUi->m_closeButton->setToolTip(tr("Close")); -- mKyFileDialogUi->m_closeButton->setIcon(QIcon::fromTheme("window-close-symbolic")); -- mKyFileDialogUi->m_closeButton->setAutoRaise(true); -- mKyFileDialogUi->m_closeButton->setProperty("isWindowButton", 0x2); -- -- connect(mKyFileDialogUi->m_modeMenu, &QMenu::triggered, this, [=](QAction *action) { -- if (action == mKyFileDialogUi->m_listModeAction) { -- this->getCurrentPage()->switchViewType("List View"); -- } else { -- this->getCurrentPage()->switchViewType("Icon View"); -- } -- }); -- -- connect(mKyFileDialogUi->m_acceptButton, &QPushButton::clicked, this, &KyNativeFileDialog::onAcceptButtonClicked); -- -- connect(mKyFileDialogUi->m_rejectButton, &QPushButton::clicked, this, &KyNativeFileDialog::onRejectButtonClicked); -- -- connect(mKyFileDialogUi->m_fileTypeCombo, -- static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated), -- this, [this](const QString s){ -- pDebug << "activated..." << s; -- selectNameFilter(s);}); -- -- connect(mKyFileDialogUi->m_fileTypeCombo, -- static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated), -- this, &KyNativeFileDialog::selectedNameFilterChanged); -- -- connect(mKyFileDialogUi->m_fileTypeCombo, -- static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged), -- this, [this](const QString s){ -- pDebug << "currentIndexChanged..." << s; -- selectNameFilter(s);}); -- -- connect(mKyFileDialogUi->m_closeButton, &QToolButton::clicked, this, &KyNativeFileDialog::onRejectButtonClicked); -- -- connect(mKyFileDialogUi->m_fileNameEdit, &QLineEdit::textChanged, this, &KyNativeFileDialog::lineEditTextChange); -- -- connect(getCurrentPage(), &Peony::DirectoryViewContainer::viewTypeChanged, this, &KyNativeFileDialog::onSwitchView); -- -- connect(mKyFileDialogUi->m_sortOrderGroup, &QActionGroup::triggered, this, [=](QAction *action) { -- int index = mKyFileDialogUi->m_sortOrderGroup->actions().indexOf(action); -- getCurrentPage()->setSortOrder(Qt::SortOrder(index)); -- setSortType(); -- }); -- -- connect(mKyFileDialogUi->m_sortTypeGroup, &QActionGroup::triggered, this, [=](QAction *action) { -- int index = mKyFileDialogUi->m_sortTypeGroup->actions().indexOf(action); -- getCurrentPage()->setSortType(Peony::FileItemModel::ColumnType(index)); -- }); -- -- connect(mKyFileDialogUi->m_sortMenu, &QMenu::aboutToShow, this, [=]() { -- bool originPathVisible = getCurrentUri()== "trash:///"; -- mKyFileDialogUi->m_originalPath->setVisible(originPathVisible); -- mKyFileDialogUi->m_sortTypeGroup->actions().at(getCurrentSortColumn())->setChecked(true); -- mKyFileDialogUi->m_sortOrderGroup->actions().at(getCurrentSortOrder())->setChecked(true); -- }); -- -- foreach (QAction *action, mKyFileDialogUi->m_sortTypeGroup->actions()) -- { -- bool checked = (int(getCurrentPage()->getSortType()) == -- mKyFileDialogUi->m_sortTypeGroup->actions().indexOf(action) ? true : false); -- action->setChecked(checked); -- } -- -- refreshContainerSort(); -- updateMaximizeState(); -- onSwitchView(); -- isTableModel(); -- -- m_model = new QStringListModel(); -- m_completer = new QCompleter(mKyFileDialogUi->m_fileNameEdit); -- m_completer->setModel(m_model); -- m_completer->setMaxVisibleItems(10); -- m_completer->setModelSorting(QCompleter::CaseInsensitivelySortedModel); --// m_completer->setCompletionMode(QCompleter::UnfilteredPopupCompletion); -- mKyFileDialogUi->m_fileNameEdit->setCompleter(m_completer); -- -- int number = QApplication::desktop()->screenNumber(QCursor::pos()); -- if(number<0){ -- number=0; -- } -- QSize size = QGuiApplication::screens().at(number)->geometry().size(); -- pDebug << "setmaxsize:" << size; -- this->setMaximumSize(size); --} -- --KyNativeFileDialog::~KyNativeFileDialog() --{ -- pDebug << "~~~~~~~~KyNativeFileDialog"; -- --} -- --void KyNativeFileDialog::updateMaximizeState() --{ -- bool maximized = this->isMaximized(); -- if (maximized) { -- mKyFileDialogUi->m_maximizeAndRestore->setToolTip(tr("Restore")); -- mKyFileDialogUi->m_maximizeAndRestore->setIcon(QIcon::fromTheme("window-restore-symbolic")); -- } else { -- mKyFileDialogUi->m_maximizeAndRestore->setToolTip(tr("Maximize")); -- mKyFileDialogUi->m_maximizeAndRestore->setIcon(QIcon::fromTheme("window-maximize-symbolic")); -- } --} -- --Peony::FMWindowIface *KyNativeFileDialog::create(const QString &uri) --{ -- auto dialog = new KyNativeFileDialog(); -- -- return dialog; --} -- --Peony::FMWindowIface *KyNativeFileDialog::create(const QStringList &uris) --{ -- auto dialog = new KyNativeFileDialog(); -- -- return dialog; --} -- --const QStringList KyNativeFileDialog::getCurrentSelections() --{ -- if(containerView()) -- return containerView()->getSelections(); -- else -- return QStringList(); --} -- --const QStringList KyNativeFileDialog::getCurrentSelectionsList() --{ -- QStringList list; -- foreach (QString str, getCurrentSelections()) { -- list.append(Peony::FileUtils::urlDecode(str)); -- } -- return list; --} -- --const QStringList KyNativeFileDialog::getCurrentAllFileUris() --{ -- if(containerView()) -- return containerView()->getAllFileUris(); -- return QStringList(); --} --const QList<std::shared_ptr<Peony::FileInfo>> KyNativeFileDialog::getCurrentSelectionFileInfos() --{ -- const QStringList uris = getCurrentSelections(); -- QList<std::shared_ptr<Peony::FileInfo>> infos; -- for(auto uri : uris) { -- auto info = Peony::FileInfo::fromUri(uri); -- infos<<info; -- } -- return infos; --} -- --void KyNativeFileDialog::setCurrentSelections(QStringList selections) --{ -- QStringList list; -- foreach (QString str, selections) { -- list.append(Peony::FileUtils::urlEncode(str)); -- } -- if(containerView()){ -- containerView()->setSelections(list); -- pDebug << "get setCurrentSelections....:" << containerView()->getSelections(); -- } --} -- --Qt::SortOrder KyNativeFileDialog::getCurrentSortOrder() --{ -- return getCurrentPage()->getSortOrder(); --} -- --int KyNativeFileDialog::getCurrentSortColumn() --{ -- return getCurrentPage()->getSortType(); --} -- --bool KyNativeFileDialog::getWindowShowHidden() --{ -- auto settings = Peony::GlobalSettings::getInstance(); -- if (settings->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()) { -- return settings->getValue(SHOW_HIDDEN_PREFERENCE).toBool(); -- } else { -- auto uri = getCurrentUri(); -- auto metaInfo = Peony::FileMetaInfo::fromUri(uri); -- if (metaInfo) { -- return metaInfo->getMetaInfoVariant(SHOW_HIDDEN_PREFERENCE).isValid()? metaInfo->getMetaInfoVariant(SHOW_HIDDEN_PREFERENCE).toBool(): (settings->getValue(SHOW_HIDDEN_PREFERENCE).toBool()); -- } else { -- pDebug<<"can not get file meta info"<<uri; -- return settings->getValue(SHOW_HIDDEN_PREFERENCE).toBool(); -- } -- } --} --bool KyNativeFileDialog::getWindowUseDefaultNameSortOrder() --{ -- auto settings = Peony::GlobalSettings::getInstance(); -- if (settings->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()) { -- return settings->getValue(SORT_CHINESE_FIRST).isValid()? settings->getValue(SORT_CHINESE_FIRST).toBool(): true; -- } else { -- auto uri = getCurrentUri(); -- auto metaInfo = Peony::FileMetaInfo::fromUri(uri); -- if (metaInfo) { -- return metaInfo->getMetaInfoVariant(SORT_CHINESE_FIRST).isValid()? metaInfo->getMetaInfoVariant(SORT_CHINESE_FIRST).toBool(): (settings->getValue(SORT_CHINESE_FIRST).isValid()? settings->getValue(SORT_CHINESE_FIRST).toBool(): true); -- } else { -- pDebug<<"can not get file meta info"<<uri; -- return settings->getValue(SORT_CHINESE_FIRST).isValid()? settings->getValue(SORT_CHINESE_FIRST).toBool(): true; -- } -- } --} --bool KyNativeFileDialog::getWindowSortFolderFirst() --{ -- auto settings = Peony::GlobalSettings::getInstance(); -- if (settings->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()) { -- return settings->getValue(SORT_FOLDER_FIRST).isValid()? settings->getValue(SORT_FOLDER_FIRST).toBool(): true; -- } else { -- auto uri = getCurrentUri(); -- auto metaInfo = Peony::FileMetaInfo::fromUri(uri); -- if (metaInfo) { -- return metaInfo->getMetaInfoVariant(SORT_FOLDER_FIRST).isValid()? metaInfo->getMetaInfoVariant(SORT_FOLDER_FIRST).toBool(): (settings->getValue(SORT_FOLDER_FIRST).isValid()? settings->getValue(SORT_FOLDER_FIRST).toBool(): true); -- } else { -- pDebug<<"can not get file meta info"<<uri; -- return settings->getValue(SORT_FOLDER_FIRST).isValid()? settings->getValue(SORT_FOLDER_FIRST).toBool(): true; -- } -- } --} -- --void KyNativeFileDialog::refresh() --{ -- getCurrentPage()->refresh(); --} -- --void KyNativeFileDialog::forceStopLoading() --{ -- getCurrentPage()->stopLoading(); -- -- //Key_escape also use as cancel -- if (Peony::ClipboardUtils::isClipboardHasFiles()) -- { -- Peony::ClipboardUtils::clearClipboard(); -- if(containerView()) -- containerView()->repaintView(); -- } --} -- --void KyNativeFileDialog::setShowHidden(bool showHidden) --{ -- getCurrentPage()->setShowHidden(showHidden); --} -- --void KyNativeFileDialog::setUseDefaultNameSortOrder(bool use) --{ -- if (!getCurrentPage()) { -- return; -- } -- getCurrentPage()->setUseDefaultNameSortOrder(use); --} -- --void KyNativeFileDialog::setSortFolderFirst(bool set) --{ -- if (!getCurrentPage()) { -- return; -- } -- getCurrentPage()->setSortFolderFirst(set); --} -- --void KyNativeFileDialog::setCurrentSelectionUris(const QStringList &uris) --{ -- getCurrentPage()->stopLoading(); -- -- //Key_escape also use as cancel -- if (Peony::ClipboardUtils::isClipboardHasFiles()) -- { -- Peony::ClipboardUtils::clearClipboard(); -- if(containerView()) -- containerView()->repaintView(); -- } --} -- --void KyNativeFileDialog::setCurrentSortOrder (Qt::SortOrder order) --{ -- getCurrentPage()->setSortOrder(order); --} -- --void KyNativeFileDialog::setCurrentSortColumn (int sortColumn) --{ -- getCurrentPage()->setSortType(Peony::FileItemModel::ColumnType(sortColumn)); --} -- --void KyNativeFileDialog::editUri(const QString &uri) --{ -- if(containerView()) -- containerView()->editUri(uri); --} -- --void KyNativeFileDialog::editUris(const QStringList &uris) --{ -- if(containerView()) -- containerView()->editUris(uris); --} -- --bool KyNativeFileDialog::getFilterWorking() --{ -- return false; --} -- --void KyNativeFileDialog::beginSwitchView(const QString &viewId) --{ -- if (getCurrentUri() == "computer:///") -- return; -- auto selection = getCurrentSelections(); -- if(!getCurrentPage()||!(getCurrentPage()->getView())) -- return; -- -- if (getCurrentPage()->getView()->viewId() == viewId) -- return; -- -- getCurrentPage()->switchViewType(viewId); -- -- // change default view id -- auto factoryManager = Peony::DirectoryViewFactoryManager2::getInstance(); -- auto internalViews = factoryManager->internalViews(); -- if (internalViews.contains(viewId)) -- Peony::GlobalSettings::getInstance()->setValue(DEFAULT_VIEW_ID, viewId); -- -- setCurrentSelections(selection); -- if (selection.count() >0) -- getCurrentPage()->getView()->scrollToSelection(selection.first()); -- --} -- -- --/** -- * @brief 当前目录 -- */ --const QString KyNativeFileDialog::getCurrentUri() --{ -- return Peony::FileUtils::urlDecode(getCurrentPage()->getCurrentUri()); --} -- --/** -- * @param directory 路径 -- * @brief 设置路径为directory -- */ --void KyNativeFileDialog::setDirectory(const QString &directory) --{ -- pDebug << "setDirectoryoooo...:" << directory; -- setDirectoryUrl(QUrl(directory)); --} -- --void KyNativeFileDialog::setDirectory(const QDir &directory) --{ -- setDirectoryUrl(QUrl::fromLocalFile(directory.absolutePath())); --} -- --QDir KyNativeFileDialog::directory() const --{ -- return QDir(directoryUrl().toLocalFile()); --} -- --void KyNativeFileDialog::setDirectoryUrl(const QUrl &directory) --{ -- pDebug << "setDirectoryUrl.....:" << directory; -- if (!getCurrentPage()) { -- return; -- } -- goToUri(directory.toString(), true); --} -- --QUrl KyNativeFileDialog::directoryUrl() const --{ -- if (!getCurrentPage()) { -- return QUrl(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)); -- } else { -- return QUrl(Peony::FileUtils::urlDecode(getCurrentPage()->getCurrentUri())); -- } --} -- --void KyNativeFileDialog::goToUri(const QString &uri, bool addToHistory, bool forceUpdate) --{ -- pDebug << "goToUri....,,,,:" << uri << getCurrentUri(); -- -- if(containerView() && m_fileDialogHelper){ -- pDebug << "connect............"; -- connect(containerView(), &Peony::DirectoryViewWidget::viewDirectoryChanged, -- m_fileDialogHelper, &KyFileDialogHelper::viewInitialFinished, Qt::UniqueConnection); -- } -- -- if(uri.isEmpty() || uri == getCurrentUri()) -- return; -- QString nUri = uri, nCurrentUri = getCurrentUri(); -- pDebug << "nUri000..." << nUri << "nCurrentUri...." << nCurrentUri; -- if(nUri.endsWith("/")){ -- if((nUri.length() >= 2 && nUri[nUri.length() - 2] != "/") || nUri.length() <2) -- nUri = nUri.remove(nUri.length() - 1, 1); -- } -- if(nCurrentUri.endsWith("/")){ -- if((nCurrentUri.length() >= 2 && nCurrentUri[nCurrentUri.length() - 2] != "/") || nCurrentUri.length() <2) -- nCurrentUri = nCurrentUri.remove(nCurrentUri.length() - 1, 1); -- } -- pDebug << "nUri..." << nUri << "nCurrentUri...." << nCurrentUri; -- if(nUri == nCurrentUri) { -- return; -- } -- pDebug << "getCurrentUri....,,,,:" << getCurrentUri(); -- pDebug << "isShow......:" << (m_fileDialogHelper == nullptr) << m_fileDialogHelper->isShow() << isInitialGoToUriNum; -- if(true)//(isInitialGoToUriNum || (m_fileDialogHelper != nullptr && m_fileDialogHelper->isShow())) -- { -- isInitialGoToUriNum = false; -- getCurrentPage()->stopLoading(); -- if(!m_fileDialogHelper->isShow()) -- addToHistory = false; -- pDebug << "getCurrentUri....,,,,:" << m_fileDialogHelper->isShow() << getCurrentUri(); -- pDebug << "gotouri123123:" << uri << addToHistory << forceUpdate; -- if(uri.startsWith("search:///search_uris=")) -- getCurrentPage()->goToUri(uri, addToHistory, forceUpdate); -- else -- getCurrentPage()->goToUri(Peony::FileUtils::urlEncode(uri), addToHistory, forceUpdate); -- } --} -- --/** -- * @param filename文件名 -- * @brief 选择指定文件 -- */ --void KyNativeFileDialog::selectFile(const QString &filename) --{ -- QUrl url = getCurrentUri(); -- pDebug << "selectFileoooo..........:" << filename; --// if(!QFile::exists(filename.remove(0,7))) --// { --// pDebug << "selectFile not exist:" << filename.remove(0,7); --// return; --// } -- QString path = filename; -- -- if(url.toString() != path) -- { -- if(path.startsWith("/")) -- path = ("file://" + path); -- -- pDebug << "select filename path:" << path; -- -- QUrl pathUrl(path); -- pDebug << "select pathUrl:" << pathUrl.path(); -- -- QDir dir(pathUrl.path()); -- -- if(!path.endsWith("/")) -- dir.cdUp(); -- setDirectoryUrl(QUrl("file://" + dir.path())); -- pDebug << "url2222:" << dir.path(); -- } -- pDebug << "select url...."; -- QList<QUrl> urls; -- if(path.startsWith("/")) -- path = "file://" + path; -- pDebug << "filename:...." << path; -- urls.append(QUrl(path)); -- pDebug << "setInitiallySelectedFiles......" << path; -- m_fileDialogHelper->options()->setInitiallySelectedFiles(urls); --// QDir dir(url.path()); --// url.setPath(dir.absoluteFilePath(filename)); --// pDebug << "selectFile url:" << url << dir.absoluteFilePath(filename) << filename; -- selectUrl(QUrl(path)); --} -- --QStringList KyNativeFileDialog::selectedFiles() const --{ -- QStringList list; -- for (const QUrl &url : selectedUrls()) { -- QUrl fileUrl(url); -- pDebug << "selectedFiles fileUrl.....:" << fileUrl.toString() << fileUrl.path(); --// if(!fileUrl.toString().startsWith("recent://") && !fileUrl.toString().startsWith("trash://")) --// list << fileUrl.toLocalFile(); --// else{ --// list << Peony::FileUtils::getEncodedUri(fileUrl.toString()); --// } -- list << Peony::FileUtils::getEncodedUri(fileUrl.toString()); -- } -- pDebug << "selectedFiles...." << list; -- return list; --} -- --void KyNativeFileDialog::selectUrl(const QUrl &url) --{ -- return; -- Q_D(KyNativeFileDialog); -- pDebug << "selectUrlkkkkk........url.path:" << url.path() << isDir(url.path()); -- if(d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory && isDir(url.path())) -- setCurrentInputName(QFileInfo(url.path()).fileName()); --} -- --QList<QUrl> KyNativeFileDialog::selectedUrls() const --{ -- pDebug << "selectedUrls........:"; -- if (!getCurrentPage()) { -- return QList<QUrl>(); -- } -- pDebug << "selectedUrls........:" << getCurrentPage()->getCurrentSelections(); -- QStringList urlStrList = getCurrentPage()->getCurrentSelections(); -- QList<QUrl> urls; -- for (auto uri : urlStrList) { -- pDebug << "selectedUrls urlDecode....:" << Peony::FileUtils::urlDecode(uri) << QUrl(Peony::FileUtils::urlDecode(uri)) << Peony::FileUtils::getTargetUri(uri); -- if (uri.startsWith("trash://") || uri.startsWith("recent://") -- || uri.startsWith("computer://") || uri.startsWith("favorite://") -- || uri.startsWith("filesafe://")) -- urls << Peony::FileUtils::getTargetUri(uri); -- else{ --// pDebug << "1123456789...." << Peony::FileUtils::getUriBaseName(uri) << Peony::FileUtils::getFileDisplayName(uri) << --// Peony::FileUtils::toDisplayUris(QStringList() << uri) << Peony::FileUtils::getParentUri(uri) << Peony::FileUtils::getOriginalUri(uri); --// pDebug << "4567545678...." << QUrl(Peony::FileUtils::urlDecode(uri)).path() << QUrl(Peony::FileUtils::urlDecode(uri)).toDisplayString() << --// QUrl(Peony::FileUtils::urlDecode(uri)).toLocalFile(); --// pDebug << "4567545678...." << QUrl(uri).path() << QUrl(uri).toDisplayString() << --// QUrl(uri).toLocalFile(); -- uri = uri.remove(0, 7); -- pDebug << "target uri...." << Peony::FileUtils::getTargetUri(uri) << Peony::FileUtils::urlDecode(uri); -- urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(uri));//Peony::FileUtils::urlDecode(uri); -- } -- pDebug << "selectedUrls uri test......." << uri << urls; -- } -- pDebug << "selectedUrls..." << urls; -- return urls; --} -- --QStringList qt_strip_filters(const QStringList &filters) --{ -- QStringList strippedFilters; -- QRegExp r(QString::fromLatin1("^(.*)\\(([^()]*)\\)$")); -- const int numFilters = filters.count(); -- strippedFilters.reserve(numFilters); -- for (int i = 0; i < numFilters; ++i) { -- QString filterName; -- int index = r.indexIn(filters[i]); -- if (index >= 0) -- filterName = r.cap(1); -- strippedFilters.append(filterName.simplified()); -- } -- return strippedFilters; --} -- --void KyNativeFileDialog::setComBoxItems(const QStringList &filters) --{ -- mKyFileDialogUi->m_fileTypeCombo->clear(); -- mKyFileDialogUi->m_fileTypeCombo->addItems(filters); --} -- --void KyNativeFileDialog::setNameFilters(const QStringList &filters) --{ -- Q_D(KyNativeFileDialog); -- d->nameFilters = filters; -- pDebug << "setNameFilters filters..... :" << filters; -- m_nameFilterMap.clear(); -- -- QStringList l; -- if (testOption(QFileDialog::HideNameFilterDetails) && (d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory)) { -- l = qt_strip_filters(filters); -- pDebug << "HideNameFilterDetails..." << l; -- setComBoxItems(l); -- } else { -- l = filters; -- setComBoxItems(filters); -- } -- for(int i = 0; i < filters.length(); i++) -- m_nameFilterMap.insert(i, l[i]); -- -- int index = mKyFileDialogUi->m_fileTypeCombo->currentIndex(); -- pDebug << "setNameFilters index.....:" << index; -- selectNameFilterCurrentIndex(index); --} -- --QStringList KyNativeFileDialog::nameFilters() const --{ -- Q_D( const KyNativeFileDialog); -- return d->nameFilters; --} -- --void KyNativeFileDialog::selectNameFilter(const QString &filter) --{ -- Q_D( const KyNativeFileDialog); -- -- pDebug << "selectNameFilter.,,,,,....." << filter; -- QString key = filter; -- int index = 0; -- if(!mKyFileDialogUi->m_fileTypeCombo->findText(key)){ -- if (testOption(QFileDialog::HideNameFilterDetails) && (d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory)) { -- QStringList l = qt_strip_filters(QStringList(filter)); -- pDebug << "llllllllllll" << l << l.length(); -- if(l.length() > 0) -- key = l.first(); -- } else { -- key = filter; -- } -- } -- pDebug << "key:" << key; -- if(!key.isEmpty()) -- index = mKyFileDialogUi->m_fileTypeCombo->findText(key); -- if(index < 0) -- return; -- pDebug << "index:" << index; -- -- selectNameFilterByIndex(index); -- selectNameFilterCurrentIndex(index); -- Q_EMIT filterSelected(filter); --} -- -- --QString KyNativeFileDialog::selectedNameFilter() const --{ -- Q_D(const KyNativeFileDialog); -- const QComboBox *box = mKyFileDialogUi->m_fileTypeCombo; -- return box ? d->nameFilters.value(box->currentIndex()) : QString(); --} -- --void KyNativeFileDialog::selectNameFilterByIndex(int index) --{ -- Q_D(KyNativeFileDialog); -- if (index < 0 || index >= d->nameFilters.length() || !getCurrentPage()) { -- return; -- } -- mKyFileDialogUi->m_fileTypeCombo->setCurrentIndex(index); -- QStringList nameFilters = d->nameFilters; -- if (index == nameFilters.size()) { -- nameFilters.append(d->nameFilters[d->nameFilters.length() - 1]); -- setNameFilters(nameFilters); -- } -- QString nameFilter = nameFilters.at(index); -- QStringList newNameFilters = QPlatformFileDialogHelper::cleanFilterList(nameFilter); -- pDebug << "selectNameFilterByIndex00000000000"; -- if (/*d->acceptMode == QFileDialog::AcceptSave &&*/ !newNameFilters.isEmpty() && (d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory)) { -- QMimeDatabase db; -- QString text = copyEditText();//mKyFileDialogUi->m_fileNameEdit->text(); -- pDebug << "selectNameFilterByIndex text...." << text; -- pDebug << "selectNameFilterByIndex newNameFilters...." << newNameFilters; -- QStringList list = text.split("."); -- pDebug << "selectNameFilterByIndex11111111 list" << list; -- if(list.length() > 1) -- { -- if("." + list[list.length() - 1] != newNameFilters[0]) -- { -- int m = list[list.length() - 1].length(); -- int n = text.length() - m; -- pDebug << "mmmmmmmmmm..." << m << " nnnnnnnn.... " << n; -- QString s = text.remove(n, m); -- pDebug << "s000000....." << s; -- QStringList filters = newNameFilters[0].split("."); -- s = s + filters[filters.length() - 1]; -- pDebug << "s11111111....." << s; -- mKyFileDialogUi->m_fileNameEdit->setText(s); -- } -- }else{ -- -- } -- } -- if ((d->fileMode == QFileDialog::DirectoryOnly || d->fileMode == QFileDialog::Directory) && QStringList("/") != newNameFilters) { -- newNameFilters = QStringList("/"); -- } --} -- --void KyNativeFileDialog::selectNameFilterCurrentIndex(int index) --{ -- Q_D(KyNativeFileDialog); -- -- if(index < 0 || index >= d->nameFilters.length()) -- return; -- QString nameFilter = d->nameFilters[index]; -- pDebug << "selectNameFilterCurrentIndex nameFilter..." << nameFilter; -- -- if(nameFilter.isEmpty()) -- return; -- QStringList filterList = QPlatformFileDialogHelper::cleanFilterList(nameFilter); -- -- pDebug << "selectNameFilterCurrentIndex filterList:" << filterList; -- QStringList mimeTypeFilterList; -- -- pDebug << "selectNameFilterCurrentIndex filemode.....:" << fileMode(); -- if(fileMode() == QFileDialog::Directory || fileMode() == QFileDialog::DirectoryOnly) -- { -- getCurrentPage()->addFileDialogFiltersCondition(mimeTypeFilterList, filterList, QDir::Dirs, Qt::CaseInsensitive); -- } -- else -- getCurrentPage()->addFileDialogFiltersCondition(mimeTypeFilterList, filterList, filter(), Qt::CaseInsensitive); -- if(m_fileDialogHelper->isViewInitialFinished()){ -- refreshContainerSort(); -- refreshCompleter(); -- } --} -- --int KyNativeFileDialog::selectNameFilterIndex() const --{ -- const QComboBox *box = mKyFileDialogUi->m_fileTypeCombo; -- return box ? box->currentIndex() : -1; --} -- --QDir::Filters KyNativeFileDialog::filter() --{ -- Q_D(KyNativeFileDialog); -- return d->filters; --} -- --void KyNativeFileDialog::setFilter(QDir::Filters filters) --{ -- Q_D(KyNativeFileDialog); -- d->filters = filters; --} -- --void KyNativeFileDialog::setAcceptMode(QFileDialog::AcceptMode mode) --{ -- Q_D(KyNativeFileDialog); -- d->acceptMode = mode; -- updateAcceptButtonState(); -- if (mode == QFileDialog::AcceptOpen) { -- mKyFileDialogUi->m_fileNameLabel->setText(tr("Name"));//文件名 -- mKyFileDialogUi->m_fileNameLabel->setAlignment(Qt::AlignCenter); -- mKyFileDialogUi->m_newFolderButton->hide(); -- mKyFileDialogUi->m_acceptButton->setText(tr("Open")); -- mKyFileDialogUi->m_rejectButton->setText(tr("Cancel")); -- connect(mKyFileDialogUi->m_fileNameEdit , &QLineEdit::textChanged, this, &KyNativeFileDialog::onCurrentInputNameChanged); -- -- } else { -- mKyFileDialogUi->m_fileNameLabel->setText(tr("Save as")); -- mKyFileDialogUi->m_fileNameLabel->setAlignment(Qt::AlignCenter); -- mKyFileDialogUi->m_newFolderButton->setText(tr("New Folder")); -- mKyFileDialogUi->m_newFolderButton->show(); -- mKyFileDialogUi->m_acceptButton->setText(tr("Save")); -- mKyFileDialogUi->m_rejectButton->setText(tr("Cancel")); -- mKyFileDialogUi->m_acceptButton->setDefault(true); -- connect(mKyFileDialogUi->m_fileNameEdit, &QLineEdit::textChanged, this, &KyNativeFileDialog::onCurrentInputNameChanged); -- connect(mKyFileDialogUi->m_newFolderButton, &QPushButton::clicked, this, &KyNativeFileDialog::onNewFolder); -- } --} -- --QFileDialog::AcceptMode KyNativeFileDialog::acceptMode() const --{ -- Q_D(const KyNativeFileDialog); -- return d->acceptMode; --} -- --void KyNativeFileDialog::setFileMode(QFileDialog::FileMode mode) --{ -- Q_D(KyNativeFileDialog); --// if (d->fileMode == QFileDialog::DirectoryOnly || d->fileMode == QFileDialog::Directory) { --// mKyFileDialog->setNameFilters(QStringList()); --// } -- if(mode == QFileDialog::ExistingFile || mode == QFileDialog::AnyFile || -- mode == QFileDialog::DirectoryOnly) -- { -- pDebug << "setFileMode000................" << mode; -- -- getCurrentPage()->setSelectionMode(QAbstractItemView::SingleSelection); -- } -- else -- { -- pDebug << "setFileMode00011111................" << mode; -- -- getCurrentPage()->setSelectionMode(QAbstractItemView::ExtendedSelection); -- } -- -- if (mode == QFileDialog::DirectoryOnly || mode == QFileDialog::Directory) { -- pDebug << "m_fileDialogHelper options setNameFilters...."; -- m_fileDialogHelper->options()->setNameFilters(QStringList() << tr("Directories")); -- setNameFilters(QStringList() << tr("Directories")); -- mKyFileDialogUi->m_fileTypeCombo->clear(); -- mKyFileDialogUi->m_fileTypeCombo->addItem(tr("Directories")); -- mKyFileDialogUi->m_fileTypeCombo->setEnabled(false); -- } -- -- d->fileMode = mode; -- updateAcceptButtonState(); --} -- --QFileDialog::FileMode KyNativeFileDialog::fileMode() --{ -- Q_D(KyNativeFileDialog); -- return d->fileMode; --} -- --void KyNativeFileDialog::setViewMode(ViewMode mode) --{ -- if(containerView()){ -- pDebug << "setViewMode...." << mode << containerView()->viewId(); -- if(mode == ViewMode::List && containerView()->viewId() != "List View") -- { -- this->getCurrentPage()->switchViewType("List View"); -- } -- else if(mode == ViewMode::Icon && containerView()->viewId() != "Icon View") -- this->getCurrentPage()->switchViewType("Icon View"); -- onSwitchView(); -- } --} -- --KyNativeFileDialog::ViewMode KyNativeFileDialog::viewMode() const --{ --// this->getCurrentPage()->switchViewType("List View"); -- -- if(containerView() && containerView()->viewId() == "List View") -- return ViewMode::List; -- return ViewMode::Icon; --} -- --void KyNativeFileDialog::setLabelText(QFileDialog::DialogLabel label, const QString &text) --{ -- switch (static_cast<int>(label)) { -- case QFileDialog::Accept: -- mKyFileDialogUi->m_acceptButton->setText(text); -- break; -- case QFileDialog::Reject: -- mKyFileDialogUi->m_rejectButton->setText(text); -- default: -- break; -- } --} -- --QString KyNativeFileDialog::labelText(QFileDialog::DialogLabel label) const --{ -- switch (static_cast<int>(label)) { -- case QFileDialog::Accept: -- return mKyFileDialogUi->m_acceptButton->text(); -- case QFileDialog::Reject: -- return mKyFileDialogUi->m_rejectButton->text(); -- default: -- break; -- } -- -- return QString(); --} -- --void KyNativeFileDialog::setOptions(QFileDialog::Options options) --{ -- Q_D(KyNativeFileDialog); -- d->options = options; -- if (options.testFlag(QFileDialog::ShowDirsOnly)) { -- d->m_container->setFilterLabelConditions(selectedNameFilter()); -- } --} -- --void KyNativeFileDialog::setOption(QFileDialog::Option option, bool on) --{ -- Q_D(KyNativeFileDialog); -- QFileDialog::Options options = d->options; -- if (on) { -- options |= option; -- } else { -- options &= ~option; -- } -- setOptions(options); --} -- --bool KyNativeFileDialog::testOption(QFileDialog::Option option) const --{ -- Q_D(const KyNativeFileDialog); -- return m_fileDialogHelper->options()->testOption(static_cast<QFileDialogOptions::FileDialogOption>(option)); --} -- --QFileDialog::Options KyNativeFileDialog::options() const --{ -- Q_D(const KyNativeFileDialog); -- return d->options; --} -- --void KyNativeFileDialog::setCurrentInputName(const QString &name) --{ -- pDebug << "setCurrentInputName.........:" << name; -- m_copyEditText = name; --// mKyFileDialogUi->m_fileNameEdit->setText(name); -- QMimeDatabase db; -- const QString &suffix = db.suffixForFileName(name); -- if (suffix.isEmpty()) { -- mKyFileDialogUi->m_fileNameEdit->selectAll(); -- } else { -- mKyFileDialogUi->m_fileNameEdit->setSelection(0, name.length() - suffix.length() - 1); -- } --} -- --void KyNativeFileDialog::onAcceptButtonClicked() --{ -- Q_D(KyNativeFileDialog); -- if (!getCurrentPage()) { -- return; -- } -- pDebug << "onAcceptButtonClicked:" << d->acceptMode << d->fileMode; -- pDebug << "onAcceptButtonClicked000 sfiles..........:" << getCurrentSelectionsList(); -- pDebug << "onAcceptButtonClicked111 sfiles..........:" << selectedFiles(); -- -- if(d->fileMode == QFileDialog::ExistingFile || d->fileMode == QFileDialog::ExistingFiles || d->fileMode == QFileDialog::AnyFile) -- { -- QList<QString> sFiles = selectedFiles(); -- for (int i = 0; i < sFiles.length(); ++i) { -- if(isDir(sFiles[i])) -- { -- pDebug << "gotouri666666" << "file://" + sFiles[i]; -- goToUri(sFiles[i], true); -- return; -- } -- } -- } -- -- if(copyEditText() != "") -- { -- lineEditTextChange(copyEditText()); -- } -- pDebug << "onAcceptButtonClicked directoryUrl:" << directoryUrl() << directory(); -- QList<QString> sFiles = selectedFiles(); -- pDebug << "onAcceptButtonClicked sfiles..........:" << sFiles; --// pDebug << "getSelections........:" << containerView()->getSelections(); --// pDebug << "uri:" << Peony::FileUtils::getTargetUri(getCurrentUri()); --// pDebug << "uri1111111111:" << Peony::FileUtils::getParentUri(getCurrentUri()); -- if(!m_searchMode) -- { -- pDebug << "onAcceptButtonClicked getCurrentUri........:" << getCurrentUri(); -- if(!Peony::FileUtils::isFileExsit(getCurrentUri())){ -- pDebug << directory().path() << "getCurrentUri directory not exists" << getCurrentUri(); -- return; -- } -- } -- else -- { -- foreach (QString str, sFiles) { -- if(!Peony::FileUtils::isFileExsit(str))// -- { -- pDebug << "FileUtils path,,,:" << str << "not exists!"; -- return; -- } -- } -- } -- -- if (d->acceptMode == QFileDialog::AcceptSave) -- { -- if(!doSave(sFiles)) -- { -- pDebug << "da save faile!"; -- return; -- } -- else -- pDebug << "da save success!"; -- -- } -- else if(d->acceptMode == QFileDialog::AcceptOpen) -- { -- if(!doOpen(sFiles)) -- { -- pDebug << "da open faile!"; -- return; -- } -- else -- pDebug << "da open success!"; -- } -- Q_EMIT m_fileDialogHelper->accept(); --} -- --bool KyNativeFileDialog::saveMessageBox(QString name) --{ -- if(QMessageBox::warning(this, tr("Warning"), name + " " + tr("exist, are you sure replace?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) -- { -- return true; -- } -- return false; --} -- --bool KyNativeFileDialog::checkSaveFileExsits(QString path) --{ -- bool exists = false; -- if(fileMode() == QFileDialog::Directory || fileMode() == QFileDialog::DirectoryOnly) -- { -- QDir dir(path); -- exists = dir.exists(); -- } -- else{ -- QFile file(path); -- exists = file.exists(); -- } -- pDebug << "checkSaveFileExsits path...." << path << exists; -- return exists; --} -- --bool KyNativeFileDialog::doSave(QStringList sFiles) --{ -- Q_D(KyNativeFileDialog); -- -- QString file_name = copyEditText(); -- bool suffixCheck = false; -- QStringList nameFilters = d->nameFilters; -- for (QString nameFilterList : nameFilters) { -- for (QString nameFilter : QPlatformFileDialogHelper::cleanFilterList(nameFilterList)) { -- pDebug << "nameFilter:" << nameFilter << "nameFilterList:" << nameFilterList; -- if(nameFilter == "*") -- break; -- QRegExp re(nameFilter, Qt::CaseInsensitive, QRegExp::Wildcard); -- if (re.exactMatch(file_name)) { -- pDebug << "file_name:" << file_name; -- suffixCheck = true; -- }; -- } -- if (suffixCheck) { -- break; -- } -- } -- pDebug << "suffixCheck:" << suffixCheck << "nameFilters:" << nameFilters; -- if (!suffixCheck && !nameFilters.isEmpty()) { -- QMimeDatabase mdb; -- if(mKyFileDialogUi->m_fileTypeCombo->currentIndex() < 0 || -- mKyFileDialogUi->m_fileTypeCombo->currentIndex() >= nameFilters.length()) -- return false; -- QString nameFilter = nameFilters[mKyFileDialogUi->m_fileTypeCombo->currentIndex()]; -- QStringList newNameFilters = QPlatformFileDialogHelper::cleanFilterList(nameFilter); -- if (!newNameFilters.isEmpty()) { -- if(m_fileDialogHelper->options()->defaultSuffix() == ""){ -- -- for (const QString &filter : newNameFilters) { -- QString suffix = mdb.suffixForFileName(filter); -- pDebug << "suffix....." << suffix; -- if (suffix.isEmpty()) { -- QRegExp regExp(filter.mid(2), Qt::CaseInsensitive, QRegExp::Wildcard); -- mdb.allMimeTypes().first().suffixes().first(); -- for (QMimeType m : mdb.allMimeTypes()) { -- for (QString suffixe : m.suffixes()) { -- if (regExp.exactMatch(suffixe)) { -- suffix = suffixe; -- break; -- } -- } -- if (!suffix.isEmpty()) { -- break; -- } -- } -- -- } -- -- pDebug << "suffix:" << suffix; -- if (!suffix.isEmpty()) { -- QString oldName = file_name; -- oldName.append('.' + suffix); -- setCurrentInputName(oldName); -- pDebug << "path///:" << directory().path() + "/" + oldName; -- if(checkSaveFileExsits(directory().path() + "/" + oldName)){ -- if(!saveMessageBox(oldName)) -- return false; -- break; -- } -- if(filter == newNameFilters[newNameFilters.length() - 1]) -- { -- QString oldName = file_name; -- oldName.append('.' + mdb.suffixForFileName(newNameFilters[0])); -- if(checkSaveFileExsits(directory().path() + "/" + oldName)){ -- if(!saveMessageBox(oldName)) -- return false; -- break; -- } -- setCurrentInputName(oldName); -- return true; -- } -- } -- } -- } -- else{ -- file_name.append('.' + m_fileDialogHelper->options()->defaultSuffix()); -- if(checkSaveFileExsits(directory().path() + "/" + file_name)){ -- if(!saveMessageBox(file_name)) -- return false; -- } -- setCurrentInputName(file_name); -- pDebug << "path///:" << directory().path() + "/" + file_name; -- } -- } -- } -- else if(suffixCheck) -- { -- pDebug << "suffixCheck.....:" << suffixCheck << "path///:" << directory().path() + "/" + file_name; -- if(checkSaveFileExsits(directory().path() + "/" + file_name)){ -- if(!saveMessageBox(file_name)) -- return false; -- } -- } -- return true; --} -- --bool KyNativeFileDialog::doOpen(QStringList sFiles) --{ -- Q_D(KyNativeFileDialog); -- --// if(d->fileMode != QFileDialog::AnyFile && sFiles.length() == 0) --// return false; --// if(d->fileMode == QFileDialog::DirectoryOnly && sFiles.length() > 1) --// return false; -- pDebug << "doOpen fileMode:" << d->fileMode; -- if(d->fileMode == QFileDialog::ExistingFile || d->fileMode == QFileDialog::ExistingFiles) -- { -- int isfiles = 0; -- int isDirctory = 0; -- foreach (QString files, sFiles) -- { -- if(isDir(files)) -- { -- isDirctory++; -- } -- else -- isfiles++; -- } -- pDebug << "isfiles:" << isfiles << "isDirctory:" << isDirctory; -- if((isfiles > 0 && isDirctory > 0) || (isDirctory > 1) || (isfiles <= 0 && isDirctory <= 0)) -- return false; -- else{ -- pDebug << "open setSelected..."; -- Q_EMIT filesSelected(selectedUrls()); -- } -- } -- else if(d->fileMode == QFileDialog::AnyFile) -- { -- if(sFiles.length() > 0) -- { -- Q_EMIT filesSelected(selectedUrls()); -- } -- else if(copyEditText() != "") -- { -- QList<QUrl> urlList; -- pDebug << "directory path:" << directory().path() << directoryUrl().path(); -- urlList.append(QUrl(directory().path() + "/" + copyEditText())); -- Q_EMIT filesSelected(urlList); -- } -- else -- return false; -- } -- else if(d->fileMode == QFileDialog::DirectoryOnly || d->fileMode == QFileDialog::Directory) -- { -- if(copyEditText() != "") -- { -- if(sFiles.isEmpty() || (!sFiles.isEmpty() && !isDir(sFiles[0]))) -- { -- return false; -- } -- else -- Q_EMIT filesSelected(selectedUrls()); -- } -- else -- { -- if (!getCurrentPage()) { -- return false; -- } -- QList<QUrl> urls; -- QString uri = getCurrentPage()->getCurrentUri(); -- pDebug << "current uri........:" << uri; -- -- if (uri.startsWith("trash://") || uri.startsWith("recent://") -- || uri.startsWith("computer://") || uri.startsWith("favorite://") -- || uri.startsWith("filesafe://")) -- { -- urls << Peony::FileUtils::getTargetUri(uri); -- } -- else -- { -- urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(uri)); -- } -- if(containerView()) -- pDebug << "select uri....:" << containerView()->getSelections(); -- -- Q_EMIT filesSelected(urls); -- } -- } -- pDebug << "onAcceptButtonClicked selectedfiles:" << sFiles; -- -- return true; --} -- -- --void KyNativeFileDialog::onRejectButtonClicked() --{ -- Q_EMIT m_fileDialogHelper->reject(); --} -- --bool KyNativeFileDialog::isDir(QString path) --{ -- auto fileSymLinkInfo = Peony::FileInfo::fromUri(path); -- if(fileSymLinkInfo->isSymbolLink()) { -- path = fileSymLinkInfo->symlinkTarget(); -- } -- else -- path = Peony::FileUtils::urlEncode(path); -- -- QFile file(path); -- QFileInfo fileInfo(file); -- pDebug << "isDir path1111:" << path << fileInfo.isDir() << Peony::FileUtils::isFileDirectory(path) << Peony::FileUtils::getFileIsFolder(path);; -- if(fileInfo.isDir()) -- return true; -- -- pDebug << "isDir path2222222..:" << path << Peony::FileUtils::isFileDirectory(path) << Peony::FileUtils::getFileIsFolder(path); -- return Peony::FileUtils::isFileDirectory(path);; --} -- --void KyNativeFileDialog::goBack() --{ -- pDebug << "goback...." << getCurrentPage()->canGoBack(); -- getCurrentPage()->goBack(); --} -- --void KyNativeFileDialog::goForward() --{ -- pDebug << "goForward...." << getCurrentPage()->canGoForward(); -- getCurrentPage()->goForward(); --} -- --void KyNativeFileDialog::goToParent() --{ -- pDebug << "goToParent...." << getCurrentPage()->canCdUp(); -- getCurrentPage()->cdUp(); -- --} -- --void KyNativeFileDialog::setHelper(KyFileDialogHelper* helepr) --{ -- if(helepr != nullptr) -- m_fileDialogHelper = helepr; --} -- --void KyNativeFileDialog::onSwitchView() --{ -- pDebug << "onSwitchView containerView:" << (containerView() == nullptr); -- if(containerView() != nullptr) -- { -- QString viewId = containerView()->viewId(); -- pDebug << "onSwitchView:" << viewId; -- if (viewId == "List View") { -- mKyFileDialogUi->m_modeButton->setIcon(QIcon::fromTheme("view-list-symbolic")); -- this->mKyFileDialogUi->m_listModeAction->setChecked(true); -- this->mKyFileDialogUi->m_iconModeAction->setChecked(false); -- } else { -- mKyFileDialogUi->m_modeButton->setIcon(QIcon::fromTheme("view-grid-symbolic")); -- this->mKyFileDialogUi->m_listModeAction->setChecked(false); -- this->mKyFileDialogUi->m_iconModeAction->setChecked(true); -- } -- } --} -- --void KyNativeFileDialog::updateWindowState() --{ -- Q_D(KyNativeFileDialog); -- pDebug << "updateWindowState.............." << getCurrentUri() << directory() << directoryUrl() << mKyFileDialogUi->m_fileNameEdit->text() << copyEditText(); -- //mKyFileDialogUi->m_fileNameEdit->setText(""); -- pDebug << "updateWindowState m_searchMode.............." <<m_searchMode << getCurrentUri() << m_isClearSearchKey; -- --// if(m_searchMode && !getCurrentUri().startsWith("search:///") && !m_isClearSearchKey) --// { --// m_isClearSearchKey = false; --// searchButtonClicked(); --// } -- -- refreshCompleter(); --// const QStringList list = getCurrentPage()->getAllFileUris(); --// pDebug << "getAllFileUris:" << list; --// pDebug << "getselectUris:" << getCurrentSelectionsList(); -- --// m_CurrentPathAllFiles.clear(); -- --// foreach (QString str, list) { --// str = Peony::FileUtils::urlDecode(str); --// m_CurrentPathAllFiles.append(str.split("/").last()); --// } -- --// pDebug << "updateWindowState 1111111111111"; --// QStringListModel *model = (QStringListModel *)(m_completer->model()); --// model->setStringList(m_CurrentPathAllFiles); --// pDebug << "updateWindowState 2222222222222"; -- -- auto uri = getCurrentUri(); -- pDebug << "updateWindowState uri updatePath....." << uri << getCurrentPage()->canGoBack(); -- mKyFileDialogUi->m_pathbarWidget->updatePath(uri); -- mKyFileDialogUi->m_backButton->setEnabled(getCurrentPage()->canGoBack()); -- mKyFileDialogUi->m_forwardButton->setEnabled(getCurrentPage()->canGoForward()); -- mKyFileDialogUi->m_toParentButton->setEnabled(getCurrentPage()->canCdUp()); -- updateStatusBar(); -- pDebug << "updateWindowState 44444"; -- lineEditTextChange(copyEditText()); -- pDebug << "updateWindowState 55555555555555555555" << uri; -- --} -- --QString KyNativeFileDialog::selectName() --{ -- QStringList selectList = getCurrentPage()->getCurrentSelections(); -- QString nameStr = ""; -- for(int i = 0; i < selectList.length(); i++) -- { -- pDebug << "selectName ....i:" << i << Peony::FileUtils::getFileDisplayName(selectList[i]) << isDir(selectList[i]); -- if(acceptMode() == QFileDialog::AcceptSave && isDir(selectList[i])){ -- continue; -- } -- if(acceptMode() == QFileDialog::AcceptOpen && (fileMode() == QFileDialog::ExistingFile || -- fileMode() == QFileDialog::ExistingFiles || fileMode() == QFileDialog::AnyFile) && isDir(selectList[i])){ -- continue; -- } -- QString str = Peony::FileUtils::getFileDisplayName(selectList[i]);//Peony::FileUtils::urlDecode(selectList[i]); -- QString name = ""; -- if(selectList.length() == 1) -- name += str.split("/").last(); -- else if(i < (selectList.length() -1)) -- name += "\"" + str.split("/").last() + "\" "; -- else -- name += "\"" + str.split("/").last() + "\""; -- nameStr += name; -- } -- -- if(acceptMode() == QFileDialog::AcceptSave){ -- for(int i = 0; i < selectList.length(); i++) { -- if(isDir(selectList[i])) { -- mKyFileDialogUi->m_acceptButton->setText(tr("Open")); -- return nameStr; -- } -- } -- mKyFileDialogUi->m_acceptButton->setText(tr("Save")); -- } -- return nameStr; --} -- --void KyNativeFileDialog::updateStatusBar() --{ -- if(getCurrentSelectionsList().length() > 0) -- { -- foreach (QString str, getCurrentSelections()) { -- pDebug << "updateStatusBar str" << str; -- Q_EMIT currentChanged(QUrl(QUrl(str).path())); -- } -- } -- updateAcceptButtonState(); -- QString nameStr = selectName(); -- if(nameStr != "" && !mKyFileDialogUi->m_fileNameEdit->hasFocus()) -- mKyFileDialogUi->m_fileNameEdit->setText(nameStr); -- pDebug << "updateStatusBar............" << mKyFileDialogUi->m_fileNameEdit->hasFocus() << getCurrentUri(); --} -- --void KyNativeFileDialog::containerMenuRequest(const QPoint &pos) --{ -- pDebug << "menuRequest....00000" << pos << QCursor::pos() << (this->getCurrentPage() == nullptr); -- if(this->getCurrentPage()) -- pDebug << "menuRequest....1111111" << (this->getCurrentPage()->getView() == nullptr); -- Peony::DirectoryViewMenu menu(this); -- QStringList hideActionsName; -- hideActionsName.append(OPEN_IN_NEW_WINDOW_ACTION); -- hideActionsName.append(OPEN_IN_NEW_TAB_ACTION); -- pDebug << "hideActionsName...." << hideActionsName; -- menu.setHiddenActionsByObjectName(hideActionsName); -- pDebug << "menuRequest....11111"; -- menu.exec(QCursor::pos()); -- m_uris_to_edit = menu.urisToEdit(); --} -- --void KyNativeFileDialog::delayShow() --{ -- Q_D(const KyNativeFileDialog); -- //QTBUG48248 借鉴kde plasma-integration里用的QTimer -- pDebug << "delayShow start..........." << getCurrentUri(); -- d->m_timer->start(); --} -- --void KyNativeFileDialog::discardDelayedShow() --{ -- Q_D(const KyNativeFileDialog); -- pDebug << "discardDelayedShow stop..........."; -- d->m_timer->stop(); --} -- -- --void KyNativeFileDialog::resizeEvent(QResizeEvent *e) --{ -- pDebug << "resizeEvent....." << this->width() << mKyFileDialogUi->m_siderWidget->width() << mKyFileDialogUi->m_container->width(); -- QDialog::resizeEvent(e); --} -- --void KyNativeFileDialog::paintEvent(QPaintEvent *e) --{ -- KWindowEffects::enableBlurBehind(this->winId(), true); -- -- QColor color = this->palette().base().color(); -- QColor colorBase = QColor(this->palette().base().color()); -- -- int R1 = color.red(); -- int G1 = color.green(); -- int B1 = color.blue(); -- qreal a1 = 0.3; -- -- int R2 = colorBase.red(); -- int G2 = colorBase.green(); -- int B2 = colorBase.blue(); -- qreal a2 = 1; -- -- qreal a = 1 - (1 - a1)*(1 - a2); -- -- qreal R = (a1*R1 + (1 - a1)*a2*R2) / a; -- qreal G = (a1*G1 + (1 - a1)*a2*G2) / a; -- qreal B = (a1*B1 + (1 - a1)*a2*B2) / a; -- -- colorBase.setRed(R); -- colorBase.setGreen(G); -- colorBase.setBlue(B); -- auto sidebarOpacity = Peony::GlobalSettings::getInstance()->getValue(SIDEBAR_BG_OPACITY).toInt(); -- -- if(sidebarOpacity != 100) -- mKyFileDialogUi->m_sider->viewport()->setAttribute(Qt::WA_TranslucentBackground); -- -- colorBase.setAlphaF(sidebarOpacity/100.0); -- -- QPainterPath sidebarPath; -- //sidebarPath.setFillRule(Qt::FillRule::WindingFill); -- QRect sideBarRect = QRect(mKyFileDialogUi->m_sider->mapTo(this, QPoint()), mKyFileDialogUi->m_sider->size()); -- auto adjustedRect = sideBarRect.adjusted(0, 0, 0, 0); -- int radius = 6; -- if(this && this->property("normalRadius").isValid()) -- radius = this->property("normalRadius").toInt(); -- sidebarPath.addRoundedRect(adjustedRect, radius, radius); -- --// sidebarPath.addRect(adjustedRect.adjusted(0, 0, 0, -6)); --// sidebarPath.addRect(adjustedRect.adjusted(6, 0, 0, 0)); -- QPainter p(this); -- QPainterPath contentPath; -- -- -- if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -- auto settings = UKUIStyleSettings::globalInstance(); -- if(settings->keys().contains("windowRadius")) -- radius = settings->get("windowRadius").toInt(); -- else if(this && this->property("maxRadius").isValid()) -- radius = this->property("maxRadius").toInt(); -- } -- else if(this && this->property("maxRadius").isValid()) -- radius = this->property("maxRadius").toInt(); -- --// qDebug() << "KyNativeFileDialog radius........" << radius; -- contentPath.addRoundedRect(this->rect(), radius, radius); -- auto bgPath = contentPath - sidebarPath; -- p.fillPath(bgPath, color); -- p.fillPath(sidebarPath, colorBase); -- -- QPalette palette = mKyFileDialogUi->m_sider->viewport()->palette(); -- -- palette.setColor(QPalette::Base, colorBase);//window AlternateBase Base NoRole --// pDebug << "viewport color:" << palette.color(QPalette::AlternateBase) << --// palette.color(QPalette::Window) << palette.color(QPalette::Base) --// << palette.color(QPalette::NoRole) << palette.color(QPalette::Shadow); -- -- mKyFileDialogUi->m_sider->viewport()->setPalette(palette); -- -- QPalette sPalette = mKyFileDialogUi->m_sider->verticalScrollBar()->palette(); -- //sPalette.setColor(QPalette::Button, Qt::red);//window AlternateBase Base NoRole -- sPalette.setColor(QPalette::Base, colorBase);//window AlternateBase Base NoRole -- --// pDebug << "scrollbar color:" << sPalette.color(QPalette::AlternateBase) << --// sPalette.color(QPalette::Window) << sPalette.color(QPalette::Base) --// << sPalette.color(QPalette::NoRole) << sPalette.color(QPalette::Shadow); -- -- mKyFileDialogUi->m_sider->verticalScrollBar()->setPalette(sPalette); -- -- --// mKyFileDialogUi->m_sider->viewport()->setAttribute(Qt::WA_StyleSheet); --// mKyFileDialogUi->m_sider->viewport()->setObjectName("viewport"); --// mKyFileDialogUi->m_sider->viewport()->setStyleSheet("QWidget#viewport{background-color:red}"); --// mKyFileDialogUi->m_sider->viewport()->setAttribute(Qt::WA_TranslucentBackground); -- -- // mKyFileDialogUi->m_sider->verticalScrollBar()->setObjectName("scrollbar"); -- // mKyFileDialogUi->m_sider->verticalScrollBar()->setAttribute(Qt::WA_StyleSheet); -- // mKyFileDialogUi->m_sider->verticalScrollBar()->setStyleSheet("QWidget#scrollbar{background-color:red}"); --// m_effect->setTransParentPath(sidebarPath); --// m_effect->setTransParentAreaBg(colorBase); -- --// //color.setAlphaF(0.5); --// m_effect->setWindowBackground(color); -- --// m_effect->drawWindowShadowManually(&p, this->rect(), false); -- QDialog::paintEvent(e); --} -- --void KyNativeFileDialog::keyPressEvent(QKeyEvent *e) --{ -- if (e->key() == Qt::Key_Backspace) -- { -- auto uri = Peony::FileUtils::getParentUri(getCurrentUri()); -- //qDebug() << "goUp Action" << getCurrentUri() << uri; -- if (uri.isNull()) -- return; -- goToUri(uri, true, true); -- } -- -- return QDialog::keyPressEvent(e); --} -- -- --Peony::DirectoryViewContainer *KyNativeFileDialog::getCurrentPage() --{ -- Q_D(const KyNativeFileDialog); -- return d->m_container; --} -- --Peony::DirectoryViewContainer *KyNativeFileDialog::getCurrentPage() const --{ -- Q_D(const KyNativeFileDialog); -- return d->m_container; --} -- --Peony::DirectoryViewWidget *KyNativeFileDialog::containerView() const --{ -- return getCurrentPage()->getView(); --} -- --void KyNativeFileDialog::updateAcceptButtonState() --{ -- Q_D(const KyNativeFileDialog); -- -- pDebug << "updateAcceptButtonState......" << getCurrentUri() << d->acceptMode << d->fileMode; -- if(d->acceptMode == QFileDialog::AcceptOpen) -- { -- if(d->fileMode != QFileDialog::Directory && d->fileMode != QFileDialog::DirectoryOnly) -- { -- mKyFileDialogUi->m_acceptButton->setEnabled(!(getCurrentSelectionsList().length() == 0)); -- return; -- bool isSelectFile = false; -- if(copyEditText() == "") -- mKyFileDialogUi->m_acceptButton->setEnabled(!(getCurrentSelectionsList().length() == 0)); -- -- if(copyEditText() != "") -- { -- QString text = copyEditText(); -- QStringList list = text.split("\""); -- pDebug << "list234565432............" << list; -- for (int i = list.length() - 1; i >= 0; i--) { -- if(list[i] == "" || list[i] == " ") -- list.removeAt(i); -- } -- pDebug << "list testtttttt..............:" << list; -- -- foreach (QString str, list) { -- if(str.length() > 0 && str[0] == "\"") -- str = str.remove(0, 1); -- if(str.length() > 0 && str[str.length() - 1] == "\"") -- str = str.remove(str.length() - 1, 1); -- QString parentPath = getCurrentUri(); -- -- if(parentPath.endsWith("/")) -- parentPath.remove(parentPath.length() - 1, 1); -- pDebug << "updateAcceptButtonState str0000:" << (parentPath + "/" + str);//parentPath.startsWith("recent://") -- -- if ((parentPath.startsWith("trash://") || parentPath.startsWith("recent://") -- || parentPath.startsWith("computer://") || parentPath.startsWith("favorite://") -- || parentPath.startsWith("filesafe://")) && getCurrentSelections().length() > 0) -- { -- QString targetUri = Peony::FileUtils::getTargetUri(getCurrentSelections()[0]); -- QString targetPath = Peony::FileUtils::urlDecode(targetUri); -- pDebug << "getTargetUri uri....." << targetUri; -- pDebug << "uriiiiii...." << targetPath; -- if(Peony::FileUtils::isFileExsit(targetPath)) -- { -- isSelectFile = true; -- pDebug << "isSelectFileeeeeeee11111...." << isSelectFile; -- break; -- } -- } -- else -- { -- QString targetPath = Peony::FileUtils::urlDecode(parentPath + "/" + str); -- pDebug << "targetPath11111 uri....." << targetPath << Peony::FileUtils::isFileExsit(targetPath); -- -- QString targetPath1 = Peony::FileUtils::urlEncode(parentPath + "/" + str); -- pDebug << "targetPath123432 uri....." << targetPath1 << Peony::FileUtils::isFileExsit(targetPath1); -- -- if(Peony::FileUtils::isFileExsit(parentPath + "/" + str)) -- isSelectFile = true; -- pDebug << "isSelectFileeeeeee22222...." << isSelectFile; -- break; -- } -- } -- mKyFileDialogUi->m_acceptButton->setEnabled(isSelectFile); -- return; -- } -- } -- else -- { -- bool isSelectFile = true; -- if(copyEditText() != "") -- { -- QString text = copyEditText(); -- QStringList list = text.split("\""); -- pDebug << "list0000............" << list; -- for (int i = list.length() - 1; i >= 0; i--) { -- if(list[i] == "" || list[i] == " ") -- list.removeAt(i); -- } -- pDebug << "list1111..............:" << list; -- -- foreach (QString str, list) { -- pDebug << "strrrrrrrrr....." << str; -- if(str.length() > 0 && str[0] == "\"") -- str = str.remove(0, 1); -- if(str.length() > 0 && str[str.length() - 1] == "\"") -- str = str.remove(str.length() - 1, 1); -- QString parentPath = getCurrentUri(); -- -- pDebug << "parentPath......" << parentPath; -- if(parentPath.endsWith("/")) -- parentPath.remove(parentPath.length() - 1, 1); -- pDebug << "updateAcceptButtonState str,,,,,,:" << (parentPath + "/" + str) << Peony::FileUtils::isFileExsit(parentPath + "/" + str); -- -- if(isDir(parentPath + "/" + str)) -- { -- pDebug << "isSelectFile000000...:" << isSelectFile << (parentPath + "/" + str); -- isSelectFile = true; -- break; -- } -- else -- { -- isSelectFile = false; -- } -- } -- } -- pDebug << "isSelectFile...." << isSelectFile; -- mKyFileDialogUi->m_acceptButton->setEnabled(isSelectFile); -- } -- } -- else -- { -- if(getCurrentSelectionsList().length() != 0){ -- mKyFileDialogUi->m_acceptButton->setEnabled(true); -- return; -- } -- if(copyEditText() == "") -- mKyFileDialogUi->m_acceptButton->setEnabled(false); -- else -- mKyFileDialogUi->m_acceptButton->setEnabled(true); -- pDebug << "isenabled......:" << mKyFileDialogUi->m_acceptButton->isEnabled(); -- } -- pDebug << "acceptButton isEnabled:" << mKyFileDialogUi->m_acceptButton->isEnabled(); --} -- --void KyNativeFileDialog::onCurrentInputNameChanged() --{ -- Q_D(KyNativeFileDialog); -- d->currentInputName = copyEditText(); -- updateAcceptButtonState(); --} -- --void KyNativeFileDialog::onNewFolder() --{ -- Peony::CreateTemplateOperation op(getCurrentUri(), Peony::CreateTemplateOperation::EmptyFolder); -- op.run(); -- return; -- QDir dir = directory(); -- pDebug << "onNewFolder getCurrentUri:" << getCurrentUri() << directory() << directoryUrl(); -- QString path = ""; -- if(directory().path() != "/") -- path = directory().path(); -- path += "/" + tr("NewFolder"); -- if(!dir.exists(path)) -- { -- bool newFolder = dir.mkdir(path); -- pDebug << "newFolder:" << newFolder; -- } --} -- --void KyNativeFileDialog::setSortType() --{ -- if(getCurrentPage()->getSortOrder() == Qt::AscendingOrder) -- { -- mKyFileDialogUi->m_sortButton->setIcon(QIcon::fromTheme("view-sort-descending-symbolic")); -- mKyFileDialogUi->m_descending->setChecked(true); -- mKyFileDialogUi->m_ascending->setChecked(false); -- } -- else -- { -- mKyFileDialogUi->m_sortButton->setIcon(QIcon::fromTheme("view-sort-ascending-symbolic")); -- mKyFileDialogUi->m_ascending->setChecked(true); -- mKyFileDialogUi->m_descending->setChecked(false); -- } --} -- --void KyNativeFileDialog::intiContainerSort() --{ -- auto settings = Peony::GlobalSettings::getInstance(); -- auto sortType = settings->isExist(SORT_COLUMN)? settings->getValue(SORT_COLUMN).toInt() : 0; -- auto sortOrder = settings->isExist(SORT_ORDER)? settings->getValue(SORT_ORDER).toInt() : 0; -- pDebug << "sortType:" << sortType << sortOrder; -- getCurrentPage()->setSortType(Peony::FileItemModel::ColumnType(sortType)); -- getCurrentPage()->setSortOrder(Qt::SortOrder(sortOrder)); -- setSortType(); -- setShowHidden(getWindowShowHidden()); --} -- --void KyNativeFileDialog::refreshContainerSort() --{ -- intiContainerSort(); -- setUseDefaultNameSortOrder(getWindowUseDefaultNameSortOrder()); -- setSortFolderFirst(getWindowSortFolderFirst()); --} -- --void KyNativeFileDialog::refreshCompleter() --{ -- const QStringList list = getCurrentPage()->getAllFileUris(); -- pDebug << "getAllFileUris:" << list; -- pDebug << "getselectUris:" << getCurrentSelectionsList(); -- -- m_CurrentPathAllFiles.clear(); -- -- foreach (QString str, list) { -- str = Peony::FileUtils::urlDecode(str); -- m_CurrentPathAllFiles.append(str.split("/").last()); -- } -- -- pDebug << "updateWindowState 1111111111111"; -- QStringListModel *model = (QStringListModel *)(m_completer->model()); -- model->setStringList(m_CurrentPathAllFiles); -- pDebug << "updateWindowState 2222222222222"; --} -- --void KyNativeFileDialog::searchButtonClicked() --{ -- m_searchMode = ! m_searchMode; -- if(m_searchMode) -- { -- mKyFileDialogUi->m_fileNameEdit->setText(""); -- mKyFileDialogUi->m_fileNameEdit->setReadOnly(true); -- setCurrentSelections(QStringList()); -- } -- else -- { -- mKyFileDialogUi->m_fileNameEdit->setReadOnly(false); -- } -- pDebug << "searchButtonClicked searchButtonClicked" <<m_searchMode; -- m_lastSearchPath = getCurrentUri(); -- pDebug << "m_lastSearchPath....." << m_lastSearchPath << getCurrentUri() << getCurrentPage()->getCurrentUri(); -- //Q_EMIT this->updateSearchRequest(m_search_mode); -- setSearchMode(m_searchMode); --} -- --void KyNativeFileDialog::setSearchMode(bool mode) --{ -- mKyFileDialogUi->m_searchBtn->setCheckable(mode); -- mKyFileDialogUi->m_searchBtn->setChecked(mode); -- mKyFileDialogUi->m_searchBtn->setDown(mode); -- mKyFileDialogUi->m_pathbar->switchEditMode(mode); --} -- --void KyNativeFileDialog::lineEditTextChange(QString text) --{ -- m_copyEditText = text; -- if(m_searchMode) -- return; -- QString url; -- if(directory().path() != "/") -- url = QUrl(getCurrentUri()).path();//directoryUrl().toString();//getCurrentUri() -- pDebug << "mKyFileDialogUi->m_fileNameEdit......:" << getCurrentUri() << url << text; -- pDebug << "listview55555555555555.........." << m_CurrentPathAllFiles.length(); -- QString parentPath = getCurrentUri(); -- -- if(parentPath.endsWith("/")) -- parentPath.remove(parentPath.length() - 1, 1); -- if(url.endsWith("/")) -- url.remove(url.length() - 1, 1); -- -- pDebug << "parentPath:" << parentPath; -- pDebug << "getCurrentSelections......:" << getCurrentSelectionsList() << text; -- -- if(!text.contains("\""))//输入框中只有1个文件 -- { -- if ((parentPath.startsWith("trash://") || parentPath.startsWith("recent://") -- || parentPath.startsWith("computer://") || parentPath.startsWith("favorite://") -- || parentPath.startsWith("filesafe://")) && getCurrentSelections().length() > 0) -- { -- for(int i = 0; i < getCurrentSelections().length(); i++) -- { -- QString targetUri = Peony::FileUtils::getTargetUri(getCurrentSelections()[i]); -- Peony::FileInfo fileInfo(targetUri); -- pDebug << "text:" << text << "displayName:" << fileInfo.displayName(); -- if(fileInfo.displayName() == text){ -- updateAcceptButtonState(); -- return; -- } -- } -- QString targetUri = Peony::FileUtils::getTargetUri(getCurrentSelections()[0]); -- QString targetPath = Peony::FileUtils::urlDecode(targetUri); -- pDebug << "getTargetUri uri....." << targetUri; -- pDebug << "uriiiiii...." << targetPath; -- if(Peony::FileUtils::isFileExsit(targetPath)) -- { -- QStringList selectList; -- selectList.append(getCurrentSelections()[0]); -- pDebug << "selectList...000000" << selectList; -- setCurrentSelections(selectList); -- updateAcceptButtonState(); -- return; -- } -- } -- else -- { -- pDebug << "Peony::FileUtils::isFileExsit123:" << (parentPath + "/" + text) << Peony::FileUtils::isFileExsit(parentPath + "/" + text); -- // pDebug << "Peony::FileUtils::isFileExsit:" << (parentPath + "/" + text) << Peony::FileUtils::isFileExsit(parentPath + "/" + text); -- for(int i = 0; i < getCurrentSelections().length(); i++) -- { -- if(Peony::FileUtils::getFileDisplayName(getCurrentSelections()[i]) == text){ -- updateAcceptButtonState(); -- return; -- } -- } -- -- if(Peony::FileUtils::isFileExsit(parentPath + "/" + text)){ -- pDebug << "file exists...."; -- //m_container选择指定文件 -- QStringList selectList; -- selectList.append(parentPath + "/" + text); -- pDebug << "selectList...1111111" << selectList; -- setCurrentSelections(selectList); -- if(containerView()) -- pDebug << "selectList...22222222222" << containerView()->getSelections(); -- updateAcceptButtonState(); -- return; -- } -- else -- { -- QString path = parentPath + "/" + text; -- pDebug << path << "not exists!"; -- setCurrentSelections(QStringList()); -- updateAcceptButtonState(); -- return; -- } -- } -- } -- else -- { -- if ((parentPath.startsWith("trash://") || parentPath.startsWith("recent://") -- || parentPath.startsWith("computer://") || parentPath.startsWith("favorite://") -- || parentPath.startsWith("filesafe://"))) -- { -- QStringList list = text.split("\""); -- pDebug << "listttt1111............" << list; -- for (int i = list.length() - 1; i >= 0; i--) { -- if(list[i] == "" || list[i] == " ") -- list.removeAt(i); -- } -- QStringList displayNameList; -- for(int i = 0; i < getCurrentSelections().length(); i++) -- { -- QString targetUri = Peony::FileUtils::getTargetUri(getCurrentSelections()[i]); -- Peony::FileInfo fileInfo(targetUri); -- pDebug << "text:" << text << "displayName:" << fileInfo.displayName(); -- displayNameList.append(fileInfo.displayName()); -- } -- pDebug << "list:" << list; -- pDebug << "displayNameList:" << displayNameList; -- for(int i = 0; i < list.length(); i++){ -- if(!displayNameList.contains(list[i])) -- break; -- else if(i == list.length() - 1){ -- updateAcceptButtonState(); -- return; -- } -- } -- -- QStringList selectList; -- foreach (QString str, getCurrentSelections()) -- { -- QString targetUri = Peony::FileUtils::getTargetUri(str); -- QString targetPath = Peony::FileUtils::urlDecode(targetUri); -- pDebug << "getTargetUri uri0000....." << targetUri; -- pDebug << "uriiiiii00000...." << targetPath; -- if(Peony::FileUtils::isFileExsit(targetPath)) -- { -- selectList.append(str); -- } -- } -- pDebug << "selectList...222222222" << selectList; -- setCurrentSelections(selectList); -- updateAcceptButtonState(); -- return; -- } -- else{ -- QStringList selectList; -- QStringList list = text.split("\""); -- pDebug << "listttt1111............" << list; -- for (int i = list.length() - 1; i >= 0; i--) { -- if(list[i] == "" || list[i] == " ") -- list.removeAt(i); -- } -- pDebug << "listtttt22222222..............:" << list; -- -- QStringList displayNameList; -- for(int i = 0; i < getCurrentSelections().length(); i++) -- { -- QString displayName = Peony::FileUtils::getFileDisplayName(getCurrentSelections()[i]); -- displayNameList.append(displayName); -- } -- pDebug << "list:" << list; -- pDebug << "displayNameList:" << displayNameList; -- for(int i = 0; i < list.length(); i++){ -- if(!displayNameList.contains(list[i])) -- break; -- else if(i == list.length() - 1){ -- updateAcceptButtonState(); -- return; -- } -- } -- -- pDebug << "listtttttt3333333........................."; -- foreach (QString str, list) { -- if(str.length() > 0 && str[0] == "\"") -- str = str.remove(0, 1); -- if(str.length() > 0 && str[str.length() - 1] == "\"") -- str = str.remove(str.length() - 1, 1); -- pDebug << "str:" << str; -- QFile file(url + "/" + str); -- -- if(Peony::FileUtils::isFileExsit(parentPath + "/" + str))//(file.exists()) -- selectList.append(parentPath + "/" + str); -- } -- pDebug << "selectList...333333" << selectList; -- setCurrentSelections(selectList); -- updateAcceptButtonState(); -- } -- return; -- } --} -- --void KyNativeFileDialog::setShortCuts() --{ -- if (!m_shortcutsSet) { -- //stop loading action -- QAction *stopLoadingAction = new QAction(this); -- stopLoadingAction->setShortcut(QKeySequence(Qt::Key_Escape)); -- addAction(stopLoadingAction); -- connect(stopLoadingAction, &QAction::triggered, this, &KyNativeFileDialog::forceStopLoading); -- -- //show hidden action -- QAction *showHiddenAction = new QAction(this); -- showHiddenAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_H)); -- showHiddenAction->setCheckable(true); -- addAction(showHiddenAction); -- connect(showHiddenAction, &QAction::triggered, this, [=]() { -- //qDebug() << "show hidden"; -- this->setShowHidden(!getWindowShowHidden()); -- }); -- -- auto undoAction = new QAction(QIcon::fromTheme("edit-undo-symbolic"), tr("Undo"), this); -- undoAction->setShortcut(QKeySequence::Undo); -- addAction(undoAction); -- connect(undoAction, &QAction::triggered, [=]() { -- Peony::FileOperationManager::getInstance()->undo(); -- }); -- -- auto redoAction = new QAction(QIcon::fromTheme("edit-redo-symbolic"), tr("Redo"), this); -- redoAction->setShortcut(QKeySequence::Redo); -- addAction(redoAction); -- connect(redoAction, &QAction::triggered, [=]() { -- Peony::FileOperationManager::getInstance()->redo(); -- }); -- -- //add CTRL+D for delete operation -- auto trashAction = new QAction(this); -- trashAction->setShortcuts(QList<QKeySequence>()<<Qt::Key_Delete<<QKeySequence(Qt::CTRL + Qt::Key_D)); -- connect(trashAction, &QAction::triggered, [=]() { -- auto currentUri = getCurrentUri(); -- if (currentUri.startsWith("search://") -- || currentUri.startsWith("favorite://") || currentUri == "filesafe:///" -- || currentUri.startsWith("kmre://") || currentUri.startsWith("kydroid://")) -- return; -- -- auto uris = this->getCurrentSelections(); -- -- QString desktopPath = "file://" + QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); -- QString desktopUri = Peony::FileUtils::getEncodedUri(desktopPath); -- QString homeUri = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); -- QString documentPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)); -- QString musicPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MusicLocation)); -- QString moviesPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MoviesLocation)); -- QString picturespPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::PicturesLocation)); -- QString downloadPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)); -- if (!uris.isEmpty() && !uris.contains(desktopUri) && !uris.contains(homeUri) && !uris.contains(documentPath) && !uris.contains(musicPath) -- && !uris.contains(moviesPath) && !uris.contains(picturespPath) && !uris.contains(downloadPath)) { -- bool isTrash = this->getCurrentUri() == "trash:///"; -- if (!isTrash) { -- Peony::FileOperationUtils::trash(uris, true); -- } else { -- Peony::FileOperationUtils::executeRemoveActionWithDialog(uris); -- } -- } -- }); -- addAction(trashAction); -- -- auto deleteAction = new QAction(this); -- deleteAction->setShortcuts(QList<QKeySequence>()<<QKeySequence(Qt::SHIFT + Qt::Key_Delete)); -- addAction(deleteAction); -- connect(deleteAction, &QAction::triggered, [=]() { -- auto currentUri = getCurrentUri(); -- if (currentUri.startsWith("search://") || currentUri == "filesafe:///" -- || currentUri.startsWith("kmre://") || currentUri.startsWith("kydroid://")) -- return; -- -- auto uris = this->getCurrentSelections(); -- -- QString desktopPath = "file://" + QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); -- QString documentPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)); -- QString musicPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MusicLocation)); -- QString moviesPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MoviesLocation)); -- QString picturespPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::PicturesLocation)); -- QString downloadPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)); -- QString desktopUri = Peony::FileUtils::getEncodedUri(desktopPath); -- QString homeUri = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); -- if (! uris.contains(desktopUri) && !uris.contains(homeUri) && !uris.contains(documentPath) && !uris.contains(musicPath) -- && !uris.contains(moviesPath) && !uris.contains(picturespPath) && !uris.contains(downloadPath)) { -- Peony::FileOperationUtils::executeRemoveActionWithDialog(uris); -- } -- }); -- -- auto searchAction = new QAction(this); -- searchAction->setShortcuts(QList<QKeySequence>()<<QKeySequence(Qt::CTRL + Qt::Key_F)); -- connect(searchAction, &QAction::triggered, this, [=]() { -- searchButtonClicked(); -- }); -- addAction(searchAction); -- -- //F4 or Alt+D, change to address -- auto locationAction = new QAction(this); -- locationAction->setShortcuts(QList<QKeySequence>()<<Qt::Key_F4<<QKeySequence(Qt::ALT + Qt::Key_D)); -- connect(locationAction, &QAction::triggered, this, [=]() { -- mKyFileDialogUi->m_pathbar->startEdit(); -- }); -- addAction(locationAction); -- -- auto closeWindowAction = new QAction(this); -- closeWindowAction->setShortcuts(QList<QKeySequence>()<<QKeySequence(Qt::ALT + Qt::Key_F4)); -- connect(closeWindowAction, &QAction::triggered, this, [=]() { -- this->close(); -- }); -- addAction(closeWindowAction); -- -- auto maxAction = new QAction(this); -- maxAction->setShortcut(QKeySequence(Qt::Key_F11)); -- connect(maxAction, &QAction::triggered, this, [=]() { -- if(!m_istableModel){ -- //showFullScreen has some issue, change to showMaximized, fix #20043 -- mKyFileDialogUi->m_pathbar->cancelEdit(); -- if (!this->isMaximized()) { -- this->showMaximized(); -- } else { -- this->showNormal(); -- } -- updateMaximizeState(); -- } -- }); -- addAction(maxAction); -- -- auto refreshWindowAction = new QAction(this); -- refreshWindowAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_R)); -- connect(refreshWindowAction, &QAction::triggered, this, [=]() { -- this->refresh(); -- }); -- addAction(refreshWindowAction); -- -- auto listToIconViewAction = new QAction(this); -- listToIconViewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_1)); -- connect(listToIconViewAction, &QAction::triggered, this, [=]() { -- this->beginSwitchView(QString("Icon View")); -- }); -- addAction(listToIconViewAction); -- -- auto iconToListViewAction = new QAction(this); -- iconToListViewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_2)); -- connect(iconToListViewAction, &QAction::triggered, this, [=]() { -- this->beginSwitchView(QString("List View")); -- }); -- addAction(iconToListViewAction); -- -- auto reverseSelectAction = new QAction(this); -- reverseSelectAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_L)); -- connect(reverseSelectAction, &QAction::triggered, this, [=]() { -- this->getCurrentPage()->getView()->invertSelections(); -- }); -- addAction(reverseSelectAction); -- -- auto refreshAction = new QAction(this); -- refreshAction->setShortcut(Qt::Key_F5); -- connect(refreshAction, &QAction::triggered, this, [=]() { -- this->refresh(); -- }); -- addAction(refreshAction); -- -- //select all files in view, fix bug#115442 -- auto *selectAllAction = new QAction(this); -- selectAllAction->setShortcut(QKeySequence::SelectAll); -- connect(selectAllAction, &QAction::triggered, this, [=]() { -- if (this->getCurrentPage()->getView()) -- { -- /// note: 通过getAllFileUris设置的全选效率过低,如果增加接口则会导致二进制兼容性问题 -- /// 所以这里使用现有的反选接口实现高效的全选,这个方法在mainwindow中也有用到 -- //auto allFiles = this->getCurrentPage()->getView()->getAllFileUris(); -- //this->getCurrentPage()->getView()->setSelections(allFiles); -- setCurrentSelections(QStringList()); -- this->getCurrentPage()->getView()->invertSelections(); -- } -- }); -- addAction(selectAllAction); -- -- //file operations -- auto *copyAction = new QAction(this); -- copyAction->setShortcut(QKeySequence::Copy); -- connect(copyAction, &QAction::triggered, [=]() { -- bool is_recent = false; -- if (!this->getCurrentSelections().isEmpty()) -- { -- // if (this->getCurrentSelections().first().startsWith("trash://", Qt::CaseInsensitive)) { -- // return ; -- // } -- if (this->getCurrentSelections().first().startsWith("recent://", Qt::CaseInsensitive)) { -- is_recent = true; -- } -- if (this->getCurrentSelections().first().startsWith("favorite://", Qt::CaseInsensitive)) { -- return ; -- } -- } -- else -- return; -- -- QStringList selections; -- if (is_recent) -- { -- for(auto uri:this->getCurrentSelections()) -- { -- uri = Peony::FileUtils::getTargetUri(uri); -- selections << uri; -- } -- } -- else{ -- selections = this->getCurrentSelections(); -- } -- -- Peony::ClipboardUtils::setClipboardFiles(selections, false); -- }); -- addAction(copyAction); -- -- auto *pasteAction = new QAction(this); -- pasteAction->setShortcut(QKeySequence::Paste); -- connect(pasteAction, &QAction::triggered, [=]() { -- auto currentUri = getCurrentUri(); -- if (currentUri.startsWith("trash://") || currentUri.startsWith("recent://") -- || currentUri.startsWith("computer://") || currentUri.startsWith("favorite://") -- || currentUri.startsWith("search://") || currentUri == "filesafe:///") -- { -- /* Add hint information,link to bug#107640. */ -- QMessageBox::warning(this, tr("warn"), tr("This operation is not supported.")); -- return; -- } -- if (Peony::ClipboardUtils::isClipboardHasFiles()) { -- //FIXME: how about duplicated copy? -- //FIXME: how to deal with a failed move? -- auto op = Peony::ClipboardUtils::pasteClipboardFiles(this->getCurrentUri()); -- if (op) { -- connect(op, &Peony::FileOperation::operationFinished, this, [=](){ -- auto opInfo = op->getOperationInfo(); -- auto targetUirs = opInfo->dests(); -- setCurrentSelectionUris(targetUirs); -- }, Qt::BlockingQueuedConnection); -- } -- else{ -- //fix paste file in old path not update issue, link to bug#71627 -- this->getCurrentPage()->getView()->repaintView(); -- } -- } -- }); -- addAction(pasteAction); -- -- auto *cutAction = new QAction(this); -- cutAction->setShortcut(QKeySequence::Cut); -- connect(cutAction, &QAction::triggered, [=]() { -- if (!this->getCurrentSelections().isEmpty()) { -- // if (this->getCurrentSelections().first().startsWith("trash://", Qt::CaseInsensitive)) { -- // return ; -- // } -- if (this->getCurrentSelections().first().startsWith("recent://", Qt::CaseInsensitive)) { -- return ; -- } -- if (this->getCurrentSelections().first().startsWith("favorite://", Qt::CaseInsensitive)) { -- return ; -- } -- -- auto currentUri = getCurrentUri(); -- if (currentUri.startsWith("search://")) -- return; -- -- QString desktopPath = "file://" + QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); -- QString desktopUri = Peony::FileUtils::getEncodedUri(desktopPath); -- QString homeUri = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); -- if (! this->getCurrentSelections().contains(desktopUri) && ! this->getCurrentSelections().contains(homeUri)) -- { -- Peony::ClipboardUtils::setClipboardFiles(this->getCurrentSelections(), true); -- this->getCurrentPage()->getView()->repaintView(); -- } -- } -- }); -- addAction(cutAction); -- -- m_shortcutsSet = true; -- } --} -- --void KyNativeFileDialog::initialViewId() --{ -- if(!containerView()) -- return; -- int zoomLevel = containerView()->currentZoomLevel(); -- -- auto viewId = Peony::DirectoryViewFactoryManager2::getInstance()->getDefaultViewId(zoomLevel, getCurrentUri()); -- pDebug << "initialViewId viewId:" << viewId; -- beginSwitchView(viewId); --} -- --QString KyNativeFileDialog::copyEditText() --{ -- return m_copyEditText; --} -- --void KyNativeFileDialog::isTableModel() --{ -- QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); -- if(interFace->isValid()){ -- connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(updateTableModel(bool))); -- } -- QDBusMessage message = QDBusMessage::createMethodCall(SERVICE, PATH, INTERFACE, "get_current_tabletmode"); -- QDBusMessage ret = QDBusConnection::sessionBus().call(message); -- if (ret.type() != QDBusMessage::ReplyMessage) -- { -- //从返回参数获取返回值 -- pDebug << "complex type failed!"; -- updateTableModel(false); -- } -- else -- { -- updateTableModel(ret.arguments()[0].value<bool>()); -- } --} -- --void KyNativeFileDialog::updateTableModel(bool tableModel) --{ -- m_istableModel = tableModel; -- mKyFileDialogUi->m_maximizeAndRestore->setVisible(!tableModel); --} -- --void KyNativeFileDialog::updateSearchProgressBar() --{ --// if(m_needSearch){ --// pDebug << "updateSearchProgressBar...." << m_searchMode << m_needSearch; --// Q_EMIT mKyFileDialogUi->m_pathbar->updateSearchProgress(false); --// QCursor c; --// c.setShape(Qt::ArrowCursor); --// this->setCursor(c); --// getCurrentPage()->getView()->setCursor(c); --// mKyFileDialogUi->m_sider->setCursor(c); --// } --} -- --void KyNativeFileDialog::installTranslate(QString locale) --{ -- m_translator0 = new QTranslator(this); -- pDebug << "local: " << locale; -- if (m_translator0->load("/usr/share/qt5-ukui-platformtheme/qt5-ukui-platformtheme_" + locale)) { -- pDebug << "Load translations file success!"; -- QApplication::installTranslator(m_translator0); -- } else { -- pDebug << "Load translations file failed!"; -- } -- -- m_translator1 = new QTranslator(this); -- pDebug << "QTranslator t load" << m_translator1->load("/usr/share/libpeony-qt/libpeony-qt_" + locale); -- QApplication::installTranslator(m_translator1); -- m_translator2 = new QTranslator(this); -- pDebug << "QTranslator t2 load" << m_translator2->load("/usr/share/peony-qt-desktop/peony-qt-desktop_" + locale); -- QApplication::installTranslator(m_translator2); -- m_translator3 = new QTranslator(this); -- pDebug << "QTranslator t3 load" << m_translator3->load("/usr/share/qt5/translations/qt_" + locale); -- QApplication::installTranslator(m_translator3); --} -- --KyFileDialogHelper::KyFileDialogHelper() : QPlatformFileDialogHelper(), mKyFileDialog(new KyNativeFileDialog) --{ -- mKyFileDialog->setHelper(this); -- -- pDebug << "KyFileDialogHelper........." << (options() == nullptr); -- connect(mKyFileDialog, &KyNativeFileDialog::currentChanged, this, &KyFileDialogHelper::currentChanged); -- connect(mKyFileDialog, &KyNativeFileDialog::directoryEntered, this, &KyFileDialogHelper::directoryEntered); -- //QFileDialog::accept()里_q_emitUrlSelected会发送fileSelected信号 这里会导致发两次fileSelected的信号 -- // connect(mKyFileDialog, &KyNativeFileDialog::fileSelected, this, &KyFileDialogHelper::fileSelected); -- //QFileDialog::accept()里_q_emitUrlsSelected会发送filesSelected信号 这里会导致发两次filesSelected的信号 -- // connect(mKyFileDialog, &KyNativeFileDialog::filesSelected, this, &KyFileDialogHelper::filesSelected); -- connect(mKyFileDialog, &KyNativeFileDialog::filterSelected, this, &KyFileDialogHelper::filterSelected); -- connect(mKyFileDialog, &QDialog::accepted, this, &KyFileDialogHelper::accept); -- connect(mKyFileDialog, &QDialog::rejected, this, &KyFileDialogHelper::reject); -- --} -- --KyFileDialogHelper::~KyFileDialogHelper() --{ -- pDebug << "~~~~~~~~KyFileDialogHelper"; -- ///不可以析构 普通函数里QFileDialog::show不显示和QFiledialog->show()会显示 析构的话BT下载工具打开不显示界面 --// if(mKyFileDialog){ --// mKyFileDialog->deleteLater(); --// mKyFileDialog = nullptr; --// } -- --} -- --void KyFileDialogHelper::exec() --{ -- mKyFileDialog->discardDelayedShow(); -- pDebug << "KyFileDialogHelper::exec.............."; -- mKyFileDialog->exec(); --} -- --void KyFileDialogHelper::hide() --{ -- mKyFileDialog->discardDelayedShow(); -- mKyFileDialog->hide(); --} -- --bool KyFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) --{ -- if(m_isShow){ -- mKyFileDialog->delayShow(); -- return true; -- } -- pDebug << "show........." << (options() == nullptr); -- pDebug << "option initialselectfiles..." << options()->initiallySelectedFiles(); -- pDebug << "option initialDirectory..." << options()->initialDirectory(); -- -- m_initialDirectory = options()->initialDirectory(); -- m_initialSelectFiles = options()->initiallySelectedFiles(); -- -- if(parent != nullptr) -- pDebug << "window....:" << parent->x() << parent->y() << parent->width() << parent->height(); -- else -- pDebug << "window is nullptr...."; -- initDialog(); -- -- mKyFileDialog->setAttribute(Qt::WA_NativeWindow, true); -- mKyFileDialog->setWindowFlags(windowFlags); -- mKyFileDialog->setWindowModality(windowModality); -- -- if(parent){ -- if(QWidget *p = mKyFileDialog->find(parent->winId())){ -- for(QFileDialog *fd : p->findChildren<QFileDialog *>()){ -- if(options()->windowTitle() == fd->windowTitle()){ -- pDebug << "filedoalog set parent...." << fd->geometry(); -- if(mKyFileDialog->parentWidget() != fd){ -- ///设置parent是QFiledialog 之前设置的是p 会有问题 showevent里有时候会找不到对应name的 -- mKyFileDialog->setParent(fd, windowFlags); -- } -- pDebug << "filediaog directory000...." << fd->directory(); -- pDebug << "filedialog select000....." << fd->selectedFiles(); -- pDebug << "filedialog selectUrls000....." << fd->selectedUrls(); -- pDebug << "filedialog directoryUrl000....." << fd->directoryUrl(); -- if(m_initialSelectFiles.length() > 0 && QFile::exists(m_initialSelectFiles.value(0).path())){ -- QDir dir(m_initialSelectFiles.value(0).path()); -- dir.cdUp(); -- pDebug <<"dirrrrr..." << dir.path(); -- mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(dir.absolutePath()).toString()); -- mKyFileDialog->setDirectory(dir); -- } else if(fd->directory().exists()){ -- mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(fd->directory().absolutePath()).toString()); -- -- mKyFileDialog->setDirectory(fd->directory()); -- } --// if(fd->directoryUrl().) -- -- // for(QPushButton *btn : mKyFileDialog->findChildren<QPushButton*>()) -- // { -- // if(btn->objectName() == "acceptButton") -- // { -- // pDebug << "mydialog find object acceptButton"; -- // } -- // } -- break; -- } -- } -- } -- } -- else{ -- for(QWidget *widget : qApp->allWidgets()){ -- if(QFileDialog *fd = qobject_cast<QFileDialog *>(widget)){ -- if(options()->windowTitle() == fd->windowTitle()){ -- pDebug << "parent us null filedoalog set parent...." << fd->geometry() << options()->windowTitle() << fd->objectName(); -- if(mKyFileDialog->parentWidget() != fd){ -- mKyFileDialog->setParent(fd, windowFlags); -- } -- pDebug << "parent us null filedoalog directory...." << fd->directory(); -- pDebug << "parent us null filedoalog selectedFiles...." << m_initialSelectFiles.value(0).path() << QFile::exists(m_initialSelectFiles.value(0).path()); -- if(m_initialSelectFiles.length() > 0 && QFile::exists(m_initialSelectFiles.value(0).path())){ -- QDir dir(m_initialSelectFiles.value(0).path()); -- dir.cdUp(); -- pDebug <<"dirrrrr..." << dir.path(); -- mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(dir.absolutePath()).toString()); -- -- mKyFileDialog->setDirectory(dir); -- } -- else if(fd->directory().exists()){ -- mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(fd->directory().absolutePath()).toString()); -- -- mKyFileDialog->setDirectory(fd->directory()); -- } -- break; -- } -- } -- } -- } -- -- if(options()->viewMode() == QFileDialog::List && mKyFileDialog->viewMode() != KyNativeFileDialog::Icon) -- mKyFileDialog->setViewMode(KyNativeFileDialog::Icon); -- else if(options()->viewMode() == QFileDialog::Detail && mKyFileDialog->viewMode() != KyNativeFileDialog::List) -- mKyFileDialog->setViewMode(KyNativeFileDialog::List); -- -- QString platform = QGuiApplication::platformName(); -- if(platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) -- { -- kdk::UkuiStyleHelper::self()->removeHeader(mKyFileDialog); -- } else { -- MotifWmHints hints; -- hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; -- hints.functions = MWM_FUNC_ALL; -- hints.decorations = MWM_DECOR_BORDER; -- XAtomHelper::getInstance()->setWindowMotifHint(mKyFileDialog->winId(), hints); -- } -- -- mKyFileDialog->delayShow(); -- viewInitialFinished(); -- return true; --} -- --void KyFileDialogHelper::initDialog() --{ -- m_isShow = true; -- -- pDebug << "initDialog filter...." << options()->filter() << options()->nameFilters() << options()->mimeTypeFilters() << options()->viewMode(); -- if (options()->windowTitle().isEmpty()) { -- mKyFileDialog->setWindowTitle(options()->acceptMode() == QFileDialogOptions::AcceptOpen ? tr("Open File") -- : tr("Save File")); -- } else { -- mKyFileDialog->setWindowTitle(options()->windowTitle()); -- } -- QStringList nameFilters; -- foreach (QString nameFilter, options()->nameFilters()) { -- nameFilters.append(QPlatformFileDialogHelper::cleanFilterList(nameFilter)); -- } -- pDebug << "nameFilters....:" << nameFilters; -- if(nameFilters.length() < 1) -- { -- pDebug << "contains *...."; -- QStringList list = options()->nameFilters(); -- list.append(tr("All Files (*)")); -- options()->setNameFilters(list); -- } -- pDebug << "option NameFilters:" << options()->nameFilters(); -- pDebug << "option mode:" << options()->acceptMode() << options()->fileMode() << options()->viewMode(); -- mKyFileDialog->setFilter(options()->filter()); -- mKyFileDialog->setFileMode(QFileDialog::FileMode(options()->fileMode())); -- mKyFileDialog->setAcceptMode(QFileDialog::AcceptMode(options()->acceptMode())); -- pDebug << "initDialog filters:" << options()->nameFilters(); -- mKyFileDialog->setNameFilters(options()->nameFilters()); -- pDebug << "view mode:" << options()->viewMode() << mKyFileDialog->viewMode(); -- -- for(int i = 0; i < QFileDialogOptions::DialogLabelCount; ++i) { -- auto label = static_cast<QFileDialogOptions::DialogLabel>(i); -- if(options()->isLabelExplicitlySet(label)) { -- mKyFileDialog->setLabelText(static_cast<QFileDialog::DialogLabel>(label), options()->labelText(label)); -- } -- } --// pDebug << "initiallySelectedMimeTypeFilter,,,,:" << options()->initiallySelectedMimeTypeFilter() << options()->initiallySelectedNameFilter(); -- auto filter = options()->initiallySelectedMimeTypeFilter(); -- pDebug << "filter.........." << filter; -- if(!filter.isEmpty()) { -- selectMimeTypeFilter(filter); -- } -- else { -- filter = options()->initiallySelectedNameFilter(); -- if(!filter.isEmpty()) { -- pDebug << "initiallySelectedNameFilter...." << filter; -- selectNameFilter(filter); -- } -- } -- -- connect(mKyFileDialog->containerView(), &Peony::DirectoryViewWidget::viewDirectoryChanged, -- this, &KyFileDialogHelper::viewInitialFinished, Qt::UniqueConnection); --} -- --void KyFileDialogHelper::viewInitialFinished() --{ -- if(m_viewInitialFinished) -- return; -- pDebug << "viewInitialFinished...."; -- QTimer::singleShot(100, this, [this](){ -- pDebug << "viewport update1111111......."; -- mKyFileDialog->mKyFileDialogUi->m_sider->viewport()->update(); -- }); -- -- QTimer::singleShot(500, this, [this](){ -- -- auto selectirectory = m_initialDirectory;// options()->initialDirectory(); -- auto selectedFiles = m_initialSelectFiles; //options()->initiallySelectedFiles(); -- QStringList strList; -- -- pDebug << "m_viewInitialFinished:" << m_viewInitialFinished; -- pDebug << "viewInitialFinished selectirectory:" << selectirectory; -- pDebug << "viewInitialFinished selectedFiles:" << selectedFiles; -- -- if(m_viewInitialFinished) -- return; -- if(selectedFiles.length() > 0) -- { -- pDebug << "initiallySelectedFiles:" << selectedFiles; -- -- for(const auto& selectedFile: selectedFiles) { -- auto info = Peony::FileInfo::fromUri(selectedFile.path()); --// if (!info->isDir() && !info->isVolume()) --// { -- selectFile(selectedFile); -- strList.append(selectedFile.toString()); --// } -- } -- pDebug << "strList.......:" << strList; -- pDebug << "getCurrentUri,,.......:" << mKyFileDialog->getCurrentUri(); -- -- if(strList.length() > 0){ -- QString path; -- QUrl url(strList[0]); -- if(mKyFileDialog->isDir(url.path()) && options()->fileMode() != QFileDialog::Directory && -- options()->fileMode() != QFileDialog::DirectoryOnly){ -- path = url.path(); -- } -- else{ -- QDir dir(url.path()); -- dir.cdUp(); -- path = dir.path(); -- } -- pDebug << "initial path:" << path << url; -- if(mKyFileDialog->getCurrentUri() != ("file://" + path)) -- { -- pDebug << "initial change directory..." << ("file://" + path); -- mKyFileDialog->setDirectoryUrl(QUrl("file://" + path)); -- } -- -- pDebug << "setSelections...." << strList << (mKyFileDialog->containerView() == nullptr); -- -- mKyFileDialog->setCurrentSelections(strList); -- pDebug << "initial getselections:" << mKyFileDialog->getCurrentSelectionsList(); -- //mKyFileDialog->containerView()->scrollToSelection(strList[0]); -- QString selectName = mKyFileDialog->selectName(); -- if(selectName == "" && strList.length() > 0) -- { -- QString str0 = strList[0]; -- selectName = str0.split("/").last(); -- } -- pDebug << "initial selectName:" << selectName; -- mKyFileDialog->mKyFileDialogUi->m_fileNameEdit->setText(selectName); -- } -- } -- -- pDebug << "initially selectirectory:" << selectirectory.toString() << selectirectory.path() << QFile::exists(selectirectory.path()) << Peony::FileUtils::isFileExsit(selectirectory.toString()); -- pDebug << "current path....." << mKyFileDialog->getCurrentUri(); -- if(strList.length() <= 0 && Peony::FileUtils::isFileExsit(selectirectory.toString()))//QFile::exists(selectirectory.path())) -- { -- QString cStr = mKyFileDialog->getCurrentUri(); -- QString sStr = selectirectory.toString(); -- -- if(cStr.endsWith("/")) -- cStr = cStr.remove(cStr.length() - 1, 1); -- if(sStr.endsWith("/")) -- sStr = sStr.remove(sStr.length() - 1, 1); -- pDebug << "cStr...." << cStr << "sStr...." << sStr; -- if(cStr != sStr) -- mKyFileDialog->setDirectoryUrl(selectirectory); -- } -- -- mKyFileDialog->intiContainerSort(); -- mKyFileDialog->initialViewId(); -- pDebug << "viewport update222222......."; -- mKyFileDialog->mKyFileDialogUi->m_sider->viewport()->update(); --// mKyFileDialog->refresh(); -- m_viewInitialFinished = true; -- }); --} -- --bool KyFileDialogHelper::isViewInitialFinished() --{ -- return m_viewInitialFinished; --} -- --bool KyFileDialogHelper::isShow() --{ -- return m_isShow; --} -- --bool KyFileDialogHelper::defaultNameFilterDisables() const --{ -- return false; --} -- --void KyFileDialogHelper::setDirectory(const QUrl &directory) --{ -- QString path = directory.path(); -- if(path.startsWith("/")) -- path = "file://" + path; -- pDebug << "helper setDirectory...." << directory.toString() << directory.path() << path; -- mKyFileDialog->setDirectory(path); --// pDebug << "setInitialDirectory....."; --// options()->setInitialDirectory(directory); --} -- --QUrl KyFileDialogHelper::directory() const --{ -- return QUrl(mKyFileDialog->directory().absolutePath()); --} -- --void KyFileDialogHelper::selectFile(const QUrl &filename) --{ -- pDebug << "KyFileDialogHelper selectFile.............:" << filename; -- m_selectedFiles = filename; -- mKyFileDialog->selectFile(filename.toString()); --} -- --QList<QUrl> KyFileDialogHelper::selectedFiles() const --{ -- pDebug << "selectedFiles0000..........:" << mKyFileDialog->directoryUrl() << mKyFileDialog->directory() << mKyFileDialog->getCurrentUri() << mKyFileDialog->acceptMode(); -- if(options()->acceptMode() == QFileDialogOptions::AcceptOpen) -- { -- QList<QUrl> urlList = mKyFileDialog->selectedUrls(); -- if((options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly) && -- mKyFileDialog->copyEditText() == "" && m_viewInitialFinished) -- { -- if (!mKyFileDialog->getCurrentPage()) { -- return QList<QUrl>(); -- } -- QList<QUrl> urls; -- QString uri = mKyFileDialog->getCurrentPage()->getCurrentUri(); -- pDebug << "KyFileDialogHelper selectedFiles current uri........:" << uri; -- -- if (uri.startsWith("trash://") || uri.startsWith("recent://") -- || uri.startsWith("computer://") || uri.startsWith("favorite://") -- || uri.startsWith("filesafe://")) -- { -- urls << Peony::FileUtils::getTargetUri(uri); -- } -- else -- { -- if(uri.startsWith("file:///")) -- uri = uri.remove(0,7); -- pDebug << "open selectedFiles00000..........:" << uri; -- urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(uri)); -- } -- -- return urls; -- } -- if(options()->fileMode() != QFileDialogOptions::AnyFile || urlList.length() > 0) -- return urlList; -- else if(urlList.length() == 0) -- { -- QString path = mKyFileDialog->getCurrentUri(); -- if(path.isEmpty()) -- return urlList; -- if(!path.endsWith("/")) -- path += "/"; -- pDebug << "selected filesss...:" << path + mKyFileDialog->copyEditText(); -- urlList.append(QUrl(path + mKyFileDialog->copyEditText())); -- return urlList; -- } -- } -- else -- { -- QList<QUrl> urls; -- QString path = mKyFileDialog->getCurrentUri(); -- if(path.isEmpty()) -- return urls; -- if(!path.endsWith("/")) -- path += "/"; -- path += mKyFileDialog->copyEditText(); -- if(path.startsWith("file:///")) -- path = path.remove(0,7); -- pDebug << "save selectedFiles00000..........:" << path; -- urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(path)); -- pDebug << "save selectedFiles2222..........:" << urls; -- return urls; -- } --} -- --void KyFileDialogHelper::setFilter() --{ --} -- --void KyFileDialogHelper::selectNameFilter(const QString &filter) --{ -- pDebug << "helper selectNameFilter......" << filter; -- mKyFileDialog->selectNameFilter(filter); --} -- --void KyFileDialogHelper::selectMimeTypeFilter(const QString &filter) --{ -- pDebug << "selectMimeTypeFilter0000001111....." << filter; -- QMimeDatabase db; -- QMimeType mimetype = db.mimeTypeForName(filter); -- if(!mimetype.isValid()) -- return; -- mKyFileDialog->selectNameFilter(mimetype.filterString()); --} -- --QString KyFileDialogHelper::selectedNameFilter() const --{ -- return mKyFileDialog->selectedNameFilter(); --} -- --QString KyFileDialogHelper::selectedMimeTypeFilter() const --{ -- pDebug << "selectMimeTypeFilter0000002222222......"; -- return QString(); --} -- --bool KyFileDialogHelper::isSupportedUrl(const QUrl &url) const --{ -- pDebug << "options initialdirectory...." << options()->initialDirectory(); -- pDebug << "options selectfiles..." << options()->initiallySelectedFiles(); -- pDebug << "isSupportedUrl..." << url << url.isLocalFile(); -- pDebug << "options windowTitle" << options()->windowTitle(); -- if(!mKyFileDialog->isVisible()){ -- return false; -- } --// return false; -- return url.isLocalFile(); -- --} -diff --git a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h -deleted file mode 100644 -index 20368bd..0000000 ---- a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h -+++ /dev/null -@@ -1,311 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Jing Tan <tanjing@kylinos.cn> -- * -- */ -- --#include "debug.h" --#ifndef KYNATIVEFILEDIALOG_H --#define KYNATIVEFILEDIALOG_H --#include <QDialog> --#include <QDir> --#include <QFileDialog> --#include <QFileSystemModel> --#include <QCompleter> --#include <QListView> --#include <QStringListModel> --#include <QTranslator> --#include "qpa/qplatformdialoghelper.h" --#include <peony-qt/FMWindowIface.h> -- --QT_BEGIN_NAMESPACE --namespace Ui { class KyNativeFileDialog; } --QT_END_NAMESPACE -- --namespace Peony { --class DirectoryViewContainer; --class DirectoryViewWidget; --class FMWindowIface; --} -- --namespace UKUIFileDialog { -- --class Ui_KyFileDialog; --class FileDialogSideBar; --class FileDialogPathBar; --class KyNativeFileDialogPrivate; --class KyFileDialogHelper; -- --class KyNativeFileDialog : public QDialog, public Peony::FMWindowIface --{ -- Q_OBJECT -- friend class KyFileDialogHelper; -- --public: -- enum ViewMode { List, Icon }; -- KyNativeFileDialog(QWidget *parent = nullptr); -- ~KyNativeFileDialog(); -- -- Peony::FMWindowIface *create(const QString &uri); -- Peony::FMWindowIface *create(const QStringList &uris); -- -- -- const QString getCurrentUri(); -- const QStringList getCurrentSelections(); -- const QStringList getCurrentAllFileUris(); -- const QStringList getCurrentSelectionsList(); -- const QList<std::shared_ptr<Peony::FileInfo>> getCurrentSelectionFileInfos(); -- -- void setCurrentSelections(QStringList selections); -- -- Qt::SortOrder getCurrentSortOrder(); -- int getCurrentSortColumn(); -- -- bool getWindowShowHidden(); -- bool getWindowUseDefaultNameSortOrder(); -- bool getWindowSortFolderFirst(); -- -- void refresh(); -- void forceStopLoading(); -- -- void setShowHidden(bool showHidden); -- void setUseDefaultNameSortOrder(bool use); -- void setSortFolderFirst(bool set); -- -- void setCurrentSelectionUris(const QStringList &uris); -- void setCurrentSortOrder (Qt::SortOrder order); -- void setCurrentSortColumn (int sortColumn); -- -- void editUri(const QString &uri); -- void editUris(const QStringList &uris); -- -- bool getFilterWorking(); -- -- void beginSwitchView(const QString &viewId); -- -- -- void setDirectory(const QString &directory); -- void setDirectory(const QDir &directory); -- QDir directory() const; -- -- void selectFile(const QString &filename); -- QStringList selectedFiles() const; -- -- void setDirectoryUrl(const QUrl &directory); -- QUrl directoryUrl() const; -- -- void selectUrl(const QUrl &url); -- QList<QUrl> selectedUrls() const; -- -- void setNameFilterDetailsVisible(bool enabled); -- bool isNameFilterDetailsVisible() const; -- -- void setNameFilter(const QString &filter); -- void setNameFilters(const QStringList &filters); -- QStringList nameFilters() const; -- void selectNameFilter(const QString &filter); -- QString selectedMimeTypeFilter() const; -- QString selectedNameFilter() const; -- void selectNameFilterByIndex(int index); -- void selectNameFilterCurrentIndex(int index); -- int selectNameFilterIndex() const; -- -- QDir::Filters filter(); -- void setFilter(QDir::Filters filters); -- -- void setViewMode(ViewMode mode); -- ViewMode viewMode() const; -- -- void setFileMode(QFileDialog::FileMode mode); -- QFileDialog::FileMode fileMode(); -- -- void setAcceptMode(QFileDialog::AcceptMode mode); -- QFileDialog::AcceptMode acceptMode() const; -- -- void setLabelText(QFileDialog::DialogLabel label, const QString &text); -- QString labelText(QFileDialog::DialogLabel label) const; -- -- void setOptions(QFileDialog::Options options); -- void setOption(QFileDialog::Option option, bool on = true); -- bool testOption(QFileDialog::Option option) const; -- QFileDialog::Options options() const; -- void setCurrentInputName(const QString &name); -- Peony::DirectoryViewContainer *getCurrentPage(); -- Peony::DirectoryViewContainer *getCurrentPage() const; -- -- Peony::DirectoryViewWidget *containerView() const; -- -- void setComBoxItems(const QStringList &filters); -- -- bool isDir(QString path); -- -- void updateMaximizeState(); -- -- void intiContainerSort(); -- -- void refreshContainerSort(); -- -- void refreshCompleter(); -- -- bool doSave(QStringList sFiles); -- -- bool doOpen(QStringList sFiles); -- -- bool saveMessageBox(QString name); -- -- void setHelper(KyFileDialogHelper* helepr); -- -- void setShortCuts(); -- -- void initialViewId(); -- -- void delayShow(); -- -- void discardDelayedShow(); -- -- QString copyEditText(); -- -- void installTranslate(QString local); -- --Q_SIGNALS: -- void switchViewRequest(const QString &viewId); -- -- void fileSelected(const QUrl &file); -- void filesSelected(const QList<QUrl> &files); -- void currentChanged(const QUrl &path); -- void directoryEntered(const QUrl &directory); -- void selectedNameFilterChanged(); -- void filterSelected(const QString &filter); -- void locationChangeEnd(); -- --public Q_SLOTS: -- void goToUri(const QString &uri, bool addToHistory = true, bool forceUpdate = false); -- void goBack(); -- void goForward(); -- void goToParent(); -- void onSwitchView(); -- void updateWindowState(); -- QString selectName(); -- void updateStatusBar(); -- void onNewFolder(); -- void setSortType(); -- void searchButtonClicked(); -- void setSearchMode(bool mode); -- void lineEditTextChange(QString text); -- void containerMenuRequest(const QPoint &pos); -- void updateTableModel(bool tableMode); -- void updateSearchProgressBar(); -- --protected: -- void resizeEvent(QResizeEvent *e); -- void paintEvent(QPaintEvent *e); -- void keyPressEvent(QKeyEvent *e); -- --private: -- Ui_KyFileDialog *mKyFileDialogUi = nullptr; -- QScopedPointer<KyNativeFileDialogPrivate> d_ptr; -- Q_DECLARE_PRIVATE_D(qGetPtrHelper(d_ptr), KyNativeFileDialog) -- void onAcceptButtonClicked(); -- void onRejectButtonClicked(); -- void onCurrentInputNameChanged(); -- void handleEnterPressed(); -- void updateAcceptButtonState(); -- bool checkSaveFileExsits(QString path); -- void isTableModel(); -- --private: -- bool m_searchMode = false; --// QFileSystemModel *m_fileSystemModel = nullptr; -- QCompleter * m_completer = nullptr; -- QListView *m_listView = nullptr; -- QStringList m_CurrentPathAllFiles; -- KyFileDialogHelper *m_fileDialogHelper = nullptr; -- bool isInitialGoToUriNum = true; -- bool m_shortcutsSet = false; -- QString m_lastSearchPath; -- bool m_isClearSearchKey = false; -- QStringListModel *m_model = nullptr; -- QString m_copyEditText; -- bool m_istableModel = false; -- QMap<int, QString> m_nameFilterMap; -- QStringList m_uris_to_edit; -- bool m_needSearch = false; -- -- QTranslator *m_translator0 = nullptr; -- QTranslator *m_translator1 = nullptr; -- QTranslator *m_translator2 = nullptr; -- QTranslator *m_translator3 = nullptr; -- --}; -- --class KyFileDialogHelper : public QPlatformFileDialogHelper --{ -- Q_OBJECT --public: -- explicit KyFileDialogHelper(); -- -- ~KyFileDialogHelper() override; -- -- -- virtual void exec() override; -- virtual bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) override; -- virtual void hide() override; -- -- virtual bool defaultNameFilterDisables() const override; -- virtual void setDirectory(const QUrl &directory) override; -- virtual QUrl directory() const override; -- virtual void selectFile(const QUrl &filename) override; -- virtual QList<QUrl> selectedFiles() const override; -- virtual void setFilter() override; -- virtual void selectNameFilter(const QString &filter) override; -- -- virtual void selectMimeTypeFilter(const QString &filter) override; -- virtual QString selectedNameFilter() const override; -- virtual QString selectedMimeTypeFilter() const override; -- -- virtual bool isSupportedUrl(const QUrl &url) const override; -- -- bool isViewInitialFinished(); -- -- bool isShow(); -- --public Q_SLOTS: -- void viewInitialFinished(); --Q_SIGNALS: -- void fileSelected(const QUrl &file); -- void filesSelected(const QList<QUrl> &files); -- void currentChanged(const QUrl &path); -- void directoryEntered(const QUrl &directory); -- void filterSelected(const QString &filter); -- -- --private: -- KyNativeFileDialog* mKyFileDialog = nullptr; -- QUrl m_selectedFiles; -- bool m_viewInitialFinished = false; -- bool m_isShow = false; -- QUrl m_initialDirectory; -- QList<QUrl> m_initialSelectFiles; -- --private: -- void initDialog(); --}; --} -- --#endif // KYNATIVEFILEDIALOG_H -diff --git a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.cpp b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.cpp -deleted file mode 100644 -index 40225fb..0000000 ---- a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.cpp -+++ /dev/null -@@ -1,80 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Jing Tan <tanjing@kylinos.cn> -- * -- */ -- --#include "debug.h" -- --#include "kyfiledialogprivate.h" --#include <QFileDialog> --#include <QTimer> --#include <QLineEdit> --#include "kyfiledialog.h" --#include "ui_kyfiledialog.h" --using namespace UKUIFileDialog; --KyNativeFileDialogPrivate::KyNativeFileDialogPrivate() --{ --// Q_Q(KyNativeFileDialog); -- -- m_timer = new QTimer; --// m_container = q->m_container; --} -- --QStringList KyNativeFileDialogPrivate::typedFiles() --{ -- /* -- Q_Q(KyNativeFileDialog); -- QStringList files; -- QString editText = q->mKyFileDialogUi->m_fileNameEdit->text(); -- if (!editText.contains(QLatin1Char('"'))) { --#ifdef Q_OS_UNIX -- const QString prefix = q->directory().absolutePath() + QDir::separator(); -- if (QFile::exists(prefix + editText)) -- files << editText; -- else -- files << qt_tildeExpansion(editText); --#else -- files << editText; -- Q_UNUSED(q) --#endif -- } else { -- // " is used to separate files like so: "file1" "file2" "file3" ... -- // ### need escape character for filenames with quotes (") -- QStringList tokens = editText.split(QLatin1Char('\"')); -- for (int i=0; i<tokens.size(); ++i) { -- if ((i % 2) == 0) -- continue; // Every even token is a separator --#ifdef Q_OS_UNIX -- const QString token = tokens.at(i); -- const QString prefix = q->directory().absolutePath() + QDir::separator(); -- if (QFile::exists(prefix + token)) -- files << token; -- else -- files << qt_tildeExpansion(token); --#else -- files << toInternal(tokens.at(i)); --#endif -- } -- } -- return addDefaultSuffixToFiles(files); -- -- */ -- return QStringList(); --} -diff --git a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.h b/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.h -deleted file mode 100644 -index 7af515b..0000000 ---- a/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.h -+++ /dev/null -@@ -1,104 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Jing Tan <tanjing@kylinos.cn> -- * -- */ -- --#include "debug.h" --#ifndef KYNATIVEFILEDIALOGPRIVATE_H --#define KYNATIVEFILEDIALOGPRIVATE_H -- --#include <QFileDialog> --#include <QTimer> -- --namespace Peony { --class DirectoryViewContainer; --} --namespace UKUIFileDialog { -- --class KyFileDialogHelper; --class KyNativeFileDialogPrivate --{ -- friend class KyNativeFileDialog; --private: -- KyNativeFileDialogPrivate(); -- -- QStringList typedFiles(); -- -- QStringList nameFilters; -- QFileDialog::AcceptMode acceptMode; -- QFileDialog::FileMode fileMode; -- QFileDialog::Options options; -- Peony::DirectoryViewContainer *m_container = nullptr; -- QString currentInputName; -- QTimer *m_timer = nullptr; -- QDir::Filters filters = QDir::AllEntries; --}; --} -- --#endif // KYNATIVEFILEDIALOGPRIVATE_H --/* --KyNativeFileDialogPrivate::KyNativeFileDialogPrivate() --{ --// Q_Q(KyNativeFileDialog); -- -- m_timer = new QTimer; --// m_container = q->m_container; --} -- --QStringList KyNativeFileDialogPrivate::typedFiles() const --{ -- Q_Q(KyNativeFileDialog); -- QStringList files; -- QString editText = q->mk ->text(); -- if (!editText.contains(QLatin1Char('"'))) { --#ifdef Q_OS_UNIX -- const QString prefix = q->directory().absolutePath() + QDir::separator(); -- if (QFile::exists(prefix + editText)) -- files << editText; -- else -- files << qt_tildeExpansion(editText); --#else -- files << editText; -- Q_UNUSED(q) --#endif -- } else { -- // " is used to separate files like so: "file1" "file2" "file3" ... -- // ### need escape character for filenames with quotes (") -- QStringList tokens = editText.split(QLatin1Char('\"')); -- for (int i=0; i<tokens.size(); ++i) { -- if ((i % 2) == 0) -- continue; // Every even token is a separator --#ifdef Q_OS_UNIX -- const QString token = tokens.at(i); -- const QString prefix = q->directory().absolutePath() + QDir::separator(); -- if (QFile::exists(prefix + token)) -- files << token; -- else -- files << qt_tildeExpansion(token); --#else -- files << toInternal(tokens.at(i)); --#endif -- } -- } -- return addDefaultSuffixToFiles(files); -- -- return QStringList(); --} --*/ -diff --git a/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.cpp b/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.cpp -deleted file mode 100644 -index 9493854..0000000 ---- a/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.cpp -+++ /dev/null -@@ -1,99 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Jing Tan <tanjing@kylinos.cn> -- * -- */ -- --#include "debug.h" --#include "menutoolbutoon.h" --#include <QApplication> --#include <QDBusInterface> --using namespace UKUIFileDialog; -- --static ToolButtonStyle *global_instance = nullptr; -- --MenuToolButton::MenuToolButton(QWidget *parent) : QToolButton(parent) --{ -- setStyle(ToolButtonStyle::getStyle()); -- -- QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); -- if(interFace->isValid()){ -- connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(tableModeChanged(bool))); -- } --} -- --void MenuToolButton::tableModeChanged(bool isTableMode) --{ -- qDebug() << "tableModeChanged......" << isTableMode; -- setStyle(ToolButtonStyle::getStyle()); --} -- --ToolButtonStyle *ToolButtonStyle::getStyle() --{ -- if (!global_instance) { -- global_instance = new ToolButtonStyle; -- } -- return global_instance; --} -- --int ToolButtonStyle::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, const QWidget *widget) const --{ -- if (qobject_cast<const QToolButton *>(widget)) -- return 0; -- -- switch (metric) { -- case PM_ToolBarIconSize: -- return 16; -- case PM_ToolBarSeparatorExtent: -- return 1; -- case PM_ToolBarItemSpacing: { -- return 1; -- } -- default: -- return QProxyStyle::pixelMetric(metric, option, widget); -- } --} -- --void ToolButtonStyle::drawComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const --{ -- //This is a "lie". We want to use instant popup menu for tool button, and we aslo -- //want use popup menu style with this tool button, so we change the related flags -- //to draw in our expected. -- if (control == CC_ToolButton) { -- QStyleOptionToolButton button = *qstyleoption_cast<const QStyleOptionToolButton *>(option); -- if (button.features.testFlag(QStyleOptionToolButton::HasMenu)) { -- button.features = QStyleOptionToolButton::None; -- if (!widget->property("isOptionButton").toBool()) { -- button.features |= QStyleOptionToolButton::HasMenu; -- button.features |= QStyleOptionToolButton::MenuButtonPopup; -- button.subControls |= QStyle::SC_ToolButtonMenu; -- } -- return qApp->style()->drawComplexControl(control, &button, painter, widget); -- } -- } -- return qApp->style()->drawComplexControl(control, option, painter, widget); --} -- --void ToolButtonStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const --{ -- if (element == PE_IndicatorToolBarSeparator) { -- return; -- } -- return qApp->style()->drawPrimitive(element, option, painter, widget); --} -diff --git a/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.h b/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.h -deleted file mode 100644 -index 2854992..0000000 ---- a/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.h -+++ /dev/null -@@ -1,62 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Jing Tan <tanjing@kylinos.cn> -- * -- */ -- --#include "debug.h" -- --#ifndef MENUTOOLBUTTON_H --#define MENUTOOLBUTTON_H --#include <QToolButton> --#include <QProxyStyle> --#include <QStyleOption> --#include <QPainter> --namespace UKUIFileDialog { --class MenuToolButton : public QToolButton --{ -- Q_OBJECT --public: -- explicit MenuToolButton(QWidget *parent = nullptr); -- ~MenuToolButton(){} -- --Q_SIGNALS: -- -- --public Q_SLOTS: -- void tableModeChanged(bool isTableMode); -- --}; -- --class ToolButtonStyle : public QProxyStyle --{ -- friend class MenuToolButton; -- friend class HeaderBarContainer; -- static ToolButtonStyle *getStyle(); -- -- ToolButtonStyle() {} -- ~ToolButtonStyle() {} -- -- int pixelMetric(PixelMetric metric, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override; -- -- void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget = nullptr) const override; -- void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = nullptr) const override; --}; --} --#endif // MENUTOOLBUTTON_H -diff --git a/qt5-ukui-platformtheme/widget/filedialog/pathbar.cpp b/qt5-ukui-platformtheme/widget/filedialog/pathbar.cpp -deleted file mode 100644 -index 9f47383..0000000 ---- a/qt5-ukui-platformtheme/widget/filedialog/pathbar.cpp -+++ /dev/null -@@ -1,104 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Jing Tan <tanjing@kylinos.cn> -- * -- */ -- --#include "debug.h" -- --#include "pathbar.h" --#include <PeonyPathCompleter> --#include <PeonyPathBarModel> --#include <QDebug> --#include <QObject> --#include <QDBusInterface> --#include <QDBusMessage> --#include <peony-qt/file-utils.h> --#include "debug.h" --#include "ukui-style-settings.h" --using namespace UKUIFileDialog; -- --FileDialogPathBar::FileDialogPathBar(QWidget *parent) : QWidget(parent)//Peony::AdvancedLocationBar(parent)//QLineEdit(parent)// --{ -- setAttribute(Qt::WA_TranslucentBackground); -- setContentsMargins(0,0,0,0); -- m_pathBar = new Peony::AdvancedLocationBar(this); -- -- QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); -- if(interFace->isValid()){ -- connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(updateTableModel(bool))); -- } -- -- -- QDBusMessage message = QDBusMessage::createMethodCall("com.kylin.statusmanager.interface", -- "/", -- "com.kylin.statusmanager.interface", -- "get_current_tabletmode"); -- QDBusMessage ret = QDBusConnection::sessionBus().call(message); -- if (ret.type() != QDBusMessage::ReplyMessage) -- { -- //从返回参数获取返回值 -- pDebug << "complex type failed!"; -- updateTableModel(false); -- } -- else -- { -- updateTableModel(ret.arguments()[0].value<bool>()); -- } --} -- --FileDialogPathBar::~FileDialogPathBar() --{ -- m_pathBar->deleteLater(); -- m_pathBar = nullptr; --} -- --void FileDialogPathBar::updatePath(const QString &uri) --{ -- pDebug << "m_pathBar........ updatePath:" << uri << Peony::FileUtils::getEncodedUri(uri); -- m_pathBar->updateLocation(Peony::FileUtils::urlEncode(uri)); --// setText(uri); --// clearFocus(); --} -- --void FileDialogPathBar::resizeEvent(QResizeEvent *e) --{ -- m_pathBar->setFixedWidth(this->width()); -- m_pathBar->setGeometry(0, (this->height() - m_pathBar->height()) / 2, this->width(), m_pathBar->height()); --} -- --Peony::AdvancedLocationBar *FileDialogPathBar::getPathBar() --{ -- return m_pathBar; --} -- --void FileDialogPathBar::updateTableModel(bool isTable) --{ -- pDebug << "updateTableModel...." << isTable; --// m_pathBar->updateTabletModeValue(isTable); -- if(isTable){ -- m_pathBar->setFixedHeight(48); -- this->setFixedHeight(48); -- } -- else{ -- m_pathBar->setFixedHeight(36); -- this->setFixedHeight(36); -- } -- pDebug << "m_pathBar height1111:" << m_pathBar->height() << this->height(); --} -diff --git a/qt5-ukui-platformtheme/widget/filedialog/pathbar.h b/qt5-ukui-platformtheme/widget/filedialog/pathbar.h -deleted file mode 100644 -index 0a64214..0000000 ---- a/qt5-ukui-platformtheme/widget/filedialog/pathbar.h -+++ /dev/null -@@ -1,54 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Jing Tan <tanjing@kylinos.cn> -- * -- */ -- --#include "debug.h" -- --#ifndef PATHBAR_H --#define PATHBAR_H --#include <QLineEdit> --#include <QResizeEvent> --#include <peony-qt/controls/navigation-bar/advanced-location-bar.h> -- --namespace UKUIFileDialog { --class FileDialogPathBar : public QWidget//public QLineEdit// --{ -- Q_OBJECT --public: -- explicit FileDialogPathBar(QWidget *parent = nullptr); -- ~FileDialogPathBar(); -- void resizeEvent(QResizeEvent *e); -- Peony::AdvancedLocationBar *getPathBar(); -- --Q_SIGNALS: -- void goToUriRequest(const QString &uri, bool addToHistory = true); -- void updateWindowLocationRequest(const QString &uri, bool addHistory, bool forceUpdate = false); -- void refreshRequest(); -- void searchRequest(const QString &path, const QString &key); -- --public Q_SLOTS: -- void updateTableModel(bool isTable); -- void updatePath(const QString &uri); --private: -- Peony::AdvancedLocationBar *m_pathBar = nullptr; --}; --} --#endif // PATHBAR_H -diff --git a/qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp b/qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp -deleted file mode 100644 -index 2194f14..0000000 ---- a/qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp -+++ /dev/null -@@ -1,495 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Jing Tan <tanjing@kylinos.cn> -- * -- */ -- --#include "debug.h" --#include "sidebar.h" --#include <QTimer> --#include <PeonySideBarModel> --#include <QScrollBar> --#include <QHeaderView> --#include <QPainterPath> --#include <QPainter> --#include <QDebug> --#include <QApplication> --#include <QTreeWidget> --#include <QMessageBox> --#include <QToolTip> --#include <QScreen> --#include <QDBusInterface> --#include "kyfiledialog.h" --#include "peony-qt/controls/menu/side-bar-menu/side-bar-menu.h" --#include "peony-qt/side-bar-abstract-item.h" --#include "peony-qt/volume-manager.h" --#include "peony-qt/file-enumerator.h" --#include "peony-qt/file-utils.h" --#include "peony-qt/file-info.h" --#include "ukui-style-settings.h" --#include "debug.h" --using namespace UKUIFileDialog; -- --FileDialogComboBox::FileDialogComboBox(QWidget *parent):QComboBox(parent) --{ -- if (QGSettings::isSchemaInstalled("org.ukui.style")) { -- auto settings = UKUIStyleSettings::globalInstance(); -- connect(settings, &QGSettings::changed, this, [=](const QString &key){ -- pDebug << "key changed:" << key << this->size(); -- m_styleChanged = true; -- }); -- } -- -- connect(this, &FileDialogComboBox::setStyleChanged, this, [=](bool change){ -- pDebug << "setStyleChanged m_styleChanged:" << change; -- m_styleChanged = change; -- }); -- QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); -- if(interFace->isValid()){ -- connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(tableModeChanged(bool))); -- } -- m_minSize = this->minimumSize(); -- pDebug << "combobox minsize...." << m_minSize; --} -- --void FileDialogComboBox::tableModeChanged(bool isTableMode) --{ -- m_styleChanged = true; --} -- --QSize FileDialogComboBox::minimumSizeHint() const --{ -- pDebug << "minimumSizeHint...." << m_styleChanged << this->size() << m_minSize; -- if(m_styleChanged || (qApp->screenAt(QCursor::pos())->availableSize().width() - 300) < QComboBox::minimumSizeHint().width()) -- { -- Q_EMIT setStyleChanged(false); -- return m_minSize;//this->size(); -- } -- QSize size = QComboBox::minimumSizeHint(); -- -- -- return size; --} -- -- --FileDialogSideBar::FileDialogSideBar(QWidget *parent) : QTreeView(parent) --{ --// setStyle(SideBarStyle::getStyle()); -- -- setIconSize(QSize(16, 16)); -- --// header()->setSectionResizeMode(QHeaderView::Stretch ); -- header()->setStretchLastSection(false); -- header()->hide(); -- -- this->verticalScrollBar()->setProperty("drawScrollBarGroove", false); -- setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); -- this->setFrameStyle(QFrame::NoFrame); -- setSortingEnabled(true); -- -- setProperty("useIconHighlightEffect", true); -- setDragDropMode(QTreeView::NoDragDrop); -- setProperty("doNotBlur", true); -- viewport()->setProperty("doNotBlur", true); -- setContextMenuPolicy(Qt::CustomContextMenu); -- -- setExpandsOnDoubleClick(false); -- setMouseTracking(true);//追踪鼠标 -- setAutoScrollMargin(0); -- -- -- auto delegate = new SideBarItemDelegate(this); -- setItemDelegate(delegate); -- -- m_model = new Peony::SideBarModel(this); -- m_proxyModel = new Peony::SideBarProxyFilterSortModel(this); -- m_proxyModel->setSourceModel(m_model); -- setModel(m_proxyModel); -- -- Peony::VolumeManager *volumeManager = Peony::VolumeManager::getInstance(); -- connect(volumeManager,&Peony::VolumeManager::volumeAdded,this,[=](const std::shared_ptr<Peony::Volume> &volume){ -- m_proxyModel->invalidate();//display DVD device in real time. -- }); -- connect(volumeManager,&Peony::VolumeManager::volumeRemoved,this,[=](const std::shared_ptr<Peony::Volume> &volume){ -- m_proxyModel->invalidate();//The drive does not display when the DVD device is removed. -- //pDebug << "volumeRemoved:" <<QToolTip::text(); -- //fix abnormal pull out usb device tips not hide issue, link to bug#81190 -- if (QToolTip::isVisible()) { -- QToolTip::hideText(); -- } -- }); -- connect(volumeManager,&Peony::VolumeManager::driveDisconnected,this,[=](const std::shared_ptr<Peony::Drive> &drive){ -- m_proxyModel->invalidate();//Multiple udisk eject display problem -- }); -- connect(volumeManager,&Peony::VolumeManager::mountAdded,this,[=](const std::shared_ptr<Peony::Mount> &mount){ -- m_proxyModel->invalidate();//display udisk in real time after format it. -- }); -- -- -- connect(this, &FileDialogSideBar::clicked, this, [=](const QModelIndex &index){ -- switch (index.column()) { -- case 0: { -- auto item = m_proxyModel->itemFromIndex(index); -- -- if (! item) -- break; -- //continue to fix crash issue, related to bug#116201,116589 -- if(item->isMountable()&&!item->isMounted()) -- item->mount(); -- else{ -- auto uri = item->uri(); -- -- if (!item->uri().isEmpty()){ -- if (uri == "computer:///ukui-data-volume") { -- uri = "file:///data"; -- } -- Q_EMIT goToUriRequest(uri); -- } -- } -- break; -- } -- case 1: { -- auto item = m_proxyModel->itemFromIndex(index); -- if (item->isMounted() || item->isEjectable()||item->isStopable()) { -- auto leftIndex = m_proxyModel->index(index.row(), 0, index.parent()); -- this->collapse(leftIndex); -- item->ejectOrUnmount(); -- } else { -- // if item is not unmountable, just be same with first column. -- // fix #39716 -- auto uri = item->uri(); -- -- if (!item->uri().isNull()){ -- if (uri == "computer:///ukui-data-volume") { -- uri = "file:///data"; -- } -- Q_EMIT goToUriRequest(uri); -- } -- } -- break; -- } -- default: -- break; -- } -- }); -- -- connect(this, &FileDialogSideBar::expanded, this, [=](const QModelIndex &index){ -- auto item = m_proxyModel->itemFromIndex(index); -- item->findChildrenAsync(); -- }); -- -- connect(this, &FileDialogSideBar::collapsed, this, [=](const QModelIndex &index){ -- auto item = m_proxyModel->itemFromIndex(index); -- item->clearChildren(); -- }); -- -- connect(this, &QTreeView::customContextMenuRequested, this, [=](const QPoint &pos){ -- auto index = indexAt(pos); -- auto item = m_proxyModel->itemFromIndex(index); -- if (item) { -- if (item->type() != Peony::SideBarAbstractItem::SeparatorItem) { -- Peony::SideBarMenu menu(item, nullptr); -- QList<QAction *> actionList; -- if (item->type() == Peony::SideBarAbstractItem::FileSystemItem) { -- if ((0 != QString::compare(item->uri(), "computer:///")) && -- (0 != QString::compare(item->uri(), "filesafe:///"))) { -- for (const auto &actionItem : actionList) { -- if(item->isVolume())/* 分区才去需要判断是否已挂载 */ -- actionItem->setEnabled(item->isMounted()); -- } -- } -- } -- -- menu.exec(QCursor::pos()); -- } -- } -- }); -- -- QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); -- if(interFace->isValid()){ -- connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(tableModeChanged(bool))); -- } -- --// if (QGSettings::isSchemaInstalled("org.ukui.style")) { --// auto settings = UKUIStyleSettings::globalInstance(); --// connect(settings, &QGSettings::changed, this, [=](const QString &key){ --// pDebug << "key changed:" << key << width(); --// if (key == "styleName") { --// m_siderWidth = this->width(); --// } --// }); --// } -- expandToDepth(1); -- setViewportMargins(4, 4, 0, 0); -- -- pDebug << "columndffffffffffffffff"; --// setColumnHidden(1, true); --} -- --FileDialogSideBar::~FileDialogSideBar() --{ -- m_proxyModel->deleteLater(); -- m_proxyModel = nullptr; -- m_model->deleteLater(); -- m_model = nullptr; --} -- --void FileDialogSideBar::tableModeChanged(bool isTableMode) --{ -- pDebug << "tableModeChanged........"; --// setStyle(SideBarStyle::getStyle()); --} -- --void FileDialogSideBar::resizeEvent(QResizeEvent *e) --{ -- setViewportMargins(4, 4, 0, 0); -- --// this->setGeometry(this->x(), this->y(), m_siderWidth, this->height()); -- QTreeView::resizeEvent(e); -- pDebug << "FileDialogSideBar resizeEvent header count......:" << header()->count() << this->viewport()->width() << this->columnWidth(0) << this->columnWidth(1); -- if (header()->count() > 0) { -- this->setColumnWidth(1, 20); -- header()->resizeSection(0, this->viewport()->width() - this->columnWidth(1)); -- } --} -- --void FileDialogSideBar::menuRequest(const QPoint &pos) --{ --// auto index = indexAt(pos); --// auto item = proxyModel->itemFromIndex(index); --// if (item) { --// pDebug << "sider bar menu00000" << item->type() << index; --// if (item->type() != Peony::SideBarAbstractItem::SeparatorItem) { --// pDebug << "sider bar menu11111"; --//// Peony::SideBarMenu *menu = new Peony::SideBarMenu(item, this); --// pDebug << "sider bar menu22222222"; --//// menu->exec(QCursor::pos()); --// pDebug << "sider bar menu3333333"; --// } --// } --} -- --void FileDialogSideBar::paintEvent(QPaintEvent *event) --{ --// pDebug << "sidebar paintEvent.......:" << this->size(); -- QTreeView::paintEvent(event); --} -- --//void FileDialogSideBar::paintEvent(QPaintEvent *e) --//{ --// QColor color = this->palette().window().color(); --// QColor colorBase = QColor(Qt::red); //this->palette().base().color(); -- --// int R1 = color.red(); --// int G1 = color.green(); --// int B1 = color.blue(); --// qreal a1 = 0.3; -- --// int R2 = colorBase.red(); --// int G2 = colorBase.green(); --// int B2 = colorBase.blue(); --// qreal a2 = 1; -- --// qreal a = 1 - (1 - a1)*(1 - a2); -- --// qreal R = (a1*R1 + (1 - a1)*a2*R2) / a; --// qreal G = (a1*G1 + (1 - a1)*a2*G2) / a; --// qreal B = (a1*B1 + (1 - a1)*a2*B2) / a; -- --// colorBase.setRed(R); --// colorBase.setGreen(G); --// colorBase.setBlue(B); --// colorBase.setAlphaF(1); -- --//// QPainter p(this); --//// QPainterPath sidebarPath; --//// sidebarPath.addRoundedRect(this->geometry(), 6, 6); --//// p.fillPath(sidebarPath, colorBase); --//// viewport()->setObjectName("viewport"); --//// viewport()->setStyleSheet("QWidget#viewport{background-color:rgba(255,255,255,0.5)");////" + QString::number(colorBase.red()) + "," + QString::number(colorBase.green()) + "," + QString::number(colorBase.blue()) + "," + QString::number(colorBase.alpha()) + "}"); --// QTreeView::paintEvent(e); --//} -- -- --SideBarItemDelegate::SideBarItemDelegate(QObject *parent) --{ --// if (QGSettings::isSchemaInstalled("org.ukui.style")) { --// auto settings = UKUIStyleSettings::globalInstance(); --// connect(settings, &QGSettings::changed, this, [=](const QString &key){ --// pDebug << "key changed:" << key; --// if (key == "styleName") { --// pDebug << "key changed...."; --// this->paint(); --// this->update(); --// } --// }); --// } --} -- --//QSize SideBarItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const --//{ --// auto size = QStyledItemDelegate::sizeHint(option, index); --// size.setHeight(36); --// return size; --//} -- -- --void SideBarItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const --{ -- painter->save(); -- if (index.column() == 1) { -- QPainterPath rightRoundedRegion; -- rightRoundedRegion.setFillRule(Qt::WindingFill); -- auto rect = option.rect; -- auto view = qobject_cast<const QAbstractItemView *>(option.widget); -- if (view) { -- rect.setRight(view->viewport()->rect().right()); -- } -- int radius = 4; -- if(view && view->property("minRadius").isValid()) -- radius = view->property("minRadius").toInt(); -- -- rightRoundedRegion.addRoundedRect(rect, radius, radius); -- rightRoundedRegion.addRect(rect.adjusted(0, 0, -1 * radius, 0)); -- painter->setClipPath(rightRoundedRegion); -- } -- -- painter->setRenderHint(QPainter::Antialiasing); -- QStyledItemDelegate::paint(painter, option, index); -- painter->restore(); --} -- --static SideBarStyle *global_instance = nullptr; --SideBarStyle::SideBarStyle() --{ -- --} -- --SideBarStyle* SideBarStyle::getStyle() --{ -- if (!global_instance) { -- global_instance = new SideBarStyle; -- } -- return global_instance; --} -- --void SideBarStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const --{ -- painter->save(); -- switch (element) { -- case QStyle::PE_IndicatorItemViewItemDrop: { -- painter->setRenderHint(QPainter::Antialiasing, true);/* 反锯齿 */ -- /* 按设计要求,边框颜色为调色板highlight值,圆角为6px */ -- QColor color = option->palette.color(QPalette::Highlight); -- painter->setPen(color); -- int radius = 6; -- if(widget && widget->property("normalRadius").isValid()) -- radius = widget->property("normalRadius").toInt(); -- -- painter->drawRoundedRect(option->rect, radius, radius); -- painter->restore(); -- return; -- } -- -- case QStyle::PE_IndicatorBranch: { -- painter->setRenderHint(QPainter::Antialiasing, true); -- if (option->rect.x() == 0) { -- QPainterPath leftRoundedRegion; -- leftRoundedRegion.setFillRule(Qt::WindingFill); -- int radius = 4; -- if(widget && widget->property("minRadius").isValid()) -- radius = widget->property("minRadius").toInt(); -- -- leftRoundedRegion.addRoundedRect(option->rect, radius, radius); -- leftRoundedRegion.addRect(option->rect.adjusted(radius, 0, 0, 0)); -- painter->setClipPath(leftRoundedRegion); -- } -- const QStyleOptionViewItem *tmp = qstyleoption_cast<const QStyleOptionViewItem *>(option); -- QStyleOptionViewItem opt = *tmp; -- if (!opt.state.testFlag(QStyle::State_Selected)) { -- if (opt.state & QStyle::State_Sunken) { -- opt.palette.setColor(QPalette::Highlight, opt.palette.button().color()); --// opt.palette.setColor(QPalette::Highlight, Qt::red); -- } -- if (opt.state & QStyle::State_MouseOver) { -- opt.palette.setColor(QPalette::Highlight, opt.palette.mid().color()); --// opt.palette.setColor(QPalette::Highlight, Qt::green); -- } -- } -- qApp->style()->drawPrimitive(element, &opt, painter, widget); -- painter->restore(); -- return; -- } -- case QStyle::PE_PanelItemViewRow: { -- painter->restore(); -- return; -- break; -- } -- case QStyle::PE_PanelItemViewItem: { -- /* -- const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option); -- QStyleOptionViewItem opt = *vi; -- painter->save(); -- painter->setPen(Qt::NoPen); -- QPainterPath path; -- if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) { -- path.addRoundedRect(vi->rect, 6, 6); -- } -- else { -- path.addRect(vi->rect); -- } --// pDebug << "vi->rect:" << vi->rect; -- -- if (!opt.state.testFlag(QStyle::State_Selected)) { -- if (opt.state & QStyle::State_Sunken) { -- opt.palette.setColor(QPalette::Highlight, opt.palette.button().color()); -- } -- if (opt.state & QStyle::State_MouseOver) { -- opt.palette.setColor(QPalette::Highlight, opt.palette.mid().color()); -- } -- } -- painter->drawPath(path); -- */ -- break; -- } -- -- default: -- break; -- } -- -- qApp->style()->drawPrimitive(element, option, painter, widget); -- painter->restore(); --} -- --void SideBarStyle::drawControl(QStyle::ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const --{ -- if (element == QStyle::CE_ItemViewItem) { -- const QStyleOptionViewItem *tmp = qstyleoption_cast<const QStyleOptionViewItem *>(option); -- QStyleOptionViewItem opt = *tmp; -- if (!opt.state.testFlag(QStyle::State_Selected)) { -- if (opt.state & QStyle::State_Sunken) { -- opt.palette.setColor(QPalette::Highlight, opt.palette.button().color()); -- } -- if (opt.state & QStyle::State_MouseOver) { -- opt.palette.setColor(QPalette::Highlight, opt.palette.mid().color()); -- } -- } -- return qApp->style()->drawControl(element, &opt, painter, widget); -- } --} -diff --git a/qt5-ukui-platformtheme/widget/filedialog/sidebar.h b/qt5-ukui-platformtheme/widget/filedialog/sidebar.h -deleted file mode 100644 -index 48112e9..0000000 ---- a/qt5-ukui-platformtheme/widget/filedialog/sidebar.h -+++ /dev/null -@@ -1,105 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Jing Tan <tanjing@kylinos.cn> -- * -- */ -- --#include "debug.h" --#ifndef SIDEBAR_H --#define SIDEBAR_H --#include <QTreeView> --#include <QPaintEvent> --#include <QStyledItemDelegate> --#include <QStyleOptionViewItem> --#include <QModelIndex> --#include <QPainter> --#include <QProxyStyle> --#include <QStyleOption> --#include <PeonySideBarProxyModel> --#include <QComboBox> --#include <QSize> --#include <PeonySideBarModel> -- --namespace UKUIFileDialog { --class FileDialogComboBox : public QComboBox --{ -- Q_OBJECT --public: -- explicit FileDialogComboBox(QWidget *parent = nullptr); -- ~FileDialogComboBox(){} -- QSize minimumSizeHint() const; -- --public Q_SLOTS: -- void tableModeChanged(bool isTableMode); -- --Q_SIGNALS: -- void setStyleChanged(bool change) const; -- --private: -- bool m_styleChanged = false; -- QSize m_minSize; --}; -- -- --class FileDialogSideBar : public QTreeView --{ -- -- Q_OBJECT --public: -- explicit FileDialogSideBar(QWidget *parent = nullptr); -- ~FileDialogSideBar(); -- void resizeEvent(QResizeEvent *e); -- void paintEvent(QPaintEvent *event); -- --public Q_SLOTS: -- void menuRequest(const QPoint &pos); -- void tableModeChanged(bool isTableMode); -- --private: -- Peony::SideBarProxyFilterSortModel *m_proxyModel = nullptr; -- Peony::SideBarModel *m_model = nullptr; -- --Q_SIGNALS: -- void goToUriRequest(const QString &uri, bool addToHistory = true, bool forceUpdate = false); -- --}; -- -- --class SideBarItemDelegate : public QStyledItemDelegate --{ -- friend class FileDialogSideBar; -- explicit SideBarItemDelegate(QObject *parent = nullptr); -- ~SideBarItemDelegate(){} -- --// QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; -- void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; --}; -- -- --class SideBarStyle : public QProxyStyle --{ --public: -- explicit SideBarStyle(); -- static SideBarStyle* getStyle(); -- ~SideBarStyle(){} -- void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override; -- void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override; --}; --} --#endif // SIDEBAR_H -diff --git a/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.cpp b/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.cpp -deleted file mode 100644 -index 04e1679..0000000 ---- a/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.cpp -+++ /dev/null -@@ -1,505 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Jing Tan <tanjing@kylinos.cn> -- * -- */ -- --#include "debug.h" --#include "ui_kyfiledialog.h" --#include <QFileDialog> --#include "kyfiledialog.h" --#include "debug.h" --using namespace UKUIFileDialog; --//Ui_KyFileDialog::Ui_KyFileDialog(QDialog *parent) --//{ --// setupUi(parent); --//} -- --Ui_KyFileDialog::Ui_KyFileDialog(QWidget *parent) : QWidget(parent) --{ -- --} -- --Ui_KyFileDialog::~Ui_KyFileDialog() --{ -- pDebug << "Ui_KyFileDialog destory111.........."; --/* -- if(m_pathbarWidget){ -- m_pathbarWidget->deleteLater(); -- m_pathbarWidget = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory122222.........."; -- -- if(m_pathbar){ -- m_pathbar->deleteLater(); -- m_pathbar = nullptr; -- } -- if(m_searchBtn){ -- m_searchBtn->deleteLater(); -- m_searchBtn = nullptr; -- } -- if(m_backButton){ -- m_backButton->deleteLater(); -- m_backButton = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory3223.........."; -- -- if(m_forwardButton){ -- m_forwardButton->deleteLater(); -- m_forwardButton = nullptr; -- } -- if(m_toParentButton){ -- m_toParentButton->deleteLater(); -- m_toParentButton = nullptr; -- } -- if(m_modeButton){ -- m_modeButton->deleteLater(); -- m_modeButton = nullptr; -- } -- if(m_sortButton){ -- m_sortButton->deleteLater(); -- m_sortButton = nullptr; -- } -- if(m_maximizeAndRestore){ -- m_maximizeAndRestore->deleteLater(); -- m_maximizeAndRestore = nullptr; -- } -- if(m_closeButton){ -- m_closeButton->deleteLater(); -- m_closeButton = nullptr; -- } -- if(m_modeMenu){ -- m_modeMenu->deleteLater(); -- m_modeMenu = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory3555423.........."; -- -- if(m_sortMenu){ -- m_sortMenu->deleteLater(); -- m_sortMenu = nullptr; -- } -- if(m_listModeAction){ -- m_listModeAction->deleteLater(); -- m_listModeAction = nullptr; -- } -- if(m_iconModeAction){ -- m_iconModeAction->deleteLater(); -- m_iconModeAction = nullptr; -- } -- if(m_sider){ -- m_sider->deleteLater(); -- m_sider = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory223322.........."; -- -- if(m_frame){ -- m_frame->deleteLater(); -- m_frame = nullptr; -- } -- if(m_splitter){ -- m_splitter->deleteLater(); -- m_splitter = nullptr; -- } -- if(vboxLayout){ -- vboxLayout->deleteLater(); -- vboxLayout = nullptr; -- } -- if(m_treeView){ -- m_treeView->deleteLater(); -- m_treeView = nullptr; -- } -- if(m_fileNameLabel){ -- m_fileNameLabel->deleteLater(); -- m_fileNameLabel = nullptr; -- } -- if(m_fileNameEdit){ -- m_fileNameEdit->deleteLater(); -- m_fileNameEdit = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory1245677.........."; -- -- if(m_fileTypeCombo){ -- m_fileTypeCombo->deleteLater(); -- m_fileTypeCombo = nullptr; -- } -- if(m_newFolderButton){ -- m_newFolderButton->deleteLater(); -- m_newFolderButton = nullptr; -- } -- if(m_acceptButton){ -- m_acceptButton->deleteLater(); -- m_acceptButton = nullptr; -- } -- if(m_rejectButton){ -- m_rejectButton->deleteLater(); -- m_rejectButton = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory23467899.........."; -- -- if(m_upSeperate){ -- m_upSeperate->deleteLater(); -- m_upSeperate = nullptr; -- } -- if(m_downSeperate){ -- m_downSeperate->deleteLater(); -- m_downSeperate = nullptr; -- } -- if(m_widget){ -- m_widget->deleteLater(); -- m_widget = nullptr; -- } -- qDebug() << "destory345.........."; -- -- if(m_container){ -- qDebug() << "destory555.........."; -- -- m_container->deleteLater(); -- m_container = nullptr; -- qDebug() << "destory666.........."; -- -- } -- qDebug() << "destory777.........."; -- -- if(m_siderWidget){ -- m_siderWidget->deleteLater(); -- m_siderWidget = nullptr; -- } -- -- if(m_sortTypeGroup){ -- m_sortTypeGroup->deleteLater(); -- m_sortTypeGroup = nullptr; -- } -- if(m_fileName){ -- m_fileName->deleteLater(); -- m_fileName = nullptr; -- } -- if(m_modifiedDate){ -- m_modifiedDate->deleteLater(); -- m_modifiedDate = nullptr; -- } -- if(m_fileType){ -- m_fileType->deleteLater(); -- m_fileType = nullptr; -- } -- if(m_fileSize){ -- m_fileSize->deleteLater(); -- m_fileSize = nullptr; -- } -- if(m_originalPath){ -- m_originalPath->deleteLater(); -- m_originalPath = nullptr; -- } -- if(m_sortOrderGroup){ -- m_sortOrderGroup->deleteLater(); -- m_sortOrderGroup = nullptr; -- } -- if(m_descending){ -- m_descending->deleteLater(); -- m_descending = nullptr; -- } -- if(m_ascending){ -- m_ascending->deleteLater(); -- m_ascending = nullptr; -- } -- if(m_useGlobalSortAction){ -- m_useGlobalSortAction->deleteLater(); -- m_useGlobalSortAction = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory8888.........."; -- -- if(m_siderLayout){ -- m_siderLayout->deleteLater(); -- m_siderLayout = nullptr; -- } --// if(m_gridLayout){ --// m_gridLayout->deleteLater(); --// m_gridLayout= nullptr; --// } -- -- if(m_hHeaderLayout){ -- m_hHeaderLayout->deleteLater(); -- m_hHeaderLayout = nullptr; -- } -- if(m_hLineEditLayout){ -- m_hLineEditLayout->deleteLater(); -- m_hLineEditLayout = nullptr; -- } -- if(m_hBtnLayout){ -- m_hBtnLayout->deleteLater(); -- m_hBtnLayout = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory123.........."; --*/ --} -- --void Ui_KyFileDialog::initSortMenu(QDialog *mKyFileDialog) --{ -- m_sortButton = new MenuToolButton(this); -- m_sortMenu = new QMenu(m_sortButton); -- -- m_sortTypeGroup = new QActionGroup(m_sortMenu); -- m_sortTypeGroup->setExclusive(true); -- -- m_fileName = m_sortMenu->addAction(QObject::tr("File Name")); -- m_fileName->setCheckable(true); -- m_sortTypeGroup->addAction(m_fileName); -- -- m_modifiedDate = m_sortMenu->addAction(QObject::tr("Modified Date")); -- m_modifiedDate->setCheckable(true); -- m_sortTypeGroup->addAction(m_modifiedDate); -- -- m_fileType = m_sortMenu->addAction(QObject::tr("File Type")); -- m_fileType->setCheckable(true); -- m_sortTypeGroup->addAction(m_fileType); -- -- m_fileSize = m_sortMenu->addAction(QObject::tr("File Size")); -- m_fileSize->setCheckable(true); -- m_sortTypeGroup->addAction(m_fileSize); -- -- m_originalPath = m_sortMenu->addAction(QObject::tr("Original Path")); -- m_originalPath->setCheckable(true); -- m_sortTypeGroup->addAction(m_originalPath); -- -- m_sortMenu->addSeparator(); -- -- m_sortOrderGroup = new QActionGroup(m_sortMenu); -- m_sortOrderGroup->setExclusive(true); -- -- m_descending = m_sortMenu->addAction(QObject::tr("Descending")); -- m_descending->setCheckable(true); -- m_sortOrderGroup->addAction(m_descending); -- -- //switch defautl Descending Ascending order, fix bug#99924 -- m_ascending = m_sortMenu->addAction(QObject::tr("Ascending")); -- m_ascending->setCheckable(true); -- m_sortOrderGroup->addAction(m_ascending); -- -- m_sortMenu->addSeparator(); -- -- m_useGlobalSortAction = m_sortMenu->addAction(QObject::tr("Use global sorting")); -- m_useGlobalSortAction->setCheckable(true); -- -- m_sortButton->setMenu(m_sortMenu); -- m_sortButton->setPopupMode(QToolButton::InstantPopup); -- m_sortButton->setAutoRaise(true); -- m_sortButton->setFixedSize(QSize(57, 40)); -- m_sortButton->setIconSize(QSize(16, 16)); -- --} -- --void Ui_KyFileDialog::initModeMenu(QDialog *mKyFileDialog) --{ -- m_modeButton = new MenuToolButton(this); -- m_modeButton->setPopupMode(QToolButton::InstantPopup); -- m_modeButton->setAutoRaise(true); -- m_modeButton->setFixedSize(QSize(57, 40)); -- m_modeButton->setIconSize(QSize(16, 16)); -- -- m_modeMenu = new QMenu(m_modeButton); -- m_listModeAction = m_modeMenu->addAction(QIcon::fromTheme("view-list-symbolic"), QObject::tr("List View")); -- m_iconModeAction = m_modeMenu->addAction(QIcon::fromTheme("view-grid-symbolic"), QObject::tr("Icon View")); -- m_listModeAction->setCheckable(true); -- m_iconModeAction->setCheckable(true); -- m_modeButton->setMenu(m_modeMenu); --} -- --void Ui_KyFileDialog::initSiderBar(QDialog *mKyFileDialog) --{ -- m_siderWidget = new QWidget(this); -- m_siderLayout = new QVBoxLayout(); -- m_siderLayout->setContentsMargins(0,0,0,0); -- -- m_sider = new FileDialogSideBar(this); -- m_sider->setAttribute(Qt::WA_TranslucentBackground); --} -- --void Ui_KyFileDialog::initHeaderBar(QDialog *mKyFileDialog) --{ -- m_hHeaderLayout = new QHBoxLayout(this); -- initModeMenu(mKyFileDialog); -- initSortMenu(mKyFileDialog); -- -- m_hHeaderLayout->setContentsMargins(0,0,8,0); -- m_hHeaderLayout->setObjectName(QString::fromUtf8("hboxLayout")); -- m_backButton = new QToolButton(this); -- m_forwardButton = new QToolButton(this); -- m_toParentButton = new QToolButton(this); -- -- m_pathbarWidget = new FileDialogPathBar(this);//new Peony::AdvancedLocationBar(mKyFileDialog);// -- m_pathbar = m_pathbarWidget->getPathBar(); -- m_pathbar->setMinimumWidth(250); -- m_pathbar->setFocusPolicy(Qt::FocusPolicy(m_pathbar->focusPolicy() & ~Qt::TabFocus)); -- -- m_searchBtn = new QToolButton(this); -- -- m_maximizeAndRestore = new QToolButton(this); -- -- m_closeButton = new QToolButton(this); -- m_hHeaderLayout->setAlignment(Qt::AlignVCenter); -- -- m_hHeaderLayout->addWidget(m_backButton); -- m_hHeaderLayout->addWidget(m_forwardButton); -- m_hHeaderLayout->addWidget(m_toParentButton); -- m_hHeaderLayout->addWidget(m_pathbarWidget); -- m_hHeaderLayout->addWidget(m_searchBtn); -- m_hHeaderLayout->addWidget(m_modeButton); -- m_hHeaderLayout->addWidget(m_sortButton); -- m_hHeaderLayout->addWidget(m_maximizeAndRestore); -- m_hHeaderLayout->addWidget(m_closeButton); -- --} -- --void Ui_KyFileDialog::initLineEditLayout(QDialog *mKyFileDialog) --{ -- m_hLineEditLayout = new QHBoxLayout(this); -- m_hLineEditLayout->setContentsMargins(4,0,24,0); -- m_fileNameLabel = new QLabel(this); -- m_fileNameLabel->setObjectName(QString::fromUtf8("fileNameLabel")); -- QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred); -- sizePolicy2.setHorizontalStretch(0); -- sizePolicy2.setVerticalStretch(0); -- sizePolicy2.setHeightForWidth(m_fileNameLabel->sizePolicy().hasHeightForWidth()); -- m_fileNameLabel->setSizePolicy(sizePolicy2); -- m_fileNameLabel->setMinimumSize(QSize(0, 0)); -- pDebug << "3333333333333333333"; -- -- m_fileNameEdit = new QLineEdit(mKyFileDialog); -- m_fileNameEdit->setObjectName("fileNameEdit"); -- QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Fixed); -- sizePolicy3.setHorizontalStretch(1); -- sizePolicy3.setVerticalStretch(0); -- sizePolicy3.setHeightForWidth(m_fileNameEdit->sizePolicy().hasHeightForWidth()); -- m_fileNameEdit->setSizePolicy(sizePolicy3); -- pDebug << "44444444444444444"; -- -- m_fileTypeCombo = new FileDialogComboBox(this); -- QSizePolicy sizePolicy4(QSizePolicy::Expanding, QSizePolicy::Fixed); -- sizePolicy4.setHorizontalStretch(0); -- sizePolicy4.setVerticalStretch(0); -- sizePolicy4.setHeightForWidth(m_fileTypeCombo->sizePolicy().hasHeightForWidth()); -- m_fileTypeCombo->setSizePolicy(sizePolicy4); --// m_fileTypeCombo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength); -- //m_fileTypeCombo->setVisible(false); -- -- m_hLineEditLayout->addWidget(m_fileNameLabel); -- m_hLineEditLayout->addWidget(m_fileNameEdit); -- m_hLineEditLayout->addWidget(m_fileTypeCombo); -- m_hLineEditLayout->setSpacing(15); --} -- --void Ui_KyFileDialog::intiBtnLayout(QDialog *mKyFileDialog) --{ -- m_hBtnLayout = new QHBoxLayout(this); -- m_hBtnLayout->addSpacing(20); -- m_hBtnLayout->setContentsMargins(0,0,24,0); -- m_newFolderButton =new QPushButton(mKyFileDialog); -- m_newFolderButton->setObjectName(QString::fromUtf8("newFolderButton")); -- m_hBtnLayout->addWidget(m_newFolderButton); -- -- -- m_acceptButton = new QPushButton(mKyFileDialog); -- m_rejectButton = new QPushButton(mKyFileDialog); -- m_acceptButton->setEnabled(false); -- m_hBtnLayout->addStretch(); -- m_hBtnLayout->addWidget(m_rejectButton, 0, Qt::AlignRight | Qt::AlignVCenter); -- m_hBtnLayout->addSpacing(15); -- m_hBtnLayout->addWidget(m_acceptButton, 0, Qt::AlignRight | Qt::AlignVCenter); -- -- m_acceptButton->setObjectName(QString::fromUtf8("acceptButton")); -- m_rejectButton->setObjectName(QString::fromUtf8("rejectButton")); -- -- pDebug << "6666666666666666"; --} -- --void Ui_KyFileDialog::setupUi(QDialog *mKyFileDialog) --{ -- if(mKyFileDialog->objectName().isEmpty()) { -- mKyFileDialog->setObjectName(QString::fromUtf8("KyNativeFileDialog")); -- } -- mKyFileDialog->resize(1160, 635); -- -- mKyFileDialog->setSizeGripEnabled(true); -- mKyFileDialog->setAttribute(Qt::WA_TranslucentBackground); -- mKyFileDialog->setContentsMargins(0,0,0,0); -- -- m_gridLayout = new QGridLayout(mKyFileDialog); -- m_gridLayout->setObjectName(QString::fromUtf8("gridLayout")); -- -- m_container = new Peony::DirectoryViewContainer(this); -- m_frame = new QFrame(this); -- vboxLayout = new QVBoxLayout(this); -- -- initSiderBar(mKyFileDialog); -- -- initHeaderBar(mKyFileDialog); -- initLineEditLayout(mKyFileDialog); -- intiBtnLayout(mKyFileDialog); -- -- vboxLayout->addSpacing(8); -- vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); -- vboxLayout->setContentsMargins(0, 0, 0, 0); -- -- vboxLayout->addLayout(m_hHeaderLayout); -- vboxLayout->addSpacing(6); -- m_upSeperate = new QFrame(mKyFileDialog); -- m_upSeperate->setFrameShape(QFrame::HLine); -- m_upSeperate->setFrameShadow(QFrame::Plain); -- vboxLayout->addWidget(m_upSeperate); -- vboxLayout->addSpacing(6); -- vboxLayout->addWidget(m_container); -- vboxLayout->addSpacing(15); -- -- vboxLayout->addLayout(m_hLineEditLayout); -- vboxLayout->addSpacing(16); -- -- m_downSeperate = new QFrame(mKyFileDialog); -- m_downSeperate->setFrameShape(QFrame::HLine); -- m_downSeperate->setFrameShadow(QFrame::Plain); -- vboxLayout->addWidget(m_downSeperate); -- vboxLayout->addSpacing(16); -- -- vboxLayout->addLayout(m_hBtnLayout); -- vboxLayout->addSpacing(25); -- -- m_frame->setFrameShadow(QFrame::Raised); -- m_frame->setFrameShape(QFrame::NoFrame); -- m_frame->setLayout(vboxLayout); -- -- m_splitter = new QSplitter(this); -- m_splitter->setAttribute(Qt::WA_TranslucentBackground); -- QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding); -- sizePolicy1.setHorizontalStretch(0); -- sizePolicy1.setVerticalStretch(0); -- sizePolicy1.setHeightForWidth(m_splitter->sizePolicy().hasHeightForWidth()); -- m_splitter->setSizePolicy(sizePolicy1); -- m_splitter->setOrientation(Qt::Horizontal); -- m_splitter->setHandleWidth(0); -- m_siderLayout->addWidget(m_sider); -- m_siderWidget->setLayout(m_siderLayout); -- m_splitter->addWidget(m_siderWidget); -- m_splitter->setStretchFactor(0, 20); -- m_splitter->addWidget(m_frame); -- m_splitter->setStretchFactor(1, 40); -- int siderWidIndex = m_splitter->indexOf(m_siderWidget); -- int frameIndex = m_splitter->indexOf(m_frame); -- m_splitter->setCollapsible(siderWidIndex, false); -- m_splitter->setCollapsible(frameIndex, false); -- m_gridLayout->addWidget(m_splitter); -- m_gridLayout->setContentsMargins(0,0,0,0); --} -diff --git a/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.h b/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.h -deleted file mode 100644 -index 106aaa7..0000000 ---- a/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.h -+++ /dev/null -@@ -1,126 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Jing Tan <tanjing@kylinos.cn> -- * -- */ -- --#include "debug.h" --#ifndef UI_KYFILEDIALOG_H --#define UI_KYFILEDIALOG_H --#include <QApplication> --#include <QComboBox> --#include <QTreeView> --#include <QToolButton> --#include <QLineEdit> --#include <QFrame> --#include <QSplitter> --#include <QLabel> --#include <QMenu> --#include <QAction> --#include <QGridLayout> --#include <QHBoxLayout> --#include <QVBoxLayout> --#include <QDialogButtonBox> --#include <QDebug> --#include "sidebar.h" --#include <QSizePolicy> --#include "kyfiledialog.h" --#include <peony-qt/controls/directory-view/directory-view-container.h> --#include <peony-qt/controls/navigation-bar/advanced-location-bar.h> --#include "pathbar.h" --#include <QPushButton> --#include <QToolBar> --#include <QObject> --#include <QDialog> --#include "menutoolbutoon.h" -- --namespace Peony { --class DirectoryViewContainer; --} --namespace UKUIFileDialog { --class Ui_KyFileDialog: public QWidget --{ -- QOBJECT_H -- public: -- explicit Ui_KyFileDialog(QWidget *parent = nullptr); -- ~Ui_KyFileDialog(); -- -- QGridLayout *m_gridLayout = nullptr; -- QHBoxLayout *m_hHeaderLayout = nullptr; -- QHBoxLayout *m_hLineEditLayout = nullptr; -- QHBoxLayout *m_hBtnLayout = nullptr; -- FileDialogPathBar *m_pathbarWidget = nullptr; -- Peony::AdvancedLocationBar *m_pathbar = nullptr; -- QToolButton *m_searchBtn = nullptr; -- //QWidget *m_pathbar = nullptr; -- QToolButton *m_backButton = nullptr; -- QToolButton *m_forwardButton = nullptr; -- QToolButton *m_toParentButton = nullptr; -- MenuToolButton *m_modeButton = nullptr; -- MenuToolButton *m_sortButton = nullptr; -- QToolButton *m_maximizeAndRestore = nullptr; -- QToolButton *m_closeButton = nullptr; -- QMenu *m_modeMenu = nullptr; -- QMenu *m_sortMenu = nullptr; -- QAction *m_listModeAction = nullptr; -- QAction *m_iconModeAction = nullptr; -- FileDialogSideBar *m_sider = nullptr; -- QFrame *m_frame = nullptr; -- QSplitter *m_splitter = nullptr; -- QVBoxLayout *vboxLayout = nullptr; -- QTreeView *m_treeView = nullptr; -- QLabel *m_fileNameLabel = nullptr; -- QLineEdit *m_fileNameEdit = nullptr; -- FileDialogComboBox *m_fileTypeCombo = nullptr; -- QPushButton *m_newFolderButton = nullptr; -- QPushButton *m_acceptButton = nullptr; -- QPushButton *m_rejectButton = nullptr; -- QFrame *m_upSeperate = nullptr; -- QFrame *m_downSeperate = nullptr; -- -- QWidget *m_widget = nullptr; -- Peony::DirectoryViewContainer *m_container = nullptr; -- -- QWidget *m_siderWidget = nullptr; -- QVBoxLayout *m_siderLayout = nullptr; -- -- QActionGroup *m_sortTypeGroup = nullptr; -- QAction *m_fileName = nullptr; -- QAction *m_modifiedDate = nullptr; -- QAction *m_fileType = nullptr; -- QAction *m_fileSize = nullptr; -- QAction *m_originalPath = nullptr; -- QActionGroup *m_sortOrderGroup = nullptr; -- QAction *m_descending = nullptr; -- QAction *m_ascending = nullptr; -- QAction *m_useGlobalSortAction = nullptr; -- --public: -- void setupUi(QDialog *mKyFileDialog); -- --private: -- void initSortMenu(QDialog *mKyFileDialog); -- void initModeMenu(QDialog *mKyFileDialog); -- void initSiderBar(QDialog *mKyFileDialog); -- void initHeaderBar(QDialog *mKyFileDialog); -- void initLineEditLayout(QDialog *mKyFileDialog); -- void intiBtnLayout(QDialog *mKyFileDialog); --}; --} --#endif // UI_KYFILEDIALOG_H -diff --git a/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp b/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -index 6d2a97a..ce5d479 100644 ---- a/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -+++ b/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -@@ -21,7 +21,7 @@ - */ - - #include "message-box.h" --#include "xatom-helper.h" -+#include "../../xatom-helper.h" - - #include <QPainter> - #include <QVariant> -diff --git a/qt5-ukui-platformtheme/widget/widget.pri b/qt5-ukui-platformtheme/widget/widget.pri -index 73f18d6..7aa0144 100644 ---- a/qt5-ukui-platformtheme/widget/widget.pri -+++ b/qt5-ukui-platformtheme/widget/widget.pri -@@ -1,55 +1,5 @@ - HEADERS += \ -- $$PWD/filedialog/kyfiledialog.h \ -- $$PWD/filedialog/kyfiledialogprivate.h \ - $$PWD/messagebox/message-box.h \ -- $$PWD/filedialog/pathbar.h \ -- $$PWD/filedialog/sidebar.h \ -- $$PWD/filedialog/ui_kyfiledialog.h \ -- $$PWD/xatom-helper.h \ -- $$PWD/filedialog/menutoolbutoon.h \ -- $$PWD/filedialog/debug.h \ - - SOURCES += \ -- $$PWD/filedialog/kyfiledialog.cpp \ - $$PWD/messagebox/message-box.cpp \ -- $$PWD/filedialog/pathbar.cpp \ -- $$PWD/filedialog/sidebar.cpp \ -- $$PWD/xatom-helper.cpp \ -- $$PWD/filedialog/menutoolbutoon.cpp \ -- $$PWD/filedialog/kyfiledialogprivate.cpp \ -- $$PWD/filedialog/ui_kyfiledialog.cpp \ -- --DEFINES += OPEN_ACTIONS_SEPARATOR='\\"open-actions-seperator\\"' --DEFINES += CREATE_ACTIONS_SEPARATOR='\\"create-actions-seperator\\"' --DEFINES += VIEW_ACTIONS_SEPARATOR='\\"view-actions-seperator\\"' --DEFINES += FILE_OPERATION_ACTIONS_SEPARATOR='\\"file-operation-actions-seperator\\"' --DEFINES += PLUGIN_ACTIONS_SEPARATOR='\\"plugin-actions-seperator\\"' --DEFINES += PROPERTIES_ACTIONS_SEPARATOR='\\"properties-actions-seperator\\"' --DEFINES += COMPUTER_ACTIONS_SEPARATOR='\\"computer-actions-seperator\\"' --DEFINES += TRASH_ACTIONS_SEPARATOR='\\"trash-actions-seperator\\"' -- --DEFINES += OPEN_IN_NEW_WINDOW_ACTION='\\"open-in-new-window-action\\"' --DEFINES += OPEN_IN_NEW_TAB_ACTION='\\"open-in-new-tab-action\\"' --DEFINES += ADD_TO_BOOKMARK_ACTION='\\"add-to-bookmark-action\\"' --DEFINES += OPEN_ACTION='\\"open-action\\"' --DEFINES += OPEN_WITH_ACTION='\\"open-with-action\\"' --DEFINES += OPEN_SELECTED_FILES_ACTION='\\"open-selected-files-action\\"' --DEFINES += CREATE_ACTION='\\"create-action\\"' --DEFINES += VIEW_TYPE_ACTION='\\"view-type-action\\"' --DEFINES += SORT_TYPE_ACTION='\\"sort-type-action\\"' --DEFINES += SORT_ORDER_ACTION='\\"sort-order-action\\"' --DEFINES += SORT_PREFERENCES_ACTION='\\"sort-preferences-action\\"' --DEFINES += COPY_ACTION='\\"copy-action\\"' --DEFINES += CUT_ACTION='\\"cut-action\\"' --DEFINES += TRASH_ACTION='\\"trash-action\\"' --DEFINES += DELETE_ACTION='\\"delete-action\\"' --DEFINES += RENAME_ACTION='\\"rename-action\\"' --DEFINES += PASTE_ACTION='\\"paste-action\\"' --DEFINES += REFRESH_ACTION='\\"refresh-action\\"' --DEFINES += SELECT_ALL_ACTION='\\"select-all-action\\"' --DEFINES += REVERSE_SELECT_ACTION='\\"reverse-select-action\\"' --DEFINES += PROPERTIES_ACTION='\\"properties-action\\"' --DEFINES += FORMAT_ACTION='\\"format-action\\"' --DEFINES += CLEAN_THE_TRASH_ACTION='\\"clean-the-trash-action\\"' --DEFINES += RESTORE_ACTION='\\"restore-action\\"' --DEFINES += CLEAN_THE_RECENT_ACTION='\\"clean-the-recent-action\\"' -diff --git a/qt5-ukui-platformtheme/widget/xatom-helper.cpp b/qt5-ukui-platformtheme/widget/xatom-helper.cpp -deleted file mode 100644 -index e8907ba..0000000 ---- a/qt5-ukui-platformtheme/widget/xatom-helper.cpp -+++ /dev/null -@@ -1,215 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#include "xatom-helper.h" -- --#include <limits.h> -- --#include <QX11Info> -- --#include <X11/X.h> --#include <X11/Xlib.h> --#include <X11/Xatom.h> -- --static XAtomHelper *global_instance = nullptr; -- --XAtomHelper *XAtomHelper::getInstance() --{ -- if (!global_instance) -- global_instance = new XAtomHelper; -- return global_instance; --} -- --bool XAtomHelper::isFrameLessWindow(int winId) --{ -- auto hints = getInstance()->getWindowMotifHint(winId); -- if (hints.flags == MWM_HINTS_DECORATIONS && hints.functions == 1) { -- return true; -- } -- return false; --} -- --bool XAtomHelper::isWindowDecorateBorderOnly(int winId) --{ -- return isWindowMotifHintDecorateBorderOnly(getInstance()->getWindowMotifHint(winId)); --} -- --bool XAtomHelper::isWindowMotifHintDecorateBorderOnly(const MotifWmHints &hint) --{ -- bool isDeco = false; -- if (hint.flags & MWM_HINTS_DECORATIONS && hint.flags != MWM_HINTS_DECORATIONS) { -- if (hint.decorations == MWM_DECOR_BORDER) -- isDeco = true; -- } -- return isDeco; --} -- --bool XAtomHelper::isUKUICsdSupported() --{ -- // fixme: -- return false; --} -- --bool XAtomHelper::isUKUIDecorationWindow(int winId) --{ -- if (m_ukuiDecorationAtion == None) -- return false; -- -- Atom type; -- int format; -- ulong nitems; -- ulong bytes_after; -- uchar *data; -- -- bool isUKUIDecoration = false; -- -- XGetWindowProperty(QX11Info::display(), winId, m_ukuiDecorationAtion, -- 0, LONG_MAX, false, -- m_ukuiDecorationAtion, &type, -- &format, &nitems, -- &bytes_after, &data); -- -- if (type == m_ukuiDecorationAtion) { -- if (nitems == 1) { -- isUKUIDecoration = data[0]; -- } -- } -- -- return isUKUIDecoration; --} -- --UnityCorners XAtomHelper::getWindowBorderRadius(int winId) --{ -- UnityCorners corners; -- -- Atom type; -- int format; -- ulong nitems; -- ulong bytes_after; -- uchar *data; -- -- if (m_unityBorderRadiusAtom != None) { -- XGetWindowProperty(QX11Info::display(), winId, m_unityBorderRadiusAtom, -- 0, LONG_MAX, false, -- XA_CARDINAL, &type, -- &format, &nitems, -- &bytes_after, &data); -- -- if (type == XA_CARDINAL) { -- if (nitems == 4) { -- corners.topLeft = static_cast<ulong>(data[0]); -- corners.topRight = static_cast<ulong>(data[1*sizeof (ulong)]); -- corners.bottomLeft = static_cast<ulong>(data[2*sizeof (ulong)]); -- corners.bottomRight = static_cast<ulong>(data[3*sizeof (ulong)]); -- } -- XFree(data); -- } -- } -- -- return corners; --} -- --void XAtomHelper::setWindowBorderRadius(int winId, const UnityCorners &data) --{ -- if (m_unityBorderRadiusAtom == None) -- return; -- -- ulong corners[4] = {data.topLeft, data.topRight, data.bottomLeft, data.bottomRight}; -- -- XChangeProperty(QX11Info::display(), winId, m_unityBorderRadiusAtom, XA_CARDINAL, -- 32, XCB_PROP_MODE_REPLACE, (const unsigned char *) &corners, sizeof (corners)/sizeof (corners[0])); --} -- --void XAtomHelper::setWindowBorderRadius(int winId, int topLeft, int topRight, int bottomLeft, int bottomRight) --{ -- if (m_unityBorderRadiusAtom == None) -- return; -- -- ulong corners[4] = {(ulong)topLeft, (ulong)topRight, (ulong)bottomLeft, (ulong)bottomRight}; -- -- XChangeProperty(QX11Info::display(), winId, m_unityBorderRadiusAtom, XA_CARDINAL, -- 32, XCB_PROP_MODE_REPLACE, (const unsigned char *) &corners, sizeof (corners)/sizeof (corners[0])); --} -- --void XAtomHelper::setUKUIDecoraiontHint(int winId, bool set) --{ -- if (m_ukuiDecorationAtion == None) -- return; -- -- XChangeProperty(QX11Info::display(), winId, m_ukuiDecorationAtion, m_ukuiDecorationAtion, 32, XCB_PROP_MODE_REPLACE, (const unsigned char *) &set, 1); --} -- --void XAtomHelper::setWindowMotifHint(int winId, const MotifWmHints &hints) --{ -- if (m_unityBorderRadiusAtom == None) -- return; -- -- XChangeProperty(QX11Info::display(), winId, m_motifWMHintsAtom, m_motifWMHintsAtom, -- 32, XCB_PROP_MODE_REPLACE, (const unsigned char *)&hints, sizeof (MotifWmHints)/ sizeof (ulong)); --} -- --MotifWmHints XAtomHelper::getWindowMotifHint(int winId) --{ -- MotifWmHints hints; -- -- if (m_unityBorderRadiusAtom == None) -- return hints; -- -- uchar *data; -- Atom type; -- int format; -- ulong nitems; -- ulong bytes_after; -- -- XGetWindowProperty(QX11Info::display(), winId, m_motifWMHintsAtom, -- 0, sizeof (MotifWmHints)/sizeof (long), false, AnyPropertyType, &type, -- &format, &nitems, &bytes_after, &data); -- -- if (type == None) { -- return hints; -- } else { -- hints = *(MotifWmHints *)data; -- XFree(data); -- } -- return hints; --} -- --XAtomHelper::XAtomHelper(QObject *parent) : QObject(parent) --{ -- if (!QX11Info::isPlatformX11()) -- return; -- -- m_motifWMHintsAtom = XInternAtom(QX11Info::display(), "_MOTIF_WM_HINTS", true); -- m_unityBorderRadiusAtom = XInternAtom(QX11Info::display(), "_UNITY_GTK_BORDER_RADIUS", false); -- m_ukuiDecorationAtion = XInternAtom(QX11Info::display(), "_KWIN_UKUI_DECORAION", false); --} -- --Atom XAtomHelper::registerUKUICsdNetWmSupportAtom() --{ -- // fixme: -- return None; --} -- --void XAtomHelper::unregisterUKUICsdNetWmSupportAtom() --{ -- // fixme: --} -diff --git a/qt5-ukui-platformtheme/widget/xatom-helper.h b/qt5-ukui-platformtheme/widget/xatom-helper.h -deleted file mode 100644 -index a274abe..0000000 ---- a/qt5-ukui-platformtheme/widget/xatom-helper.h -+++ /dev/null -@@ -1,108 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Yue Lan <lanyue@kylinos.cn> -- * -- */ -- --#ifndef XATOMHELPER_H --#define XATOMHELPER_H -- --#include <QObject> -- --struct UnityCorners { -- ulong topLeft = 0; -- ulong topRight = 0; -- ulong bottomLeft = 0; -- ulong bottomRight = 0; --}; -- --typedef struct { -- ulong flags = 0; -- ulong functions = 0; -- ulong decorations = 0; -- long input_mode = 0; -- ulong status = 0; --} MotifWmHints, MwmHints; -- --#define MWM_HINTS_FUNCTIONS (1L << 0) --#define MWM_HINTS_DECORATIONS (1L << 1) --#define MWM_HINTS_INPUT_MODE (1L << 2) --#define MWM_HINTS_STATUS (1L << 3) -- --#define MWM_FUNC_ALL (1L << 0) --#define MWM_FUNC_RESIZE (1L << 1) --#define MWM_FUNC_MOVE (1L << 2) --#define MWM_FUNC_MINIMIZE (1L << 3) --#define MWM_FUNC_MAXIMIZE (1L << 4) --#define MWM_FUNC_CLOSE (1L << 5) -- --#define MWM_DECOR_ALL (1L << 0) --#define MWM_DECOR_BORDER (1L << 1) --#define MWM_DECOR_RESIZEH (1L << 2) --#define MWM_DECOR_TITLE (1L << 3) --#define MWM_DECOR_MENU (1L << 4) --#define MWM_DECOR_MINIMIZE (1L << 5) --#define MWM_DECOR_MAXIMIZE (1L << 6) -- --#define MWM_INPUT_MODELESS 0 --#define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1 --#define MWM_INPUT_SYSTEM_MODAL 2 --#define MWM_INPUT_FULL_APPLICATION_MODAL 3 --#define MWM_INPUT_APPLICATION_MODAL MWM_INPUT_PRIMARY_APPLICATION_MODAL -- --#define MWM_TEAROFF_WINDOW (1L<<0) -- --namespace UKUI { --class Decoration; --} -- --class XAtomHelper : public QObject --{ -- friend class UKUI::Decoration; -- Q_OBJECT --public: -- static XAtomHelper *getInstance(); -- -- static bool isFrameLessWindow(int winId); -- -- bool isWindowDecorateBorderOnly(int winId); -- bool isWindowMotifHintDecorateBorderOnly(const MotifWmHints &hint); -- bool isUKUICsdSupported(); -- bool isUKUIDecorationWindow(int winId); -- -- UnityCorners getWindowBorderRadius(int winId); -- void setWindowBorderRadius(int winId, const UnityCorners &data); -- void setWindowBorderRadius(int winId, int topLeft, int topRight, int bottomLeft, int bottomRight); -- void setUKUIDecoraiontHint(int winId, bool set = true); -- -- void setWindowMotifHint(int winId, const MotifWmHints &hints); -- MotifWmHints getWindowMotifHint(int winId); -- --private: -- explicit XAtomHelper(QObject *parent = nullptr); -- -- ulong registerUKUICsdNetWmSupportAtom(); -- void unregisterUKUICsdNetWmSupportAtom(); -- -- ulong m_motifWMHintsAtom = 0l; -- ulong m_unityBorderRadiusAtom = 0l; -- ulong m_ukuiDecorationAtion = 0l; --}; -- --#endif // XATOMHELPER_H -diff --git a/qt5-ukui-platformtheme/xatom-helper.cpp b/qt5-ukui-platformtheme/xatom-helper.cpp -new file mode 100644 -index 0000000..e8907ba ---- /dev/null -+++ b/qt5-ukui-platformtheme/xatom-helper.cpp -@@ -0,0 +1,215 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Yue Lan <lanyue@kylinos.cn> -+ * -+ */ -+ -+#include "xatom-helper.h" -+ -+#include <limits.h> -+ -+#include <QX11Info> -+ -+#include <X11/X.h> -+#include <X11/Xlib.h> -+#include <X11/Xatom.h> -+ -+static XAtomHelper *global_instance = nullptr; -+ -+XAtomHelper *XAtomHelper::getInstance() -+{ -+ if (!global_instance) -+ global_instance = new XAtomHelper; -+ return global_instance; -+} -+ -+bool XAtomHelper::isFrameLessWindow(int winId) -+{ -+ auto hints = getInstance()->getWindowMotifHint(winId); -+ if (hints.flags == MWM_HINTS_DECORATIONS && hints.functions == 1) { -+ return true; -+ } -+ return false; -+} -+ -+bool XAtomHelper::isWindowDecorateBorderOnly(int winId) -+{ -+ return isWindowMotifHintDecorateBorderOnly(getInstance()->getWindowMotifHint(winId)); -+} -+ -+bool XAtomHelper::isWindowMotifHintDecorateBorderOnly(const MotifWmHints &hint) -+{ -+ bool isDeco = false; -+ if (hint.flags & MWM_HINTS_DECORATIONS && hint.flags != MWM_HINTS_DECORATIONS) { -+ if (hint.decorations == MWM_DECOR_BORDER) -+ isDeco = true; -+ } -+ return isDeco; -+} -+ -+bool XAtomHelper::isUKUICsdSupported() -+{ -+ // fixme: -+ return false; -+} -+ -+bool XAtomHelper::isUKUIDecorationWindow(int winId) -+{ -+ if (m_ukuiDecorationAtion == None) -+ return false; -+ -+ Atom type; -+ int format; -+ ulong nitems; -+ ulong bytes_after; -+ uchar *data; -+ -+ bool isUKUIDecoration = false; -+ -+ XGetWindowProperty(QX11Info::display(), winId, m_ukuiDecorationAtion, -+ 0, LONG_MAX, false, -+ m_ukuiDecorationAtion, &type, -+ &format, &nitems, -+ &bytes_after, &data); -+ -+ if (type == m_ukuiDecorationAtion) { -+ if (nitems == 1) { -+ isUKUIDecoration = data[0]; -+ } -+ } -+ -+ return isUKUIDecoration; -+} -+ -+UnityCorners XAtomHelper::getWindowBorderRadius(int winId) -+{ -+ UnityCorners corners; -+ -+ Atom type; -+ int format; -+ ulong nitems; -+ ulong bytes_after; -+ uchar *data; -+ -+ if (m_unityBorderRadiusAtom != None) { -+ XGetWindowProperty(QX11Info::display(), winId, m_unityBorderRadiusAtom, -+ 0, LONG_MAX, false, -+ XA_CARDINAL, &type, -+ &format, &nitems, -+ &bytes_after, &data); -+ -+ if (type == XA_CARDINAL) { -+ if (nitems == 4) { -+ corners.topLeft = static_cast<ulong>(data[0]); -+ corners.topRight = static_cast<ulong>(data[1*sizeof (ulong)]); -+ corners.bottomLeft = static_cast<ulong>(data[2*sizeof (ulong)]); -+ corners.bottomRight = static_cast<ulong>(data[3*sizeof (ulong)]); -+ } -+ XFree(data); -+ } -+ } -+ -+ return corners; -+} -+ -+void XAtomHelper::setWindowBorderRadius(int winId, const UnityCorners &data) -+{ -+ if (m_unityBorderRadiusAtom == None) -+ return; -+ -+ ulong corners[4] = {data.topLeft, data.topRight, data.bottomLeft, data.bottomRight}; -+ -+ XChangeProperty(QX11Info::display(), winId, m_unityBorderRadiusAtom, XA_CARDINAL, -+ 32, XCB_PROP_MODE_REPLACE, (const unsigned char *) &corners, sizeof (corners)/sizeof (corners[0])); -+} -+ -+void XAtomHelper::setWindowBorderRadius(int winId, int topLeft, int topRight, int bottomLeft, int bottomRight) -+{ -+ if (m_unityBorderRadiusAtom == None) -+ return; -+ -+ ulong corners[4] = {(ulong)topLeft, (ulong)topRight, (ulong)bottomLeft, (ulong)bottomRight}; -+ -+ XChangeProperty(QX11Info::display(), winId, m_unityBorderRadiusAtom, XA_CARDINAL, -+ 32, XCB_PROP_MODE_REPLACE, (const unsigned char *) &corners, sizeof (corners)/sizeof (corners[0])); -+} -+ -+void XAtomHelper::setUKUIDecoraiontHint(int winId, bool set) -+{ -+ if (m_ukuiDecorationAtion == None) -+ return; -+ -+ XChangeProperty(QX11Info::display(), winId, m_ukuiDecorationAtion, m_ukuiDecorationAtion, 32, XCB_PROP_MODE_REPLACE, (const unsigned char *) &set, 1); -+} -+ -+void XAtomHelper::setWindowMotifHint(int winId, const MotifWmHints &hints) -+{ -+ if (m_unityBorderRadiusAtom == None) -+ return; -+ -+ XChangeProperty(QX11Info::display(), winId, m_motifWMHintsAtom, m_motifWMHintsAtom, -+ 32, XCB_PROP_MODE_REPLACE, (const unsigned char *)&hints, sizeof (MotifWmHints)/ sizeof (ulong)); -+} -+ -+MotifWmHints XAtomHelper::getWindowMotifHint(int winId) -+{ -+ MotifWmHints hints; -+ -+ if (m_unityBorderRadiusAtom == None) -+ return hints; -+ -+ uchar *data; -+ Atom type; -+ int format; -+ ulong nitems; -+ ulong bytes_after; -+ -+ XGetWindowProperty(QX11Info::display(), winId, m_motifWMHintsAtom, -+ 0, sizeof (MotifWmHints)/sizeof (long), false, AnyPropertyType, &type, -+ &format, &nitems, &bytes_after, &data); -+ -+ if (type == None) { -+ return hints; -+ } else { -+ hints = *(MotifWmHints *)data; -+ XFree(data); -+ } -+ return hints; -+} -+ -+XAtomHelper::XAtomHelper(QObject *parent) : QObject(parent) -+{ -+ if (!QX11Info::isPlatformX11()) -+ return; -+ -+ m_motifWMHintsAtom = XInternAtom(QX11Info::display(), "_MOTIF_WM_HINTS", true); -+ m_unityBorderRadiusAtom = XInternAtom(QX11Info::display(), "_UNITY_GTK_BORDER_RADIUS", false); -+ m_ukuiDecorationAtion = XInternAtom(QX11Info::display(), "_KWIN_UKUI_DECORAION", false); -+} -+ -+Atom XAtomHelper::registerUKUICsdNetWmSupportAtom() -+{ -+ // fixme: -+ return None; -+} -+ -+void XAtomHelper::unregisterUKUICsdNetWmSupportAtom() -+{ -+ // fixme: -+} -diff --git a/qt5-ukui-platformtheme/xatom-helper.h b/qt5-ukui-platformtheme/xatom-helper.h -new file mode 100644 -index 0000000..a274abe ---- /dev/null -+++ b/qt5-ukui-platformtheme/xatom-helper.h -@@ -0,0 +1,108 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Yue Lan <lanyue@kylinos.cn> -+ * -+ */ -+ -+#ifndef XATOMHELPER_H -+#define XATOMHELPER_H -+ -+#include <QObject> -+ -+struct UnityCorners { -+ ulong topLeft = 0; -+ ulong topRight = 0; -+ ulong bottomLeft = 0; -+ ulong bottomRight = 0; -+}; -+ -+typedef struct { -+ ulong flags = 0; -+ ulong functions = 0; -+ ulong decorations = 0; -+ long input_mode = 0; -+ ulong status = 0; -+} MotifWmHints, MwmHints; -+ -+#define MWM_HINTS_FUNCTIONS (1L << 0) -+#define MWM_HINTS_DECORATIONS (1L << 1) -+#define MWM_HINTS_INPUT_MODE (1L << 2) -+#define MWM_HINTS_STATUS (1L << 3) -+ -+#define MWM_FUNC_ALL (1L << 0) -+#define MWM_FUNC_RESIZE (1L << 1) -+#define MWM_FUNC_MOVE (1L << 2) -+#define MWM_FUNC_MINIMIZE (1L << 3) -+#define MWM_FUNC_MAXIMIZE (1L << 4) -+#define MWM_FUNC_CLOSE (1L << 5) -+ -+#define MWM_DECOR_ALL (1L << 0) -+#define MWM_DECOR_BORDER (1L << 1) -+#define MWM_DECOR_RESIZEH (1L << 2) -+#define MWM_DECOR_TITLE (1L << 3) -+#define MWM_DECOR_MENU (1L << 4) -+#define MWM_DECOR_MINIMIZE (1L << 5) -+#define MWM_DECOR_MAXIMIZE (1L << 6) -+ -+#define MWM_INPUT_MODELESS 0 -+#define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1 -+#define MWM_INPUT_SYSTEM_MODAL 2 -+#define MWM_INPUT_FULL_APPLICATION_MODAL 3 -+#define MWM_INPUT_APPLICATION_MODAL MWM_INPUT_PRIMARY_APPLICATION_MODAL -+ -+#define MWM_TEAROFF_WINDOW (1L<<0) -+ -+namespace UKUI { -+class Decoration; -+} -+ -+class XAtomHelper : public QObject -+{ -+ friend class UKUI::Decoration; -+ Q_OBJECT -+public: -+ static XAtomHelper *getInstance(); -+ -+ static bool isFrameLessWindow(int winId); -+ -+ bool isWindowDecorateBorderOnly(int winId); -+ bool isWindowMotifHintDecorateBorderOnly(const MotifWmHints &hint); -+ bool isUKUICsdSupported(); -+ bool isUKUIDecorationWindow(int winId); -+ -+ UnityCorners getWindowBorderRadius(int winId); -+ void setWindowBorderRadius(int winId, const UnityCorners &data); -+ void setWindowBorderRadius(int winId, int topLeft, int topRight, int bottomLeft, int bottomRight); -+ void setUKUIDecoraiontHint(int winId, bool set = true); -+ -+ void setWindowMotifHint(int winId, const MotifWmHints &hints); -+ MotifWmHints getWindowMotifHint(int winId); -+ -+private: -+ explicit XAtomHelper(QObject *parent = nullptr); -+ -+ ulong registerUKUICsdNetWmSupportAtom(); -+ void unregisterUKUICsdNetWmSupportAtom(); -+ -+ ulong m_motifWMHintsAtom = 0l; -+ ulong m_unityBorderRadiusAtom = 0l; -+ ulong m_ukuiDecorationAtion = 0l; -+}; -+ -+#endif // XATOMHELPER_H -diff --git a/qt5-ukui.pro b/qt5-ukui.pro -index b64a12e..3db2d03 100644 ---- a/qt5-ukui.pro -+++ b/qt5-ukui.pro -@@ -2,6 +2,7 @@ TEMPLATE = subdirs - - SUBDIRS += \ - ukui-qqc2-style \ -+ qt5-ukui-filedialog \ - ukui-qml-style-helper \ - qt5-ukui-platformtheme \ - ukui-styles \ -diff --git a/translations/qt5-ukui-platformtheme_bo_CN.ts b/translations/qt5-ukui-platformtheme_bo_CN.ts -new file mode 100644 -index 0000000..e9d84fb ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_bo_CN.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="bo_CN"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation>ཁ་རྒྱག་པ།</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>ལག་བསྟར་བྱེད་ཆོག་པའི་'%1'ལ་Qt %2,Qt%3རྙེད་པ་རེད།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>ཕན་ཚུན་མཐུན་ཐབས་མེད་པའི་Qt དཔེ་མཛོད་ཁང་གི་ནོར་འཁྲུལ།</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation>འགྲིགས།</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation>ཞིབ་ཕྲའི་གནས་ཚུལ་གསལ་བཤད་བྱ་དགོས།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation>གནས་ཚུལ་ཞིབ་ཕྲ་སྦས་སྐུང་བྱེད་</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>ཡིག་ཆའི་མིང་།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>བཟོ་བཅོས་བརྒྱབ་པའི་དུས་ཚོད།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>ཡིག་ཆའི་རིགས་གྲས།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>ཡིག་ཆའི་ཆེ་ཆུང་།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>ཐོག་མའི་འགྲོ་ལམ།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>མར་འབབ་པ།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>རིམ་པ་ཇེ་མང་དུ་འགྲོ་བཞིན།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>ཁྱོན་ཡོངས་ཀྱི་གོ་རིམ་བེད་སྤྱོད།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>མཐོང་རིས་རེའུ་མིག</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>མཚོན་རྟགས་ལྟ་ཚུལ།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation>ཁ་རྒྱག་པ།</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>ཁ་ཆད་བཞག་པའི་སྒྲོན་བརྙན</translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>སྒྲོན་བརྙན་གྱི་འགུལ་རིས་ལ་བརྟེན་ནས་ཤོག་བྱང་ཆུང་ཆུང་བརྗེ་རེས་བྱེད་དུ་འཇུག་དགོས།</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation>ཁ་ཕྱེ་བའི་ཡིག་ཆ།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation>ཡིག་ཆ་ཉར་ཚགས་བྱེད་པ།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation>ཡིག་ཆ་ཡོད་ཚད་(*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>ཕྱིར་ལོག</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>མདུན་སྐྱོད།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>གོང་ཕྱོགས།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>འཚོལ་ཞིབ།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>མཐོང་རིས་ཀྱི་རིགས།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>གོ་རིམ་གྱི་རིགས།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>ཆེས་ཆེ་བསྒྱུར།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>ཁ་རྒྱག་པ།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>སླར་གསོ་བྱེད་པ།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>ཡིག་ཆའི་མིང་།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>སྒོ་ཕྱེ་བ།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>ཕྱིར་འཐེན།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>ཉར་ཚགས་གཞན།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>ཡིག་ཁུག་གསར་འཛུགས།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>གྲོན་ཆུང་བྱེད་དགོས།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>དཀར་ཆག</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>ཐ་ཚིག་སྒྲོག་པ།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>གནས་ཡོད་པས། ཁྱོད་ཀྱིས་དངོས་གནས་ཚབ་བྱེད་ཐུབ་བམ།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>དཀར་ཆག་གསར་བ།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>ཁ་ཕྱིར་འཐེན་བྱ་དགོས།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>ཡང་བསྐྱར་ལས།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>ཉེན་བརྡ་བཏང་བ།</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>བཀོལ་སྤྱོད་འདི་ལ་རྒྱབ་སྐྱོར་མི་བྱེད།</translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_cs.ts b/translations/qt5-ukui-platformtheme_cs.ts -new file mode 100644 -index 0000000..684f8e2 ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_cs.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="cs_CZ"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_de.ts b/translations/qt5-ukui-platformtheme_de.ts -new file mode 100644 -index 0000000..4a62991 ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_de.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="de"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation>Schließen</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>Die ausführbare Datei '%1' erfordert Qt %2, Qt %3 gefunden.</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>Fehler in der inkompatiblen Qt-Bibliothek</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation>OKAY</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation>Details anzeigen...</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation>Details ausblenden...</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>Dateiname</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>Änderungsdatum</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>Dateityp</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>Dateigröße</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>Ursprünglicher Pfad</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>Absteigend</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>Aufsteigend</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>Globale Sortierung verwenden</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>Listenansicht</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>Icon-Ansicht</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation>Schließen</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>Standard-Folie</translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>Lassen Sie das Tab-Widget mit einer Folienanimation wechseln.</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation>Offene Linie</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation>Datei speichern</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation>Alle Dateien (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>Zurück</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>Vorwärts gehen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>Cd nach oben</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>Suchen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>Typ der Ansicht</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>Art der Sortierung</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>Maximieren</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>Schließen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>Wiederherstellen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>Name</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>Offen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>Abbrechen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>Speichern unter</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>Neuer Ordner</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>Retten</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>Verzeichnisse</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>Warnung</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>existieren, sind Sie sicher, ersetzen?</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>Neuer Ordner</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>Aufmachen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>Noch einmal machen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>warnen</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>Dieser Vorgang wird nicht unterstützt.</translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_en_US.ts b/translations/qt5-ukui-platformtheme_en_US.ts -new file mode 100644 -index 0000000..fa44355 ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_en_US.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="en_US"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation>Close</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>Executable '%1' requires Qt %2, found Qt %3.</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>Incompatible Qt Library Error</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation>OK</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation>Show Details...</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation>Hide Details...</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>File Name</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>Modified Date</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>File Type</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>File Size</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>Original Path</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>Descending</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>Ascending</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>Use global sorting</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>List View</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>Icon View</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation>Close</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation>Open File</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation>Save File</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation>All Files (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>Go Back</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>Go Forward</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>Cd Up</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>Search</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>View Type</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>Sort Type</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>Maximize</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>Close</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>Restore</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>Name</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>Open</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>Cancel</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>Save as</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>New Folder</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>Save</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>Directories</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>Warning</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>exist, are you sure replace?</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>NewFolder</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>Undo</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>Redo</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>warn</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>This operation is not supported.</translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_es.ts b/translations/qt5-ukui-platformtheme_es.ts -new file mode 100644 -index 0000000..33a8685 ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_es.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="es"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_fa.ts b/translations/qt5-ukui-platformtheme_fa.ts -new file mode 100644 -index 0000000..805beb6 ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_fa.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="fa_IR"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_fr.ts b/translations/qt5-ukui-platformtheme_fr.ts -new file mode 100644 -index 0000000..a6e4031 ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_fr.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="fr_FR"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation>Fermer</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>L’exécutable '%1' nécessite Qt %2, trouvé Qt %3.</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>Erreur de bibliothèque Qt incompatible</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation>D’ACCORD</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation>Afficher les détails...</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation>Masquer les détails...</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>Nom du fichier</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>Date de modification</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>Type de fichier</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>Taille du fichier</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>Chemin d’accès d’origine</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>Descendant</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>Ascendant</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>Utiliser le tri global</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>Affichage en liste</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>Affichage de l’icône</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished">Fermer</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>Diapositive par défaut</translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>Laissez le widget d’onglet basculer avec une animation de diapositive.</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation>Ouvrir un fichier</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation>Enregistrer le fichier</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation>Tous les fichiers (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>Retour</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>Avancer</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>Cd Up</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>Rechercher</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>Type de vue</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>Type de tri</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>Maximiser</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>Fermer</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>Restaurer</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>Nom</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>Ouvrir</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>Annuler</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>Enregistrer sous</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>Nouveau dossier</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>Sauvegarder</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>Téléphonique</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>Avertissement</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>exister, êtes-vous sûr de remplacer ?</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>NouveauDossier</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>Défaire</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>Refaire</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>avertir</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>Cette opération n’est pas prise en charge.</translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_kk.ts b/translations/qt5-ukui-platformtheme_kk.ts -new file mode 100644 -index 0000000..7aea298 ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_kk.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="kk_KZ"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation>Жабу</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>Орындалатын '% 1' Qt% 2 дегенді қажет етеді, табылған Qt% 3.</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>Үйлеспейтін Qt кітапхана қатесі</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation>ЖАҚСЫ</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation>Егжей-тегжейін көрсету...</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation>Мәліметтерді жасыру...</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>Файл атауы</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>Өзгертілген күн</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>Файл түрі</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>Файл өлшемі</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>Бастапқы жол</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>Кему</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>Көтерілу</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>Ғаламдық сұрыптауды пайдалану</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>Тізім көрінісі</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>Белгіше көрінісі</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished">Жабу</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>Әдетті слайд</translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>Слайд анимациясы бар tab widget ауыстырып қосқышына рұқсат етіңіз.</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation>Файлды ашу</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation>Файлды сақтау</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation>Барлық файлдар (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>Қайтып бар</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>Алға жылжу</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>Cd Up</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>Іздеу</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>Көрініс түрі</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>Сұрыптау түрі</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>Барынша көбейту</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>Жабу</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>Қалпына келтіру</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>Атауы</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>Ашу</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>Болдырмау</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>Басқаша сақтау</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>Жаңа қапшық</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>Сақтау</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>Каталогтар</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>Ескерту</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>бар, сіз алмастырасыз ба?</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>NewFolder</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>Болдырмау</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>Редо</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>Ескерту</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>Бұл операцияға қолдау көрсетілмеген.</translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_ky.ts b/translations/qt5-ukui-platformtheme_ky.ts -new file mode 100644 -index 0000000..1c2f91e ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_ky.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="ky_KG"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation>Жабуу</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>Аткарыла турган '%1' Qt %2 талап кылынат, Qt %3 табылган.</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>Qt китепканасынын шайкеш келбеген катасы</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation>МАКУЛ</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation>Егжей-тегжейин</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation>Маалымат жашыруу...</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>Файлдын аты</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>Өзгөртүлгөн дата</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>Файл түрү</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>Файл өлчөмү</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>Оригиналдуу жол</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>Түшүп</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>Көтөрүлүш</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>Глобалдык сорттоону колдонуу</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>Тизменин көрүнүшү</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>Икона көрүнүшү</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished">Жабуу</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>Дефолт слайды</translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>Таблица виджет слайд анимациясы менен которуп берсин.</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation>Файлды ачуу</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation>Файлды сактоо</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation>Бардык файлдар (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>Артка кайрыл</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>Алга илгерилетүү</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>Cd Up</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>Издөө</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>Көрүү түрү</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>Түрүн сорттоо</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>Максималдуу</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>Жабуу</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>Калыбына келтирүү</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>Аты-жөнү</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>Ачуу</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>Жокко чыгаруу</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>Үнөмдөө</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>Жаңы папка</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>Сактоо</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>Каталогдор</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>Эскертүү</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>бар, сиз сөзсүз алмаштырып жатасызбы?</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>Жаңы папкалар</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>Ундо</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>Редо</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>эскертүү</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>Бул операция колдолбойт.</translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_mn.ts b/translations/qt5-ukui-platformtheme_mn.ts -new file mode 100644 -index 0000000..2e06321 ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_mn.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="mn_MN"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation>ᠬᠠᠭᠠᠬᠤ</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>ᠭᠦᠢᠴᠡᠳᠬᠡᠵᠦ ᠪᠣᠯᠬᠤ ᠹᠠᠢᠯ '%1' Qt% 2 ᠬᠡᠷᠡᠭᠰᠡᠵᠦ ᠂ Qt% 3 ᠢ᠋/ ᠵᠢ ᠡᠷᠢᠵᠦ ᠣᠯᠬᠤ ᠬᠡᠷᠡᠭᠲᠡᠶ .</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation>OK</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡᠢᠳᠦᠯ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>ᠵᠠᠰᠠᠭᠰᠠᠨ ᠡᠳᠦᠷ ᠰᠠᠷᠠ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠶᠡᠬᠡ ᠪᠠᠭᠠ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>ᠤᠭ ᠤ᠋ᠨ ᠵᠠᠮ ᠱᠤᠭᠤᠮ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>ᠪᠠᠭᠠᠰᠬᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>ᠶᠡᠬᠡᠰᠬᠡᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>ᠪᠦᠬᠦ ᠪᠠᠢᠳᠠᠯ ᠤ᠋ᠨ ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠢ᠋ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>ᠵᠢᠭᠰᠠᠭᠠᠯᠳᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>ᠰᠢᠪᠠᠭᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation>ᠬᠠᠭᠠᠬᠤ</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>Default Slide</translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation>ᠪᠦᠬᠦᠢᠯᠡ (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>ᠤᠬᠤᠷᠢᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>ᠤᠷᠤᠭᠰᠢᠯᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>ᠳᠡᠭᠡᠭᠰᠢ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>ᠬᠠᠢᠯᠳᠠ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>ᠬᠠᠮᠤᠭ ᠤ᠋ᠨ ᠶᠡᠬᠡᠴᠢᠯᠡᠯ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>ᠬᠠᠭᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>ᠡᠬᠡᠬᠦᠯᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>ᠦᠬᠡᠢᠰᠭᠡᠬᠦ᠌</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>ᠦᠭᠡᠷᠡ ᠭᠠᠵᠠᠷ ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>ᠭᠠᠷᠴᠠᠭ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠦᠯ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>ᠪᠠᠢᠨᠠ᠂ ᠰᠤᠯᠢᠬᠤ ᠤᠤ?</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>ᠬᠦᠴᠦᠨ ᠦᠬᠡᠢ ᠪᠤᠯᠭᠠᠬᠤ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>ᠳᠠᠬᠢᠵᠤ ᠬᠢᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠬᠦ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>ᠳᠤᠰ ᠠᠵᠢᠯᠯᠠᠬᠤᠢ ᠵᠢ ᠳᠡᠮᠵᠢᠬᠦ ᠦᠬᠡᠢ.</translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_tr.ts b/translations/qt5-ukui-platformtheme_tr.ts -new file mode 100644 -index 0000000..0de1d37 ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_tr.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="tr_TR"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_ug.ts b/translations/qt5-ukui-platformtheme_ug.ts -new file mode 100644 -index 0000000..d4bb0e8 ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_ug.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="ug_CN"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation>ياپ</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>ئىجرا قىلىشقا بولىدىغان '٪1' Qt ٪2 نى تەلەپ قىلىدۇ، تېپىلغان Qt ٪3.</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>بىردەك بولمىغان QT ئامبىرى خاتالىقى</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation>ماقۇل</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation>تەپسىلاتىنى كۆرسەت...</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation>تەپسىلاتىنى يوشۇرۇش...</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>ھۆججەت نامى</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>ئۆزگەرتىلگەن ۋاقتى</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>ھۆججەت تۈرى</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>ھۆججەت چوڭلۇقى</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>ئەسلى يول</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>پەسكە چۈشمەكتە</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>ئۆرلەش</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>يەر شارىنى تۈرگە ئايرىشنى ئىشلىتىش</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>تىزىملىك كۆرۈش</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>ئايكون كۆرۈش</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished">ياپ</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>كۆڭۈلدىكى سىيرىلما</translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>سىيرىلما كارتون ئارقىلىق تاختا ۋىكىپات ئالماشتۇرسۇن.</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation type="unfinished">ھۆججەتنى ئېچىش</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation type="unfinished">ھۆججەت ساقلاش</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished">بارلىق ھۆججەتلەر (*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished">قايت</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished">ئالدىغا ماڭ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished">Cd Up</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished">ئىزدە</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished">كۆرۈش تىپى</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished">تۈر تۈرى</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished">ئەڭ چوڭ چەككە</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished">ياپ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished">ئەسلىگە كەلتۈرۈش</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished">ئىسىم-فامىلىسى</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished">ئېچىش</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished">ئەمەلدىن قالدۇرۇش</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished">تېجەش</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished">يېڭى ھۆججەت قىسقۇچ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished">ساقلاش</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished">مۇندەرىجىلەر</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished">دىققەت</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished">مەۋجۇت، سىز راستىنلا ئالماشتۇرۇۋاتامسىز؟</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation type="unfinished">يېڭى قاتلىغۇچ</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation type="unfinished">Undo</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation type="unfinished">قايتا-قايتا</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation type="unfinished">ئاگاھلاندۇرۇش</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished">بۇ مەشغۇلات قوللىمايدۇ.</translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_zh_CN.ts b/translations/qt5-ukui-platformtheme_zh_CN.ts -new file mode 100644 -index 0000000..0b97948 ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_zh_CN.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="zh_CN"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation>关闭</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>可执行文件“%1”需要数量%2,找到数量%3。</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>不兼容的Qt库错误</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation>确认</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation>显示细节……</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation>隐藏细节……</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>文件名称</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>修改日期</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>文件类型</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>文件大小</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>原始路径</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>降序</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>升序</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>使用全局排序</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>列表视图</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>图标视图</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation>关闭</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>默认slide</translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>让选项卡小部件切换为幻灯片动画。</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation>打开</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation>保存</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation>所有(*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>后退</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>前进</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>向上</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>搜索</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>视图类型</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>排序类型</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>最大化</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>关闭</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>还原</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>文件名</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>打开</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>取消</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>另存为</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>新建文件夹</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>保存</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>目录</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>警告</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>已存在,是否替换?</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation>新建文件夹</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation>撤销</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation>重做</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation>警告</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation>不支持此操作。</translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_zh_HK.ts b/translations/qt5-ukui-platformtheme_zh_HK.ts -new file mode 100644 -index 0000000..dc01181 ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_zh_HK.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="zh_HK"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation>關閉</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>可執行檔「%1」 需要數量%2,找到數量%3。</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>不相容的Qt庫錯誤</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation>確認</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation>顯示細節......</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation>隱藏細節......</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>檔名稱</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>修改日期</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>檔案類型</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>檔大小</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>原始路徑</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>降序</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>升序</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>使用全域排序</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>清單檢視</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>圖示檢視</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished">關閉</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>默認slide</translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>讓選項卡小部件切換為幻燈片動畫。</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation type="unfinished">打開</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation type="unfinished">保存</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished">所有(*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished">後退</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished">前進</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished">向上</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished">搜索</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished">視圖類型</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished">排序類型</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished">最大化</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished">關閉</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished">還原</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished">檔名</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished">打開</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished">取消</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished">另存為</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished">新建資料夾</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished">保存</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished">目錄</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished">警告</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished">已存在,是否替換?</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation type="unfinished">新建資料夾</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation type="unfinished">撤銷</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation type="unfinished">重做</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation type="unfinished">警告</translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished">不支援此操作。</translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_zh_Hans.ts b/translations/qt5-ukui-platformtheme_zh_Hans.ts -new file mode 100644 -index 0000000..7380cc3 ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_zh_Hans.ts -@@ -0,0 +1,258 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="zh_Hans"> -+<context> -+ <name>KyFileDialogHelper</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2524"/> -+ <source>Open File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2525"/> -+ <source>Save File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2538"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>KyNativeFileDialog</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="192"/> -+ <source>Go Back</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="199"/> -+ <source>Go Forward</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="205"/> -+ <source>Cd Up</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="212"/> -+ <source>Search</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="220"/> -+ <source>View Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="231"/> -+ <source>Sort Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="348"/> -+ <source>Maximize</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="250"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="345"/> -+ <source>Restore</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="941"/> -+ <source>Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="944"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1532"/> -+ <source>Open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="945"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="954"/> -+ <source>Cancel</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="949"/> -+ <source>Save as</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -+ <source>New Folder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="953"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1536"/> -+ <source>Save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="989"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="992"/> -+ <source>Directories</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -+ <source>Warning</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1858"/> -+ <source>NewFolder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2146"/> -+ <source>Undo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2153"/> -+ <source>Redo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -+ <source>warn</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="166"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="190"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="192"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="423"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1106"/> -+ <source>OK</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="479"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="897"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <source>Show Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="897"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -+ <source>Hide Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="19"/> -+ <source>File Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="23"/> -+ <source>Modified Date</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="27"/> -+ <source>File Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="31"/> -+ <source>File Size</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="35"/> -+ <source>Original Path</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="44"/> -+ <source>Descending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="49"/> -+ <source>Ascending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="55"/> -+ <source>Use global sorting</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="75"/> -+ <source>List View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="76"/> -+ <source>Icon View</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_zh_Hant.ts b/translations/qt5-ukui-platformtheme_zh_Hant.ts -new file mode 100644 -index 0000000..39df820 ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_zh_Hant.ts -@@ -0,0 +1,386 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="zh"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../../test/system-settings/mainwindow.ui" line="14"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="30"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="37"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="47"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="54"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="64"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="71"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/filedialog/mainwindow.ui" line="78"/> -+ <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> -+ <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="21"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="31"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="41"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../test/system-settings/mainwindow.ui" line="55"/> -+ <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation>關閉</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation>可執行檔「%1」 需要數量%2,找到數量%3。</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation>不相容的Qt庫錯誤</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation>確認</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation>顯示細節......</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation>隱藏細節......</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation>檔名稱</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation>修改日期</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation>檔案類型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation>檔大小</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation>原始路徑</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation>降序</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation>升序</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation>使用全域排序</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation>清單檢視</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation>圖示檢視</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished">關閉</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation>默認slide</translation> -+ </message> -+ <message> -+ <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation>讓選項卡小部件切換為幻燈片動畫。</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> -+ <source>Open File</source> -+ <translation>打開</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> -+ <source>Save File</source> -+ <translation>保存</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> -+ <source>All Files (*)</source> -+ <translation>所有(*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation>後退</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation>前進</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation>向上</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation>搜索</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation>視圖類型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation>排序類型</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation>最大化</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation>關閉</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation>還原</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation>檔名</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation>打開</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation>取消</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation>另存為</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation>新建資料夾</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation>保存</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation>目錄</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation>警告</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation>已存在,是否替換?</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> -+ <source>NewFolder</source> -+ <translation>新建資料夾</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> -+ <source>Undo</source> -+ <translation>撤銷</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> -+ <source>Redo</source> -+ <translation>重做</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>warn</source> -+ <translation>警告</translation> -+ </message> -+ <message> -+ <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> -+ <source>This operation is not supported.</source> -+ <translation>不支援此操作。</translation> -+ </message> -+</context> -+</TS> -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json b/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -index 7cd112b..9ced231 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -@@ -365,14 +365,14 @@ - "GrooveInactiveBrush" : {"value": "Button_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -- "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentScrollBar": { - "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Button_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -- "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - } - }, - "ToolTip":{ -@@ -740,14 +740,14 @@ - "GrooveInactiveBrush" : {"value": "Button_dis", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "SliderHoverBrush" : { "type": "color"}, -- "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentScrollBar": { - "GrooveDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Button_dis", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "SliderHoverBrush" : { "type": "color"}, -- "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - } - }, - "ToolTip":{ -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/default.json b/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -index b55d577..d039d37 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -@@ -379,15 +379,15 @@ - "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "SliderHoverBrush" : { "type": "color"}, -- "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentScrollBar": { - "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.06", "type": "color"}, - "GrooveInactiveBrush" : {"value": "0, 0, 0, 0.06", "type": "color"}, -- "SliderDefaultBrush" : {"value": "0, 0, 0 , 0.10", "type": "color"}, -+ "SliderDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, - "SliderHoverBrush" : {"value": "0, 0, 0, 0.18", "type": "color"}, - "SliderClickBrush" : {"value": "0, 0, 0, 0.28", "type": "color"}, -- "SliderDisableBrush" : {"value": "0, 0, 0, 0.10", "type": "color"} -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - } - }, - "ToolTip":{ -@@ -785,7 +785,7 @@ - "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "SliderHoverBrush" : { "type": "color"}, -- "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentScrollBar": { - "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, -@@ -793,7 +793,7 @@ - "SliderDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "SliderHoverBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, - "SliderClickBrush" : {"value": "255, 255, 255, 0.30", "type": "color"}, -- "SliderDisableBrush" : {"value": "255, 255, 255, 0.10", "type": "color"} -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - } - }, - "ToolTip":{ -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json b/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -index 63645c6..af5c0b2 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -@@ -372,7 +372,7 @@ - "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "SliderHoverBrush" : { "type": "gradient"}, -- "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentScrollBar": { - "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, -@@ -380,7 +380,7 @@ - "SliderDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, - "SliderHoverBrush" : {"value": "0, 0, 0, 0.20", "type": "color"}, - "SliderClickBrush" : {"value": "0, 0, 0, 0.30", "type": "color"}, -- "SliderDisableBrush" : {"value": "0, 0, 0, 0.10", "type": "color"} -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - } - }, - "ToolTip":{ -@@ -779,7 +779,7 @@ - "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "SliderHoverBrush" : { "type": "gradient"}, -- "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentScrollBar": { - "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -@@ -787,7 +787,7 @@ - "SliderDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "SliderHoverBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, - "SliderClickBrush" : {"value": "255, 255, 255, 0.30", "type": "color"}, -- "SliderDisableBrush" : {"value": "255, 255, 255, 0.10", "type": "color"} -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - } - }, - "ToolTip":{ -@@ -808,7 +808,7 @@ - }, - "Menu":{ - "DefaultMenu" :{ -- "MenuBackgroundBrush" : {"value": "Window_dis", "type": "paletterole"}, -+ "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "MenuBackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -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 702489f..cb73571 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -111,6 +111,8 @@ - - using namespace UKUIConfigStyleSpace; - -+const char* GESTURE_LIB = "libqt5-gesture-extensions.so.1"; -+ - #define DBUS_STATUS_MANAGER_IF "com.kylin.statusmanager.interface" - - #define COMMERCIAL_VERSION true -@@ -924,11 +926,15 @@ void UKUIConfigStyle::setSliderHandleRec(QRect rect) const - - void UKUIConfigStyle::polish(QWidget *widget) - { -- QLibrary gestureLib("libqt5-gesture-extensions"); -+ QLibrary gestureLib(GESTURE_LIB); - if (widget && gestureLib.load()) { - typedef void (*RegisterFun) (QWidget*, QObject*); - auto fun = (RegisterFun) gestureLib.resolve("registerWidget"); -- fun(widget, widget); -+ if (fun) { -+ fun(widget, widget); -+ } else { -+ qWarning() << "Can't resolve registerWidget from" << GESTURE_LIB << gestureLib.errorString(); -+ } - } - - if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget->inherits("QMenu"))) { -@@ -1180,11 +1186,15 @@ void UKUIConfigStyle::polish(QWidget *widget) - - void UKUIConfigStyle::unpolish(QWidget *widget) - { -- QLibrary gestureLib("libqt5-gesture-extensions"); -+ QLibrary gestureLib(GESTURE_LIB); - if (widget && gestureLib.load()) { - typedef void (*UnRegisterFun) (QWidget*, QObject*); - auto fun = (UnRegisterFun) gestureLib.resolve("unregisterWidget"); -- fun(widget, widget); -+ if (fun) { -+ fun(widget, widget); -+ } else { -+ qWarning() << "Can't resolve unregisterWidget from" << GESTURE_LIB << gestureLib.errorString(); -+ } - } - if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget->inherits("QMenu"))) { - if (widget->testAttribute(Qt::WA_TranslucentBackground) && widget->isTopLevel()) { diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0014-Update-changelog-4.1.0.0-0k15.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0014-Update-changelog-4.1.0.0-0k15.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0014-Update-changelog-4.1.0.0-0k15.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0014-Update-changelog-4.1.0.0-0k15.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,618 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Wed, 29 Nov 2023 14:30:24 +0800 -Subject: Update changelog 4.1.0.0-0k15 - ---- - libqt5-ukui-style/libqt5-ukui-style.pro | 6 +- - libqt5-ukui-style/settings/org.ukui.style.yaml | 94 +++++++++ - libqt5-ukui-style/settings/settings.pri | 4 +- - .../settings/ukui-style-conf-settings.cpp | 231 +++++++++++++++++++++ - .../settings/ukui-style-conf-settings.h | 87 ++++++++ - libqt5-ukui-style/settings/ukui-style-settings.h | 3 + - qt5-ukui-filedialog/qt5-ukui-filedialog.pro | 2 +- - qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro | 2 +- - .../mps-style-application.pro | 2 +- - .../ukui-config-style-parameters.cpp | 2 +- - .../qt5-config-style-ukui/ukui-config-style.cpp | 1 - - ukui-styles/readconfig.cpp | 3 +- - ukui-styles/readconfig.h | 2 +- - ukui-styles/ukui-styles.pro | 2 +- - 14 files changed, 431 insertions(+), 10 deletions(-) - create mode 100644 libqt5-ukui-style/settings/org.ukui.style.yaml - create mode 100644 libqt5-ukui-style/settings/ukui-style-conf-settings.cpp - create mode 100644 libqt5-ukui-style/settings/ukui-style-conf-settings.h - -diff --git a/libqt5-ukui-style/libqt5-ukui-style.pro b/libqt5-ukui-style/libqt5-ukui-style.pro -index 07454e0..1d7a950 100644 ---- a/libqt5-ukui-style/libqt5-ukui-style.pro -+++ b/libqt5-ukui-style/libqt5-ukui-style.pro -@@ -27,7 +27,7 @@ DEFINES += QT_MESSAGELOGCONTEXT - include(libqt5-ukui-style.pri) - - CONFIG += c++11 link_pkgconfig --PKGCONFIG += gsettings-qt -+PKGCONFIG += gsettings-qt gio-2.0 kysdk-conf2 - - DISTFILES += \ - org.ukui.style.gschema.xml -@@ -40,6 +40,10 @@ unix { - gschema.files += $$PWD/settings/org.ukui.style.gschema.xml - INSTALLS += gschema - -+ kconf2.path = /etc/kylin-config/basic/ -+ kconf2.files += $$PWD/settings/org.ukui.style.yaml -+ INSTALLS += kconf2 -+ - pkgconfig.path = $$[QT_INSTALL_LIBS]/pkgconfig - pkgconfig.files += development-files/qt5-ukui.pc - INSTALLS += pkgconfig -diff --git a/libqt5-ukui-style/settings/org.ukui.style.yaml b/libqt5-ukui-style/settings/org.ukui.style.yaml -new file mode 100644 -index 0000000..68b62ca ---- /dev/null -+++ b/libqt5-ukui-style/settings/org.ukui.style.yaml -@@ -0,0 +1,94 @@ -+style: -+ 4.3.1.2: -+ keys: -+ blur-exception-classes: -+ _type: s -+ default: '[]' -+ description: 'Example: [QWidget, QWidget1, QWidget2]' -+ summary: a list of QWidget based classes do not blur. -+ cursor-blink: -+ _type: b -+ default: 'true' -+ description: Globally enable or disable blinking text cursor. -+ summary: Blink text cursor. -+ cursor-blink-time: -+ _type: i -+ default: '1200' -+ description: The interval of text cursor blink. -+ summary: Blink text cursor interval. -+ custom-highlight-color: -+ _type: s -+ default: '#3D6BE5' -+ description: Set custom highlight color for UKUI desktop environment.Now is -+ to compatible with third party application -+ summary: Custom highlight color -+ enabled-global-blur: -+ _type: b -+ default: 'true' -+ description: "Globally enable or disable the window blur effects for transparent\ -+ \ window.\n Setting it to \"false\" will disable the effects." -+ summary: Enable Window Blur Effects. -+ icon-theme-name: -+ _type: s -+ default: ukui-icon-theme-default -+ description: Icon Theme for Qt Applications.Have ukui ukui-classical ukui-fashion -+ summary: Icon Theme for Qt Applications. -+ menu-transparency: -+ _type: i -+ default: '72' -+ description: The default transparency of menu. -+ summary: Menu's transparency. -+ peony-side-bar-transparency: -+ _type: i -+ default: '72' -+ description: The default transparency of the peony side bar. -+ summary: Peony::SideBar's transparency. -+ style-name: -+ _type: s -+ default: ukui-light -+ description: Set style for UKUI desktop environment. Have ukui-dark ukui-default -+ ukui-light -+ summary: Current Qt Style -+ system-font: -+ _type: s -+ default: Noto Sans CJK SC -+ description: System Font for Qt Applications. -+ summary: System Font for Qt Applications. -+ system-font-size: -+ _type: s -+ default: '11' -+ description: System Font Size for Qt Applications. Use point size. -+ summary: System Font Size for Qt Applications. -+ system-palette: -+ _type: s -+ default: '' -+ description: Set default system palette for UKUI desktop environment. -+ summary: System Palette -+ theme-color: -+ _type: s -+ default: '#3790FA' -+ description: "Set theme color for UKUI desktop environment.include default,daybreakBlue,jamPurple,magenta,sunRed,sunsetOrange,dustGold,polarGreen,\n\ -+ \ and using rgba for example \"(125,125,125) or #3790FA" -+ summary: theme color -+ use-custom-highlight-color: -+ _type: b -+ default: 'false' -+ description: Globally enable or disable custom highlight color.Now is to compatible -+ with third party application -+ summary: Use custom highlight color. -+ use-system-palette: -+ _type: b -+ default: 'false' -+ description: Globally enable or disable system palette provided by ukui platform. -+ summary: Use system palette. -+ widget-theme-name: -+ _type: s -+ default: default -+ description: Set system theme. Have default,classical and fashion -+ summary: Current widget theme name -+ window-radius: -+ _type: i -+ default: '12' -+ description: Set the rounded corner size of the window -+ range: 0,12 -+ summary: Window Radius -diff --git a/libqt5-ukui-style/settings/settings.pri b/libqt5-ukui-style/settings/settings.pri -index 9a83014..736a6f3 100644 ---- a/libqt5-ukui-style/settings/settings.pri -+++ b/libqt5-ukui-style/settings/settings.pri -@@ -1,10 +1,12 @@ - HEADERS += $$PWD/libqt5-ukui-style_global.h \ -+ $$PWD/ukui-style-conf-settings.h \ - $$PWD/ukui-style-settings.h \ - $$PWD/black-list.h \ - $$PWD/application-style-settings.h - - SOURCES += $$PWD/ukui-style-settings.cpp \ -- $$PWD/application-style-settings.cpp -+ $$PWD/application-style-settings.cpp \ -+ $$PWD/ukui-style-conf-settings.cpp - - INCLUDEPATH += $$PWD/.. - INCLUDEPATH += $$PWD -diff --git a/libqt5-ukui-style/settings/ukui-style-conf-settings.cpp b/libqt5-ukui-style/settings/ukui-style-conf-settings.cpp -new file mode 100644 -index 0000000..a125e9b ---- /dev/null -+++ b/libqt5-ukui-style/settings/ukui-style-conf-settings.cpp -@@ -0,0 +1,231 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: xibowen <xibowen@kylinos.cn> -+ * -+ */ -+ -+#include "ukui-style-conf-settings.h" -+#include "libkysettings.h" -+#include <glib.h> -+#include <QDebug> -+ -+//char to QString -+QString qtify_name(const char *name) -+{ -+ bool next_cap = false; -+ QString result; -+ -+ while (*name) { -+ if (*name == '-') { -+ next_cap = true; -+ } else if (next_cap) { -+ result.append(QChar(*name).toUpper().toLatin1()); -+ next_cap = false; -+ } else { -+ result.append(*name); -+ } -+ -+ name++; -+ } -+ -+ return result; -+} -+ -+//QString to char -+char * unqtify_name(const QString &name) -+{ -+ const char *p; -+ QByteArray bytes; -+ GString *str; -+ -+ bytes = name.toUtf8(); -+ str = g_string_new (NULL); -+ -+ for (p = bytes.constData(); *p; p++) { -+ const QChar c(*p); -+ if (c.isUpper()) { -+ g_string_append_c (str, '-'); -+ g_string_append_c (str, c.toLower().toLatin1()); -+ } -+ else { -+ g_string_append_c (str, *p); -+ } -+ } -+ -+ return g_string_free(str, FALSE); -+} -+ -+ -+static void settingChanged(KSettings *ukuistyle_settings, const char *key, void *user_data) -+{ -+ ukuiStyleConfSettings *self = (ukuiStyleConfSettings *)user_data; -+ -+ QMetaObject::invokeMethod(self, "changed", Qt::QueuedConnection, Q_ARG(QString, qtify_name(key))); -+} -+ -+ukuiStyleConfSettings::ukuiStyleConfSettings(const QByteArray &schema_id) -+{ -+ if (!ukuistyle_settings) -+ ukuistyle_settings = kdk_conf2_new(schema_id, NULL); -+ -+ signal_handler_id = kdk_conf2_connect_signal(ukuistyle_settings, "changed", -+ (KCallBack)settingChanged, this); -+} -+ -+ukuiStyleConfSettings::~ukuiStyleConfSettings() -+{ -+ if (ukuistyle_settings) { -+ kdk_conf2_ksettings_destroy(ukuistyle_settings); -+ ukuistyle_settings = NULL; -+ } -+} -+ -+QVariant ukuiStyleConfSettings::types_to_qvariant(const char *key,const char* value) const -+{ -+ char *type = kdk_conf2_get_type(this->ukuistyle_settings, key); -+ switch (*type) { -+ case VARIANT_CLASS_BOOLEAN: -+ return QVariant(value); -+ -+ case VARIANT_CLASS_BYTE: -+ return QVariant(QString(value)); -+ -+ case VARIANT_CLASS_INT16: -+ return QVariant(QString(value).toShort()); -+ -+ case VARIANT_CLASS_UINT16: -+ return QVariant(QString(value).toUShort()); -+ -+ case VARIANT_CLASS_INT32: -+ return QVariant(QString(value).toInt()); -+ -+ case VARIANT_CLASS_UINT32: -+ return QVariant(QString(value).toUInt()); -+ -+ case VARIANT_CLASS_INT64: -+ return QVariant(QString(value).toLongLong()); -+ -+ case VARIANT_CLASS_UINT64: -+ return QVariant(QString(value).toULongLong()); -+ -+ case VARIANT_CLASS_DOUBLE: -+ return QVariant(QString(value).toDouble()); -+ -+ case VARIANT_CLASS_STRING: -+ return QVariant(QString(value)); -+ -+ case VARIANT_CLASS_ARRAY: -+// if (g_variant_is_of_type(value, G_VARIANT_TYPE_STRING_ARRAY)) { -+// GVariantIter iter; -+// QStringList list; -+// const gchar *str; -+ -+// g_variant_iter_init (&iter, value); -+// while (g_variant_iter_next (&iter, "&s", &str)) -+// list.append (str); -+ -+// return QVariant(list); -+// } else if (g_variant_is_of_type(value, G_VARIANT_TYPE_BYTESTRING)) { -+// return QVariant(QByteArray(g_variant_get_bytestring(value))); -+// } else if (g_variant_is_of_type(value, G_VARIANT_TYPE("a{ss}"))) { -+// GVariantIter iter; -+// QMap<QString, QVariant> map; -+// const gchar *key; -+// const gchar *val; -+ -+// g_variant_iter_init (&iter, value); -+// while (g_variant_iter_next (&iter, "{&s&s}", &key, &val)) -+// map.insert(key, QVariant(val)); -+ -+// return map; -+// } -+ -+ // fall through -+ default: -+ g_assert_not_reached(); -+ } -+} -+ -+QVariant ukuiStyleConfSettings::get(const QString &key) const -+{ -+ char *ckey = unqtify_name(key); -+ char *value = kdk_conf2_get_value(ukuistyle_settings, ckey); -+ -+ QVariant qvalue = types_to_qvariant(ckey, value); -+ -+ g_free(value); -+ g_free(ckey); -+ return qvalue; -+} -+ -+void ukuiStyleConfSettings::set(const QString &key, const QVariant &value) -+{ -+ if (!this->trySet(key, value)) -+ qWarning("unable to set key '%s' to value '%s'", key.toUtf8().constData(), value.toString().toUtf8().constData()); -+} -+ -+bool ukuiStyleConfSettings::trySet(const QString &key, const QVariant &value) -+{ -+ if (!ukuistyle_settings) -+ return false; -+ -+ char *ckey = unqtify_name(key); -+ char *cvalue = unqtify_name(value.value<QString>()); -+ bool success = false; -+ -+ success = kdk_conf2_set_value(ukuistyle_settings, ckey, cvalue); -+ g_free(ckey); -+ g_free(cvalue); -+ return success; -+} -+ -+QStringList ukuiStyleConfSettings::keys() const -+{ -+ QStringList list; -+ -+ char **keys = kdk_conf2_list_keys(ukuistyle_settings); -+ for (int i = 0; keys[i]; i++) -+ list.append(qtify_name(keys[i])); -+ -+ g_strfreev(keys); -+ -+ return list; -+} -+ -+void ukuiStyleConfSettings::reset(const QString &qkey) -+{ -+ if (!ukuistyle_settings) -+ return; -+ -+ char *key = unqtify_name(qkey); -+ kdk_conf2_reset(ukuistyle_settings, key); -+ g_free(key); -+} -+ -+bool ukuiStyleConfSettings::isSettingsAvailable(const QString &schema_id) -+{ -+ char *schema = unqtify_name(schema_id); -+ bool result = false; -+ if (kdk_conf2_new(schema, NULL)) { -+ result = true; -+ } -+ -+ g_free(schema); -+ return result; -+} -diff --git a/libqt5-ukui-style/settings/ukui-style-conf-settings.h b/libqt5-ukui-style/settings/ukui-style-conf-settings.h -new file mode 100644 -index 0000000..6a1db53 ---- /dev/null -+++ b/libqt5-ukui-style/settings/ukui-style-conf-settings.h -@@ -0,0 +1,87 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: xibowen <xibowen@kylinos.cn> -+ * -+ */ -+ -+#ifndef UKUISTYLECONFSETTINGS_H -+#define UKUISTYLECONFSETTINGS_H -+ -+ -+#include <QObject> -+#include <QVariant> -+ -+typedef struct _KSettings KSettings; -+ -+class ukuiStyleConfSettings : public QObject -+{ -+ Q_OBJECT -+public: -+ -+ enum VariantClass { -+ VARIANT_CLASS_BOOLEAN = 'b', -+ VARIANT_CLASS_BYTE = 'y', -+ VARIANT_CLASS_INT16 = 'n', -+ VARIANT_CLASS_UINT16 = 'q', -+ VARIANT_CLASS_INT32 = 'i', -+ VARIANT_CLASS_UINT32 = 'u', -+ VARIANT_CLASS_INT64 = 'x', -+ VARIANT_CLASS_UINT64 = 't', -+ VARIANT_CLASS_HANDLE = 'h', -+ VARIANT_CLASS_DOUBLE = 'd', -+ VARIANT_CLASS_STRING = 's', -+ VARIANT_CLASS_OBJECT_PATH = 'o', -+ VARIANT_CLASS_SIGNATURE = 'g', -+ VARIANT_CLASS_VARIANT = 'v', -+ VARIANT_CLASS_MAYBE = 'm', -+ VARIANT_CLASS_ARRAY = 'a', -+ VARIANT_CLASS_TUPLE = '(', -+ VARIANT_CLASS_DICT_ENTRY = '{' -+ }; -+ -+ -+ ukuiStyleConfSettings(const QByteArray &schema_id); -+ -+ ~ukuiStyleConfSettings(); -+ -+ QVariant types_to_qvariant(const char *key, const char *value) const; -+ -+ static ukuiStyleConfSettings *globalInstance(); -+ -+ QVariant get(const QString &key) const; -+ -+ void set(const QString &key, const QVariant &value); -+ -+ bool trySet(const QString &key, const QVariant &value); -+ -+ QStringList keys() const; -+ -+ void reset(const QString &key); -+ -+ static bool isSettingsAvailable(const QString &schema_id); -+ -+Q_SIGNALS: -+ void changed(const QString &key); -+ -+private: -+ KSettings *ukuistyle_settings = NULL; -+ long signal_handler_id; -+}; -+ -+#endif // UKUISTYLECONFSETTINGS_H -diff --git a/libqt5-ukui-style/settings/ukui-style-settings.h b/libqt5-ukui-style/settings/ukui-style-settings.h -index 861c855..a11f075 100644 ---- a/libqt5-ukui-style/settings/ukui-style-settings.h -+++ b/libqt5-ukui-style/settings/ukui-style-settings.h -@@ -26,6 +26,9 @@ - #include "libqt5-ukui-style_global.h" - #include <QGSettings> - -+//Fix me:after so -+//#include "ukui-style-conf-settings.h" -+ - /*! - * \brief The UKUIStyleSettings class - * \details -diff --git a/qt5-ukui-filedialog/qt5-ukui-filedialog.pro b/qt5-ukui-filedialog/qt5-ukui-filedialog.pro -index 65da40b..4ece318 100644 ---- a/qt5-ukui-filedialog/qt5-ukui-filedialog.pro -+++ b/qt5-ukui-filedialog/qt5-ukui-filedialog.pro -@@ -15,7 +15,7 @@ TARGET = qt5-ukui-filedialog - TEMPLATE = lib - CONFIG += plugin - CONFIG += c++11 link_pkgconfig lrelease --PKGCONFIG += gsettings-qt peony kysdk-waylandhelper -+PKGCONFIG += gsettings-qt peony kysdk-waylandhelper kysdk-conf2 - LIBS += -lX11 - - include(../libqt5-ukui-style/libqt5-ukui-style.pri) -diff --git a/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro b/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro -index c47c5cd..9e597ee 100644 ---- a/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro -+++ b/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro -@@ -15,7 +15,7 @@ TARGET = qt5-ukui-platformtheme - TEMPLATE = lib - CONFIG += plugin - CONFIG += c++11 link_pkgconfig lrelease --PKGCONFIG += gsettings-qt Qt5XdgIconLoader kysdk-waylandhelper fontconfig freetype2 gio-2.0 -+PKGCONFIG += gsettings-qt Qt5XdgIconLoader kysdk-waylandhelper fontconfig freetype2 gio-2.0 kysdk-conf2 - LIBS += -lX11 -lfontconfig -lfreetype - - include(../libqt5-ukui-style/libqt5-ukui-style.pri) -diff --git a/test/mps-style-application/mps-style-application.pro b/test/mps-style-application/mps-style-application.pro -index ccce17a..2eef99d 100644 ---- a/test/mps-style-application/mps-style-application.pro -+++ b/test/mps-style-application/mps-style-application.pro -@@ -23,7 +23,7 @@ DEFINES += QT_DEPRECATED_WARNINGS - #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - - CONFIG += plugin c++11 link_pkgconfig --PKGCONFIG += gsettings-qt -+PKGCONFIG += gsettings-qt gio-2.0 kysdk-conf2 - - include(../../libqt5-ukui-style/libqt5-ukui-style.pri) - -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index 3dad245..8288cd1 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -3969,7 +3969,7 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - int itemradius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - // QPixmap framePixmap(option->rect.size()); -- UKUIColorTheme::MenuColorCfg menuColorCfg = readCfg()->menuColorCfg(C_Menu_Default); -+ UKUIColorTheme::MenuColorCfg menuColorCfg = readCfg()->menuColorCfg(option->palette, C_Menu_Default); - - QPen menuBackgroundPen = QPen(menuColorCfg.menuBackgroundPen, (menuColorCfg.menuBackgroundPen.alpha() == 0 || - menuColorCfg.menuBackgroundPen == Qt::NoPen ) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -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 cb73571..3ac9ced 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -4013,7 +4013,6 @@ void UKUIConfigStyle::drawComplexControl(QStyle::ComplexControl control, const Q - painter->setPen(width <= 0 ? Qt::NoPen : sp->m_SpinBoxParameters.spinBoxUpClickPen); - painter->setBrush(sp->m_SpinBoxParameters.spinBoxUpClickBrush); - } else { -- qDebug() << "focus." << focus; - if (focus) { - upOption.state |= State_MouseOver; - int width = sp->m_SpinBoxParameters.spinBoxUpFocusHoverPen.width(); -diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp -index 0526356..31c3d8f 100644 ---- a/ukui-styles/readconfig.cpp -+++ b/ukui-styles/readconfig.cpp -@@ -1083,11 +1083,12 @@ UKUIColorTheme::TabWidgetColorCfg ReadThemeConfig::tabWidgetColorCfg(const QPale - return m_tabWidgetColorCfg; - } - --UKUIColorTheme::MenuColorCfg ReadThemeConfig::menuColorCfg(QString property) -+UKUIColorTheme::MenuColorCfg ReadThemeConfig::menuColorCfg(const QPalette palette, QString property) - { - if(!m_loadConfig) - return m_menuColorCfg; - -+ m_readConfig->widgetPalette(palette); - m_readConfig->getColorValue(m_menuColorCfg.menuBackgroundBrush, m_theme, UKUIMenu, property, C_Menu_MenuBackgroundBrush); - m_readConfig->getColorValue(m_menuColorCfg.menuBackgroundPen, m_theme, UKUIMenu, property, C_Menu_MenuBackgroundPen); - m_readConfig->getColorValue(m_menuColorCfg.menuItemSelectBrush, m_theme, UKUIMenu, property, C_Menu_MenuItemSelectBrush); -diff --git a/ukui-styles/readconfig.h b/ukui-styles/readconfig.h -index ded39fc..ba53cc3 100644 ---- a/ukui-styles/readconfig.h -+++ b/ukui-styles/readconfig.h -@@ -160,7 +160,7 @@ public: - - UKUIColorTheme::TabWidgetColorCfg tabWidgetColorCfg(const QPalette palette, QString property = C_TabWidget_Default); - -- UKUIColorTheme::MenuColorCfg menuColorCfg(QString property = C_Menu_Default); -+ UKUIColorTheme::MenuColorCfg menuColorCfg(const QPalette palette, QString property = C_Menu_Default); - - bool setRadius(QString key, int r); - -diff --git a/ukui-styles/ukui-styles.pro b/ukui-styles/ukui-styles.pro -index 2275336..b8a1a49 100644 ---- a/ukui-styles/ukui-styles.pro -+++ b/ukui-styles/ukui-styles.pro -@@ -9,7 +9,7 @@ QT += widgets widgets-private KWindowSystem gui gui-private x11extras dbus - TARGET = qt5-style-ukui - TEMPLATE = lib - CONFIG += plugin c++11 link_pkgconfig --PKGCONFIG += gsettings-qt -+PKGCONFIG += gsettings-qt gio-2.0 kysdk-conf2 - LIBS += -lxcb - - include(../libqt5-ukui-style/libqt5-ukui-style.pri) diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0015-Update-changelog-4.1.0.0-0k16.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0015-Update-changelog-4.1.0.0-0k16.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0015-Update-changelog-4.1.0.0-0k16.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0015-Update-changelog-4.1.0.0-0k16.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,42 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Fri, 1 Dec 2023 14:17:54 +0800 -Subject: Update changelog 4.1.0.0-0k16 - ---- - qt5-ukui-filedialog/qt5-ukui-filedialog.pro | 2 +- - ukui-styles/readconfig.cpp | 2 ++ - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/qt5-ukui-filedialog/qt5-ukui-filedialog.pro b/qt5-ukui-filedialog/qt5-ukui-filedialog.pro -index 4ece318..1aa3877 100644 ---- a/qt5-ukui-filedialog/qt5-ukui-filedialog.pro -+++ b/qt5-ukui-filedialog/qt5-ukui-filedialog.pro -@@ -86,7 +86,7 @@ unix { - } - - DISTFILES += \ -- ukui.json -+ filedialogplugin.json - - DEFINES += OPEN_ACTIONS_SEPARATOR='\\"open-actions-seperator\\"' - DEFINES += CREATE_ACTIONS_SEPARATOR='\\"create-actions-seperator\\"' -diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp -index 31c3d8f..108790d 100644 ---- a/ukui-styles/readconfig.cpp -+++ b/ukui-styles/readconfig.cpp -@@ -880,6 +880,7 @@ UKUIColorTheme::TableColorCfg ReadThemeConfig::tableColorCfg(const QPalette pale - if(!m_loadConfig) - return m_tableColorCfg; - -+ m_readConfig->widgetPalette(palette); - m_readConfig->getColorValue(m_tableColorCfg.defaultBrush ,m_theme, UKUITable, property, C_Table_DefaultBrush); - m_readConfig->getColorValue(m_tableColorCfg.selectBrush ,m_theme, UKUITable, property, C_Table_SelectBrush); - m_readConfig->getColorValue(m_tableColorCfg.disableBrush ,m_theme, UKUITable, property, C_Table_DisableBrush); -@@ -1029,6 +1030,7 @@ UKUIColorTheme::ToolTipColorCfg ReadThemeConfig::toolTipColorCfg(const QPalette - if(!m_loadConfig) - return m_toolTipColorCfg; - -+ m_readConfig->widgetPalette(palette); - m_readConfig->getColorValue(m_toolTipColorCfg.backgroundBrush, m_theme, UKUIToolTip, property, C_ToolTip_BackgroundBrush); - m_readConfig->getColorValue(m_toolTipColorCfg.backgroundPen, m_theme, UKUIToolTip, property, C_ToolTip_BackgroundPen); - return m_toolTipColorCfg; diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0016-Update-changelog-4.1.0.0-0k17.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0016-Update-changelog-4.1.0.0-0k17.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0016-Update-changelog-4.1.0.0-0k17.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0016-Update-changelog-4.1.0.0-0k17.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,16 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Fri, 1 Dec 2023 17:35:05 +0800 -Subject: Update changelog 4.1.0.0-0k17 - ---- - qt5-ukui-filedialog/filedialogplugin.json | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/qt5-ukui-filedialog/filedialogplugin.json b/qt5-ukui-filedialog/filedialogplugin.json -index e69de29..b0ae847 100644 ---- a/qt5-ukui-filedialog/filedialogplugin.json -+++ b/qt5-ukui-filedialog/filedialogplugin.json -@@ -0,0 +1,3 @@ -+{ -+ "Keys": [ "ukui" ] -+} diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0017-Update-changelog-4.1.0.0-0k18.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0017-Update-changelog-4.1.0.0-0k18.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0017-Update-changelog-4.1.0.0-0k18.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0017-Update-changelog-4.1.0.0-0k18.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,17 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Mon, 4 Dec 2023 15:25:51 +0800 -Subject: Update changelog 4.1.0.0-0k18 - ---- - qt5-ukui-filedialog/filedialogplugin.json | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/qt5-ukui-filedialog/filedialogplugin.json b/qt5-ukui-filedialog/filedialogplugin.json -index b0ae847..75acfe6 100644 ---- a/qt5-ukui-filedialog/filedialogplugin.json -+++ b/qt5-ukui-filedialog/filedialogplugin.json -@@ -1,3 +1,3 @@ - { -- "Keys": [ "ukui" ] -+ "Keys": [ "UKUIFiledialog" ] - } diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0018-Update-changelog-4.1.0.0-0k19.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0018-Update-changelog-4.1.0.0-0k19.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0018-Update-changelog-4.1.0.0-0k19.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0018-Update-changelog-4.1.0.0-0k19.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,40 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Tue, 5 Dec 2023 18:16:20 +0800 -Subject: Update changelog 4.1.0.0-0k19 - ---- - .../qt5-config-style-ukui/ukui-config-style-parameters.cpp | 8 ++++++++ - ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h | 1 + - 2 files changed, 9 insertions(+) - -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index 8288cd1..fc27405 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -111,6 +111,14 @@ UKUIConfigStyleParameters::UKUIConfigStyleParameters(QObject *parent, bool isDar - } - } - -+UKUIConfigStyleParameters::~UKUIConfigStyleParameters() -+{ -+ if(m_readCfg) -+ { -+ delete m_readCfg; -+ } -+} -+ - void UKUIConfigStyleParameters::initialDefaultPaletteColor(QString colorPath, bool isDark) - { - if (!QFile(colorPath).exists()) { -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -index e3ee64e..4fa3b67 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -@@ -52,6 +52,7 @@ class UKUIConfigStyleParameters: public QObject - Q_OBJECT - public: - UKUIConfigStyleParameters(QObject *parent, bool isDark, QString cfgName = ""); -+ ~UKUIConfigStyleParameters(); - - enum SpinBoxControlLayout { - Horizontal, diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0019-Update-changelog-4.1.0.0-0k20.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0019-Update-changelog-4.1.0.0-0k20.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0019-Update-changelog-4.1.0.0-0k20.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0019-Update-changelog-4.1.0.0-0k20.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,3963 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Mon, 11 Dec 2023 15:28:33 +0800 -Subject: Update changelog 4.1.0.0-0k20 - ---- - .gitignore | 1 + - CMakeLists.txt | 8 + - libqt5-ukui-style/CMakeLists.txt | 98 ++++ - .../ukui-scrollbar-default-interaction-animator.h | 2 +- - .../tabwidget/ukui-tabwidget-animator-iface.h | 2 +- - .../ukui-tabwidget-animator-plugin-iface.h | 2 +- - libqt5-ukui-style/libqt5-ukui-style.pri | 7 - - libqt5-ukui-style/libqt5-ukui-style.pro | 50 -- - qt5-ukui-filedialog/CMakeLists.txt | 242 ++++++++++ - qt5-ukui-filedialog/kyfiledialog.cpp | 4 +- - qt5-ukui-filedialog/kyfiledialog.h | 34 ++ - qt5-ukui-filedialog/kyfiledialogprivate.cpp | 2 +- - qt5-ukui-filedialog/pathbar.cpp | 2 +- - qt5-ukui-filedialog/qt5-ukui-filedialog.pro | 124 ----- - qt5-ukui-filedialog/sidebar.cpp | 2 +- - qt5-ukui-filedialog/ui_kyfiledialog.cpp | 505 --------------------- - qt5-ukui-filedialog/ui_kyfiledialog.h | 126 ----- - qt5-ukui-filedialog/uikyfiledialog.cpp | 505 +++++++++++++++++++++ - qt5-ukui-filedialog/uikyfiledialog.h | 126 +++++ - qt5-ukui-platformtheme/CMakeLists.txt | 180 ++++++++ - qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp | 13 +- - qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro | 81 ---- - qt5-ukui-platformtheme/widget/widget.pri | 5 - - qt5-ukui.pro | 10 - - test/CMakeLists.txt | 9 + - test/custom-shadow/CMakeLists.txt | 31 ++ - test/custom-shadow/custom-shadow.pro | 28 -- - test/filedialog/CMakeLists.txt | 31 ++ - test/filedialog/filedialog.pro | 31 -- - test/highlighted-icon-button/CMakeLists.txt | 31 ++ - .../highlighted-icon-button.pro | 31 -- - test/messagebox/CMakeLists.txt | 31 ++ - test/messagebox/messagebox.pro | 19 - - test/mps-style-application/CMakeLists.txt | 45 ++ - test/mps-style-application/main.cpp | 2 +- - .../mps-style-application.pro | 43 -- - test/region-blur/CMakeLists.txt | 31 ++ - test/region-blur/region-blur.pro | 37 -- - test/system-settings/CMakeLists.txt | 36 ++ - test/system-settings/system-settings.pro | 41 -- - test/tabwidget/CMakeLists.txt | 31 ++ - test/tabwidget/tabwidget.pro | 37 -- - test/test.pro | 11 - - ukui-qml-style-helper/CMakeLists.txt | 59 +++ - ukui-qml-style-helper/KyIcon.cpp | 2 +- - ukui-qml-style-helper/ukui-qml-style-helper.pro | 47 -- - ukui-qqc2-style/CMakeLists.txt | 35 ++ - ukui-qqc2-style/ukui-qqc2-style.pro | 10 - - ukui-styles/CMakeLists.txt | 107 +++++ - ukui-styles/blur-helper.cpp | 4 +- - ukui-styles/gesture-helper.cpp | 4 +- - .../animations/config-box-animation-helper.h | 4 +- - .../animations/config-box-animator.h | 3 +- - .../animations/config-button-animation-helper.h | 4 +- - .../animations/config-button-animator.h | 3 +- - .../animations/config-checkbox-animation-helper.h | 4 +- - .../animations/config-checkbox-animator.h | 3 +- - .../config-radiobutton-animation-helper.h | 4 +- - .../animations/config-radiobutton-animator.h | 3 +- - .../animations/config-scrollbar-animation-helper.h | 2 +- - .../animations/config-slider-animation-helper.h | 2 +- - .../animations/config-slider-animator.h | 3 +- - .../config-tab-widget-animation-helper.cpp | 2 +- - .../config-tab-widget-animation-helper.h | 2 +- - .../animations/config-tree-animation-helper.h | 2 +- - .../animations/config-tree-animator.h | 3 +- - .../ukui-config-style-parameters.cpp | 42 +- - .../qt5-config-style-ukui/ukui-config-style.cpp | 47 +- - .../qt5-config-style-ukui/ukui-config-style.h | 12 +- - ukui-styles/ukui-style-plugin.cpp | 10 +- - ukui-styles/ukui-styles.pro | 53 --- - ukui-styles/window-manager.cpp | 2 +- - 72 files changed, 1802 insertions(+), 1363 deletions(-) - create mode 100644 .gitignore - create mode 100644 CMakeLists.txt - create mode 100644 libqt5-ukui-style/CMakeLists.txt - delete mode 100644 libqt5-ukui-style/libqt5-ukui-style.pri - delete mode 100644 libqt5-ukui-style/libqt5-ukui-style.pro - create mode 100644 qt5-ukui-filedialog/CMakeLists.txt - delete mode 100644 qt5-ukui-filedialog/qt5-ukui-filedialog.pro - delete mode 100644 qt5-ukui-filedialog/ui_kyfiledialog.cpp - delete mode 100644 qt5-ukui-filedialog/ui_kyfiledialog.h - create mode 100644 qt5-ukui-filedialog/uikyfiledialog.cpp - create mode 100644 qt5-ukui-filedialog/uikyfiledialog.h - create mode 100644 qt5-ukui-platformtheme/CMakeLists.txt - delete mode 100644 qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro - delete mode 100644 qt5-ukui-platformtheme/widget/widget.pri - delete mode 100644 qt5-ukui.pro - create mode 100644 test/CMakeLists.txt - create mode 100644 test/custom-shadow/CMakeLists.txt - delete mode 100644 test/custom-shadow/custom-shadow.pro - create mode 100644 test/filedialog/CMakeLists.txt - delete mode 100644 test/filedialog/filedialog.pro - create mode 100644 test/highlighted-icon-button/CMakeLists.txt - delete mode 100644 test/highlighted-icon-button/highlighted-icon-button.pro - create mode 100644 test/messagebox/CMakeLists.txt - delete mode 100644 test/messagebox/messagebox.pro - create mode 100644 test/mps-style-application/CMakeLists.txt - delete mode 100644 test/mps-style-application/mps-style-application.pro - create mode 100644 test/region-blur/CMakeLists.txt - delete mode 100644 test/region-blur/region-blur.pro - create mode 100644 test/system-settings/CMakeLists.txt - delete mode 100644 test/system-settings/system-settings.pro - create mode 100644 test/tabwidget/CMakeLists.txt - delete mode 100644 test/tabwidget/tabwidget.pro - delete mode 100644 test/test.pro - create mode 100644 ukui-qml-style-helper/CMakeLists.txt - delete mode 100644 ukui-qml-style-helper/ukui-qml-style-helper.pro - create mode 100644 ukui-qqc2-style/CMakeLists.txt - delete mode 100644 ukui-qqc2-style/ukui-qqc2-style.pro - create mode 100644 ukui-styles/CMakeLists.txt - delete mode 100644 ukui-styles/ukui-styles.pro - -diff --git a/.gitignore b/.gitignore -new file mode 100644 -index 0000000..8a9d35c ---- /dev/null -+++ b/.gitignore -@@ -0,0 +1 @@ -+*.user -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000..47ef06a ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,8 @@ -+project(qt5-ukui) -+add_subdirectory(ukui-styles) -+add_subdirectory(libqt5-ukui-style) -+add_subdirectory(qt5-ukui-filedialog) -+add_subdirectory(qt5-ukui-platformtheme) -+add_subdirectory(ukui-qqc2-style) -+add_subdirectory(ukui-qml-style-helper) -+add_subdirectory(test) -diff --git a/libqt5-ukui-style/CMakeLists.txt b/libqt5-ukui-style/CMakeLists.txt -new file mode 100644 -index 0000000..921556d ---- /dev/null -+++ b/libqt5-ukui-style/CMakeLists.txt -@@ -0,0 +1,98 @@ -+cmake_minimum_required(VERSION 3.16) -+ -+project(qt5-ukui-style) -+ -+# 设置共享库的版本号 -+set(QT5_UKUI-STYLE_VERSION_MAJOR 1) -+set(QT5_UKUI-STYLE_VERSION_MINOR 0) -+set(QT5_UKUI-STYLE_VERSION_PATCH 0) -+ -+set(CMAKE_AUTOUIC ON) -+set(CMAKE_AUTOMOC ON) -+set(CMAKE_AUTORCC ON) -+ -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+set(QT_MIN_VERSION "5.12.0") -+set(KF5_MIN_VERSION "5.66.0") -+ -+find_package(Qt5Concurrent) -+set(LIB_PATH ${imported_location}) -+get_filename_component(PARENT_PATH "${LIB_PATH}" PATH) -+message("libqt5-ukui-style PARENT_PATH: ${PARENT_PATH}") -+ -+find_package(Qt5Widgets) -+ -+include_directories(${Qt5Widgets_PRIVATE_INCLUDE_DIRS}) -+include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) -+ -+#find_package(Qt5QtThemeSupport REQUIRED) -+ -+find_package(KF5WindowSystem ${KF5_MIN_VERSION} CONFIG REQUIRED COMPONENTS) -+find_package(KF5Wayland CONFIG REQUIRED COMPONENTS) -+ -+find_package(X11) -+ -+find_package(PkgConfig) -+pkg_check_modules(GLIB2 REQUIRED glib-2.0 gio-2.0 ) -+pkg_check_modules(Qsettings REQUIRED gsettings-qt) -+pkg_check_modules(KYSDKCONF2 REQUIRED kysdk-conf2) -+ -+include_directories(${Qsettings_INCLUDE_DIRS}) -+include_directories(${GLIB2_INCLUDE_DIRS}) -+if (KYSDKCONF2_FOUND) -+ include_directories(${KYSDKCONF2_INCLUDE_DIRS}) -+ link_directories(${KYSDKCONF2_LIBRARY_DIRS}) -+endif() -+ -+file(GLOB_RECURSE Header "*.h" "*.hpp") -+file(GLOB_RECURSE Sources "*.cpp" "*.c" "*.ui") -+file(GLOB_RECURSE XML "org.ukui.style.gschema.xml") -+ -+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${Header} ${Sources} ${XML}) -+ -+add_library(qt5-ukui-style SHARED ${Sources} ${Header}) -+ -+# 设置共享库的命名规则 -+set_target_properties(qt5-ukui-style PROPERTIES -+ OUTPUT_NAME "qt5-ukui-style" -+ VERSION ${QT5_UKUI-STYLE_VERSION_MAJOR}.${QT5_UKUI-STYLE_VERSION_MINOR}.${QT5_UKUI-STYLE_VERSION_PATCH} -+ SOVERSION ${QT5_UKUI-STYLE_VERSION_MAJOR} -+) -+ -+target_link_libraries(qt5-ukui-style PRIVATE -+ Qt5::Widgets -+ Qt5::Concurrent -+ gsettings-qt -+ gio-2.0 -+ ${KYSDKCONF2_LIBRARIES} -+ ) -+ -+ -+add_definitions(-DLIBQT5UKUISTYLE_LIBRARY) -+add_definitions(-DQT_DEPRECATED_WARNINGS) -+add_definitions(-DQT_MESSAGELOGCONTEXT) -+ -+ -+if(UNIX) -+ set(TARGET_PATH ${PARENT_PATH}) -+ MESSAGE("libqt5-ukui-style TARGET_PATH: ${TARGET_PATH}") -+ -+ install(TARGETS ${PROJECT_NAME} DESTINATION ${TARGET_PATH}) -+ -+ set(GSCHEMA_PATH "/usr/share/glib-2.0/schemas") -+ set(GSCHEMA_FILE "${CMAKE_CURRENT_SOURCE_DIR}/settings/org.ukui.style.gschema.xml") -+ install(FILES ${GSCHEMA_FILE} DESTINATION ${GSCHEMA_PATH}) -+ -+ set(KCONF2_PATH "/etc/kylin-config/basic/") -+ set(KCONF2_FILE "${CMAKE_CURRENT_SOURCE_DIR}/settings/org.ukui.style.yaml") -+ install(FILES ${KCONF2_FILE} DESTINATION ${KCONF2_PATH}) -+ -+ set(PKGCONFIG_PATH "${PARENT_PATH}/pkgconfig") -+ set(PKGCONFIG_FILE "${CMAKE_CURRENT_SOURCE_DIR}/development-files/qt5-ukui.pc") -+ install(FILES ${PKGCONFIG_FILE} DESTINATION ${PKGCONFIG_PATH}) -+ -+ install(FILES ${Header} DESTINATION "libqt5-ukui-style/") -+ -+endif() -diff --git a/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.h b/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.h -index 8367dbb..a18b3a7 100644 ---- a/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.h -+++ b/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.h -@@ -24,7 +24,7 @@ - #define UKUISCROLLBARDEFAULTINTERACTIONANIMATOR_H - - #include <QParallelAnimationGroup> --#include "animator-iface.h" -+#include "../animator-iface.h" - - class QVariantAnimation; - -diff --git a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-iface.h b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-iface.h -index 19642e1..8d68b53 100644 ---- a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-iface.h -+++ b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-iface.h -@@ -24,7 +24,7 @@ - #define UKUITABWIDGETANIMATORIFACE_H - - #include <QTabWidget> --#include "animator-iface.h" -+#include "../animator-iface.h" - - /*! - * \brief The UKUITabWidgetAnimatorIface class -diff --git a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-plugin-iface.h b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-plugin-iface.h -index 9e7dcc0..1fb258a 100644 ---- a/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-plugin-iface.h -+++ b/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-plugin-iface.h -@@ -24,7 +24,7 @@ - #define UKUITABWIDGETANIMATORPLUGINIFACE_H - - #include <QString> --#include "animator-plugin-iface.h" -+#include "../animator-plugin-iface.h" - #include "ukui-tabwidget-animator-iface.h" - - #define UKUITabWidgetAnimatorPluginInterface_iid "org.ukui.style.animatons.TabWidgetPluginInterface" -diff --git a/libqt5-ukui-style/libqt5-ukui-style.pri b/libqt5-ukui-style/libqt5-ukui-style.pri -deleted file mode 100644 -index 7aececc..0000000 ---- a/libqt5-ukui-style/libqt5-ukui-style.pri -+++ /dev/null -@@ -1,7 +0,0 @@ --INCLUDEPATH += $$PWD -- --include(animations/animations.pri) --include(settings/settings.pri) --include(internal-styles/internal-styles.pri) --include(effects/effects.pri) --include(gestures/gestures.pri) -diff --git a/libqt5-ukui-style/libqt5-ukui-style.pro b/libqt5-ukui-style/libqt5-ukui-style.pro -deleted file mode 100644 -index 1d7a950..0000000 ---- a/libqt5-ukui-style/libqt5-ukui-style.pro -+++ /dev/null -@@ -1,50 +0,0 @@ --#------------------------------------------------- --# --# Project created by QtCreator 2020-01-02T12:00:35 --# --#------------------------------------------------- -- --QT += widgets concurrent -- --TARGET = qt5-ukui-style --TEMPLATE = lib -- --DEFINES += LIBQT5UKUISTYLE_LIBRARY -- --# The following define makes your compiler emit warnings if you use --# any feature of Qt which has been marked as deprecated (the exact warnings --# depend on your compiler). Please consult the documentation of the --# deprecated API in order to know how to port your code away from it. --DEFINES += QT_DEPRECATED_WARNINGS --#DEFINES += QT_NO_DEBUG_OUTPUT --DEFINES += QT_MESSAGELOGCONTEXT -- --# You can also make your code fail to compile if you use deprecated APIs. --# In order to do so, uncomment the following line. --# You can also select to disable deprecated APIs only up to a certain version of Qt. --#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -- --include(libqt5-ukui-style.pri) -- --CONFIG += c++11 link_pkgconfig --PKGCONFIG += gsettings-qt gio-2.0 kysdk-conf2 -- --DISTFILES += \ -- org.ukui.style.gschema.xml -- --unix { -- target.path = $$[QT_INSTALL_LIBS] -- INSTALLS += target -- -- gschema.path = /usr/share/glib-2.0/schemas -- gschema.files += $$PWD/settings/org.ukui.style.gschema.xml -- INSTALLS += gschema -- -- kconf2.path = /etc/kylin-config/basic/ -- kconf2.files += $$PWD/settings/org.ukui.style.yaml -- INSTALLS += kconf2 -- -- pkgconfig.path = $$[QT_INSTALL_LIBS]/pkgconfig -- pkgconfig.files += development-files/qt5-ukui.pc -- INSTALLS += pkgconfig --} -diff --git a/qt5-ukui-filedialog/CMakeLists.txt b/qt5-ukui-filedialog/CMakeLists.txt -new file mode 100644 -index 0000000..32f494d ---- /dev/null -+++ b/qt5-ukui-filedialog/CMakeLists.txt -@@ -0,0 +1,242 @@ -+cmake_minimum_required(VERSION 3.16) -+ -+project(qt5-ukui-filedialog) -+ -+set(CMAKE_AUTOUIC ON) -+set(CMAKE_AUTOMOC ON) -+set(CMAKE_AUTORCC ON) -+ -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+set(QT_MIN_VERSION "5.12.0") -+set(KF5_MIN_VERSION "5.66.0") -+ -+# QtCreator supports the following variables for Android, which are identical to qmake Android variables. -+# Check http://doc.qt.io/qt-5/deployment-android.html for more information. -+# They need to be set before the find_package(Qt5 ...) call. -+ -+#if(ANDROID) -+# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android") -+# if (ANDROID_ABI STREQUAL "armeabi-v7a") -+# set(ANDROID_EXTRA_LIBS -+# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libcrypto.so -+# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libssl.so) -+# endif() -+#endif() -+ -+find_package(Qt5Gui) -+message(${imported_location}) -+set(LIB_PATH ${imported_location}) -+get_filename_component(PARENT_PATH "${LIB_PATH}" PATH) -+get_filename_component(PARENT_PATH "${PARENT_PATH}" PATH) -+message("qt5-ukui-filedialog PARENT_PATH: ${PARENT_PATH}") -+set(TARGET_PATH ${PARENT_PATH}) -+ -+find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS -+ DBus -+ Widgets -+ X11Extras -+) -+ -+include_directories(${Qt5Widgets_PRIVATE_INCLUDE_DIRS}) -+include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) -+ -+ -+find_package(Qt5LinguistTools) -+ -+find_package(KF5WindowSystem ${KF5_MIN_VERSION} CONFIG REQUIRED COMPONENTS) -+find_package(KF5Wayland CONFIG REQUIRED COMPONENTS) -+ -+find_package(X11) -+ -+find_package(PkgConfig) -+pkg_check_modules(QGSETTINGS REQUIRED gsettings-qt) -+pkg_check_modules(PEONY REQUIRED peony) -+pkg_check_modules(REQUIRED kysdk-waylandhelper) -+pkg_check_modules(GLIB2 REQUIRED glib-2.0 gio-2.0 ) -+pkg_check_modules(KYSDKWAYLANDHELPER REQUIRED kysdk-waylandhelper) -+pkg_check_modules(KYSDKCONF2 REQUIRED kysdk-conf2) -+ -+include_directories(${QGSETTINGS_INCLUDE_DIRS}) -+include_directories(${GLIB2_INCLUDE_DIRS}) -+ -+if (PEONY_FOUND) -+ include_directories(${PEONY_INCLUDE_DIRS}) -+ link_directories(${PEONY_LIBRARY_DIRS}) -+endif() -+if (KYSDKWAYLANDHELPER_FOUND) -+ include_directories(${KYSDKWAYLANDHELPER_INCLUDE_DIRS}) -+ link_directories(${KYSDKWAYLANDHELPER_LIBRARY_DIRS}) -+endif() -+if (QGSETTINGS_FOUND) -+ include_directories(${QGSETTINGS_INCLUDE_DIRS}) -+ link_directories(${QGSETTINGS_LIBRARY_DIRS}) -+endif() -+ -+if (KYSDKCONF2_FOUND) -+ include_directories(${KYSDKCONF2_INCLUDE_DIRS}) -+ link_directories(${KYSDKCONF2_LIBRARY_DIRS}) -+endif() -+ -+include_directories(../libqt5-ukui-style/) -+ -+file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c") -+file(GLOB_RECURSE Json "*.json") -+ -+message("jsonfiles path:${Json}") -+ -+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources} ${Json}) -+ -+# i18n -+set(UKUI_TRANSLATIONS_DIR "/usr/share/qt5-ukui-platformtheme") -+add_definitions( -+ -DUKUI_TRANSLATIONS_DIR="${UKUI_TRANSLATIONS_DIR}" -+) -+if (NOT DEFINED UPDATE_TRANSLATIONS) -+ set(UPDATE_TRANSLATIONS "No") -+endif() -+ -+# To create a new ts file: lupdate -recursive . -target-language en_US -ts translations/en_US.ts -no-ui-lines -+file(GLOB TS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts") -+ -+# cmake -DUPDATE_TRANSLATIONS=yes -+if (UPDATE_TRANSLATIONS) -+ qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) -+else() -+ qt5_add_translation(QM_FILES ${TS_FILES}) -+endif() -+ -+MESSAGE("QM_FILES PATH: ${QM_FILES}") -+ -+add_custom_target(translations ALL DEPENDS ${QM_FILES}) -+ -+add_library(qt5-ukui-filedialog MODULE ${sources} ${Json}) -+ -+target_link_libraries(qt5-ukui-filedialog -+ Qt5::Widgets -+ Qt5::DBus -+ Qt5::Gui -+ Qt5::X11Extras -+ KF5::WaylandClient -+ KF5::WindowSystem -+ ${QGSETTINGS_LIBRARIES} -+ ${KYSDKWAYLANDHELPER_LIBRARIES} -+ xcb -+ glib-2.0 -+ ${PEONY_LIBRARIES} -+ ${XCB_LIBS} -+ qt5-ukui-style -+ ${KYSDKCONF2_LIBRARIES} -+ ) -+ -+add_definitions(-DQT5UKUIPLATFORMTHEME_LIBRARY) -+add_definitions(-DQT_DEPRECATED_WARNINGS) -+add_definitions(-DQT_MESSAGELOGCONTEXT) -+ -+if(UNIX) -+ MESSAGE("libqt5-ukui-filedialog TARGET_PATH: ${TARGET_PATH}") -+ -+ install(TARGETS ${PROJECT_NAME} DESTINATION ${TARGET_PATH}/platformthemes/) -+ -+ install(FILES ${QM_FILES} DESTINATION "${UKUI_TRANSLATIONS_DIR}") -+endif() -+ -+set(test_libs -+ Qt5::Widgets -+ glib-2.0 -+ peony -+ ) -+ -+SET(_code " -+ #include <glib-object.h> -+ #include <peony-qt/search-vfs-uri-parser.h> -+ -+ int main() -+ { -+ Peony::SearchVFSUriParser::addSearchKey(\"\", true); -+ return 0; -+ }") -+SET(_file ${CMAKE_CURRENT_BINARY_DIR}/DetermineHavePeonyInterface.cpp) -+FILE(WRITE "${_file}" "${_code}") -+TRY_COMPILE(HAVE_PEONY_INTERFACE -+ "${CMAKE_CURRENT_BINARY_DIR}" -+ "${_file}" -+ LINK_LIBRARIES ${test_libs} -+ CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${GLIB2_INCLUDE_DIRS} ${PEONY_INCLUDE_DIRS}" -+ OUTPUT_VARIABLE OUTPUT) -+MESSAGE("Build output: ${OUTPUT} HAVE_PEONY_INTERFACE: ${HAVE_PEONY_INTERFACE}") -+ -+if(HAVE_PEONY_INTERFACE) -+ add_definitions(-DHAVE_PEONY_INTERFACE=1) -+endif() -+ -+ -+#set(OPEN_ACTIONS_SEPARATOR "open-actions-seperator") -+#set(CREATE_ACTIONS_SEPARATOR "create-actions-seperator") -+#set(VIEW_ACTIONS_SEPARATOR "view-actions-seperator") -+#set(FILE_OPERATION_ACTIONS_SEPARATOR "file-operation-actions-seperator") -+#set(PLUGIN_ACTIONS_SEPARATOR "plugin-actions-seperator") -+#set(PROPERTIES_ACTIONS_SEPARATOR "properties-actions-seperator") -+#set(COMPUTER_ACTIONS_SEPARATOR "computer-actions-seperator") -+#set(TRASH_ACTIONS_SEPARATOR "trash-actions-seperator") -+#set(OPEN_IN_NEW_WINDOW_ACTION "open-in-new-window-action") -+#set(OPEN_IN_NEW_TAB_ACTION "open-in-new-tab-action") -+#set(ADD_TO_BOOKMARK_ACTION "add-to-bookmark-action") -+#set(OPEN_ACTION "open-action") -+#set(OPEN_WITH_ACTION "open-with-action") -+#set(OPEN_SELECTED_FILES_ACTION "open-selected-files-action") -+#set(CREATE_ACTION "create-action") -+#set(VIEW_TYPE_ACTION "view-type-action") -+#set(SORT_TYPE_ACTION "sort-type-action") -+#set(SORT_ORDER_ACTION "sort-order-action") -+#set(SORT_PREFERENCES_ACTION "sort-preferences-action") -+#set(COPY_ACTION "copy-action") -+#set(CUT_ACTION "cut-action") -+#set(TRASH_ACTION "trash-action") -+#set(DELETE_ACTION "delete-action") -+#set(RENAME_ACTION "rename-action") -+#set(PASTE_ACTION "paste-action") -+#set(REFRESH_ACTION "refresh-action") -+#set(SELECT_ALL_ACTION "select-all-action") -+#set(REVERSE_SELECT_ACTION "reverse-select-action") -+#set(PROPERTIES_ACTION "properties-action") -+#set(FORMAT_ACTION "format-action") -+#set(CLEAN_THE_TRASH_ACTION "clean-the-trash-action") -+#set(RESTORE_ACTION "restore-action") -+#set(CLEAN_THE_RECENT_ACTION "clean-the-recent-action") -+ -+#add_compile_definitions(OPEN_ACTIONS_SEPARATOR=${OPEN_ACTIONS_SEPARATOR}) -+#add_compile_definitions(CREATE_ACTIONS_SEPARATOR=${CREATE_ACTIONS_SEPARATOR}) -+#add_compile_definitions(VIEW_ACTIONS_SEPARATOR=${VIEW_ACTIONS_SEPARATOR}) -+#add_compile_definitions(FILE_OPERATION_ACTIONS_SEPARATOR=${FILE_OPERATION_ACTIONS_SEPARATOR}) -+#add_compile_definitions(PLUGIN_ACTIONS_SEPARATOR=${PLUGIN_ACTIONS_SEPARATOR}) -+#add_compile_definitions(PROPERTIES_ACTIONS_SEPARATOR=${PROPERTIES_ACTIONS_SEPARATOR}) -+#add_compile_definitions(COMPUTER_ACTIONS_SEPARATOR=${COMPUTER_ACTIONS_SEPARATOR}) -+#add_compile_definitions(TRASH_ACTIONS_SEPARATOR=${TRASH_ACTIONS_SEPARATOR}) -+#add_compile_definitions(OPEN_IN_NEW_WINDOW_ACTION=${OPEN_IN_NEW_WINDOW_ACTION}) -+#add_compile_definitions(OPEN_IN_NEW_TAB_ACTION=${OPEN_IN_NEW_TAB_ACTION}) -+#add_compile_definitions(ADD_TO_BOOKMARK_ACTION=${ADD_TO_BOOKMARK_ACTION}) -+#add_compile_definitions(OPEN_ACTION=${OPEN_ACTION}) -+#add_compile_definitions(OPEN_WITH_ACTION=${OPEN_WITH_ACTION}) -+#add_compile_definitions(OPEN_SELECTED_FILES_ACTION=${OPEN_SELECTED_FILES_ACTION}) -+#add_compile_definitions(CREATE_ACTION=${CREATE_ACTION}) -+#add_compile_definitions(VIEW_TYPE_ACTION=${VIEW_TYPE_ACTION}) -+#add_compile_definitions(SORT_TYPE_ACTION=${SORT_TYPE_ACTION}) -+#add_compile_definitions(SORT_ORDER_ACTION=${SORT_ORDER_ACTION}) -+#add_compile_definitions(SORT_PREFERENCES_ACTION=${SORT_PREFERENCES_ACTION}) -+#add_compile_definitions(COPY_ACTION=${COPY_ACTION}) -+#add_compile_definitions(CUT_ACTION=${CUT_ACTION}) -+#add_compile_definitions(TRASH_ACTION=${TRASH_ACTION}) -+#add_compile_definitions(DELETE_ACTION=${DELETE_ACTION}) -+#add_compile_definitions(RENAME_ACTION=${RENAME_ACTION}) -+#add_compile_definitions(PASTE_ACTION=${PASTE_ACTION}) -+#add_compile_definitions(REFRESH_ACTION=${REFRESH_ACTION}) -+#add_compile_definitions(SELECT_ALL_ACTION=${SELECT_ALL_ACTION}) -+#add_compile_definitions(REVERSE_SELECT_ACTION=${REVERSE_SELECT_ACTION}) -+#add_compile_definitions(PROPERTIES_ACTION=${PROPERTIES_ACTION}) -+#add_compile_definitions(FORMAT_ACTION=${FORMAT_ACTION}) -+#add_compile_definitions(CLEAN_THE_TRASH_ACTION=${CLEAN_THE_TRASH_ACTION}) -+#add_compile_definitions(RESTORE_ACTION=${RESTORE_ACTION}) -+#add_compile_definitions(CLEAN_THE_RECENT_ACTION=${CLEAN_THE_RECENT_ACTION}) -+ -diff --git a/qt5-ukui-filedialog/kyfiledialog.cpp b/qt5-ukui-filedialog/kyfiledialog.cpp -index f583064..8bf304f 100644 ---- a/qt5-ukui-filedialog/kyfiledialog.cpp -+++ b/qt5-ukui-filedialog/kyfiledialog.cpp -@@ -23,7 +23,7 @@ - #include "debug.h" - #include "kyfiledialog.h" - #include <QDebug> --#include "ui_kyfiledialog.h" -+#include "uikyfiledialog.h" - #include "kyfiledialogprivate.h" - #include "sidebar.h" - #include "pathbar.h" -@@ -64,7 +64,7 @@ - #include <peony-qt/file-meta-info.h> - #include <peony-qt/clipboard-utils.h> - #include "debug.h" --#include "ukui-style-settings.h" -+#include "settings/ukui-style-settings.h" - - using namespace UKUIFileDialog; - -diff --git a/qt5-ukui-filedialog/kyfiledialog.h b/qt5-ukui-filedialog/kyfiledialog.h -index ece467e..6ad68dd 100644 ---- a/qt5-ukui-filedialog/kyfiledialog.h -+++ b/qt5-ukui-filedialog/kyfiledialog.h -@@ -34,6 +34,40 @@ - #include "qpa/qplatformdialoghelper.h" - #include <peony-qt/FMWindowIface.h> - -+#define OPEN_ACTIONS_SEPARATOR "open-actions-seperator" -+#define CREATE_ACTIONS_SEPARATOR "create-actions-seperator" -+#define VIEW_ACTIONS_SEPARATOR "view-actions-seperator" -+#define FILE_OPERATION_ACTIONS_SEPARATOR "file-operation-actions-seperator" -+#define PLUGIN_ACTIONS_SEPARATOR "plugin-actions-seperator" -+#define PROPERTIES_ACTIONS_SEPARATOR "properties-actions-seperator" -+#define COMPUTER_ACTIONS_SEPARATOR "computer-actions-seperator" -+#define TRASH_ACTIONS_SEPARATOR "trash-actions-seperator" -+#define OPEN_IN_NEW_WINDOW_ACTION "open-in-new-window-action" -+#define OPEN_IN_NEW_TAB_ACTION "open-in-new-tab-action" -+#define ADD_TO_BOOKMARK_ACTION "add-to-bookmark-action" -+#define OPEN_ACTION "open-action" -+#define OPEN_WITH_ACTION "open-with-action" -+#define OPEN_SELECTED_FILES_ACTION "open-selected-files-action" -+#define CREATE_ACTION "create-action" -+#define VIEW_TYPE_ACTION "view-type-action" -+#define SORT_TYPE_ACTION "sort-type-action" -+#define SORT_ORDER_ACTION "sort-order-action") -+#define SORT_PREFERENCES_ACTION "sort-preferences-action" -+#define COPY_ACTION "copy-action" -+#define CUT_ACTION "cut-action" -+#define TRASH_ACTION "trash-action" -+#define DELETE_ACTION "delete-action" -+#define RENAME_ACTION "rename-action" -+#define PASTE_ACTION "paste-action" -+#define REFRESH_ACTION "refresh-action" -+#define SELECT_ALL_ACTION "select-all-action" -+#define REVERSE_SELECT_ACTION "reverse-select-action" -+#define PROPERTIES_ACTION "properties-action" -+#define FORMAT_ACTION "format-action" -+#define CLEAN_THE_TRASH_ACTION "clean-the-trash-action" -+#define RESTORE_ACTION "restore-action" -+#define CLEAN_THE_RECENT_ACTION "clean-the-recent-action" -+ - QT_BEGIN_NAMESPACE - namespace Ui { class KyNativeFileDialog; } - QT_END_NAMESPACE -diff --git a/qt5-ukui-filedialog/kyfiledialogprivate.cpp b/qt5-ukui-filedialog/kyfiledialogprivate.cpp -index 40225fb..da7c071 100644 ---- a/qt5-ukui-filedialog/kyfiledialogprivate.cpp -+++ b/qt5-ukui-filedialog/kyfiledialogprivate.cpp -@@ -27,7 +27,7 @@ - #include <QTimer> - #include <QLineEdit> - #include "kyfiledialog.h" --#include "ui_kyfiledialog.h" -+#include "uikyfiledialog.h" - using namespace UKUIFileDialog; - KyNativeFileDialogPrivate::KyNativeFileDialogPrivate() - { -diff --git a/qt5-ukui-filedialog/pathbar.cpp b/qt5-ukui-filedialog/pathbar.cpp -index 9f47383..dae6f5a 100644 ---- a/qt5-ukui-filedialog/pathbar.cpp -+++ b/qt5-ukui-filedialog/pathbar.cpp -@@ -31,7 +31,7 @@ - #include <QDBusMessage> - #include <peony-qt/file-utils.h> - #include "debug.h" --#include "ukui-style-settings.h" -+#include "settings/ukui-style-settings.h" - using namespace UKUIFileDialog; - - FileDialogPathBar::FileDialogPathBar(QWidget *parent) : QWidget(parent)//Peony::AdvancedLocationBar(parent)//QLineEdit(parent)// -diff --git a/qt5-ukui-filedialog/qt5-ukui-filedialog.pro b/qt5-ukui-filedialog/qt5-ukui-filedialog.pro -deleted file mode 100644 -index 1aa3877..0000000 ---- a/qt5-ukui-filedialog/qt5-ukui-filedialog.pro -+++ /dev/null -@@ -1,124 +0,0 @@ --#------------------------------------------------- --# --# Project created by QtCreator 2019-12-31T14:19:01 --# --#------------------------------------------------- -- --QT += widgets dbus x11extras quickcontrols2 KWindowSystem -- --greaterThan(QT_MAJOR_VERSION, 5)|greaterThan(QT_MINOR_VERSION, 7): \ -- QT += theme_support-private --else: \ -- QT += platformsupport-private -- --TARGET = qt5-ukui-filedialog --TEMPLATE = lib --CONFIG += plugin --CONFIG += c++11 link_pkgconfig lrelease --PKGCONFIG += gsettings-qt peony kysdk-waylandhelper kysdk-conf2 --LIBS += -lX11 -- --include(../libqt5-ukui-style/libqt5-ukui-style.pri) -- --DEFINES += QT5UKUIFILEDIALOG_LIBRARY -- --XDG_ICON_ENGINE = $$[QT_INSTALL_PLUGINS]/iconengines/libQt5XdgIconPlugin.so --DEFINES += XDG_ICON_ENGINE_PATH='\\"$${XDG_ICON_ENGINE}\\"' -- --QT_PLUGIN_INSTALL_DIRS = $$[QT_INSTALL_PLUGINS] --DEFINES += QT_PLUGIN_INSTALL_DIRS='\\"$${QT_PLUGIN_INSTALL_DIRS}\\"' -- --# The following define makes your compiler emit warnings if you use --# any feature of Qt which has been marked as deprecated (the exact warnings --# depend on your compiler). Please consult the documentation of the --# deprecated API in order to know how to port your code away from it. --DEFINES += QT_DEPRECATED_WARNINGS --#DEFINES += QT_NO_DEBUG_OUTPUT --DEFINES += QT_MESSAGELOGCONTEXT -- --# You can also make your code fail to compile if you use deprecated APIs. --# In order to do so, uncomment the following line. --# You can also select to disable deprecated APIs only up to a certain version of Qt. --#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -- --HEADERS += \ -- filedialogplugin.h \ -- filedialogplugin_global.h \ -- kyfiledialog.h \ -- kyfiledialogprivate.h \ -- pathbar.h \ -- sidebar.h \ -- ui_kyfiledialog.h \ -- ../qt5-ukui-platformtheme/xatom-helper.h \ -- menutoolbutoon.h \ -- debug.h \ -- filedialoginterface.h -- --SOURCES += \ -- filedialogplugin.cpp \ -- kyfiledialog.cpp \ -- pathbar.cpp \ -- sidebar.cpp \ -- ../qt5-ukui-platformtheme/xatom-helper.cpp \ -- menutoolbutoon.cpp \ -- kyfiledialogprivate.cpp \ -- ui_kyfiledialog.cpp -- --TRANSLATIONS += \ -- translations/qt5-ukui-filedialog_zh_CN.ts \ -- translations/qt5-ukui-filedialog_en_US.ts \ -- translations/qt5-ukui-filedialog_fa.ts \ -- translations/qt5-ukui-filedialog_fr.ts \ -- translations/qt5-ukui-filedialog_cs.ts \ -- translations/qt5-ukui-filedialog_bo_CN.ts \ -- translations/qt5-ukui-filedialog_tr.ts \ -- translations/qt5-ukui-filedialog_mn.ts \ -- translations/qt5-ukui-filedialog_kk.ts \ -- translations/qt5-ukui-filedialog_ky.ts \ -- translations/qt5-ukui-filedialog_ug.ts \ -- translations/qt5-ukui-filedialog_zh_HK.ts -- --unix { -- target.path = $$[QT_INSTALL_PLUGINS]/platformthemes -- INSTALLS += target -- -- QM_FILES_INSTALL_PATH=/usr/share/qt5-ukui-platformtheme --} -- --DISTFILES += \ -- filedialogplugin.json -- --DEFINES += OPEN_ACTIONS_SEPARATOR='\\"open-actions-seperator\\"' --DEFINES += CREATE_ACTIONS_SEPARATOR='\\"create-actions-seperator\\"' --DEFINES += VIEW_ACTIONS_SEPARATOR='\\"view-actions-seperator\\"' --DEFINES += FILE_OPERATION_ACTIONS_SEPARATOR='\\"file-operation-actions-seperator\\"' --DEFINES += PLUGIN_ACTIONS_SEPARATOR='\\"plugin-actions-seperator\\"' --DEFINES += PROPERTIES_ACTIONS_SEPARATOR='\\"properties-actions-seperator\\"' --DEFINES += COMPUTER_ACTIONS_SEPARATOR='\\"computer-actions-seperator\\"' --DEFINES += TRASH_ACTIONS_SEPARATOR='\\"trash-actions-seperator\\"' -- --DEFINES += OPEN_IN_NEW_WINDOW_ACTION='\\"open-in-new-window-action\\"' --DEFINES += OPEN_IN_NEW_TAB_ACTION='\\"open-in-new-tab-action\\"' --DEFINES += ADD_TO_BOOKMARK_ACTION='\\"add-to-bookmark-action\\"' --DEFINES += OPEN_ACTION='\\"open-action\\"' --DEFINES += OPEN_WITH_ACTION='\\"open-with-action\\"' --DEFINES += OPEN_SELECTED_FILES_ACTION='\\"open-selected-files-action\\"' --DEFINES += CREATE_ACTION='\\"create-action\\"' --DEFINES += VIEW_TYPE_ACTION='\\"view-type-action\\"' --DEFINES += SORT_TYPE_ACTION='\\"sort-type-action\\"' --DEFINES += SORT_ORDER_ACTION='\\"sort-order-action\\"' --DEFINES += SORT_PREFERENCES_ACTION='\\"sort-preferences-action\\"' --DEFINES += COPY_ACTION='\\"copy-action\\"' --DEFINES += CUT_ACTION='\\"cut-action\\"' --DEFINES += TRASH_ACTION='\\"trash-action\\"' --DEFINES += DELETE_ACTION='\\"delete-action\\"' --DEFINES += RENAME_ACTION='\\"rename-action\\"' --DEFINES += PASTE_ACTION='\\"paste-action\\"' --DEFINES += REFRESH_ACTION='\\"refresh-action\\"' --DEFINES += SELECT_ALL_ACTION='\\"select-all-action\\"' --DEFINES += REVERSE_SELECT_ACTION='\\"reverse-select-action\\"' --DEFINES += PROPERTIES_ACTION='\\"properties-action\\"' --DEFINES += FORMAT_ACTION='\\"format-action\\"' --DEFINES += CLEAN_THE_TRASH_ACTION='\\"clean-the-trash-action\\"' --DEFINES += RESTORE_ACTION='\\"restore-action\\"' --DEFINES += CLEAN_THE_RECENT_ACTION='\\"clean-the-recent-action\\"' -diff --git a/qt5-ukui-filedialog/sidebar.cpp b/qt5-ukui-filedialog/sidebar.cpp -index 2194f14..66c1f6e 100644 ---- a/qt5-ukui-filedialog/sidebar.cpp -+++ b/qt5-ukui-filedialog/sidebar.cpp -@@ -42,7 +42,7 @@ - #include "peony-qt/file-enumerator.h" - #include "peony-qt/file-utils.h" - #include "peony-qt/file-info.h" --#include "ukui-style-settings.h" -+#include "settings/ukui-style-settings.h" - #include "debug.h" - using namespace UKUIFileDialog; - -diff --git a/qt5-ukui-filedialog/ui_kyfiledialog.cpp b/qt5-ukui-filedialog/ui_kyfiledialog.cpp -deleted file mode 100644 -index 04e1679..0000000 ---- a/qt5-ukui-filedialog/ui_kyfiledialog.cpp -+++ /dev/null -@@ -1,505 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Jing Tan <tanjing@kylinos.cn> -- * -- */ -- --#include "debug.h" --#include "ui_kyfiledialog.h" --#include <QFileDialog> --#include "kyfiledialog.h" --#include "debug.h" --using namespace UKUIFileDialog; --//Ui_KyFileDialog::Ui_KyFileDialog(QDialog *parent) --//{ --// setupUi(parent); --//} -- --Ui_KyFileDialog::Ui_KyFileDialog(QWidget *parent) : QWidget(parent) --{ -- --} -- --Ui_KyFileDialog::~Ui_KyFileDialog() --{ -- pDebug << "Ui_KyFileDialog destory111.........."; --/* -- if(m_pathbarWidget){ -- m_pathbarWidget->deleteLater(); -- m_pathbarWidget = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory122222.........."; -- -- if(m_pathbar){ -- m_pathbar->deleteLater(); -- m_pathbar = nullptr; -- } -- if(m_searchBtn){ -- m_searchBtn->deleteLater(); -- m_searchBtn = nullptr; -- } -- if(m_backButton){ -- m_backButton->deleteLater(); -- m_backButton = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory3223.........."; -- -- if(m_forwardButton){ -- m_forwardButton->deleteLater(); -- m_forwardButton = nullptr; -- } -- if(m_toParentButton){ -- m_toParentButton->deleteLater(); -- m_toParentButton = nullptr; -- } -- if(m_modeButton){ -- m_modeButton->deleteLater(); -- m_modeButton = nullptr; -- } -- if(m_sortButton){ -- m_sortButton->deleteLater(); -- m_sortButton = nullptr; -- } -- if(m_maximizeAndRestore){ -- m_maximizeAndRestore->deleteLater(); -- m_maximizeAndRestore = nullptr; -- } -- if(m_closeButton){ -- m_closeButton->deleteLater(); -- m_closeButton = nullptr; -- } -- if(m_modeMenu){ -- m_modeMenu->deleteLater(); -- m_modeMenu = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory3555423.........."; -- -- if(m_sortMenu){ -- m_sortMenu->deleteLater(); -- m_sortMenu = nullptr; -- } -- if(m_listModeAction){ -- m_listModeAction->deleteLater(); -- m_listModeAction = nullptr; -- } -- if(m_iconModeAction){ -- m_iconModeAction->deleteLater(); -- m_iconModeAction = nullptr; -- } -- if(m_sider){ -- m_sider->deleteLater(); -- m_sider = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory223322.........."; -- -- if(m_frame){ -- m_frame->deleteLater(); -- m_frame = nullptr; -- } -- if(m_splitter){ -- m_splitter->deleteLater(); -- m_splitter = nullptr; -- } -- if(vboxLayout){ -- vboxLayout->deleteLater(); -- vboxLayout = nullptr; -- } -- if(m_treeView){ -- m_treeView->deleteLater(); -- m_treeView = nullptr; -- } -- if(m_fileNameLabel){ -- m_fileNameLabel->deleteLater(); -- m_fileNameLabel = nullptr; -- } -- if(m_fileNameEdit){ -- m_fileNameEdit->deleteLater(); -- m_fileNameEdit = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory1245677.........."; -- -- if(m_fileTypeCombo){ -- m_fileTypeCombo->deleteLater(); -- m_fileTypeCombo = nullptr; -- } -- if(m_newFolderButton){ -- m_newFolderButton->deleteLater(); -- m_newFolderButton = nullptr; -- } -- if(m_acceptButton){ -- m_acceptButton->deleteLater(); -- m_acceptButton = nullptr; -- } -- if(m_rejectButton){ -- m_rejectButton->deleteLater(); -- m_rejectButton = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory23467899.........."; -- -- if(m_upSeperate){ -- m_upSeperate->deleteLater(); -- m_upSeperate = nullptr; -- } -- if(m_downSeperate){ -- m_downSeperate->deleteLater(); -- m_downSeperate = nullptr; -- } -- if(m_widget){ -- m_widget->deleteLater(); -- m_widget = nullptr; -- } -- qDebug() << "destory345.........."; -- -- if(m_container){ -- qDebug() << "destory555.........."; -- -- m_container->deleteLater(); -- m_container = nullptr; -- qDebug() << "destory666.........."; -- -- } -- qDebug() << "destory777.........."; -- -- if(m_siderWidget){ -- m_siderWidget->deleteLater(); -- m_siderWidget = nullptr; -- } -- -- if(m_sortTypeGroup){ -- m_sortTypeGroup->deleteLater(); -- m_sortTypeGroup = nullptr; -- } -- if(m_fileName){ -- m_fileName->deleteLater(); -- m_fileName = nullptr; -- } -- if(m_modifiedDate){ -- m_modifiedDate->deleteLater(); -- m_modifiedDate = nullptr; -- } -- if(m_fileType){ -- m_fileType->deleteLater(); -- m_fileType = nullptr; -- } -- if(m_fileSize){ -- m_fileSize->deleteLater(); -- m_fileSize = nullptr; -- } -- if(m_originalPath){ -- m_originalPath->deleteLater(); -- m_originalPath = nullptr; -- } -- if(m_sortOrderGroup){ -- m_sortOrderGroup->deleteLater(); -- m_sortOrderGroup = nullptr; -- } -- if(m_descending){ -- m_descending->deleteLater(); -- m_descending = nullptr; -- } -- if(m_ascending){ -- m_ascending->deleteLater(); -- m_ascending = nullptr; -- } -- if(m_useGlobalSortAction){ -- m_useGlobalSortAction->deleteLater(); -- m_useGlobalSortAction = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory8888.........."; -- -- if(m_siderLayout){ -- m_siderLayout->deleteLater(); -- m_siderLayout = nullptr; -- } --// if(m_gridLayout){ --// m_gridLayout->deleteLater(); --// m_gridLayout= nullptr; --// } -- -- if(m_hHeaderLayout){ -- m_hHeaderLayout->deleteLater(); -- m_hHeaderLayout = nullptr; -- } -- if(m_hLineEditLayout){ -- m_hLineEditLayout->deleteLater(); -- m_hLineEditLayout = nullptr; -- } -- if(m_hBtnLayout){ -- m_hBtnLayout->deleteLater(); -- m_hBtnLayout = nullptr; -- } -- qDebug() << "Ui_KyFileDialog destory123.........."; --*/ --} -- --void Ui_KyFileDialog::initSortMenu(QDialog *mKyFileDialog) --{ -- m_sortButton = new MenuToolButton(this); -- m_sortMenu = new QMenu(m_sortButton); -- -- m_sortTypeGroup = new QActionGroup(m_sortMenu); -- m_sortTypeGroup->setExclusive(true); -- -- m_fileName = m_sortMenu->addAction(QObject::tr("File Name")); -- m_fileName->setCheckable(true); -- m_sortTypeGroup->addAction(m_fileName); -- -- m_modifiedDate = m_sortMenu->addAction(QObject::tr("Modified Date")); -- m_modifiedDate->setCheckable(true); -- m_sortTypeGroup->addAction(m_modifiedDate); -- -- m_fileType = m_sortMenu->addAction(QObject::tr("File Type")); -- m_fileType->setCheckable(true); -- m_sortTypeGroup->addAction(m_fileType); -- -- m_fileSize = m_sortMenu->addAction(QObject::tr("File Size")); -- m_fileSize->setCheckable(true); -- m_sortTypeGroup->addAction(m_fileSize); -- -- m_originalPath = m_sortMenu->addAction(QObject::tr("Original Path")); -- m_originalPath->setCheckable(true); -- m_sortTypeGroup->addAction(m_originalPath); -- -- m_sortMenu->addSeparator(); -- -- m_sortOrderGroup = new QActionGroup(m_sortMenu); -- m_sortOrderGroup->setExclusive(true); -- -- m_descending = m_sortMenu->addAction(QObject::tr("Descending")); -- m_descending->setCheckable(true); -- m_sortOrderGroup->addAction(m_descending); -- -- //switch defautl Descending Ascending order, fix bug#99924 -- m_ascending = m_sortMenu->addAction(QObject::tr("Ascending")); -- m_ascending->setCheckable(true); -- m_sortOrderGroup->addAction(m_ascending); -- -- m_sortMenu->addSeparator(); -- -- m_useGlobalSortAction = m_sortMenu->addAction(QObject::tr("Use global sorting")); -- m_useGlobalSortAction->setCheckable(true); -- -- m_sortButton->setMenu(m_sortMenu); -- m_sortButton->setPopupMode(QToolButton::InstantPopup); -- m_sortButton->setAutoRaise(true); -- m_sortButton->setFixedSize(QSize(57, 40)); -- m_sortButton->setIconSize(QSize(16, 16)); -- --} -- --void Ui_KyFileDialog::initModeMenu(QDialog *mKyFileDialog) --{ -- m_modeButton = new MenuToolButton(this); -- m_modeButton->setPopupMode(QToolButton::InstantPopup); -- m_modeButton->setAutoRaise(true); -- m_modeButton->setFixedSize(QSize(57, 40)); -- m_modeButton->setIconSize(QSize(16, 16)); -- -- m_modeMenu = new QMenu(m_modeButton); -- m_listModeAction = m_modeMenu->addAction(QIcon::fromTheme("view-list-symbolic"), QObject::tr("List View")); -- m_iconModeAction = m_modeMenu->addAction(QIcon::fromTheme("view-grid-symbolic"), QObject::tr("Icon View")); -- m_listModeAction->setCheckable(true); -- m_iconModeAction->setCheckable(true); -- m_modeButton->setMenu(m_modeMenu); --} -- --void Ui_KyFileDialog::initSiderBar(QDialog *mKyFileDialog) --{ -- m_siderWidget = new QWidget(this); -- m_siderLayout = new QVBoxLayout(); -- m_siderLayout->setContentsMargins(0,0,0,0); -- -- m_sider = new FileDialogSideBar(this); -- m_sider->setAttribute(Qt::WA_TranslucentBackground); --} -- --void Ui_KyFileDialog::initHeaderBar(QDialog *mKyFileDialog) --{ -- m_hHeaderLayout = new QHBoxLayout(this); -- initModeMenu(mKyFileDialog); -- initSortMenu(mKyFileDialog); -- -- m_hHeaderLayout->setContentsMargins(0,0,8,0); -- m_hHeaderLayout->setObjectName(QString::fromUtf8("hboxLayout")); -- m_backButton = new QToolButton(this); -- m_forwardButton = new QToolButton(this); -- m_toParentButton = new QToolButton(this); -- -- m_pathbarWidget = new FileDialogPathBar(this);//new Peony::AdvancedLocationBar(mKyFileDialog);// -- m_pathbar = m_pathbarWidget->getPathBar(); -- m_pathbar->setMinimumWidth(250); -- m_pathbar->setFocusPolicy(Qt::FocusPolicy(m_pathbar->focusPolicy() & ~Qt::TabFocus)); -- -- m_searchBtn = new QToolButton(this); -- -- m_maximizeAndRestore = new QToolButton(this); -- -- m_closeButton = new QToolButton(this); -- m_hHeaderLayout->setAlignment(Qt::AlignVCenter); -- -- m_hHeaderLayout->addWidget(m_backButton); -- m_hHeaderLayout->addWidget(m_forwardButton); -- m_hHeaderLayout->addWidget(m_toParentButton); -- m_hHeaderLayout->addWidget(m_pathbarWidget); -- m_hHeaderLayout->addWidget(m_searchBtn); -- m_hHeaderLayout->addWidget(m_modeButton); -- m_hHeaderLayout->addWidget(m_sortButton); -- m_hHeaderLayout->addWidget(m_maximizeAndRestore); -- m_hHeaderLayout->addWidget(m_closeButton); -- --} -- --void Ui_KyFileDialog::initLineEditLayout(QDialog *mKyFileDialog) --{ -- m_hLineEditLayout = new QHBoxLayout(this); -- m_hLineEditLayout->setContentsMargins(4,0,24,0); -- m_fileNameLabel = new QLabel(this); -- m_fileNameLabel->setObjectName(QString::fromUtf8("fileNameLabel")); -- QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred); -- sizePolicy2.setHorizontalStretch(0); -- sizePolicy2.setVerticalStretch(0); -- sizePolicy2.setHeightForWidth(m_fileNameLabel->sizePolicy().hasHeightForWidth()); -- m_fileNameLabel->setSizePolicy(sizePolicy2); -- m_fileNameLabel->setMinimumSize(QSize(0, 0)); -- pDebug << "3333333333333333333"; -- -- m_fileNameEdit = new QLineEdit(mKyFileDialog); -- m_fileNameEdit->setObjectName("fileNameEdit"); -- QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Fixed); -- sizePolicy3.setHorizontalStretch(1); -- sizePolicy3.setVerticalStretch(0); -- sizePolicy3.setHeightForWidth(m_fileNameEdit->sizePolicy().hasHeightForWidth()); -- m_fileNameEdit->setSizePolicy(sizePolicy3); -- pDebug << "44444444444444444"; -- -- m_fileTypeCombo = new FileDialogComboBox(this); -- QSizePolicy sizePolicy4(QSizePolicy::Expanding, QSizePolicy::Fixed); -- sizePolicy4.setHorizontalStretch(0); -- sizePolicy4.setVerticalStretch(0); -- sizePolicy4.setHeightForWidth(m_fileTypeCombo->sizePolicy().hasHeightForWidth()); -- m_fileTypeCombo->setSizePolicy(sizePolicy4); --// m_fileTypeCombo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength); -- //m_fileTypeCombo->setVisible(false); -- -- m_hLineEditLayout->addWidget(m_fileNameLabel); -- m_hLineEditLayout->addWidget(m_fileNameEdit); -- m_hLineEditLayout->addWidget(m_fileTypeCombo); -- m_hLineEditLayout->setSpacing(15); --} -- --void Ui_KyFileDialog::intiBtnLayout(QDialog *mKyFileDialog) --{ -- m_hBtnLayout = new QHBoxLayout(this); -- m_hBtnLayout->addSpacing(20); -- m_hBtnLayout->setContentsMargins(0,0,24,0); -- m_newFolderButton =new QPushButton(mKyFileDialog); -- m_newFolderButton->setObjectName(QString::fromUtf8("newFolderButton")); -- m_hBtnLayout->addWidget(m_newFolderButton); -- -- -- m_acceptButton = new QPushButton(mKyFileDialog); -- m_rejectButton = new QPushButton(mKyFileDialog); -- m_acceptButton->setEnabled(false); -- m_hBtnLayout->addStretch(); -- m_hBtnLayout->addWidget(m_rejectButton, 0, Qt::AlignRight | Qt::AlignVCenter); -- m_hBtnLayout->addSpacing(15); -- m_hBtnLayout->addWidget(m_acceptButton, 0, Qt::AlignRight | Qt::AlignVCenter); -- -- m_acceptButton->setObjectName(QString::fromUtf8("acceptButton")); -- m_rejectButton->setObjectName(QString::fromUtf8("rejectButton")); -- -- pDebug << "6666666666666666"; --} -- --void Ui_KyFileDialog::setupUi(QDialog *mKyFileDialog) --{ -- if(mKyFileDialog->objectName().isEmpty()) { -- mKyFileDialog->setObjectName(QString::fromUtf8("KyNativeFileDialog")); -- } -- mKyFileDialog->resize(1160, 635); -- -- mKyFileDialog->setSizeGripEnabled(true); -- mKyFileDialog->setAttribute(Qt::WA_TranslucentBackground); -- mKyFileDialog->setContentsMargins(0,0,0,0); -- -- m_gridLayout = new QGridLayout(mKyFileDialog); -- m_gridLayout->setObjectName(QString::fromUtf8("gridLayout")); -- -- m_container = new Peony::DirectoryViewContainer(this); -- m_frame = new QFrame(this); -- vboxLayout = new QVBoxLayout(this); -- -- initSiderBar(mKyFileDialog); -- -- initHeaderBar(mKyFileDialog); -- initLineEditLayout(mKyFileDialog); -- intiBtnLayout(mKyFileDialog); -- -- vboxLayout->addSpacing(8); -- vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); -- vboxLayout->setContentsMargins(0, 0, 0, 0); -- -- vboxLayout->addLayout(m_hHeaderLayout); -- vboxLayout->addSpacing(6); -- m_upSeperate = new QFrame(mKyFileDialog); -- m_upSeperate->setFrameShape(QFrame::HLine); -- m_upSeperate->setFrameShadow(QFrame::Plain); -- vboxLayout->addWidget(m_upSeperate); -- vboxLayout->addSpacing(6); -- vboxLayout->addWidget(m_container); -- vboxLayout->addSpacing(15); -- -- vboxLayout->addLayout(m_hLineEditLayout); -- vboxLayout->addSpacing(16); -- -- m_downSeperate = new QFrame(mKyFileDialog); -- m_downSeperate->setFrameShape(QFrame::HLine); -- m_downSeperate->setFrameShadow(QFrame::Plain); -- vboxLayout->addWidget(m_downSeperate); -- vboxLayout->addSpacing(16); -- -- vboxLayout->addLayout(m_hBtnLayout); -- vboxLayout->addSpacing(25); -- -- m_frame->setFrameShadow(QFrame::Raised); -- m_frame->setFrameShape(QFrame::NoFrame); -- m_frame->setLayout(vboxLayout); -- -- m_splitter = new QSplitter(this); -- m_splitter->setAttribute(Qt::WA_TranslucentBackground); -- QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding); -- sizePolicy1.setHorizontalStretch(0); -- sizePolicy1.setVerticalStretch(0); -- sizePolicy1.setHeightForWidth(m_splitter->sizePolicy().hasHeightForWidth()); -- m_splitter->setSizePolicy(sizePolicy1); -- m_splitter->setOrientation(Qt::Horizontal); -- m_splitter->setHandleWidth(0); -- m_siderLayout->addWidget(m_sider); -- m_siderWidget->setLayout(m_siderLayout); -- m_splitter->addWidget(m_siderWidget); -- m_splitter->setStretchFactor(0, 20); -- m_splitter->addWidget(m_frame); -- m_splitter->setStretchFactor(1, 40); -- int siderWidIndex = m_splitter->indexOf(m_siderWidget); -- int frameIndex = m_splitter->indexOf(m_frame); -- m_splitter->setCollapsible(siderWidIndex, false); -- m_splitter->setCollapsible(frameIndex, false); -- m_gridLayout->addWidget(m_splitter); -- m_gridLayout->setContentsMargins(0,0,0,0); --} -diff --git a/qt5-ukui-filedialog/ui_kyfiledialog.h b/qt5-ukui-filedialog/ui_kyfiledialog.h -deleted file mode 100644 -index 106aaa7..0000000 ---- a/qt5-ukui-filedialog/ui_kyfiledialog.h -+++ /dev/null -@@ -1,126 +0,0 @@ --/* -- * KWin Style UKUI -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This program is free software: you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation, either version 3 of the License, or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: Jing Tan <tanjing@kylinos.cn> -- * -- */ -- --#include "debug.h" --#ifndef UI_KYFILEDIALOG_H --#define UI_KYFILEDIALOG_H --#include <QApplication> --#include <QComboBox> --#include <QTreeView> --#include <QToolButton> --#include <QLineEdit> --#include <QFrame> --#include <QSplitter> --#include <QLabel> --#include <QMenu> --#include <QAction> --#include <QGridLayout> --#include <QHBoxLayout> --#include <QVBoxLayout> --#include <QDialogButtonBox> --#include <QDebug> --#include "sidebar.h" --#include <QSizePolicy> --#include "kyfiledialog.h" --#include <peony-qt/controls/directory-view/directory-view-container.h> --#include <peony-qt/controls/navigation-bar/advanced-location-bar.h> --#include "pathbar.h" --#include <QPushButton> --#include <QToolBar> --#include <QObject> --#include <QDialog> --#include "menutoolbutoon.h" -- --namespace Peony { --class DirectoryViewContainer; --} --namespace UKUIFileDialog { --class Ui_KyFileDialog: public QWidget --{ -- QOBJECT_H -- public: -- explicit Ui_KyFileDialog(QWidget *parent = nullptr); -- ~Ui_KyFileDialog(); -- -- QGridLayout *m_gridLayout = nullptr; -- QHBoxLayout *m_hHeaderLayout = nullptr; -- QHBoxLayout *m_hLineEditLayout = nullptr; -- QHBoxLayout *m_hBtnLayout = nullptr; -- FileDialogPathBar *m_pathbarWidget = nullptr; -- Peony::AdvancedLocationBar *m_pathbar = nullptr; -- QToolButton *m_searchBtn = nullptr; -- //QWidget *m_pathbar = nullptr; -- QToolButton *m_backButton = nullptr; -- QToolButton *m_forwardButton = nullptr; -- QToolButton *m_toParentButton = nullptr; -- MenuToolButton *m_modeButton = nullptr; -- MenuToolButton *m_sortButton = nullptr; -- QToolButton *m_maximizeAndRestore = nullptr; -- QToolButton *m_closeButton = nullptr; -- QMenu *m_modeMenu = nullptr; -- QMenu *m_sortMenu = nullptr; -- QAction *m_listModeAction = nullptr; -- QAction *m_iconModeAction = nullptr; -- FileDialogSideBar *m_sider = nullptr; -- QFrame *m_frame = nullptr; -- QSplitter *m_splitter = nullptr; -- QVBoxLayout *vboxLayout = nullptr; -- QTreeView *m_treeView = nullptr; -- QLabel *m_fileNameLabel = nullptr; -- QLineEdit *m_fileNameEdit = nullptr; -- FileDialogComboBox *m_fileTypeCombo = nullptr; -- QPushButton *m_newFolderButton = nullptr; -- QPushButton *m_acceptButton = nullptr; -- QPushButton *m_rejectButton = nullptr; -- QFrame *m_upSeperate = nullptr; -- QFrame *m_downSeperate = nullptr; -- -- QWidget *m_widget = nullptr; -- Peony::DirectoryViewContainer *m_container = nullptr; -- -- QWidget *m_siderWidget = nullptr; -- QVBoxLayout *m_siderLayout = nullptr; -- -- QActionGroup *m_sortTypeGroup = nullptr; -- QAction *m_fileName = nullptr; -- QAction *m_modifiedDate = nullptr; -- QAction *m_fileType = nullptr; -- QAction *m_fileSize = nullptr; -- QAction *m_originalPath = nullptr; -- QActionGroup *m_sortOrderGroup = nullptr; -- QAction *m_descending = nullptr; -- QAction *m_ascending = nullptr; -- QAction *m_useGlobalSortAction = nullptr; -- --public: -- void setupUi(QDialog *mKyFileDialog); -- --private: -- void initSortMenu(QDialog *mKyFileDialog); -- void initModeMenu(QDialog *mKyFileDialog); -- void initSiderBar(QDialog *mKyFileDialog); -- void initHeaderBar(QDialog *mKyFileDialog); -- void initLineEditLayout(QDialog *mKyFileDialog); -- void intiBtnLayout(QDialog *mKyFileDialog); --}; --} --#endif // UI_KYFILEDIALOG_H -diff --git a/qt5-ukui-filedialog/uikyfiledialog.cpp b/qt5-ukui-filedialog/uikyfiledialog.cpp -new file mode 100644 -index 0000000..48c52b6 ---- /dev/null -+++ b/qt5-ukui-filedialog/uikyfiledialog.cpp -@@ -0,0 +1,505 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#include "debug.h" -+#include "uikyfiledialog.h" -+#include <QFileDialog> -+#include "kyfiledialog.h" -+#include "debug.h" -+using namespace UKUIFileDialog; -+//Ui_KyFileDialog::Ui_KyFileDialog(QDialog *parent) -+//{ -+// setupUi(parent); -+//} -+ -+Ui_KyFileDialog::Ui_KyFileDialog(QWidget *parent) : QWidget(parent) -+{ -+ -+} -+ -+Ui_KyFileDialog::~Ui_KyFileDialog() -+{ -+ pDebug << "Ui_KyFileDialog destory111.........."; -+/* -+ if(m_pathbarWidget){ -+ m_pathbarWidget->deleteLater(); -+ m_pathbarWidget = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory122222.........."; -+ -+ if(m_pathbar){ -+ m_pathbar->deleteLater(); -+ m_pathbar = nullptr; -+ } -+ if(m_searchBtn){ -+ m_searchBtn->deleteLater(); -+ m_searchBtn = nullptr; -+ } -+ if(m_backButton){ -+ m_backButton->deleteLater(); -+ m_backButton = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory3223.........."; -+ -+ if(m_forwardButton){ -+ m_forwardButton->deleteLater(); -+ m_forwardButton = nullptr; -+ } -+ if(m_toParentButton){ -+ m_toParentButton->deleteLater(); -+ m_toParentButton = nullptr; -+ } -+ if(m_modeButton){ -+ m_modeButton->deleteLater(); -+ m_modeButton = nullptr; -+ } -+ if(m_sortButton){ -+ m_sortButton->deleteLater(); -+ m_sortButton = nullptr; -+ } -+ if(m_maximizeAndRestore){ -+ m_maximizeAndRestore->deleteLater(); -+ m_maximizeAndRestore = nullptr; -+ } -+ if(m_closeButton){ -+ m_closeButton->deleteLater(); -+ m_closeButton = nullptr; -+ } -+ if(m_modeMenu){ -+ m_modeMenu->deleteLater(); -+ m_modeMenu = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory3555423.........."; -+ -+ if(m_sortMenu){ -+ m_sortMenu->deleteLater(); -+ m_sortMenu = nullptr; -+ } -+ if(m_listModeAction){ -+ m_listModeAction->deleteLater(); -+ m_listModeAction = nullptr; -+ } -+ if(m_iconModeAction){ -+ m_iconModeAction->deleteLater(); -+ m_iconModeAction = nullptr; -+ } -+ if(m_sider){ -+ m_sider->deleteLater(); -+ m_sider = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory223322.........."; -+ -+ if(m_frame){ -+ m_frame->deleteLater(); -+ m_frame = nullptr; -+ } -+ if(m_splitter){ -+ m_splitter->deleteLater(); -+ m_splitter = nullptr; -+ } -+ if(vboxLayout){ -+ vboxLayout->deleteLater(); -+ vboxLayout = nullptr; -+ } -+ if(m_treeView){ -+ m_treeView->deleteLater(); -+ m_treeView = nullptr; -+ } -+ if(m_fileNameLabel){ -+ m_fileNameLabel->deleteLater(); -+ m_fileNameLabel = nullptr; -+ } -+ if(m_fileNameEdit){ -+ m_fileNameEdit->deleteLater(); -+ m_fileNameEdit = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory1245677.........."; -+ -+ if(m_fileTypeCombo){ -+ m_fileTypeCombo->deleteLater(); -+ m_fileTypeCombo = nullptr; -+ } -+ if(m_newFolderButton){ -+ m_newFolderButton->deleteLater(); -+ m_newFolderButton = nullptr; -+ } -+ if(m_acceptButton){ -+ m_acceptButton->deleteLater(); -+ m_acceptButton = nullptr; -+ } -+ if(m_rejectButton){ -+ m_rejectButton->deleteLater(); -+ m_rejectButton = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory23467899.........."; -+ -+ if(m_upSeperate){ -+ m_upSeperate->deleteLater(); -+ m_upSeperate = nullptr; -+ } -+ if(m_downSeperate){ -+ m_downSeperate->deleteLater(); -+ m_downSeperate = nullptr; -+ } -+ if(m_widget){ -+ m_widget->deleteLater(); -+ m_widget = nullptr; -+ } -+ qDebug() << "destory345.........."; -+ -+ if(m_container){ -+ qDebug() << "destory555.........."; -+ -+ m_container->deleteLater(); -+ m_container = nullptr; -+ qDebug() << "destory666.........."; -+ -+ } -+ qDebug() << "destory777.........."; -+ -+ if(m_siderWidget){ -+ m_siderWidget->deleteLater(); -+ m_siderWidget = nullptr; -+ } -+ -+ if(m_sortTypeGroup){ -+ m_sortTypeGroup->deleteLater(); -+ m_sortTypeGroup = nullptr; -+ } -+ if(m_fileName){ -+ m_fileName->deleteLater(); -+ m_fileName = nullptr; -+ } -+ if(m_modifiedDate){ -+ m_modifiedDate->deleteLater(); -+ m_modifiedDate = nullptr; -+ } -+ if(m_fileType){ -+ m_fileType->deleteLater(); -+ m_fileType = nullptr; -+ } -+ if(m_fileSize){ -+ m_fileSize->deleteLater(); -+ m_fileSize = nullptr; -+ } -+ if(m_originalPath){ -+ m_originalPath->deleteLater(); -+ m_originalPath = nullptr; -+ } -+ if(m_sortOrderGroup){ -+ m_sortOrderGroup->deleteLater(); -+ m_sortOrderGroup = nullptr; -+ } -+ if(m_descending){ -+ m_descending->deleteLater(); -+ m_descending = nullptr; -+ } -+ if(m_ascending){ -+ m_ascending->deleteLater(); -+ m_ascending = nullptr; -+ } -+ if(m_useGlobalSortAction){ -+ m_useGlobalSortAction->deleteLater(); -+ m_useGlobalSortAction = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory8888.........."; -+ -+ if(m_siderLayout){ -+ m_siderLayout->deleteLater(); -+ m_siderLayout = nullptr; -+ } -+// if(m_gridLayout){ -+// m_gridLayout->deleteLater(); -+// m_gridLayout= nullptr; -+// } -+ -+ if(m_hHeaderLayout){ -+ m_hHeaderLayout->deleteLater(); -+ m_hHeaderLayout = nullptr; -+ } -+ if(m_hLineEditLayout){ -+ m_hLineEditLayout->deleteLater(); -+ m_hLineEditLayout = nullptr; -+ } -+ if(m_hBtnLayout){ -+ m_hBtnLayout->deleteLater(); -+ m_hBtnLayout = nullptr; -+ } -+ qDebug() << "Ui_KyFileDialog destory123.........."; -+*/ -+} -+ -+void Ui_KyFileDialog::initSortMenu(QDialog *mKyFileDialog) -+{ -+ m_sortButton = new MenuToolButton(this); -+ m_sortMenu = new QMenu(m_sortButton); -+ -+ m_sortTypeGroup = new QActionGroup(m_sortMenu); -+ m_sortTypeGroup->setExclusive(true); -+ -+ m_fileName = m_sortMenu->addAction(QObject::tr("File Name")); -+ m_fileName->setCheckable(true); -+ m_sortTypeGroup->addAction(m_fileName); -+ -+ m_modifiedDate = m_sortMenu->addAction(QObject::tr("Modified Date")); -+ m_modifiedDate->setCheckable(true); -+ m_sortTypeGroup->addAction(m_modifiedDate); -+ -+ m_fileType = m_sortMenu->addAction(QObject::tr("File Type")); -+ m_fileType->setCheckable(true); -+ m_sortTypeGroup->addAction(m_fileType); -+ -+ m_fileSize = m_sortMenu->addAction(QObject::tr("File Size")); -+ m_fileSize->setCheckable(true); -+ m_sortTypeGroup->addAction(m_fileSize); -+ -+ m_originalPath = m_sortMenu->addAction(QObject::tr("Original Path")); -+ m_originalPath->setCheckable(true); -+ m_sortTypeGroup->addAction(m_originalPath); -+ -+ m_sortMenu->addSeparator(); -+ -+ m_sortOrderGroup = new QActionGroup(m_sortMenu); -+ m_sortOrderGroup->setExclusive(true); -+ -+ m_descending = m_sortMenu->addAction(QObject::tr("Descending")); -+ m_descending->setCheckable(true); -+ m_sortOrderGroup->addAction(m_descending); -+ -+ //switch defautl Descending Ascending order, fix bug#99924 -+ m_ascending = m_sortMenu->addAction(QObject::tr("Ascending")); -+ m_ascending->setCheckable(true); -+ m_sortOrderGroup->addAction(m_ascending); -+ -+ m_sortMenu->addSeparator(); -+ -+ m_useGlobalSortAction = m_sortMenu->addAction(QObject::tr("Use global sorting")); -+ m_useGlobalSortAction->setCheckable(true); -+ -+ m_sortButton->setMenu(m_sortMenu); -+ m_sortButton->setPopupMode(QToolButton::InstantPopup); -+ m_sortButton->setAutoRaise(true); -+ m_sortButton->setFixedSize(QSize(57, 40)); -+ m_sortButton->setIconSize(QSize(16, 16)); -+ -+} -+ -+void Ui_KyFileDialog::initModeMenu(QDialog *mKyFileDialog) -+{ -+ m_modeButton = new MenuToolButton(this); -+ m_modeButton->setPopupMode(QToolButton::InstantPopup); -+ m_modeButton->setAutoRaise(true); -+ m_modeButton->setFixedSize(QSize(57, 40)); -+ m_modeButton->setIconSize(QSize(16, 16)); -+ -+ m_modeMenu = new QMenu(m_modeButton); -+ m_listModeAction = m_modeMenu->addAction(QIcon::fromTheme("view-list-symbolic"), QObject::tr("List View")); -+ m_iconModeAction = m_modeMenu->addAction(QIcon::fromTheme("view-grid-symbolic"), QObject::tr("Icon View")); -+ m_listModeAction->setCheckable(true); -+ m_iconModeAction->setCheckable(true); -+ m_modeButton->setMenu(m_modeMenu); -+} -+ -+void Ui_KyFileDialog::initSiderBar(QDialog *mKyFileDialog) -+{ -+ m_siderWidget = new QWidget(this); -+ m_siderLayout = new QVBoxLayout(); -+ m_siderLayout->setContentsMargins(0,0,0,0); -+ -+ m_sider = new FileDialogSideBar(this); -+ m_sider->setAttribute(Qt::WA_TranslucentBackground); -+} -+ -+void Ui_KyFileDialog::initHeaderBar(QDialog *mKyFileDialog) -+{ -+ m_hHeaderLayout = new QHBoxLayout(this); -+ initModeMenu(mKyFileDialog); -+ initSortMenu(mKyFileDialog); -+ -+ m_hHeaderLayout->setContentsMargins(0,0,8,0); -+ m_hHeaderLayout->setObjectName(QString::fromUtf8("hboxLayout")); -+ m_backButton = new QToolButton(this); -+ m_forwardButton = new QToolButton(this); -+ m_toParentButton = new QToolButton(this); -+ -+ m_pathbarWidget = new FileDialogPathBar(this);//new Peony::AdvancedLocationBar(mKyFileDialog);// -+ m_pathbar = m_pathbarWidget->getPathBar(); -+ m_pathbar->setMinimumWidth(250); -+ m_pathbar->setFocusPolicy(Qt::FocusPolicy(m_pathbar->focusPolicy() & ~Qt::TabFocus)); -+ -+ m_searchBtn = new QToolButton(this); -+ -+ m_maximizeAndRestore = new QToolButton(this); -+ -+ m_closeButton = new QToolButton(this); -+ m_hHeaderLayout->setAlignment(Qt::AlignVCenter); -+ -+ m_hHeaderLayout->addWidget(m_backButton); -+ m_hHeaderLayout->addWidget(m_forwardButton); -+ m_hHeaderLayout->addWidget(m_toParentButton); -+ m_hHeaderLayout->addWidget(m_pathbarWidget); -+ m_hHeaderLayout->addWidget(m_searchBtn); -+ m_hHeaderLayout->addWidget(m_modeButton); -+ m_hHeaderLayout->addWidget(m_sortButton); -+ m_hHeaderLayout->addWidget(m_maximizeAndRestore); -+ m_hHeaderLayout->addWidget(m_closeButton); -+ -+} -+ -+void Ui_KyFileDialog::initLineEditLayout(QDialog *mKyFileDialog) -+{ -+ m_hLineEditLayout = new QHBoxLayout(this); -+ m_hLineEditLayout->setContentsMargins(4,0,24,0); -+ m_fileNameLabel = new QLabel(this); -+ m_fileNameLabel->setObjectName(QString::fromUtf8("fileNameLabel")); -+ QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred); -+ sizePolicy2.setHorizontalStretch(0); -+ sizePolicy2.setVerticalStretch(0); -+ sizePolicy2.setHeightForWidth(m_fileNameLabel->sizePolicy().hasHeightForWidth()); -+ m_fileNameLabel->setSizePolicy(sizePolicy2); -+ m_fileNameLabel->setMinimumSize(QSize(0, 0)); -+ pDebug << "3333333333333333333"; -+ -+ m_fileNameEdit = new QLineEdit(mKyFileDialog); -+ m_fileNameEdit->setObjectName("fileNameEdit"); -+ QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Fixed); -+ sizePolicy3.setHorizontalStretch(1); -+ sizePolicy3.setVerticalStretch(0); -+ sizePolicy3.setHeightForWidth(m_fileNameEdit->sizePolicy().hasHeightForWidth()); -+ m_fileNameEdit->setSizePolicy(sizePolicy3); -+ pDebug << "44444444444444444"; -+ -+ m_fileTypeCombo = new FileDialogComboBox(this); -+ QSizePolicy sizePolicy4(QSizePolicy::Expanding, QSizePolicy::Fixed); -+ sizePolicy4.setHorizontalStretch(0); -+ sizePolicy4.setVerticalStretch(0); -+ sizePolicy4.setHeightForWidth(m_fileTypeCombo->sizePolicy().hasHeightForWidth()); -+ m_fileTypeCombo->setSizePolicy(sizePolicy4); -+// m_fileTypeCombo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength); -+ //m_fileTypeCombo->setVisible(false); -+ -+ m_hLineEditLayout->addWidget(m_fileNameLabel); -+ m_hLineEditLayout->addWidget(m_fileNameEdit); -+ m_hLineEditLayout->addWidget(m_fileTypeCombo); -+ m_hLineEditLayout->setSpacing(15); -+} -+ -+void Ui_KyFileDialog::intiBtnLayout(QDialog *mKyFileDialog) -+{ -+ m_hBtnLayout = new QHBoxLayout(this); -+ m_hBtnLayout->addSpacing(20); -+ m_hBtnLayout->setContentsMargins(0,0,24,0); -+ m_newFolderButton =new QPushButton(mKyFileDialog); -+ m_newFolderButton->setObjectName(QString::fromUtf8("newFolderButton")); -+ m_hBtnLayout->addWidget(m_newFolderButton); -+ -+ -+ m_acceptButton = new QPushButton(mKyFileDialog); -+ m_rejectButton = new QPushButton(mKyFileDialog); -+ m_acceptButton->setEnabled(false); -+ m_hBtnLayout->addStretch(); -+ m_hBtnLayout->addWidget(m_rejectButton, 0, Qt::AlignRight | Qt::AlignVCenter); -+ m_hBtnLayout->addSpacing(15); -+ m_hBtnLayout->addWidget(m_acceptButton, 0, Qt::AlignRight | Qt::AlignVCenter); -+ -+ m_acceptButton->setObjectName(QString::fromUtf8("acceptButton")); -+ m_rejectButton->setObjectName(QString::fromUtf8("rejectButton")); -+ -+ pDebug << "6666666666666666"; -+} -+ -+void Ui_KyFileDialog::setupUi(QDialog *mKyFileDialog) -+{ -+ if(mKyFileDialog->objectName().isEmpty()) { -+ mKyFileDialog->setObjectName(QString::fromUtf8("KyNativeFileDialog")); -+ } -+ mKyFileDialog->resize(1160, 635); -+ -+ mKyFileDialog->setSizeGripEnabled(true); -+ mKyFileDialog->setAttribute(Qt::WA_TranslucentBackground); -+ mKyFileDialog->setContentsMargins(0,0,0,0); -+ -+ m_gridLayout = new QGridLayout(mKyFileDialog); -+ m_gridLayout->setObjectName(QString::fromUtf8("gridLayout")); -+ -+ m_container = new Peony::DirectoryViewContainer(this); -+ m_frame = new QFrame(this); -+ vboxLayout = new QVBoxLayout(this); -+ -+ initSiderBar(mKyFileDialog); -+ -+ initHeaderBar(mKyFileDialog); -+ initLineEditLayout(mKyFileDialog); -+ intiBtnLayout(mKyFileDialog); -+ -+ vboxLayout->addSpacing(8); -+ vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); -+ vboxLayout->setContentsMargins(0, 0, 0, 0); -+ -+ vboxLayout->addLayout(m_hHeaderLayout); -+ vboxLayout->addSpacing(6); -+ m_upSeperate = new QFrame(mKyFileDialog); -+ m_upSeperate->setFrameShape(QFrame::HLine); -+ m_upSeperate->setFrameShadow(QFrame::Plain); -+ vboxLayout->addWidget(m_upSeperate); -+ vboxLayout->addSpacing(6); -+ vboxLayout->addWidget(m_container); -+ vboxLayout->addSpacing(15); -+ -+ vboxLayout->addLayout(m_hLineEditLayout); -+ vboxLayout->addSpacing(16); -+ -+ m_downSeperate = new QFrame(mKyFileDialog); -+ m_downSeperate->setFrameShape(QFrame::HLine); -+ m_downSeperate->setFrameShadow(QFrame::Plain); -+ vboxLayout->addWidget(m_downSeperate); -+ vboxLayout->addSpacing(16); -+ -+ vboxLayout->addLayout(m_hBtnLayout); -+ vboxLayout->addSpacing(25); -+ -+ m_frame->setFrameShadow(QFrame::Raised); -+ m_frame->setFrameShape(QFrame::NoFrame); -+ m_frame->setLayout(vboxLayout); -+ -+ m_splitter = new QSplitter(this); -+ m_splitter->setAttribute(Qt::WA_TranslucentBackground); -+ QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding); -+ sizePolicy1.setHorizontalStretch(0); -+ sizePolicy1.setVerticalStretch(0); -+ sizePolicy1.setHeightForWidth(m_splitter->sizePolicy().hasHeightForWidth()); -+ m_splitter->setSizePolicy(sizePolicy1); -+ m_splitter->setOrientation(Qt::Horizontal); -+ m_splitter->setHandleWidth(0); -+ m_siderLayout->addWidget(m_sider); -+ m_siderWidget->setLayout(m_siderLayout); -+ m_splitter->addWidget(m_siderWidget); -+ m_splitter->setStretchFactor(0, 20); -+ m_splitter->addWidget(m_frame); -+ m_splitter->setStretchFactor(1, 40); -+ int siderWidIndex = m_splitter->indexOf(m_siderWidget); -+ int frameIndex = m_splitter->indexOf(m_frame); -+ m_splitter->setCollapsible(siderWidIndex, false); -+ m_splitter->setCollapsible(frameIndex, false); -+ m_gridLayout->addWidget(m_splitter); -+ m_gridLayout->setContentsMargins(0,0,0,0); -+} -diff --git a/qt5-ukui-filedialog/uikyfiledialog.h b/qt5-ukui-filedialog/uikyfiledialog.h -new file mode 100644 -index 0000000..106aaa7 ---- /dev/null -+++ b/qt5-ukui-filedialog/uikyfiledialog.h -@@ -0,0 +1,126 @@ -+/* -+ * KWin Style UKUI -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#include "debug.h" -+#ifndef UI_KYFILEDIALOG_H -+#define UI_KYFILEDIALOG_H -+#include <QApplication> -+#include <QComboBox> -+#include <QTreeView> -+#include <QToolButton> -+#include <QLineEdit> -+#include <QFrame> -+#include <QSplitter> -+#include <QLabel> -+#include <QMenu> -+#include <QAction> -+#include <QGridLayout> -+#include <QHBoxLayout> -+#include <QVBoxLayout> -+#include <QDialogButtonBox> -+#include <QDebug> -+#include "sidebar.h" -+#include <QSizePolicy> -+#include "kyfiledialog.h" -+#include <peony-qt/controls/directory-view/directory-view-container.h> -+#include <peony-qt/controls/navigation-bar/advanced-location-bar.h> -+#include "pathbar.h" -+#include <QPushButton> -+#include <QToolBar> -+#include <QObject> -+#include <QDialog> -+#include "menutoolbutoon.h" -+ -+namespace Peony { -+class DirectoryViewContainer; -+} -+namespace UKUIFileDialog { -+class Ui_KyFileDialog: public QWidget -+{ -+ QOBJECT_H -+ public: -+ explicit Ui_KyFileDialog(QWidget *parent = nullptr); -+ ~Ui_KyFileDialog(); -+ -+ QGridLayout *m_gridLayout = nullptr; -+ QHBoxLayout *m_hHeaderLayout = nullptr; -+ QHBoxLayout *m_hLineEditLayout = nullptr; -+ QHBoxLayout *m_hBtnLayout = nullptr; -+ FileDialogPathBar *m_pathbarWidget = nullptr; -+ Peony::AdvancedLocationBar *m_pathbar = nullptr; -+ QToolButton *m_searchBtn = nullptr; -+ //QWidget *m_pathbar = nullptr; -+ QToolButton *m_backButton = nullptr; -+ QToolButton *m_forwardButton = nullptr; -+ QToolButton *m_toParentButton = nullptr; -+ MenuToolButton *m_modeButton = nullptr; -+ MenuToolButton *m_sortButton = nullptr; -+ QToolButton *m_maximizeAndRestore = nullptr; -+ QToolButton *m_closeButton = nullptr; -+ QMenu *m_modeMenu = nullptr; -+ QMenu *m_sortMenu = nullptr; -+ QAction *m_listModeAction = nullptr; -+ QAction *m_iconModeAction = nullptr; -+ FileDialogSideBar *m_sider = nullptr; -+ QFrame *m_frame = nullptr; -+ QSplitter *m_splitter = nullptr; -+ QVBoxLayout *vboxLayout = nullptr; -+ QTreeView *m_treeView = nullptr; -+ QLabel *m_fileNameLabel = nullptr; -+ QLineEdit *m_fileNameEdit = nullptr; -+ FileDialogComboBox *m_fileTypeCombo = nullptr; -+ QPushButton *m_newFolderButton = nullptr; -+ QPushButton *m_acceptButton = nullptr; -+ QPushButton *m_rejectButton = nullptr; -+ QFrame *m_upSeperate = nullptr; -+ QFrame *m_downSeperate = nullptr; -+ -+ QWidget *m_widget = nullptr; -+ Peony::DirectoryViewContainer *m_container = nullptr; -+ -+ QWidget *m_siderWidget = nullptr; -+ QVBoxLayout *m_siderLayout = nullptr; -+ -+ QActionGroup *m_sortTypeGroup = nullptr; -+ QAction *m_fileName = nullptr; -+ QAction *m_modifiedDate = nullptr; -+ QAction *m_fileType = nullptr; -+ QAction *m_fileSize = nullptr; -+ QAction *m_originalPath = nullptr; -+ QActionGroup *m_sortOrderGroup = nullptr; -+ QAction *m_descending = nullptr; -+ QAction *m_ascending = nullptr; -+ QAction *m_useGlobalSortAction = nullptr; -+ -+public: -+ void setupUi(QDialog *mKyFileDialog); -+ -+private: -+ void initSortMenu(QDialog *mKyFileDialog); -+ void initModeMenu(QDialog *mKyFileDialog); -+ void initSiderBar(QDialog *mKyFileDialog); -+ void initHeaderBar(QDialog *mKyFileDialog); -+ void initLineEditLayout(QDialog *mKyFileDialog); -+ void intiBtnLayout(QDialog *mKyFileDialog); -+}; -+} -+#endif // UI_KYFILEDIALOG_H -diff --git a/qt5-ukui-platformtheme/CMakeLists.txt b/qt5-ukui-platformtheme/CMakeLists.txt -new file mode 100644 -index 0000000..61620fe ---- /dev/null -+++ b/qt5-ukui-platformtheme/CMakeLists.txt -@@ -0,0 +1,180 @@ -+cmake_minimum_required(VERSION 3.16) -+ -+project(qt5-ukui-platformtheme) -+ -+set(CMAKE_AUTOUIC ON) -+set(CMAKE_AUTOMOC ON) -+set(CMAKE_AUTORCC ON) -+ -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+set(QT_MIN_VERSION "5.12.0") -+set(KF5_MIN_VERSION "5.66.0") -+ -+# QtCreator supports the following variables for Android, which are identical to qmake Android variables. -+# Check http://doc.qt.io/qt-5/deployment-android.html for more information. -+# They need to be set before the find_package(Qt5 ...) call. -+ -+#if(ANDROID) -+# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android") -+# if (ANDROID_ABI STREQUAL "armeabi-v7a") -+# set(ANDROID_EXTRA_LIBS -+# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libcrypto.so -+# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libssl.so) -+# endif() -+#endif() -+ -+find_package(Qt5Gui) -+message(${imported_location}) -+set(LIB_PATH ${imported_location}) -+get_filename_component(PARENT_PATH "${LIB_PATH}" PATH) -+get_filename_component(PARENT_PATH "${PARENT_PATH}" PATH) -+message("qt5-ukui-platformtheme PARENT_PATH: ${PARENT_PATH}") -+set(TARGET_PATH ${PARENT_PATH}) -+ -+find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS -+ DBus -+ Widgets -+ X11Extras -+ Quick -+ QuickControls2 -+) -+ -+foreach(_dir ${Qt5Gui_PRIVATE_INCLUDE_DIRS}) -+ message(${_dir}) -+ -+ string(REGEX MATCHALL "QtGui" matches "${_dir}") -+ list(LENGTH matches match_count) -+# message(STATUS "字符串中包含 ${match_count} 个 'QtGui'") -+ if(${match_count} EQUAL 2) -+ string(REPLACE "QtGui" "QtThemeSupport" ThemeSupport_string "${_dir}") -+ endif() -+endforeach() -+message(${ThemeSupport_string}) -+include_directories(${ThemeSupport_string}) -+ -+include_directories(${Qt5Widgets_PRIVATE_INCLUDE_DIRS}) -+include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) -+ -+ -+find_package(Qt5LinguistTools) -+ -+find_package(KF5WindowSystem ${KF5_MIN_VERSION} CONFIG REQUIRED COMPONENTS) -+find_package(KF5Wayland CONFIG REQUIRED COMPONENTS) -+ -+find_package(X11) -+ -+find_package(PkgConfig) -+pkg_check_modules(QGSETTINGS REQUIRED gsettings-qt) -+pkg_check_modules(REQUIRED Qt5XdgIconLoader) -+pkg_check_modules(REQUIRED kysdk-waylandhelper) -+pkg_check_modules(FONTCONFIG REQUIRED fontconfig) -+pkg_check_modules(FREETYPE2 REQUIRED freetype2) -+pkg_check_modules(GLIB2 REQUIRED glib-2.0 gio-2.0 ) -+pkg_check_modules(KYSDKWAYLANDHELPER REQUIRED kysdk-waylandhelper) -+pkg_check_modules(KYSDKCONF2 REQUIRED kysdk-conf2) -+ -+include_directories(${QGSETTINGS_INCLUDE_DIRS}) -+include_directories(${GLIB2_INCLUDE_DIRS}) -+ -+if (FONTCONFIG_FOUND) -+ include_directories(${FONTCONFIG_INCLUDE_DIRS}) -+ link_directories(${FONTCONFIG_LIBRARY_DIRS}) -+endif() -+if (FREETYPE2_FOUND) -+ include_directories(${FREETYPE2_INCLUDE_DIRS}) -+ link_directories(${FREETYPE2_LIBRARY_DIRS}) -+endif() -+if (KYSDKWAYLANDHELPER_FOUND) -+ include_directories(${KYSDKWAYLANDHELPER_INCLUDE_DIRS}) -+ link_directories(${KYSDKWAYLANDHELPER_LIBRARY_DIRS}) -+endif() -+if (QGSETTINGS_FOUND) -+ include_directories(${QGSETTINGS_INCLUDE_DIRS}) -+ link_directories(${QGSETTINGS_LIBRARY_DIRS}) -+endif() -+if (KYSDKCONF2_FOUND) -+ include_directories(${KYSDKCONF2_INCLUDE_DIRS}) -+ link_directories(${KYSDKCONF2_LIBRARY_DIRS}) -+endif() -+ -+ -+#message(${GLIB2_INCLUDE_DIRS}) -+#message(${FREETYPE2_INCLUDE_DIRS}) -+ -+include_directories(../libqt5-ukui-style/) -+ -+file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") -+file(GLOB_RECURSE Json "*.json") -+ -+message("jsonfiles path:${Json}") -+ -+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources} ${Json}) -+ -+# i18n -+set(UKUI_TRANSLATIONS_DIR "/usr/share/qt5-ukui-platformtheme") -+add_definitions( -+ -DUKUI_TRANSLATIONS_DIR="${UKUI_TRANSLATIONS_DIR}" -+) -+if (NOT DEFINED UPDATE_TRANSLATIONS) -+ set(UPDATE_TRANSLATIONS "No") -+endif() -+ -+# To create a new ts file: lupdate -recursive . -target-language en_US -ts translations/en_US.ts -no-ui-lines -+file(GLOB TS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts") -+ -+# cmake -DUPDATE_TRANSLATIONS=yes -+if (UPDATE_TRANSLATIONS) -+ qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) -+else() -+ qt5_add_translation(QM_FILES ${TS_FILES}) -+endif() -+ -+MESSAGE("QM_FILES PATH: ${QM_FILES}") -+ -+add_custom_target(themetranslations ALL DEPENDS ${QM_FILES}) -+ -+add_library(qt5-ukui-platformtheme MODULE ${sources} ${Json}) -+ -+get_filename_component(PARENT_PATH "${PARENT_PATH}" PATH) -+get_filename_component(PARENT_PATH "${PARENT_PATH}" PATH) -+set(themesupport_dir ${PARENT_PATH}) -+ -+message("_qt5Widgets_install_prefix_path:${themesupport_dir}") -+target_link_libraries(qt5-ukui-platformtheme -+ Qt5::Widgets -+ Qt5::DBus -+ Qt5::Gui -+ Qt5::X11Extras -+ Qt5::Quick -+ Qt5::QuickControls2 -+ KF5::WaylandClient -+ KF5::WindowSystem -+ ${QGSETTINGS_LIBRARIES} -+ ${KYSDKWAYLANDHELPER_LIBRARIES} -+ xcb -+ glib-2.0 -+ ${XCB_LIBS} -+ qt5-ukui-style -+ ${KYSDKCONF2_LIBRARIES} -+ ${FONTCONFIG_LIBRARIES} -+ ${FREETYPE2_LIBRARIES} -+ "${themesupport_dir}/libQt5ThemeSupport.a" #link Qt5ThemeSupport -+ ) -+ -+add_definitions(-DQT5UKUIPLATFORMTHEME_LIBRARY) -+add_definitions(-DQT_DEPRECATED_WARNINGS) -+add_definitions(-DQT_MESSAGELOGCONTEXT) -+ -+set(UKUIPLATFORMTHEME_DIR ${TARGET_PATH}) -+target_compile_definitions(${PROJECT_NAME} PRIVATE UKUIPLATFORMTHEME_DIR="${UKUIPLATFORMTHEME_DIR}") -+ -+message("DUKUIPLATFORMTHEME_DIR path: ${UKUIPLATFORMTHEME_DIR}") -+if(UNIX) -+ MESSAGE("libqt5-ukui-platformtheme TARGET_PATH: ${TARGET_PATH}") -+ -+ install(TARGETS ${PROJECT_NAME} DESTINATION ${TARGET_PATH}/platformthemes/) -+ -+ install(FILES ${QM_FILES} DESTINATION "${UKUI_TRANSLATIONS_DIR}") -+endif() -diff --git a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -index 12215ed..f70e313 100644 ---- a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -+++ b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -@@ -23,8 +23,8 @@ - #include <QVariant> - #include <QStandardPaths> - #include "qt5-ukui-platform-theme.h" --#include "ukui-style-settings.h" --#include "highlight-effect.h" -+#include "settings/ukui-style-settings.h" -+#include "effects/highlight-effect.h" - - #include <QFontDatabase> - #include <QApplication> -@@ -291,8 +291,13 @@ bool Qt5UKUIPlatformTheme::usePlatformNativeDialog(DialogType type) const - QPlatformDialogHelper *Qt5UKUIPlatformTheme::createPlatformDialogHelper(DialogType type) const - { - QObject* plugin = nullptr; -- if (QFile::exists(QString("%1/platformthemes/libqt5-ukui-filedialog.so").arg(QT_PLUGIN_INSTALL_DIRS))) { -- QPluginLoader loader(QString("%1/platformthemes/libqt5-ukui-filedialog.so").arg(QT_PLUGIN_INSTALL_DIRS)); -+ const char* c = UKUIPLATFORMTHEME_DIR; -+ QString path = QString::fromUtf8(c); -+ qDebug() << "UKUIPLATFORMTHEME_DIR..." << path; -+ -+ //QString path = UKUIPLATFORMTHEME_DIR; -+ if (QFile::exists(QString("%1/platformthemes/libqt5-ukui-filedialog.so").arg(path))) { -+ QPluginLoader loader(QString("%1/platformthemes/libqt5-ukui-filedialog.so").arg(path)); - plugin = loader.instance(); - } - -diff --git a/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro b/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro -deleted file mode 100644 -index 9e597ee..0000000 ---- a/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro -+++ /dev/null -@@ -1,81 +0,0 @@ --#------------------------------------------------- --# --# Project created by QtCreator 2019-12-31T14:19:01 --# --#------------------------------------------------- -- --QT += widgets dbus gui-private widgets-private x11extras quick quickcontrols2 KWindowSystem -- --greaterThan(QT_MAJOR_VERSION, 5)|greaterThan(QT_MINOR_VERSION, 7): \ -- QT += theme_support-private --else: \ -- QT += platformsupport-private -- --TARGET = qt5-ukui-platformtheme --TEMPLATE = lib --CONFIG += plugin --CONFIG += c++11 link_pkgconfig lrelease --PKGCONFIG += gsettings-qt Qt5XdgIconLoader kysdk-waylandhelper fontconfig freetype2 gio-2.0 kysdk-conf2 --LIBS += -lX11 -lfontconfig -lfreetype -- --include(../libqt5-ukui-style/libqt5-ukui-style.pri) -- --DEFINES += QT5UKUIPLATFORMTHEME_LIBRARY -- --XDG_ICON_ENGINE = $$[QT_INSTALL_PLUGINS]/iconengines/libQt5XdgIconPlugin.so --DEFINES += XDG_ICON_ENGINE_PATH='\\"$${XDG_ICON_ENGINE}\\"' -- --QT_PLUGIN_INSTALL_DIRS = $$[QT_INSTALL_PLUGINS] --DEFINES += QT_PLUGIN_INSTALL_DIRS='\\"$${QT_PLUGIN_INSTALL_DIRS}\\"' -- --# The following define makes your compiler emit warnings if you use --# any feature of Qt which has been marked as deprecated (the exact warnings --# depend on your compiler). Please consult the documentation of the --# deprecated API in order to know how to port your code away from it. --DEFINES += QT_DEPRECATED_WARNINGS --#DEFINES += QT_NO_DEBUG_OUTPUT --DEFINES += QT_MESSAGELOGCONTEXT -- --# You can also make your code fail to compile if you use deprecated APIs. --# In order to do so, uncomment the following line. --# You can also select to disable deprecated APIs only up to a certain version of Qt. --#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -- --include(widget/widget.pri) -- --SOURCES += \ -- qt5-ukui-platform-theme.cpp \ -- platform-theme-fontdata.cpp \ -- xatom-helper.cpp \ -- main.cpp -- --HEADERS += \ -- qt5-ukui-platform-theme.h \ -- qt5-ukui-platformtheme_global.h \ -- platform-theme-fontdata.h \ -- ../qt5-ukui-filedialog/filedialoginterface.h \ -- xatom-helper.h -- --TRANSLATIONS += \ -- translations/qt5-ukui-platformtheme_zh_CN.ts \ -- translations/qt5-ukui-platformtheme_en_US.ts \ -- translations/qt5-ukui-platformtheme_fa.ts \ -- translations/qt5-ukui-platformtheme_fr.ts \ -- translations/qt5-ukui-platformtheme_cs.ts \ -- translations/qt5-ukui-platformtheme_bo_CN.ts \ -- translations/qt5-ukui-platformtheme_tr.ts \ -- translations/qt5-ukui-platformtheme_mn.ts \ -- translations/qt5-ukui-platformtheme_kk.ts \ -- translations/qt5-ukui-platformtheme_ky.ts \ -- translations/qt5-ukui-platformtheme_ug.ts \ -- translations/qt5-ukui-platformtheme_zh_HK.ts -- --unix { -- target.path = $$[QT_INSTALL_PLUGINS]/platformthemes -- INSTALLS += target -- -- QM_FILES_INSTALL_PATH=/usr/share/qt5-ukui-platformtheme --} -- --DISTFILES += \ -- ukui.json -diff --git a/qt5-ukui-platformtheme/widget/widget.pri b/qt5-ukui-platformtheme/widget/widget.pri -deleted file mode 100644 -index 7aa0144..0000000 ---- a/qt5-ukui-platformtheme/widget/widget.pri -+++ /dev/null -@@ -1,5 +0,0 @@ --HEADERS += \ -- $$PWD/messagebox/message-box.h \ -- --SOURCES += \ -- $$PWD/messagebox/message-box.cpp \ -diff --git a/qt5-ukui.pro b/qt5-ukui.pro -deleted file mode 100644 -index 3db2d03..0000000 ---- a/qt5-ukui.pro -+++ /dev/null -@@ -1,10 +0,0 @@ --TEMPLATE = subdirs -- --SUBDIRS += \ -- ukui-qqc2-style \ -- qt5-ukui-filedialog \ -- ukui-qml-style-helper \ -- qt5-ukui-platformtheme \ -- ukui-styles \ -- libqt5-ukui-style \ -- test -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -new file mode 100644 -index 0000000..c659fa4 ---- /dev/null -+++ b/test/CMakeLists.txt -@@ -0,0 +1,9 @@ -+project(test) -+add_subdirectory(custom-shadow) -+add_subdirectory(filedialog) -+add_subdirectory(highlighted-icon-button) -+add_subdirectory(messagebox) -+add_subdirectory(region-blur) -+add_subdirectory(system-settings) -+add_subdirectory(tabwidget) -+add_subdirectory(mps-style-application) -diff --git a/test/custom-shadow/CMakeLists.txt b/test/custom-shadow/CMakeLists.txt -new file mode 100644 -index 0000000..8e304e4 ---- /dev/null -+++ b/test/custom-shadow/CMakeLists.txt -@@ -0,0 +1,31 @@ -+cmake_minimum_required(VERSION 3.16) -+ -+project(custom-shadow) -+ -+set(CMAKE_AUTOUIC ON) -+set(CMAKE_AUTOMOC ON) -+set(CMAKE_AUTORCC ON) -+ -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+set(QT_MIN_VERSION "5.12.0") -+ -+find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS -+ Core -+ Widgets -+ Gui -+) -+ -+file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") -+ -+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) -+ -+add_executable(${PROJECT_NAME} ${sources}) -+ -+target_link_libraries(${PROJECT_NAME} PRIVATE -+ Qt5::Widgets -+ Qt5::Core -+ Qt5::Gui -+) -+ -diff --git a/test/custom-shadow/custom-shadow.pro b/test/custom-shadow/custom-shadow.pro -deleted file mode 100644 -index e0c69d3..0000000 ---- a/test/custom-shadow/custom-shadow.pro -+++ /dev/null -@@ -1,28 +0,0 @@ --QT += core gui -- --greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -- --CONFIG += c++11 -- --# The following define makes your compiler emit warnings if you use --# any Qt feature that has been marked deprecated (the exact warnings --# depend on your compiler). Please consult the documentation of the --# deprecated API in order to know how to port your code away from it. --DEFINES += QT_DEPRECATED_WARNINGS -- --# You can also make your code fail to compile if it uses deprecated APIs. --# In order to do so, uncomment the following line. --# You can also select to disable deprecated APIs only up to a certain version of Qt. --#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -- --SOURCES += \ -- main.cpp \ -- mainwindow.cpp -- --HEADERS += \ -- mainwindow.h -- --# Default rules for deployment. --#qnx: target.path = /tmp/$${TARGET}/bin --#else: unix:!android: target.path = /opt/$${TARGET}/bin --#!isEmpty(target.path): INSTALLS += target -diff --git a/test/filedialog/CMakeLists.txt b/test/filedialog/CMakeLists.txt -new file mode 100644 -index 0000000..2eabd24 ---- /dev/null -+++ b/test/filedialog/CMakeLists.txt -@@ -0,0 +1,31 @@ -+cmake_minimum_required(VERSION 3.16) -+ -+project(filedialog) -+ -+set(CMAKE_AUTOUIC ON) -+set(CMAKE_AUTOMOC ON) -+set(CMAKE_AUTORCC ON) -+ -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+set(QT_MIN_VERSION "5.12.0") -+ -+find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS -+ Core -+ Widgets -+ Gui -+) -+ -+file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") -+ -+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) -+ -+add_executable(${PROJECT_NAME} ${sources}) -+ -+target_link_libraries(${PROJECT_NAME} PRIVATE -+ Qt5::Widgets -+ Qt5::Core -+ Qt5::Gui -+) -+ -diff --git a/test/filedialog/filedialog.pro b/test/filedialog/filedialog.pro -deleted file mode 100644 -index 00c0d0d..0000000 ---- a/test/filedialog/filedialog.pro -+++ /dev/null -@@ -1,31 +0,0 @@ --QT += core gui -- --greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -- --CONFIG += c++11 -- --# The following define makes your compiler emit warnings if you use --# any Qt feature that has been marked deprecated (the exact warnings --# depend on your compiler). Please consult the documentation of the --# deprecated API in order to know how to port your code away from it. --DEFINES += QT_DEPRECATED_WARNINGS -- --# You can also make your code fail to compile if it uses deprecated APIs. --# In order to do so, uncomment the following line. --# You can also select to disable deprecated APIs only up to a certain version of Qt. --#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -- --SOURCES += \ -- main.cpp \ -- mainwindow.cpp -- --HEADERS += \ -- mainwindow.h -- --FORMS += \ -- mainwindow.ui -- --# Default rules for deployment. --#qnx: target.path = /tmp/$${TARGET}/bin --#else: unix:!android: target.path = /opt/$${TARGET}/bin --#!isEmpty(target.path): INSTALLS += target -diff --git a/test/highlighted-icon-button/CMakeLists.txt b/test/highlighted-icon-button/CMakeLists.txt -new file mode 100644 -index 0000000..527be30 ---- /dev/null -+++ b/test/highlighted-icon-button/CMakeLists.txt -@@ -0,0 +1,31 @@ -+cmake_minimum_required(VERSION 3.16) -+ -+project(highlighted-icon-button) -+ -+set(CMAKE_AUTOUIC ON) -+set(CMAKE_AUTOMOC ON) -+set(CMAKE_AUTORCC ON) -+ -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+set(QT_MIN_VERSION "5.12.0") -+ -+find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS -+ Core -+ Widgets -+ Gui -+) -+ -+file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") -+ -+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) -+ -+add_executable(${PROJECT_NAME} ${sources}) -+ -+target_link_libraries(${PROJECT_NAME} PRIVATE -+ Qt5::Widgets -+ Qt5::Core -+ Qt5::Gui -+) -+ -diff --git a/test/highlighted-icon-button/highlighted-icon-button.pro b/test/highlighted-icon-button/highlighted-icon-button.pro -deleted file mode 100644 -index 00c0d0d..0000000 ---- a/test/highlighted-icon-button/highlighted-icon-button.pro -+++ /dev/null -@@ -1,31 +0,0 @@ --QT += core gui -- --greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -- --CONFIG += c++11 -- --# The following define makes your compiler emit warnings if you use --# any Qt feature that has been marked deprecated (the exact warnings --# depend on your compiler). Please consult the documentation of the --# deprecated API in order to know how to port your code away from it. --DEFINES += QT_DEPRECATED_WARNINGS -- --# You can also make your code fail to compile if it uses deprecated APIs. --# In order to do so, uncomment the following line. --# You can also select to disable deprecated APIs only up to a certain version of Qt. --#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -- --SOURCES += \ -- main.cpp \ -- mainwindow.cpp -- --HEADERS += \ -- mainwindow.h -- --FORMS += \ -- mainwindow.ui -- --# Default rules for deployment. --#qnx: target.path = /tmp/$${TARGET}/bin --#else: unix:!android: target.path = /opt/$${TARGET}/bin --#!isEmpty(target.path): INSTALLS += target -diff --git a/test/messagebox/CMakeLists.txt b/test/messagebox/CMakeLists.txt -new file mode 100644 -index 0000000..4dc0520 ---- /dev/null -+++ b/test/messagebox/CMakeLists.txt -@@ -0,0 +1,31 @@ -+cmake_minimum_required(VERSION 3.16) -+ -+project(messagebox) -+ -+set(CMAKE_AUTOUIC ON) -+set(CMAKE_AUTOMOC ON) -+set(CMAKE_AUTORCC ON) -+ -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+set(QT_MIN_VERSION "5.12.0") -+ -+find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS -+ Core -+ Widgets -+ Gui -+) -+ -+file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") -+ -+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) -+ -+add_executable(${PROJECT_NAME} ${sources}) -+ -+target_link_libraries(${PROJECT_NAME} PRIVATE -+ Qt5::Widgets -+ Qt5::Core -+ Qt5::Gui -+) -+ -diff --git a/test/messagebox/messagebox.pro b/test/messagebox/messagebox.pro -deleted file mode 100644 -index a50ff7f..0000000 ---- a/test/messagebox/messagebox.pro -+++ /dev/null -@@ -1,19 +0,0 @@ --QT += core gui -- --greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -- --CONFIG += c++11 -- --# You can make your code fail to compile if it uses deprecated APIs. --# In order to do so, uncomment the following line. --#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -- --SOURCES += \ -- main.cpp -- --HEADERS += -- --# Default rules for deployment. --#qnx: target.path = /tmp/$${TARGET}/bin --#else: unix:!android: target.path = /opt/$${TARGET}/bin --#!isEmpty(target.path): INSTALLS += target -diff --git a/test/mps-style-application/CMakeLists.txt b/test/mps-style-application/CMakeLists.txt -new file mode 100644 -index 0000000..c340dfe ---- /dev/null -+++ b/test/mps-style-application/CMakeLists.txt -@@ -0,0 +1,45 @@ -+cmake_minimum_required(VERSION 3.16) -+ -+project(mps-style-application) -+ -+set(CMAKE_AUTOUIC ON) -+set(CMAKE_AUTOMOC ON) -+set(CMAKE_AUTORCC ON) -+ -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+set(QT_MIN_VERSION "5.12.0") -+ -+find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS -+ Core -+ Widgets -+ Gui -+) -+ -+find_package(PkgConfig) -+pkg_check_modules(Qsettings REQUIRED gsettings-qt) -+pkg_check_modules(KYSDKCONF2 REQUIRED kysdk-conf2) -+ -+include_directories(${Qsettings_INCLUDE_DIRS}) -+include_directories(../../libqt5-ukui-style/internal-styles) -+if (KYSDKCONF2_FOUND) -+ include_directories(${KYSDKCONF2_INCLUDE_DIRS}) -+ link_directories(${KYSDKCONF2_LIBRARY_DIRS}) -+endif() -+ -+file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") -+ -+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) -+ -+add_executable(${PROJECT_NAME} ${sources}) -+ -+target_link_libraries(${PROJECT_NAME} PRIVATE -+ Qt5::Widgets -+ Qt5::Core -+ Qt5::Gui -+ gsettings-qt -+ qt5-ukui-style -+ ${KYSDKCONF2_LIBRARIES} -+) -+ -diff --git a/test/mps-style-application/main.cpp b/test/mps-style-application/main.cpp -index 0683598..dbe7738 100644 ---- a/test/mps-style-application/main.cpp -+++ b/test/mps-style-application/main.cpp -@@ -23,7 +23,7 @@ - #include "mainwindow.h" - #include <QApplication> - --#include "internal-styles/mps-style.h" -+#include "mps-style.h" - - int main(int argc, char *argv[]) - { -diff --git a/test/mps-style-application/mps-style-application.pro b/test/mps-style-application/mps-style-application.pro -deleted file mode 100644 -index 2eef99d..0000000 ---- a/test/mps-style-application/mps-style-application.pro -+++ /dev/null -@@ -1,43 +0,0 @@ --#------------------------------------------------- --# --# Project created by QtCreator 2020-02-11T15:20:45 --# --#------------------------------------------------- -- --QT += core gui -- --greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -- --TARGET = mps-style-application --TEMPLATE = app -- --# The following define makes your compiler emit warnings if you use --# any feature of Qt which has been marked as deprecated (the exact warnings --# depend on your compiler). Please consult the documentation of the --# deprecated API in order to know how to port your code away from it. --DEFINES += QT_DEPRECATED_WARNINGS -- --# You can also make your code fail to compile if you use deprecated APIs. --# In order to do so, uncomment the following line. --# You can also select to disable deprecated APIs only up to a certain version of Qt. --#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -- --CONFIG += plugin c++11 link_pkgconfig --PKGCONFIG += gsettings-qt gio-2.0 kysdk-conf2 -- --include(../../libqt5-ukui-style/libqt5-ukui-style.pri) -- --SOURCES += \ -- main.cpp \ -- mainwindow.cpp -- --HEADERS += \ -- mainwindow.h -- --FORMS += \ -- mainwindow.ui -- --# Default rules for deployment. --#qnx: target.path = /tmp/$${TARGET}/bin --#else: unix:!android: target.path = /opt/$${TARGET}/bin --#!isEmpty(target.path): INSTALLS += target -diff --git a/test/region-blur/CMakeLists.txt b/test/region-blur/CMakeLists.txt -new file mode 100644 -index 0000000..d381fda ---- /dev/null -+++ b/test/region-blur/CMakeLists.txt -@@ -0,0 +1,31 @@ -+cmake_minimum_required(VERSION 3.16) -+ -+project(region-blur) -+ -+set(CMAKE_AUTOUIC ON) -+set(CMAKE_AUTOMOC ON) -+set(CMAKE_AUTORCC ON) -+ -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+set(QT_MIN_VERSION "5.12.0") -+ -+find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS -+ Core -+ Widgets -+ Gui -+) -+ -+file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") -+ -+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) -+ -+add_executable(${PROJECT_NAME} ${sources}) -+ -+target_link_libraries(${PROJECT_NAME} PRIVATE -+ Qt5::Widgets -+ Qt5::Core -+ Qt5::Gui -+) -+ -diff --git a/test/region-blur/region-blur.pro b/test/region-blur/region-blur.pro -deleted file mode 100644 -index 3799b52..0000000 ---- a/test/region-blur/region-blur.pro -+++ /dev/null -@@ -1,37 +0,0 @@ --#------------------------------------------------- --# --# Project created by QtCreator 2020-01-03T10:58:54 --# --#------------------------------------------------- -- --QT += core gui -- --greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -- --TARGET = region-blur --TEMPLATE = app -- --# The following define makes your compiler emit warnings if you use --# any feature of Qt which has been marked as deprecated (the exact warnings --# depend on your compiler). Please consult the documentation of the --# deprecated API in order to know how to port your code away from it. --DEFINES += QT_DEPRECATED_WARNINGS -- --# You can also make your code fail to compile if you use deprecated APIs. --# In order to do so, uncomment the following line. --# You can also select to disable deprecated APIs only up to a certain version of Qt. --#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -- --CONFIG += c++11 -- --SOURCES += \ -- main.cpp \ -- mainwindow.cpp -- --HEADERS += \ -- mainwindow.h -- --# Default rules for deployment. --#qnx: target.path = /tmp/$${TARGET}/bin --#else: unix:!android: target.path = /opt/$${TARGET}/bin --#!isEmpty(target.path): INSTALLS += target -diff --git a/test/system-settings/CMakeLists.txt b/test/system-settings/CMakeLists.txt -new file mode 100644 -index 0000000..7b6eeee ---- /dev/null -+++ b/test/system-settings/CMakeLists.txt -@@ -0,0 +1,36 @@ -+cmake_minimum_required(VERSION 3.16) -+ -+project(system-settings) -+ -+set(CMAKE_AUTOUIC ON) -+set(CMAKE_AUTOMOC ON) -+set(CMAKE_AUTORCC ON) -+ -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+set(QT_MIN_VERSION "5.12.0") -+ -+find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS -+ Core -+ Widgets -+ Gui -+) -+ -+find_package(PkgConfig) -+pkg_check_modules(Qsettings REQUIRED gsettings-qt) -+include_directories(${Qsettings_INCLUDE_DIRS}) -+ -+file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") -+ -+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) -+ -+add_executable(${PROJECT_NAME} ${sources}) -+ -+target_link_libraries(${PROJECT_NAME} PRIVATE -+ Qt5::Widgets -+ Qt5::Core -+ Qt5::Gui -+ gsettings-qt -+) -+ -diff --git a/test/system-settings/system-settings.pro b/test/system-settings/system-settings.pro -deleted file mode 100644 -index 78fbe13..0000000 ---- a/test/system-settings/system-settings.pro -+++ /dev/null -@@ -1,41 +0,0 @@ --#------------------------------------------------- --# --# Project created by QtCreator 2020-01-03T20:37:30 --# --#------------------------------------------------- -- --QT += core gui -- --greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -- --TARGET = system-settings --TEMPLATE = app -- --# The following define makes your compiler emit warnings if you use --# any feature of Qt which has been marked as deprecated (the exact warnings --# depend on your compiler). Please consult the documentation of the --# deprecated API in order to know how to port your code away from it. --DEFINES += QT_DEPRECATED_WARNINGS -- --# You can also make your code fail to compile if you use deprecated APIs. --# In order to do so, uncomment the following line. --# You can also select to disable deprecated APIs only up to a certain version of Qt. --#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -- --CONFIG += c++11 link_pkgconfig --PKGCONFIG += gsettings-qt -- --SOURCES += \ -- main.cpp \ -- mainwindow.cpp -- --HEADERS += \ -- mainwindow.h -- --FORMS += \ -- mainwindow.ui -- --# Default rules for deployment. --#qnx: target.path = /tmp/$${TARGET}/bin --#else: unix:!android: target.path = /opt/$${TARGET}/bin --#!isEmpty(target.path): INSTALLS += target -diff --git a/test/tabwidget/CMakeLists.txt b/test/tabwidget/CMakeLists.txt -new file mode 100644 -index 0000000..f3f840a ---- /dev/null -+++ b/test/tabwidget/CMakeLists.txt -@@ -0,0 +1,31 @@ -+cmake_minimum_required(VERSION 3.16) -+ -+project(tabwidget) -+ -+set(CMAKE_AUTOUIC ON) -+set(CMAKE_AUTOMOC ON) -+set(CMAKE_AUTORCC ON) -+ -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+set(QT_MIN_VERSION "5.12.0") -+ -+find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS -+ Core -+ Widgets -+ Gui -+) -+ -+file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") -+ -+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) -+ -+add_executable(${PROJECT_NAME} ${sources}) -+ -+target_link_libraries(${PROJECT_NAME} PRIVATE -+ Qt5::Widgets -+ Qt5::Core -+ Qt5::Gui -+) -+ -diff --git a/test/tabwidget/tabwidget.pro b/test/tabwidget/tabwidget.pro -deleted file mode 100644 -index ba67050..0000000 ---- a/test/tabwidget/tabwidget.pro -+++ /dev/null -@@ -1,37 +0,0 @@ --#------------------------------------------------- --# --# Project created by QtCreator 2020-01-09T11:25:46 --# --#------------------------------------------------- -- --QT += core gui -- --greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -- --TARGET = tabwidget --TEMPLATE = app -- --# The following define makes your compiler emit warnings if you use --# any feature of Qt which has been marked as deprecated (the exact warnings --# depend on your compiler). Please consult the documentation of the --# deprecated API in order to know how to port your code away from it. --DEFINES += QT_DEPRECATED_WARNINGS -- --# You can also make your code fail to compile if you use deprecated APIs. --# In order to do so, uncomment the following line. --# You can also select to disable deprecated APIs only up to a certain version of Qt. --#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -- --CONFIG += c++11 -- --SOURCES += \ -- main.cpp \ -- widget.cpp -- --HEADERS += \ -- widget.h -- --# Default rules for deployment. --#qnx: target.path = /tmp/$${TARGET}/bin --#else: unix:!android: target.path = /opt/$${TARGET}/bin --#!isEmpty(target.path): INSTALLS += target -diff --git a/test/test.pro b/test/test.pro -deleted file mode 100644 -index 7d4a951..0000000 ---- a/test/test.pro -+++ /dev/null -@@ -1,11 +0,0 @@ --TEMPLATE = subdirs -- --SUBDIRS += \ -- custom-shadow \ -- filedialog \ -- highlighted-icon-button \ -- messagebox \ -- region-blur \ -- system-settings \ -- tabwidget \ -- mps-style-application -diff --git a/ukui-qml-style-helper/CMakeLists.txt b/ukui-qml-style-helper/CMakeLists.txt -new file mode 100644 -index 0000000..4d1c89e ---- /dev/null -+++ b/ukui-qml-style-helper/CMakeLists.txt -@@ -0,0 +1,59 @@ -+cmake_minimum_required(VERSION 3.16) -+ -+project(ukui-qml-style-helper) -+ -+set(CMAKE_AUTOUIC ON) -+set(CMAKE_AUTOMOC ON) -+set(CMAKE_AUTORCC ON) -+ -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+set(QT_MIN_VERSION "5.12.0") -+set(KF5_MIN_VERSION "5.66.0") -+ -+find_package(Qt5Quick) -+message(${imported_location}) -+set(LIB_PATH ${imported_location}) -+get_filename_component(PARENT_PATH "${LIB_PATH}" PATH) -+message(1111) -+message("ukui-qml-style-helper PARENT_PATH: ${PARENT_PATH}") -+ -+find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS -+ Widgets -+) -+find_package(KF5Kirigami2 CONFIG REQUIRED COMPONENTS) -+find_package(KF5Config CONFIG REQUIRED COMPONENTS) -+ -+find_package(PkgConfig REQUIRED) -+pkg_check_modules(Qsettings REQUIRED gsettings-qt) -+include_directories(${Qsettings_INCLUDE_DIRS}) -+ -+file(GLOB_RECURSE HEADER_FILES "*.h") -+file(GLOB_RECURSE SRC_FILES "*.cpp") -+file(GLOB_RECURSE OTHER_FILES qmldir) -+ -+SOURCE_GROUP("Header Files" FILES ${HEADER_FILES}) -+SOURCE_GROUP("Source Files" FILES ${SRC_FILES}) -+SOURCE_GROUP("other files" FILES ${OTHER_FILES}) -+ -+include_directories(../libqt5-ukui-style/) -+ -+add_library(ukui-qml-style-helper MODULE ${HEADER_FILES} ${SRC_FILES} ${OTHER_FILES}) -+ -+target_link_libraries(ukui-qml-style-helper PRIVATE -+ KF5::ConfigCore -+ KF5::Kirigami2 -+ Qt5::Quick -+ Qt5::Widgets -+ gsettings-qt -+ qt5-ukui-style -+ ) -+ -+if(UNIX) -+ set(TARGET_PATH "${PARENT_PATH}/qt5/qml/org/ukui/qqc2style/private/") -+ MESSAGE("libukui-qml-style-helper TARGET_PATH: ${TARGET_PATH}") -+ -+ install(TARGETS ${PROJECT_NAME} DESTINATION ${TARGET_PATH}) -+ install(FILES ${OTHER_FILES} DESTINATION "${TARGET_PATH}") -+endif() -diff --git a/ukui-qml-style-helper/KyIcon.cpp b/ukui-qml-style-helper/KyIcon.cpp -index 7cd51cc..037fd51 100644 ---- a/ukui-qml-style-helper/KyIcon.cpp -+++ b/ukui-qml-style-helper/KyIcon.cpp -@@ -25,7 +25,7 @@ - #include <QStyle> - #include <QPainter> - #include <QApplication> --#include "highlight-effect.h" -+#include "effects/highlight-effect.h" - #include <QGSettings/QGSettings> - - QStyle *KyIcon::style() -diff --git a/ukui-qml-style-helper/ukui-qml-style-helper.pro b/ukui-qml-style-helper/ukui-qml-style-helper.pro -deleted file mode 100644 -index 05779dc..0000000 ---- a/ukui-qml-style-helper/ukui-qml-style-helper.pro -+++ /dev/null -@@ -1,47 +0,0 @@ --TEMPLATE = lib --TARGET = ukui-qml-style-helper --QT += KConfigCore Kirigami2 quick widgets -- --CONFIG += plugin c++11 link_pkgconfig -- --TARGET = $$qtLibraryTarget($$TARGET) --uri = org.ukui.qqc2style.private -- --PKGCONFIG += gsettings-qt --INCLUDEPATH += /usr/include/KF5/Kirigami2 --LIBS += -L/usr/lib -L$$[QT_INSTALL_LIBS] -lKF5Kirigami2 -- --include(../libqt5-ukui-style/effects/effects.pri) -- --# Input --SOURCES += \ -- KyIcon.cpp \ -- kyquickstyleitem.cpp \ -- kystylehelper.cpp \ -- qqc2styleplugin.cpp -- --HEADERS += \ -- KyIcon.h \ -- kyquickpadding_p.h \ -- kyquickstyleitem.h \ -- kystylehelper.h \ -- qqc2styleplugin.h -- --DISTFILES = qmldir -- --!equals(_PRO_FILE_PWD_, $$OUT_PWD) { -- copy_qmldir.target = $$OUT_PWD/qmldir -- copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir -- copy_qmldir.commands = $(COPY_FILE) "$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)" "$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)" -- QMAKE_EXTRA_TARGETS += copy_qmldir -- PRE_TARGETDEPS += $$copy_qmldir.target --} -- --qmldir.files = qmldir --unix { --# installPath = $$[QT_INSTALL_QML]/$$replace(uri, \., /) -- installPath = $$[QT_INSTALL_LIBS]/qt5/qml/org/ukui/qqc2style/private/ -- qmldir.path = $$installPath -- target.path = $$installPath -- INSTALLS += target qmldir --} -diff --git a/ukui-qqc2-style/CMakeLists.txt b/ukui-qqc2-style/CMakeLists.txt -new file mode 100644 -index 0000000..6072bb1 ---- /dev/null -+++ b/ukui-qqc2-style/CMakeLists.txt -@@ -0,0 +1,35 @@ -+project(ukui-qqc2-style) -+ -+set(CMAKE_AUTOUIC ON) -+set(CMAKE_AUTOMOC ON) -+set(CMAKE_AUTORCC ON) -+ -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+find_package(Qt5 CONFIG REQUIRED COMPONENTS -+ Gui -+) -+ -+file(GLOB QML_FILES "org.ukui.style/*.qml") -+file(GLOB PRIVATE_FILES "org.ukui.style/private/*") -+ -+SOURCE_GROUP("QMLFiles" FILES ${QML_FILES}) -+SOURCE_GROUP("QMLPrivateFiles" FILES ${PRIVATE_FILES}) -+ -+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${QMLFiles} ${QMLPrivateFiles} ) -+ -+if(UNIX) -+# file(GLOB_RECURSE sources ${CMAKE_CURRENT_SOURCE_DIR}/org.ukui.style/*.qml) -+ set(LIB_PATH ${imported_location}) -+ get_filename_component(PARENT_PATH "${LIB_PATH}" PATH) -+ get_filename_component(PARENT_PATH "${PARENT_PATH}" PATH) -+ get_filename_component(PARENT_PATH "${PARENT_PATH}" PATH) -+ message("ukui-qqc2-style PARENT_PATH: ${PARENT_PATH}") -+ -+ set(TARGET_PATH "${PARENT_PATH}/qml/QtQuick/Controls.2/org.ukui.style/") -+# message("${TARGET_PATH}") -+ set(TARGET_FILES ${QML_FILES}) -+ install(FILES ${TARGET_FILES} DESTINATION ${TARGET_PATH}) -+ install(FILES ${PRIVATE_FILES} DESTINATION "${TARGET_PATH}/private") -+endif() -diff --git a/ukui-qqc2-style/ukui-qqc2-style.pro b/ukui-qqc2-style/ukui-qqc2-style.pro -deleted file mode 100644 -index 884b3a8..0000000 ---- a/ukui-qqc2-style/ukui-qqc2-style.pro -+++ /dev/null -@@ -1,10 +0,0 @@ --TEMPLATE = subdirs -- --DISTFILES += org.ukui.style/* -- --unix { -- installPath = $$[QT_INSTALL_LIBS]/qt5/qml/QtQuick/Controls.2/org.ukui.style/ -- template.files = org.ukui.style/* -- template.path = $$installPath -- INSTALLS += template --} -diff --git a/ukui-styles/CMakeLists.txt b/ukui-styles/CMakeLists.txt -new file mode 100644 -index 0000000..784346c ---- /dev/null -+++ b/ukui-styles/CMakeLists.txt -@@ -0,0 +1,107 @@ -+cmake_minimum_required(VERSION 3.16) -+ -+project(qt5-style-ukui) -+ -+set(CMAKE_AUTOUIC ON) -+set(CMAKE_AUTOMOC ON) -+set(CMAKE_AUTORCC ON) -+ -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+set(QT_MIN_VERSION "5.12.0") -+set(KF5_MIN_VERSION "5.66.0") -+ -+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_CURRENT_SOURCE_DIR}/cmake/kde-modules ${CMAKE_MODULE_PATH}) -+ -+# QtCreator supports the following variables for Android, which are identical to qmake Android variables. -+# Check http://doc.qt.io/qt-5/deployment-android.html for more information. -+# They need to be set before the find_package(Qt5 ...) call. -+ -+#if(ANDROID) -+# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android") -+# if (ANDROID_ABI STREQUAL "armeabi-v7a") -+# set(ANDROID_EXTRA_LIBS -+# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libcrypto.so -+# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libssl.so) -+# endif() -+#endif() -+ -+ -+find_package(Qt5Gui) -+message(${imported_location}) -+set(LIB_PATH ${imported_location}) -+get_filename_component(PARENT_PATH "${LIB_PATH}" PATH) -+get_filename_component(PARENT_PATH "${PARENT_PATH}" PATH) -+message("qt5-style-ukui PARENT_PATH: ${PARENT_PATH}") -+ -+find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS -+ DBus -+ Widgets -+ X11Extras -+) -+include_directories(${Qt5Widgets_PRIVATE_INCLUDE_DIRS}) -+include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) -+ -+find_package(KF5WindowSystem ${KF5_MIN_VERSION} CONFIG REQUIRED COMPONENTS) -+ -+find_package(KF5Wayland CONFIG REQUIRED COMPONENTS) -+ -+find_package(PkgConfig) -+pkg_check_modules(Qsettings REQUIRED gsettings-qt) -+pkg_check_modules(KYSDKCONF2 REQUIRED kysdk-conf2) -+ -+include_directories(${Qsettings_INCLUDE_DIRS}) -+#file(GLOB_RECURSE native_srcs /qt5-config-style-ukui/*.cpp) -+if (KYSDKCONF2_FOUND) -+ include_directories(${KYSDKCONF2_INCLUDE_DIRS}) -+ link_directories(${KYSDKCONF2_LIBRARY_DIRS}) -+endif() -+ -+file(GLOB_RECURSE Header "*.h" "*.hpp" ) -+file(GLOB_RECURSE Src "*.cpp" "*.c") -+SOURCE_GROUP("header" FILES ${Header}) -+SOURCE_GROUP("src" FILES ${Src}) -+ -+file(GLOB_RECURSE Json "*.json") -+ -+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${Header} ${Src} ${Json}) -+ -+ -+include_directories(../libqt5-ukui-style) -+ add_library(${PROJECT_NAME} MODULE ${Header} ${Src} ${Json}) -+ -+ target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/libqt5-ukui-style/animations) -+ -+target_link_libraries(${PROJECT_NAME} PRIVATE -+ Qt5::Widgets -+ Qt5::DBus -+ Qt5::Gui -+ Qt5::X11Extras -+ KF5::WaylandClient -+ KF5::WindowSystem -+ xcb -+ ${XCB_LIBS} -+ gsettings-qt -+ qt5-ukui-style -+ ${KYSDKCONF2_LIBRARIES} -+ ) -+ -+ -+#add_subdirectory(qt5-config-style-ukui) -+ -+add_definitions(-DQT5UKUIPLATFORMTHEME_LIBRARY) -+add_definitions(-DQT_DEPRECATED_WARNINGS) -+add_definitions(-DQT_MESSAGELOGCONTEXT) -+ -+if(UNIX) -+ set(TARGET_PATH "${PARENT_PATH}/styles") -+ MESSAGE("libukui-styles TARGET_PATH: ${TARGET_PATH}") -+ -+ install(TARGETS ${PROJECT_NAME} DESTINATION ${TARGET_PATH}) -+ -+ set(JSON_PATH "/usr/share/qt5-ukui-platformtheme/themeconfig/") -+ file(GLOB_RECURSE JSON_FILES0 "qt5-config-style-ukui/themeconfig/*.json") -+ install(FILES ${JSON_FILES0} DESTINATION ${JSON_PATH}) -+ install(FILES ${JSON_FILES1} DESTINATION ${JSON_PATH}) -+endif() -diff --git a/ukui-styles/blur-helper.cpp b/ukui-styles/blur-helper.cpp -index 6348d56..0c3a0cf 100644 ---- a/ukui-styles/blur-helper.cpp -+++ b/ukui-styles/blur-helper.cpp -@@ -21,7 +21,7 @@ - */ - - #include "blur-helper.h" --#include "ukui-style-settings.h" -+#include "settings/ukui-style-settings.h" - #include <QWidget> - #include <KWindowEffects> - #include <QGSettings> -@@ -32,7 +32,7 @@ - - #include <QMenu> - --#include "black-list.h" -+#include "settings/black-list.h" - - #include <QApplication> - #include <QX11Info> -diff --git a/ukui-styles/gesture-helper.cpp b/ukui-styles/gesture-helper.cpp -index 699aab6..8b63c78 100644 ---- a/ukui-styles/gesture-helper.cpp -+++ b/ukui-styles/gesture-helper.cpp -@@ -21,8 +21,8 @@ - */ - - #include "gesture-helper.h" --#include "ukui-two-finger-slide-gesture.h" --#include "ukui-two-finger-zoom-gesture.h" -+#include "gestures/ukui-two-finger-slide-gesture.h" -+#include "gestures/ukui-two-finger-zoom-gesture.h" - - #include <QWidget> - #include <QGestureEvent> -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.h -index 9cbb31c..c3a56f4 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.h -@@ -24,8 +24,8 @@ - #define BOXANIMATIONHELPER_H - - #include <QObject> --#include "animation-helper.h" --#include "animator-iface.h" -+#include "animations/animation-helper.h" -+#include "animations/animator-iface.h" - #include "config-box-animator.h" - - namespace UKUIConfigStyleSpace { -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.h b/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.h -index ae982ed..bd89a38 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.h -@@ -27,7 +27,8 @@ - #include <QVariantAnimation> - #include <QParallelAnimationGroup> - --#include "animator-iface.h" -+#include "animations/animator-iface.h" -+ - - namespace UKUIConfigStyleSpace { - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.h -index 0d62e57..8914ff8 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.h -@@ -24,8 +24,8 @@ - #define BUTTONANIMATIONHELPER_H - - #include <QObject> --#include "animation-helper.h" --#include "animator-iface.h" -+#include "animations/animation-helper.h" -+#include "animations/animator-iface.h" - #include "config-button-animator.h" - - namespace UKUIConfigStyleSpace { -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.h b/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.h -index 2f1e8a4..a027767 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.h -@@ -27,7 +27,8 @@ - #include <QVariantAnimation> - #include <QParallelAnimationGroup> - --#include "animator-iface.h" -+#include "animations/animator-iface.h" -+ - - - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.h -index 1e6b8ac..3c285dc 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.h -@@ -24,8 +24,8 @@ - #define CHECKBOXANIMATIONHELPER_H - - #include <QObject> --#include "animation-helper.h" --#include "animator-iface.h" -+#include "animations/animation-helper.h" -+#include "animations/animator-iface.h" - #include "config-checkbox-animator.h" - - namespace UKUIConfigStyleSpace { -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.h b/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.h -index 8fe3b1b..e4ba293 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.h -@@ -27,7 +27,8 @@ - #include <QVariantAnimation> - #include <QParallelAnimationGroup> - --#include "animator-iface.h" -+#include "animations/animator-iface.h" -+ - - namespace UKUIConfigStyleSpace { - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.h -index 7f7e326..542d48d 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.h -@@ -24,8 +24,8 @@ - #define RADIOBUTTONANIMATIONHELPER_H - - #include <QObject> --#include "animation-helper.h" --#include "animator-iface.h" -+#include "animations/animation-helper.h" -+#include "animations/animator-iface.h" - #include "config-radiobutton-animator.h" - - namespace UKUIConfigStyleSpace { -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h -index 89217b7..5c66fd2 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h -@@ -27,7 +27,8 @@ - #include <QVariantAnimation> - #include <QParallelAnimationGroup> - --#include "animator-iface.h" -+#include "animations/animator-iface.h" -+ - - namespace UKUIConfigStyleSpace { - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.h -index c9eed06..7333706 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.h -@@ -24,7 +24,7 @@ - #define SCROLLBARANIMATIONHELPER_H - - #include <QObject> --#include "animation-helper.h" -+#include "animations/animation-helper.h" - - namespace UKUIConfigStyleSpace { - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.h -index ae252e6..673501f 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.h -@@ -24,7 +24,7 @@ - #define SLIDERANIMATIONHELPER_H - - #include <QObject> --#include "animation-helper.h" -+#include "animations/animation-helper.h" - - namespace UKUIConfigStyleSpace { - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.h b/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.h -index 8b6cb09..501ff27 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.h -@@ -24,7 +24,8 @@ - #define SLIDERANIMATOR_H - - #include <QParallelAnimationGroup> --#include "animator-iface.h" -+#include "animations/animator-iface.h" -+ - - class QVariantAnimation; - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.cpp -index e438290..c155c1c 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.cpp -@@ -21,7 +21,7 @@ - */ - - #include "config-tab-widget-animation-helper.h" --#include "tabwidget/ukui-tabwidget-default-slide-animator.h" -+#include "animations/tabwidget/ukui-tabwidget-default-slide-animator.h" - - using namespace UKUIConfigStyleSpace; - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.h -index 1a5e78a..94184b4 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.h -@@ -24,7 +24,7 @@ - #define TABWIDGETANIMATIONHELPER_H - - #include <QObject> --#include "animation-helper.h" -+#include "animations/animation-helper.h" - - namespace UKUIConfigStyleSpace { - -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.h b/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.h -index 5bf8924..8eea5ef 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.h -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.h -@@ -24,7 +24,7 @@ - #define TREEANIMATIONHELPER_H - - #include <QObject> --#include "animation-helper.h" -+#include "animations/animation-helper.h" - - namespace UKUIConfigStyleSpace { - -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 29df8f7..664dc53 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,7 +24,8 @@ - #define TREEANIMATOR_H - - #include <QParallelAnimationGroup> --#include "animator-iface.h" -+#include "animations/animator-iface.h" -+ - - class QVariantAnimation; - -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index fc27405..7fc6061 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -36,9 +36,9 @@ - #include <QFile> - #include <QStandardPaths> - --#include "ukui-style-settings.h" -+#include "settings/ukui-style-settings.h" - #include "ukui-config-style-parameters.h" --#include "black-list.h" -+#include "settings/black-list.h" - - extern QColor configMixColor(const QColor &c1, const QColor &c2, qreal bias); - extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); -@@ -878,7 +878,24 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - if (buttonColorCfg.focusPen != Qt::NoPen) - focusPen = QPen(QBrush(buttonColorCfg.focusPen), (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- if (!isWindowColoseButton) { -+ if (isWindowButton && useTransparentButtonList().contains(qAppName())) { -+ QColor p = QColor(255, 255, 255); -+ p.setAlphaF(0.4); -+ defaultPen = QPen(QColor(Qt::NoPen), 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ hoverPen = QPen(p, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ p.setAlphaF(0.35); -+ clickPen = QPen(p, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ disablePen = defaultPen; -+ defaultBrush = QBrush(Qt::NoBrush); -+ QColor bColor = QColor(0, 0, 0); -+ bColor.setAlphaF(0.1); -+ hoverBrush = QBrush(bColor); -+ bColor.setAlphaF(0.2); -+ clickBrush = QBrush(bColor); -+ disableBrush = QBrush(Qt::NoBrush); -+ focusPen = clickPen; -+ } -+ else if (!isWindowColoseButton) { - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); - focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), -@@ -1306,7 +1323,24 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - focusPen = QPen(QBrush(buttonColorCfg.focusPen), (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- if (!isWindowColoseButton) { -+ if (isWindowButton && useTransparentButtonList().contains(qAppName())) { -+ QColor p = QColor(255, 255, 255); -+ p.setAlphaF(0.4); -+ defaultPen = QPen(QColor(Qt::NoPen), 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ hoverPen = QPen(p, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ p.setAlphaF(0.35); -+ clickPen = QPen(p, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ disablePen = defaultPen; -+ defaultBrush = QBrush(Qt::NoBrush); -+ QColor bColor = QColor(0, 0, 0); -+ bColor.setAlphaF(0.1); -+ hoverBrush = QBrush(bColor); -+ bColor.setAlphaF(0.2); -+ clickBrush = QBrush(bColor); -+ disableBrush = QBrush(Qt::NoBrush); -+ focusPen = clickPen; -+ } -+ else if (!isWindowColoseButton) { - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); - focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), -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 3ac9ced..a211744 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -24,8 +24,8 @@ - - #include "config-style-helper.h" - --#include "ukui-style-settings.h" --#include "ukui-tabwidget-default-slide-animator.h" -+#include "settings/ukui-style-settings.h" -+#include "animations/tabwidget/ukui-tabwidget-default-slide-animator.h" - - #include <QStyleOption> - #include <QWidget> -@@ -49,17 +49,15 @@ - #include "animations/config-tree-animation-helper.h" - #include "config-shadow-helper.h" - --#include "blur-helper.h" --#include "gesture-helper.h" --#include "window-manager.h" --#include "application-style-settings.h" -- --#include "ukui-style-settings.h" -- --#include "highlight-effect.h" -+#include "../blur-helper.h" -+#include "../gesture-helper.h" -+#include "../window-manager.h" -+#include "settings/application-style-settings.h" -+#include "settings/ukui-style-settings.h" -+#include "effects/highlight-effect.h" - - #include "ukui-config-style-parameters.h" --#include "black-list.h" -+#include "settings/black-list.h" - - - #include <QIcon> -@@ -4575,6 +4573,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - const bool enable = button->state & State_Enabled; - const bool text = !button->text.isEmpty(); - const bool icon = !button->icon.isNull(); -+ const bool inactive = enable && !(button->state & State_Active); - - bool isImportant = false; - if (widget && widget->property("isImportant").isValid()) { -@@ -4648,10 +4647,20 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - } - - if (iconRect.isValid()) { -- if (widget && !widget->property("useIconHighlightEffect").isValid()) { -+ if(sp->getAdjustColorRules() == UKUIConfigStyleParameters::AdjustColorRules::HSL && -+ inactive && useTransparentButtonList().contains(qAppName()) && -+ widget->property("isWindowButton").isValid() && -+ (widget->property("isWindowButton").toInt() == 0x01 || -+ widget->property("isWindowButton").toInt() == 0x02)) { -+ QColor color = QColor(255, 255, 255); -+ color.setAlphaF(0.45); -+ drawColorPixmap(painter, color, pixmap); -+ } -+ else if (widget && !widget->property("useIconHighlightEffect").isValid()) { - if (!sp->m_PushButtonParameters.iconHoverClickHighlight) { - pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, &sub, widget); -- } else { -+ } -+ else{ - pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, &sub, widget); - } - } else { -@@ -4698,6 +4707,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - const bool arrow = tb->features & QStyleOptionToolButton::MenuButtonPopup; - const bool ha = tb->features & QStyleOptionToolButton::Arrow; - const bool enable = tb->state & State_Enabled; -+ const bool inactive = enable && !(tb->state & State_Active); - QFontMetrics fm = tb->fontMetrics; - int Margin_Height = sp->Button_MarginHeight; - int ToolButton_MarginWidth = sp->ToolButton_MarginWidth; -@@ -4834,7 +4844,16 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - break; - } - -- if (widget && !widget->property("useIconHighlightEffect").isValid()) { -+ if(sp->getAdjustColorRules() == UKUIConfigStyleParameters::AdjustColorRules::HSL && -+ inactive && useTransparentButtonList().contains(qAppName()) && -+ widget->property("isWindowButton").isValid() && -+ (widget->property("isWindowButton").toInt() == 0x01 || -+ widget->property("isWindowButton").toInt() == 0x02)) { -+ QColor color = QColor(255, 255, 255); -+ color.setAlphaF(0.45); -+ drawColorPixmap(painter, color, pixmap); -+ } -+ else if (widget && !widget->property("useIconHighlightEffect").isValid()) { - if (!sp->m_ToolButtonParameters.iconHoverClickHighlight) { - pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, &sub, widget); - } else { -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -index 18f4c11..5b78807 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -@@ -25,6 +25,12 @@ - - #include <QProxyStyle> - -+#include <QFontMetrics> -+#include <QStyleOption> -+#include <private/qtextengine_p.h> -+#include <qmath.h> -+#include <QGSettings> -+ - class QStyleOptionViewItem; - class QDBusInterface; - -@@ -35,12 +41,6 @@ class QDBusInterface; - #define Style QProxyStyle - #endif - --#include <QFontMetrics> --#include <QStyleOption> --#include <private/qtextengine_p.h> --#include <qmath.h> --#include <QGSettings> --#include <QProxyStyle> - - class BlurHelper; - class GestureHelper; -diff --git a/ukui-styles/ukui-style-plugin.cpp b/ukui-styles/ukui-style-plugin.cpp -index 691a026..f6f57ca 100644 ---- a/ukui-styles/ukui-style-plugin.cpp -+++ b/ukui-styles/ukui-style-plugin.cpp -@@ -21,12 +21,12 @@ - */ - - #include "ukui-style-plugin.h" --#include "../qt5-config-style-ukui/ukui-config-style.h" -+#include "qt5-config-style-ukui/ukui-config-style.h" - --#include "black-list.h" --#include "ukui-style-settings.h" --#include "highlight-effect.h" --#include "application-style-settings.h" -+#include "settings/black-list.h" -+#include "settings/ukui-style-settings.h" -+#include "effects/highlight-effect.h" -+#include "settings/application-style-settings.h" - - #include <QApplication> - #include <QTimer> -diff --git a/ukui-styles/ukui-styles.pro b/ukui-styles/ukui-styles.pro -deleted file mode 100644 -index b8a1a49..0000000 ---- a/ukui-styles/ukui-styles.pro -+++ /dev/null -@@ -1,53 +0,0 @@ --#------------------------------------------------- --# --# Project created by QtCreator 2020-01-03T19:31:51 --# --#------------------------------------------------- -- --QT += widgets widgets-private KWindowSystem gui gui-private x11extras dbus KWaylandClient -- --TARGET = qt5-style-ukui --TEMPLATE = lib --CONFIG += plugin c++11 link_pkgconfig --PKGCONFIG += gsettings-qt gio-2.0 kysdk-conf2 --LIBS += -lxcb -- --include(../libqt5-ukui-style/libqt5-ukui-style.pri) --include(qt5-config-style-ukui/qt5-config-style-ukui.pri) -- --# The following define makes your compiler emit warnings if you use --# any feature of Qt which has been marked as deprecated (the exact warnings --# depend on your compiler). Please consult the documentation of the --# deprecated API in order to know how to port your code away from it. --DEFINES += QT_DEPRECATED_WARNINGS --#DEFINES += QT_NO_DEBUG_OUTPUT --DEFINES += QT_MESSAGELOGCONTEXT -- --# You can also make your code fail to compile if you use deprecated APIs. --# In order to do so, uncomment the following line. --# You can also select to disable deprecated APIs only up to a certain version of Qt. --#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -- --SOURCES += \ -- blur-helper.cpp \ -- gesture-helper.cpp \ -- window-manager.cpp \ -- ukui-style-plugin.cpp \ -- readconfig.cpp -- -- --HEADERS += \ -- blur-helper.h \ -- gesture-helper.h \ -- window-manager.h \ -- ukui-style-plugin.h \ -- readconfig.h \ -- themeinformation.h -- --DISTFILES += qt5-style-ukui.json -- --unix { -- target.path = $$[QT_INSTALL_PLUGINS]/styles -- INSTALLS += target --} -- -diff --git a/ukui-styles/window-manager.cpp b/ukui-styles/window-manager.cpp -index 4842668..42216d8 100644 ---- a/ukui-styles/window-manager.cpp -+++ b/ukui-styles/window-manager.cpp -@@ -34,7 +34,7 @@ - #include <QWindow> - - #include <QDebug> --#include "black-list.h" -+#include "settings/black-list.h" - - WindowManager::WindowManager(QObject *parent) : QObject(parent) - { diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0020-Update-changelog-4.1.0.0-0k22.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0020-Update-changelog-4.1.0.0-0k22.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0020-Update-changelog-4.1.0.0-0k22.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0020-Update-changelog-4.1.0.0-0k22.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,21 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Wed, 13 Dec 2023 16:51:37 +0800 -Subject: Update changelog 4.1.0.0-0k22 - ---- - libqt5-ukui-style/settings/black-list.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/libqt5-ukui-style/settings/black-list.h b/libqt5-ukui-style/settings/black-list.h -index 1e428f0..c7cfe01 100644 ---- a/libqt5-ukui-style/settings/black-list.h -+++ b/libqt5-ukui-style/settings/black-list.h -@@ -92,6 +92,8 @@ static const QStringList useTransparentButtonList() { - l<<"kylin-video"; - l<<"kylin-ipmsg"; - l<<"kylin-weather"; -+ l<<"ukui-notebook"; -+ - // l<<"kylin-recorder"; - - return l; diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0021-Update-changelog-4.1.0.0-0k23.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0021-Update-changelog-4.1.0.0-0k23.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0021-Update-changelog-4.1.0.0-0k23.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0021-Update-changelog-4.1.0.0-0k23.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,1438 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Wed, 3 Jan 2024 17:04:55 +0800 -Subject: Update changelog 4.1.0.0-0k23 - ---- - .../themeconfig/classical.json | 33 ++- - .../qt5-config-style-ukui/themeconfig/default.json | 34 ++- - .../qt5-config-style-ukui/themeconfig/fashion.json | 36 +++- - .../ukui-config-style-parameters.cpp | 48 ++++- - .../qt5-config-style-ukui/ukui-config-style.cpp | 233 +++++++++++++++++---- - .../widget-parameters/config-combobox-parameters.h | 1 + - .../widget-parameters/config-list-parameters.h | 1 + - .../widget-parameters/config-menu-parameters.h | 3 + - .../widget-parameters/config-table-parameters.h | 1 + - .../config-tabwidget-parameters.h | 1 + - .../widget-parameters/config-tree-parameters.h | 1 + - ukui-styles/readconfig.cpp | 6 +- - ukui-styles/themeinformation.h | 13 ++ - 13 files changed, 351 insertions(+), 60 deletions(-) - -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json b/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -index 9ced231..d438839 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -@@ -229,7 +229,8 @@ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_iat", "type": "paletterole"} -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "ListView":{ -@@ -237,6 +238,7 @@ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, -@@ -244,6 +246,7 @@ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, -@@ -251,6 +254,7 @@ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } -@@ -260,6 +264,7 @@ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, -@@ -267,6 +272,7 @@ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } -@@ -276,6 +282,7 @@ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, -@@ -283,6 +290,7 @@ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } -@@ -387,14 +395,16 @@ - "TabBarBackgroundBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarHoverBrush" : { "type": "color"}, -- "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"} -+ "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "Menu":{ - "DefaultMenu" :{ - "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "MenuBackgroundPen" : {"value": "127, 127, 127", "type": "color"}, -- "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "MenuItemFocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - } - }, -@@ -613,7 +623,8 @@ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "ListView":{ -@@ -621,6 +632,7 @@ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, -@@ -628,6 +640,7 @@ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, -@@ -635,6 +648,7 @@ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } -@@ -644,6 +658,7 @@ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, -@@ -651,6 +666,7 @@ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } -@@ -660,6 +676,7 @@ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, -@@ -667,6 +684,8 @@ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } -@@ -762,14 +781,16 @@ - "TabBarBackgroundBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TabBarDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TabBarHoverBrush" : { "type": "color"}, -- "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"} -+ "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "Menu":{ - "DefaultMenu" :{ - "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "MenuBackgroundPen" : {"value": "89, 89, 89", "type": "color"}, -- "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "MenuItemFocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - } - } -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/default.json b/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -index d039d37..a506915 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -@@ -230,7 +230,8 @@ - "HoverBrush" : {"type": "color"}, - "OnBrush" : {"value": "Base_at", "type": "paletterole"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "ListView":{ -@@ -239,6 +240,7 @@ - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -247,6 +249,7 @@ - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} - }, -@@ -255,6 +258,7 @@ - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "SelectBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - } -@@ -263,8 +267,9 @@ - "DefaultTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -- "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -272,6 +277,7 @@ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} -@@ -283,6 +289,7 @@ - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -291,6 +298,7 @@ - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} - } -@@ -403,7 +411,8 @@ - "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarHoverBrush" : { "type": "color"}, - "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, -- "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} -+ "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "Menu":{ -@@ -411,7 +420,8 @@ - "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "MenuBackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"}, - "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "MenuItemFocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - } - }, -@@ -640,7 +650,8 @@ - "HoverBrush" : {"type": "color"}, - "OnBrush" : {"value": "Base_at", "type": "paletterole"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "ListView":{ -@@ -649,6 +660,7 @@ - "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -657,6 +669,7 @@ - "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - }, -@@ -665,6 +678,7 @@ - "HoverBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "SelectBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } -@@ -675,6 +689,7 @@ - "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -683,6 +698,7 @@ - "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} - } -@@ -693,6 +709,7 @@ - "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -701,6 +718,7 @@ - "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} - } -@@ -809,7 +827,8 @@ - "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarHoverBrush" : { "type": "color"}, - "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, -- "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} -+ "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "Menu":{ -@@ -817,7 +836,8 @@ - "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "MenuBackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "MenuItemFocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - } - } -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json b/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -index af5c0b2..cd48937 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -@@ -228,7 +228,8 @@ - "HoverBrush" : {"type": "color"}, - "OnBrush" : {"value": "Base_at", "type": "paletterole"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "ListView":{ -@@ -237,6 +238,7 @@ - "HoverBrush" : {"type": "gradient"}, - "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -245,6 +247,7 @@ - "HoverBrush" : {"type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - }, -@@ -252,6 +255,7 @@ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "BrightText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "BrightText_at", "type": "paletterole"} - } -@@ -260,16 +264,18 @@ - "DefaultTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "gradient"}, -- "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, -- "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} -+ "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, - "HighlightTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } -@@ -280,6 +286,7 @@ - "HoverBrush" : { "type": "gradient"}, - "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -288,6 +295,7 @@ - "HoverBrush" : { "type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } -@@ -396,7 +404,8 @@ - "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarHoverBrush" : { "type": "gradient"}, - "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, -- "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} -+ "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "Menu":{ -@@ -404,7 +413,8 @@ - "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "MenuBackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"}, - "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "MenuItemFocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - } - }, -@@ -635,7 +645,8 @@ - "HoverBrush" : {"type": "color"}, - "OnBrush" : {"value": "Base_at", "type": "paletterole"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "ListView":{ -@@ -644,6 +655,7 @@ - "HoverBrush" : {"type": "gradient"}, - "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -652,6 +664,7 @@ - "HoverBrush" : {"type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - }, -@@ -659,6 +672,7 @@ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Light_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } -@@ -669,6 +683,7 @@ - "HoverBrush" : { "type": "gradient"}, - "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -677,6 +692,7 @@ - "HoverBrush" : { "type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } -@@ -687,6 +703,7 @@ - "HoverBrush" : { "type": "gradient"}, - "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -695,6 +712,7 @@ - "HoverBrush" : { "type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } -@@ -803,7 +821,8 @@ - "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarHoverBrush" : { "type": "gradient"}, - "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, -- "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} -+ "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, - "Menu":{ -@@ -811,7 +830,8 @@ - "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "MenuBackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, -- "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} -+ "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "MenuItemFocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - } - } -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index 7fc6061..4fb532c 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -2195,7 +2195,8 @@ void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const - ? 2 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen disablePen = QPen(comboBoxColorCfg.disablePen, (comboBoxColorCfg.disablePen.alpha() == 0 || comboBoxColorCfg.disablePen == Qt::NoPen) - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -+ QPen focusPen = QPen(comboBoxColorCfg.focusPen, (comboBoxColorCfg.focusPen.alpha() == 0 || comboBoxColorCfg.focusPen == Qt::NoPen) -+ ? 0 : 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - -@@ -2230,6 +2231,7 @@ void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const - w->setProperty("disablePen", disablePen); - w->setProperty("onPen", onPen); - w->setProperty("editPen", editPen); -+ w->setProperty("focusPen", focusPen); - } - - if (widget) { -@@ -2266,6 +2268,9 @@ void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const - if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { - disablePen = widget->property("setDisablePen").value<QPen>(); - } -+ if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { -+ focusPen = widget->property("setFocusPen").value<QPen>(); -+ } - } - - m_ComboBoxParameters.radius = radius; -@@ -2281,6 +2286,7 @@ void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const - m_ComboBoxParameters.comboBoxOnPen = onPen; - m_ComboBoxParameters.comboBoxEditPen = editPen; - m_ComboBoxParameters.comboBoxDisablePen = disablePen; -+ m_ComboBoxParameters.comboBoxFocusPen = focusPen; - } - - void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -@@ -2311,6 +2317,8 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - 1 : 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen selectPen = QPen(listViewColorCfg.selectPen, listViewColorCfg.selectPen.alpha() > 0 ? - 1 : 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen focusPen = QPen(listViewColorCfg.focusPen, listViewColorCfg.focusPen.alpha() > 0 ? -+ 2 : 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if (!option->state & QStyle::State_Enabled) { - textSelectPen = option->palette.color(QPalette::Disabled, QPalette::Text); -@@ -2369,6 +2377,7 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - case AdjustColorRules::HSL: - hoverBrush = QBrush(highlightHover(isDark, option->palette)); - selectBrush = QBrush(highlightClick(isDark, option->palette)); -+ - if(isDark) { - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -2399,6 +2408,7 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - w->setProperty("textSelectPen", textSelectPen); - w->setProperty("hoverPen", hoverPen); - w->setProperty("selectPen", selectPen); -+ w->setProperty("focusPen", focusPen); - } - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -@@ -2428,6 +2438,9 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - if (widget->property("setSelectPen").isValid() && widget->property("setSelectPen").canConvert<QPen>()) { - selectPen = widget->property("setSelectPen").value<QPen>(); - } -+ if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { -+ focusPen = widget->property("setFocusPen").value<QPen>(); -+ } - } - - m_ListParameters.radius = radius; -@@ -2439,6 +2452,7 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - m_ListParameters.listTextSelectPen = textSelectPen; - m_ListParameters.listHoverPen = hoverPen; - m_ListParameters.listSelectPen = selectPen; -+ m_ListParameters.listFocusPen = focusPen; - } - - void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -@@ -2464,6 +2478,8 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen selectPen = QPen(treeViewColorCfg.selectPen, (treeViewColorCfg.selectPen == Qt::NoPen || treeViewColorCfg.selectPen.alpha() == 0) - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen focusPen = QPen(treeViewColorCfg.focusPen, (treeViewColorCfg.focusPen == Qt::NoPen || treeViewColorCfg.focusPen.alpha() == 0) -+ ? 0 : 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - QBrush branchDefaultBrush = treeViewColorCfg.branchDefaultBrush; - QBrush branchHoverBrush = treeViewColorCfg.branchHoverBrush; -@@ -2545,6 +2561,7 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - w->setProperty("textSelectPen", textSelectPen); - w->setProperty("hoverPen", hoverPen); - w->setProperty("selectPen", selectPen); -+ w->setProperty("focusPen", focusPen); - } - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -@@ -2586,6 +2603,9 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - if (widget->property("setSelectPen").isValid() && widget->property("setSelectPen").canConvert<QPen>()) { - selectPen = widget->property("setSelectPen").value<QPen>(); - } -+ if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { -+ focusPen = widget->property("setFocusPen").value<QPen>(); -+ } - } - - m_TreeParameters.radius = radius; -@@ -2601,6 +2621,7 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - - m_TreeParameters.treeHoverPen = hoverPen; - m_TreeParameters.treeSelectPen = selectPen; -+ m_TreeParameters.treeFocusPen = focusPen; - m_TreeParameters.treeTextHoverPen = textHoverPen; - m_TreeParameters.treeTextSelectPen = textSelectPen; - } -@@ -2628,6 +2649,8 @@ void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QSt - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen textHoverPen = QPen(tableColorCfg.textHoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen textSelectPen = QPen(tableColorCfg.textSelectPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen focusPen = QPen(tableColorCfg.focusPen, (tableColorCfg.focusPen.alpha() == 0 || tableColorCfg.focusPen == Qt::NoPen) -+ ? 0 : 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if (!option->state & QStyle::State_Enabled) { - textSelectPen = option->palette.color(QPalette::Disabled, QPalette::Text); -@@ -2692,6 +2715,7 @@ void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QSt - w->setProperty("textSelectPen", textSelectPen); - w->setProperty("hoverPen", hoverPen); - w->setProperty("selectPen", selectPen); -+ w->setProperty("focusPen", focusPen); - } - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -@@ -2721,6 +2745,9 @@ void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QSt - if (widget->property("setTextSelectPen").isValid() && widget->property("setTextSelectPen").canConvert<QPen>()) { - textSelectPen = widget->property("setTextSelectPen").value<QPen>(); - } -+ if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { -+ focusPen = widget->property("setFocusPen").value<QPen>(); -+ } - } - - m_TableParameters.radius = radius; -@@ -2730,6 +2757,7 @@ void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QSt - m_TableParameters.tableDisableBrush = disableBrush; - m_TableParameters.tableHoverPen = hoverPen; - m_TableParameters.tableSelectPen = selectPen; -+ m_TableParameters.tableFocusPen = focusPen; - - m_TableParameters.tableTextHoverPen = textHoverPen; - m_TableParameters.tableTextSelectPen = textSelectPen; -@@ -3893,6 +3921,8 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - // QPen tabBarHoverPen = QPen(tabWidgetColorCfg.tabBarHoverPen, (tabWidgetColorCfg.tabBarHoverPen == Qt::NoPen || tabWidgetColorCfg.tabBarHoverPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - // QPen tabBarClickPen = QPen(tabWidgetColorCfg.tabBarClickPen, (tabWidgetColorCfg.tabBarClickPen == Qt::NoPen || tabWidgetColorCfg.tabBarClickPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen tabBarPen = QPen(QColor(Qt::NoPen), 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen tabBarFocusPen = QPen(tabWidgetColorCfg.tabBarFocusPen , (tabWidgetColorCfg.tabBarFocusPen.alpha() == 0 || -+ tabWidgetColorCfg.tabBarFocusPen == Qt::NoPen) ? 0 : 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - - switch (m_adjustColorRules) { -@@ -3956,6 +3986,10 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - break; - } - -+ if((option->state & QStyle::State_HasFocus) && (option->state & QStyle::State_Enabled)){ -+ tabBarPen = tabBarFocusPen; -+ } -+ - auto *w = const_cast<QWidget *>(widget); - if (w) { - w->setProperty("radius", tabradius); -@@ -3966,6 +4000,7 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - w->setProperty("tabBarClickBrush", tabBarClickBrush); - w->setProperty("tabBarSelectBrush", tabBarSelectBrush); - w->setProperty("tabBarPen", tabBarPen); -+ w->setProperty("tabBarFocusPen", tabBarFocusPen); - } - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -@@ -3992,6 +4027,9 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - if (widget->property("setTabBarPen").isValid() && widget->property("setTabBarPen").canConvert<QBrush>()) { - tabBarPen = widget->property("setTabBarPen").value<QPen>(); - } -+ if (widget->property("setTabBarFocusPen").isValid() && widget->property("setTabBarFocusPen").canConvert<QBrush>()) { -+ tabBarFocusPen = widget->property("setTabBarFocusPen").value<QPen>(); -+ } - } - - m_TabWidgetParameters.radius = tabradius; -@@ -4002,6 +4040,7 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - m_TabWidgetParameters.tabBarClickBrush = tabBarClickBrush; - m_TabWidgetParameters.tabBarSelectBrush = tabBarSelectBrush; - m_TabWidgetParameters.tabBarPen = tabBarPen; -+ m_TabWidgetParameters.tabBarFocusPen = tabBarFocusPen; - } - - void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -@@ -4017,6 +4056,8 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - menuColorCfg.menuBackgroundPen == Qt::NoPen ) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QBrush itemSelectBrush = menuColorCfg.menuItemSelectBrush; - QPen menuHoverPen = menuColorCfg.menuTextHoverPen; -+ QPen menuItemFocusPen = QPen(menuColorCfg.menuItemFocusPen, (menuColorCfg.menuItemFocusPen.alpha() == 0 || -+ menuColorCfg.menuItemFocusPen == Qt::NoPen ) ? 0 : 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //item select brush - switch (m_adjustColorRules) { -@@ -4061,6 +4102,7 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - w->setProperty("menuBackgroundPen", menuBackgroundPen); - w->setProperty("itemSelectBrush", itemSelectBrush); - w->setProperty("menuHoverPen", menuHoverPen); -+ w->setProperty("itemFocusPen", menuItemFocusPen); - } - - if (widget) { -@@ -4085,6 +4127,9 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - if (widget->property("setMenuBackgroundPen").isValid() && widget->property("setMenuBackgroundPen").canConvert<QPen>()) { - menuBackgroundPen = widget->property("setMenuBackgroundPen").value<QPen>(); - } -+ if (widget->property("setItemFocusPen").isValid() && widget->property("setItemFocusPen").canConvert<QPen>()) { -+ menuItemFocusPen = widget->property("setItemFocusPen").value<QPen>(); -+ } - } - - m_MenuParameters.frameRadius = frameradius; -@@ -4093,5 +4138,6 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - m_MenuParameters.menuBackgroundBrush = menuBackgroundBrush; - m_MenuParameters.menuBackgroundPen = menuBackgroundPen; - m_MenuParameters.menuItemSelectBrush = itemSelectBrush; -+ m_MenuParameters.menuItemFocusPen = menuItemFocusPen; - m_MenuParameters.menuTextHoverPen = menuHoverPen; - } -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 a211744..0df67b9 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -2310,7 +2310,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - QPixmap pixmap = icon.pixmap(iconsize, mode, QIcon::Off); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); - QPixmap target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -- if(!sp->indicatorIconHoverNeedHighLight) -+ if(!sp->indicatorIconHoverNeedHighLight && !widget->inherits("QMenu")) - target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -@@ -2354,7 +2354,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - QPixmap pixmap = icon.pixmap(iconsize, mode, QIcon::Off); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); - QPixmap target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -- if(!sp->indicatorIconHoverNeedHighLight) -+ if(!sp->indicatorIconHoverNeedHighLight && !widget->inherits("QMenu")) - target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -@@ -2909,7 +2909,9 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - const bool enable = vi->state & State_Enabled; - const bool select = vi->state & State_Selected; - const bool hover = vi->state & State_MouseOver; -+ bool focus = vi->state & State_HasFocus; - -+ int focusRadius; - QBrush defaultBrush; - QBrush hoverBrush; - QBrush selectBrush; -@@ -2917,6 +2919,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - QPainterPath path; - - QPen hoverPen = Qt::NoPen; -+ QPen focusPen = Qt::NoPen; - QPen selectPen = Qt::NoPen; - QPainterPath borderPath0; - QPainterPath borderPath1; -@@ -2934,13 +2937,30 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - - if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) { - sp->initConfigTreeParameters(isUseDarkPalette(), option, widget); -- -+// if(const QStyleOptionViewItem *vimm = qstyleoption_cast<const QStyleOptionViewItem *>(option)){ -+// qDebug() << "item vi..........." << vimm << vimm->index; -+// if(vimm->widget){ -+// auto tree = qobject_cast<const QTreeView*>(widget); -+ -+// if(focus){ -+// QRect treeFocusRec = QRect(tree->x(), option->rect.y(), tree->width(), option->rect.height()); -+// painter->save(); -+// painter->setPen(QPen(QColor(Qt::red), 1)); -+// painter->setBrush(Qt::NoBrush); -+// painter->drawRect(treeFocusRec); -+// painter->restore(); -+// } -+// //focus = itemWidget->hasFocus(); -+// } -+// } - defaultBrush = sp->m_TreeParameters.treeDefaultBrush; - hoverBrush = sp->m_TreeParameters.treeHoverBrush; - selectBrush = sp->m_TreeParameters.treeSelectBrush; - disableBrush = sp->m_TreeParameters.treeDisableBrush; - hoverPen = sp->m_TreeParameters.treeHoverPen; - selectPen = sp->m_TreeParameters.treeSelectPen; -+ focusPen = sp->m_TreeParameters.treeFocusPen; -+ focusRadius = sp->m_TreeParameters.radius; - - int borderWidth = (hoverPen.color().alpha() != 0 && hoverPen.color() != Qt::NoPen) ? hoverPen.width() : 0; - -@@ -3034,8 +3054,12 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - disableBrush = sp->m_ListParameters.listDisableBrush; - hoverPen = sp->m_ListParameters.listHoverPen; - selectPen = sp->m_ListParameters.listSelectPen; -+ focusPen = sp->m_ListParameters.listFocusPen; -+ focusRadius = sp->m_ListParameters.radius; - - auto *listView = qobject_cast<const QListView *>(widget); -+ int focusWidth = focus ? focusPen.width()/2 : 0; -+ - if(select && listView != nullptr){ - - if(listView == nullptr){ -@@ -3074,41 +3098,41 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - - if(begin){ - QRect rect = vi->rect; -- path.moveTo(rect.left(), rect.bottom() + 1); -- path.lineTo(rect.left(), rect.top() + sp->m_ListParameters.radius); -- path.arcTo(rect.left(), rect.top(), 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, 180, -90); -- path.lineTo(rect.right() - sp->m_ListParameters.radius, rect.top()); -- path.arcTo(rect.right() - 2 * sp->m_ListParameters.radius, rect.top(), 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, 90, -90); -- path.lineTo(rect.right(), rect.bottom() +1); -- path.lineTo(rect.left(), rect.bottom() + 1); -+ path.moveTo(rect.left() + focusWidth, rect.bottom() + 1 - focusWidth); -+ path.lineTo(rect.left() + focusWidth, rect.top() + sp->m_ListParameters.radius + focusWidth); -+ path.arcTo(rect.left() + focusWidth, rect.top() + focusWidth, 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, 180, -90); -+ path.lineTo(rect.right() - sp->m_ListParameters.radius - focusWidth, rect.top() + focusWidth); -+ path.arcTo(rect.right() - 2 * sp->m_ListParameters.radius- focusWidth, rect.top() + focusWidth, 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, 90, -90); -+ path.lineTo(rect.right() - focusWidth, rect.bottom() +1 - focusWidth); -+ path.lineTo(rect.left() + focusWidth, rect.bottom() + 1 - focusWidth); - } - else if(mid){ - QRect rect = vi->rect; -- path.moveTo(rect.left(), rect.bottom() + 1); -- path.lineTo(rect.left(), rect.top()); -- path.lineTo(rect.right(), rect.top()); -- path.lineTo(rect.right(), rect.bottom() +1); -- path.lineTo(rect.left(), rect.bottom() + 1); -+ path.moveTo(rect.left() + focusWidth, rect.bottom() + 1 - focusWidth); -+ path.lineTo(rect.left() + focusWidth, rect.top() + focusWidth); -+ path.lineTo(rect.right() - focusWidth, rect.top() + focusWidth); -+ path.lineTo(rect.right() - focusWidth, rect.bottom() + 1 - focusWidth); -+ path.lineTo(rect.left() + focusWidth, rect.bottom() + 1 - focusWidth); - } - else if(end) - { - QRect rect = vi->rect; -- path.moveTo(rect.left(), rect.top()); -- path.lineTo(rect.right(), rect.top()); -- path.lineTo(rect.right(), rect.bottom() - sp->m_ListParameters.radius); -- path.arcTo(rect.right() - 2 * sp->m_ListParameters.radius, rect.bottom() - 2 * sp->m_ListParameters.radius, -+ path.moveTo(rect.left() + focusWidth, rect.top() + focusWidth); -+ path.lineTo(rect.right() - focusWidth, rect.top() + focusWidth); -+ path.lineTo(rect.right() - focusWidth, rect.bottom() - sp->m_ListParameters.radius - focusWidth); -+ path.arcTo(rect.right() - 2 * sp->m_ListParameters.radius - focusWidth, rect.bottom() - 2 * sp->m_ListParameters.radius - focusWidth, - 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, 0, -90); -- path.lineTo(rect.left() + sp->m_ListParameters.radius, rect.bottom()); -- path.arcTo(rect.left(), rect.bottom() - 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, -90, -90); -- path.lineTo(rect.left(), rect.top()); -+ path.lineTo(rect.left() + sp->m_ListParameters.radius + focusWidth, rect.bottom() - focusWidth); -+ path.arcTo(rect.left() + focusWidth, rect.bottom() - 2 * sp->m_ListParameters.radius - focusWidth, 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, -90, -90); -+ path.lineTo(rect.left() + focusWidth, rect.top() + focusWidth); - } - else - { -- path.addRoundedRect(vi->rect, sp->m_ListParameters.radius, sp->m_ListParameters.radius); -+ path.addRoundedRect(vi->rect.adjusted(focusWidth, focusWidth, -1 * focusWidth, -1 * focusWidth), sp->m_ListParameters.radius, sp->m_ListParameters.radius); - } - } - else -- path.addRoundedRect(vi->rect, sp->m_ListParameters.radius, sp->m_ListParameters.radius); -+ path.addRoundedRect(vi->rect.adjusted(focusWidth, focusWidth, -1 * focusWidth, -1 * focusWidth), sp->m_ListParameters.radius, sp->m_ListParameters.radius); - } else if(qobject_cast<const QTableView *>(widget) || qobject_cast<const QTableWidget *>(widget)){ - sp->initConfigTableParameters(isUseDarkPalette(), option, widget); - -@@ -3118,11 +3142,15 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - disableBrush = sp->m_TableParameters.tableDisableBrush; - hoverPen = sp->m_TableParameters.tableHoverPen; - selectPen = sp->m_TableParameters.tableSelectPen; -+ focusPen = sp->m_TableParameters.tableFocusPen; -+ focusRadius = sp->m_TableParameters.radius; -+ int focusWidth = focus ? focusPen.width()/2 : 0; - -- path.addRoundedRect(vi->rect, sp->m_TableParameters.radius, sp->m_TableParameters.radius); -+ path.addRoundedRect(vi->rect.adjusted(focusWidth, focusWidth, -1 * focusWidth, -1 * focusWidth), sp->m_TableParameters.radius, sp->m_TableParameters.radius); - } - else { - path.addRect(vi->rect); -+ focusRadius = 0; - defaultBrush = QBrush(Qt::transparent); - hoverBrush = option->palette.brush(QPalette::Disabled, QPalette::Midlight); - selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -@@ -3276,10 +3304,86 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - else - painter->drawPath(path); - } -+ -+// if(isTree && focus){ -+// auto tree = qobject_cast<const QTreeView*>(widget); -+ -+// QRect treeFocusRec = QRect(tree->viewport()->x(), option->rect.y(), tree->viewport()->width(), option->rect.height()); -+// qDebug() << "treeFocusRec......" <<treeFocusRec; -+// painter->save(); -+// painter->setPen(QPen(QColor(Qt::red), 1)); -+// painter->setBrush(Qt::NoBrush); -+// painter->drawRect(treeFocusRec); -+// painter->restore(); -+// } - painter->restore(); -+ -+ if(focus) -+ qDebug() << "item focusssss true" << focus; -+ -+// if (focus) { -+// painter->save(); -+// painter->setPen((focusPen == Qt::NoPen || focusPen.color().alpha() == 0) ? Qt::NoPen : focusPen); -+// if(isTree){ -+// if (painter->pen().width() == 1 && -+// !(vi->viewItemPosition == QStyleOptionViewItem::OnlyOne && -+// vi->rect.left() == 0)) { -+// painter->translate(0, 0.5); -+// } -+ -+// if(!borderPath0.isEmpty()){ -+// painter->drawPath(borderPath0); -+// } -+// if(!borderPath1.isEmpty()){ -+// painter->drawPath(borderPath1); -+// } -+// if(!borderPath2.isEmpty()){ -+// if(painter->pen().width() == 1) -+// painter->translate(-0.5, 0); -+// painter->drawPath(borderPath2); -+// } -+// } -+// else -+// painter->drawPath(path); -+// painter->restore(); -+// } -+ - } -- if (vi->state & State_HasFocus) { -+ if (!isTree && focus) { -+ painter->save(); -+ painter->setRenderHint(QPainter::Antialiasing, true); -+ painter->setPen((focusPen == Qt::NoPen || focusPen.color().alpha() == 0) ? Qt::NoPen : focusPen); -+ painter->drawPath(path); -+ painter->restore(); -+ } -+ else if(isTree){ -+// auto tree = qobject_cast<const QTreeView*>(widget); -+// auto t = const_cast<QTreeView *>(tree); -+// tree->model()->index() -+// if(const QStyleOptionViewItem *vimm = qstyleoption_cast<const QStyleOptionViewItem *>(option)) -+// qDebug() << "item vi..........." << vimm << vimm->index << vimm->index.row() << vimm->index.column(); -+// qDebug() << "children........" << tree->childAt(vi->rect.center()); -+// if(vi->state & QStyle::State_HasFocus){ -+// qDebug() << "hasfocus......."; -+// } -+ // if(vi->state & QStyle::State_HasFocus){ -+// t->setProperty("focusPoint", vi->rect.center()); -+// } - -+// QRect treeItemRec = QRect(tree->x(), option->rect.y(), tree->width(), option->rect.height()); -+// qDebug() << "treeItemRec......" << treeItemRec; -+// if(t->property("focusPoint").isValid() && t->property("focusPoint").canConvert<QPoint>()){ -+// QPoint p = t->property("focusPoint").toPoint(); -+//// qDebug() << "focuspoint...." << p; -+// if(treeItemRec.contains(p)) -+// { -+// painter->save(); -+// painter->setPen(QPen(QColor(Qt::red), 1)); -+// painter->setBrush(Qt::red); -+// painter->drawRect(treeItemRec); -+// painter->restore(); -+// } -+// } - } - return; - } -@@ -3292,15 +3396,21 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - bool isHover = option->state & State_MouseOver; - bool isSelected = option->state & State_Selected; - bool enable = option->state & State_Enabled; -+// bool focus = false; -+// if(const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option)){ -+// focus = vi->state & State_HasFocus; -+// } - QBrush brush; - QPen hoverPen = Qt::NoPen; - QPen selectPen = Qt::NoPen; -+// QPen focusPen = Qt::NoPen; - QPainterPath borderPath0; - QPainterPath borderPath1; - - sp->initConfigTreeParameters(isUseDarkPalette(), option, widget); - hoverPen = sp->m_TreeParameters.treeHoverPen; - selectPen = sp->m_TreeParameters.treeSelectPen; -+ //focusPen = sp->m_TreeParameters.treeFocusPen; - - if (!enable) { - brush = sp->m_TreeParameters.treeBranchDisableBrush; -@@ -3370,6 +3480,13 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - painter->setPen(hoverPen); - } - -+// if(focus) -+// qDebug() << "branch focusssss true" << focus; -+// if(option->state & State_HasFocus) -+// { -+// painter->setPen(focusPen); -+// } -+ - if(painter->pen().width() == 1 && sp->m_TreeParameters.radius != 0) - painter->translate(0.5, 0.5); - -@@ -3708,6 +3825,8 @@ void UKUIConfigStyle::drawComplexControl(QStyle::ComplexControl control, const Q - const bool enable = comboBox->state & State_Enabled; - const bool on = comboBox->state & State_On; - const bool hover = comboBox->state & State_MouseOver; -+ const bool focus = comboBox->state & State_HasFocus; -+ - int width = 0; - - painter->save(); -@@ -3742,6 +3861,12 @@ void UKUIConfigStyle::drawComplexControl(QStyle::ComplexControl control, const Q - painter->setBrush(sp->m_ComboBoxParameters.comboBoxDefaultBrush); - } - } -+ -+ //focus -+ if (focus) { -+ width = sp->m_ComboBoxParameters.comboBoxFocusPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_ComboBoxParameters.comboBoxFocusPen); -+ } - } - if(width == 1 && sp->m_ComboBoxParameters.radius != 0) - painter->translate(0.5, 0.5); -@@ -5132,12 +5257,13 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - } - - int penWidth = sp->m_TabWidgetParameters.tabBarPen.width(); -- drawRect.adjust(0, 0, -1, 0); -- penPath.moveTo(drawRect.left(), drawRect.bottom() - penWidth); -- penPath.lineTo(drawRect.left(), drawRect.top()); -- penPath.lineTo(drawRect.right(), drawRect.top()); -- penPath.lineTo(drawRect.right(), drawRect.bottom() - penWidth); -- penPath.lineTo(drawRect.left(), drawRect.bottom() - penWidth); -+ int radius = sp->m_TabWidgetParameters.radius; -+// drawRect.adjust(0, 0, -1 * penWidth, 0); -+// penPath.moveTo(drawRect.left(), drawRect.bottom() - penWidth - radius); -+// penPath.lineTo(drawRect.left(), drawRect.top()); -+// penPath.lineTo(drawRect.right(), drawRect.top()); -+// penPath.lineTo(drawRect.right(), drawRect.bottom() - penWidth); -+// penPath.lineTo(drawRect.left(), drawRect.bottom() - penWidth); - - if(click) { - painter->setBrush(sp->m_TabWidgetParameters.tabBarClickBrush); -@@ -5157,9 +5283,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - painter->setRenderHint(QPainter::Antialiasing, true); - if(painter->pen().width() == 1) - painter->translate(0.5, 0.5); -- painter->drawPath(penPath); -- painter->restore(); -- painter->save(); -+ painter->drawRoundedRect(drawRect.adjusted(penWidth/2, penWidth/2, -1 * penWidth/2, -1 * penWidth), radius, radius); - painter->restore(); - - return; -@@ -5424,6 +5548,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - { - if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) { - const bool enable(menuItem->state & State_Enabled); -+ const bool focus = menuItem->state & State_HasFocus; - if (menuItem->menuItemType == QStyleOptionMenuItem::EmptyArea) { - return; - } -@@ -5453,6 +5578,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - drawRect.adjust(MenuItem_HMargin, sp->ComboBox_VMargin, -MenuItem_HMargin, -1 * sp->ComboBox_VMargin); - } - -+ //qDebug() << "focus........." << focus << menuItem->text; - if (enable && (selected | sunken)) { - painter->save(); - painter->setRenderHint(QPainter::Antialiasing); -@@ -5461,6 +5587,14 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - painter->drawRoundedRect(drawRect, sp->m_MenuParameters.itemRadius, sp->m_MenuParameters.itemRadius); - painter->restore(); - } -+ if(enable && focus){ -+ painter->save(); -+ painter->setRenderHint(QPainter::Antialiasing); -+ painter->setPen(sp->m_MenuParameters.menuItemFocusPen); -+ painter->setBrush(Qt::transparent); -+ painter->drawRoundedRect(drawRect, sp->m_MenuParameters.itemRadius, sp->m_MenuParameters.itemRadius); -+ painter->restore(); -+ } - - int MenuItem_Spacing = sp->MenuItem_Spacing; - int MenuItem_HMargin = sp->MenuContent_HMargin; -@@ -5934,6 +6068,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - proxy()->drawPrimitive(PE_IndicatorHeaderArrow, &subopt, painter, widget); - } - painter->setClipRegion(clipRegion); -+ - return; - } - break; -@@ -6012,7 +6147,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - const bool enable = option->state & State_Enabled; - painter->save(); - painter->setPen(Qt::NoPen); -- painter->setBrush(option->palette.brush(enable ? QPalette::Active : QPalette::Disabled, QPalette::Base)); -+ painter->setBrush(Qt::NoBrush);//option->palette.brush(enable ? QPalette::Active : QPalette::Disabled, QPalette::Base)); - painter->drawRect(option->rect); - painter->restore(); - return; -@@ -6059,7 +6194,19 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - // mode = QIcon::Selected; - QIcon::State state = vi->state & QStyle::State_Open ? QIcon::On : QIcon::Off; - QPixmap pixmap = vi->icon.pixmap(vi->decorationSize, mode, state); -- pixmap = proxy()->generatedIconPixmap(mode, pixmap, vi); -+ -+ if(!sp->indicatorIconHoverNeedHighLight) -+ pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -+ else if(widget && (widget->inherits("QTreeView") || widget->inherits("QTreeWidget"))){ -+ if(widget->property("highlightMode").isValid() && widget->property("highlightMode").toBool()) -+ pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -+ else -+ pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -+ } -+ else -+ pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -+ -+ //pixmap = proxy()->generatedIconPixmap(mode, pixmap, vi); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - proxy()->drawItemPixmap(painter, iconRect, vi->decorationAlignment, HighLightEffect::ordinaryGeneratePixmap(pixmap, vi, widget)); - } -@@ -6110,6 +6257,18 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - viewItemDrawText(painter, vi, textRect); - - } -+ -+// if(vi->state & QStyle::State_HasFocus){ -+// QStyleOptionFocusRect o; -+// o.QStyleOption::operator=(*vi); -+// o.rect = proxy()->subElementRect(SE_ItemViewItemFocusRect, vi, widget); -+// qDebug() << "ooooooo" << o.rect << proxy()->subElementRect(SE_TreeViewDisclosureItem, vi, widget); -+// painter->save(); -+// painter->setPen(QPen(QColor(Qt::blue), 1)); -+// painter->setBrush(Qt::NoBrush); -+// painter->drawRect(o.rect); -+// painter->restore(); -+// } - painter->restore(); - return; - } -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h -index 2559d05..e6a4def 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h -@@ -46,6 +46,7 @@ public: - QPen comboBoxOnPen; - QPen comboBoxEditPen; - QPen comboBoxDisablePen; -+ QPen comboBoxFocusPen; - }; - } - #endif // ConfigComboBoxParameters_H -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -index eba553a..16820bc 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -@@ -44,6 +44,7 @@ public: - QPen listTextSelectPen; - QPen listHoverPen; - QPen listSelectPen; -+ QPen listFocusPen; - }; - } - #endif // LISTPARAMETERS_H -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h -index 850c04e..7cf419f 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h -@@ -46,6 +46,9 @@ public: - QPixmap menuFramePixmap; - - QPen menuTextHoverPen; -+ -+ QPen menuItemFocusPen; -+ - }; - } - #endif // MENUPARAMETERS_H -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -index 19c3ee9..393713d 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -@@ -42,6 +42,7 @@ public: - QBrush tableDisableBrush; - QPen tableHoverPen; - QPen tableSelectPen; -+ QPen tableFocusPen; - QPen tableTextHoverPen; - QPen tableTextSelectPen; - }; -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -index bca8ae3..0644eda 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -@@ -43,6 +43,7 @@ public: - QBrush tabBarClickBrush; - QBrush tabBarSelectBrush; - QPen tabBarPen = Qt::NoPen; -+ QPen tabBarFocusPen = Qt::NoPen; - - }; - } -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -index 5490152..48f1ae4 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -@@ -46,6 +46,7 @@ public: - QBrush treeBranchDisableBrush; - QPen treeHoverPen; - QPen treeSelectPen; -+ QPen treeFocusPen; - QPen treeTextHoverPen; - QPen treeTextSelectPen; - -diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp -index 108790d..a62dab9 100644 ---- a/ukui-styles/readconfig.cpp -+++ b/ukui-styles/readconfig.cpp -@@ -786,6 +786,7 @@ UKUIColorTheme::ComboBoxColorCfg ReadThemeConfig::comboBoxColorCfg(const QPalett - m_readConfig->getColorValue(m_comboBoxColorCfg.onPen , m_theme, UKUIComboBox, property, C_ComboBox_OnPen); - m_readConfig->getColorValue(m_comboBoxColorCfg.editPen , m_theme, UKUIComboBox, property, C_ComboBox_EditPen); - m_readConfig->getColorValue(m_comboBoxColorCfg.disablePen , m_theme, UKUIComboBox, property, C_ComboBox_DisablePen); -+ m_readConfig->getColorValue(m_comboBoxColorCfg.focusPen , m_theme, UKUIComboBox, property, C_ComboBox_FocusPen); - - m_readConfig->getColorValue(m_comboBoxColorCfg.defaultBrush, m_theme, UKUIComboBox, property, C_ComboBox_DefaultBrush); - m_readConfig->getColorValue(m_comboBoxColorCfg.hoverBrush , m_theme, UKUIComboBox, property, C_ComboBox_HoverBrush); -@@ -913,7 +914,7 @@ UKUIColorTheme::ListViewColorCfg ReadThemeConfig::listViewColorCfg(const QPalett - - m_readConfig->getColorValue(m_listViewColorCfg.textHoverPen , m_theme, UKUIListView, property, C_ListView_TextHoverPen); - m_readConfig->getColorValue(m_listViewColorCfg.textSelectPen, m_theme, UKUIListView, property, C_ListView_TextSelectPen); -- -+ m_readConfig->getColorValue(m_listViewColorCfg.focusPen , m_theme, UKUITreeView, property, C_TreeView_FocusPen); - - m_listViewColorCfg.hoverType = m_readConfig->getType(m_theme, UKUIListView, property, C_ListView_HoverBrush); - if(m_listViewColorCfg.hoverType == Obj_Gradient_Type){ -@@ -942,6 +943,7 @@ UKUIColorTheme::TreeViewColorCfg ReadThemeConfig::treeViewColorCfg(const QPalett - m_readConfig->getColorValue(m_treeViewColorCfg.branchDefaultBrush, m_theme, UKUITreeView, property, C_TreeView_BranchDefaultBrush); - m_readConfig->getColorValue(m_treeViewColorCfg.branchSelectBrush , m_theme, UKUITreeView, property, C_TreeView_BranchSelectBrush); - m_readConfig->getColorValue(m_treeViewColorCfg.branchDisableBrush, m_theme, UKUITreeView, property, C_TreeView_BranchDisableBrush); -+ m_readConfig->getColorValue(m_treeViewColorCfg.focusPen , m_theme, UKUITreeView, property, C_TreeView_FocusPen); - - m_readConfig->getColorValue(m_treeViewColorCfg.textHoverPen , m_theme, UKUITreeView, property, C_TreeView_TextHoverPen); - m_readConfig->getColorValue(m_treeViewColorCfg.textSelectPen , m_theme, UKUITreeView, property, C_TreeView_TextSelectPen); -@@ -1072,6 +1074,7 @@ UKUIColorTheme::TabWidgetColorCfg ReadThemeConfig::tabWidgetColorCfg(const QPale - m_readConfig->getColorValue(m_tabWidgetColorCfg.tabBarClickBrush , m_theme, UKUITabWidget, property, C_TabWidget_TabBarClickBrush ); - m_readConfig->getColorValue(m_tabWidgetColorCfg.tabBarHoverPen , m_theme, UKUITabWidget, property, C_TabWidget_TabBarHoverPen ); - m_readConfig->getColorValue(m_tabWidgetColorCfg.tabBarClickPen , m_theme, UKUITabWidget, property, C_TabWidget_TabBarClickPen ); -+ m_readConfig->getColorValue(m_tabWidgetColorCfg.tabBarFocusPen , m_theme, UKUITabWidget, property, C_TabWidget_TabBarFocusPen ); - - m_tabWidgetColorCfg.tabBarHoverType = m_readConfig->getType(m_theme, UKUITabWidget, property, C_TabWidget_TabBarHoverBrush); - if(m_tabWidgetColorCfg.tabBarHoverType == Obj_Gradient_Type){ -@@ -1094,6 +1097,7 @@ UKUIColorTheme::MenuColorCfg ReadThemeConfig::menuColorCfg(const QPalette palett - m_readConfig->getColorValue(m_menuColorCfg.menuBackgroundBrush, m_theme, UKUIMenu, property, C_Menu_MenuBackgroundBrush); - m_readConfig->getColorValue(m_menuColorCfg.menuBackgroundPen, m_theme, UKUIMenu, property, C_Menu_MenuBackgroundPen); - m_readConfig->getColorValue(m_menuColorCfg.menuItemSelectBrush, m_theme, UKUIMenu, property, C_Menu_MenuItemSelectBrush); -+ m_readConfig->getColorValue(m_menuColorCfg.menuItemFocusPen , m_theme, UKUIMenu, property, C_Menu_MenuItemFocusPen ); - m_readConfig->getColorValue(m_menuColorCfg.menuTextHoverPen , m_theme, UKUIMenu, property, C_Menu_MenuTextHoverPen ); - - return m_menuColorCfg; -diff --git a/ukui-styles/themeinformation.h b/ukui-styles/themeinformation.h -index c0a3df0..1993d1c 100644 ---- a/ukui-styles/themeinformation.h -+++ b/ukui-styles/themeinformation.h -@@ -144,6 +144,7 @@ - #define C_ComboBox_OnPen "OnPen" - #define C_ComboBox_EditPen "EditPen" - #define C_ComboBox_DisablePen "DisablePen" -+#define C_ComboBox_FocusPen "FocusPen" - #define C_ComboBox_DefaultBrush "DefaultBrush" - #define C_ComboBox_HoverBrush "HoverBrush" - #define C_ComboBox_OnBrush "OnBrush" -@@ -194,6 +195,7 @@ - #define C_Table_SelectPen "SelectPen" - #define C_Table_TextHoverPen "TextHoverPen" - #define C_Table_TextSelectPen "TextSelectPen" -+#define C_Table_FocusPen "FocusPen" - - #define UKUIListView "ListView" - #define C_ListView_Default "DefaultListView" -@@ -207,6 +209,7 @@ - #define C_ListView_TextSelectPen "TextSelectPen" - #define C_ListView_HoverPen "HoverPen" - #define C_ListView_SelectPen "SelectPen" -+#define C_ListView_FocusPen "FocusPen" - - #define UKUITreeView "TreeView" - #define C_TreeView_Default "DefaultTreeView" -@@ -224,6 +227,7 @@ - #define C_TreeView_TextSelectPen "TextSelectPen" - #define C_TreeView_HoverPen "HoverPen" - #define C_TreeView_SelectPen "SelectPen" -+#define C_TreeView_FocusPen "FocusPen" - #define C_TreeView_BranchHoverPen "BranchHoverPen" - #define C_TreeView_BranchSelectPen "BranchSelectPen" - -@@ -285,6 +289,7 @@ - #define C_TabWidget_TabBarClickBrush "TabBarClickBrush" - #define C_TabWidget_TabBarHoverPen "TabBarHoverPen" - #define C_TabWidget_TabBarClickPen "TabBarClickPen" -+#define C_TabWidget_TabBarFocusPen "TabBarFocusPen" - - - #define UKUIMenu "Menu" -@@ -292,6 +297,7 @@ - #define C_Menu_MenuBackgroundBrush "MenuBackgroundBrush" - #define C_Menu_MenuBackgroundPen "MenuBackgroundPen" - #define C_Menu_MenuItemSelectBrush "MenuItemSelectBrush" -+#define C_Menu_MenuItemFocusPen "MenuItemFocusPen" - #define C_Menu_MenuTextHoverPen "MenuTextHoverPen" - - #define c_windowText_at "WindowText_at" -@@ -631,6 +637,7 @@ typedef struct ComboBoxColorStruct - QColor onBrush = QColor(255, 255, 255); - QColor editBrush = QColor(255, 255, 255); - QColor disableBrush = QColor(233, 233, 233); -+ QColor focusPen = QColor(44, 115, 200 ); - }ComboBoxColorCfg; - - typedef struct SpinBoxColorStruct -@@ -686,6 +693,7 @@ typedef struct TableColorStruct - QColor selectPen = QColor(0, 0, 0, 0 ); - QColor textHoverPen = QColor(38, 38, 38 ); - QColor textSelectPen = QColor(255, 255, 255 ); -+ QColor focusPen = QColor(55, 144, 250 ); - QList<QColor> hoverGradientList; - QString hoverType = "color"; - }TableColorCfg; -@@ -700,6 +708,7 @@ typedef struct ListViewColorStruct - QColor textSelectPen = QColor(255, 255, 255 ); - QColor hoverPen = QColor(0, 0, 0, 0 ); - QColor selectPen = QColor(0, 0, 0, 0 ); -+ QColor focusPen = QColor(55, 144, 250 ); - QList<QColor> hoverGradientList; - QString hoverType = "color"; - }ListViewColorCfg; -@@ -720,6 +729,7 @@ typedef struct TreeViewColorStruct - QColor selectPen = QColor(0, 0, 0, 0 ); - QColor branchhoverPen = QColor(0, 0, 0, 0 ); - QColor branchselectPen = QColor(0, 0, 0, 0 ); -+ QColor focusPen = QColor(55, 144, 250 ); - QList<QColor> hoverGradientList; - QString hoverType = "color"; - QList<QColor> branchHoverGradientList; -@@ -790,6 +800,8 @@ typedef struct TabWidgetColorStruct - QColor tabBarClickBrush = QColor(255, 255, 255); - QColor tabBarHoverPen = QColor(0, 0, 0, 0); - QColor tabBarClickPen = QColor(0, 0, 0, 0); -+ QColor tabBarFocusPen = QColor(55, 144, 250); -+ - QList<QColor> tabBarHoverGradientList; - QString tabBarHoverType = "color"; - }TabWidgetColorCfg; -@@ -800,6 +812,7 @@ typedef struct MenuColorStruct - QColor menuBackgroundPen = QColor(38, 38, 38, 0.15); - QColor menuItemSelectBrush = QColor(55, 144, 250); - QColor menuTextHoverPen = QColor(255, 255, 255); -+ QColor menuItemFocusPen = QColor(55, 144, 250); - }MenuColorCfg; - } - diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0022-Add-rounded-corners-for-tabbar-hover-state.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0022-Add-rounded-corners-for-tabbar-hover-state.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0022-Add-rounded-corners-for-tabbar-hover-state.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0022-Add-rounded-corners-for-tabbar-hover-state.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,169 +0,0 @@ -From: likehomedream <like1@kylinos.cn.com> -Date: Mon, 8 Jan 2024 14:19:34 +0800 -Subject: Add rounded corners for tabbar hover state - ---- - .../qt5-config-style-ukui/ukui-config-style.cpp | 149 +-------------------- - 1 file changed, 6 insertions(+), 143 deletions(-) - -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 0df67b9..683ce46 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -5110,150 +5110,13 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - // penPath.arcTo(QRect(drawRect.right() - moveWidth - TabBarTab_Radius * 2, drawRect.top(), - // TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); - // penPath.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); -+ } else if (hover){ -+ -+ path.addRoundedRect(drawRect, TabBarTab_Radius, TabBarTab_Radius); -+ - } else { -- if (widget != NULL && qobject_cast<const QTabBar*>(widget)) { -- const auto *tabbar = qobject_cast<const QTabBar*>(widget); -- int select_index = tabbar->currentIndex(); -- int now_index = tabbar->tabAt(QPoint(drawRect.x(),drawRect.y())); -- int tab_count = tabbar->count(); -- -- if (select_index - now_index == 1) { -- //select rect left -- drawRect.adjust(0, 0, tabOverlap, 0); -- if (now_index == 0) { -- path.moveTo(drawRect.left(), drawRect.top() + TabBarTab_Radius); -- path.lineTo(drawRect.left(), drawRect.bottom()); -- path.lineTo(drawRect.right() - TabBarTab_Radius, drawRect.bottom()); -- path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.bottom() - TabBarTab_Radius * 2, -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 270, 90); -- path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); -- path.arcTo(QRect(drawRect.right(), drawRect.top(), -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, -90); -- path.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); -- path.arcTo(QRect(drawRect.left(), drawRect.top(), -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, 90); -- --// penPath.moveTo(drawRect.left(), drawRect.top() + TabBarTab_Radius); --// penPath.lineTo(drawRect.left(), drawRect.bottom()); --// penPath.moveTo(drawRect.right() - moveWidth - TabBarTab_Radius, drawRect.bottom()); --// penPath.arcTo(QRect(drawRect.right() - moveWidth - TabBarTab_Radius * 2, drawRect.bottom() - TabBarTab_Radius * 2, --// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 270, 90); --// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top() + TabBarTab_Radius); --// penPath.arcTo(QRect(drawRect.right() - moveWidth, drawRect.top(), --// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, -90); --// penPath.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); --// penPath.arcTo(QRect(drawRect.left(), drawRect.top(), --// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, 90); -- } else { -- path.moveTo(drawRect.left(), drawRect.top()); -- path.lineTo(drawRect.left(), drawRect.bottom()); -- path.lineTo(drawRect.right() - TabBarTab_Radius, drawRect.bottom()); -- path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.bottom() - TabBarTab_Radius * 2, -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 270, 90); -- path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); -- path.arcTo(QRect(drawRect.right(), drawRect.top(), -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, -90); -- path.lineTo(drawRect.left(), drawRect.top()); -- --// penPath.moveTo(drawRect.left(), drawRect.top()); --// penPath.lineTo(drawRect.left(), drawRect.bottom()); --// penPath.moveTo(drawRect.right() - moveWidth - TabBarTab_Radius, drawRect.bottom()); --// penPath.arcTo(QRect(drawRect.right() - moveWidth - TabBarTab_Radius * 2, drawRect.bottom() - TabBarTab_Radius * 2, --// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 270, 90); --// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top() + TabBarTab_Radius); --// penPath.arcTo(QRect(drawRect.right() - moveWidth, drawRect.top(), --// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, -90); --// penPath.lineTo(drawRect.left(), drawRect.top()); -- } -- } else if(select_index - now_index == -1) { -- //select rect right -- drawRect.adjust(0, 0, tabOverlap, 0); -- if (now_index == tab_count - 1) { -- path.moveTo(drawRect.right(), drawRect.bottom()); -- path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); -- path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.top(), -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); -- path.lineTo(drawRect.left() - TabBarTab_Radius, drawRect.top()); -- path.arcTo(QRect(drawRect.left() - TabBarTab_Radius * 2, drawRect.top(), -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, -90); -- path.lineTo(drawRect.left(), drawRect.bottom() - TabBarTab_Radius); -- path.arcTo(QRect(drawRect.left(), drawRect.bottom() - TabBarTab_Radius * 2, -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, 90); -- path.lineTo(drawRect.right(), drawRect.bottom()); -- --// penPath.moveTo(drawRect.right() - moveWidth, drawRect.bottom()); --// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top() + TabBarTab_Radius); --// penPath.arcTo(QRect(drawRect.right() - moveWidth - TabBarTab_Radius * 2, drawRect.top(), --// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); --// penPath.lineTo(drawRect.left() - TabBarTab_Radius, drawRect.top()); --// penPath.arcTo(QRect(drawRect.left() - TabBarTab_Radius * 2, drawRect.top(), --// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, -90); --// penPath.lineTo(drawRect.left(), drawRect.bottom() - TabBarTab_Radius); --// penPath.arcTo(QRect(drawRect.left(), drawRect.bottom() - TabBarTab_Radius * 2, --// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, 90); -- } else { -- path.moveTo(drawRect.right(), drawRect.bottom()); -- path.lineTo(drawRect.right(), drawRect.top()); -- path.lineTo(drawRect.left() - TabBarTab_Radius, drawRect.top()); -- path.arcTo(QRect(drawRect.left() - TabBarTab_Radius * 2, drawRect.top(), TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, -90); -- path.lineTo(drawRect.left(), drawRect.bottom() - TabBarTab_Radius); -- path.arcTo(QRect(drawRect.left(), drawRect.bottom() - TabBarTab_Radius * 2, -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, 90); -- path.lineTo(drawRect.right(), drawRect.bottom()); -- --// penPath.moveTo(drawRect.right() - moveWidth, drawRect.bottom()); --// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top()); --// penPath.lineTo(drawRect.left() - TabBarTab_Radius, drawRect.top()); --// penPath.arcTo(QRect(drawRect.left() - TabBarTab_Radius * 2, drawRect.top(), TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, -90); --// penPath.lineTo(drawRect.left(), drawRect.bottom() - TabBarTab_Radius); --// penPath.arcTo(QRect(drawRect.left(), drawRect.bottom() - TabBarTab_Radius * 2, --// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, 90); -- } -- } else { -- if (now_index == 0) { -- drawRect.adjust(0, 0, tabOverlap, 0); -- path.moveTo(drawRect.left(), drawRect.top() + TabBarTab_Radius); -- path.lineTo(drawRect.left(), drawRect.bottom()); -- path.lineTo(drawRect.right(), drawRect.bottom()); -- path.lineTo(drawRect.right(), drawRect.top()); -- path.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); -- path.arcTo(QRect(drawRect.left(), drawRect.top(), -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, 90); -- -- --// penPath.moveTo(drawRect.left(), drawRect.top() + TabBarTab_Radius); --// penPath.lineTo(drawRect.left(), drawRect.bottom()); --// penPath.moveTo(drawRect.right() - moveWidth, drawRect.bottom()); --// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top()); --// penPath.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); --// penPath.arcTo(QRect(drawRect.left(), drawRect.top(), --// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, 90); -- -- } else if (now_index == tab_count - 1) { -- drawRect.adjust(0, 0, tabOverlap, 0); -- path.moveTo(drawRect.right(), drawRect.bottom()); -- path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); -- path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.top(), -- TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); -- path.lineTo(drawRect.left(), drawRect.top()); -- path.lineTo(drawRect.left(), drawRect.bottom()); -- path.lineTo(drawRect.right(), drawRect.bottom()); -- --// penPath.moveTo(drawRect.right() - moveWidth, drawRect.bottom()); --// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top() + TabBarTab_Radius); --// penPath.arcTo(QRect(drawRect.right() - moveWidth - TabBarTab_Radius * 2, drawRect.top(), --// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); --// penPath.lineTo(drawRect.left(), drawRect.top()); --// penPath.lineTo(drawRect.left(), drawRect.bottom()); -- } else { -- path.addRect(drawRect); --// penPath.addRect(drawRect); -- } -- } -- } else { -- path.addRect(drawRect); --// penPath.addRect(drawRect); -- } -+ -+ path.addRect(drawRect); - } - - int penWidth = sp->m_TabWidgetParameters.tabBarPen.width(); diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0023-Refresh-update-changelog-4.1.0.0-0k24.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0023-Refresh-update-changelog-4.1.0.0-0k24.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0023-Refresh-update-changelog-4.1.0.0-0k24.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0023-Refresh-update-changelog-4.1.0.0-0k24.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,248 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Tue, 9 Jan 2024 10:15:55 +0800 -Subject: Refresh update changelog 4.1.0.0-0k24 - ---- - qt5-ukui-filedialog/kyfiledialog.cpp | 2 +- - qt5-ukui-filedialog/kyfiledialogprivate.cpp | 8 ++++++++ - qt5-ukui-filedialog/kyfiledialogprivate.h | 4 +++- - qt5-ukui-filedialog/sidebar.cpp | 22 ++++++++++++++++------ - qt5-ukui-filedialog/sidebar.h | 22 +++++++++++----------- - .../widget/messagebox/message-box.cpp | 17 +++++++++++++---- - .../ukui-config-style-parameters.cpp | 16 ++++++++-------- - 7 files changed, 60 insertions(+), 31 deletions(-) - -diff --git a/qt5-ukui-filedialog/kyfiledialog.cpp b/qt5-ukui-filedialog/kyfiledialog.cpp -index 8bf304f..354f88b 100644 ---- a/qt5-ukui-filedialog/kyfiledialog.cpp -+++ b/qt5-ukui-filedialog/kyfiledialog.cpp -@@ -345,7 +345,7 @@ KyNativeFileDialog::KyNativeFileDialog(QWidget *parent) - onSwitchView(); - isTableModel(); - -- m_model = new QStringListModel(); -+ m_model = new QStringListModel(this); - m_completer = new QCompleter(mKyFileDialogUi->m_fileNameEdit); - m_completer->setModel(m_model); - m_completer->setMaxVisibleItems(10); -diff --git a/qt5-ukui-filedialog/kyfiledialogprivate.cpp b/qt5-ukui-filedialog/kyfiledialogprivate.cpp -index da7c071..d8b5e34 100644 ---- a/qt5-ukui-filedialog/kyfiledialogprivate.cpp -+++ b/qt5-ukui-filedialog/kyfiledialogprivate.cpp -@@ -37,6 +37,14 @@ KyNativeFileDialogPrivate::KyNativeFileDialogPrivate() - // m_container = q->m_container; - } - -+KyNativeFileDialogPrivate::~KyNativeFileDialogPrivate() -+{ -+ if(m_timer){ -+ delete m_timer; -+ m_timer = nullptr; -+ } -+} -+ - QStringList KyNativeFileDialogPrivate::typedFiles() - { - /* -diff --git a/qt5-ukui-filedialog/kyfiledialogprivate.h b/qt5-ukui-filedialog/kyfiledialogprivate.h -index 7af515b..7b93cd5 100644 ---- a/qt5-ukui-filedialog/kyfiledialogprivate.h -+++ b/qt5-ukui-filedialog/kyfiledialogprivate.h -@@ -36,9 +36,11 @@ class KyFileDialogHelper; - class KyNativeFileDialogPrivate - { - friend class KyNativeFileDialog; --private: -+public: - KyNativeFileDialogPrivate(); -+ ~KyNativeFileDialogPrivate(); - -+private: - QStringList typedFiles(); - - QStringList nameFilters; -diff --git a/qt5-ukui-filedialog/sidebar.cpp b/qt5-ukui-filedialog/sidebar.cpp -index 66c1f6e..8499b39 100644 ---- a/qt5-ukui-filedialog/sidebar.cpp -+++ b/qt5-ukui-filedialog/sidebar.cpp -@@ -104,6 +104,8 @@ FileDialogSideBar::FileDialogSideBar(QWidget *parent) : QTreeView(parent) - setSortingEnabled(true); - - setProperty("useIconHighlightEffect", true); -+ setProperty("highlightMode", true); -+ - setDragDropMode(QTreeView::NoDragDrop); - setProperty("doNotBlur", true); - viewport()->setProperty("doNotBlur", true); -@@ -114,8 +116,8 @@ FileDialogSideBar::FileDialogSideBar(QWidget *parent) : QTreeView(parent) - setAutoScrollMargin(0); - - -- auto delegate = new SideBarItemDelegate(this); -- setItemDelegate(delegate); -+ m_delegate = new SideBarItemDelegate(this); -+ setItemDelegate(m_delegate); - - m_model = new Peony::SideBarModel(this); - m_proxyModel = new Peony::SideBarProxyFilterSortModel(this); -@@ -244,10 +246,18 @@ FileDialogSideBar::FileDialogSideBar(QWidget *parent) : QTreeView(parent) - - FileDialogSideBar::~FileDialogSideBar() - { -- m_proxyModel->deleteLater(); -- m_proxyModel = nullptr; -- m_model->deleteLater(); -- m_model = nullptr; -+ if(m_proxyModel){ -+ m_proxyModel->deleteLater(); -+ m_proxyModel = nullptr; -+ } -+ if(m_model){ -+ m_model->deleteLater(); -+ m_model = nullptr; -+ } -+ if(m_delegate){ -+ m_delegate->deleteLater(); -+ m_delegate = nullptr; -+ } - } - - void FileDialogSideBar::tableModeChanged(bool isTableMode) -diff --git a/qt5-ukui-filedialog/sidebar.h b/qt5-ukui-filedialog/sidebar.h -index 48112e9..0f4c9e3 100644 ---- a/qt5-ukui-filedialog/sidebar.h -+++ b/qt5-ukui-filedialog/sidebar.h -@@ -56,6 +56,16 @@ private: - QSize m_minSize; - }; - -+class SideBarItemDelegate : public QStyledItemDelegate -+{ -+ friend class FileDialogSideBar; -+ explicit SideBarItemDelegate(QObject *parent = nullptr); -+ ~SideBarItemDelegate(){} -+ -+// QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; -+ void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; -+}; -+ - - class FileDialogSideBar : public QTreeView - { -@@ -74,6 +84,7 @@ public Q_SLOTS: - private: - Peony::SideBarProxyFilterSortModel *m_proxyModel = nullptr; - Peony::SideBarModel *m_model = nullptr; -+ SideBarItemDelegate *m_delegate = nullptr; - - Q_SIGNALS: - void goToUriRequest(const QString &uri, bool addToHistory = true, bool forceUpdate = false); -@@ -81,17 +92,6 @@ Q_SIGNALS: - }; - - --class SideBarItemDelegate : public QStyledItemDelegate --{ -- friend class FileDialogSideBar; -- explicit SideBarItemDelegate(QObject *parent = nullptr); -- ~SideBarItemDelegate(){} -- --// QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; -- void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; --}; -- -- - class SideBarStyle : public QProxyStyle - { - public: -diff --git a/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp b/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -index ce5d479..6eadac2 100644 ---- a/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -+++ b/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -@@ -78,7 +78,7 @@ MessageBox::MessageBox(QWidget *parent) : QDialog(*new MessageBoxPrivate, parent - Q_D(MessageBox); - - const QString locale = QLocale::system().name(); -- QTranslator *translator = new QTranslator(); -+ QTranslator *translator = new QTranslator(this); - if (translator->load("/usr/share/qt5-ukui-platformtheme/qt5-ukui-platformtheme_" + locale)) { - - //Fix:BUG176598,block QMessagebox translation for xca before commit patch to upstream -@@ -1292,7 +1292,10 @@ MessageBoxHelper::MessageBoxHelper() : QPlatformMessageDialogHelper(), mMessageB - - MessageBoxHelper::~MessageBoxHelper() - { -- -+ if(mMessageBox){ -+ mMessageBox->deleteLater(); -+ mMessageBox = nullptr; -+ } - } - - void MessageBoxHelper::exec() -@@ -1314,7 +1317,7 @@ bool MessageBoxHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality wind - { - initDialog(windowFlags, windowModality, parent); - -- if (parent) { -+ if (parent && mMessageBox->find(parent->winId())) { - if (QWidget *p = mMessageBox->find(parent->winId())) { - for(QMessageBox *mb : p->findChildren<QMessageBox *>()) - { -@@ -1356,6 +1359,9 @@ bool MessageBoxHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality wind - for (QMessageBox *mb : p->findChildren<QMessageBox *>()) { - if (mb->icon() == options()->icon() && mb->windowTitle() == options()->windowTitle() && mb->text() == options()->text() - && mb->informativeText() == options()->informativeText() && mb->detailedText() == options()->detailedText()) { -+ if(mb->escapeButton() && mMessageBox->escapeButton() != mb->escapeButton()) -+ mMessageBox->setEscapeButton(mb->escapeButton()); -+ - if(mb->defaultButton()){ - QString btnText = mb->defaultButton()->text(); - foreach (QAbstractButton* btn, mMessageBox->buttons()) { -@@ -1385,13 +1391,16 @@ bool MessageBoxHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality wind - mMessageBox->setWindowFlag(Qt::Dialog); - } - -- if(parent == nullptr) -+ if(parent == nullptr || mMessageBox->find(parent->winId()) == nullptr) - { - QList<QWidget *> widgets = QApplication::allWidgets(); - foreach (QWidget *w, widgets) { - if(QMessageBox *mb = qobject_cast<QMessageBox *>(w)) { - if (mb->icon() == options()->icon() && mb->windowTitle() == options()->windowTitle() && mb->text() == options()->text() - && mb->informativeText() == options()->informativeText() && mb->detailedText() == options()->detailedText()) { -+ if(mb->escapeButton() && mMessageBox->escapeButton() != mb->escapeButton()) -+ mMessageBox->setEscapeButton(mb->escapeButton()); -+ - if(mb->defaultButton() == nullptr) - break; - QString btnText = mb->defaultButton()->text(); -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index 4fb532c..bd7ab51 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -226,16 +226,16 @@ void UKUIConfigStyleParameters::initialDefaultPaletteColor(QString colorPath, bo - #endif - - if(isDark){ -- Indicator_IconDefault = defaultPalette.color(QPalette::Active, QPalette::ButtonText); -- Indicator_IconHover = defaultPalette.color(QPalette::Active, QPalette::BrightText); -- Indicator_IconSunken = defaultPalette.color(QPalette::Active, QPalette::BrightText); -- Indicator_IconDisable = defaultPalette.color(QPalette::Disabled, QPalette::Midlight); -+ Indicator_IconDefault = defaultPalette.color(QPalette::Active, QPalette::Mid); -+ Indicator_IconHover = defaultPalette.color(QPalette::Active, QPalette::Text); -+ Indicator_IconSunken = defaultPalette.color(QPalette::Active, QPalette::Text); -+ Indicator_IconDisable = defaultPalette.color(QPalette::Disabled, QPalette::Text); - } - else{ -- Indicator_IconDefault = defaultPalette.color(QPalette::Active, QPalette::Midlight); -- Indicator_IconHover = defaultPalette.color(QPalette::Active, QPalette::ButtonText); -- Indicator_IconSunken = defaultPalette.color(QPalette::Active, QPalette::ButtonText); -- Indicator_IconDisable = defaultPalette.color(QPalette::Disabled, QPalette::Midlight); -+ Indicator_IconDefault = defaultPalette.color(QPalette::Active, QPalette::Mid); -+ Indicator_IconHover = defaultPalette.color(QPalette::Active, QPalette::Text); -+ Indicator_IconSunken = defaultPalette.color(QPalette::Active, QPalette::Text); -+ Indicator_IconDisable = defaultPalette.color(QPalette::Disabled, QPalette::Text); - } - } - diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0024-fixed-a0625c7-from-https-gitee.com-yangxibowen-qt5-u.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0024-fixed-a0625c7-from-https-gitee.com-yangxibowen-qt5-u.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0024-fixed-a0625c7-from-https-gitee.com-yangxibowen-qt5-u.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0024-fixed-a0625c7-from-https-gitee.com-yangxibowen-qt5-u.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,59 +0,0 @@ -From: guorongfei <guorongfei@cvte.com> -Date: Mon, 8 Jan 2024 20:17:39 +0800 -Subject: fixed a0625c7 from - https://gitee.com/yangxibowen/qt5-ukui-platformtheme/pulls/87 fix: icon - theme search path - ---- - qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp | 16 ++++++++++++++-- - qt5-ukui-platformtheme/qt5-ukui-platform-theme.h | 3 +++ - 2 files changed, 17 insertions(+), 2 deletions(-) - -diff --git a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -index f70e313..5f4e69a 100644 ---- a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -+++ b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -@@ -238,8 +238,7 @@ QVariant Qt5UKUIPlatformTheme::themeHint(ThemeHint hint) const - case QPlatformTheme::SystemIconFallbackThemeName: - return "hicolor"; - case QPlatformTheme::IconThemeSearchPaths: -- //FIXME: -- return QStringList()<<".local/share/icons"<<"/usr/share/icons"<<"/usr/local/share/icons"; -+ return xdgIconThemePaths(); - // case WheelScrollLines: - // { - // return QVariant(1); -@@ -250,6 +249,19 @@ QVariant Qt5UKUIPlatformTheme::themeHint(ThemeHint hint) const - return QPlatformTheme::themeHint(hint); - } - -+QStringList Qt5UKUIPlatformTheme::xdgIconThemePaths() const { -+ QStringList paths; -+ // Add home directory first in search path -+ const QFileInfo homeIconDir(QDir::homePath() + QLatin1String("/.icons")); -+ if (homeIconDir.isDir()) -+ paths.prepend(homeIconDir.absoluteFilePath()); -+ -+ paths.append(QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, -+ QStringLiteral("icons"), -+ QStandardPaths::LocateDirectory)); -+ return paths; -+} -+ - QIconEngine *Qt5UKUIPlatformTheme::createIconEngine(const QString &iconName) const - { - // QPluginLoader l(XDG_ICON_ENGINE_PATH); -diff --git a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h -index a1b4cbe..086271c 100644 ---- a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h -+++ b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h -@@ -89,6 +89,9 @@ public: - public Q_SLOTS: - void slotChangeStyle(const QString& key); - -+private: -+ QStringList xdgIconThemePaths() const; -+ - private: - QFont m_system_font; - QFont m_fixed_font; diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0025-Update-changelog-4.1.0.0-0k26.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0025-Update-changelog-4.1.0.0-0k26.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0025-Update-changelog-4.1.0.0-0k26.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0025-Update-changelog-4.1.0.0-0k26.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,4489 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Wed, 17 Jan 2024 09:42:52 +0800 -Subject: Update changelog 4.1.0.0-0k26 - ---- - libqt5-ukui-style/CMakeLists.txt | 2 +- - libqt5-ukui-style/animations/animations.pri | 13 - - .../animations/scrollbar/scrollbar.pri | 5 - - .../animations/tabwidget/tabwidget.pri | 13 - - libqt5-ukui-style/effects/effects.pri | 8 - - libqt5-ukui-style/gestures/gestures.pri | 10 - - .../internal-styles/internal-styles.pri | 8 - - libqt5-ukui-style/settings/black-list.h | 2 +- - libqt5-ukui-style/settings/settings.pri | 12 - - qt5-ukui-filedialog/CMakeLists.txt | 49 +- - qt5-ukui-platformtheme/CMakeLists.txt | 10 +- - .../animations/animations.pri | 38 - - .../qt5-config-style-ukui.pri | 26 - - .../themeconfig/classical.json | 286 ++++-- - .../qt5-config-style-ukui/themeconfig/default.json | 213 +++-- - .../qt5-config-style-ukui/themeconfig/fashion.json | 251 ++++-- - .../ukui-config-style-parameters.cpp | 959 ++++++--------------- - .../qt5-config-style-ukui/ukui-config-style.cpp | 77 +- - .../widget-parameters/config-list-parameters.h | 1 + - .../config-pushbutton-parameters.h | 5 +- - .../widget-parameters/config-table-parameters.h | 1 + - .../config-tabwidget-parameters.h | 4 +- - .../config-toolbutton-parameters.h | 4 +- - .../widget-parameters/config-tree-parameters.h | 1 + - .../widget-parameters/widget-parameters.pri | 39 - - ukui-styles/readconfig.cpp | 13 +- - ukui-styles/themeinformation.h | 18 +- - 27 files changed, 919 insertions(+), 1149 deletions(-) - delete mode 100644 libqt5-ukui-style/animations/animations.pri - delete mode 100644 libqt5-ukui-style/animations/scrollbar/scrollbar.pri - delete mode 100644 libqt5-ukui-style/animations/tabwidget/tabwidget.pri - delete mode 100644 libqt5-ukui-style/effects/effects.pri - delete mode 100644 libqt5-ukui-style/gestures/gestures.pri - delete mode 100644 libqt5-ukui-style/internal-styles/internal-styles.pri - delete mode 100644 libqt5-ukui-style/settings/settings.pri - delete mode 100644 ukui-styles/qt5-config-style-ukui/animations/animations.pri - delete mode 100644 ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pri - delete mode 100644 ukui-styles/qt5-config-style-ukui/widget-parameters/widget-parameters.pri - -diff --git a/libqt5-ukui-style/CMakeLists.txt b/libqt5-ukui-style/CMakeLists.txt -index 921556d..9cf501e 100644 ---- a/libqt5-ukui-style/CMakeLists.txt -+++ b/libqt5-ukui-style/CMakeLists.txt -@@ -52,7 +52,7 @@ file(GLOB_RECURSE XML "org.ukui.style.gschema.xml") - - source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${Header} ${Sources} ${XML}) - --add_library(qt5-ukui-style SHARED ${Sources} ${Header}) -+add_library(qt5-ukui-style SHARED ${Sources} ${Header} ${XML}) - - # 设置共享库的命名规则 - set_target_properties(qt5-ukui-style PROPERTIES -diff --git a/libqt5-ukui-style/animations/animations.pri b/libqt5-ukui-style/animations/animations.pri -deleted file mode 100644 -index 4504d5b..0000000 ---- a/libqt5-ukui-style/animations/animations.pri -+++ /dev/null -@@ -1,13 +0,0 @@ --INCLUDEPATH += $$PWD --INCLUDEPATH += $$PWD/.. -- --include(tabwidget/tabwidget.pri) --include(scrollbar/scrollbar.pri) -- --HEADERS += \ -- $$PWD/animator-plugin-iface.h \ -- $$PWD/animator-iface.h \ -- $$PWD/animation-helper.h -- --SOURCES += \ -- $$PWD/animation-helper.cpp -diff --git a/libqt5-ukui-style/animations/scrollbar/scrollbar.pri b/libqt5-ukui-style/animations/scrollbar/scrollbar.pri -deleted file mode 100644 -index e99324f..0000000 ---- a/libqt5-ukui-style/animations/scrollbar/scrollbar.pri -+++ /dev/null -@@ -1,5 +0,0 @@ --HEADERS += \ -- $$PWD/ukui-scrollbar-default-interaction-animator.h -- --SOURCES += \ -- $$PWD/ukui-scrollbar-default-interaction-animator.cpp -diff --git a/libqt5-ukui-style/animations/tabwidget/tabwidget.pri b/libqt5-ukui-style/animations/tabwidget/tabwidget.pri -deleted file mode 100644 -index 7fda401..0000000 ---- a/libqt5-ukui-style/animations/tabwidget/tabwidget.pri -+++ /dev/null -@@ -1,13 +0,0 @@ --INCLUDEPATH += $$PWD -- --HEADERS += \ -- $$PWD/ukui-tabwidget-animator-iface.h \ -- $$PWD/ukui-tabwidget-animator-plugin-iface.h \ -- $$PWD/ukui-tabwidget-default-slide-animator-factory.h \ -- $$PWD/ukui-tabwidget-default-slide-animator.h -- --SOURCES += \ -- $$PWD/ukui-tabwidget-default-slide-animator-factory.cpp \ -- $$PWD/ukui-tabwidget-default-slide-animator.cpp -- --INCLUDEPATH += $$PWD/.. -diff --git a/libqt5-ukui-style/effects/effects.pri b/libqt5-ukui-style/effects/effects.pri -deleted file mode 100644 -index 61e5a8d..0000000 ---- a/libqt5-ukui-style/effects/effects.pri -+++ /dev/null -@@ -1,8 +0,0 @@ --INCLUDEPATH += $$PWD --INCLUDEPATH += $$PWD/.. -- --HEADERS += \ -- $$PWD/highlight-effect.h -- --SOURCES += \ -- $$PWD/highlight-effect.cpp -diff --git a/libqt5-ukui-style/gestures/gestures.pri b/libqt5-ukui-style/gestures/gestures.pri -deleted file mode 100644 -index f5ecb71..0000000 ---- a/libqt5-ukui-style/gestures/gestures.pri -+++ /dev/null -@@ -1,10 +0,0 @@ --INCLUDEPATH += $$PWD --INCLUDEPATH += $$PWD/.. -- --HEADERS += \ -- $$PWD/ukui-two-finger-slide-gesture.h \ -- $$PWD/ukui-two-finger-zoom-gesture.h -- --SOURCES += \ -- $$PWD/ukui-two-finger-slide-gesture.cpp \ -- $$PWD/ukui-two-finger-zoom-gesture.cpp -diff --git a/libqt5-ukui-style/internal-styles/internal-styles.pri b/libqt5-ukui-style/internal-styles/internal-styles.pri -deleted file mode 100644 -index 07726ad..0000000 ---- a/libqt5-ukui-style/internal-styles/internal-styles.pri -+++ /dev/null -@@ -1,8 +0,0 @@ --INCLUDEPATH += $$PWD --INCLUDEPATH += $$PWD/.. -- --SOURCES += $$PWD/internal-style.cpp \ -- $$PWD/mps-style.cpp -- --HEADERS += $$PWD/internal-style.h \ -- $$PWD/mps-style.h -diff --git a/libqt5-ukui-style/settings/black-list.h b/libqt5-ukui-style/settings/black-list.h -index c7cfe01..e126fe7 100644 ---- a/libqt5-ukui-style/settings/black-list.h -+++ b/libqt5-ukui-style/settings/black-list.h -@@ -44,7 +44,7 @@ static const QStringList blackAppList() { - static const QStringList blackAppListWithBlurHelper() { - QStringList l; - l<<"youker-assistant"; -- l<<"kylin-assistant"; -+// l<<"kylin-assistant"; - // l<<"kylin-video"; - // l<<"ukui-control-center"; - l<<"ubuntu-kylin-software-center.py"; -diff --git a/libqt5-ukui-style/settings/settings.pri b/libqt5-ukui-style/settings/settings.pri -deleted file mode 100644 -index 736a6f3..0000000 ---- a/libqt5-ukui-style/settings/settings.pri -+++ /dev/null -@@ -1,12 +0,0 @@ --HEADERS += $$PWD/libqt5-ukui-style_global.h \ -- $$PWD/ukui-style-conf-settings.h \ -- $$PWD/ukui-style-settings.h \ -- $$PWD/black-list.h \ -- $$PWD/application-style-settings.h -- --SOURCES += $$PWD/ukui-style-settings.cpp \ -- $$PWD/application-style-settings.cpp \ -- $$PWD/ukui-style-conf-settings.cpp -- --INCLUDEPATH += $$PWD/.. --INCLUDEPATH += $$PWD -diff --git a/qt5-ukui-filedialog/CMakeLists.txt b/qt5-ukui-filedialog/CMakeLists.txt -index 32f494d..dec6c16 100644 ---- a/qt5-ukui-filedialog/CMakeLists.txt -+++ b/qt5-ukui-filedialog/CMakeLists.txt -@@ -81,12 +81,47 @@ endif() - - include_directories(../libqt5-ukui-style/) - --file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c") --file(GLOB_RECURSE Json "*.json") -+file(GLOB_RECURSE TS_FILES -+ translations/qt5-ukui-filedialog_zh_HK.ts -+ translations/qt5-ukui-filedialog_zh_Hant.ts -+ translations/qt5-ukui-filedialog_zh_Hans.ts -+ translations/qt5-ukui-filedialog_zh_CN.ts -+ translations/qt5-ukui-filedialog_ug.ts -+ translations/qt5-ukui-filedialog_tr.ts -+ translations/qt5-ukui-filedialog_mn.ts -+ translations/qt5-ukui-filedialog_ky.ts -+ translations/qt5-ukui-filedialog_kk.ts -+ translations/qt5-ukui-filedialog_fr.ts -+ translations/qt5-ukui-filedialog_fa.ts -+ translations/qt5-ukui-filedialog_es.ts -+ translations/qt5-ukui-filedialog_en_US.ts -+ translations/qt5-ukui-filedialog_de.ts -+ translations/qt5-ukui-filedialog_cs.ts -+ translations/qt5-ukui-filedialog_bo_CN.ts -+ ) - --message("jsonfiles path:${Json}") -+set(Sources -+ sidebar.cpp -+ kyfiledialogprivate.cpp -+ kyfiledialog.cpp -+ uikyfiledialog.cpp -+ pathbar.cpp -+ menutoolbutoon.cpp -+ filedialogplugin.cpp -+ sidebar.h -+ kyfiledialogprivate.h -+ uikyfiledialog.h -+ pathbar.h -+ menutoolbutoon.h -+ kyfiledialog.h -+ filedialogplugin.h -+ filedialogplugin_global.h -+ filedialoginterface.h -+ debug.h -+ ) - --source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources} ${Json}) -+set(Json -+ filedialogplugin.json) - - # i18n - set(UKUI_TRANSLATIONS_DIR "/usr/share/qt5-ukui-platformtheme") -@@ -98,7 +133,9 @@ if (NOT DEFINED UPDATE_TRANSLATIONS) - endif() - - # To create a new ts file: lupdate -recursive . -target-language en_US -ts translations/en_US.ts -no-ui-lines --file(GLOB TS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts") -+#file(GLOB TS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts") -+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${TS_FILES}) -+ - - # cmake -DUPDATE_TRANSLATIONS=yes - if (UPDATE_TRANSLATIONS) -@@ -111,7 +148,7 @@ MESSAGE("QM_FILES PATH: ${QM_FILES}") - - add_custom_target(translations ALL DEPENDS ${QM_FILES}) - --add_library(qt5-ukui-filedialog MODULE ${sources} ${Json}) -+add_library(qt5-ukui-filedialog MODULE ${Sources} ${Json} ${TS_FILES}) - - target_link_libraries(qt5-ukui-filedialog - Qt5::Widgets -diff --git a/qt5-ukui-platformtheme/CMakeLists.txt b/qt5-ukui-platformtheme/CMakeLists.txt -index 61620fe..080bf91 100644 ---- a/qt5-ukui-platformtheme/CMakeLists.txt -+++ b/qt5-ukui-platformtheme/CMakeLists.txt -@@ -110,7 +110,10 @@ file(GLOB_RECURSE Json "*.json") - - message("jsonfiles path:${Json}") - --source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources} ${Json}) -+# To create a new ts file: lupdate -recursive . -target-language en_US -ts translations/en_US.ts -no-ui-lines -+file(GLOB TS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts") -+ -+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources} ${Json} ${TS_FILES}) - - # i18n - set(UKUI_TRANSLATIONS_DIR "/usr/share/qt5-ukui-platformtheme") -@@ -121,9 +124,6 @@ if (NOT DEFINED UPDATE_TRANSLATIONS) - set(UPDATE_TRANSLATIONS "No") - endif() - --# To create a new ts file: lupdate -recursive . -target-language en_US -ts translations/en_US.ts -no-ui-lines --file(GLOB TS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts") -- - # cmake -DUPDATE_TRANSLATIONS=yes - if (UPDATE_TRANSLATIONS) - qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) -@@ -135,7 +135,7 @@ MESSAGE("QM_FILES PATH: ${QM_FILES}") - - add_custom_target(themetranslations ALL DEPENDS ${QM_FILES}) - --add_library(qt5-ukui-platformtheme MODULE ${sources} ${Json}) -+add_library(qt5-ukui-platformtheme MODULE ${sources} ${Json} ${TS_FILES}) - - get_filename_component(PARENT_PATH "${PARENT_PATH}" PATH) - get_filename_component(PARENT_PATH "${PARENT_PATH}" PATH) -diff --git a/ukui-styles/qt5-config-style-ukui/animations/animations.pri b/ukui-styles/qt5-config-style-ukui/animations/animations.pri -deleted file mode 100644 -index fe97ce0..0000000 ---- a/ukui-styles/qt5-config-style-ukui/animations/animations.pri -+++ /dev/null -@@ -1,38 +0,0 @@ --INCLUDEPATH += $$PWD -- --HEADERS += \ -- $$PWD/config-box-animator.h \ -- $$PWD/config-box-animation-helper.h \ -- $$PWD/config-button-animator.h \ -- $$PWD/config-button-animation-helper.h \ -- $$PWD/config-progressbar-animation-helper.h \ -- $$PWD/config-progressbar-animation.h \ -- $$PWD/config-scrollbar-animation-helper.h \ -- $$PWD/config-tab-widget-animation-helper.h \ -- $$PWD/config-radiobutton-animation-helper.h \ -- $$PWD/config-radiobutton-animator.h \ -- $$PWD/config-checkbox-animator.h \ -- $$PWD/config-checkbox-animation-helper.h \ -- $$PWD/config-slider-animator.h \ -- $$PWD/config-slider-animation-helper.h \ -- $$PWD/config-tree-animator.h \ -- $$PWD/config-tree-animation-helper.h -- --SOURCES += \ -- $$PWD/config-box-animator.cpp \ -- $$PWD/config-box-animation-helper.cpp \ -- $$PWD/config-button-animation-helper.cpp \ -- $$PWD/config-button-animator.cpp \ -- $$PWD/config-progressbar-animation-helper.cpp \ -- $$PWD/config-progressbar-animation.cpp \ -- $$PWD/config-scrollbar-animation-helper.cpp \ -- $$PWD/config-tab-widget-animation-helper.cpp \ -- $$PWD/config-radiobutton-animator.cpp \ -- $$PWD/config-radiobutton-animation-helper.cpp \ -- $$PWD/config-checkbox-animator.cpp \ -- $$PWD/config-checkbox-animation-helper.cpp \ -- $$PWD/config-slider-animator.cpp \ -- $$PWD/config-slider-animation-helper.cpp \ -- $$PWD/config-tree-animator.cpp \ -- $$PWD/config-tree-animation-helper.cpp -- -diff --git a/ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pri b/ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pri -deleted file mode 100644 -index afc4d89..0000000 ---- a/ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pri -+++ /dev/null -@@ -1,26 +0,0 @@ --INCLUDEPATH += $$PWD -- --include(animations/animations.pri) --include(widget-parameters/widget-parameters.pri) -- --SOURCES += \ -- $$PWD/ukui-config-style-parameters.cpp \ -- $$PWD/ukui-config-style.cpp \ -- $$PWD/config-shadow-helper.cpp \ -- $$PWD/config-view-helper.cpp \ -- $$PWD/config-style-helper.cpp --# $$PWD/readconfig.cpp -- --HEADERS += \ -- $$PWD/ukui-config-style-parameters.h \ -- $$PWD/ukui-config-style.h \ -- $$PWD/config-shadow-helper.h \ -- $$PWD/config-style-helper.h \ -- --# $$PWD/readconfig.h \ --# $$PWD/themeinformation.h -- --DISTFILES += \ -- $$PWD/themeconfig/classical.json \ -- $$PWD/themeconfig/default.json \ -- $$PWD/themeconfig/fashion.json -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json b/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -index d438839..2fc10bd 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json -@@ -74,12 +74,14 @@ - "PushButton":{ - "DefaultPushButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -90,53 +92,63 @@ - "ClickPen" : {"value": "161, 0, 12", "type": "color"}, - "FocusPen" : {"value": "207, 20, 34", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, - "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "ImportButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, - "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "ToolButton":{ - "DefaultToolButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, - "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -147,7 +159,8 @@ - "ClickPen" : {"value": "161, 0, 12", "type": "color"}, - "FocusPen" : {"value": "207, 20, 34", "type": "color"}, - "TextColor" : {"value": "HighLightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "HighLightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "HighLightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -155,51 +168,62 @@ - "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, - "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "ImportButton":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, - "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -- "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -- "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, - "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, -+ "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "LineEdit":{ - "DefaultLineEdit":{ -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, - "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "HoverPen" : {"value": "187, 187, 187", "type": "color"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisablePen" : {"value": "187, 187, 187", "type": "color"}, - "DisableBrush" : {"value": "Base_at", "type": "paletterole"} - }, - "TranslucentLineEdit":{ -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, - "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "HoverPen" : {"value": "187, 187, 187", "type": "color"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisablePen" : {"value": "187, 187, 187", "type": "color"}, - "DisableBrush" : {"value": "Base_at", "type": "paletterole"} - } - }, -@@ -207,25 +231,38 @@ - "DefaultSpinBox":{ - "HorizonLayout":{ - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "FocusBrush" : {"value": "Button_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, -+ "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverPen" : {"value": "187, 187, 187", "type": "color"}, -+ "DisablePen" : {"value": "187, 187, 187", "type": "color"}, -+ "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "UpDefaultPen" : {"value": "187, 187, 187", "type": "color"}, -+ "DownDefaultPen" : {"value": "187, 187, 187", "type": "color"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} - }, - "DefaultLayout":{ - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "FocusBrush" : {"value": "Button_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, -+ "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverPen" : {"value": "187, 187, 187", "type": "color"}, -+ "DisablePen" : {"value": "187, 187, 187", "type": "color"}, -+ "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "UpDefaultPen" : {"value": "187, 187, 187", "type": "color"}, -+ "DownDefaultPen" : {"value": "187, 187, 187", "type": "color"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} - } - } - }, - "ComboBox":{ - "DefaultComboBox":{ -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "187, 187, 187", "type": "color"}, -+ "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -@@ -239,6 +276,7 @@ - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, -@@ -247,6 +285,7 @@ - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, -@@ -255,6 +294,7 @@ - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } -@@ -264,7 +304,8 @@ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, -@@ -273,6 +314,7 @@ - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } -@@ -283,6 +325,7 @@ - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, -@@ -291,13 +334,15 @@ - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "CheckBox":{ - "DefaultCheckBox":{ -- "DisablePen" : {"value": "Button_dis", "type": "color"}, -+ "DefaultPen" : {"value": "166, 166, 166", "type": "color"}, -+ "DisablePen" : {"value": "166, 166, 166", "type": "color"}, - "ContentPen" : {"value": "Text_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -@@ -305,7 +350,8 @@ - "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentCheckBox":{ -- "DisablePen" : {"value": "Button_dis", "type": "color"}, -+ "DefaultPen" : {"value": "166, 166, 166", "type": "color"}, -+ "DisablePen" : {"value": "166, 166, 166", "type": "color"}, - "ContentPen" : {"value": "Text_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, -@@ -315,6 +361,7 @@ - }, - "RadioButton":{ - "DefaultRadioButton":{ -+ "DefaultPen" : {"value": "166, 166, 166", "type": "color"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : { "type": "color"}, -@@ -329,23 +376,27 @@ - "DefaultSliderBar":{ - "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HandleDisablePen" : {"value": "187, 187, 187", "type": "color"}, - "GrooveValueDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveValueHoverBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveValueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "SliderGroovePen" : {"value": "187, 187, 187", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - }, - "TranslucentSliderBar":{ - "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HandleDisablePen" : {"value": "187, 187, 187", "type": "color"}, - "GrooveValueDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveValueHoverBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveValueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "SliderGroovePen" : {"value": "187, 187, 187", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, -@@ -356,6 +407,8 @@ - "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveDefaultPen" : {"value": "187, 187, 187", "type": "color"}, -+ "GrooveDisablePen" : {"value": "187, 187, 187", "type": "color"}, - "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentProgressBar": { -@@ -364,6 +417,8 @@ - "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveDefaultPen" : {"value": "187, 187, 187", "type": "color"}, -+ "GrooveDisablePen" : {"value": "187, 187, 187", "type": "color"}, - "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} - } - }, -@@ -373,6 +428,7 @@ - "GrooveInactiveBrush" : {"value": "Button_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -+ "SliderClickBrush" : {"value": "136, 136, 136", "type": "color"}, - "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentScrollBar": { -@@ -380,6 +436,7 @@ - "GrooveInactiveBrush" : {"value": "Button_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -+ "SliderClickBrush" : {"value": "136, 136, 136", "type": "color"}, - "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - } - }, -@@ -477,12 +534,14 @@ - "PushButton":{ - "DefaultPushButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "89, 89, 89", "type": "color"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -493,53 +552,63 @@ - "ClickPen" : {"value": "161, 0, 12", "type": "color"}, - "FocusPen" : {"value": "161, 0, 12", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "89, 89, 89", "type": "color"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "89, 89, 89", "type": "color"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "89, 89, 89", "type": "color"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "ToolButton":{ - "DefaultToolButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "89, 89, 89", "type": "color"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -550,7 +619,8 @@ - "ClickPen" : {"value": "161, 0, 12", "type": "color"}, - "FocusPen" : {"value": "161, 0, 12", "type": "color"}, - "TextColor" : {"value": "AlternateBase_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "AlternateBase_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "AlternateBase_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -558,42 +628,51 @@ - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "89, 89, 89", "type": "color"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "89, 89, 89", "type": "color"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "LineEdit":{ - "DefaultLineEdit":{ -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, -+ "HoverBrush" : {"value": "Base_at", "type": "color"}, -+ "HoverPen" : {"value": "89, 89, 89", "type": "color"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisablePen" : {"value": "89, 89, 89", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentLineEdit":{ -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, -+ "HoverBrush" : {"value": "Base_at", "type": "color"}, -+ "HoverPen" : {"value": "89, 89, 89", "type": "color"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "DisablePen" : {"value": "89, 89, 89", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, -@@ -601,25 +680,38 @@ - "DefaultSpinBox":{ - "HorizonLayout":{ - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, -+ "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "HoverPen" : {"value": "89, 89, 89", "type": "color"}, -+ "DisablePen" : {"value": "89, 89, 89", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "UpDefaultPen" : {"value": "89, 89, 89", "type": "color"}, -+ "DownDefaultPen" : {"value": "89, 89, 89", "type": "color"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} - }, - "DefaultLayout":{ - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, -+ "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, -+ "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, -+ "HoverPen" : {"value": "89, 89, 89", "type": "color"}, -+ "DisablePen" : {"value": "89, 89, 89", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "UpDefaultPen" : {"value": "89, 89, 89", "type": "color"}, -+ "DownDefaultPen" : {"value": "89, 89, 89", "type": "color"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} - } - } - }, - "ComboBox":{ - "DefaultComboBox":{ -- "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "89, 89, 89", "type": "color"}, -+ "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, -@@ -692,22 +784,28 @@ - }, - "CheckBox":{ - "DefaultCheckBox":{ -- "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, -- "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -+ "DefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "DisablePen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "PathBrush" : {"value": "Text_at", "type": "paletterole"}, -+ "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentCheckBox":{ -- "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, -- "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} -+ "DefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "DisablePen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "PathBrush" : {"value": "Text_at", "type": "paletterole"}, -+ "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "RadioButton":{ - "DefaultRadioButton":{ -+ "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, -+ "DisablePen" : {"value": "89, 89, 89", "type": "color"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -@@ -721,23 +819,27 @@ - "DefaultSliderBar":{ - "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HandleDisablePen" : {"value": "89, 89, 89", "type": "color"}, - "GrooveValueDefaultBrush" : {"value": "HighLight_iat", "type": "paletterole"}, - "GrooveValueHoverBrush" : {"value": "HighLight_iat", "type": "paletterole"}, - "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueHoverBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "SliderGroovePen" : {"value": "89, 89, 89", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - }, - "TranslucentSliderBar":{ - "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HandleDisablePen" : {"value": "89, 89, 89", "type": "color"}, - "GrooveValueDefaultBrush" : {"value": "HighLight_iat", "type": "paletterole"}, - "GrooveValueHoverBrush" : {"value": "HighLight_iat", "type": "paletterole"}, - "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueHoverBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -+ "SliderGroovePen" : {"value": "89, 89, 89", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } - }, -@@ -745,11 +847,15 @@ - "DefaultProgressBar" :{ - "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveDefaultPen" : {"value": "89, 89, 89", "type": "color"}, -+ "GrooveDisablePen" : {"value": "89, 89, 89", "type": "color"}, - "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentProgressBar": { - "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveDefaultPen" : {"value": "89, 89, 89", "type": "color"}, -+ "GrooveDisablePen" : {"value": "89, 89, 89", "type": "color"}, - "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} - } - }, -@@ -758,15 +864,17 @@ - "GrooveDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Button_dis", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "SliderHoverBrush" : { "type": "color"}, -- "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} -+ "SliderHoverBrush" : {"value": "87, 87, 93", "type": "color"}, -+ "SliderClickBrush" : {"value": "102, 102, 102", "type": "color"}, -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentScrollBar": { - "GrooveDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Button_dis", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "SliderHoverBrush" : { "type": "color"}, -- "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} -+ "SliderHoverBrush" : {"value": "87, 87, 93", "type": "color"}, -+ "SliderClickBrush" : {"value": "102, 102, 102", "type": "color"}, -+ "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - } - }, - "ToolTip":{ -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/default.json b/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -index a506915..b34f25c 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/default.json -@@ -77,7 +77,8 @@ - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -85,7 +86,8 @@ - "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -93,27 +95,33 @@ - "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "HoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -+ "ClickBrush" : {"value": "184, 184, 184", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "Base_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.16", "type": "color"}, -+ "ClickBrush" : {"value": "0, 0, 0, 0.20", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "ToolButton":{ -@@ -122,7 +130,8 @@ - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -130,7 +139,8 @@ - "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -138,27 +148,33 @@ - "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "HoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -+ "ClickBrush" : {"value": "184, 184, 184", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "Base_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.16", "type": "color"}, -+ "ClickBrush" : {"value": "0, 0, 0, 0.20", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "LineEdit":{ -@@ -168,7 +184,7 @@ - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"value": "NoRole_dis", "type": "paletterole"}, -+ "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, -@@ -191,15 +207,17 @@ - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "UpHoverBrush" : {"type": "color"}, -- "UpFocusHoverBrush" : {"type": "color"}, -+ "UpHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -+ "UpFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -+ "UpClickBrush" : {"value": "184, 184, 184", "type": "color"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DownHoverBrush" : {"type": "color"}, -- "DownFocusHoverBrush" : {"type": "color"} -+ "DownHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -+ "DownClickBrush" : {"value": "184, 184, 184", "type": "color"}, -+ "DownFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"} - }, - "DefaultLayout":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -207,14 +225,14 @@ - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -- "UpHoverBrush" : {"type": "color"}, -+ "UpHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, - "UpFocusHoverBrush" : {"type": "color"}, - "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -- "DownHoverBrush" : {"type": "color"}, -+ "DownHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, - "DownFocusHoverBrush" : {"type": "color"} - } - } -@@ -227,7 +245,7 @@ - "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "HoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, - "OnBrush" : {"value": "Base_at", "type": "paletterole"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -@@ -241,6 +259,7 @@ - "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -250,6 +269,7 @@ - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} - }, -@@ -259,6 +279,7 @@ - "SelectBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - } -@@ -270,6 +291,7 @@ - "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -279,6 +301,7 @@ - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} - } -@@ -290,6 +313,7 @@ - "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -299,6 +323,7 @@ - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} - } -@@ -313,7 +338,8 @@ - "OnClickPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "255, 255, 255", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -@@ -321,13 +347,17 @@ - "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentCheckBox":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0.35", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0.30", "type": "color"}, -+ "ClickPen" : {"value": "0, 0, 0, 0.65", "type": "color"}, - "DisablePen" : {"value": "166, 166, 166", "type": "color"}, - "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "OnHoverPen" : {"value": "0, 0, 0, 0.15", "type": "color"}, - "OnClickPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, -+ "ClickBrush" : {"value": "0, 0, 0, 0.16", "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -@@ -338,24 +368,30 @@ - "RadioButton":{ - "DefaultRadioButton":{ - "DefaultPen" : {"value": "166, 166, 166", "type": "color"}, -+ "HoverPen" : {"value": "166, 166, 166", "type": "color"}, -+ "ClickPen" : {"value": "Mid_at", "type": "paletterole"}, -+ "DisablePen" : {"value": "166, 166, 166", "type": "color"}, - "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "DefaultBrush" : {"value": "Light_at", "type": "paletterole"}, -- "HoverBrush" : { "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "OnHoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnClickBrush" : {"value": "Button_at", "type": "paletterole"}, - "ChildrenOnDisableBrush" : {"value": "HighLightText_dis","type": "paletterole"} - } -- - }, - "SliderBar":{ - "DefaultSliderBar":{ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "color"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - }, -@@ -363,6 +399,9 @@ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "color"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveUnvalueDefaultBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, -+ "GrooveUnvalueHoverBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } -@@ -386,7 +425,8 @@ - "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "SliderHoverBrush" : { "type": "color"}, -+ "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -+ "SliderClickBrush" : {"value": "184, 184, 184", "type": "color"}, - "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentScrollBar": { -@@ -409,7 +449,7 @@ - "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, -- "TabBarHoverBrush" : { "type": "color"}, -+ "TabBarHoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} -@@ -497,7 +537,8 @@ - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -505,7 +546,8 @@ - "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -@@ -513,27 +555,33 @@ - "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"value": "95, 95, 95", "type": "color"}, -+ "ClickBrush" : {"value": "65, 65, 65", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "255, 255, 255, 0.1", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.2", "type": "color"}, -+ "ClickBrush" : {"value": "255, 255, 255, 0.3", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "ToolButton":{ -@@ -542,7 +590,8 @@ - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -550,7 +599,8 @@ - "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -@@ -558,27 +608,33 @@ - "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "UseButtonPalette":{ -- "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"value": "95, 95, 95", "type": "color"}, -+ "ClickBrush" : {"value": "65, 65, 65", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "255, 255, 255, 0.1", "type": "color"}, -- "HoverBrush" : { "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.2", "type": "color"}, -+ "ClickBrush" : {"value": "255, 255, 255, 0.3", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "LineEdit":{ -@@ -588,7 +644,7 @@ - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, -@@ -598,7 +654,7 @@ - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, -- "HoverBrush" : {"type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, - "FocusBrush" : {"value": "29, 29, 29, 0.45", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } -@@ -611,15 +667,17 @@ - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "UpHoverBrush" : {"type": "color"}, -- "UpFocusHoverBrush" : {"type": "color"}, -+ "UpHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -+ "UpClickBrush" : {"value": "65, 65, 65", "type": "color"}, -+ "UpFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DownHoverBrush" : {"type": "color"}, -- "DownFocusHoverBrush" : {"type": "color"} -+ "DownHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -+ "DownClickBrush" : {"value": "65, 65, 65", "type": "color"}, -+ "DownFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"} - }, - "DefaultLayout":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -627,14 +685,14 @@ - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -- "UpHoverBrush" : {"type": "color"}, -+ "UpHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, - "UpFocusHoverBrush" : {"type": "color"}, - "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -- "DownHoverBrush" : {"type": "color"}, -+ "DownHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, - "DownFocusHoverBrush" : {"type": "color"} - } - } -@@ -647,7 +705,7 @@ - "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "HoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, - "OnBrush" : {"value": "Base_at", "type": "paletterole"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -@@ -661,6 +719,7 @@ - "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -670,6 +729,7 @@ - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - }, -@@ -679,6 +739,7 @@ - "SelectBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } -@@ -690,6 +751,7 @@ - "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -699,6 +761,7 @@ - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} - } -@@ -710,6 +773,7 @@ - "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, -@@ -719,6 +783,7 @@ - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} - } -@@ -733,7 +798,8 @@ - "OnClickPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : { "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -@@ -741,11 +807,16 @@ - "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentCheckBox":{ -+ "DefaultPen" : {"value": "255, 255, 255, 0.35", "type": "color"}, -+ "HoverPen" : {"value": "255, 255, 255, 0.30", "type": "color"}, -+ "ClickPen" : {"value": "255, 255, 255, 0.25", "type": "color"}, - "OnDefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "OnHoverPen" : {"value": "255, 255, 255, 0.20", "type": "color"}, - "OnClickPen" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, -- "HoverBrush" : { "type": "color"}, -+ "DefaultBrush" : {"value": "255, 255, 255, 0.04", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, -+ "ClickBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -@@ -756,9 +827,15 @@ - "RadioButton":{ - "DefaultRadioButton":{ - "DefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "HoverPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "ClickPen" : {"value": "Mid_dis", "type": "paletterole"}, -+ "DisablePen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "OnDefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "ClickBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, -+ "OnHoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, -@@ -771,7 +848,9 @@ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "color"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "HighLight_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - }, -@@ -779,6 +858,9 @@ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "color"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveUnvalueDefaultBrush" : {"value": "255, 255, 255, 0.1","type": "color"}, -+ "GrooveUnvalueHoverBrush" : {"value": "255, 255, 255, 0.1","type": "color"}, - "GrooveUnvalueDisableBrush" : {"value": "HighLight_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } -@@ -802,7 +884,8 @@ - "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "SliderHoverBrush" : { "type": "color"}, -+ "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -+ "SliderClickBrush" : {"value": "65, 65, 65", "type": "color"}, - "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentScrollBar": { -@@ -825,7 +908,7 @@ - "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, -- "TabBarHoverBrush" : { "type": "color"}, -+ "TabBarHoverBrush" : {"value": "255, 255, 255, 0.15","type": "color"}, - "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} -diff --git a/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json b/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -index cd48937..e6ee89f 100644 ---- a/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -+++ b/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json -@@ -77,7 +77,8 @@ - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -85,7 +86,8 @@ - "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -93,27 +95,35 @@ - "ClickBrush" : {"value": "191, 191, 191", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -+ "HoverBrush" : {"value": "218, 218, 218 ~ 184, 184, 184", "type": "gradient"}, -+ "ClickBrush" : {"value": "191, 191, 191", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "Base_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentButton":{ -- "DefaultBrush" : {"value": "38, 38, 38, 0.10", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -+ "DefaultBrush" : {"value": "115, 115, 115, 0.2", "type": "color"}, -+ "HoverBrush" : {"value": "115, 115, 115, 0.2 ~ 77, 77, 77, 0.2", "type": "gradient"}, -+ "ClickBrush" : {"value": "77, 77, 77, 0.3", "type": "color"}, -+ "DisableBrush" : {"value": "38, 38, 38, 0.1", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "ToolButton":{ -@@ -122,7 +132,8 @@ - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -130,7 +141,8 @@ - "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -138,27 +150,34 @@ - "ClickBrush" : {"value": "191, 191, 191", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -+ "HoverBrush" : {"value": "218, 218, 218 ~ 184, 184, 184", "type": "gradient"}, -+ "ClickBrush" : {"value": "191, 191, 191", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "Base_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "38, 38, 38, 0.10", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -+ "HoverBrush" : {"value": "115, 115, 115, 0.2 ~ 77, 77, 77, 0.2", "type": "gradient"}, -+ "ClickBrush" : {"value": "77, 77, 77, 0.3", "type": "color"}, -+ "DisableBrush" : {"value": "38, 38, 38, 0.1", "type": "color"}, - "TextColor" : {"value": "Base_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "LineEdit":{ -@@ -168,17 +187,19 @@ - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "102, 97, 208", "type": "color"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -+ "HoverBrush" : {"value": "217, 217, 217, 0.5 ~ 191, 191, 191, 0.5", "type": "gradient"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentLineEdit":{ -- "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -- "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} -+ "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -+ "DefaultBrush" : {"value": "115, 115, 115, 0.15", "type": "color"}, -+ "HoverBrush" : {"value": "115, 115, 115, 0.2 ~ 77, 77, 77, 0.2", "type": "gradient"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "FocusBrush" : {"value": "255, 255, 255, 0.65", "type": "color"}, -+ "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "SpinBox":{ -@@ -189,14 +210,16 @@ - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -+ "HoverBrush" : {"value": "217, 217, 217, 0.5 ~ 191, 191, 191, 0.5", "type": "gradient"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpHoverBrush" : {"type": "gradient"}, -- "UpFocusHoverBrush" : {"type": "gradient"}, -+ "UpHoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, -+ "UpFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DownHoverBrush" : {"type": "gradient"}, -- "DownFocusHoverBrush" : {"type": "gradient"}, -+ "UpClickBrush" : {"value": "184, 184, 184", "type": "color"}, -+ "DownHoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, -+ "DownFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -+ "DownClickBrush" : {"value": "184, 184, 184", "type": "color"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} - }, - "DefaultLayout":{ -@@ -205,13 +228,13 @@ - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -+ "HoverBrush" : {"value": "217, 217, 217, 0.5 ~ 191, 191, 191, 0.5", "type": "gradient"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpHoverBrush" : {"type": "gradient"}, -+ "UpHoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, - "UpFocusHoverBrush" : {"type": "gradient"}, - "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -- "DownHoverBrush" : {"type": "gradient"}, -+ "DownHoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, - "DownFocusHoverBrush" : {"type": "gradient"}, - "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"} - } -@@ -225,7 +248,7 @@ - "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "HoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, - "OnBrush" : {"value": "Base_at", "type": "paletterole"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -@@ -235,27 +258,31 @@ - "ListView":{ - "DefaultListView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -+ "HoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, - "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, - "HighlightListView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -+ "HoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - }, - "TranslucentListView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -+ "SelectBrush" : {"value": "77, 77, 77, 0.25", "type": "color"}, -+ "HoverBrush" : {"value": "115, 115, 115, 0.1 ~ 77, 77, 77, 0.1", "type": "gradient"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "BrightText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "BrightText_at", "type": "paletterole"} - } -@@ -263,19 +290,21 @@ - "TreeView":{ - "DefaultTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -+ "HoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, - "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, - "HighlightTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -+ "HoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } -@@ -283,19 +312,21 @@ - "Table":{ - "DefaultTable":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -+ "HoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, - "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, - "HighlightTable":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -+ "HoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } -@@ -308,7 +339,8 @@ - "OnDefaultPen" : {"value": "83, 80, 171", "type": "color"}, - "ContentPen" : {"value": "Light_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Light_at", "type": "paletterole"}, -- "HoverBrush" : { "type": "color"}, -+ "HoverBrush" : {"value": "115, 115, 115, 0.2 ~ 77, 77, 77, 0.2","type": "gradient"}, -+ "ClickBrush" : {"value": "217, 217, 217", "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -@@ -316,10 +348,14 @@ - "PathDisableBrush" : {"value": "140, 140, 140", "type": "color"} - }, - "TranslucentCheckBox":{ -+ "DefaultPen" : {"value": "0, 0, 0, 0.3", "type": "color"}, -+ "HoverPen" : {"value": "0, 0, 0, 0.3", "type": "color"}, -+ "ClickPen" : {"value": "0, 0, 0, 0.3", "type": "color"}, - "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, -- "ContentPen" : {"value": "Light_at", "type": "paletterole"}, -+ "ContentPen" : {"value": "Light_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "115, 115, 115, 0.2", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -+ "HoverBrush" : {"value": "95, 95, 95, 0.2 ~ 77, 77, 77, 0.2", "type": "gradient"}, -+ "ClickBrush" : {"value": "77, 77, 77, 0.30", "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -@@ -330,10 +366,13 @@ - "RadioButton":{ - "DefaultRadioButton":{ - "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, -+ "HoverPen" : {"value": "140, 140, 140", "type": "color"}, -+ "ClickPen" : {"value": "140, 140, 140", "type": "color"}, - "DisablePen" : {"value": "166, 166, 166", "type": "color"}, - "OnDefaultPen" : {"value": "83, 80, 171", "type": "color"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, -- "HoverBrush" : { "type": "color"}, -+ "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, -+ "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -@@ -348,7 +387,9 @@ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : {"type": "gradient"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - }, -@@ -356,6 +397,9 @@ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "gradient"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveUnvalueDefaultBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, -+ "GrooveUnvalueHoverBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } -@@ -379,7 +423,8 @@ - "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "SliderHoverBrush" : { "type": "gradient"}, -+ "SliderHoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, -+ "SliderClickBrush" : {"value": "184, 184, 184", "type": "color"}, - "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentScrollBar": { -@@ -402,7 +447,7 @@ - "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, -- "TabBarHoverBrush" : { "type": "gradient"}, -+ "TabBarHoverBrush" : {"value": "238, 238, 238 ~ 232, 232, 232","type": "gradient"}, - "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} -@@ -490,7 +535,8 @@ - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -498,7 +544,8 @@ - "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -506,21 +553,25 @@ - "ClickBrush" : {"value": "95, 95, 95", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -+ "HoverBrush" : {"value": "95, 95, 95 ~ 65, 65, 65", "type": "gradient"}, -+ "ClickBrush" : {"value": "95, 95, 95", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, -@@ -528,7 +579,8 @@ - "ClickBrush" : {"value": "255, 255, 255, 0.3", "type": "color"}, - "DisableBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "ToolButton":{ -@@ -537,7 +589,8 @@ - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -545,7 +598,8 @@ - "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, -@@ -553,21 +607,25 @@ - "ClickBrush" : {"value": "95, 95, 95", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -+ "HoverBrush" : {"value": "95, 95, 95 ~ 65, 65, 65", "type": "gradient"}, -+ "ClickBrush" : {"value": "95, 95, 95", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, -@@ -575,7 +633,8 @@ - "ClickBrush" : {"value": "255, 255, 255, 0.3", "type": "color"}, - "DisableBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, -- "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} -+ "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, -+ "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "LineEdit":{ -@@ -585,7 +644,7 @@ - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -+ "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5", "type": "gradient"}, - "FocusBrush" : {"value": "Window_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, -@@ -593,8 +652,10 @@ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -- "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "DefaultBrush" : {"value": "217, 217, 217, 0.1", "type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.2 ~ 217, 217, 217, 0.2", "type": "gradient"}, -+ "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "FocusBrush" : {"value": "29, 29, 29, 0.45", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, -@@ -606,14 +667,16 @@ - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -+ "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5", "type": "gradient"}, - "FocusBrush" : {"value": "Window_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpHoverBrush" : {"type": "gradient"}, -- "UpFocusHoverBrush" : {"type": "gradient"}, -+ "UpHoverBrush" : {"value": "95, 95, 95 ~ 65, 65, 65", "type": "gradient"}, -+ "UpFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "DownHoverBrush" : {"type": "gradient"}, -- "DownFocusHoverBrush" : {"type": "gradient"}, -+ "UpClickBrush" : {"value": "65, 65, 65", "type": "color"}, -+ "DownHoverBrush" : {"value": "95, 95, 95 ~ 65, 65, 65", "type": "gradient"}, -+ "DownFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, -+ "DownClickBrush" : {"value": "65, 65, 65", "type": "color"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} - }, - "DefaultLayout":{ -@@ -622,13 +685,13 @@ - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "gradient"}, -+ "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5", "type": "gradient"}, - "FocusBrush" : {"value": "Window_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -- "UpHoverBrush" : {"type": "gradient"}, -+ "UpHoverBrush" : {"value": "95, 95, 95 ~ 65, 65, 65", "type": "gradient"}, - "UpFocusHoverBrush" : {"type": "gradient"}, - "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, -- "DownHoverBrush" : {"type": "gradient"}, -+ "DownHoverBrush" : {"value": "95, 95, 95 ~ 65, 65, 65", "type": "gradient"}, - "DownFocusHoverBrush" : {"type": "gradient"}, - "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"} - } -@@ -642,7 +705,7 @@ - "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "HoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, - "OnBrush" : {"value": "Base_at", "type": "paletterole"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -@@ -652,27 +715,31 @@ - "ListView":{ - "DefaultListView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -+ "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5","type": "gradient"}, - "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, - "HighlightListView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -+ "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5","type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - }, - "TranslucentListView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : {"type": "gradient"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15 ~ 217, 217, 217, 0.15", "type": "gradient"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -+ "SelectBrush" : {"value": "255, 255, 255, 0.2", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Light_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } -@@ -680,19 +747,21 @@ - "TreeView":{ - "DefaultTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -+ "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5","type": "gradient"}, - "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, - "HighlightTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -+ "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5","type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } -@@ -700,19 +769,21 @@ - "Table":{ - "DefaultTable":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -+ "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5","type": "gradient"}, - "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - }, - "HighlightTable":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -+ "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5","type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, -+ "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } -@@ -725,7 +796,8 @@ - "OnDefaultPen" : {"value": "160, 157, 248", "type": "color"}, - "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "HoverBrush" : {"type": "color"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -@@ -733,10 +805,13 @@ - "PathDisableBrush" : {"value": "140, 140, 140", "type": "color"} - }, - "TranslucentCheckBox":{ -+ "DefaultPen" : {"value": "255, 255, 255, 0.30", "type": "color"}, -+ "HoverPen" : {"value": "255, 255, 255, 0.30", "type": "color"}, -+ "ClickPen" : {"value": "255, 255, 255, 0.30", "type": "color"}, - "OnDefaultPen" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, -- "HoverBrush" : { "type": "gradient"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.2 ~ 217, 217, 217, 0.2","type": "gradient"}, - "ClickBrush" : {"value": "255, 255, 255, 0.30", "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "gradient"}, -@@ -748,9 +823,13 @@ - "RadioButton":{ - "DefaultRadioButton":{ - "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, -+ "HoverPen" : {"value": "140, 140, 140", "type": "color"}, -+ "ClickPen" : {"value": "140, 140, 140", "type": "color"}, - "DisablePen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "OnDefaultPen" : {"value": "160, 157, 248", "type": "color"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, -+ "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, -@@ -765,7 +844,9 @@ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "gradient"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -+ "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - }, -@@ -773,6 +854,9 @@ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "gradient"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, -+ "GrooveUnvalueDefaultBrush" : {"value": "255, 255, 255, 0.1", "type": "color"}, -+ "GrooveUnvalueHoverBrush" : {"value": "255, 255, 255, 0.1", "type": "color"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} - } -@@ -796,7 +880,8 @@ - "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, -- "SliderHoverBrush" : { "type": "gradient"}, -+ "SliderHoverBrush" : {"value": "95, 95, 95 ~ 65, 65, 65", "type": "gradient"}, -+ "SliderClickBrush" : {"value": "95, 95, 95", "type": "color"}, - "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentScrollBar": { -@@ -819,7 +904,7 @@ - "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, -- "TabBarHoverBrush" : { "type": "gradient"}, -+ "TabBarHoverBrush" : {"value": "50, 51, 52 ~ 43, 44, 45", "type": "gradient"}, - "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index bd7ab51..6852cd4 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -591,14 +591,6 @@ void UKUIConfigStyleParameters::normalButtonColor(bool isDark, QPalette p, QPen - QPen &hoverPen, QBrush &hoverBrush, QPen &clickPen, QBrush &clickBrush, - QPen &disablePen, QBrush &disableBrush) - { -- //default -- if (isDark) { -- defaultPen = QPen(QBrush(adjustColor(defaultBrush.color(), 0, 0, 8)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } else -- defaultPen = QPen(QBrush(adjustColor(defaultBrush.color(), 0, 0, -25)), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- - //hover - if (isDark) { - //hightlight->210,72%,71% 210,67%,56% -@@ -623,13 +615,6 @@ void UKUIConfigStyleParameters::normalButtonColor(bool isDark, QPalette p, QPen - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - clickBrush = QBrush(highlightClick(isDark, p)); -- -- //disable -- if (isDark) { -- disablePen = QPen(QBrush(adjustL(disableBrush.color(), 18)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- - } - - -@@ -678,6 +663,7 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - bool useButtonPalette = false; - bool needTranslucent = false; - -+ - UKUIColorTheme::ButtonColorCfg buttonColorCfg = readCfg()->buttonColorCfg(option->palette); - - if (widget) { -@@ -727,7 +713,6 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - -- - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - -@@ -756,32 +741,20 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if (isWindowColoseButton) { -- if (buttonColorCfg.hoverType == Obj_Color_Type) { -- hoverBrush = buttonColorCfg.hoverBrush; -- } else if (buttonColorCfg.hoverType == Obj_Gradient_Type){ -+ if (buttonColorCfg.hoverType == Obj_Gradient_Type){ - linearGradient.setColorAt(0, buttonColorCfg.hoverGradientList.value(0)); - linearGradient.setColorAt(1, buttonColorCfg.hoverGradientList.value(1)); - hoverBrush = QBrush(linearGradient); - } -+ else -+ hoverBrush = buttonColorCfg.hoverBrush; - clickBrush = buttonColorCfg.clickBrush; - focusPen = QPen(QBrush(clickBrush), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - -- if (buttonColorCfg.hoverType == Obj_Color_Type) { -- if (isDark) { -- hoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); -- } else { -- hoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); -- } -- -- if (isDark) { -- clickBrush = QBrush(configMixColor(highlight, mix, 0.05)); -- } else { -- clickBrush = QBrush(configMixColor(highlight, mix, 0.2)); -- } -- } else { -+ if (buttonColorCfg.hoverType == Obj_Gradient_Type) { - if (isDark) { - startColor = configMixColor(highlight, QColor(Qt::white), 0.2); - endColor = configMixColor(highlight, QColor(Qt::black), 0.05); -@@ -793,9 +766,21 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - clickBrush = QBrush(configMixColor(highlight, mix, 0.1)); -+ } else { -+ if (isDark) { -+ hoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); -+ } else { -+ hoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); -+ } -+ -+ if (isDark) { -+ clickBrush = QBrush(configMixColor(highlight, mix, 0.05)); -+ } else { -+ clickBrush = QBrush(configMixColor(highlight, mix, 0.2)); -+ } - } - -- if (isWindowButton && useTransparentButtonList().contains(qAppName())) { -+ if (isWindowButton && useTransparentButtonList().contains(qAppName())) {//特殊三联应用 - if (isDark) { - mix.setAlphaF(0.28); - hoverBrush = QBrush(mix); -@@ -808,66 +793,16 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - clickBrush = QBrush(mix); - } - } else if (useButtonPalette || isWindowButton) { -- if (buttonColorCfg.hoverType == Obj_Color_Type) { -- if (needTranslucent) { -- QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- hoverColor.setAlphaF(isDark ? 0.20 : 0.16); -- hoverBrush.setColor(hoverColor); -- -- QColor clickColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- clickColor.setAlphaF(isDark ? 0.30 : 0.21); -- clickBrush.setColor(clickColor); -- } else { -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- -- if (isDark) { -- hoverBrush = QBrush(configMixColor(button, mix, 0.2)); -- clickBrush = QBrush(configMixColor(button, mix, 0.05)); -- } else { -- hoverBrush = QBrush(configMixColor(button, mix, 0.05)); -- clickBrush = QBrush(configMixColor(button, mix, 0.2)); -- } -- } -+ if(buttonColorCfg.hoverType == Obj_Gradient_Type){ -+ startColor = buttonColorCfg.hoverGradientList.value(0); -+ endColor = buttonColorCfg.hoverGradientList.value(1); -+ linearGradient.setColorAt(0, startColor); -+ linearGradient.setColorAt(1, endColor); -+ hoverBrush = QBrush(linearGradient); -+ clickBrush = buttonColorCfg.clickBrush; - } else { -- if(needTranslucent) { -- if (isDark) { -- startColor = option->palette.color(QPalette::Active, QPalette::Light); -- endColor = option->palette.color(QPalette::Active, QPalette::Text); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } else { -- startColor = option->palette.color(QPalette::Active, QPalette::Mid); -- endColor = option->palette.color(QPalette::Active, QPalette::Dark); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- QColor clickColor = option->palette.color(QPalette::Active, QPalette::Dark); -- if(isDark) -- clickColor = option->palette.color(QPalette::Active, QPalette::Light); -- clickColor.setAlphaF(isDark ? 0.30 : 0.30); -- clickBrush.setColor(clickColor); -- } else { -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- -- //hover -- if (isDark) { -- startColor = configMixColor(button, QColor(Qt::white), 0.2); -- endColor = configMixColor(button, QColor(Qt::white), 0.05); -- } else { -- startColor = configMixColor(button, QColor(Qt::black), 0.05); -- endColor = configMixColor(button, QColor(Qt::black), 0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- //click -- clickBrush = QBrush(configMixColor(button, mix, 0.2)); -- } -+ hoverBrush = buttonColorCfg.hoverBrush; -+ clickBrush = buttonColorCfg.clickBrush; - } - } - -@@ -878,7 +813,7 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - if (buttonColorCfg.focusPen != Qt::NoPen) - focusPen = QPen(QBrush(buttonColorCfg.focusPen), (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- if (isWindowButton && useTransparentButtonList().contains(qAppName())) { -+ if (isWindowButton && useTransparentButtonList().contains(qAppName())) {//特殊窗口三联 - QColor p = QColor(255, 255, 255); - p.setAlphaF(0.4); - defaultPen = QPen(QColor(Qt::NoPen), 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -901,6 +836,11 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), - (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? - 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ defaultPen = QPen(QBrush(buttonColorCfg.defaultPen), (buttonColorCfg.defaultPen == Qt::NoPen || buttonColorCfg.defaultPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ disablePen = QPen(QBrush(buttonColorCfg.disablePen), (buttonColorCfg.disablePen == Qt::NoPen || buttonColorCfg.disablePen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ - } else { - clickBrush = QBrush(buttonColorCfg.clickBrush); - hoverBrush = QBrush(buttonColorCfg.hoverBrush); -@@ -1001,7 +941,6 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - } - } - -- - m_PushButtonParameters.radius = radius; - m_PushButtonParameters.pushButtonDefaultBrush = defaultBrush; - m_PushButtonParameters.pushButtonClickBrush = clickBrush; -@@ -1070,7 +1009,9 @@ void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, - if (isImportant) - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); - -- QColor textColor = buttonColorCfg.textColor; -+ QColor textDefaultColor = buttonColorCfg.textDefaultColor; -+ QColor textHoverColor = buttonColorCfg.textHoverColor; -+ QColor textDisableColor = buttonColorCfg.textDisableColor; - - //icon - if ((isWindowButton || useButtonPalette) && !(button->state & QStyle::State_On)) { -@@ -1082,24 +1023,19 @@ void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, - if(m_adjustColorRules == AdjustColorRules::HSL) - iconHighlight = false; - -- //text -- bool hover = option->state & QStyle::State_MouseOver; -- bool click = option->state & (QStyle::State_On | QStyle::State_Sunken); -- -- if(hover || click){ -- textColor = buttonColorCfg.textHoverColor; -- } -- - auto *w = const_cast<QWidget *>(widget); - if (w) { -- w->setProperty("iconHighlight", iconHighlight); -- w->setProperty("textHighlight", textHighlight); -- w->setProperty("textColor", textColor); -+ w->setProperty("iconHighlight", iconHighlight); -+ w->setProperty("textHighlight", textHighlight); -+ w->setProperty("textDefaultColor", textDefaultColor); -+ w->setProperty("textHoverColor", textHoverColor); -+ w->setProperty("textDisableColor", textDisableColor); -+ - } - - if (widget) { -- if(!widget->isEnabled()) -- textColor = option->palette.color(QPalette::Disabled, QPalette::ButtonText); -+// if(!widget->isEnabled()) -+// textColor = option->palette.color(QPalette::Disabled, QPalette::ButtonText); - - if (widget->property("setIconHoverClickHighlight").isValid() && widget->property("setIconHoverClickHighlight").canConvert<bool>()) { - iconHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); -@@ -1107,14 +1043,22 @@ void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, - if (widget->property("setTextHoverClickHighlight").isValid() && widget->property("setTextHoverClickHighlight").canConvert<bool>()) { - textHighlight = widget->property("setTextHoverClickHighlight").value<bool>(); - } -- if (widget->property("setTextColor").isValid() && widget->property("setTextColor").canConvert<QColor>()) { -- textColor = widget->property("setTextColor").value<QColor>(); -+ if (widget->property("setTextDefaultColor").isValid() && widget->property("setTextDefaultColor").canConvert<QColor>()) { -+ textDefaultColor = widget->property("setTextDefaultColor").value<QColor>(); -+ } -+ if (widget->property("setTextHoverColor").isValid() && widget->property("setTextHoverColor").canConvert<QColor>()) { -+ textHoverColor = widget->property("setTextHoverColor").value<QColor>(); -+ } -+ if (widget->property("setTextDisableColor").isValid() && widget->property("setTextDisableColor").canConvert<QColor>()) { -+ textDisableColor = widget->property("setTextDisableColor").value<QColor>(); - } - } - - m_PushButtonParameters.iconHoverClickHighlight = iconHighlight; - m_PushButtonParameters.textHoverClickHighlight = textHighlight; -- m_PushButtonParameters.textColor = textColor; -+ m_PushButtonParameters.textDefaultColor = textDefaultColor; -+ m_PushButtonParameters.textHoverColor = textHoverColor; -+ m_PushButtonParameters.textDisableColor = textDisableColor; - } - - void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -@@ -1200,31 +1144,19 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if (isWindowColoseButton){ -- if (buttonColorCfg.hoverType == Obj_Color_Type) { -- hoverBrush = buttonColorCfg.hoverBrush; -- } else if (buttonColorCfg.hoverType == Obj_Gradient_Type) { -+ if (buttonColorCfg.hoverType == Obj_Gradient_Type) { - linearGradient.setColorAt(0, buttonColorCfg.hoverGradientList.value(0)); - linearGradient.setColorAt(1, buttonColorCfg.hoverGradientList.value(1)); - hoverBrush = QBrush(linearGradient); -+ } else { -+ hoverBrush = buttonColorCfg.hoverBrush; - } - clickBrush = buttonColorCfg.clickBrush; - focusPen = QPen(QBrush(clickBrush), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ -- -- if(buttonColorCfg.hoverType == Obj_Color_Type){ -- if (isDark) { -- hoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); -- } else { -- hoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); -- } -- if (isDark) { -- clickBrush = QBrush(configMixColor(highlight, mix, 0.05)); -- } else { -- clickBrush = QBrush(configMixColor(highlight, mix, 0.2)); -- } -- } else { -+ if (buttonColorCfg.hoverType == Obj_Gradient_Type) { - if (isDark) { - startColor = configMixColor(highlight, QColor(Qt::white), 0.2); - endColor = configMixColor(highlight, QColor(Qt::black), 0.05); -@@ -1236,10 +1168,21 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - clickBrush = QBrush(configMixColor(highlight, mix, 0.1)); -- -+ } -+ else { -+ if (isDark) { -+ hoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); -+ } else { -+ hoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); -+ } -+ if (isDark) { -+ clickBrush = QBrush(configMixColor(highlight, mix, 0.05)); -+ } else { -+ clickBrush = QBrush(configMixColor(highlight, mix, 0.2)); -+ } - } - -- if (isWindowButton && useTransparentButtonList().contains(qAppName())) { -+ if (isWindowButton && useTransparentButtonList().contains(qAppName())) {//特殊三联应用 - if (isDark) { - mix.setAlphaF(0.28); - hoverBrush = QBrush(mix); -@@ -1252,66 +1195,16 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - clickBrush = QBrush(mix); - } - } else if (useButtonPalette || isWindowButton) { -- if(buttonColorCfg.hoverType == Obj_Color_Type){ -- if (needTranslucent) { -- QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- hoverColor.setAlphaF(isDark ? 0.20 : 0.16); -- hoverBrush.setColor(hoverColor); -- -- QColor clickColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- clickColor.setAlphaF(isDark ? 0.30 : 0.21); -- clickBrush.setColor(clickColor); -- } else { -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- -- if (isDark) { -- hoverBrush = QBrush(configMixColor(button, mix, 0.2)); -- clickBrush = QBrush(configMixColor(button, mix, 0.05)); -- } else { -- hoverBrush = QBrush(configMixColor(button, mix, 0.05)); -- clickBrush = QBrush(configMixColor(button, mix, 0.2)); -- } -- } -+ if(buttonColorCfg.hoverType == Obj_Gradient_Type){ -+ startColor = buttonColorCfg.hoverGradientList.value(0); -+ endColor = buttonColorCfg.hoverGradientList.value(1); -+ linearGradient.setColorAt(0, startColor); -+ linearGradient.setColorAt(1, endColor); -+ hoverBrush = QBrush(linearGradient); -+ clickBrush = buttonColorCfg.clickBrush; - } else { -- if(needTranslucent) { -- if (isDark) { -- startColor = option->palette.color(QPalette::Active, QPalette::Light); -- endColor = option->palette.color(QPalette::Active, QPalette::Text); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } else { -- startColor = option->palette.color(QPalette::Active, QPalette::Mid); -- endColor = option->palette.color(QPalette::Active, QPalette::Dark); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- QColor clickColor = option->palette.color(QPalette::Active, QPalette::Dark); -- if(isDark) -- clickColor = option->palette.color(QPalette::Active, QPalette::Light); -- clickColor.setAlphaF(isDark ? 0.30 : 0.30); -- clickBrush.setColor(clickColor); -- } else { -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- -- //hover -- if (isDark) { -- startColor = configMixColor(button, QColor(Qt::white), 0.2); -- endColor = configMixColor(button, QColor(Qt::white), 0.05); -- } else { -- startColor = configMixColor(button, QColor(Qt::black), 0.05); -- endColor = configMixColor(button, QColor(Qt::black), 0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- //click -- clickBrush = QBrush(configMixColor(button, mix, 0.2)); -- } -+ hoverBrush = buttonColorCfg.hoverBrush; -+ clickBrush = buttonColorCfg.clickBrush; - } - } - -@@ -1323,7 +1216,7 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - focusPen = QPen(QBrush(buttonColorCfg.focusPen), (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- if (isWindowButton && useTransparentButtonList().contains(qAppName())) { -+ if (isWindowButton && useTransparentButtonList().contains(qAppName())) {//特殊窗口三联 - QColor p = QColor(255, 255, 255); - p.setAlphaF(0.4); - defaultPen = QPen(QColor(Qt::NoPen), 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -1346,6 +1239,10 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), - (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? - 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ defaultPen = QPen(QBrush(buttonColorCfg.defaultPen), (buttonColorCfg.defaultPen == Qt::NoPen || buttonColorCfg.defaultPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ disablePen = QPen(QBrush(buttonColorCfg.disablePen), (buttonColorCfg.disablePen == Qt::NoPen || buttonColorCfg.disablePen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { - clickBrush = QBrush(buttonColorCfg.clickBrush); - hoverBrush = QBrush(buttonColorCfg.hoverBrush); -@@ -1513,7 +1410,9 @@ void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, - if (isImportant) - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); - -- QColor textColor = buttonColorCfg.textColor; -+ QColor textDefaultColor = buttonColorCfg.textDefaultColor; -+ QColor textHoverColor = buttonColorCfg.textHoverColor; -+ QColor textDisableColor = buttonColorCfg.textDisableColor; - - //icon - if ((isWindowButton || useButtonPalette) && !(button->state & QStyle::State_On)) { -@@ -1525,23 +1424,17 @@ void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, - if(m_adjustColorRules == AdjustColorRules::HSL) - iconHighlight = false; - -- //text -- bool hover = option->state & QStyle::State_MouseOver; -- bool click = option->state & (QStyle::State_On | QStyle::State_Sunken); -- -- if(hover || click){ -- textColor = buttonColorCfg.textHoverColor; -- } -- - auto *w = const_cast<QWidget *>(widget); - if (w) { - w->setProperty("iconHighlight", iconHighlight); - w->setProperty("textHighlight", textHighlight); -- w->setProperty("textColor", textColor); -+ w->setProperty("textDefaultColor", textDefaultColor); -+ w->setProperty("textHoverColor", textHoverColor); -+ w->setProperty("textDisableColor", textDisableColor); - } - if (widget) { -- if(!widget->isEnabled()) -- textColor = option->palette.color(QPalette::Disabled, QPalette::ButtonText); -+// if(!widget->isEnabled()) -+// textColor = option->palette.color(QPalette::Disabled, QPalette::ButtonText); - - if (widget->property("setIconHoverClickHighlight").isValid() && widget->property("setIconHoverClickHighlight").canConvert<bool>()) { - iconHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); -@@ -1549,14 +1442,22 @@ void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, - if (widget->property("setTextHoverClickHighlight").isValid() && widget->property("setTextHoverClickHighlight").canConvert<bool>()) { - textHighlight = widget->property("setTextHoverClickHighlight").value<bool>(); - } -- if (widget->property("setTextColor").isValid() && widget->property("setTextColor").canConvert<bool>()) { -- textColor = widget->property("setTextColor").value<bool>(); -+ if (widget->property("setTextDefaultColor").isValid() && widget->property("setTextDefaultColor").canConvert<QColor>()) { -+ textDefaultColor = widget->property("setTextDefaultColor").value<QColor>(); -+ } -+ if (widget->property("setTextHoverColor").isValid() && widget->property("setTextHoverColor").canConvert<QColor>()) { -+ textHoverColor = widget->property("setTextHoverColor").value<QColor>(); -+ } -+ if (widget->property("setTextDisableColor").isValid() && widget->property("setTextDisableColor").canConvert<QColor>()) { -+ textDisableColor = widget->property("setTextDisableColor").value<QColor>(); - } - } - - m_ToolButtonParameters.iconHoverClickHighlight = iconHighlight; - m_ToolButtonParameters.textHoverClickHighlight = textHighlight; -- m_ToolButtonParameters.textColor = textColor; -+ m_ToolButtonParameters.textDefaultColor = textDefaultColor; -+ m_ToolButtonParameters.textHoverColor = textHoverColor; -+ m_ToolButtonParameters.textDisableColor = textDisableColor; - } - - void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -@@ -1583,74 +1484,15 @@ void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const - if(lineEditColorCfg.hoverType == Obj_Gradient_Type){ - QColor startColor; - QColor endColor; -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); -- if(!needTranslucent) { -- if (isDark) { -- startColor = option->palette.color(QPalette::Active, QPalette::Midlight); -- endColor = option->palette.color(QPalette::Disabled, QPalette::NoRole); -- startColor.setAlphaF(0.5); -- endColor.setAlphaF(0.5); -- } else { -- startColor = option->palette.color(QPalette::Active, QPalette::Midlight); -- endColor = configMixColor(startColor, mix, 0.1); -- startColor.setAlphaF(0.5); -- endColor.setAlphaF(0.5); -- } -- } else { -- QColor defaultColor = option->palette.color(QPalette::Active, QPalette::Mid); -- if (isDark) -- defaultColor = option->palette.color(QPalette::Active, QPalette::Text); -- defaultColor.setAlphaF(isDark ? 0.1 : 0.15); -- defaultBrush.setColor(defaultColor); -+ startColor = lineEditColorCfg.hoverGradientList.value(0); -+ endColor = lineEditColorCfg.hoverGradientList.value(1); - -- QColor focusColor = option->palette.color(QPalette::Active, QPalette::Base); -- focusColor.setAlphaF(isDark ? 0.45 : 0.65); -- focusBrush.setColor(focusColor); -- -- if (isDark) { -- startColor = option->palette.color(QPalette::Active, QPalette::Light); -- endColor = option->palette.color(QPalette::Active, QPalette::Text); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } else { -- startColor = option->palette.color(QPalette::Active, QPalette::Mid); -- endColor = option->palette.color(QPalette::Active, QPalette::Dark); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } -- } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); -- } else -- hoverBrush= defaultBrush; -- -- switch (m_adjustColorRules) { -- case HSL:{ -- if(isDark){ -- defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- else -- defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- hoverPen = defaultPen; -- //disable state -- if (isDark) { -- disablePen = QPen(QBrush(adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), 18)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- } else { -- disablePen = QPen(option->palette.brush(QPalette::Disabled, QPalette::Button), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- } -- break; -- default: -- break; - } - - auto *w = const_cast<QWidget *>(widget); -@@ -1711,7 +1553,6 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - { - int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - -- - UKUIColorTheme::SpinBoxColorCfg spinBoxColorCfg = - readCfg()->spinBoxColorCfg(option->palette, C_SpinBox_Default, isHorizonLayout ? C_SpinBox_HorizonLayout : C_SpinBox_DefaultLayout); - -@@ -1764,57 +1605,21 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - if (isHorizonLayout) - hoverPen.setWidth(m_adjustColorRules == 0 ? 2 : 1); - -- if(spinBoxColorCfg.hoverType == Obj_Gradient_Type) { -- //hoverBrush -- QColor startColor; -- QColor endColor; -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -- -- if (isDark) { -- startColor = option->palette.color(QPalette::Active, QPalette::Midlight); -- endColor = option->palette.color(QPalette::Disabled, QPalette::NoRole); -- startColor.setAlphaF(0.5); -- endColor.setAlphaF(0.5); -- } else { -- startColor = option->palette.color(QPalette::Active, QPalette::Midlight); -- endColor = configMixColor(startColor, mix, 0.1); -- startColor.setAlphaF(0.5); -- endColor.setAlphaF(0.5); -- } -+ if(spinBoxColorCfg.hoverType == Obj_Gradient_Type) { -+ QColor startColor; -+ QColor endColor; -+ QLinearGradient linearGradient; -+ linearGradient.setStart(option->rect.topLeft()); -+ linearGradient.setFinalStop(option->rect.bottomLeft()); -+ startColor = spinBoxColorCfg.hoverGradientList.value(0); -+ endColor = spinBoxColorCfg.hoverGradientList.value(1); - -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- } else -- hoverBrush= defaultBrush; -+ linearGradient.setColorAt(0, startColor); -+ linearGradient.setColorAt(1, endColor); -+ hoverBrush = QBrush(linearGradient); -+ } - } - break; -- case AdjustColorRules::HSL:{ -- if (isDark) { -- defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } else -- defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- hoverPen = defaultPen; -- hoverBrush = defaultBrush; -- -- focusBrush = defaultBrush; -- -- //disable state -- if (isDark) { -- disablePen = QPen(QBrush(adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), 18)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- } else { -- disablePen = QPen(option->palette.brush(QPalette::Disabled, QPalette::Button), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- } break; - default: - break; - } -@@ -1835,62 +1640,30 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - //up hover -- if(spinBoxColorCfg.upHoverBrushType == Obj_Color_Type) { -- if (isDark) { -- upHoverBrush = QBrush(configMixColor(button, mix, 0.2)); -- } else { -- upHoverBrush = QBrush(configMixColor(button, mix, 0.05)); -- } -- } else if (spinBoxColorCfg.upHoverBrushType == Obj_Gradient_Type) { -- if (isDark) { -- startColor = configMixColor(button, QColor(Qt::white), 0.2); -- endColor = configMixColor(button, QColor(Qt::white), 0.05); -- } else { -- startColor = configMixColor(button, QColor(Qt::black), 0.05); -- endColor = configMixColor(button, QColor(Qt::black), 0.2); -- } -+ if (spinBoxColorCfg.upHoverBrushType == Obj_Gradient_Type) { -+ startColor = spinBoxColorCfg.upHoverBrushGradientList.value(0); -+ endColor = spinBoxColorCfg.upHoverBrushGradientList.value(1); - upLinearGradient.setColorAt(0, startColor); - upLinearGradient.setColorAt(1, endColor); - upHoverBrush = QBrush(upLinearGradient); -- } - -- //down hover -- if (spinBoxColorCfg.downHoverBrushType == Obj_Color_Type) { -- if (isDark) { -- downHoverBrush = QBrush(configMixColor(button, mix, 0.2)); -- } else { -- downHoverBrush = QBrush(configMixColor(button, mix, 0.05)); -- } -- } else if (spinBoxColorCfg.downHoverBrushType == Obj_Gradient_Type) { -- if (isDark) { -- startColor = configMixColor(button, QColor(Qt::white), 0.2); -- endColor = configMixColor(button, QColor(Qt::white), 0.05); -- } else { -- startColor = configMixColor(button, QColor(Qt::black), 0.05); -- endColor = configMixColor(button, QColor(Qt::black), 0.2); -- } -+ startColor = spinBoxColorCfg.downHoverBrushGradientList.value(0); -+ endColor = spinBoxColorCfg.downHoverBrushGradientList.value(1); - downLinearGradient.setColorAt(0, startColor); - downLinearGradient.setColorAt(1, endColor); - downHoverBrush = QBrush(downLinearGradient); - } - - //up focus hover -- if (spinBoxColorCfg.upFocusHoverBrushType == Obj_Color_Type) { -- if (isDark) { -- upFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); -- } else { -- upFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); -- } -- } else if (spinBoxColorCfg.upFocusHoverBrushType == Obj_Gradient_Type) { -- if (isHorizonLayout) { -+ if(!isHorizonLayout){ -+ if (spinBoxColorCfg.upFocusHoverBrushType == Obj_Color_Type) { - if (isDark) { -- startColor = configMixColor(button, QColor(Qt::white), 0.2); -- endColor = configMixColor(button, QColor(Qt::white), 0.05); -+ upFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } else { -- startColor = configMixColor(button, QColor(Qt::black), 0.05); -- endColor = configMixColor(button, QColor(Qt::black), 0.2); -+ upFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } -- } else { -+ } else if (spinBoxColorCfg.upFocusHoverBrushType == Obj_Gradient_Type) { -+ - if (isDark) { - startColor = configMixColor(highlight, QColor(Qt::white), 0.2); - endColor = configMixColor(highlight, QColor(Qt::white), 0.05); -@@ -1898,29 +1671,20 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - startColor = configMixColor(highlight, QColor(Qt::black), 0.05); - endColor = configMixColor(highlight, QColor(Qt::black), 0.2); - } -+ -+ upLinearGradient.setColorAt(0, startColor); -+ upLinearGradient.setColorAt(1, endColor); -+ upFocusHoverBrush = QBrush(upLinearGradient); - } -- upLinearGradient.setColorAt(0, startColor); -- upLinearGradient.setColorAt(1, endColor); -- upFocusHoverBrush = QBrush(upLinearGradient); -- } - - //down focus hover -- if(spinBoxColorCfg.downFocusHoverBrushType == Obj_Color_Type) { -- if (isDark) { -- downFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); -- } else { -- downFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); -- } -- } else if (spinBoxColorCfg.downFocusHoverBrushType == Obj_Gradient_Type) { -- if (isHorizonLayout) { -+ if(spinBoxColorCfg.downFocusHoverBrushType == Obj_Color_Type) { - if (isDark) { -- startColor = configMixColor(button, QColor(Qt::white), 0.2); -- endColor = configMixColor(button, QColor(Qt::white), 0.05); -+ downFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } else { -- startColor = configMixColor(button, QColor(Qt::black), 0.05); -- endColor = configMixColor(button, QColor(Qt::black), 0.2); -+ downFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } -- } else { -+ } else if (spinBoxColorCfg.downFocusHoverBrushType == Obj_Gradient_Type) { - if (isDark) { - startColor = configMixColor(highlight, QColor(Qt::white), 0.2); - endColor = configMixColor(highlight, QColor(Qt::white), 0.05); -@@ -1928,48 +1692,25 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - startColor = configMixColor(highlight, QColor(Qt::black), 0.05); - endColor = configMixColor(highlight, QColor(Qt::black), 0.2); - } -- } - -- downLinearGradient.setColorAt(0, startColor); -- downLinearGradient.setColorAt(1, endColor); -- downFocusHoverBrush = QBrush(downLinearGradient); -- } -+ downLinearGradient.setColorAt(0, startColor); -+ downLinearGradient.setColorAt(1, endColor); -+ downFocusHoverBrush = QBrush(downLinearGradient); -+ } - -- //up click -- if (isDark) { -- if(isHorizonLayout) -- upClickBrush = QBrush(configMixColor(button, mix, 0.05)); -- else -- upClickBrush = QBrush(configMixColor(highlight, mix, 0.05)); -- } else { -- if(isHorizonLayout) -- upClickBrush = QBrush(configMixColor(button, mix, 0.2)); -- else -- upClickBrush = QBrush(configMixColor(highlight, mix, 0.2)); -- } -+ //click -+ if (isDark) { -+ upClickBrush = QBrush(configMixColor(highlight, mix, 0.05)); -+ downClickBrush = QBrush(configMixColor(highlight, mix, 0.05)); - -- //down click -- if (isDark) { -- if(isHorizonLayout) -- downClickBrush = QBrush(configMixColor(button, mix, 0.05)); -- else -- downClickBrush = QBrush(configMixColor(highlight, mix, 0.05)); -- } else { -- if(isHorizonLayout) -- downClickBrush = QBrush(configMixColor(button, mix, 0.2)); -- else -- downClickBrush = QBrush(configMixColor(highlight, mix, 0.2)); -+ } else { -+ upClickBrush = QBrush(configMixColor(highlight, mix, 0.2)); -+ downClickBrush = QBrush(configMixColor(highlight, mix, 0.2)); -+ } - } -- - } - break; - case AdjustColorRules::HSL:{ -- if(isDark) -- upDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- else -- upDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - //up hover - if (isDark) { - upHoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), -@@ -1999,7 +1740,6 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - - //down default - downDefaultBrush = upDefaultBrush; -- downDefaultPen = upDefaultPen; - - //down hover - downHoverBrush = upHoverBrush; -@@ -2197,20 +1937,16 @@ void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen focusPen = QPen(comboBoxColorCfg.focusPen, (comboBoxColorCfg.focusPen.alpha() == 0 || comboBoxColorCfg.focusPen == Qt::NoPen) - ? 0 : 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - switch (m_adjustColorRules) { -- case AdjustColorRules::DefaultRGB: -- if (isDark) { -- hoverBrush = QBrush(configMixColor(button, mix, 0.2)); -- } else { -- hoverBrush = QBrush(configMixColor(button, mix, 0.05)); -- } -- break; - case AdjustColorRules::HSL: - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - onPen, onBrush, disablePen, disableBrush); -+ defaultPen = QPen(QBrush(comboBoxColorCfg.defaultPen), (comboBoxColorCfg.defaultPen == Qt::NoPen || comboBoxColorCfg.defaultPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ disablePen = QPen(QBrush(comboBoxColorCfg.disablePen), (comboBoxColorCfg.disablePen == Qt::NoPen || comboBoxColorCfg.disablePen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ - //edit - editPen = onPen; - break; -@@ -2313,6 +2049,8 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - QBrush disableBrush = listViewColorCfg.disableBrush; - QPen textHoverPen = QPen(listViewColorCfg.textHoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen textSelectPen = QPen(listViewColorCfg.textSelectPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen textDisablePen = QPen(listViewColorCfg.textDisablePen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ - QPen hoverPen = QPen(listViewColorCfg.hoverPen, listViewColorCfg.hoverPen.alpha() > 0 ? - 1 : 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen selectPen = QPen(listViewColorCfg.selectPen, listViewColorCfg.selectPen.alpha() > 0 ? -@@ -2320,58 +2058,21 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - QPen focusPen = QPen(listViewColorCfg.focusPen, listViewColorCfg.focusPen.alpha() > 0 ? - 2 : 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- if (!option->state & QStyle::State_Enabled) { -- textSelectPen = option->palette.color(QPalette::Disabled, QPalette::Text); -- textHoverPen = option->palette.color(QPalette::Disabled, QPalette::Text); -- } -- - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB: - //hover -- if(listViewColorCfg.hoverType == Obj_Color_Type) { -- hoverBrush = listViewColorCfg.hoverBrush; -- } else if (listViewColorCfg.hoverType == Obj_Gradient_Type) { -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -+ if (listViewColorCfg.hoverType == Obj_Gradient_Type) { - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - -- if (needTranslucent) { -- if (isDark) { -- startColor = option->palette.color(QPalette::Active, QPalette::Light); -- endColor = option->palette.color(QPalette::Active, QPalette::Text); -- startColor.setAlphaF(0.15); -- endColor.setAlphaF(0.15); -- } else { -- startColor = option->palette.color(QPalette::Active, QPalette::Mid); -- endColor = option->palette.color(QPalette::Active, QPalette::Dark); -- startColor.setAlphaF(0.1); -- endColor.setAlphaF(0.1); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- -- QColor selectColor = option->palette.color(QPalette::Active, QPalette::Dark); -- if (isDark) -- selectColor = option->palette.color(QPalette::Active, QPalette::Light); -- selectColor.setAlphaF(isDark ? 0.20 : 0.25); -- selectBrush.setColor(selectColor); -- } else { -- //hover -- if (isDark) { -- startColor = configMixColor(button, QColor(Qt::white), 0.2); -- endColor = configMixColor(button, QColor(Qt::white), 0.05); -- } else { -- startColor = configMixColor(button, QColor(Qt::black), 0.05); -- endColor = configMixColor(button, QColor(Qt::black), 0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- } -+ startColor = listViewColorCfg.hoverGradientList.value(0); -+ endColor = listViewColorCfg.hoverGradientList.value(1); -+ linearGradient.setColorAt(0, startColor); -+ linearGradient.setColorAt(1, endColor); -+ hoverBrush = QBrush(linearGradient); - } - break; - case AdjustColorRules::HSL: -@@ -2406,6 +2107,7 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - w->setProperty("selectBrush", selectBrush); - w->setProperty("textHoverPen", textHoverPen); - w->setProperty("textSelectPen", textSelectPen); -+ w->setProperty("textDisablePen", textDisablePen); - w->setProperty("hoverPen", hoverPen); - w->setProperty("selectPen", selectPen); - w->setProperty("focusPen", focusPen); -@@ -2432,6 +2134,9 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - if (widget->property("setTextSelectPen").isValid() && widget->property("setTextSelectPen").canConvert<QPen>()) { - textSelectPen = widget->property("setTextSelectPen").value<QPen>(); - } -+ if (widget->property("setTextDisablePen").isValid() && widget->property("setTextDisablePen").canConvert<QPen>()) { -+ textDisablePen = widget->property("setTextDisablePen").value<QPen>(); -+ } - if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { - hoverPen = widget->property("setHoverPen").value<QPen>(); - } -@@ -2449,8 +2154,9 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - m_ListParameters.listSelectBrush = selectBrush; - m_ListParameters.listDisableBrush = disableBrush; - m_ListParameters.listTextHoverPen = textHoverPen; -- m_ListParameters.listTextSelectPen = textSelectPen; -- m_ListParameters.listHoverPen = hoverPen; -+ m_ListParameters.listTextSelectPen = textSelectPen; -+ m_ListParameters.listTextDisablePen = textDisablePen; -+ m_ListParameters.listHoverPen = hoverPen; - m_ListParameters.listSelectPen = selectPen; - m_ListParameters.listFocusPen = focusPen; - } -@@ -2459,7 +2165,6 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - { - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; --; - - bool highlightMode = false; - if (widget && widget->property("highlightMode").isValid()) { -@@ -2474,6 +2179,7 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - QBrush disableBrush = treeViewColorCfg.disableBrush; - QPen textHoverPen = QPen(treeViewColorCfg.textHoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen textSelectPen = QPen(treeViewColorCfg.textSelectPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen textDisablePen = QPen(treeViewColorCfg.textDisablePen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen hoverPen = QPen(treeViewColorCfg.hoverPen, (treeViewColorCfg.hoverPen == Qt::NoPen || treeViewColorCfg.hoverPen.alpha() == 0) - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen selectPen = QPen(treeViewColorCfg.selectPen, (treeViewColorCfg.selectPen == Qt::NoPen || treeViewColorCfg.selectPen.alpha() == 0) -@@ -2486,31 +2192,18 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - QBrush branchSelectBrush = treeViewColorCfg.branchSelectBrush; - QBrush branchDisableBrush = treeViewColorCfg.branchDisableBrush; - -- if (!option->state & QStyle::State_Enabled) { -- textSelectPen = option->palette.color(QPalette::Disabled, QPalette::Text); -- textHoverPen = option->palette.color(QPalette::Disabled, QPalette::Text); -- } -- -+ branchHoverBrush = hoverBrush; - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - //hover -- QLinearGradient linearGradient; -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- QColor startColor; -- QColor endColor; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -- if (treeViewColorCfg.hoverType == Obj_Color_Type) { -- hoverBrush = treeViewColorCfg.hoverBrush; -- branchHoverBrush = hoverBrush; -- } else if (treeViewColorCfg.hoverType == Obj_Gradient_Type) { -- if (isDark) { -- startColor = configMixColor(button, QColor(Qt::white), 0.2); -- endColor = configMixColor(button, QColor(Qt::white), 0.05); -- } else { -- startColor = configMixColor(button, QColor(Qt::black), 0.05); -- endColor = configMixColor(button, QColor(Qt::black), 0.2); -- } -+ if (treeViewColorCfg.hoverType == Obj_Gradient_Type) { -+ QLinearGradient linearGradient; -+ QColor startColor; -+ QColor endColor; -+ linearGradient.setStart(option->rect.topLeft()); -+ linearGradient.setFinalStop(option->rect.bottomLeft()); -+ startColor = treeViewColorCfg.hoverGradientList.value(0); -+ endColor = treeViewColorCfg.hoverGradientList.value(1); - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); -@@ -2559,6 +2252,7 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - w->setProperty("branchDisableBrush", branchDisableBrush); - w->setProperty("textHoverPen", textHoverPen); - w->setProperty("textSelectPen", textSelectPen); -+ w->setProperty("textDisablePen", textDisablePen); - w->setProperty("hoverPen", hoverPen); - w->setProperty("selectPen", selectPen); - w->setProperty("focusPen", focusPen); -@@ -2597,6 +2291,9 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - if (widget->property("setTextSelectPen").isValid() && widget->property("setTextSelectPen").canConvert<QPen>()) { - textSelectPen = widget->property("setTextSelectPen").value<QPen>(); - } -+ if (widget->property("setTextDisablePen").isValid() && widget->property("setTextDisablePen").canConvert<QPen>()) { -+ textDisablePen = widget->property("setTextDisablePen").value<QPen>(); -+ } - if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { - hoverPen = widget->property("setHoverPen").value<QPen>(); - } -@@ -2624,6 +2321,7 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - m_TreeParameters.treeFocusPen = focusPen; - m_TreeParameters.treeTextHoverPen = textHoverPen; - m_TreeParameters.treeTextSelectPen = textSelectPen; -+ m_TreeParameters.treeTextDisablePen = textDisablePen; - } - - void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -@@ -2649,32 +2347,20 @@ void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QSt - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen textHoverPen = QPen(tableColorCfg.textHoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen textSelectPen = QPen(tableColorCfg.textSelectPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen textDisablePen = QPen(tableColorCfg.textDisablePen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen focusPen = QPen(tableColorCfg.focusPen, (tableColorCfg.focusPen.alpha() == 0 || tableColorCfg.focusPen == Qt::NoPen) - ? 0 : 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- if (!option->state & QStyle::State_Enabled) { -- textSelectPen = option->palette.color(QPalette::Disabled, QPalette::Text); -- textHoverPen = option->palette.color(QPalette::Disabled, QPalette::Text); -- } -- - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ -- if(tableColorCfg.hoverType == Obj_Color_Type) { -- hoverBrush= QBrush(tableColorCfg.hoverBrush); -- } else if(tableColorCfg.hoverType == Obj_Gradient_Type) { -+ if(tableColorCfg.hoverType == Obj_Gradient_Type) { - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor startColor; - QColor endColor; -- if (isDark) { -- startColor = configMixColor(button, QColor(Qt::white), 0.2); -- endColor = configMixColor(button, QColor(Qt::white), 0.05); -- } else { -- startColor = configMixColor(button, QColor(Qt::black), 0.05); -- endColor = configMixColor(button, QColor(Qt::black), 0.2); -- } -+ startColor = tableColorCfg.hoverGradientList.value(0); -+ endColor = tableColorCfg.hoverGradientList.value(1); - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); -@@ -2713,6 +2399,7 @@ void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QSt - w->setProperty("selectBrush", selectBrush); - w->setProperty("textHoverPen", textHoverPen); - w->setProperty("textSelectPen", textSelectPen); -+ w->setProperty("textDisablePen", textSelectPen); - w->setProperty("hoverPen", hoverPen); - w->setProperty("selectPen", selectPen); - w->setProperty("focusPen", focusPen); -@@ -2745,6 +2432,9 @@ void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QSt - if (widget->property("setTextSelectPen").isValid() && widget->property("setTextSelectPen").canConvert<QPen>()) { - textSelectPen = widget->property("setTextSelectPen").value<QPen>(); - } -+ if (widget->property("setTextDisablePen").isValid() && widget->property("setTextDisablePen").canConvert<QPen>()) { -+ textSelectPen = widget->property("setTextDisablePen").value<QPen>(); -+ } - if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { - focusPen = widget->property("setFocusPen").value<QPen>(); - } -@@ -2761,6 +2451,7 @@ void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QSt - - m_TableParameters.tableTextHoverPen = textHoverPen; - m_TableParameters.tableTextSelectPen = textSelectPen; -+ m_TableParameters.tableTextDisablePen = textDisablePen; - } - - void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -@@ -2801,74 +2492,17 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ -- if(checkboxColorCfg.hoverType == Obj_Color_Type) { -- if(!needTranslucent) { -- hoverBrush = QBrush(configMixColor(defaultBrush.color(), mix, isDark ? 0.15 : 0.05)); -- clickBrush = QBrush(configMixColor(defaultBrush.color(), mix, isDark ? 0.1 : 0.15)); -- } else { -- QColor defaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- defaultColor.setAlphaF(isDark ? 0.04 : 0.05); -- defaultBrush.setColor(defaultColor); -- QColor defaultPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- defaultPenColor.setAlphaF(0.35); -- defaultPen = QPen(QBrush(defaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- hoverColor.setAlphaF(isDark ? 0.10 : 0.10); -- hoverBrush.setColor(hoverColor); -- QColor hoverPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- hoverPenColor.setAlphaF(0.3); -- hoverPen = QPen(QBrush(hoverPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- QColor clickColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- clickColor.setAlphaF(isDark ? 0.20 : 0.16); -- clickBrush.setColor(clickColor); -- QColor clickPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- if(!isDark) -- clickPenColor = option->palette.color(QPalette::Active, QPalette::Mid); -- clickPenColor.setAlphaF(isDark ? 0.25 : 0.65); -- clickPen = QPen(QBrush(clickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } -- } else if (checkboxColorCfg.hoverType == Obj_Gradient_Type) { -- if (needTranslucent) { -- QColor defaultColor = option->palette.color(QPalette::Active, QPalette::Mid); -- if(isDark) -- defaultColor = option->palette.color(QPalette::Active, QPalette::Text); -- defaultColor.setAlphaF(isDark ? 0.15 : 0.20); -- defaultBrush.setColor(defaultColor); -- QColor defaultPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -- defaultPenColor.setAlphaF(0.3); -- defaultPen = QPen(QBrush(defaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- QColor startColor; -- QColor endColor; -- QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -- -- if (isDark) { -- startColor = option->palette.color(QPalette::Active, QPalette::Light); -- endColor = option->palette.color(QPalette::Active, QPalette::Text); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } else { -- startColor = option->palette.color(QPalette::Active, QPalette::Mid); -- endColor = option->palette.color(QPalette::Active, QPalette::Dark); -- startColor.setAlphaF(0.2); -- endColor.setAlphaF(0.2); -- } -- linearGradient.setColorAt(0, startColor); -- linearGradient.setColorAt(1, endColor); -- hoverBrush = QBrush(linearGradient); -- hoverPen = defaultPen; -- -- QColor clickColor = option->palette.color(QPalette::Active, QPalette::Dark); -- if(isDark) -- clickColor = option->palette.color(QPalette::Active, QPalette::Light); -- clickColor.setAlphaF(0.30); -- clickBrush.setColor(clickColor); -- clickPen = defaultPen; -- } -+ if (checkboxColorCfg.hoverType == Obj_Gradient_Type) { -+ QColor startColor; -+ QColor endColor; -+ QLinearGradient linearGradient; -+ linearGradient.setStart(option->rect.topLeft()); -+ linearGradient.setFinalStop(option->rect.bottomLeft()); -+ startColor = checkboxColorCfg.hoverGradientList.value(0); -+ endColor = checkboxColorCfg.hoverGradientList.value(1); -+ linearGradient.setColorAt(0, startColor); -+ linearGradient.setColorAt(1, endColor); -+ hoverBrush = QBrush(linearGradient); - } - - if(checkboxColorCfg.onHoverType == Obj_Color_Type){ -@@ -2926,6 +2560,9 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - case AdjustColorRules::HSL:{ - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); -+ defaultPen = QPen(checkboxColorCfg.defaultPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ disablePen = QPen(checkboxColorCfg.disablePen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ - - //on default - onDefaultPen = defaultPen; -@@ -2939,11 +2576,6 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - onClickPen = clickPen; - onClickBrush = clickBrush; - -- disablePen = defaultPen; -- -- //path -- pathBrush = option->palette.brush(QPalette::Active, QPalette::Text); -- pathDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::ButtonText); - } - default: - break; -@@ -3083,9 +2715,7 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - QBrush childrenOnClickBrush = radioButtonColorCfg.childrenOnClickBrush; - QBrush childrenOnDisableBrush = radioButtonColorCfg.childrenOnDisableBrush; - QBrush onHoverBrush = QBrush(radioButtonColorCfg.onHoverBrush); -- if(radioButtonColorCfg.onHoverType == Obj_Color_Type) { -- onHoverBrush= QBrush(radioButtonColorCfg.onHoverBrush); -- } else if (radioButtonColorCfg.onHoverType == Obj_Gradient_Type) { -+ if (radioButtonColorCfg.onHoverType == Obj_Gradient_Type) { - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); -@@ -3101,21 +2731,21 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - m_RadioButtonParameters.childrenRadius = - (qstyleoption_cast<const QStyleOptionButton*>(option)->rect.adjusted(1, 1, -1, -1).width()) / 2 - 2; - -- //hover -- hoverPen = defaultPen; -- if (isDark) { -- hoverBrush = QBrush(configMixColor(defaultBrush.color(), mix, 0.15)); -- } else { -- hoverBrush = QBrush(configMixColor(defaultBrush.color(), mix, 0.05)); -- } -+// //hover -+// hoverPen = defaultPen; -+// if (isDark) { -+// hoverBrush = QBrush(configMixColor(defaultBrush.color(), mix, 0.15)); -+// } else { -+// hoverBrush = QBrush(configMixColor(defaultBrush.color(), mix, 0.05)); -+// } - -- //click -- clickPen = defaultPen; -- if (isDark) { -- clickBrush = QBrush(configMixColor(defaultBrush.color(), mix, 0.1)); -- } else { -- clickBrush = QBrush(configMixColor(defaultBrush.color(), mix, 0.15)); -- } -+// //click -+// clickPen = defaultPen; -+// if (isDark) { -+// clickBrush = QBrush(configMixColor(defaultBrush.color(), mix, 0.1)); -+// } else { -+// clickBrush = QBrush(configMixColor(defaultBrush.color(), mix, 0.15)); -+// } - - onHoverPen = onDefaultPen; - if (radioButtonColorCfg.onHoverType == Obj_Color_Type) { -@@ -3126,7 +2756,7 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - onHoverBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, 0.05)); - } - //disable -- disablePen = defaultPen; -+// disablePen = defaultPen; - } else if (radioButtonColorCfg.onHoverType == Obj_Gradient_Type) { - QColor startColor; - QColor endColor; -@@ -3158,6 +2788,9 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); - -+ defaultPen = QPen(radioButtonColorCfg.defaultPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ disablePen = QPen(radioButtonColorCfg.disablePen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ - //on default - onDefaultPen = defaultPen; - onDefaultBrush = defaultBrush; -@@ -3380,15 +3013,6 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - //groove value hover - grooveValueHoverBrush = grooveValueDefaultBrush; - -- //groove value disable -- grooveValueDisableBrush = handleDisableBrush; -- -- if(needTranslucent) { -- QColor color = option->palette.color(QPalette::Active, QPalette::BrightText); -- color.setAlphaF(0.1); -- grooveUnvalueDefaultBrush.setColor(color); -- } -- grooveUnvalueHoverBrush = grooveUnvalueDefaultBrush; - } break; - case AdjustColorRules::HSL:{ - if (isDark) { -@@ -3406,14 +3030,6 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - handleHoverPen.setWidth(1); - handleClickBrush = highlightClick(isDark, option->palette); - -- //handle disable -- if (isDark) { -- handleDisablePen = adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), 18); -- } else { -- handleDisablePen = adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), -12); -- } -- handleDisablePen.setWidth(1); -- - if (isDark) { - grooveValueDefaultBrush = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15); - } else { -@@ -3422,13 +3038,6 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - //groove value hover - grooveValueHoverBrush = grooveValueDefaultBrush; - -- if(isDark){ -- sliderGroovePen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } else -- sliderGroovePen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- - QRect handleRect = option->rect; - if (horizontal) { - handlePath.moveTo(handleRect.left(), handleRect.top()); -@@ -3626,20 +3235,8 @@ void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, con - if(isDark) - contentBrush = QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), -1, 15, -14)); - -- - endColor = contentBrush.color(); - startColor = contentBrush.color(); -- contentPen = QPen(QColor(Qt::NoPen), 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- if(isDark){ -- grooveDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- } else -- grooveDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), -- 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- //groove disable -- grooveDisablePen = grooveDefaultPen; - - break; - default: -@@ -3749,21 +3346,7 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB: - if (!needTranslucent) { -- if (scrollBarColorCfg.sliderHoverType == Obj_Color_Type) { -- //slider hover -- if (isDark) { -- sliderHoverBrush = QBrush(configMixColor(sliderDefaultBrush.color(), mix, 0.2)); -- } else { -- sliderHoverBrush = QBrush(configMixColor(sliderDefaultBrush.color(), mix, 0.05)); -- } -- -- //slider click -- if (isDark) { -- sliderClickBrush = QBrush(configMixColor(sliderDefaultBrush.color(), mix, 0.05)); -- } else { -- sliderClickBrush = QBrush(configMixColor(sliderDefaultBrush.color(), mix, 0.2)); -- } -- } else if (scrollBarColorCfg.sliderHoverType == Obj_Gradient_Type) { -+ if (scrollBarColorCfg.sliderHoverType == Obj_Gradient_Type) { - if (bar->orientation == Qt::Horizontal) { - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); -@@ -3771,36 +3354,14 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - linearGradient.setStart(option->rect.topRight()); - linearGradient.setFinalStop(option->rect.topLeft()); - } -- -- QColor color = option->palette.color(QPalette::Active, QPalette::Button); -- if (isDark) { -- startColor = configMixColor(color, QColor(Qt::white), 0.2); -- endColor = configMixColor(color, QColor(Qt::white), 0.05); -- } else { -- startColor = configMixColor(color, QColor(Qt::black), 0.05); -- endColor = configMixColor(color, QColor(Qt::black), 0.2); -- } -+ startColor = scrollBarColorCfg.sliderHoverGradientList.value(0); -+ endColor = scrollBarColorCfg.sliderHoverGradientList.value(1); - - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - sliderHoverBrush = QBrush(linearGradient); -- sliderClickBrush = QBrush(configMixColor(sliderDefaultBrush.color(), mix, 0.2)); - } - } -- break; -- case HSL: -- //slider hover -- if (isDark) { -- sliderHoverBrush = buttonDarkClick(isDark, option->palette); -- } -- -- //slider click -- if (isDark) { -- sliderClickBrush = adjustL(option->palette.color(QPalette::Active, QPalette::Button), 13); -- } else { -- sliderClickBrush = adjustL(option->palette.color(QPalette::Active, QPalette::Button), -45); -- } -- - break; - default: - break; -@@ -3918,36 +3479,24 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - QBrush tabBarHoverBrush = tabWidgetColorCfg.tabBarHoverBrush; - QBrush tabBarSelectBrush = tabWidgetColorCfg.tabBarSelectBrush; - QBrush tabBarClickBrush = tabWidgetColorCfg.tabBarClickBrush; --// QPen tabBarHoverPen = QPen(tabWidgetColorCfg.tabBarHoverPen, (tabWidgetColorCfg.tabBarHoverPen == Qt::NoPen || tabWidgetColorCfg.tabBarHoverPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); --// QPen tabBarClickPen = QPen(tabWidgetColorCfg.tabBarClickPen, (tabWidgetColorCfg.tabBarClickPen == Qt::NoPen || tabWidgetColorCfg.tabBarClickPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- QPen tabBarPen = QPen(QColor(Qt::NoPen), 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen tabBarHoverPen = QPen(tabWidgetColorCfg.tabBarHoverPen, (tabWidgetColorCfg.tabBarHoverPen == Qt::NoPen || tabWidgetColorCfg.tabBarHoverPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen tabBarClickPen = QPen(tabWidgetColorCfg.tabBarClickPen, (tabWidgetColorCfg.tabBarClickPen == Qt::NoPen || tabWidgetColorCfg.tabBarClickPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ QPen tabBarDefaultPen = QPen(tabWidgetColorCfg.tabBarDefaultPen, (tabWidgetColorCfg.tabBarDefaultPen == Qt::NoPen || tabWidgetColorCfg.tabBarDefaultPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen tabBarFocusPen = QPen(tabWidgetColorCfg.tabBarFocusPen , (tabWidgetColorCfg.tabBarFocusPen.alpha() == 0 || - tabWidgetColorCfg.tabBarFocusPen == Qt::NoPen) ? 0 : 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB: -- if (tabWidgetColorCfg.tabBarHoverType == Obj_Color_Type) { -- //tabbar hover -- QColor hover_color = option->palette.color(QPalette::Active, QPalette::Window); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -- tabBarHoverBrush = QBrush(configMixColor(hover_color, mix, 0.1)); -- } else if (tabWidgetColorCfg.tabBarHoverType == Obj_Gradient_Type) { -+ if (tabWidgetColorCfg.tabBarHoverType == Obj_Gradient_Type) { - //tabbar hover -- QColor hover_color = option->palette.color(QPalette::Active, QPalette::Window); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); -- if (isDark) { -- startColor = configMixColor(hover_color, mix, 0.1); -- endColor = configMixColor(hover_color, mix, 0.05); -- } else { -- startColor = configMixColor(hover_color, mix, 0.05); -- endColor = configMixColor(hover_color, mix, 0.1); -- } -+ startColor = tabWidgetColorCfg.tabBarHoverGradientList.value(0); -+ endColor = tabWidgetColorCfg.tabBarHoverGradientList.value(1); - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - tabBarHoverBrush = QBrush(linearGradient); -@@ -3962,10 +3511,10 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - tabBarHoverBrush = highlightHover(isDark, option->palette); - tabBarClickBrush = highlightClick(isDark, option->palette); - if (click) { -- tabBarPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), -+ tabBarClickPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else if(hover && !selected) { -- tabBarPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), -+ tabBarHoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - } else { -@@ -3973,11 +3522,11 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - tabBarClickBrush = highlightClick(isDark, option->palette); - - if(click){ -- tabBarPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 1, -21, 3)), -+ tabBarClickPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 1, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else if(hover && !selected){ -- tabBarPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), -+ tabBarHoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - } -@@ -3986,9 +3535,9 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - break; - } - -- if((option->state & QStyle::State_HasFocus) && (option->state & QStyle::State_Enabled)){ -- tabBarPen = tabBarFocusPen; -- } -+// if((option->state & QStyle::State_HasFocus) && (option->state & QStyle::State_Enabled)){ -+// tabBarPen = tabBarFocusPen; -+// } - - auto *w = const_cast<QWidget *>(widget); - if (w) { -@@ -3999,8 +3548,10 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - w->setProperty("tabBarHoverBrush", tabBarHoverBrush); - w->setProperty("tabBarClickBrush", tabBarClickBrush); - w->setProperty("tabBarSelectBrush", tabBarSelectBrush); -- w->setProperty("tabBarPen", tabBarPen); -+ w->setProperty("tabBarDefaultPen", tabBarDefaultPen); - w->setProperty("tabBarFocusPen", tabBarFocusPen); -+ w->setProperty("tabBarClickPen", tabBarClickPen); -+ w->setProperty("tabBarHoverPen", tabBarHoverPen); - } - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -@@ -4024,12 +3575,18 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - if (widget->property("setTabBarSelectBrush").isValid() && widget->property("setTabBarSelectBrush").canConvert<QBrush>()) { - tabBarSelectBrush = widget->property("setTabBarSelectBrush").value<QBrush>(); - } -- if (widget->property("setTabBarPen").isValid() && widget->property("setTabBarPen").canConvert<QBrush>()) { -- tabBarPen = widget->property("setTabBarPen").value<QPen>(); -+ if (widget->property("setTabBarDefaultPen").isValid() && widget->property("setTabBarDefaultPen").canConvert<QPen>()) { -+ tabBarDefaultPen = widget->property("setTabBarDefaultPen").value<QPen>(); - } -- if (widget->property("setTabBarFocusPen").isValid() && widget->property("setTabBarFocusPen").canConvert<QBrush>()) { -+ if (widget->property("setTabBarFocusPen").isValid() && widget->property("setTabBarFocusPen").canConvert<QPen>()) { - tabBarFocusPen = widget->property("setTabBarFocusPen").value<QPen>(); - } -+ if (widget->property("setTabBarClickPen").isValid() && widget->property("setTabBarClickPen").canConvert<QPen>()) { -+ tabBarFocusPen = widget->property("setTabBarClickPen").value<QPen>(); -+ } -+ if (widget->property("setTabBarHoverPen").isValid() && widget->property("setTabBarHoverPen").canConvert<QPen>()) { -+ tabBarFocusPen = widget->property("setTabBarHoverPen").value<QPen>(); -+ } - } - - m_TabWidgetParameters.radius = tabradius; -@@ -4039,8 +3596,10 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - m_TabWidgetParameters.tabBarHoverBrush = tabBarHoverBrush; - m_TabWidgetParameters.tabBarClickBrush = tabBarClickBrush; - m_TabWidgetParameters.tabBarSelectBrush = tabBarSelectBrush; -- m_TabWidgetParameters.tabBarPen = tabBarPen; -- m_TabWidgetParameters.tabBarFocusPen = tabBarFocusPen; -+ m_TabWidgetParameters.tabBarDefaultPen = tabBarDefaultPen; -+ m_TabWidgetParameters.tabBarHoverPen = tabBarHoverPen; -+ m_TabWidgetParameters.tabBarClickPen = tabBarClickPen; -+ m_TabWidgetParameters.tabBarFocusPen = tabBarFocusPen; - } - - void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -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 683ce46..431cbd2 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -383,7 +383,7 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - - if((e->type() ==QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) && (proxy()->styleHint(QStyle::SH_Slider_AbsoluteSetButtons) == mousePressEvent->button() || - proxy()->styleHint(QStyle::SH_Slider_PageSetButtons) == mousePressEvent->button())){ -- //qDebug() << "e->type:" << e->type() << mousePressEvent->button(); -+// qDebug() << "e->type:" << e->type() << mousePressEvent->button(); - if(obj->property("animation").isValid() && !obj->property("animation").toBool()) - return false; - -@@ -412,6 +412,8 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - - QRect handleRect = sliderHandleRec(); - if(horizontal){ -+// qDebug() << "mousepressevent1111 pos...." << mousePressEvent->pos().x() << handleRect.x(); -+ - if(mousePressEvent->pos().x() <= handleRect.x()){ - animator->setExtraProperty("addValue", false); - -@@ -423,6 +425,7 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - return false; - } - else{ -+// qDebug() << "mousepressevent1111 pos...." << mousePressEvent->pos().y() << handleRect.y(); - if(mousePressEvent->pos().y() <= handleRect.y()){ - animator->setExtraProperty("addValue", true); - -@@ -459,15 +462,19 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - sliderMin = gr.x(); - sliderMax = gr.right() - sliderLength + 1; - pos = (mousePressEvent->pos() - center).x(); --// qDebug() << "pos....:" << mousePressEvent->pos() << center << pos; -+// qDebug() << "Horizontal pos....:" << mousePressEvent->pos() << center << pos; - } else { - sliderLength = sr.height(); - sliderMin = gr.y(); - sliderMax = gr.bottom() - sliderLength + 1; - pos = (mousePressEvent->pos() - center).y(); -+// qDebug() << "vertical pos....:" << mousePressEvent->pos() << center << pos; - } --// qDebug() << "minumum..." << slider->minimum() << slider->maximum() << sliderMin << sliderMax << pos; -- int sliderValue = sliderValueFromPosition(slider->minimum(), slider->maximum(), pos - sliderMin, sliderMax - sliderMin, opt->upsideDown); -+// qDebug() << "minumum..." << slider->minimum() << slider->maximum() << sliderMin << sliderMax << pos << opt->upsideDown; -+ bool upsideDown = (slider->orientation() == Qt::Horizontal) ? -+ (slider->invertedAppearance() != (slider->layoutDirection() == Qt::RightToLeft)) -+ : (!slider->invertedAppearance()); -+ int sliderValue = sliderValueFromPosition(slider->minimum(), slider->maximum(), pos - sliderMin, sliderMax - sliderMin, upsideDown);//opt->upsideDown); - // qDebug() << "sliderValue....." << sliderValue << slider->value(); - step = sliderValue - slider->value(); - // qDebug() << "step0000...." << step; -@@ -527,11 +534,11 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - - if(horizontal){ - if(mousePressEvent->pos().x() <= scrollbarSliderRec().x()){ -- animator->setExtraProperty("addValue", scrollbar->layoutDirection() == Qt::RightToLeft ? true : false); -+ animator->setExtraProperty("addValue", /*scrollbar->layoutDirection() == Qt::RightToLeft ? true :*/ false); - - } - else if(mousePressEvent->pos().x() >= scrollbarSliderRec().x() + scrollbarSliderRec().width()){ -- animator->setExtraProperty("addValue", scrollbar->layoutDirection() == Qt::RightToLeft ? false : true); -+ animator->setExtraProperty("addValue", /*scrollbar->layoutDirection() == Qt::RightToLeft ? false :*/ true); - } - else - return false; -@@ -597,9 +604,12 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - - } - -+ bool upsideDown = scrollbar->invertedAppearance(); -+// if(scrollbar->layoutDirection() == Qt::RightToLeft && scrollbar->orientation() == Qt::Horizontal) -+// upsideDown = !upsideDown; - // qDebug() << "minimum..." << scrollbar->minimum() << scrollbar->maximum() << pos << sliderMin << sliderMax; - int scrollValue = sliderValueFromPosition(scrollbar->minimum(), scrollbar->maximum(), pos - sliderMin, -- sliderMax - sliderMin, opt->upsideDown); -+ sliderMax - sliderMin, upsideDown);//opt->upsideDown); - // qDebug() << "scrollValue....." << scrollValue << scrollbar->value(); - step = scrollValue - scrollbar->value(); - // qDebug() << "step0000...." << step; -@@ -2670,7 +2680,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - pen.color().setAlphaF(sp->m_CheckBoxParameters.checkBoxDefaultPen.color().alphaF() * (1.0 - value)); - painter->setPen(pen); - QColor defaultColor = mouseOver ? (sp->m_CheckBoxParameters.onHoverBrushIslinearGradient ? -- sp->m_CheckBoxParameters.checkBoxHoverBrush.color() : sp->m_CheckBoxParameters.checkBoxDefaultBrush.color()): -+ sp->m_CheckBoxParameters.checkBoxClickBrush.color() : sp->m_CheckBoxParameters.checkBoxDefaultBrush.color()): - sp->m_CheckBoxParameters.checkBoxDefaultBrush.color(); - QColor onDefaultColor = mouseOver ? sp->m_CheckBoxParameters.checkBoxOnClickBrush.color() : sp->m_CheckBoxParameters.checkBoxOnClickBrush.color(); - QBrush brush(QColor(defaultColor.red() + value * (onDefaultColor.red() - defaultColor.red()), -@@ -3318,8 +3328,8 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - // } - painter->restore(); - -- if(focus) -- qDebug() << "item focusssss true" << focus; -+// if(focus) -+// qDebug() << "item focusssss true" << focus; - - // if (focus) { - // painter->save(); -@@ -4811,8 +4821,14 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - // } else { - // proxy()->drawItemText(painter, textRect, tf, button->palette, false, button->text, QPalette::ButtonText); - // } -+ QColor penColor = sp->m_PushButtonParameters.textDefaultColor; -+ if(!enable) -+ penColor = sp->m_PushButtonParameters.textDisableColor; -+ else if(button->state & QStyle::State_MouseOver || button->state & QStyle::State_Sunken) -+ penColor = sp->m_PushButtonParameters.textHoverColor; -+ - painter->setBrush(Qt::NoBrush); -- painter->setPen(QPen(sp->m_PushButtonParameters.textColor)); -+ painter->setPen(QPen(penColor)); - painter->drawText(textRect, button->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); - - // proxy()->drawItemText(painter, textRect, tf, button->palette, false, button->text, sp->m_PushButtonParameters.textColor); -@@ -4937,8 +4953,14 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - // } else { - // proxy()->drawItemText(painter, textRect, alignment, tb->palette, false, tb->text, QPalette::ButtonText); - // } -+ QColor penColor = sp->m_ToolButtonParameters.textDefaultColor; -+ if(!enable) -+ penColor = sp->m_ToolButtonParameters.textDisableColor; -+ else if(tb->state & QStyle::State_MouseOver || tb->state & QStyle::State_Sunken) -+ penColor = sp->m_ToolButtonParameters.textHoverColor; -+ - painter->setBrush(Qt::NoBrush); -- painter->setPen(QPen(sp->m_ToolButtonParameters.textColor)); -+ painter->setPen(QPen(penColor)); - painter->drawText(textRect, tb->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); - } - -@@ -5119,8 +5141,11 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - path.addRect(drawRect); - } - -- int penWidth = sp->m_TabWidgetParameters.tabBarPen.width(); -+ int penWidth = (sp->m_TabWidgetParameters.tabBarDefaultPen == Qt::NoPen || -+ sp->m_TabWidgetParameters.tabBarDefaultPen.color().alpha() == 0) ? -+ 0 : sp->m_TabWidgetParameters.tabBarDefaultPen.width(); - int radius = sp->m_TabWidgetParameters.radius; -+ QPen pen = Qt::NoPen; - // drawRect.adjust(0, 0, -1 * penWidth, 0); - // penPath.moveTo(drawRect.left(), drawRect.bottom() - penWidth - radius); - // penPath.lineTo(drawRect.left(), drawRect.top()); -@@ -5129,23 +5154,33 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - // penPath.lineTo(drawRect.left(), drawRect.bottom() - penWidth); - - if(click) { -+ penWidth = sp->m_TabWidgetParameters.tabBarClickPen.width(); - painter->setBrush(sp->m_TabWidgetParameters.tabBarClickBrush); -+ pen = sp->m_TabWidgetParameters.tabBarClickPen; - } - else if (selected) { - painter->setBrush(sp->m_TabWidgetParameters.tabBarSelectBrush); - } else if (hover) { -+ penWidth = sp->m_TabWidgetParameters.tabBarHoverPen.width(); - painter->setBrush(sp->m_TabWidgetParameters.tabBarHoverBrush); -+ pen = sp->m_TabWidgetParameters.tabBarHoverPen; - } else{ -+ penWidth = sp->m_TabWidgetParameters.tabBarDefaultPen.width(); - painter->setBrush(sp->m_TabWidgetParameters.tabBarDefaultBrush); -+ pen = sp->m_TabWidgetParameters.tabBarDefaultPen; -+ } -+ if((tab->state & State_Enabled) && (tab->state & State_HasFocus)){ -+ penWidth = sp->m_TabWidgetParameters.tabBarFocusPen.width(); -+ pen = sp->m_TabWidgetParameters.tabBarFocusPen; - } - painter->drawPath(path); - painter->restore(); - painter->save(); -- painter->setPen(penWidth > 0 ? sp->m_TabWidgetParameters.tabBarPen : Qt::NoPen); -+ painter->setPen(penWidth > 0 ? pen : Qt::NoPen); - painter->setBrush(Qt::NoBrush); - painter->setRenderHint(QPainter::Antialiasing, true); -- if(painter->pen().width() == 1) -- painter->translate(0.5, 0.5); -+// if(painter->pen().width() == 1) -+// painter->translate(0.5, 0.5); - painter->drawRoundedRect(drawRect.adjusted(penWidth/2, penWidth/2, -1 * penWidth/2, -1 * penWidth), radius, radius); - painter->restore(); - -@@ -6029,6 +6064,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - - proxy()->drawPrimitive(PE_PanelItemViewItem, option, painter, widget); - -+ - if (vi->features & QStyleOptionViewItem::HasCheckIndicator) { - QStyleOptionButton option; - option.rect = checkRect; -@@ -6078,15 +6114,20 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - - QPen ViewItemHover; - QPen ViewItemSelect; -+ QPen ViewItemDisable; -+ - if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) { - ViewItemHover = sp->m_TreeParameters.treeTextHoverPen; - ViewItemSelect = sp->m_TreeParameters.treeTextSelectPen; -+ ViewItemDisable = sp->m_TreeParameters.treeTextDisablePen; - } else if(qobject_cast<const QListView *>(widget) || qobject_cast<const QListWidget *>(widget)){ - ViewItemHover = sp->m_ListParameters.listTextHoverPen; - ViewItemSelect = sp->m_ListParameters.listTextSelectPen; -+ ViewItemDisable = sp->m_ListParameters.listTextDisablePen; - } else if(qobject_cast<const QTableView *>(widget) || qobject_cast<const QTableWidget *>(widget)){ - ViewItemHover = sp->m_TableParameters.tableTextHoverPen; - ViewItemSelect = sp->m_TableParameters.tableTextSelectPen; -+ ViewItemDisable = sp->m_TableParameters.tableTextDisablePen; - } - else { - -@@ -6098,7 +6139,9 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - if (cg == QPalette::Normal && !(vi->state & QStyle::State_Active)) - cg = QPalette::Inactive; - -- if (((vi->decorationPosition == QStyleOptionViewItem::Top) || (vi->decorationPosition == QStyleOptionViewItem::Bottom)) -+ if(!vi->state & QStyle::State_Enabled) -+ painter->setPen(ViewItemDisable); -+ else if (((vi->decorationPosition == QStyleOptionViewItem::Top) || (vi->decorationPosition == QStyleOptionViewItem::Bottom)) - && !(vi->state & State_Selected) && (vi->state & QStyle::State_Enabled)) { - painter->setPen(vi->palette.color(cg, QPalette::Text)); - } -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -index 16820bc..e3b8a69 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -@@ -42,6 +42,7 @@ public: - QBrush listDisableBrush; - QPen listTextHoverPen; - QPen listTextSelectPen; -+ QPen listTextDisablePen; - QPen listHoverPen; - QPen listSelectPen; - QPen listFocusPen; -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h -index ff96a18..82ce1fd 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h -@@ -39,7 +39,10 @@ public: - - bool iconHoverClickHighlight; - bool textHoverClickHighlight; -- QColor textColor; -+ QColor textDefaultColor; -+ QColor textHoverColor; -+ QColor textDisableColor; -+ - - QBrush pushButtonDefaultBrush; - QBrush pushButtonHoverBrush; -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -index 393713d..53a9a8d 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -@@ -45,6 +45,7 @@ public: - QPen tableFocusPen; - QPen tableTextHoverPen; - QPen tableTextSelectPen; -+ QPen tableTextDisablePen; - }; - } - #endif // TABLEPARAMETERS_H -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -index 0644eda..eb85537 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -@@ -42,8 +42,10 @@ public: - QBrush tabBarHoverBrush; - QBrush tabBarClickBrush; - QBrush tabBarSelectBrush; -- QPen tabBarPen = Qt::NoPen; -+ QPen tabBarDefaultPen = Qt::NoPen; - QPen tabBarFocusPen = Qt::NoPen; -+ QPen tabBarClickPen = Qt::NoPen; -+ QPen tabBarHoverPen = Qt::NoPen; - - }; - } -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h -index 9886255..81b2c9b 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h -@@ -58,7 +58,9 @@ public: - QPen toolButtonCheckDisablePen; - QPen toolButtonFocusPen; - -- QColor textColor; -+ QColor textDefaultColor; -+ QColor textHoverColor ; -+ QColor textDisableColor; - }; - } - #endif // TOOLBUTTONPARAMETERS_H -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -index 48f1ae4..e5291f7 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -@@ -49,6 +49,7 @@ public: - QPen treeFocusPen; - QPen treeTextHoverPen; - QPen treeTextSelectPen; -+ QPen treeTextDisablePen; - - bool indicatorIconHoverNeedHighLight = true; - // bool animation = true; -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/widget-parameters.pri b/ukui-styles/qt5-config-style-ukui/widget-parameters/widget-parameters.pri -deleted file mode 100644 -index 7e887de..0000000 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/widget-parameters.pri -+++ /dev/null -@@ -1,39 +0,0 @@ --INCLUDEPATH += $$PWD -- --HEADERS += \ -- $$PWD/config-checkbox-parameters.h \ -- $$PWD/config-combobox-parameters.h \ -- $$PWD/config-lineedit-parameters.h \ -- $$PWD/config-list-parameters.h \ -- $$PWD/config-menu-parameters.h \ -- $$PWD/config-progressbar-parameters.h \ -- $$PWD/config-pushbutton-parameters.h \ -- $$PWD/config-radiobutton-parameters.h \ -- $$PWD/config-scrollbar-parameters.h \ -- $$PWD/config-slider-parameters.h \ -- $$PWD/config-spinbox-parameters.h \ -- $$PWD/config-table-parameters.h \ -- $$PWD/config-tabwidget-parameters.h \ -- $$PWD/config-toolbutton-parameters.h \ -- $$PWD/config-tooltip-parameters.h \ -- $$PWD/config-tree-parameters.h -- --SOURCES += \ -- $$PWD/config-checkbox-parameters.cpp \ -- $$PWD/config-combobox-parameters.cpp \ -- $$PWD/config-lineedit-parameters.cpp \ -- $$PWD/config-list-parameters.cpp \ -- $$PWD/config-menu-parameters.cpp \ -- $$PWD/config-progressbar-parameters.cpp \ -- $$PWD/config-pushbutton-parameters.cpp \ -- $$PWD/config-radiobutton-parameters.cpp \ -- $$PWD/config-scrollbar-parameters.cpp \ -- $$PWD/config-slider-parameters.cpp \ -- $$PWD/config-spinbox-parameters.cpp \ -- $$PWD/config-table-parameters.cpp \ -- $$PWD/config-tabwidget-parameters.cpp \ -- $$PWD/config-toolbutton-parameters.cpp \ -- $$PWD/config-tooltip-parameters.cpp \ -- $$PWD/config-tree-parameters.cpp -- -- -diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp -index a62dab9..b6988b3 100644 ---- a/ukui-styles/readconfig.cpp -+++ b/ukui-styles/readconfig.cpp -@@ -621,8 +621,9 @@ UKUIColorTheme::ButtonColorCfg ReadThemeConfig::buttonColorCfg(const QPalette pa - m_readConfig->getColorValue(buttonCfg.clickPen , m_theme, UKUIPushButton, property, C_Button_ClickPen ); - m_readConfig->getColorValue(buttonCfg.disablePen , m_theme, UKUIPushButton, property, C_Button_DisablePen ); - m_readConfig->getColorValue(buttonCfg.focusPen , m_theme, UKUIPushButton, property, C_Button_FocusPen ); -- m_readConfig->getColorValue(buttonCfg.textColor , m_theme, UKUIPushButton, property, C_Button_TextColor ); -+ m_readConfig->getColorValue(buttonCfg.textDefaultColor, m_theme, UKUIPushButton, property, C_Button_TextColor ); - m_readConfig->getColorValue(buttonCfg.textHoverColor , m_theme, UKUIPushButton, property, C_Button_TextHoverColor ); -+ m_readConfig->getColorValue(buttonCfg.textDisableColor , m_theme, UKUIPushButton, property, C_Button_TextDisableColor ); - - m_buttonColorCfg = buttonCfg; - return m_buttonColorCfg; -@@ -653,8 +654,9 @@ UKUIColorTheme::ToolButtonColorCfg ReadThemeConfig::toolButtonColorCfg(const QPa - m_readConfig->getColorValue(tbcfg.clickPen , m_theme, UKUIToolButton, property, C_Button_ClickPen ); - m_readConfig->getColorValue(tbcfg.disablePen , m_theme, UKUIToolButton, property, C_Button_DisablePen ); - m_readConfig->getColorValue(tbcfg.focusPen , m_theme, UKUIToolButton, property, C_Button_FocusPen ); -- m_readConfig->getColorValue(tbcfg.textColor , m_theme, UKUIToolButton, property, C_Button_TextColor ); -+ m_readConfig->getColorValue(tbcfg.textDefaultColor, m_theme, UKUIToolButton, property, C_Button_TextColor ); - m_readConfig->getColorValue(tbcfg.textHoverColor , m_theme, UKUIToolButton, property, C_Button_TextHoverColor ); -+ m_readConfig->getColorValue(tbcfg.textDisableColor , m_theme, UKUIToolButton, property, C_Button_TextDisableColor ); - - m_toolButtonColorCfg = tbcfg; - return m_toolButtonColorCfg; -@@ -890,6 +892,8 @@ UKUIColorTheme::TableColorCfg ReadThemeConfig::tableColorCfg(const QPalette pale - m_readConfig->getColorValue(m_tableColorCfg.selectPen ,m_theme, UKUITable, property, C_Table_SelectPen); - m_readConfig->getColorValue(m_tableColorCfg.textHoverPen ,m_theme, UKUITable, property, C_Table_TextHoverPen); - m_readConfig->getColorValue(m_tableColorCfg.textSelectPen ,m_theme, UKUITable, property, C_Table_TextSelectPen); -+ m_readConfig->getColorValue(m_tableColorCfg.textDisablePen,m_theme, UKUITable, property, C_Table_TextDisablePen); -+ m_readConfig->getColorValue(m_tableColorCfg.focusPen ,m_theme, UKUITable, property, C_Table_FocusPen); - - m_tableColorCfg.hoverType = m_readConfig->getType(m_theme, UKUITable, property, C_Table_HoverBrush); - if(m_tableColorCfg.hoverType == Obj_Gradient_Type){ -@@ -914,7 +918,9 @@ UKUIColorTheme::ListViewColorCfg ReadThemeConfig::listViewColorCfg(const QPalett - - m_readConfig->getColorValue(m_listViewColorCfg.textHoverPen , m_theme, UKUIListView, property, C_ListView_TextHoverPen); - m_readConfig->getColorValue(m_listViewColorCfg.textSelectPen, m_theme, UKUIListView, property, C_ListView_TextSelectPen); -- m_readConfig->getColorValue(m_listViewColorCfg.focusPen , m_theme, UKUITreeView, property, C_TreeView_FocusPen); -+ m_readConfig->getColorValue(m_listViewColorCfg.textDisablePen,m_theme, UKUIListView, property, C_ListView_TextDisablePen); -+ -+ m_readConfig->getColorValue(m_listViewColorCfg.focusPen , m_theme, UKUIListView, property, C_ListView_FocusPen); - - m_listViewColorCfg.hoverType = m_readConfig->getType(m_theme, UKUIListView, property, C_ListView_HoverBrush); - if(m_listViewColorCfg.hoverType == Obj_Gradient_Type){ -@@ -947,6 +953,7 @@ UKUIColorTheme::TreeViewColorCfg ReadThemeConfig::treeViewColorCfg(const QPalett - - m_readConfig->getColorValue(m_treeViewColorCfg.textHoverPen , m_theme, UKUITreeView, property, C_TreeView_TextHoverPen); - m_readConfig->getColorValue(m_treeViewColorCfg.textSelectPen , m_theme, UKUITreeView, property, C_TreeView_TextSelectPen); -+ m_readConfig->getColorValue(m_treeViewColorCfg.textDisablePen , m_theme, UKUITreeView, property, C_TreeView_TextDisablePen); - - - m_treeViewColorCfg.hoverType = m_readConfig->getType(m_theme, UKUITreeView, property, C_TreeView_HoverBrush); -diff --git a/ukui-styles/themeinformation.h b/ukui-styles/themeinformation.h -index 1993d1c..155dafa 100644 ---- a/ukui-styles/themeinformation.h -+++ b/ukui-styles/themeinformation.h -@@ -72,6 +72,7 @@ - #define C_Button_FocusPen "FocusPen" - #define C_Button_TextColor "TextColor" - #define C_Button_TextHoverColor "TextHoverColor" -+#define C_Button_TextDisableColor "TextDisableColor" - - #define C_Button_ClickBrush "ClickBrush" - #define C_Button_DisableBrush "DisableBrush" -@@ -195,6 +196,7 @@ - #define C_Table_SelectPen "SelectPen" - #define C_Table_TextHoverPen "TextHoverPen" - #define C_Table_TextSelectPen "TextSelectPen" -+#define C_Table_TextDisablePen "TextDisablePen" - #define C_Table_FocusPen "FocusPen" - - #define UKUIListView "ListView" -@@ -207,6 +209,7 @@ - #define C_ListView_DisableBrush "DisableBrush" - #define C_ListView_TextHoverPen "TextHoverPen" - #define C_ListView_TextSelectPen "TextSelectPen" -+#define C_ListView_TextDisablePen "TextDisablePen" - #define C_ListView_HoverPen "HoverPen" - #define C_ListView_SelectPen "SelectPen" - #define C_ListView_FocusPen "FocusPen" -@@ -225,6 +228,7 @@ - #define C_TreeView_BranchDisableBrush "BranchDisableBrush" - #define C_TreeView_TextHoverPen "TextHoverPen" - #define C_TreeView_TextSelectPen "TextSelectPen" -+#define C_TreeView_TextDisablePen "TextDisablePen" - #define C_TreeView_HoverPen "HoverPen" - #define C_TreeView_SelectPen "SelectPen" - #define C_TreeView_FocusPen "FocusPen" -@@ -531,8 +535,9 @@ typedef struct ButtonColorStruct - QColor disablePen = Qt::NoPen; - QColor focusPen = Qt::NoPen; - -- QColor textColor = QColor(38, 38, 38); -- QColor textHoverColor = QColor(38, 38, 38); -+ QColor textDefaultColor = QColor(38, 38, 38); -+ QColor textHoverColor = QColor(38, 38, 38); -+ QColor textDisableColor = QColor(38, 38, 38); - - QList<QColor> hoverGradientList; - QString hoverType = "color"; -@@ -554,8 +559,9 @@ typedef struct ToolButtonColorStruct - QColor disablePen = Qt::NoPen; - QColor focusPen = Qt::NoPen; - -- QColor textColor = Qt::NoPen; -- QColor textHoverColor = Qt::NoPen; -+ QColor textDefaultColor = QColor(38, 38, 38); -+ QColor textHoverColor = QColor(38, 38, 38); -+ QColor textDisableColor = QColor(38, 38, 38); - - }ToolButtonColorCfg; - -@@ -693,6 +699,7 @@ typedef struct TableColorStruct - QColor selectPen = QColor(0, 0, 0, 0 ); - QColor textHoverPen = QColor(38, 38, 38 ); - QColor textSelectPen = QColor(255, 255, 255 ); -+ QColor textDisablePen= QColor(179, 179, 179 ); - QColor focusPen = QColor(55, 144, 250 ); - QList<QColor> hoverGradientList; - QString hoverType = "color"; -@@ -706,6 +713,7 @@ typedef struct ListViewColorStruct - QColor disableBrush = QColor(255, 255, 255, 0 ); - QColor textHoverPen = QColor(38, 38, 38 ); - QColor textSelectPen = QColor(255, 255, 255 ); -+ QColor textDisablePen= QColor(179, 179, 179 ); - QColor hoverPen = QColor(0, 0, 0, 0 ); - QColor selectPen = QColor(0, 0, 0, 0 ); - QColor focusPen = QColor(55, 144, 250 ); -@@ -725,6 +733,7 @@ typedef struct TreeViewColorStruct - QColor branchDisableBrush = QColor(255, 255, 255, 0 ); - QColor textHoverPen = QColor(38, 38, 38 ); - QColor textSelectPen = QColor(255, 255, 255 ); -+ QColor textDisablePen = QColor(179, 179, 179 ); - QColor hoverPen = QColor(0, 0, 0, 0 ); - QColor selectPen = QColor(0, 0, 0, 0 ); - QColor branchhoverPen = QColor(0, 0, 0, 0 ); -@@ -798,6 +807,7 @@ typedef struct TabWidgetColorStruct - QColor tabBarHoverBrush = QColor(232, 232, 232); - QColor tabBarSelectBrush = QColor(255, 255, 255); - QColor tabBarClickBrush = QColor(255, 255, 255); -+ QColor tabBarDefaultPen = QColor(0, 0, 0, 0); - QColor tabBarHoverPen = QColor(0, 0, 0, 0); - QColor tabBarClickPen = QColor(0, 0, 0, 0); - QColor tabBarFocusPen = QColor(55, 144, 250); diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0026-Update-changelog-4.1.0.0-0k27.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0026-Update-changelog-4.1.0.0-0k27.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0026-Update-changelog-4.1.0.0-0k27.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0026-Update-changelog-4.1.0.0-0k27.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,1156 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Thu, 25 Jan 2024 15:46:14 +0800 -Subject: Update changelog 4.1.0.0-0k27 - ---- - qt5-ukui-filedialog/menutoolbutoon.cpp | 1 - - qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp | 6 +- - ukui-styles/blur-helper.cpp | 4 +- - ukui-styles/platformthemedebug.h | 102 +++++++++ - .../qt5-config-style-ukui/config-view-helper.cpp | 2 +- - .../ukui-config-style-parameters.cpp | 59 +++-- - .../qt5-config-style-ukui/ukui-config-style.cpp | 251 +++++++++------------ - .../qt5-config-style-ukui/ukui-config-style.h | 12 +- - ukui-styles/readconfig.cpp | 1 + - ukui-styles/readconfig.h | 50 ---- - ukui-styles/ukui-style-plugin.cpp | 2 - - 11 files changed, 263 insertions(+), 227 deletions(-) - create mode 100644 ukui-styles/platformthemedebug.h - -diff --git a/qt5-ukui-filedialog/menutoolbutoon.cpp b/qt5-ukui-filedialog/menutoolbutoon.cpp -index 9493854..8c51857 100644 ---- a/qt5-ukui-filedialog/menutoolbutoon.cpp -+++ b/qt5-ukui-filedialog/menutoolbutoon.cpp -@@ -40,7 +40,6 @@ MenuToolButton::MenuToolButton(QWidget *parent) : QToolButton(parent) - - void MenuToolButton::tableModeChanged(bool isTableMode) - { -- qDebug() << "tableModeChanged......" << isTableMode; - setStyle(ToolButtonStyle::getStyle()); - } - -diff --git a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -index 5f4e69a..fda7688 100644 ---- a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -+++ b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -@@ -175,7 +175,7 @@ Qt5UKUIPlatformTheme::Qt5UKUIPlatformTheme(const QStringList &args) - // if (QFile::exists(QString("%1/kf5/kirigami/org.kylin.style.so").arg(QT_PLUGIN_INSTALL_DIRS))) { - // QQuickStyle::setStyle("org.kylin.style"); - // } -- if(qApp->inherits("QApplication") == true) { -+ if(qApp->inherits("QApplication") == true && qAppName() != "cura") { - QQuickStyle::setStyle("org.ukui.style"); - } - } -@@ -211,6 +211,9 @@ const QFont *Qt5UKUIPlatformTheme::font(Font type) const - - QVariant Qt5UKUIPlatformTheme::themeHint(ThemeHint hint) const - { -+ if(qAppName() == "cura") -+ return QPlatformTheme::themeHint(hint); -+ - switch (hint) { - case QPlatformTheme::StyleNames:{ - // qDebug() << "Qt5UKUIPlatformTheme...."; -@@ -305,7 +308,6 @@ QPlatformDialogHelper *Qt5UKUIPlatformTheme::createPlatformDialogHelper(DialogTy - QObject* plugin = nullptr; - const char* c = UKUIPLATFORMTHEME_DIR; - QString path = QString::fromUtf8(c); -- qDebug() << "UKUIPLATFORMTHEME_DIR..." << path; - - //QString path = UKUIPLATFORMTHEME_DIR; - if (QFile::exists(QString("%1/platformthemes/libqt5-ukui-filedialog.so").arg(path))) { -diff --git a/ukui-styles/blur-helper.cpp b/ukui-styles/blur-helper.cpp -index 0c3a0cf..6e4249a 100644 ---- a/ukui-styles/blur-helper.cpp -+++ b/ukui-styles/blur-helper.cpp -@@ -197,10 +197,10 @@ bool BlurHelper::shouldSkip(QWidget *w) - } - - bool skip = true; -- if (w->inherits("QComboBoxPrivateContainer")) -+ if (w && w->inherits("QComboBoxPrivateContainer")) - return true; - -- if (w->inherits("QMenu") || w->inherits("QTipLabel")) { -+ if (w && w->inherits("QMenu") || w->inherits("QTipLabel")) { - return false; - } - -diff --git a/ukui-styles/platformthemedebug.h b/ukui-styles/platformthemedebug.h -new file mode 100644 -index 0000000..d570849 ---- /dev/null -+++ b/ukui-styles/platformthemedebug.h -@@ -0,0 +1,102 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: Jing Tan <tanjing@kylinos.cn> -+ * -+ */ -+ -+#ifndef PLATFORMTHEMEDEBUG_H -+#define PLATFORMTHEMEDEBUG_H -+ -+#include <QDebug> -+ -+ -+//#define UKUIStyle_Debug -+//#define AnimationSlider_Debug -+//#define AnimationScrollbar_Debug -+ -+//#define UKUIStyle_Warning -+ -+class Debug -+ -+{ -+ -+public: -+ -+template<typename T> -+ -+Debug & operator <<(const T&){return *this;} -+ -+}; -+inline Debug debug(){return Debug();} -+ -+ -+#ifdef UKUIStyle_Debug -+ -+# define cDebug qDebug() << "UKUIStyle input:" -+ -+#else -+ -+# define cDebug Debug() -+ -+#endif -+ -+#ifdef AnimationSlider_Debug -+ -+# define aSliderDebug qDebug() << "UKUIStyle input:" -+ -+#else -+ -+# define aSliderDebug Debug() -+ -+#endif -+ -+#ifdef AnimationScrollbar_Debug -+ -+# define aScrollBarDebug qDebug() << "UKUIStyle input:" -+ -+#else -+ -+# define aScrollBarDebug Debug() -+ -+#endif -+ -+class Warning -+ -+{ -+ -+public: -+ -+template<typename T> -+ -+Warning & operator <<(const T&){return *this;} -+ -+}; -+inline Warning warning(){return Warning();} -+ -+#ifdef UKUIStyle_Warning -+ -+# define cWarning qWarning() << "UKUIStyle input:" -+ -+#else -+ -+# define cWarning Warning() -+ -+#endif -+ -+#endif // PLATFORMTHEMEDEBUG_H -diff --git a/ukui-styles/qt5-config-style-ukui/config-view-helper.cpp b/ukui-styles/qt5-config-style-ukui/config-view-helper.cpp -index e94d01e..87e5a2a 100644 ---- a/ukui-styles/qt5-config-style-ukui/config-view-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/config-view-helper.cpp -@@ -143,7 +143,7 @@ void UKUIConfigStyle::viewItemDrawText(QPainter *painter, const QStyleOptionView - QTextOption textOption; - textOption.setWrapMode(wrapText ? QTextOption::WordWrap : QTextOption::ManualWrap); - //FIX ME,bug106749::QTablewidget text cannot be aligned, forced changed it wrap mode to wrapanywhere -- if(wrapText && (widget->inherits("QTableWidget") || widget->inherits("QTableView"))) -+ if(wrapText && widget && (widget->inherits("QTableWidget") || widget->inherits("QTableView"))) - { - textOption.setWrapMode(QTextOption::WrapAnywhere); - } -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index 6852cd4..d8eb5c4 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -39,6 +39,7 @@ - #include "settings/ukui-style-settings.h" - #include "ukui-config-style-parameters.h" - #include "settings/black-list.h" -+#include "../platformthemedebug.h" - - extern QColor configMixColor(const QColor &c1, const QColor &c2, qreal bias); - extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); -@@ -851,15 +852,23 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - } - } - -- checkPen = hoverPen; -- checkHoverPen = hoverPen; -- checkClickPen = clickPen; -- checkDisablePen = disablePen; -+ auto checkableColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -+ { -+ checkPen = QPen(QBrush(checkableColorCfg.defaultPen), (checkableColorCfg.defaultPen == Qt::NoPen || checkableColorCfg.defaultPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ checkHoverPen = QPen(QBrush(checkableColorCfg.hoverPen), (checkableColorCfg.hoverPen == Qt::NoPen || checkableColorCfg.hoverPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ checkClickPen = QPen(QBrush(checkableColorCfg.clickPen), (checkableColorCfg.clickPen == Qt::NoPen || checkableColorCfg.clickPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ checkDisablePen = QPen(QBrush(checkableColorCfg.disablePen), (checkableColorCfg.disablePen == Qt::NoPen || checkableColorCfg.disablePen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ -+ checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -+ checkHoverBrush = checkableColorCfg.hoverBrush; -+ checkClickBrush = checkableColorCfg.clickBrush; -+ checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); -+ } - -- checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -- checkHoverBrush = hoverBrush; -- checkClickBrush = clickBrush; -- checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); - - auto *w = const_cast<QWidget *>(widget); - -@@ -1009,6 +1018,10 @@ void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, - if (isImportant) - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); - -+ if(option->state & QStyle::State_On && option->state & QStyle::State_Enabled){ -+ buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -+ } -+ - QColor textDefaultColor = buttonColorCfg.textDefaultColor; - QColor textHoverColor = buttonColorCfg.textHoverColor; - QColor textDisableColor = buttonColorCfg.textDisableColor; -@@ -1253,15 +1266,23 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - } - } - -- checkPen = defaultPen; -- checkHoverPen = hoverPen; -- checkClickPen = clickPen; -- checkDisablePen = disablePen; -+ auto checkableColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); - -- checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -- checkHoverBrush = hoverBrush; -- checkClickBrush = clickBrush; -- checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); -+ { -+ checkPen = QPen(QBrush(checkableColorCfg.defaultPen), (checkableColorCfg.defaultPen == Qt::NoPen || checkableColorCfg.defaultPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ checkHoverPen = QPen(QBrush(checkableColorCfg.hoverPen), (checkableColorCfg.hoverPen == Qt::NoPen || checkableColorCfg.hoverPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ checkClickPen = QPen(QBrush(checkableColorCfg.clickPen), (checkableColorCfg.clickPen == Qt::NoPen || checkableColorCfg.clickPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ checkDisablePen = QPen(QBrush(checkableColorCfg.disablePen), (checkableColorCfg.disablePen == Qt::NoPen || checkableColorCfg.disablePen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ -+ checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -+ checkHoverBrush = checkableColorCfg.hoverBrush; -+ checkClickBrush = checkableColorCfg.clickBrush; -+ checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); -+ } - - auto *w = const_cast<QWidget *>(widget); - if (w) { -@@ -1410,6 +1431,10 @@ void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, - if (isImportant) - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); - -+ if(option->state & QStyle::State_On | QStyle::State_Enabled){ -+ buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); -+ } -+ - QColor textDefaultColor = buttonColorCfg.textDefaultColor; - QColor textHoverColor = buttonColorCfg.textHoverColor; - QColor textDisableColor = buttonColorCfg.textDisableColor; -@@ -3632,7 +3657,7 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - } - - auto color = menuColorCfg.menuBackgroundBrush; -- if (!widget->inherits("QComboBoxPrivateContainer") && UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -+ if (widget && !widget->inherits("QComboBoxPrivateContainer") && UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { - auto opacity = UKUIStyleSettings::globalInstance()->get("menuTransparency").toInt()/100.0; - color.setAlphaF(opacity); - } -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 431cbd2..26f8505 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -52,6 +52,7 @@ - #include "../blur-helper.h" - #include "../gesture-helper.h" - #include "../window-manager.h" -+#include "../platformthemedebug.h" - #include "settings/application-style-settings.h" - #include "settings/ukui-style-settings.h" - #include "effects/highlight-effect.h" -@@ -319,10 +320,10 @@ bool UKUIConfigStyle::shouldBeTransparent(const QWidget *w) const - { - bool should = false; - -- if (w->inherits("QComboBoxPrivateContainer")) -+ if (w && w->inherits("QComboBoxPrivateContainer")) - return true; - -- if (w->inherits("QTipLabel")) { -+ if (w && w->inherits("QTipLabel")) { - return true; - } - -@@ -383,13 +384,10 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - - if((e->type() ==QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) && (proxy()->styleHint(QStyle::SH_Slider_AbsoluteSetButtons) == mousePressEvent->button() || - proxy()->styleHint(QStyle::SH_Slider_PageSetButtons) == mousePressEvent->button())){ --// qDebug() << "e->type:" << e->type() << mousePressEvent->button(); -+ aSliderDebug << "e->type:" << e->type() << mousePressEvent->button(); - if(obj->property("animation").isValid() && !obj->property("animation").toBool()) - return false; - --// if(!sp->m_SliderParameters.animation) --// return false; -- - auto *slider = qobject_cast<QSlider *>(obj); - if(slider == nullptr || !slider->isEnabled()) - return false; -@@ -400,19 +398,10 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - - const bool horizontal = slider->orientation() == Qt::Horizontal; - --// qDebug() << "MouseButtonPress............"; --// if(mousePressEvent->button() != Qt::LeftButton) --// return false; --// if(mousePressEvent) --// qDebug() << "mousepressevent....." << mousePressEvent->pos() << mousePressEvent->localPos() << slider->geometry(); -- --// QStyleOptionSlider *opt = new QStyleOptionSlider(); --// opt->init(slider); --// qDebug() << "pppppppp;;;;;;;;;:" << subControlRect(CC_Slider, opt, SC_SliderHandle, slider); -- -- QRect handleRect = sliderHandleRec(); -+ aSliderDebug << "MouseButtonPress............"; -+ QRect handleRect = sliderHandleRec(slider); - if(horizontal){ --// qDebug() << "mousepressevent1111 pos...." << mousePressEvent->pos().x() << handleRect.x(); -+ aSliderDebug << "mousepressevent1111 pos...." << mousePressEvent->pos().x() << handleRect.x(); - - if(mousePressEvent->pos().x() <= handleRect.x()){ - animator->setExtraProperty("addValue", false); -@@ -425,7 +414,7 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - return false; - } - else{ --// qDebug() << "mousepressevent1111 pos...." << mousePressEvent->pos().y() << handleRect.y(); -+ aSliderDebug << "mousepressevent1111 pos...." << mousePressEvent->pos().y() << handleRect.y(); - if(mousePressEvent->pos().y() <= handleRect.y()){ - animator->setExtraProperty("addValue", true); - -@@ -442,9 +431,9 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - if(startPosition <= slider->maximum() && startPosition >= slider->minimum()){ - if(animator->value("move_position") != 1.0){ - if(animator->getExtraProperty("addValue").isValid()){ --// qDebug() << "pagestep..." << slider->pageStep() << animator->getExtraProperty("addValue").toBool(); -+ aSliderDebug << "pagestep..." << slider->pageStep() << animator->getExtraProperty("addValue").toBool(); - int step = (animator->getExtraProperty("addValue").toBool() ? 1 : -1) * slider->pageStep(); --// qDebug() << "step............" << step; -+ aSliderDebug << "step............" << step; - bool absoluteButton = proxy()->styleHint(QStyle::SH_Slider_AbsoluteSetButtons) == mousePressEvent->button(); - if(absoluteButton) - { -@@ -462,37 +451,37 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - sliderMin = gr.x(); - sliderMax = gr.right() - sliderLength + 1; - pos = (mousePressEvent->pos() - center).x(); --// qDebug() << "Horizontal pos....:" << mousePressEvent->pos() << center << pos; -+ aSliderDebug << "Horizontal pos....:" << mousePressEvent->pos() << center << pos; - } else { - sliderLength = sr.height(); - sliderMin = gr.y(); - sliderMax = gr.bottom() - sliderLength + 1; - pos = (mousePressEvent->pos() - center).y(); --// qDebug() << "vertical pos....:" << mousePressEvent->pos() << center << pos; -+ aSliderDebug << "vertical pos....:" << mousePressEvent->pos() << center << pos; - } --// qDebug() << "minumum..." << slider->minimum() << slider->maximum() << sliderMin << sliderMax << pos << opt->upsideDown; -+ aSliderDebug << "minumum..." << slider->minimum() << slider->maximum() << sliderMin << sliderMax << pos << opt->upsideDown; - bool upsideDown = (slider->orientation() == Qt::Horizontal) ? - (slider->invertedAppearance() != (slider->layoutDirection() == Qt::RightToLeft)) - : (!slider->invertedAppearance()); - int sliderValue = sliderValueFromPosition(slider->minimum(), slider->maximum(), pos - sliderMin, sliderMax - sliderMin, upsideDown);//opt->upsideDown); --// qDebug() << "sliderValue....." << sliderValue << slider->value(); -+ aSliderDebug << "sliderValue....." << sliderValue << slider->value(); - step = sliderValue - slider->value(); --// qDebug() << "step0000...." << step; --// qDebug() << "addValue........." << animator->getExtraProperty("addValue"); -+ aSliderDebug << "step0000...." << step; -+ aSliderDebug << "addValue........." << animator->getExtraProperty("addValue"); - } - animator->startAnimator("move_position"); - - int endPos = (startPosition + step) - (absoluteButton ? 0 : (startPosition + step)%step); --// qDebug() << "endPos0000....." << endPos; -+ aSliderDebug << "endPos0000....." << endPos; - if(!animator->getExtraProperty("addValue").toBool()) - endPos = (startPosition + step) + (absoluteButton ? 0 : (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0)); --// qDebug() << "endPos1111....." << endPos; -+ aSliderDebug << "endPos1111....." << endPos; - - if(animator->getExtraProperty("addValue").toBool()) - endPos = qMin(endPos, slider->maximum()); - else - endPos = qMax(endPos, slider->minimum()); --// qDebug() << "endPos....." << endPos; -+ aSliderDebug << "endPos....." << endPos; - animator->setExtraProperty("end_position", endPos); - animator->setExtraProperty("start_position", startPosition); - -@@ -518,7 +507,6 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - bool midButtonAbsPos = proxy()->styleHint(QStyle::SH_ScrollBar_MiddleClickAbsolutePosition, 0, scrollbar); - // if(mousePressEvent->button() != Qt::LeftButton) - // return false; --// qDebug() << "e->type......" << e->type(); - if ((e->type() != QEvent::MouseButtonPress && e->type() != QEvent::MouseButtonDblClick) - || (!(mousePressEvent->button() == Qt::LeftButton || (midButtonAbsPos && mousePressEvent->button() == Qt::MidButton)))) - return false; -@@ -529,26 +517,26 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - auto animator = m_scrollbar_animation_helper->animator(scrollbar); - if(!animator) - return false; --// qDebug() << "event..." << e->type() << mousePressEvent->button(); -+ aScrollBarDebug << "event..." << e->type() << mousePressEvent->button(); - const bool horizontal = scrollbar->orientation() == Qt::Horizontal; - -+ QRect handleRect = scrollbarSliderRec(scrollbar); -+ - if(horizontal){ -- if(mousePressEvent->pos().x() <= scrollbarSliderRec().x()){ -+ if(mousePressEvent->pos().x() <= handleRect.x()){ - animator->setExtraProperty("addValue", /*scrollbar->layoutDirection() == Qt::RightToLeft ? true :*/ false); -- - } -- else if(mousePressEvent->pos().x() >= scrollbarSliderRec().x() + scrollbarSliderRec().width()){ -+ else if(mousePressEvent->pos().x() >= handleRect.x() + handleRect.width()){ - animator->setExtraProperty("addValue", /*scrollbar->layoutDirection() == Qt::RightToLeft ? false :*/ true); - } - else - return false; - } - else{ -- if(mousePressEvent->pos().y() <= scrollbarSliderRec().y()){ -+ if(mousePressEvent->pos().y() <= handleRect.y()){ - animator->setExtraProperty("addValue", false); -- - } -- else if(mousePressEvent->pos().y() >= scrollbarSliderRec().y() + scrollbarSliderRec().height()){ -+ else if(mousePressEvent->pos().y() >= handleRect.y() + handleRect.height()){ - animator->setExtraProperty("addValue", true); - } - else -@@ -556,28 +544,26 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - } - - if(!animator->isRunning("move_position")){ -- int startPosition = scrollbar->value();//scrollbar->sliderPosition();//sliderPositionFromValue(bar->minimum, bar->maximum, scrollBar->value(), maxlen - sliderlen, bar->upsideDown); --// qDebug() << "startPosition......." << startPosition << scrollbar->value(); -+ int startPosition = scrollbar->value(); -+ aScrollBarDebug << "startPosition......." << startPosition << scrollbar->value(); - if(startPosition <= scrollbar->maximum() && startPosition >= scrollbar->minimum()){ --// qDebug() << "CC_ScrollBar............" << animator->isRunning("move_position") << animator->currentAnimatorTime("move_position"); -+ aScrollBarDebug << "CC_ScrollBar............" << animator->isRunning("move_position") << animator->currentAnimatorTime("move_position"); - if(animator->value("move_position") != 1.0){ - if(animator->getExtraProperty("addValue").isValid()){ --// qDebug() << "pagestep..." << scrollbar->pageStep() << animator->getExtraProperty("addValue").toBool(); -+ aScrollBarDebug << "pagestep..." << scrollbar->pageStep() << animator->getExtraProperty("addValue").toBool(); - int step = (animator->getExtraProperty("addValue").toBool() ? 1 : -1) * scrollbar->pageStep(); --// qDebug() << "step............" << step << animator->getExtraProperty("addValue").toBool(); -+ aScrollBarDebug << "step............" << step << animator->getExtraProperty("addValue").toBool(); - - QStyleOptionSlider *opt = new QStyleOptionSlider(); - opt->init(scrollbar); - --// qDebug() << "scrollbar。。。。。。" << scrollbar; --// qDebug() << "11111111" << scrollbar->property("ScrollBarSliderRect").isValid(); -+ aScrollBarDebug << "11111111" << scrollbar->property("ScrollBarSliderRect").isValid(); - - QRect sr = scrollbar->property("ScrollBarSliderRect").isValid() ? - scrollbar->property("ScrollBarSliderRect").value<QRect>() : - QRect(); - --// qDebug() << "sr......." << sr; --// qDebug() << "12333333" << scrollbar->property("ScrollBarGrooveRect").isValid(); -+ aScrollBarDebug << "12333333" << scrollbar->property("ScrollBarGrooveRect").isValid(); - QRect gr = scrollbar->property("ScrollBarGrooveRect").isValid() ? - scrollbar->property("ScrollBarGrooveRect").value<QRect>() : - QRect(); -@@ -592,7 +578,7 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - sliderLength = sr.width(); - sliderMin = gr.x(); - sliderMax = gr.right() - sliderLength + 1; --// qDebug() << "sliderLength....." << sliderLength << gr << gr.right(); -+ aScrollBarDebug << "sliderLength....." << sliderLength << gr << gr.right(); - pos = mousePressEvent->pos().x() - sliderLength / 2; - if (scrollbar->layoutDirection() == Qt::RightToLeft) - opt->upsideDown = !opt->upsideDown; -@@ -605,31 +591,29 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - } - - bool upsideDown = scrollbar->invertedAppearance(); --// if(scrollbar->layoutDirection() == Qt::RightToLeft && scrollbar->orientation() == Qt::Horizontal) --// upsideDown = !upsideDown; --// qDebug() << "minimum..." << scrollbar->minimum() << scrollbar->maximum() << pos << sliderMin << sliderMax; -+ aScrollBarDebug << "minimum..." << scrollbar->minimum() << scrollbar->maximum() << pos << sliderMin << sliderMax; - int scrollValue = sliderValueFromPosition(scrollbar->minimum(), scrollbar->maximum(), pos - sliderMin, - sliderMax - sliderMin, upsideDown);//opt->upsideDown); --// qDebug() << "scrollValue....." << scrollValue << scrollbar->value(); -+ aScrollBarDebug << "scrollValue....." << scrollValue << scrollbar->value(); - step = scrollValue - scrollbar->value(); --// qDebug() << "step0000...." << step; --// qDebug() << "addValue........." << animator->getExtraProperty("addValue"); -+ aScrollBarDebug << "step0000...." << step; -+ aScrollBarDebug << "addValue........." << animator->getExtraProperty("addValue"); - - } - animator->startAnimator("move_position"); - - int endPos = (startPosition + step) - (absoluteButton ? 0 : (startPosition + step)%step); --// qDebug() << "endPos000....." << startPosition << step << endPos; -+ aScrollBarDebug << "endPos000....." << startPosition << step << endPos; - - if(!animator->getExtraProperty("addValue").toBool()) - endPos = (startPosition + step) + (absoluteButton ? 0 : (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0)); --// qDebug() << "endPos1111....." << endPos; -+ aScrollBarDebug << "endPos1111....." << endPos; - - if(animator->getExtraProperty("addValue").toBool()) - endPos = qMin(endPos, scrollbar->maximum()); - else - endPos = qMax(endPos, scrollbar->minimum()); --// qDebug() << "endPos....." << endPos; -+ aScrollBarDebug << "endPos....." << endPos; - animator->setExtraProperty("end_position", endPos); - animator->setExtraProperty("start_position", startPosition); - -@@ -909,26 +893,44 @@ void UKUIConfigStyle::updateTabletModeValue(bool isTabletMode) - } - } - --QRect UKUIConfigStyle::scrollbarSliderRec() -+QRect UKUIConfigStyle::scrollbarSliderRec(QWidget *w) - { -- return m_scrollBarSliderRec; -+ if(w && m_scrollBarSliderRec.contains(w)) -+ return m_scrollBarSliderRec.value(w); -+ return QRect(); - } - --void UKUIConfigStyle::setScrollbarSliderRec(QRect rect) const -+void UKUIConfigStyle::setScrollbarSliderRec(QWidget *w, QRect rect) const - { -- if(m_scrollBarSliderRec != rect) -- m_scrollBarSliderRec = rect; -+ if(w){ -+ if(m_scrollBarSliderRec.contains(w)){ -+ QRect r = m_scrollBarSliderRec.value(w); -+ if(r != rect) -+ m_scrollBarSliderRec.insert(w, rect); -+ return; -+ } -+ m_scrollBarSliderRec.insert(w, rect); -+ } - } - --QRect UKUIConfigStyle::sliderHandleRec() -+QRect UKUIConfigStyle::sliderHandleRec(QWidget *w) - { -- return m_sliderHandleRec; -+ if(w && m_sliderHandleRec.contains(w)) -+ return m_sliderHandleRec.value(w); -+ return QRect(); - } - --void UKUIConfigStyle::setSliderHandleRec(QRect rect) const -+void UKUIConfigStyle::setSliderHandleRec(QWidget *w, QRect rect) const - { -- if(m_sliderHandleRec != rect) -- m_sliderHandleRec = rect; -+ if(w){ -+ if(m_sliderHandleRec.contains(w)){ -+ QRect r = m_sliderHandleRec.value(w); -+ if(r != rect) -+ m_sliderHandleRec.insert(w, rect); -+ return; -+ } -+ m_sliderHandleRec.insert(w, rect); -+ } - } - - -@@ -945,7 +947,7 @@ void UKUIConfigStyle::polish(QWidget *widget) - } - } - -- if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget->inherits("QMenu"))) { -+ if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget && widget->inherits("QMenu"))) { - if (widget && widget->testAttribute(Qt::WA_TranslucentBackground) && widget->isTopLevel()) { - //FIXME: - #if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) -@@ -1029,11 +1031,6 @@ void UKUIConfigStyle::polish(QWidget *widget) - - if(qobject_cast<QSlider*>(widget)){ - m_slider_animation_helper->registerWidget(widget); --// auto slider = qobject_cast<QSlider*>(widget); --// connect(slider, &QSlider::valueChanged, this, [=](int value){ --// slide --// qDebug() << "slider valueChanged:" << value; --// }); - } - /*! - \todo QDateTimeEdit widget affected with calendarPopup() draw QComboBox style or QSpinBox style. -@@ -1125,7 +1122,6 @@ void UKUIConfigStyle::polish(QWidget *widget) - if(widget != nullptr && widget->inherits("QListView")) - { - auto listview = qobject_cast<QListView *>(widget); --// qDebug() << "listview is null0000: " << (listview == nullptr); - if(listview != nullptr) - { - connect(listview->selectionModel(), &QItemSelectionModel::selectionChanged, [listview](const QItemSelection &selected, const QItemSelection &deselected){ -@@ -1153,8 +1149,6 @@ void UKUIConfigStyle::polish(QWidget *widget) - if(!animator) - return; - -- //qDebug() <<"expanded index:" << index.internalId(); -- - animator->setExtraProperty("expandItem", QString::number(index.internalId())); - - if(animator->isRunning("collaps")){ -@@ -1173,8 +1167,6 @@ void UKUIConfigStyle::polish(QWidget *widget) - if(!animator) - return; - -- qDebug() <<"collapsed index:" << index.internalId(); -- - animator->setExtraProperty("collapsItem", QString::number(index.internalId())); - - if(animator->isRunning("expand")){ -@@ -1204,7 +1196,7 @@ void UKUIConfigStyle::unpolish(QWidget *widget) - qWarning() << "Can't resolve unregisterWidget from" << GESTURE_LIB << gestureLib.errorString(); - } - } -- if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget->inherits("QMenu"))) { -+ if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget && widget->inherits("QMenu"))) { - if (widget->testAttribute(Qt::WA_TranslucentBackground) && widget->isTopLevel()) { - #if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) - m_blur_helper->unregisterWidget(widget); -@@ -1435,15 +1427,9 @@ QPixmap UKUIConfigStyle::testGeneratedSVGPixmap(QPixmap pixmap) const - QColor c(pixel); - int h, s, l, a; - c.getHsl(&h, &s, &l, &a); -- qDebug() << "cccccccc0:" << h << s << l << a; -- if(x ==0 && y ==0) -- qDebug() << "000000000" << c.red() << c.green() << c.blue() << c.alpha(); - s += a > 0 ? 82 : 0; - l += a > 0 ? 78 : 0; - c.setHsl(h, s, l, a); -- if(x ==0 && y ==0) -- qDebug() << "000000000" << c.red() << c.green() << c.blue() << c.alpha(); -- qDebug() << "cccccccc1:" << h << s << l << a; - - *scanLine = c.rgba();//qRgba(c.red(), c.green(), c.blue(), c.alpha()); - ++scanLine; -@@ -1601,14 +1587,13 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonDefaultPen); - painter->setBrush(sp->m_PushButtonParameters.pushButtonDefaultBrush); - } -- -- //focus -- if (focus) { -- width = sp->m_PushButtonParameters.pushButtonFocusPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonFocusPen); -- } - } - } -+ //focus -+ if (focus) { -+ width = sp->m_PushButtonParameters.pushButtonFocusPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonFocusPen); -+ } - } - - painter->setRenderHint(QPainter::Antialiasing, sp->m_PushButtonParameters.radius != 0); -@@ -1909,14 +1894,13 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - painter->setPen(width <= 0 ? Qt::NoPen : sp->m_ToolButtonParameters.toolButtonDefaultPen); - painter->setBrush(sp->m_ToolButtonParameters.toolButtonDefaultBrush); - } -- -- //focus -- if (focus) { -- width = sp->m_ToolButtonParameters.toolButtonFocusPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : sp->m_ToolButtonParameters.toolButtonFocusPen); -- } - } - } -+ //focus -+ if (focus) { -+ width = sp->m_ToolButtonParameters.toolButtonFocusPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_ToolButtonParameters.toolButtonFocusPen); -+ } - } - - painter->setRenderHint(QPainter::Antialiasing, sp->m_ToolButtonParameters.radius != 0); -@@ -2320,7 +2304,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - QPixmap pixmap = icon.pixmap(iconsize, mode, QIcon::Off); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); - QPixmap target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -- if(!sp->indicatorIconHoverNeedHighLight && !widget->inherits("QMenu")) -+ if(!sp->indicatorIconHoverNeedHighLight && widget && !widget->inherits("QMenu")) - target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -@@ -2364,7 +2348,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - QPixmap pixmap = icon.pixmap(iconsize, mode, QIcon::Off); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); - QPixmap target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -- if(!sp->indicatorIconHoverNeedHighLight && !widget->inherits("QMenu")) -+ if(!sp->indicatorIconHoverNeedHighLight && widget && !widget->inherits("QMenu")) - target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -@@ -2412,7 +2396,6 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - frameColor.blue() + value * (onDefaultPenColor.blue() - frameColor.blue()), - frameColor.alpha() + value * (onDefaultPenColor.alpha() - frameColor.alpha()))); - QColor penColor = frameBrush.color(); --// qDebug()<<"onDefaultPenColor......." << onDefaultPenColor.red() << onDefaultPenColor.green() << onDefaultPenColor.blue() << onDefaultPenColor.alphaF(); - penColor.setAlphaF(onDefaultPenColor.alphaF()); - painter->setPen(QPen(QBrush(penColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); - -@@ -2433,7 +2416,6 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - else if (enable && hasAnimation && - animator != nullptr && animator->isRunning("Off")) { - float value = animator->value("Off").toFloat(); --// qDebug() << "off SunKenOn value......" << qobject_cast<const QRadioButton *>(widget)->text() << value; - QPen pen = sp->m_RadioButtonParameters.radioButtonDefaultPen; - pen.color().setAlphaF(sp->m_RadioButtonParameters.radioButtonDefaultPen.color().alphaF() * (1.0 - value)); - painter->setPen(pen); -@@ -2460,11 +2442,9 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - if (on) { - if (animator != nullptr) { - if (hasAnimation && !animator->isRunning("SunKenOn") ) { -- // qDebug() << "SunKenOn time....:" << qobject_cast<const QRadioButton *>(widget)->text() << animator->currentAnimatorTime("SunKenOn"); - if(animator->currentAnimatorTime("SunKenOn") == 0){ - animator->startAnimator("SunKenOn"); - animator->setAnimatorCurrentTime("Off", 0); --// qDebug() << "startAnimator SunKenOn......" << qobject_cast<const QRadioButton *>(widget)->text() << animator->currentAnimatorTime("Off"); - painter->setPen(sp->m_RadioButtonParameters.radioButtonDefaultPen); - painter->setBrush(sp->m_RadioButtonParameters.radioButtonDefaultBrush); - painter->drawEllipse(rect); -@@ -2564,7 +2544,6 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - if(animator->isRunning("OnBase")) - { - float value = animator->value("OnBase").toFloat(); --// qDebug() << "onBase.....value:" << value; - margin = sp->m_CheckBoxParameters.checkBoxDefaultPen.width(); - - QColor onDefaultColor = mouseOver ? (!sp->m_CheckBoxParameters.onHoverBrushIslinearGradient ? -@@ -2612,7 +2591,6 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - { - float value = animator->value("OnOpacity").toFloat(); - --// qDebug() << "OnOpacity.....value00000:" << value; - if (on) { - QBrush brush = sp->m_CheckBoxParameters.checkBoxContentPen.brush(); - QColor color = brush.color(); -@@ -2638,7 +2616,6 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - - if (hasAnimation && animator != nullptr && animator->isRunning("OnScale")) { - float value = animator->value("OnScale").toFloat(); --// qDebug() << "OnScale.....value:" << value; - if (on) { - path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.top() + heigth / 2); - path.lineTo(pathrect.left() + width * 0.45, pathrect.bottom() - heigth / 3 - (1.0 - value) * heigth /8); -@@ -2673,7 +2650,6 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - - if (hasAnimation && animator != nullptr && animator->isRunning("Off")) { - float value = animator->value("Off").toFloat(); --// qDebug() << "Off.....value:" << value; - - margin = sp->m_CheckBoxParameters.checkBoxDefaultPen.width(); - QPen pen = mouseOver ? sp->m_CheckBoxParameters.checkBoxHoverPen : sp->m_CheckBoxParameters.checkBoxDefaultPen; -@@ -2687,7 +2663,6 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - defaultColor.green() + value * (onDefaultColor.green() - defaultColor.green()), - defaultColor.blue() + value * (onDefaultColor.blue() - defaultColor.blue()), - defaultColor.alpha() + value * (onDefaultColor.alpha() - defaultColor.alpha()))); -- // qDebug() << "sunkenon brush...." << brush.color().red() << brush.color().green() << brush.color().blue(); - painter->setBrush(brush); - if(painter->pen().width() == 1 && sp->m_CheckBoxParameters.radius != 0) - painter->translate(0.5, 0.5); -@@ -2695,9 +2670,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - painter->restore(); - painter->save(); - bool _nochange = animator->getExtraProperty("noChange").toBool(); --// qDebug() << "_nochange.........." << _nochange; - if (!_nochange) { --// qDebug() << "off ......on,,,,,,,,,,,"; - path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.top() + heigth / 2); - path.lineTo(pathrect.left() + width * 0.45, pathrect.bottom() - heigth / 3 - (1.0 - value) * heigth /8); - path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0, pathrect.top() + heigth / 3 + (1.0 - value) * heigth /6); -@@ -2709,7 +2682,6 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - painter->setPen(QPen(brush, 1.5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); - painter->setRenderHint(QPainter::Antialiasing, true); - } else if (_nochange) { --// qDebug() << "off ......noChange,,,,,,,,,,,"; - - path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.center().y()); - path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0 , pathrect.center().y()); -@@ -2746,9 +2718,6 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - painter->setPen(sp->m_CheckBoxParameters.checkBoxClickPen); - painter->setBrush(sp->m_CheckBoxParameters.checkBoxClickBrush); - --// qDebug() << "start onscale............"; --// painter->setPen(sp->m_CheckBoxParameters.checkBoxDefaultPen); --// painter->setBrush(Qt::yellow);//sp->m_CheckBoxParameters.checkBoxHoverPen); - if(painter->pen().width() == 1 && sp->m_CheckBoxParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), sp->m_CheckBoxParameters.radius, sp->m_CheckBoxParameters.radius); -@@ -3078,7 +3047,6 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - } - int currentIndex = vi->index.row(); - int allNum = listView->model()->rowCount(); -- // qDebug() << "index....." << currentIndex << allNum; - - bool begin = false; - bool end = false; -@@ -3089,15 +3057,12 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - onlyOne = true; - } - else{ -- -- // qDebug() << "all index11111...." << listView->model()->rowCount(); - QList<QModelIndex> selectList = listView->selectionModel()->selectedIndexes(); - QList<int> selectIndexList; - foreach (QModelIndex index, selectList) { - int i = index.row(); - selectIndexList.append(i); - } -- // qDebug() << "selectIndexList...." << selectIndexList; - if(selectIndexList.contains(currentIndex - 1) && selectIndexList.contains(currentIndex +1)) - mid = true; - else if(selectIndexList.contains(currentIndex - 1)) -@@ -3781,7 +3746,7 @@ void UKUIConfigStyle::drawComplexControl(QStyle::ComplexControl control, const Q - else - handle.setX((option->rect.width() - handle.width()) / 2); - handleOption.rect = handle; -- setSliderHandleRec(handleOption.rect); -+ setSliderHandleRec(const_cast<QWidget*>(widget), handleOption.rect); - - sp->initConfigSliderParameters(isUseDarkPalette(), &handleOption, widget); - -@@ -4506,7 +4471,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - drawRect = bar->rect; - } - -- setScrollbarSliderRec(QRect(drawRect.x(), drawRect.y(), drawRect.width(), drawRect.height())); -+ setScrollbarSliderRec(const_cast<QWidget*>(widget), QRect(drawRect.x(), drawRect.y(), drawRect.width(), drawRect.height())); - - //hover color animation - // animator->setAnimatorDirectionForward("slider_opacity", mouseOver); -@@ -5476,7 +5441,6 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - drawRect.adjust(MenuItem_HMargin, sp->ComboBox_VMargin, -MenuItem_HMargin, -1 * sp->ComboBox_VMargin); - } - -- //qDebug() << "focus........." << focus << menuItem->text; - if (enable && (selected | sunken)) { - painter->save(); - painter->setRenderHint(QPainter::Antialiasing); -@@ -6438,9 +6402,9 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - int sliderstart = lineLength + sliderPositionFromValue(bar->minimum, bar->maximum, - bar->sliderPosition,maxlen - sliderlen, bar->upsideDown) + distance / 2; - --// qDebug() << "sliderstart0000......" << sliderstart << lineLength << bar->sliderPosition; -+ aScrollBarDebug << "sliderstart0000......" << sliderstart << lineLength << bar->sliderPosition; - if (animator && hasAnimation) { --// qDebug() << "bar value..." << bar->sliderValue << bar->sliderPosition; -+ aScrollBarDebug << "bar value..." << bar->sliderValue << bar->sliderPosition; - if(animator->isRunning("move_position") || - (animator->getExtraProperty("start_position").toInt() != - animator->getExtraProperty("end_position").toInt() && -@@ -6453,7 +6417,7 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - int startValue = animator->getExtraProperty("start_position").toInt(); - int endValue = animator->getExtraProperty("end_position").toInt(); - int v = startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal(); --// qDebug() << "v...................." << v << startValue << endValue; -+ aScrollBarDebug << "v...................." << v << startValue << endValue; - if (v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)) { - sbar->setValue(v); - auto startPos = sliderPositionFromValue(bar->minimum, bar->maximum, startValue, -@@ -6461,9 +6425,9 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - auto endPos = sliderPositionFromValue(bar->minimum, bar->maximum, - endValue, maxlen - sliderlen, bar->upsideDown) + distance / 2; - --// qDebug() << "startpos....:" << startPos << "endpos...:" << endPos; -+ aScrollBarDebug << "startpos....:" << startPos << "endpos...:" << endPos; - sliderstart = lineLength + startPos + (endPos - startPos) * 1.0 * animator->value("move_position").toReal(); --// qDebug() << "sliderstart11111......" << sliderstart; -+ aScrollBarDebug << "sliderstart11111......" << sliderstart; - - } - } -@@ -6514,7 +6478,7 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - case SC_ScrollBarSlider: - { - if(!animator->isRunning("move_position") && animator->currentAnimatorTime("move_position") != 0){ --// qDebug() << "stop animator time........."; -+ aScrollBarDebug << "stop animator time........."; - animator->setAnimatorCurrentTime("move_position", 0); - animator->setExtraProperty("end_position", 0); - animator->setExtraProperty("start_position", 0); -@@ -6525,7 +6489,7 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - else - r = QRect(0, sliderstart, rect.width(), sliderlen); - QWidget *w = const_cast<QWidget *>(widget); --// qDebug() << "SC_ScrollBarSlider......" << w << r; -+ aScrollBarDebug << "SC_ScrollBarSlider......" << w << r; - w->setProperty("ScrollBarSliderRect", r); - return r; - } -@@ -6538,7 +6502,7 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - else - r = QRect(rect.x(), rect.y() + lineLength, rect.width(), rect.height() - 2 * lineLength); - QWidget *w = const_cast<QWidget *>(widget); --// qDebug() << "SC_ScrollBarGroove......" << w << r; -+ aScrollBarDebug << "SC_ScrollBarGroove......" << w << r; - w->setProperty("ScrollBarGrooveRect", r); - return r; - } -@@ -6575,7 +6539,7 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - - int sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum, slider->sliderValue, - proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); --// qDebug() << "sliderPos000........" << sliderPos; -+ aScrollBarDebug << "sliderPos000........" << sliderPos; - bool hasAnimation = widget && ((widget->property("animation").isValid() && widget->property("animation").toBool()) || - (!widget->property("animation").isValid())); - if (slider && animator && hasAnimation){ -@@ -6584,20 +6548,20 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - animator->getExtraProperty("end_position").toInt() && - slider->sliderValue != animator->getExtraProperty("end_position").toInt())) { - auto sliderBar = qobject_cast<const QAbstractSlider *>(widget); --// qDebug() << "value......." << subControl << slider->sliderValue << animator->getExtraProperty("start_position").toInt(); --// qDebug() << "isrunning............." << animator->isRunning("move_position"); --// qDebug() << "CC_Slider.....:" << animator->isRunning("move_position") << animator->value("move_position").toReal(); --// qDebug() << "value:.........." << animator->value("move_position").toReal(); -+ aScrollBarDebug << "value......." << subControl << slider->sliderValue << animator->getExtraProperty("start_position").toInt(); -+ aScrollBarDebug << "isrunning............." << animator->isRunning("move_position"); -+ aScrollBarDebug << "CC_Slider.....:" << animator->isRunning("move_position") << animator->value("move_position").toReal(); -+ aScrollBarDebug << "value:.........." << animator->value("move_position").toReal(); - - QAbstractSlider *sbar = const_cast<QAbstractSlider *>(sliderBar); - if (sbar) { - int startValue = animator->getExtraProperty("start_position").toInt(); - int endValue = animator->getExtraProperty("end_position").toInt(); --// qDebug() << "startvalue:" << startValue << "endvalue:" << endValue --// << animator->getExtraProperty("start_position").toInt() --// << animator->getExtraProperty("end_position").toInt(); -+ aScrollBarDebug << "startvalue:" << startValue << "endvalue:" << endValue -+ << animator->getExtraProperty("start_position").toInt() -+ << animator->getExtraProperty("end_position").toInt(); - int v = startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal(); --// qDebug() << "vvvvvvvvvvv" << v; -+ aScrollBarDebug << "vvvvvvvvvvv" << v; - if(v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)){ - sbar->setValue(startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal()); - -@@ -6606,9 +6570,9 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - auto endPos = sliderPositionFromValue(slider->minimum, slider->maximum, endValue, - proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); - sliderPos = startPos + (endPos - startPos) * 1.0 * animator->value("move_position").toReal(); --// qDebug() << "sliderPos1111........" << sliderPos; -+ aScrollBarDebug << "sliderPos1111........" << sliderPos; - } --// qDebug() << "sbar value:" << sbar->value(); -+ aScrollBarDebug << "sbar value:" << sbar->value(); - } - } - } -@@ -6619,7 +6583,7 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - animator->setAnimatorCurrentTime("move_position", 0); - animator->setExtraProperty("end_position", 0); - animator->setExtraProperty("start_position", 0); --// qDebug() << "setAnimatorCurrentTime0000000000000000" << animator->getExtraProperty("start_position").toInt() << animator->getExtraProperty("end_position").toInt(); -+ aScrollBarDebug << "setAnimatorCurrentTime0000000000000000" << animator->getExtraProperty("start_position").toInt() << animator->getExtraProperty("end_position").toInt(); - } - } - -@@ -7654,8 +7618,6 @@ QSize UKUIConfigStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt - if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) { - const bool horizontal(slider->orientation == Qt::Horizontal); - -- qDebug()<<"oldSize"<<newSize; -- - if (horizontal) { - newSize.setHeight(qMax(newSize.height() + 2 * sp->Slider_Margin, sp->Slider_DefaultWidth)); - newSize.setWidth(qMax(newSize.width(), sp->Slider_DefaultLength)); -@@ -7663,9 +7625,6 @@ QSize UKUIConfigStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt - newSize.setWidth(qMax(newSize.width() + 2 * sp->Slider_Margin, sp->Slider_DefaultWidth)); - newSize.setHeight(qMax(newSize.height(), sp->Slider_DefaultLength)); - } -- -- qDebug()<<"newSize"<<newSize; -- - return newSize; - } - break; -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -index 5b78807..6a4b64f 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -@@ -144,10 +144,10 @@ protected: - - private Q_SLOTS: - void updateTabletModeValue(bool isTabletMode); -- QRect scrollbarSliderRec(); -- void setScrollbarSliderRec(QRect rect) const; -- QRect sliderHandleRec(); -- void setSliderHandleRec(QRect rect) const; -+ QRect scrollbarSliderRec(QWidget *w); -+ void setScrollbarSliderRec(QWidget *w, QRect rect) const; -+ QRect sliderHandleRec(QWidget *w); -+ void setSliderHandleRec(QWidget *w,QRect rect) const; - - private: - bool isUseDarkPalette() const; -@@ -194,8 +194,8 @@ private: - // UKUIConfigStyleParameters - UKUIConfigStyleSpace::UKUIConfigStyleParameters *sp = nullptr; - -- mutable QRect m_scrollBarSliderRec; -- mutable QRect m_sliderHandleRec; -+ mutable QHash<QWidget*, QRect> m_scrollBarSliderRec; -+ mutable QHash<QWidget*, QRect> m_sliderHandleRec; - - BlurHelper *m_blur_helper = nullptr; - GestureHelper *m_gesture_helper = nullptr; -diff --git a/ukui-styles/readconfig.cpp b/ukui-styles/readconfig.cpp -index b6988b3..ecdd042 100644 ---- a/ukui-styles/readconfig.cpp -+++ b/ukui-styles/readconfig.cpp -@@ -27,6 +27,7 @@ - #include <QStringList> - #include <QStandardPaths> - #include <QMetaEnum> -+#include "platformthemedebug.h" - - ReadConfig::ReadConfig(const QString &cfg) - { -diff --git a/ukui-styles/readconfig.h b/ukui-styles/readconfig.h -index ba53cc3..03fdfb2 100644 ---- a/ukui-styles/readconfig.h -+++ b/ukui-styles/readconfig.h -@@ -31,56 +31,6 @@ - #include <QPalette> - #include "themeinformation.h" - --//#define UKUIStyle_Debug --//#define UKUIStyle_Warning -- --class Debug -- --{ -- --public: -- --template<typename T> -- --Debug & operator <<(const T&){return *this;} -- --}; --inline Debug debug(){return Debug();} -- -- --#ifdef UKUIStyle_Debug -- --# define cDebug qDebug() << "UKUIStyle input:" -- --#else -- --# define cDebug Debug() -- --#endif -- --class Warning -- --{ -- --public: -- --template<typename T> -- --Warning & operator <<(const T&){return *this;} -- --}; --inline Warning warning(){return Warning();} -- --#ifdef UKUIStyle_Warning -- --# define cWarning qWarning() << "UKUIStyle input:" -- --#else -- --# define cWarning Warning() -- --#endif -- - - class ReadConfig : public QObject - { -diff --git a/ukui-styles/ukui-style-plugin.cpp b/ukui-styles/ukui-style-plugin.cpp -index f6f57ca..38aaf45 100644 ---- a/ukui-styles/ukui-style-plugin.cpp -+++ b/ukui-styles/ukui-style-plugin.cpp -@@ -153,7 +153,6 @@ QStyle *UKUIStylePlugin::create(const QString &key) - auto widgetThemeName = settings->get("widgetThemeName").toString(); - auto styleName = settings->get("styleName").toString(); - -- qDebug() << "widgetThemeName........." << widgetThemeName; - if (widgetThemeName != "") { - if(qAppName() != blackStyleChangeApp) { - if (widgetThemeName == "classical") { -@@ -223,7 +222,6 @@ void UKUIStylePlugin::tableModeChanged(bool isTableMode) - auto widgetThemeName = settings->get("widgetThemeName").toString(); - auto styleName = settings->get("styleName").toString(); - -- qDebug() << "widgetThemeName123........." << widgetThemeName; - if (widgetThemeName != "") { - if(qAppName() != blackStyleChangeApp) { - if (widgetThemeName == "classical") { diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0027-Update-changelog-4.1.0.0-0k28.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0027-Update-changelog-4.1.0.0-0k28.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0027-Update-changelog-4.1.0.0-0k28.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0027-Update-changelog-4.1.0.0-0k28.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,190 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Fri, 26 Jan 2024 16:44:17 +0800 -Subject: Update changelog 4.1.0.0-0k28 - ---- - .../ukui-config-style-parameters.cpp | 94 +++++++++++++--------- - 1 file changed, 57 insertions(+), 37 deletions(-) - -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index d8eb5c4..30b73fa 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -741,6 +741,23 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - disablePen = QPen(QBrush(buttonColorCfg.disablePen), (buttonColorCfg.disablePen == Qt::NoPen || buttonColorCfg.disablePen.alpha() == 0) - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -+ auto checkableColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -+ { -+ checkPen = QPen(QBrush(checkableColorCfg.defaultPen), (checkableColorCfg.defaultPen == Qt::NoPen || checkableColorCfg.defaultPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ checkHoverPen = QPen(QBrush(checkableColorCfg.hoverPen), (checkableColorCfg.hoverPen == Qt::NoPen || checkableColorCfg.hoverPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ checkClickPen = QPen(QBrush(checkableColorCfg.clickPen), (checkableColorCfg.clickPen == Qt::NoPen || checkableColorCfg.clickPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ checkDisablePen = QPen(QBrush(checkableColorCfg.disablePen), (checkableColorCfg.disablePen == Qt::NoPen || checkableColorCfg.disablePen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ -+ checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -+ checkHoverBrush = checkableColorCfg.hoverBrush; -+ checkClickBrush = checkableColorCfg.clickBrush; -+ checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); -+ } -+ - if (isWindowColoseButton) { - if (buttonColorCfg.hoverType == Obj_Gradient_Type){ - linearGradient.setColorAt(0, buttonColorCfg.hoverGradientList.value(0)); -@@ -780,6 +797,8 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - clickBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } - } -+ checkHoverBrush = hoverBrush; -+ checkClickBrush = clickBrush; - - if (isWindowButton && useTransparentButtonList().contains(qAppName())) {//特殊三联应用 - if (isDark) { -@@ -842,6 +861,9 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - disablePen = QPen(QBrush(buttonColorCfg.disablePen), (buttonColorCfg.disablePen == Qt::NoPen || buttonColorCfg.disablePen.alpha() == 0) - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -+ checkHoverBrush = hoverBrush; -+ checkClickBrush = clickBrush; -+ - } else { - clickBrush = QBrush(buttonColorCfg.clickBrush); - hoverBrush = QBrush(buttonColorCfg.hoverBrush); -@@ -852,24 +874,6 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - } - } - -- auto checkableColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -- { -- checkPen = QPen(QBrush(checkableColorCfg.defaultPen), (checkableColorCfg.defaultPen == Qt::NoPen || checkableColorCfg.defaultPen.alpha() == 0) -- ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- checkHoverPen = QPen(QBrush(checkableColorCfg.hoverPen), (checkableColorCfg.hoverPen == Qt::NoPen || checkableColorCfg.hoverPen.alpha() == 0) -- ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- checkClickPen = QPen(QBrush(checkableColorCfg.clickPen), (checkableColorCfg.clickPen == Qt::NoPen || checkableColorCfg.clickPen.alpha() == 0) -- ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- checkDisablePen = QPen(QBrush(checkableColorCfg.disablePen), (checkableColorCfg.disablePen == Qt::NoPen || checkableColorCfg.disablePen.alpha() == 0) -- ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -- checkHoverBrush = checkableColorCfg.hoverBrush; -- checkClickBrush = checkableColorCfg.clickBrush; -- checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); -- } -- -- - auto *w = const_cast<QWidget *>(widget); - - if (w) { -@@ -1156,6 +1160,23 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - disablePen = QPen(QBrush(buttonColorCfg.disablePen), (buttonColorCfg.disablePen == Qt::NoPen) ? - 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -+ auto checkableColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); -+ -+ { -+ checkPen = QPen(QBrush(checkableColorCfg.defaultPen), (checkableColorCfg.defaultPen == Qt::NoPen || checkableColorCfg.defaultPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ checkHoverPen = QPen(QBrush(checkableColorCfg.hoverPen), (checkableColorCfg.hoverPen == Qt::NoPen || checkableColorCfg.hoverPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ checkClickPen = QPen(QBrush(checkableColorCfg.clickPen), (checkableColorCfg.clickPen == Qt::NoPen || checkableColorCfg.clickPen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ checkDisablePen = QPen(QBrush(checkableColorCfg.disablePen), (checkableColorCfg.disablePen == Qt::NoPen || checkableColorCfg.disablePen.alpha() == 0) -+ ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ -+ checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -+ checkHoverBrush = checkableColorCfg.hoverBrush; -+ checkClickBrush = checkableColorCfg.clickBrush; -+ checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); -+ } - if (isWindowColoseButton){ - if (buttonColorCfg.hoverType == Obj_Gradient_Type) { - linearGradient.setColorAt(0, buttonColorCfg.hoverGradientList.value(0)); -@@ -1195,6 +1216,9 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - } - } - -+ checkHoverBrush = hoverBrush; -+ checkClickBrush = clickBrush; -+ - if (isWindowButton && useTransparentButtonList().contains(qAppName())) {//特殊三联应用 - if (isDark) { - mix.setAlphaF(0.28); -@@ -1256,6 +1280,10 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - disablePen = QPen(QBrush(buttonColorCfg.disablePen), (buttonColorCfg.disablePen == Qt::NoPen || buttonColorCfg.disablePen.alpha() == 0) - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -+ -+ checkHoverBrush = hoverBrush; -+ checkClickBrush = clickBrush; -+ - } else { - clickBrush = QBrush(buttonColorCfg.clickBrush); - hoverBrush = QBrush(buttonColorCfg.hoverBrush); -@@ -1266,24 +1294,6 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - } - } - -- auto checkableColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); -- -- { -- checkPen = QPen(QBrush(checkableColorCfg.defaultPen), (checkableColorCfg.defaultPen == Qt::NoPen || checkableColorCfg.defaultPen.alpha() == 0) -- ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- checkHoverPen = QPen(QBrush(checkableColorCfg.hoverPen), (checkableColorCfg.hoverPen == Qt::NoPen || checkableColorCfg.hoverPen.alpha() == 0) -- ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- checkClickPen = QPen(QBrush(checkableColorCfg.clickPen), (checkableColorCfg.clickPen == Qt::NoPen || checkableColorCfg.clickPen.alpha() == 0) -- ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- checkDisablePen = QPen(QBrush(checkableColorCfg.disablePen), (checkableColorCfg.disablePen == Qt::NoPen || checkableColorCfg.disablePen.alpha() == 0) -- ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- -- checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -- checkHoverBrush = checkableColorCfg.hoverBrush; -- checkClickBrush = checkableColorCfg.clickBrush; -- checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); -- } -- - auto *w = const_cast<QWidget *>(widget); - if (w) { - w->setProperty("radius", radius); -@@ -1431,7 +1441,7 @@ void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, - if (isImportant) - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); - -- if(option->state & QStyle::State_On | QStyle::State_Enabled){ -+ if(option->state & QStyle::State_On && option->state & QStyle::State_Enabled){ - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); - } - -@@ -2740,6 +2750,7 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - QBrush childrenOnClickBrush = radioButtonColorCfg.childrenOnClickBrush; - QBrush childrenOnDisableBrush = radioButtonColorCfg.childrenOnDisableBrush; - QBrush onHoverBrush = QBrush(radioButtonColorCfg.onHoverBrush); -+ - if (radioButtonColorCfg.onHoverType == Obj_Gradient_Type) { - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); -@@ -3469,6 +3480,10 @@ void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const Q - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - -+ auto settings = UKUIStyleSettings::globalInstance(); -+ if(settings && settings->keys().contains("windowRadius")) -+ radius = settings->get("windowRadius").toInt(); -+ - if (widget) { - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); -@@ -3631,6 +3646,11 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - { - int frameradius = (widget && widget->property("maxRadius").isValid()) ? - widget->property("maxRadius").toInt() : m_radiusStruct.maxRadius; -+ -+ auto settings = UKUIStyleSettings::globalInstance(); -+ if(settings && settings->keys().contains("windowRadius")) -+ frameradius = settings->get("windowRadius").toInt(); -+ - int itemradius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - // QPixmap framePixmap(option->rect.size()); diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0028-Update-changelog-4.1.0.0-0k29.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0028-Update-changelog-4.1.0.0-0k29.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0028-Update-changelog-4.1.0.0-0k29.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0028-Update-changelog-4.1.0.0-0k29.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,141 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Wed, 31 Jan 2024 14:04:33 +0800 -Subject: Update changelog 4.1.0.0-0k29 - ---- - qt5-ukui-filedialog/uikyfiledialog.cpp | 1 + - .../qt5-config-style-ukui/config-shadow-helper.cpp | 26 ++++++++++--- - .../qt5-config-style-ukui/ukui-config-style.cpp | 43 ++++++++++++++++++++-- - 3 files changed, 61 insertions(+), 9 deletions(-) - -diff --git a/qt5-ukui-filedialog/uikyfiledialog.cpp b/qt5-ukui-filedialog/uikyfiledialog.cpp -index 48c52b6..fefd19c 100644 ---- a/qt5-ukui-filedialog/uikyfiledialog.cpp -+++ b/qt5-ukui-filedialog/uikyfiledialog.cpp -@@ -322,6 +322,7 @@ void Ui_KyFileDialog::initModeMenu(QDialog *mKyFileDialog) - void Ui_KyFileDialog::initSiderBar(QDialog *mKyFileDialog) - { - m_siderWidget = new QWidget(this); -+ m_siderWidget->setMinimumWidth(144); - m_siderLayout = new QVBoxLayout(); - m_siderLayout->setContentsMargins(0,0,0,0); - -diff --git a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -index c586f7a..3ced706 100644 ---- a/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -+++ b/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp -@@ -37,6 +37,8 @@ - #include <QApplication> - - #include <QDebug> -+#include <QMenu> -+#include "settings/ukui-style-settings.h" - - #define INNERRECT_WIDTH 1 - -@@ -155,9 +157,15 @@ QPixmap ConfigShadowHelper::getShadowPixmap(QColor color, /*ConfigShadowHelper:: - QPoint currentPos; - - int qAppMaxradius = maxRadius; -- if(widget && widget->property("maxRadius").isValid()){ -- qAppMaxradius = widget->property("maxRadius").toInt(); --// qDebug() << "radius...." << qAppMaxradius; -+ if(widget){ -+ if(widget->inherits("QComboBoxPrivateContainer") || widget->inherits("QMenu")){ -+ auto settings = UKUIStyleSettings::globalInstance(); -+ if(settings && settings->keys().contains("windowRadius")) -+ qAppMaxradius = settings->get("windowRadius").toInt(); -+ } -+ else if(widget->property("maxRadius").isValid()) -+ qAppMaxradius = widget->property("maxRadius").toInt(); -+ // qDebug() << "radius...." << qAppMaxradius; - } - // move to top left arc start point - windowRelativePath.moveTo(borderRadiusTopLeft, 0); -@@ -259,9 +267,15 @@ QPainterPath ConfigShadowHelper::caculateRelativePainterPath(QWidget *widget, qr - QPointF currentPos; - - int qAppMaxradius = maxRadius; -- if(widget && widget->property("maxRadius").isValid()){ -- qAppMaxradius = widget->property("maxRadius").toInt(); -- //qDebug() << "radius...." << qAppMaxradius; -+ if(widget){ -+ if(widget->inherits("QComboBoxPrivateContainer") || widget->inherits("QMenu")){ -+ auto settings = UKUIStyleSettings::globalInstance(); -+ if(settings && settings->keys().contains("windowRadius")) -+ qAppMaxradius = settings->get("windowRadius").toInt(); -+ -+ } -+ else if(widget->property("maxRadius").isValid()) -+ qAppMaxradius = widget->property("maxRadius").toInt(); - } - - // move to top left arc start point -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 26f8505..1377783 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -1498,7 +1498,24 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - return; - } - case PE_FrameFocusRect: { -- if (qobject_cast<const QAbstractItemView *>(widget)) -+ if (qApp->focusWidget() && qApp->focusWidget()->inherits("QTreeView")) -+ { -+ sp->initConfigTreeParameters(isUseDarkPalette(), option, widget); -+ QPen focusPen = sp->m_TreeParameters.treeFocusPen; -+ painter->save(); -+ painter->setBrush(Qt::NoBrush); -+ painter->setPen(focusPen); -+ int width = focusPen.width(); -+ if(width == 1 && sp->m_TreeParameters.radius != 0) -+ painter->translate(0.5, 0.5); -+ painter->setRenderHint(QPainter::Antialiasing, sp->m_TreeParameters.radius != 0); -+ -+ painter->drawRoundedRect(option->rect.adjusted(width/2, width/2, -width/2, -width/2), -+ sp->m_TreeParameters.radius, sp->m_TreeParameters.radius); -+ painter->restore(); -+ return; -+ } -+ else if (qobject_cast<const QAbstractItemView *>(widget)) - return; - break; - } -@@ -3331,7 +3348,27 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - painter->drawPath(path); - painter->restore(); - } -- else if(isTree){ -+// else if(isTree){ -+// if(focus){ -+// auto tree = qobject_cast<const QTreeView*>(widget); -+// QRect treeItemRec = QRect(tree->viewport()->x(), option->rect.y(), tree->width(), option->rect.height()); -+// qDebug() << "treeItemRec......" << treeItemRec; -+ -+// QStyleOptionFocusRect o; -+// o.QStyleOption::operator=(*vi); -+// o.rect = treeItemRec;//proxy()->subElementRect(SE_ItemViewItemFocusRect, vi, widget); -+// qDebug() << "ooooooo" << o.rect << proxy()->subElementRect(SE_TreeViewDisclosureItem, vi, widget); -+// painter->save(); -+// painter->setPen(QPen(QColor(Qt::blue), 1)); -+// painter->setBrush(Qt::NoBrush); -+// painter->drawRect(o.rect); -+// painter->restore(); -+ -+// drawPrimitive(QStyle::PE_FrameFocusRect, &o, painter, tree); -+// auto t = const_cast<QTreeView *>(tree); -+// t->setProperty("focusRect", vi->rect); -+ //drawPrimitive(QStyle::PE_IndicatorBranch, option, painter, tree); -+// } - // auto tree = qobject_cast<const QTreeView*>(widget); - // auto t = const_cast<QTreeView *>(tree); - // tree->model()->index() -@@ -3359,7 +3396,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - // painter->restore(); - // } - // } -- } -+// } - return; - } - break; diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0029-Update-changelog-4.1.0.0-0k30.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0029-Update-changelog-4.1.0.0-0k30.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0029-Update-changelog-4.1.0.0-0k30.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0029-Update-changelog-4.1.0.0-0k30.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,293 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Fri, 2 Feb 2024 11:22:29 +0800 -Subject: Update changelog 4.1.0.0-0k30 - ---- - ukui-styles/blur-helper.cpp | 14 +++- - .../qt5-config-style-ukui/ukui-config-style.cpp | 95 +++++++++++++++++----- - 2 files changed, 83 insertions(+), 26 deletions(-) - -diff --git a/ukui-styles/blur-helper.cpp b/ukui-styles/blur-helper.cpp -index 6e4249a..fd1384b 100644 ---- a/ukui-styles/blur-helper.cpp -+++ b/ukui-styles/blur-helper.cpp -@@ -282,8 +282,11 @@ void BlurHelper::delayUpdate(QWidget *w, bool updateBlurRegionOnly) - } - QPainterPath path; - int radius = 8; -- if(widget->property("maxRadius").isValid()) -- radius = widget->property("maxRadius").toInt(); -+ if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -+ auto settings = UKUIStyleSettings::globalInstance(); -+ if(settings->keys().contains("windowRadius")) -+ radius = settings->get("windowRadius").toInt(); -+ } - path.addRoundedRect(widget->rect(), radius, radius); - KWindowEffects::enableBlurBehind(widget->winId(), true, path.toFillPolygon().toPolygon()); - if (!updateBlurRegionOnly) -@@ -294,8 +297,11 @@ void BlurHelper::delayUpdate(QWidget *w, bool updateBlurRegionOnly) - if (widget->inherits("QTipLabel")) { - QPainterPath path; - int radius = 8; -- if(widget->property("normalRadius").isValid()) -- radius = widget->property("normalRadius").toInt(); -+ if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -+ auto settings = UKUIStyleSettings::globalInstance(); -+ if(settings->keys().contains("windowRadius")) -+ radius = settings->get("windowRadius").toInt(); -+ } - path.addRoundedRect(widget->rect().adjusted(+4,+4,-4,-4), radius, radius); - KWindowEffects::enableBlurBehind(widget->winId(), true, path.toFillPolygon().toPolygon()); - if (!updateBlurRegionOnly) -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 1377783..d9949b1 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -947,6 +947,11 @@ void UKUIConfigStyle::polish(QWidget *widget) - } - } - -+ if(!widget) -+ return; -+ -+ realSetWindowSurfaceFormatAlpha(widget); -+ - if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget && widget->inherits("QMenu"))) { - if (widget && widget->testAttribute(Qt::WA_TranslucentBackground) && widget->isTopLevel()) { - //FIXME: -@@ -976,16 +981,12 @@ void UKUIConfigStyle::polish(QWidget *widget) - } - } - -- if(!widget) -- return; - widget->setProperty("maxRadius", sp->radiusProperty().maxRadius); - widget->setProperty("normalRadius", sp->radiusProperty().normalRadius); - widget->setProperty("minRadius", sp->radiusProperty().minRadius); - - Style::polish(widget); - -- realSetWindowSurfaceFormatAlpha(widget); -- - m_shadow_helper->registerWidget(widget); - - if (qobject_cast<QTabWidget*>(widget)) { -@@ -1506,11 +1507,12 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - painter->setBrush(Qt::NoBrush); - painter->setPen(focusPen); - int width = focusPen.width(); -+ - if(width == 1 && sp->m_TreeParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->setRenderHint(QPainter::Antialiasing, sp->m_TreeParameters.radius != 0); - -- painter->drawRoundedRect(option->rect.adjusted(width/2, width/2, -width/2, -width/2), -+ painter->drawRoundedRect(option->rect.adjusted(width/2.0, width/2.0, -width/2.0, -width/2.0), - sp->m_TreeParameters.radius, sp->m_TreeParameters.radius); - painter->restore(); - return; -@@ -2321,8 +2323,20 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - QPixmap pixmap = icon.pixmap(iconsize, mode, QIcon::Off); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); - QPixmap target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -- if(!sp->indicatorIconHoverNeedHighLight && widget && !widget->inherits("QMenu")) -+ -+ if(widget && (widget->inherits("QDoubleSpinBox") || widget->inherits("QSpinBox")) && !sp->m_SpinBoxParameters.spinBoxUpIconHightPixMap) -+ target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -+ else if(!sp->indicatorIconHoverNeedHighLight && widget && !widget->inherits("QMenu")) - target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -+ else if(widget && (widget->inherits("QTreeView") || widget->inherits("QTreeWidget"))){ -+ if(widget->property("highlightMode").isValid() && widget->property("highlightMode").toBool()) -+ target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -+ else -+ target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); -+ } -+ else -+ target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); -+ - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - if(startAnimation){ -@@ -2913,6 +2927,8 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - QBrush selectBrush; - QBrush disableBrush; - QPainterPath path; -+ QPainterPath rectPath; -+ - - QPen hoverPen = Qt::NoPen; - QPen focusPen = Qt::NoPen; -@@ -2963,6 +2979,9 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - if (vi->viewItemPosition == QStyleOptionViewItem::Beginning) { - if(vi->rect.left() == 0) { - QRect rect = vi->rect.adjusted(0, 0, 1, 1); -+ int margin = 4; -+ -+ path.setFillRule(Qt::WindingFill); - path.moveTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); - path.arcTo(rect.left(), rect.top(), 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 180, -90); - path.lineTo(rect.right(), rect.top()); -@@ -2970,6 +2989,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - path.lineTo(rect.left() + sp->m_TreeParameters.radius, rect.bottom()); - path.arcTo(rect.left(), rect.bottom() - 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, -90, -90); - path.lineTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); -+ path.addRect(rect.adjusted(sp->m_TreeParameters.radius, -margin, margin, +margin)); - - borderPath0.moveTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); - borderPath0.arcTo(rect.left(), rect.top(), 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 180, -90); -@@ -2979,7 +2999,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - borderPath1.arcTo(rect.left(), rect.bottom() - 1 - 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, -90, -90); - borderPath1.lineTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); - } else { -- path.addRect(vi->rect); -+ rectPath.addRect(vi->rect); - - borderPath0.moveTo(vi->rect.left(), vi->rect.top()); - borderPath0.lineTo(vi->rect.right() + borderWidth, vi->rect.top()); -@@ -2987,7 +3007,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - borderPath1.lineTo(vi->rect.left(), vi->rect.bottom()); - } - } else if (vi->viewItemPosition == QStyleOptionViewItem::Middle) { -- path.addRect(option->rect); -+ rectPath.addRect(option->rect); - - borderPath0.moveTo(option->rect.left(), option->rect.top()); - borderPath0.lineTo(option->rect.right() + borderWidth, option->rect.top()); -@@ -2995,14 +3015,19 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - borderPath1.lineTo(option->rect.right() + borderWidth, option->rect.bottom()); - } else if (vi->viewItemPosition == QStyleOptionViewItem::End) { - QRect rect = vi->rect.adjusted(0, 0, 1, 1); -- path.moveTo(rect.left(), rect.top()); -+ int margin = 4; -+ -+ path.setFillRule(Qt::WindingFill); -+ -+ path.moveTo(rect.left() + rect.width() / 2.0, rect.top()); - path.lineTo(rect.right() - sp->m_TreeParameters.radius, rect.top()); - path.arcTo(rect.right() - 2 * sp->m_TreeParameters.radius, rect.top(), 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 90, -90); - path.lineTo(rect.right(), rect.bottom() - 2 * sp->m_TreeParameters.radius); - path.arcTo(rect.right() - 2 * sp->m_TreeParameters.radius, rect.bottom() - 2 * sp->m_TreeParameters.radius, - 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 0, -90); -- path.lineTo(rect.left(), rect.bottom()); -- path.lineTo(rect.left(), rect.top()); -+ path.lineTo(rect.left() + rect.width() / 2.0, rect.bottom()); -+ path.lineTo(rect.left() + rect.width() / 2.0, rect.top()); -+ path.addRect(rect.adjusted(-margin, 0, -sp->m_TreeParameters.radius, margin)); - - borderPath0.moveTo(rect.left(), rect.top()); - borderPath0.lineTo(rect.right() - sp->m_TreeParameters.radius, rect.top()); -@@ -3014,11 +3039,15 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 0, -90); - borderPath1.lineTo(rect.left(), rect.bottom() - 1); - } else if (vi->viewItemPosition == QStyleOptionViewItem::OnlyOne) { -- if(vi->rect.left() == 0) { -- path.addRoundedRect(vi->rect, sp->m_TreeParameters.radius, sp->m_TreeParameters.radius); -- borderPath0.addRoundedRect(vi->rect, sp->m_TreeParameters.radius, sp->m_TreeParameters.radius); -+ if(vi->rect.left() == 0) { -+ path.addRoundedRect(vi->rect.adjusted(0, 0, 1, 1), sp->m_TreeParameters.radius, sp->m_TreeParameters.radius); -+ borderPath0.addRoundedRect(vi->rect.adjusted(0, 0, 1, 1), sp->m_TreeParameters.radius, sp->m_TreeParameters.radius); - } else { - QRect rect = vi->rect.adjusted(0, 0, 1, 1); -+ int margin = 4; -+ -+ path.setFillRule(Qt::WindingFill); -+ - path.moveTo(rect.left(), rect.top()); - path.lineTo(rect.right() - sp->m_TreeParameters.radius, rect.top()); - path.arcTo(rect.right() - 2 * sp->m_TreeParameters.radius, rect.top(), 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 90, -90); -@@ -3027,6 +3056,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 0, -90); - path.lineTo(rect.left(), rect.bottom()); - path.lineTo(rect.left(), rect.top()); -+ path.addRect(rect.adjusted(-margin, 0, -sp->m_TreeParameters.radius, margin)); - - borderPath0.moveTo(rect.left(), rect.top()); - borderPath0.lineTo(rect.right() - sp->m_TreeParameters.radius, rect.top()); -@@ -3230,7 +3260,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - } - - painter->save(); -- painter->setRenderHint(QPainter::Antialiasing, true); -+ - painter->setPen(Qt::NoPen); - if (!enable) { - painter->setBrush(disableBrush); -@@ -3241,7 +3271,14 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - } else { - painter->setBrush(defaultBrush); - } -- painter->drawPath(path); -+ -+ if(!path.isEmpty()){ -+ painter->setRenderHint(QPainter::Antialiasing, true); -+ painter->drawPath(path); -+ } -+ painter->setRenderHint(QPainter::Antialiasing, false); -+ painter->drawPath(rectPath); -+ - painter->restore(); - - painter->save(); -@@ -3435,16 +3472,22 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - } - - QPainterPath path; -+ QPainterPath rectPath; -+ - if (option->rect.left() == 0) { - //raund radius at beginning - QRect rect = option->rect.adjusted(0, 0, 1, 1); -+ path.setFillRule(Qt::WindingFill); -+ int margin = 4; -+ - path.moveTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); - path.arcTo(rect.left(), rect.top(), 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 180, -90); -- path.lineTo(rect.right(), rect.top()); -- path.lineTo(rect.right(), rect.bottom()); -+ path.lineTo(rect.right() / 2.0, rect.top()); -+ path.lineTo(rect.right() / 2.0, rect.bottom()); - path.lineTo(rect.left() + sp->m_TreeParameters.radius, rect.bottom()); - path.arcTo(rect.left(), rect.bottom() - 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, -90, -90); - path.lineTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); -+ path.addRect(rect.adjusted(sp->m_TreeParameters.radius, -margin, margin, +margin)); - - borderPath0.moveTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); - borderPath0.arcTo(rect.left(), rect.top(), 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 180, -90); -@@ -3456,7 +3499,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - borderPath1.lineTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); - - } else { -- path.addRect(option->rect); -+ rectPath.addRect(option->rect); - - QRect rect = option->rect.adjusted(0, 0, 1, 1); - -@@ -3465,17 +3508,25 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - borderPath1.moveTo(rect.right(), rect.bottom() - 1); - borderPath1.lineTo(rect.left(), rect.bottom() - 1); - } -+ painter->save(); -+ painter->setClipRect(option->rect); - - auto tree = qobject_cast<const QTreeView *>(widget); -- painter->save(); -- painter->setRenderHint(QPainter::Antialiasing, true); - QPoint oldBO = painter->brushOrigin(); - if(isHover && tree && tree->verticalScrollMode() == QAbstractItemView::ScrollPerPixel){ - painter->setBrushOrigin(QPoint(0,0)); - } - painter->setPen(Qt::NoPen); - painter->setBrush(brush); -- painter->drawPath(path); -+ -+ if(!path.isEmpty()){ -+ painter->setRenderHint(QPainter::Antialiasing, true); -+ painter->drawPath(path); -+ } -+ -+ painter->setRenderHint(QPainter::Antialiasing, false); -+ painter->drawPath(rectPath); -+ - painter->setBrushOrigin(oldBO); - painter->restore(); - diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0030-Update-changelog-4.1.0.0-0k31.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0030-Update-changelog-4.1.0.0-0k31.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0030-Update-changelog-4.1.0.0-0k31.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0030-Update-changelog-4.1.0.0-0k31.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,153 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Thu, 22 Feb 2024 17:08:34 +0800 -Subject: Update changelog 4.1.0.0-0k31 - ---- - .../settings/libqt5-ukui-style_global.h | 2 - - .../ukui-config-style-parameters.cpp | 2 + - .../qt5-config-style-ukui/ukui-config-style.cpp | 11 ++++- - ukui-styles/ukui-style-plugin.cpp | 51 ++++++++++------------ - 4 files changed, 34 insertions(+), 32 deletions(-) - -diff --git a/libqt5-ukui-style/settings/libqt5-ukui-style_global.h b/libqt5-ukui-style/settings/libqt5-ukui-style_global.h -index 09468ae..da91219 100644 ---- a/libqt5-ukui-style/settings/libqt5-ukui-style_global.h -+++ b/libqt5-ukui-style/settings/libqt5-ukui-style_global.h -@@ -25,8 +25,6 @@ - - #include <QtCore/qglobal.h> - --#define blackStyleChangeApp "kylin-software-center" -- - #if defined(LIBQT5UKUISTYLE_LIBRARY) - # define LIBQT5UKUISTYLESHARED_EXPORT Q_DECL_EXPORT - #else -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index 30b73fa..e0b3777 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -72,6 +72,8 @@ UKUIConfigStyleParameters::UKUIConfigStyleParameters(QObject *parent, bool isDar - - initRadiusCfg(); - -+ radius = m_radiusStruct.normalRadius; -+ - switch (m_adjustColorRules) { - case DefaultRGB: { - MenuItem_HMargin = 8; -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 d9949b1..696428a 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -674,8 +674,8 @@ int UKUIConfigStyle::styleHint(QStyle::StyleHint hint, const QStyleOption *optio - case SH_ComboBox_PopupFrameStyle: - return QFrame::NoFrame | QFrame::Plain; - --// case SH_Button_FocusPolicy: --// return Qt::TabFocus; -+ case SH_Button_FocusPolicy: -+ return Qt::TabFocus; - - case SH_Header_ArrowAlignment: - return Qt::AlignRight | Qt::AlignVCenter; -@@ -3187,6 +3187,13 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - QRect textRect = proxy()->subElementRect(SE_ItemViewItemText, option, widget); - int iconMode_Radius = sp->radius; - -+ if(isList) -+ iconMode_Radius = sp->m_ListParameters.radius; -+ else if(isTree) -+ iconMode_Radius = sp->m_TreeParameters.radius; -+ else if(isTable) -+ iconMode_Radius = sp->m_TableParameters.radius; -+ - if (!enable) - return; - -diff --git a/ukui-styles/ukui-style-plugin.cpp b/ukui-styles/ukui-style-plugin.cpp -index 38aaf45..9b56722 100644 ---- a/ukui-styles/ukui-style-plugin.cpp -+++ b/ukui-styles/ukui-style-plugin.cpp -@@ -61,13 +61,12 @@ UKUIStylePlugin::UKUIStylePlugin(QObject *parent) : - auto widgetThemeName = settings->get("widgetThemeName").toString(); - - if (widgetThemeName != "") { -- if(qAppName() != blackStyleChangeApp) { -- if (widgetThemeName == "classical") { -- styleName ="ukui-config"; -- } else { -- styleName = "ukui-config"; -- } -- qApp->setStyle(new UKUIConfigStyle(styleName)); -+ if (widgetThemeName == "classical") { -+ styleName ="ukui-config"; -+ } else { -+ styleName = "ukui-config"; -+ } -+ qApp->setStyle(new UKUIConfigStyle(styleName)); - - // if(key == "widgetThemeName" || key == "widget-theme-name"){ - // qDebug() << "qApp style....." << qApp->style(); -@@ -82,7 +81,6 @@ UKUIStylePlugin::UKUIStylePlugin(QObject *parent) : - // settings->trySet("min-radius", min); - // } - // } -- } - - return; - } -@@ -154,13 +152,12 @@ QStyle *UKUIStylePlugin::create(const QString &key) - auto styleName = settings->get("styleName").toString(); - - if (widgetThemeName != "") { -- if(qAppName() != blackStyleChangeApp) { -- if (widgetThemeName == "classical") { -- return new UKUIConfigStyle(styleName); -- } else { -- return new UKUIConfigStyle(styleName); -- } -+ if (widgetThemeName == "classical") { -+ return new UKUIConfigStyle(styleName); -+ } else { -+ return new UKUIConfigStyle(styleName); - } -+ - } - return new UKUIConfigStyle(widgetThemeName); - } -@@ -217,23 +214,21 @@ void UKUIStylePlugin::tableModeChanged(bool isTableMode) - widget->updateGeometry(); - } - qApp->setProperty("isInitial", false); -- if(qAppName() != blackStyleChangeApp){ -- auto settings = UKUIStyleSettings::globalInstance(); -- auto widgetThemeName = settings->get("widgetThemeName").toString(); -- auto styleName = settings->get("styleName").toString(); -+ auto settings = UKUIStyleSettings::globalInstance(); -+ auto widgetThemeName = settings->get("widgetThemeName").toString(); -+ auto styleName = settings->get("styleName").toString(); - -- if (widgetThemeName != "") { -- if(qAppName() != blackStyleChangeApp) { -- if (widgetThemeName == "classical") { -- qApp->setStyle(new UKUIConfigStyle(styleName)); -- } else { -- qApp->setStyle(new UKUIConfigStyle(styleName)); -- } -- } -- } -- else -+ if (widgetThemeName != "") { -+ if (widgetThemeName == "classical") { - qApp->setStyle(new UKUIConfigStyle(styleName)); -+ } else { -+ qApp->setStyle(new UKUIConfigStyle(styleName)); -+ } -+ - } -+ else -+ qApp->setStyle(new UKUIConfigStyle(styleName)); -+ - } - /* - foreach (QObject *obj, qApp->children()) { diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0031-test.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0031-test.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0031-test.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0031-test.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,1858 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Wed, 28 Feb 2024 11:36:23 +0800 -Subject: test - ---- - .../ukui-config-style-parameters.cpp | 743 ++++++++++++--------- - .../ukui-config-style-parameters.h | 38 +- - .../qt5-config-style-ukui/ukui-config-style.cpp | 167 +++-- - .../qt5-config-style-ukui/ukui-config-style.h | 7 +- - .../widget-parameters/config-checkbox-parameters.h | 5 +- - .../widget-parameters/config-combobox-parameters.h | 5 +- - .../widget-parameters/config-lineedit-parameters.h | 5 +- - .../widget-parameters/config-list-parameters.h | 5 +- - .../widget-parameters/config-menu-parameters.h | 5 +- - .../config-progressbar-parameters.h | 5 +- - .../config-pushbutton-parameters.h | 5 +- - .../config-radiobutton-parameters.h | 5 +- - .../config-scrollbar-parameters.h | 5 +- - .../widget-parameters/config-slider-parameters.h | 5 +- - .../widget-parameters/config-spinbox-parameters.h | 5 +- - .../widget-parameters/config-table-parameters.h | 4 +- - .../config-tabwidget-parameters.h | 5 +- - .../config-toolbutton-parameters.h | 5 +- - .../widget-parameters/config-tooltip-parameters.h | 4 +- - .../widget-parameters/config-tree-parameters.h | 4 +- - .../widget-parameters/control-parameters.cpp | 34 + - .../widget-parameters/control-parameters.h | 42 ++ - ukui-styles/ukui-style-plugin.cpp | 1 + - 23 files changed, 703 insertions(+), 406 deletions(-) - create mode 100644 ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp - create mode 100644 ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h - -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index e0b3777..9359bf8 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -138,6 +138,7 @@ void UKUIConfigStyleParameters::initialDefaultPaletteColor(QString colorPath, bo - m_readCfg = nullptr; - } - -+ qDebug() << "ReadThemeConfig...." << isDark; - m_readCfg = new ReadThemeConfig(colorPath, isDark); - m_adjustColorRules = m_readCfg->getColorValueAdjustRules() == "HSL" ? AdjustColorRules::HSL : AdjustColorRules::DefaultRGB; - UKUIColorTheme::PaletteColorCfg paletteColorCfg = m_readCfg->paletteColorCfg(); -@@ -658,7 +659,7 @@ bool UKUIConfigStyleParameters::colorIsSame(QColor oldColor, QColor newColor) - return (oldColor == newColor); - } - --void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigPushButtonParameters* UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - bool isWindowButton = false; - bool isWindowColoseButton = false; -@@ -666,8 +667,13 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - bool useButtonPalette = false; - bool needTranslucent = false; - -+ UKUIColorTheme::ButtonColorCfg buttonColorCfg = readCfg()->buttonColorCfg(widget->palette()); - -- UKUIColorTheme::ButtonColorCfg buttonColorCfg = readCfg()->buttonColorCfg(option->palette); -+ if(widget->objectName() == "button3333"){ -+ qDebug() << "button,,,, color" << widget->palette().color(QPalette::Button).red() << -+ widget->palette().color(QPalette::Button).green() << -+ widget->palette().color(QPalette::Button).blue(); -+ } - - if (widget) { - if (widget->property("isWindowButton").isValid()) { -@@ -702,7 +708,6 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - } - if (isImportant) - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -- - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - -@@ -713,8 +718,8 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -+ linearGradient.setStart(widget->rect().topLeft()); -+ linearGradient.setFinalStop(widget->rect().bottomLeft()); - - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -@@ -876,6 +881,31 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - } - } - -+ //label -+ -+ bool iconHighlight = false; -+ bool textHighlight = false; -+ -+ auto button = qobject_cast<const QPushButton *>(widget); -+ if(button && button->isCheckable() && button->isChecked() && widget->isEnabled()){ -+ buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -+ } -+ -+ QColor textDefaultColor = buttonColorCfg.textDefaultColor; -+ QColor textHoverColor = buttonColorCfg.textHoverColor; -+ QColor textDisableColor = buttonColorCfg.textDisableColor; -+ -+ //icon -+ if ((isWindowButton || useButtonPalette) && !(button && button->isCheckable() && button->isChecked())) { -+ iconHighlight = false; -+ } else { -+ iconHighlight = true; -+ } -+ -+ if(m_adjustColorRules == AdjustColorRules::HSL) -+ iconHighlight = false; -+ -+ - auto *w = const_cast<QWidget *>(widget); - - if (w) { -@@ -897,6 +927,21 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - w->setProperty("checkClickPen", checkClickPen); - w->setProperty("checkDisablePen", checkDisablePen); - w->setProperty("focusPen", focusPen); -+ -+ w->setProperty("iconHighlight", iconHighlight); -+ w->setProperty("textHighlight", textHighlight); -+ w->setProperty("textDefaultColor", textDefaultColor); -+ w->setProperty("textHoverColor", textHoverColor); -+ w->setProperty("textDisableColor", textDisableColor); -+ if(w->objectName() == "button3333"){ -+ qDebug() << "set property000000000" << w->property("defaultBrush").value<QBrush>().color().red() << -+ w->property("defaultBrush").value<QBrush>().color().green() << -+ w->property("defaultBrush").value<QBrush>().color().blue(); -+ qDebug() << "set property111111111" << defaultBrush.color().red() << -+ defaultBrush.color().green() << -+ defaultBrush.color().blue(); -+ -+ } - } - - if (widget) { -@@ -954,133 +999,134 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { - focusPen = widget->property("setFocusPen").value<QPen>(); - } -+ -+ if (widget->property("setIconHoverClickHighlight").isValid() && widget->property("setIconHoverClickHighlight").canConvert<bool>()) { -+ iconHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); -+ } -+ if (widget->property("setTextHoverClickHighlight").isValid() && widget->property("setTextHoverClickHighlight").canConvert<bool>()) { -+ textHighlight = widget->property("setTextHoverClickHighlight").value<bool>(); -+ } -+ if (widget->property("setTextDefaultColor").isValid() && widget->property("setTextDefaultColor").canConvert<QColor>()) { -+ textDefaultColor = widget->property("setTextDefaultColor").value<QColor>(); -+ } -+ if (widget->property("setTextHoverColor").isValid() && widget->property("setTextHoverColor").canConvert<QColor>()) { -+ textHoverColor = widget->property("setTextHoverColor").value<QColor>(); -+ } -+ if (widget->property("setTextDisableColor").isValid() && widget->property("setTextDisableColor").canConvert<QColor>()) { -+ textDisableColor = widget->property("setTextDisableColor").value<QColor>(); -+ } - } - -- m_PushButtonParameters.radius = radius; -- m_PushButtonParameters.pushButtonDefaultBrush = defaultBrush; -- m_PushButtonParameters.pushButtonClickBrush = clickBrush; -- m_PushButtonParameters.pushButtonHoverBrush = hoverBrush; -- m_PushButtonParameters.pushButtonDisableBrush = disableBrush; -- m_PushButtonParameters.pushButtonCheckBrush = checkBrush; -- m_PushButtonParameters.pushButtonCheckHoverBrush = checkHoverBrush; -- m_PushButtonParameters.pushButtonCheckClickBrush = checkClickBrush; -- m_PushButtonParameters.pushButtonCheckDisableBrush = checkDisableBrush; -- m_PushButtonParameters.pushButtonDefaultPen = defaultPen; -- m_PushButtonParameters.pushButtonClickPen = clickPen; -- m_PushButtonParameters.pushButtonHoverPen = hoverPen; -- m_PushButtonParameters.pushButtonDisablePen = disablePen; -- m_PushButtonParameters.pushButtonCheckPen = checkPen; -- m_PushButtonParameters.pushButtonCheckHoverPen = checkHoverPen; -- m_PushButtonParameters.pushButtonCheckClickPen = checkClickPen; -- m_PushButtonParameters.pushButtonCheckDisablePen = checkDisablePen; -- m_PushButtonParameters.pushButtonFocusPen = focusPen; -+ ConfigPushButtonParameters* pushButtonParameters = new ConfigPushButtonParameters; -+ -+ pushButtonParameters->radius = radius; -+ pushButtonParameters->pushButtonDefaultBrush = defaultBrush; -+ pushButtonParameters->pushButtonClickBrush = clickBrush; -+ pushButtonParameters->pushButtonHoverBrush = hoverBrush; -+ pushButtonParameters->pushButtonDisableBrush = disableBrush; -+ pushButtonParameters->pushButtonCheckBrush = checkBrush; -+ pushButtonParameters->pushButtonCheckHoverBrush = checkHoverBrush; -+ pushButtonParameters->pushButtonCheckClickBrush = checkClickBrush; -+ pushButtonParameters->pushButtonCheckDisableBrush = checkDisableBrush; -+ pushButtonParameters->pushButtonDefaultPen = defaultPen; -+ pushButtonParameters->pushButtonClickPen = clickPen; -+ pushButtonParameters->pushButtonHoverPen = hoverPen; -+ pushButtonParameters->pushButtonDisablePen = disablePen; -+ pushButtonParameters->pushButtonCheckPen = checkPen; -+ pushButtonParameters->pushButtonCheckHoverPen = checkHoverPen; -+ pushButtonParameters->pushButtonCheckClickPen = checkClickPen; -+ pushButtonParameters->pushButtonCheckDisablePen = checkDisablePen; -+ pushButtonParameters->pushButtonFocusPen = focusPen; -+ -+ pushButtonParameters->iconHoverClickHighlight = iconHighlight; -+ pushButtonParameters->textHoverClickHighlight = textHighlight; -+ pushButtonParameters->textDefaultColor = textDefaultColor; -+ pushButtonParameters->textHoverColor = textHoverColor; -+ pushButtonParameters->textDisableColor = textDisableColor; -+ -+// QSharedPointer<ConfigPushButtonParameters> qsp(pushButtonParameters); -+ return pushButtonParameters; - } - --void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigPushButtonParameters* UKUIConfigStyleParameters::getConfigPushButtonLabelProperty(ConfigPushButtonParameters* pushButtonParameters, const QWidget *widget) - { -- bool iconHighlight = false; -- bool textHighlight = false; -- -- const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option); -- bool isWindowButton = false; -- bool useButtonPalette = false; -- bool isImportant = false; -- bool isWindowColoseButton = false; -- bool needTranslucent = false; -- -- UKUIColorTheme::ButtonColorCfg buttonColorCfg = readCfg()->buttonColorCfg(option->palette); -- - if (widget) { -- if (widget->property("isWindowButton").isValid()) { -- if (widget->property("isWindowButton").toInt() == 0x01) { -- isWindowButton = true; -- } -- if (widget->property("isWindowButton").toInt() == 0x02) { -- isWindowColoseButton = true; -- } -+ if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -+ pushButtonParameters->radius = widget->property("setRadius").value<int>(); - } -- if (widget->property("isImportant").isValid()) { -- isImportant = widget->property("isImportant").toBool(); -+ if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { -+ pushButtonParameters->pushButtonDefaultBrush = widget->property("setDefaultBrush").value<QBrush>(); - } -- -- if (widget->property("useButtonPalette").isValid()) { -- useButtonPalette = widget->property("useButtonPalette").toBool(); -+ if (widget->property("setClickBrush").isValid() && widget->property("setClickBrush").canConvert<QBrush>()) { -+ pushButtonParameters->pushButtonClickBrush = widget->property("setClickBrush").value<QBrush>(); - } -- -- if (widget->property("needTranslucent").isValid()) { -- needTranslucent = widget->property("needTranslucent").toBool(); -+ if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { -+ pushButtonParameters->pushButtonHoverBrush = widget->property("setHoverBrush").value<QBrush>(); -+ } -+ if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { -+ pushButtonParameters->pushButtonDisableBrush = widget->property("setDisableBrush").value<QBrush>(); -+ } -+ if (widget->property("setCheckBrush").isValid() && widget->property("setCheckBrush").canConvert<QBrush>()) { -+ pushButtonParameters->pushButtonCheckBrush = widget->property("setCheckBrush").value<QBrush>(); -+ } -+ if (widget->property("setCheckHoverBrush").isValid() && widget->property("setCheckHoverBrush").canConvert<QBrush>()) { -+ pushButtonParameters->pushButtonCheckHoverBrush = widget->property("setCheckHoverBrush").value<QBrush>(); -+ } -+ if (widget->property("setCheckClickBrush").isValid() && widget->property("setCheckClickBrush").canConvert<QBrush>()) { -+ pushButtonParameters->pushButtonCheckClickBrush = widget->property("setCheckClickBrush").value<QBrush>(); -+ } -+ if (widget->property("setCheckDisableBrush").isValid() && widget->property("setCheckDisableBrush").canConvert<QBrush>()) { -+ pushButtonParameters->pushButtonCheckDisableBrush = widget->property("setCheckDisableBrush").value<QBrush>(); -+ } -+ if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { -+ pushButtonParameters->pushButtonDefaultPen = widget->property("setDefaultPen").value<QPen>(); -+ } -+ if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { -+ pushButtonParameters->pushButtonClickPen = widget->property("setClickPen").value<QPen>(); -+ } -+ if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { -+ pushButtonParameters->pushButtonHoverPen = widget->property("setHoverPen").value<QPen>(); -+ } -+ if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { -+ pushButtonParameters->pushButtonDisablePen = widget->property("setDisablePen").value<QPen>(); -+ } -+ if (widget->property("setCheckPen").isValid() && widget->property("setCheckPen").canConvert<QPen>()) { -+ pushButtonParameters->pushButtonCheckPen = widget->property("setCheckPen").value<QPen>(); -+ } -+ if (widget->property("setCheckHoverPen").isValid() && widget->property("setCheckHoverPen").canConvert<QPen>()) { -+ pushButtonParameters->pushButtonCheckHoverPen = widget->property("setCheckHoverPen").value<QPen>(); -+ } -+ if (widget->property("setCheckClickPen").isValid() && widget->property("setCheckClickPen").canConvert<QPen>()) { -+ pushButtonParameters->pushButtonCheckClickPen = widget->property("setCheckClickPen").value<QPen>(); -+ } -+ if (widget->property("setCheckDisablePen").isValid() && widget->property("setCheckDisablePen").canConvert<QPen>()) { -+ pushButtonParameters->pushButtonCheckDisablePen = widget->property("setCheckDisablePen").value<QPen>(); -+ } -+ if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { -+ pushButtonParameters->pushButtonFocusPen = widget->property("setFocusPen").value<QPen>(); - } -- } -- if (isWindowColoseButton) -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_WindowCloseButton); -- if (isWindowButton) -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_WindowButton); -- if (useButtonPalette || isWindowButton) { -- if (needTranslucent) -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_TranslucentButton); -- else -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_UseButtonPalette); -- } -- if (isImportant) -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -- -- if(option->state & QStyle::State_On && option->state & QStyle::State_Enabled){ -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -- } -- -- QColor textDefaultColor = buttonColorCfg.textDefaultColor; -- QColor textHoverColor = buttonColorCfg.textHoverColor; -- QColor textDisableColor = buttonColorCfg.textDisableColor; -- -- //icon -- if ((isWindowButton || useButtonPalette) && !(button->state & QStyle::State_On)) { -- iconHighlight = false; -- } else { -- iconHighlight = true; -- } -- -- if(m_adjustColorRules == AdjustColorRules::HSL) -- iconHighlight = false; -- -- auto *w = const_cast<QWidget *>(widget); -- if (w) { -- w->setProperty("iconHighlight", iconHighlight); -- w->setProperty("textHighlight", textHighlight); -- w->setProperty("textDefaultColor", textDefaultColor); -- w->setProperty("textHoverColor", textHoverColor); -- w->setProperty("textDisableColor", textDisableColor); -- -- } -- -- if (widget) { --// if(!widget->isEnabled()) --// textColor = option->palette.color(QPalette::Disabled, QPalette::ButtonText); - - if (widget->property("setIconHoverClickHighlight").isValid() && widget->property("setIconHoverClickHighlight").canConvert<bool>()) { -- iconHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); -+ pushButtonParameters->iconHoverClickHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); - } - if (widget->property("setTextHoverClickHighlight").isValid() && widget->property("setTextHoverClickHighlight").canConvert<bool>()) { -- textHighlight = widget->property("setTextHoverClickHighlight").value<bool>(); -+ pushButtonParameters->textHoverClickHighlight = widget->property("setTextHoverClickHighlight").value<bool>(); - } - if (widget->property("setTextDefaultColor").isValid() && widget->property("setTextDefaultColor").canConvert<QColor>()) { -- textDefaultColor = widget->property("setTextDefaultColor").value<QColor>(); -+ pushButtonParameters->textDefaultColor = widget->property("setTextDefaultColor").value<QColor>(); - } - if (widget->property("setTextHoverColor").isValid() && widget->property("setTextHoverColor").canConvert<QColor>()) { -- textHoverColor = widget->property("setTextHoverColor").value<QColor>(); -+ pushButtonParameters->textHoverColor = widget->property("setTextHoverColor").value<QColor>(); - } - if (widget->property("setTextDisableColor").isValid() && widget->property("setTextDisableColor").canConvert<QColor>()) { -- textDisableColor = widget->property("setTextDisableColor").value<QColor>(); -+ pushButtonParameters->textDisableColor = widget->property("setTextDisableColor").value<QColor>(); - } - } - -- m_PushButtonParameters.iconHoverClickHighlight = iconHighlight; -- m_PushButtonParameters.textHoverClickHighlight = textHighlight; -- m_PushButtonParameters.textDefaultColor = textDefaultColor; -- m_PushButtonParameters.textHoverColor = textHoverColor; -- m_PushButtonParameters.textDisableColor = textDisableColor; -+ return pushButtonParameters; - } - --void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigToolButtonParameters* UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - bool isWindowButton = false; - bool isWindowColoseButton = false; -@@ -1375,27 +1421,30 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - } - } - -- m_ToolButtonParameters.radius = radius; -- m_ToolButtonParameters.toolButtonDefaultBrush = defaultBrush; -- m_ToolButtonParameters.toolButtonClickBrush = clickBrush; -- m_ToolButtonParameters.toolButtonHoverBrush = hoverBrush; -- m_ToolButtonParameters.toolButtonDisableBrush = disableBrush; -- m_ToolButtonParameters.toolButtonCheckBrush = checkBrush; -- m_ToolButtonParameters.toolButtonCheckHoverBrush = checkHoverBrush; -- m_ToolButtonParameters.toolButtonCheckClickBrush = checkClickBrush; -- m_ToolButtonParameters.toolButtonCheckDisableBrush = checkDisableBrush; -- m_ToolButtonParameters.toolButtonDefaultPen = defaultPen; -- m_ToolButtonParameters.toolButtonClickPen = clickPen; -- m_ToolButtonParameters.toolButtonHoverPen = hoverPen; -- m_ToolButtonParameters.toolButtonDisablePen = disablePen; -- m_ToolButtonParameters.toolButtonCheckPen = checkPen; -- m_ToolButtonParameters.toolButtonCheckHoverPen = checkHoverPen; -- m_ToolButtonParameters.toolButtonCheckClickPen = checkClickPen; -- m_ToolButtonParameters.toolButtonCheckDisablePen = checkDisablePen; -- m_ToolButtonParameters.toolButtonFocusPen = focusPen; -+ ConfigToolButtonParameters* parameters = new ConfigToolButtonParameters; -+ -+ parameters->radius = radius; -+ parameters->toolButtonDefaultBrush = defaultBrush; -+ parameters->toolButtonClickBrush = clickBrush; -+ parameters->toolButtonHoverBrush = hoverBrush; -+ parameters->toolButtonDisableBrush = disableBrush; -+ parameters->toolButtonCheckBrush = checkBrush; -+ parameters->toolButtonCheckHoverBrush = checkHoverBrush; -+ parameters->toolButtonCheckClickBrush = checkClickBrush; -+ parameters->toolButtonCheckDisableBrush = checkDisableBrush; -+ parameters->toolButtonDefaultPen = defaultPen; -+ parameters->toolButtonClickPen = clickPen; -+ parameters->toolButtonHoverPen = hoverPen; -+ parameters->toolButtonDisablePen = disablePen; -+ parameters->toolButtonCheckPen = checkPen; -+ parameters->toolButtonCheckHoverPen = checkHoverPen; -+ parameters->toolButtonCheckClickPen = checkClickPen; -+ parameters->toolButtonCheckDisablePen = checkDisablePen; -+ parameters->toolButtonFocusPen = focusPen; -+ return parameters; - } - --void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigToolButtonParameters* UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - bool iconHighlight = false; - bool textHighlight = false; -@@ -1490,14 +1539,17 @@ void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, - } - } - -- m_ToolButtonParameters.iconHoverClickHighlight = iconHighlight; -- m_ToolButtonParameters.textHoverClickHighlight = textHighlight; -- m_ToolButtonParameters.textDefaultColor = textDefaultColor; -- m_ToolButtonParameters.textHoverColor = textHoverColor; -- m_ToolButtonParameters.textDisableColor = textDisableColor; -+ ConfigToolButtonParameters* parameters = new ConfigToolButtonParameters; -+ -+ parameters->iconHoverClickHighlight = iconHighlight; -+ parameters->textHoverClickHighlight = textHighlight; -+ parameters->textDefaultColor = textDefaultColor; -+ parameters->textHoverColor = textHoverColor; -+ parameters->textDisableColor = textDisableColor; -+ return parameters; - } - --void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigLineEditParameters* UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -1575,18 +1627,21 @@ void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const - } - } - -- m_LineEditParameters.radius = radius; -- m_LineEditParameters.lineEditDefaultBrush = defaultBrush; -- m_LineEditParameters.lineEditHoverBrush = hoverBrush; -- m_LineEditParameters.lineEditFocusBrush = focusBrush; -- m_LineEditParameters.lineEditDisableBrush = disableBrush; -- m_LineEditParameters.lineEditDefaultPen = defaultPen; -- m_LineEditParameters.lineEditHoverPen = hoverPen; -- m_LineEditParameters.lineEditFocusPen = focusPen; -- m_LineEditParameters.lineEditDisablePen = disablePen; -+ ConfigLineEditParameters* parameters = new ConfigLineEditParameters; -+ -+ parameters->radius = radius; -+ parameters->lineEditDefaultBrush = defaultBrush; -+ parameters->lineEditHoverBrush = hoverBrush; -+ parameters->lineEditFocusBrush = focusBrush; -+ parameters->lineEditDisableBrush = disableBrush; -+ parameters->lineEditDefaultPen = defaultPen; -+ parameters->lineEditHoverPen = hoverPen; -+ parameters->lineEditFocusPen = focusPen; -+ parameters->lineEditDisablePen = disablePen; -+ return parameters; - } - --void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout) -+ConfigSpinBoxParameters* UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - -@@ -1912,43 +1967,46 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - } - } - -- m_SpinBoxParameters.radius = radius; -- m_SpinBoxParameters.spinBoxDefaultBrush = defaultBrush; -- m_SpinBoxParameters.spinBoxHoverBrush = hoverBrush; -- m_SpinBoxParameters.spinBoxFocusBrush = focusBrush; -- m_SpinBoxParameters.spinBoxDisableBrush = disableBrush; -- -- m_SpinBoxParameters.spinBoxDefaultPen = defaultPen; -- m_SpinBoxParameters.spinBoxHoverPen = hoverPen; -- m_SpinBoxParameters.spinBoxFocusPen = focusPen; -- m_SpinBoxParameters.spinBoxDisablePen = disablePen; -- -- m_SpinBoxParameters.spinBoxUpDefaultBrush = upDefaultBrush; -- m_SpinBoxParameters.spinBoxUpHoverBrush = upHoverBrush; -- m_SpinBoxParameters.spinBoxUpFocusHoverBrush = upFocusHoverBrush; -- m_SpinBoxParameters.spinBoxUpClickBrush = upClickBrush; -- m_SpinBoxParameters.spinBoxDownHoverBrush = downHoverBrush; -- m_SpinBoxParameters.spinBoxDownFocusHoverBrush = downFocusHoverBrush; -- m_SpinBoxParameters.spinBoxDownClickBrush = downClickBrush; -- m_SpinBoxParameters.spinBoxDownDefaultBrush = downDefaultBrush; -- -- m_SpinBoxParameters.spinBoxUpDefaultPen = upDefaultPen; -- m_SpinBoxParameters.spinBoxUpHoverPen = upHoverPen; -- m_SpinBoxParameters.spinBoxUpFocusHoverPen = upFocusHoverPen; -- m_SpinBoxParameters.spinBoxUpClickPen = upClickPen; -- m_SpinBoxParameters.spinBoxUpDisablePen = upDisablePen; -- -- m_SpinBoxParameters.spinBoxDownDefaultPen = downDefaultPen; -- m_SpinBoxParameters.spinBoxDownHoverPen = downHoverPen; -- m_SpinBoxParameters.spinBoxDownFocusHoverPen = downFocusHoverPen; -- m_SpinBoxParameters.spinBoxDownClickPen = downClickPen; -- m_SpinBoxParameters.spinBoxDownDisablePen = downDisablePen; -- -- m_SpinBoxParameters.spinBoxUpIconHightPixMap = (m_adjustColorRules == 0 ? true : false); -- m_SpinBoxParameters.spinBoxDownIconHightPixMap = (m_adjustColorRules == 0 ? true : false); -+ ConfigSpinBoxParameters* parameters = new ConfigSpinBoxParameters; -+ -+ parameters->radius = radius; -+ parameters->spinBoxDefaultBrush = defaultBrush; -+ parameters->spinBoxHoverBrush = hoverBrush; -+ parameters->spinBoxFocusBrush = focusBrush; -+ parameters->spinBoxDisableBrush = disableBrush; -+ -+ parameters->spinBoxDefaultPen = defaultPen; -+ parameters->spinBoxHoverPen = hoverPen; -+ parameters->spinBoxFocusPen = focusPen; -+ parameters->spinBoxDisablePen = disablePen; -+ -+ parameters->spinBoxUpDefaultBrush = upDefaultBrush; -+ parameters->spinBoxUpHoverBrush = upHoverBrush; -+ parameters->spinBoxUpFocusHoverBrush = upFocusHoverBrush; -+ parameters->spinBoxUpClickBrush = upClickBrush; -+ parameters->spinBoxDownHoverBrush = downHoverBrush; -+ parameters->spinBoxDownFocusHoverBrush = downFocusHoverBrush; -+ parameters->spinBoxDownClickBrush = downClickBrush; -+ parameters->spinBoxDownDefaultBrush = downDefaultBrush; -+ -+ parameters->spinBoxUpDefaultPen = upDefaultPen; -+ parameters->spinBoxUpHoverPen = upHoverPen; -+ parameters->spinBoxUpFocusHoverPen = upFocusHoverPen; -+ parameters->spinBoxUpClickPen = upClickPen; -+ parameters->spinBoxUpDisablePen = upDisablePen; -+ -+ parameters->spinBoxDownDefaultPen = downDefaultPen; -+ parameters->spinBoxDownHoverPen = downHoverPen; -+ parameters->spinBoxDownFocusHoverPen = downFocusHoverPen; -+ parameters->spinBoxDownClickPen = downClickPen; -+ parameters->spinBoxDownDisablePen = downDisablePen; -+ -+ parameters->spinBoxUpIconHightPixMap = (m_adjustColorRules == 0 ? true : false); -+ parameters->spinBoxDownIconHightPixMap = (m_adjustColorRules == 0 ? true : false); -+ return parameters; - } - --void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigComboBoxParameters* UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -2046,23 +2104,26 @@ void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const - } - } - -- m_ComboBoxParameters.radius = radius; -+ ConfigComboBoxParameters* parameters = new ConfigComboBoxParameters; - -- m_ComboBoxParameters.comboBoxDefaultBrush = defaultBrush; -- m_ComboBoxParameters.comboBoxHoverBrush = hoverBrush; -- m_ComboBoxParameters.comboBoxOnBrush = onBrush; -- m_ComboBoxParameters.comboBoxEditBrush = editBrush; -- m_ComboBoxParameters.comboBoxDisableBrush = disableBrush; -+ parameters->radius = radius; - -- m_ComboBoxParameters.comboBoxDefaultPen = defaultPen; -- m_ComboBoxParameters.comboBoxHoverPen = hoverPen; -- m_ComboBoxParameters.comboBoxOnPen = onPen; -- m_ComboBoxParameters.comboBoxEditPen = editPen; -- m_ComboBoxParameters.comboBoxDisablePen = disablePen; -- m_ComboBoxParameters.comboBoxFocusPen = focusPen; -+ parameters->comboBoxDefaultBrush = defaultBrush; -+ parameters->comboBoxHoverBrush = hoverBrush; -+ parameters->comboBoxOnBrush = onBrush; -+ parameters->comboBoxEditBrush = editBrush; -+ parameters->comboBoxDisableBrush = disableBrush; -+ -+ parameters->comboBoxDefaultPen = defaultPen; -+ parameters->comboBoxHoverPen = hoverPen; -+ parameters->comboBoxOnPen = onPen; -+ parameters->comboBoxEditPen = editPen; -+ parameters->comboBoxDisablePen = disablePen; -+ parameters->comboBoxFocusPen = focusPen; -+ return parameters; - } - --void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigListParameters* UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -2185,20 +2246,23 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - } - } - -- m_ListParameters.radius = radius; -- m_ListParameters.listDefaultBrush = defaultBrush; -- m_ListParameters.listHoverBrush = hoverBrush; -- m_ListParameters.listSelectBrush = selectBrush; -- m_ListParameters.listDisableBrush = disableBrush; -- m_ListParameters.listTextHoverPen = textHoverPen; -- m_ListParameters.listTextSelectPen = textSelectPen; -- m_ListParameters.listTextDisablePen = textDisablePen; -- m_ListParameters.listHoverPen = hoverPen; -- m_ListParameters.listSelectPen = selectPen; -- m_ListParameters.listFocusPen = focusPen; -+ ConfigListParameters* parameters = new ConfigListParameters; -+ -+ parameters->radius = radius; -+ parameters->listDefaultBrush = defaultBrush; -+ parameters->listHoverBrush = hoverBrush; -+ parameters->listSelectBrush = selectBrush; -+ parameters->listDisableBrush = disableBrush; -+ parameters->listTextHoverPen = textHoverPen; -+ parameters->listTextSelectPen = textSelectPen; -+ parameters->listTextDisablePen = textDisablePen; -+ parameters->listHoverPen = hoverPen; -+ parameters->listSelectPen = selectPen; -+ parameters->listFocusPen = focusPen; -+ return parameters; - } - --void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigTreeParameters* UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -2342,26 +2406,29 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - } - } - -- m_TreeParameters.radius = radius; -- m_TreeParameters.treeDefaultBrush = defaultBrush; -- m_TreeParameters.treeHoverBrush = hoverBrush; -- m_TreeParameters.treeSelectBrush = selectBrush; -- m_TreeParameters.treeDisableBrush = disableBrush; -+ ConfigTreeParameters* parameters = new ConfigTreeParameters; - -- m_TreeParameters.treeBranchDefaultBrush = branchDefaultBrush; -- m_TreeParameters.treeBranchHoverBrush = branchHoverBrush; -- m_TreeParameters.treeBranchSelectBrush = branchSelectBrush; -- m_TreeParameters.treeBranchDisableBrush = branchDisableBrush; -+ parameters->radius = radius; -+ parameters->treeDefaultBrush = defaultBrush; -+ parameters->treeHoverBrush = hoverBrush; -+ parameters->treeSelectBrush = selectBrush; -+ parameters->treeDisableBrush = disableBrush; - -- m_TreeParameters.treeHoverPen = hoverPen; -- m_TreeParameters.treeSelectPen = selectPen; -- m_TreeParameters.treeFocusPen = focusPen; -- m_TreeParameters.treeTextHoverPen = textHoverPen; -- m_TreeParameters.treeTextSelectPen = textSelectPen; -- m_TreeParameters.treeTextDisablePen = textDisablePen; -+ parameters->treeBranchDefaultBrush = branchDefaultBrush; -+ parameters->treeBranchHoverBrush = branchHoverBrush; -+ parameters->treeBranchSelectBrush = branchSelectBrush; -+ parameters->treeBranchDisableBrush = branchDisableBrush; -+ -+ parameters->treeHoverPen = hoverPen; -+ parameters->treeSelectPen = selectPen; -+ parameters->treeFocusPen = focusPen; -+ parameters->treeTextHoverPen = textHoverPen; -+ parameters->treeTextSelectPen = textSelectPen; -+ parameters->treeTextDisablePen = textDisablePen; -+ return parameters; - } - --void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigTableParameters* UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -2477,21 +2544,24 @@ void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QSt - } - } - -- m_TableParameters.radius = radius; -- m_TableParameters.tableDefaultBrush = defaultBrush; -- m_TableParameters.tableHoverBrush = hoverBrush; -- m_TableParameters.tableSelectBrush = selectBrush; -- m_TableParameters.tableDisableBrush = disableBrush; -- m_TableParameters.tableHoverPen = hoverPen; -- m_TableParameters.tableSelectPen = selectPen; -- m_TableParameters.tableFocusPen = focusPen; -+ ConfigTableParameters* parameters = new ConfigTableParameters; -+ -+ parameters->radius = radius; -+ parameters->tableDefaultBrush = defaultBrush; -+ parameters->tableHoverBrush = hoverBrush; -+ parameters->tableSelectBrush = selectBrush; -+ parameters->tableDisableBrush = disableBrush; -+ parameters->tableHoverPen = hoverPen; -+ parameters->tableSelectPen = selectPen; -+ parameters->tableFocusPen = focusPen; - -- m_TableParameters.tableTextHoverPen = textHoverPen; -- m_TableParameters.tableTextSelectPen = textSelectPen; -- m_TableParameters.tableTextDisablePen = textDisablePen; -+ parameters->tableTextHoverPen = textHoverPen; -+ parameters->tableTextSelectPen = textSelectPen; -+ parameters->tableTextDisablePen = textDisablePen; -+ return parameters; - } - --void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigCheckBoxParameters* UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - bool needTranslucent = false; - if (widget && widget->property("needTranslucent").isValid()) { -@@ -2704,30 +2774,33 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - // qDebug() << "defaultpen..." << defaultPen.color().red() << defaultPen.color().green() << defaultPen.color().blue(); - - // qDebug() << "defaultbrush..." << defaultBrush.color().red() << defaultBrush.color().green() << defaultBrush.color().blue(); -- m_CheckBoxParameters.radius = radius; -- m_CheckBoxParameters.checkBoxDefaultPen = defaultPen; -- m_CheckBoxParameters.checkBoxHoverPen = hoverPen; -- m_CheckBoxParameters.checkBoxClickPen = clickPen; -- m_CheckBoxParameters.checkBoxDisablePen = disablePen; -- m_CheckBoxParameters.checkBoxOnDefaultPen = onDefaultPen; -- m_CheckBoxParameters.checkBoxOnHoverPen = onHoverPen; -- m_CheckBoxParameters.checkBoxOnClickPen = onClickPen; -- m_CheckBoxParameters.checkBoxContentPen = contentPen; -- -- m_CheckBoxParameters.checkBoxDefaultBrush = defaultBrush; -- m_CheckBoxParameters.checkBoxHoverBrush = hoverBrush; -- m_CheckBoxParameters.checkBoxClickBrush = clickBrush; -- m_CheckBoxParameters.checkBoxDisableBrush = disableBrush; -- m_CheckBoxParameters.checkBoxOnDefaultBrush = onDefaultBrush; -- m_CheckBoxParameters.checkBoxOnHoverBrush = onHoverBrush; -- m_CheckBoxParameters.checkBoxOnClickBrush = onClickBrush; -- m_CheckBoxParameters.checkBoxPathBrush = pathBrush; -- m_CheckBoxParameters.checkBoxPathDisableBrush = pathDisableBrush; -- -- m_CheckBoxParameters.onHoverBrushIslinearGradient = onHoverBrushIslinearGradient; -+ ConfigCheckBoxParameters* parameters = new ConfigCheckBoxParameters; -+ -+ parameters->radius = radius; -+ parameters->checkBoxDefaultPen = defaultPen; -+ parameters->checkBoxHoverPen = hoverPen; -+ parameters->checkBoxClickPen = clickPen; -+ parameters->checkBoxDisablePen = disablePen; -+ parameters->checkBoxOnDefaultPen = onDefaultPen; -+ parameters->checkBoxOnHoverPen = onHoverPen; -+ parameters->checkBoxOnClickPen = onClickPen; -+ parameters->checkBoxContentPen = contentPen; -+ -+ parameters->checkBoxDefaultBrush = defaultBrush; -+ parameters->checkBoxHoverBrush = hoverBrush; -+ parameters->checkBoxClickBrush = clickBrush; -+ parameters->checkBoxDisableBrush = disableBrush; -+ parameters->checkBoxOnDefaultBrush = onDefaultBrush; -+ parameters->checkBoxOnHoverBrush = onHoverBrush; -+ parameters->checkBoxOnClickBrush = onClickBrush; -+ parameters->checkBoxPathBrush = pathBrush; -+ parameters->checkBoxPathDisableBrush = pathDisableBrush; -+ -+ parameters->onHoverBrushIslinearGradient = onHoverBrushIslinearGradient; -+ return parameters; - } - --void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigRadioButtonParameters* UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - m_RadioButtonParameters.radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -2929,29 +3002,32 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - } - } - -- m_RadioButtonParameters.radioButtonDefaultPen = defaultPen; -- m_RadioButtonParameters.radioButtonHoverPen = hoverPen; -- m_RadioButtonParameters.radioButtonClickPen = clickPen; -- m_RadioButtonParameters.radioButtonDisablePen = disablePen; -- m_RadioButtonParameters.radioButtonOnDefaultPen = onDefaultPen; -- m_RadioButtonParameters.radioButtonOnHoverPen = onHoverPen; -- m_RadioButtonParameters.radioButtonOnClickPen = onClickPen; -+ ConfigRadioButtonParameters* parameters = new ConfigRadioButtonParameters; -+ -+ parameters->radioButtonDefaultPen = defaultPen; -+ parameters->radioButtonHoverPen = hoverPen; -+ parameters->radioButtonClickPen = clickPen; -+ parameters->radioButtonDisablePen = disablePen; -+ parameters->radioButtonOnDefaultPen = onDefaultPen; -+ parameters->radioButtonOnHoverPen = onHoverPen; -+ parameters->radioButtonOnClickPen = onClickPen; - -- m_RadioButtonParameters.radioButtonDefaultBrush = defaultBrush; -- m_RadioButtonParameters.radioButtonHoverBrush = hoverBrush; -- m_RadioButtonParameters.radioButtonClickBrush = clickBrush; -- m_RadioButtonParameters.radioButtonDisableBrush = disableBrush; -- m_RadioButtonParameters.radioButtonOnDefaultBrush = onDefaultBrush; -- m_RadioButtonParameters.radioButtonOnHoverBrush = onHoverBrush; -- m_RadioButtonParameters.radioButtonOnClickBrush = onClickBrush; -+ parameters->radioButtonDefaultBrush = defaultBrush; -+ parameters->radioButtonHoverBrush = hoverBrush; -+ parameters->radioButtonClickBrush = clickBrush; -+ parameters->radioButtonDisableBrush = disableBrush; -+ parameters->radioButtonOnDefaultBrush = onDefaultBrush; -+ parameters->radioButtonOnHoverBrush = onHoverBrush; -+ parameters->radioButtonOnClickBrush = onClickBrush; - -- m_RadioButtonParameters.radioButtonChildrenOnDefaultBrush = childrenOnDefaultBrush; -- m_RadioButtonParameters.radioButtonChildrenOnHoverBrush = childrenOnHoverBrush; -- m_RadioButtonParameters.radioButtonChildrenOnClickBrush = childrenOnClickBrush; -- m_RadioButtonParameters.radioButtonChildrenOnDisableBrush = childrenOnDisableBrush; -+ parameters->radioButtonChildrenOnDefaultBrush = childrenOnDefaultBrush; -+ parameters->radioButtonChildrenOnHoverBrush = childrenOnHoverBrush; -+ parameters->radioButtonChildrenOnClickBrush = childrenOnClickBrush; -+ parameters->radioButtonChildrenOnDisableBrush = childrenOnDisableBrush; -+ return parameters; - } - --void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigSliderParameters* UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int grooveRadius = Slider_GrooveLength/2; - -@@ -3180,34 +3256,36 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - } - } - -- m_SliderParameters.radius = radius; -- m_SliderParameters.sliderGrooveRadius = grooveRadius; -+ ConfigSliderParameters* parameters = new ConfigSliderParameters; - -- m_SliderParameters.sliderHandleDefaultBrush = handleDefaultBrush; -- m_SliderParameters.sliderHandleHoverBrush = handleHoverBrush; -- m_SliderParameters.sliderHandleClickBrush = handleClickBrush; -- m_SliderParameters.sliderHandleDisableBrush = handleDisableBrush; -+ parameters->radius = radius; -+ parameters->sliderGrooveRadius = grooveRadius; - -- m_SliderParameters.sliderGrooveValueDefaultBrush = grooveValueDefaultBrush; -- m_SliderParameters.sliderGrooveValueHoverBrush = grooveValueHoverBrush; -- m_SliderParameters.sliderGrooveValueDisableBrush = grooveValueDisableBrush; -+ parameters->sliderHandleDefaultBrush = handleDefaultBrush; -+ parameters->sliderHandleHoverBrush = handleHoverBrush; -+ parameters->sliderHandleClickBrush = handleClickBrush; -+ parameters->sliderHandleDisableBrush = handleDisableBrush; - -- m_SliderParameters.sliderGrooveUnvalueDefaultBrush = grooveUnvalueDefaultBrush; -- m_SliderParameters.sliderGrooveUnvalueHoverBrush = grooveUnvalueHoverBrush; -- m_SliderParameters.sliderGrooveUnvalueDisableBrush = grooveUnvalueDisableBrush; -+ parameters->sliderGrooveValueDefaultBrush = grooveValueDefaultBrush; -+ parameters->sliderGrooveValueHoverBrush = grooveValueHoverBrush; -+ parameters->sliderGrooveValueDisableBrush = grooveValueDisableBrush; - -- m_SliderParameters.sliderHandleDefaultPen = handleDefaultPen; -- m_SliderParameters.sliderHandleHoverPen = handleHoverPen; -- m_SliderParameters.sliderHandleClickPen = handleClickPen; -- m_SliderParameters.sliderHandleDisablePen = handleDisablePen; -- m_SliderParameters.sliderGroovePen = sliderGroovePen; -- m_SliderParameters.focusPen = focusPen; -+ parameters->sliderGrooveUnvalueDefaultBrush = grooveUnvalueDefaultBrush; -+ parameters->sliderGrooveUnvalueHoverBrush = grooveUnvalueHoverBrush; -+ parameters->sliderGrooveUnvalueDisableBrush = grooveUnvalueDisableBrush; - -+ parameters->sliderHandleDefaultPen = handleDefaultPen; -+ parameters->sliderHandleHoverPen = handleHoverPen; -+ parameters->sliderHandleClickPen = handleClickPen; -+ parameters->sliderHandleDisablePen = handleDisablePen; -+ parameters->sliderGroovePen = sliderGroovePen; -+ parameters->focusPen = focusPen; - -- m_SliderParameters.sliderHandlePath = handlePath; -+ parameters->sliderHandlePath = handlePath; -+ return parameters; - } - --void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigProgressBarParameters* UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int normalRadius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -3308,7 +3386,7 @@ void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, con - grooveDisableBrush = widget->property("setGrooveDisableBrush").value<QBrush>(); - } - if (widget->property("setContentHightColor").isValid() && widget->property("setContentHightColor").canConvert<QColor>()) { -- startColor = widget->property("setContentHightColor").value<QColor>(); -+ startColor = widget->property("setContentHightColor").value<QColor>(); - } - if (widget->property("setContentMidLightColor").isValid() && widget->property("setContentMidLightColor").canConvert<QColor>()) { - endColor = widget->property("setContentMidLightColor").value<QColor>(); -@@ -3321,20 +3399,21 @@ void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, con - } - } - -- m_ProgressBarParameters.radius = radius; -+ ConfigProgressBarParameters* parameters = new ConfigProgressBarParameters; - -+ m_ProgressBarParameters.radius = radius; - m_ProgressBarParameters.progressBarContentPen = contentPen; - m_ProgressBarParameters.progressBarGrooveDefaultPen = grooveDefaultPen; - m_ProgressBarParameters.progressBarGrooveDisablePen = grooveDisablePen; -- - m_ProgressBarParameters.progressBarContentBrush = contentBrush; - m_ProgressBarParameters.progressBarGrooveDefaultBrush = grooveDefaultBrush; - m_ProgressBarParameters.progressBarGrooveDisableBrush = grooveDisableBrush; - m_ProgressBarParameters.progressBarContentHightColor = endColor; - m_ProgressBarParameters.progressBarContentMidLightColor = startColor; -+ return parameters; - } - --void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigScrollBarParameters* UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int sliderRadius; - bool needTranslucent = false; -@@ -3439,17 +3518,20 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - } - } - -- m_ScrollBarParameters.radius = sliderRadius; -+ ConfigScrollBarParameters* parameters = new ConfigScrollBarParameters; -+ - ScroolBar_Height= 68; -- m_ScrollBarParameters.scrollBarGrooveDefaultBrush = grooveDefaultBrush; -- m_ScrollBarParameters.scrollBarGrooveInactiveBrush = grooveInactiveBrush; -- m_ScrollBarParameters.scrollBarSliderDefaultBrush = sliderDefaultBrush; -- m_ScrollBarParameters.scrollBarSliderHoverBrush = sliderHoverBrush; -- m_ScrollBarParameters.scrollBarSliderClickBrush = sliderClickBrush; -- m_ScrollBarParameters.scrollBarSliderDisableBrush = sliderDisableBrush; -+ parameters->radius = sliderRadius; -+ parameters->scrollBarGrooveDefaultBrush = grooveDefaultBrush; -+ parameters->scrollBarGrooveInactiveBrush = grooveInactiveBrush; -+ parameters->scrollBarSliderDefaultBrush = sliderDefaultBrush; -+ parameters->scrollBarSliderHoverBrush = sliderHoverBrush; -+ parameters->scrollBarSliderClickBrush = sliderClickBrush; -+ parameters->scrollBarSliderDisableBrush = sliderDisableBrush; -+ return parameters; - } - --void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigToolTipParameters* UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - UKUIColorTheme::ToolTipColorCfg tooltipColorCfg = readCfg()->toolTipColorCfg(option->palette, C_ToolTip_Default); - -@@ -3504,12 +3586,15 @@ void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const Q - w->setProperty("backgroundBrush", backgroundBrush); - w->setProperty("backgroundPen", backgroundPen); - } -- m_ToolTipParameters.radius = radius; -- m_ToolTipParameters.toolTipBackgroundBrush = backgroundBrush; -- m_ToolTipParameters.toolTipBackgroundPen = backgroundPen; -+ ConfigToolTipParameters* parameters = new ConfigToolTipParameters; -+ -+ parameters->radius = radius; -+ parameters->toolTipBackgroundBrush = backgroundBrush; -+ parameters->toolTipBackgroundPen = backgroundPen; -+ return parameters; - } - --void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigTabWidgetParameters* UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int tabradius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -3631,20 +3716,23 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - } - } - -- m_TabWidgetParameters.radius = tabradius; -- m_TabWidgetParameters.tabWidgetBackgroundBrush = widgetBackgroundBrush; -- m_TabWidgetParameters.tabBarBackgroundBrush = tabBarBackgroundBrush; -- m_TabWidgetParameters.tabBarDefaultBrush = tabBarDefaultBrush; -- m_TabWidgetParameters.tabBarHoverBrush = tabBarHoverBrush; -- m_TabWidgetParameters.tabBarClickBrush = tabBarClickBrush; -- m_TabWidgetParameters.tabBarSelectBrush = tabBarSelectBrush; -- m_TabWidgetParameters.tabBarDefaultPen = tabBarDefaultPen; -- m_TabWidgetParameters.tabBarHoverPen = tabBarHoverPen; -- m_TabWidgetParameters.tabBarClickPen = tabBarClickPen; -- m_TabWidgetParameters.tabBarFocusPen = tabBarFocusPen; -+ ConfigTabWidgetParameters* parameters = new ConfigTabWidgetParameters; -+ -+ parameters->radius = tabradius; -+ parameters->tabWidgetBackgroundBrush = widgetBackgroundBrush; -+ parameters->tabBarBackgroundBrush = tabBarBackgroundBrush; -+ parameters->tabBarDefaultBrush = tabBarDefaultBrush; -+ parameters->tabBarHoverBrush = tabBarHoverBrush; -+ parameters->tabBarClickBrush = tabBarClickBrush; -+ parameters->tabBarSelectBrush = tabBarSelectBrush; -+ parameters->tabBarDefaultPen = tabBarDefaultPen; -+ parameters->tabBarHoverPen = tabBarHoverPen; -+ parameters->tabBarClickPen = tabBarClickPen; -+ parameters->tabBarFocusPen = tabBarFocusPen; -+ return parameters; - } - --void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+ConfigMenuParameters* UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int frameradius = (widget && widget->property("maxRadius").isValid()) ? - widget->property("maxRadius").toInt() : m_radiusStruct.maxRadius; -@@ -3738,12 +3826,15 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - } - } - -- m_MenuParameters.frameRadius = frameradius; -- m_MenuParameters.itemRadius = itemradius; -+ ConfigMenuParameters* parameters = new ConfigMenuParameters; -+ -+ parameters->frameRadius = frameradius; -+ parameters->itemRadius = itemradius; - // m_MenuParameters.menuFramePixmap = framePixmap; -- m_MenuParameters.menuBackgroundBrush = menuBackgroundBrush; -- m_MenuParameters.menuBackgroundPen = menuBackgroundPen; -- m_MenuParameters.menuItemSelectBrush = itemSelectBrush; -- m_MenuParameters.menuItemFocusPen = menuItemFocusPen; -- m_MenuParameters.menuTextHoverPen = menuHoverPen; -+ parameters->menuBackgroundBrush = menuBackgroundBrush; -+ parameters->menuBackgroundPen = menuBackgroundPen; -+ parameters->menuItemSelectBrush = itemSelectBrush; -+ parameters->menuItemFocusPen = menuItemFocusPen; -+ parameters->menuTextHoverPen = menuHoverPen; -+ return parameters; - } -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -index 4fa3b67..4ebc1ef 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -@@ -23,6 +23,7 @@ - #ifndef UKUICONFIGSTYLEPARAMETERS_H - #define UKUICONFIGSTYLEPARAMETERS_H - -+#include <QSharedPointer> - #include <QObject> - #include <QPalette> - #include <QStyleOption> -@@ -45,6 +46,7 @@ - #include "widget-parameters/config-menu-parameters.h" - #include "../readconfig.h" - -+using namespace std; - namespace UKUIConfigStyleSpace { - - class UKUIConfigStyleParameters: public QObject -@@ -91,40 +93,40 @@ public: - virtual void initRadiusCfg(); - - //pushbutton -- virtual void initConfigPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -- virtual void initConfigPushButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigPushButtonParameters* initConfigPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigPushButtonParameters* getConfigPushButtonLabelProperty(ConfigPushButtonParameters* parameters, const QWidget *widget); - - //toolbutton -- virtual void initConfigToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -- virtual void initConfigToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigToolButtonParameters* initConfigToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigToolButtonParameters* initConfigToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual void initConfigLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigLineEditParameters* initConfigLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual void initConfigSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false); -+ virtual ConfigSpinBoxParameters* initConfigSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false); - -- virtual void initConfigComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigComboBoxParameters* initConfigComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual void initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigListParameters* initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual void initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigTreeParameters* initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual void initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigTableParameters* initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual void initConfigCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigCheckBoxParameters* initConfigCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual void initConfigRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigRadioButtonParameters* initConfigRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual void initConfigSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigSliderParameters* initConfigSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual void initConfigProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigProgressBarParameters* initConfigProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual void initConfigScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigScrollBarParameters* initConfigScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual void initConfigToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigToolTipParameters* initConfigToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual void initConfigTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigTabWidgetParameters* initConfigTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual void initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual ConfigMenuParameters* initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - - virtual QColor lanhuHSLToQtHsl(int h, int s, int l, int a = 255); - virtual QColor adjustColor(const QColor c, int hRange = 0, int sRange = 0, int lRange = 0, int aRange = 0); -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 696428a..ef0d887 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -950,6 +950,11 @@ void UKUIConfigStyle::polish(QWidget *widget) - if(!widget) - return; - -+ if(widget->objectName() == "button3333"){ -+ qDebug() << "polish ..."; -+ } -+ -+ - realSetWindowSurfaceFormatAlpha(widget); - - if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget && widget->inherits("QMenu"))) { -@@ -1017,6 +1022,21 @@ void UKUIConfigStyle::polish(QWidget *widget) - - if(qobject_cast<QPushButton*>(widget)) - { -+ if(widget->objectName() == "button3333"){ -+ qDebug() << "polish insert00000000 isUseDarkPalette()..." << isUseDarkPalette(); -+ } -+ -+ if(m_controlParameters.contains(const_cast<const QWidget*>(widget))){ -+ auto p = m_controlParameters.value(const_cast<const QWidget*>(widget)); -+ m_controlParameters.remove(const_cast<const QWidget*>(widget)); -+ p->deleteLater(); -+ } -+ QStyleOption option; -+ option.init(widget); -+ auto pt = sp->initConfigPushButtonBevelParameters(isUseDarkPalette(), &option, widget); -+ -+ m_controlParameters.insert(const_cast<const QWidget*>(widget), qobject_cast<ControlParameters*>(pt)); -+ - // m_button_animation_helper->registerWidget(widget); - } - -@@ -1547,6 +1567,21 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - int width = 0; - QRect rect = option->rect; - -+ ConfigPushButtonParameters* pushButtonParameters = nullptr; -+ bool needNew = false; -+ if(widget && m_controlParameters.contains(widget)){ -+ auto cp = m_controlParameters.value(widget); -+ pushButtonParameters = qobject_cast<ConfigPushButtonParameters *>(cp); -+ if(!pushButtonParameters){ -+ pushButtonParameters = new ConfigPushButtonParameters; -+ needNew = true; -+ } -+ } -+ else{ -+ pushButtonParameters = new ConfigPushButtonParameters; -+ needNew = true; -+ } -+ - // qDebug() << "PE_PanelButtonCommand........" << button->text << "active:" << active << "inActive;" << inActive; - if (widget && widget->property("isRoundButton").isValid()) { - roundButton = widget->property("isRoundButton").toBool(); -@@ -1560,72 +1595,74 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - // } - - if (on) { -- width = sp->m_PushButtonParameters.pushButtonCheckDisablePen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonCheckDisablePen); -- painter->setBrush(sp->m_PushButtonParameters.pushButtonCheckDisableBrush); -+ width = pushButtonParameters->pushButtonCheckDisablePen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonCheckDisablePen); -+ painter->setBrush(pushButtonParameters->pushButtonCheckDisableBrush); - } else if (button->features & QStyleOptionButton::Flat) { - width = 0; - painter->setPen(Qt::NoPen); - painter->setBrush(Qt::NoBrush); - } else { -- width = sp->m_PushButtonParameters.pushButtonDisablePen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonDisablePen); -- painter->setBrush(sp->m_PushButtonParameters.pushButtonDisableBrush); -+ width = pushButtonParameters->pushButtonDisablePen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonDisablePen); -+ painter->setBrush(pushButtonParameters->pushButtonDisableBrush); - } - } else { - if (on) { - if (sunken) { -- width = sp->m_PushButtonParameters.pushButtonCheckClickPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonCheckClickPen); -- painter->setBrush(sp->m_PushButtonParameters.pushButtonCheckClickBrush); -+ width = pushButtonParameters->pushButtonCheckClickPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonCheckClickPen); -+ painter->setBrush(pushButtonParameters->pushButtonCheckClickBrush); - } else if (hover) { -- width = sp->m_PushButtonParameters.pushButtonCheckHoverPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonCheckHoverPen); -- painter->setBrush(sp->m_PushButtonParameters.pushButtonCheckHoverBrush); -+ width = pushButtonParameters->pushButtonCheckHoverPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonCheckHoverPen); -+ painter->setBrush(pushButtonParameters->pushButtonCheckHoverBrush); - } else { -- width = sp->m_PushButtonParameters.pushButtonCheckPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonCheckPen); -- painter->setBrush(sp->m_PushButtonParameters.pushButtonCheckBrush); -+ width = pushButtonParameters->pushButtonCheckPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonCheckPen); -+ painter->setBrush(pushButtonParameters->pushButtonCheckBrush); - } - } else { - if (sunken) { -- width = sp->m_PushButtonParameters.pushButtonClickPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonClickPen); -- painter->setBrush(sp->m_PushButtonParameters.pushButtonClickBrush); -+ width = pushButtonParameters->pushButtonClickPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonClickPen); -+ painter->setBrush(pushButtonParameters->pushButtonClickBrush); - } else if (hover) { -- width = sp->m_PushButtonParameters.pushButtonHoverPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonHoverPen); -- painter->setBrush(sp->m_PushButtonParameters.pushButtonHoverBrush); -+ width = pushButtonParameters->pushButtonHoverPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonHoverPen); -+ painter->setBrush(pushButtonParameters->pushButtonHoverBrush); - } else { - if (button->features & QStyleOptionButton::Flat) { - width = 0; - painter->setPen(Qt::NoPen); - painter->setBrush(Qt::NoBrush); - } else { -- width = sp->m_PushButtonParameters.pushButtonDefaultPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonDefaultPen); -- painter->setBrush(sp->m_PushButtonParameters.pushButtonDefaultBrush); -+ width = pushButtonParameters->pushButtonDefaultPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonDefaultPen); -+ painter->setBrush(pushButtonParameters->pushButtonDefaultBrush); - } - } - } - //focus - if (focus) { -- width = sp->m_PushButtonParameters.pushButtonFocusPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonFocusPen); -+ width = pushButtonParameters->pushButtonFocusPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonFocusPen); - } - } - -- painter->setRenderHint(QPainter::Antialiasing, sp->m_PushButtonParameters.radius != 0); -+ painter->setRenderHint(QPainter::Antialiasing, pushButtonParameters->radius != 0); - if (roundButton) { - painter->setRenderHint(QPainter::Antialiasing, true); - painter->drawEllipse(rect.adjusted(width, width, -width, -width)); - } else { -- if(width == 1 && sp->m_PushButtonParameters.radius != 0) -+ if(width == 1 && pushButtonParameters->radius != 0) - painter->translate(0.5, 0.5); - painter->drawRoundedRect(rect.adjusted(width, width, -width, -width), -- sp->m_PushButtonParameters.radius, sp->m_PushButtonParameters.radius); -+ pushButtonParameters->radius, pushButtonParameters->radius); - } - painter->restore(); -+ if(needNew) -+ pushButtonParameters->deleteLater(); - return; - - // //button animation cancel temporary -@@ -4756,7 +4793,25 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - - case CE_PushButtonBevel: - { -- sp->initConfigPushButtonBevelParameters(isUseDarkPalette(), option, widget); -+// if(m_controlParameters.contains(widget)){ -+// auto p = m_controlParameters.value(widget); -+// m_controlParameters.remove(widget); -+// p->deleteLater(); -+// } -+// QStyleOption option1; -+// option1.init(widget); -+// auto pt = sp->initConfigPushButtonBevelParameters(isUseDarkPalette(), &option1, widget); -+ -+// m_controlParameters.insert(widget, qobject_cast<ControlParameters*>(pt)); -+ -+ -+// if(widget && m_controlParameters.contains(widget)){ -+// ConfigPushButtonParameters* pushButtonParameters = qobject_cast<ConfigPushButtonParameters *>(m_controlParameters.value(widget)); -+// if(pushButtonParameters){ -+// auto pt = sp->getConfigPushButtonLabelProperty(pushButtonParameters, widget); -+// m_controlParameters.insert(widget, qobject_cast<ControlParameters*>(pt)); -+// } -+// } - proxy()->drawPrimitive(PE_PanelButtonCommand, option, painter, widget); - return; - } -@@ -4764,12 +4819,26 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - case CE_PushButtonLabel: - { - if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { -- sp->initConfigPushButtonLabelParameters(isUseDarkPalette(), option, widget); - const bool enable = button->state & State_Enabled; - const bool text = !button->text.isEmpty(); - const bool icon = !button->icon.isNull(); - const bool inactive = enable && !(button->state & State_Active); - -+ ConfigPushButtonParameters* pushButtonParameters = nullptr; -+ bool needNew = false; -+ if(widget && m_controlParameters.contains(widget)){ -+ auto cp = m_controlParameters.value(widget); -+ pushButtonParameters = qobject_cast<ConfigPushButtonParameters *>(cp); -+ if(!pushButtonParameters){ -+ pushButtonParameters = new ConfigPushButtonParameters; -+ needNew = true; -+ } -+ } -+ else{ -+ pushButtonParameters = new ConfigPushButtonParameters; -+ needNew = true; -+ } -+ - bool isImportant = false; - if (widget && widget->property("isImportant").isValid()) { - isImportant = widget->property("isImportant").toBool(); -@@ -4778,7 +4847,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - QRect drawRect = button->rect; - int spacing = 8; - QStyleOption sub = *option; -- if (!sp->m_PushButtonParameters.iconHoverClickHighlight) { -+ if (!pushButtonParameters->iconHoverClickHighlight) { - sub.state = enable ? State_Enabled : State_None; - } else { - sub.state = option->state; -@@ -4852,7 +4921,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - drawColorPixmap(painter, color, pixmap); - } - else if (widget && !widget->property("useIconHighlightEffect").isValid()) { -- if (!sp->m_PushButtonParameters.iconHoverClickHighlight) { -+ if (!pushButtonParameters->iconHoverClickHighlight) { - pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, &sub, widget); - } - else{ -@@ -4873,7 +4942,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - - if (textRect.isValid()) { - // if (enable) { --// if (sp->m_PushButtonParameters.textHoverClickHighlight) { -+// if (pushButtonParameters->textHoverClickHighlight) { - // proxy()->drawItemText(painter, textRect, tf, button->palette, true, button->text, QPalette::HighlightedText); - // } else { - // proxy()->drawItemText(painter, textRect, tf, button->palette, true, button->text, QPalette::ButtonText); -@@ -4881,19 +4950,21 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - // } else { - // proxy()->drawItemText(painter, textRect, tf, button->palette, false, button->text, QPalette::ButtonText); - // } -- QColor penColor = sp->m_PushButtonParameters.textDefaultColor; -+ QColor penColor = pushButtonParameters->textDefaultColor; - if(!enable) -- penColor = sp->m_PushButtonParameters.textDisableColor; -+ penColor = pushButtonParameters->textDisableColor; - else if(button->state & QStyle::State_MouseOver || button->state & QStyle::State_Sunken) -- penColor = sp->m_PushButtonParameters.textHoverColor; -+ penColor = pushButtonParameters->textHoverColor; - - painter->setBrush(Qt::NoBrush); - painter->setPen(QPen(penColor)); - painter->drawText(textRect, button->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); - --// proxy()->drawItemText(painter, textRect, tf, button->palette, false, button->text, sp->m_PushButtonParameters.textColor); -+// proxy()->drawItemText(painter, textRect, tf, button->palette, false, button->text, pushButtonParameters->textColor); - - } -+ if(needNew) -+ pushButtonParameters->deleteLater(); - return; - } - break; -@@ -5874,8 +5945,8 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - { - if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { - sp->initConfigProgressBarParameters(isUseDarkPalette(), pb, widget); -- -- QBrush brush = sp->m_ProgressBarParameters.progressBarContentBrush; -+ QColor progressBarContentHightColor = sp->m_ProgressBarParameters.progressBarContentHightColor; -+ QColor progressBarContentMidLightColor = sp->m_ProgressBarParameters.progressBarContentMidLightColor; - - const bool vertical = pb->orientation == Qt::Vertical; - const bool inverted = pb->invertedAppearance; -@@ -5884,10 +5955,19 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - if (inverted) - reverse = !reverse; - -- QColor progressBarContentHightColor = sp->m_ProgressBarParameters.progressBarContentHightColor; -- QColor progressBarContentMidLightColor = sp->m_ProgressBarParameters.progressBarContentMidLightColor; -- - QLinearGradient linearGradient; -+ if(vertical){ -+ linearGradient.setStart(pb->rect.bottomRight()); -+ linearGradient.setFinalStop(pb->rect.topLeft()); -+ } -+ else{ -+ linearGradient.setStart(pb->rect.topLeft()); -+ linearGradient.setFinalStop(pb->rect.bottomRight()); -+ } -+ linearGradient.setColorAt(0, progressBarContentMidLightColor); -+ linearGradient.setColorAt(1, progressBarContentHightColor); -+ QBrush brush(linearGradient); -+ - if (QVariantAnimation *animation = m_animation_helper->animation(option->styleObject)) { - if(animation->state() == QAbstractAnimation::Running){ - bool forward = animation->direction() == QAbstractAnimation::Forward; -@@ -5919,7 +5999,6 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - } - } - -- - painter->save(); - painter->setRenderHint(QPainter::Antialiasing, sp->m_ProgressBarParameters.radius != 0); - QColor penColor = sp->m_ProgressBarParameters.progressBarContentPen.color(); -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -index 6a4b64f..eee5cb3 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -@@ -23,13 +23,16 @@ - #ifndef UKUICONFIGSTYLE_H - #define UKUICONFIGSTYLE_H - -+#include <QSharedPointer> - #include <QProxyStyle> -- - #include <QFontMetrics> - #include <QStyleOption> - #include <private/qtextengine_p.h> - #include <qmath.h> - #include <QGSettings> -+#include "widget-parameters/control-parameters.h" -+ -+using namespace std; - - class QStyleOptionViewItem; - class QDBusInterface; -@@ -206,6 +209,8 @@ private: - bool m_blink_cursor = true; - int m_blink_cursor_time = 1200; - -+ mutable QHash<const QWidget*, UKUIConfigStyleSpace::ControlParameters *> m_controlParameters; -+ - }; - - #endif // UKUICONFIGSTYLE_H -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h -index 9612e78..3166b90 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h -@@ -26,10 +26,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigCheckBoxParameters -+class ConfigCheckBoxParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigCheckBoxParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h -index e6a4def..37725a1 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h -@@ -25,10 +25,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigComboBoxParameters -+class ConfigComboBoxParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigComboBoxParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h -index 2d6eaf1..954c41d 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h -@@ -27,10 +27,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigLineEditParameters -+class ConfigLineEditParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigLineEditParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -index e3b8a69..34e5b9d 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -@@ -26,10 +26,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigListParameters -+class ConfigListParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigListParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h -index 7cf419f..9364713 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h -@@ -27,10 +27,13 @@ - #include <QPixmap> - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigMenuParameters -+class ConfigMenuParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigMenuParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h -index c79b738..b6d4dc7 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h -@@ -26,10 +26,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigProgressBarParameters -+class ConfigProgressBarParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigProgressBarParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h -index 82ce1fd..e2e7ad2 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h -@@ -27,10 +27,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigPushButtonParameters -+class ConfigPushButtonParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigPushButtonParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h -index d1e738d..66b0cd4 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h -@@ -25,10 +25,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigRadioButtonParameters -+class ConfigRadioButtonParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigRadioButtonParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h -index 1ecfb2f..b406b43 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h -@@ -25,10 +25,13 @@ - #define SCROLLBARPARAMETERS_H - - #include <QBrush> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigScrollBarParameters -+class ConfigScrollBarParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigScrollBarParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -index ef39fab..bc539fd 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -@@ -27,10 +27,13 @@ - #include <QBrush> - #include <QPainterPath> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigSliderParameters -+class ConfigSliderParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigSliderParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h -index 54c808f..7e09907 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h -@@ -26,11 +26,12 @@ - - #include <QBrush> - #include <QPen> -- -+#include "control-parameters.h" - namespace UKUIConfigStyleSpace { - --class ConfigSpinBoxParameters -+class ConfigSpinBoxParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigSpinBoxParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -index 53a9a8d..1c057e2 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -@@ -25,11 +25,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" - - namespace UKUIConfigStyleSpace { - --class ConfigTableParameters -+class ConfigTableParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigTableParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -index eb85537..487a10d 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -@@ -26,10 +26,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigTabWidgetParameters -+class ConfigTabWidgetParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigTabWidgetParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h -index 81b2c9b..741b812 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h -@@ -26,10 +26,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigToolButtonParameters -+class ConfigToolButtonParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigToolButtonParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h -index b126159..3f3be97 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h -@@ -26,10 +26,12 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" - namespace UKUIConfigStyleSpace { - --class ConfigToolTipParameters -+class ConfigToolTipParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigToolTipParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -index e5291f7..ef357f3 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -@@ -25,10 +25,12 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" - namespace UKUIConfigStyleSpace { - --class ConfigTreeParameters -+class ConfigTreeParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigTreeParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp -new file mode 100644 -index 0000000..e5cbe7e ---- /dev/null -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp -@@ -0,0 +1,34 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: xibowen <lanyue@kylinos.cn> -+ * -+ */ -+ -+ -+#include "control-parameters.h" -+using namespace UKUIConfigStyleSpace; -+ -+ControlParameters::ControlParameters(QObject *parent) : QObject(parent) -+{ -+ -+} -+ControlParameters::~ControlParameters() -+{ -+ -+} -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h -new file mode 100644 -index 0000000..bdaf05f ---- /dev/null -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h -@@ -0,0 +1,42 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: xibowen <lanyue@kylinos.cn> -+ * -+ */ -+ -+ -+#ifndef ControlParameters_H -+#define ControlParameters_H -+ -+#include <QObject> -+ -+namespace UKUIConfigStyleSpace { -+ -+class ControlParameters : public QObject -+{ -+ Q_OBJECT -+public: -+ explicit ControlParameters(QObject *parent = nullptr); -+ -+ ~ControlParameters(); -+ -+// virtual void getParameters(){} -+}; -+} -+#endif // ControlParameters_H -diff --git a/ukui-styles/ukui-style-plugin.cpp b/ukui-styles/ukui-style-plugin.cpp -index 9b56722..ae81514 100644 ---- a/ukui-styles/ukui-style-plugin.cpp -+++ b/ukui-styles/ukui-style-plugin.cpp -@@ -57,6 +57,7 @@ UKUIStylePlugin::UKUIStylePlugin(QObject *parent) : - if (appStyleSettings->currentStyleStretagy() != ApplicationStyleSettings::Default) - return; - -+ qDebug() << "UKUIStyleSettings change...." << key; - auto styleName = settings->get("styleName").toString(); - auto widgetThemeName = settings->get("widgetThemeName").toString(); - diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0032-Update-changelog-4.1.0.0-0k31.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0032-Update-changelog-4.1.0.0-0k31.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0032-Update-changelog-4.1.0.0-0k31.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0032-Update-changelog-4.1.0.0-0k31.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,1858 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Thu, 22 Feb 2024 17:08:34 +0800 -Subject: Update changelog 4.1.0.0-0k31 - ---- - .../ukui-config-style-parameters.cpp | 743 +++++++++------------ - .../ukui-config-style-parameters.h | 38 +- - .../qt5-config-style-ukui/ukui-config-style.cpp | 167 ++--- - .../qt5-config-style-ukui/ukui-config-style.h | 7 +- - .../widget-parameters/config-checkbox-parameters.h | 5 +- - .../widget-parameters/config-combobox-parameters.h | 5 +- - .../widget-parameters/config-lineedit-parameters.h | 5 +- - .../widget-parameters/config-list-parameters.h | 5 +- - .../widget-parameters/config-menu-parameters.h | 5 +- - .../config-progressbar-parameters.h | 5 +- - .../config-pushbutton-parameters.h | 5 +- - .../config-radiobutton-parameters.h | 5 +- - .../config-scrollbar-parameters.h | 5 +- - .../widget-parameters/config-slider-parameters.h | 5 +- - .../widget-parameters/config-spinbox-parameters.h | 5 +- - .../widget-parameters/config-table-parameters.h | 4 +- - .../config-tabwidget-parameters.h | 5 +- - .../config-toolbutton-parameters.h | 5 +- - .../widget-parameters/config-tooltip-parameters.h | 4 +- - .../widget-parameters/config-tree-parameters.h | 4 +- - .../widget-parameters/control-parameters.cpp | 34 - - .../widget-parameters/control-parameters.h | 42 -- - ukui-styles/ukui-style-plugin.cpp | 1 - - 23 files changed, 406 insertions(+), 703 deletions(-) - delete mode 100644 ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp - delete mode 100644 ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h - -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index 9359bf8..e0b3777 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -138,7 +138,6 @@ void UKUIConfigStyleParameters::initialDefaultPaletteColor(QString colorPath, bo - m_readCfg = nullptr; - } - -- qDebug() << "ReadThemeConfig...." << isDark; - m_readCfg = new ReadThemeConfig(colorPath, isDark); - m_adjustColorRules = m_readCfg->getColorValueAdjustRules() == "HSL" ? AdjustColorRules::HSL : AdjustColorRules::DefaultRGB; - UKUIColorTheme::PaletteColorCfg paletteColorCfg = m_readCfg->paletteColorCfg(); -@@ -659,7 +658,7 @@ bool UKUIConfigStyleParameters::colorIsSame(QColor oldColor, QColor newColor) - return (oldColor == newColor); - } - --ConfigPushButtonParameters* UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - bool isWindowButton = false; - bool isWindowColoseButton = false; -@@ -667,13 +666,8 @@ ConfigPushButtonParameters* UKUIConfigStyleParameters::initConfigPushButtonBevel - bool useButtonPalette = false; - bool needTranslucent = false; - -- UKUIColorTheme::ButtonColorCfg buttonColorCfg = readCfg()->buttonColorCfg(widget->palette()); - -- if(widget->objectName() == "button3333"){ -- qDebug() << "button,,,, color" << widget->palette().color(QPalette::Button).red() << -- widget->palette().color(QPalette::Button).green() << -- widget->palette().color(QPalette::Button).blue(); -- } -+ UKUIColorTheme::ButtonColorCfg buttonColorCfg = readCfg()->buttonColorCfg(option->palette); - - if (widget) { - if (widget->property("isWindowButton").isValid()) { -@@ -708,6 +702,7 @@ ConfigPushButtonParameters* UKUIConfigStyleParameters::initConfigPushButtonBevel - } - if (isImportant) - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -+ - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - -@@ -718,8 +713,8 @@ ConfigPushButtonParameters* UKUIConfigStyleParameters::initConfigPushButtonBevel - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; -- linearGradient.setStart(widget->rect().topLeft()); -- linearGradient.setFinalStop(widget->rect().bottomLeft()); -+ linearGradient.setStart(option->rect.topLeft()); -+ linearGradient.setFinalStop(option->rect.bottomLeft()); - - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -@@ -881,31 +876,6 @@ ConfigPushButtonParameters* UKUIConfigStyleParameters::initConfigPushButtonBevel - } - } - -- //label -- -- bool iconHighlight = false; -- bool textHighlight = false; -- -- auto button = qobject_cast<const QPushButton *>(widget); -- if(button && button->isCheckable() && button->isChecked() && widget->isEnabled()){ -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -- } -- -- QColor textDefaultColor = buttonColorCfg.textDefaultColor; -- QColor textHoverColor = buttonColorCfg.textHoverColor; -- QColor textDisableColor = buttonColorCfg.textDisableColor; -- -- //icon -- if ((isWindowButton || useButtonPalette) && !(button && button->isCheckable() && button->isChecked())) { -- iconHighlight = false; -- } else { -- iconHighlight = true; -- } -- -- if(m_adjustColorRules == AdjustColorRules::HSL) -- iconHighlight = false; -- -- - auto *w = const_cast<QWidget *>(widget); - - if (w) { -@@ -927,21 +897,6 @@ ConfigPushButtonParameters* UKUIConfigStyleParameters::initConfigPushButtonBevel - w->setProperty("checkClickPen", checkClickPen); - w->setProperty("checkDisablePen", checkDisablePen); - w->setProperty("focusPen", focusPen); -- -- w->setProperty("iconHighlight", iconHighlight); -- w->setProperty("textHighlight", textHighlight); -- w->setProperty("textDefaultColor", textDefaultColor); -- w->setProperty("textHoverColor", textHoverColor); -- w->setProperty("textDisableColor", textDisableColor); -- if(w->objectName() == "button3333"){ -- qDebug() << "set property000000000" << w->property("defaultBrush").value<QBrush>().color().red() << -- w->property("defaultBrush").value<QBrush>().color().green() << -- w->property("defaultBrush").value<QBrush>().color().blue(); -- qDebug() << "set property111111111" << defaultBrush.color().red() << -- defaultBrush.color().green() << -- defaultBrush.color().blue(); -- -- } - } - - if (widget) { -@@ -999,134 +954,133 @@ ConfigPushButtonParameters* UKUIConfigStyleParameters::initConfigPushButtonBevel - if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { - focusPen = widget->property("setFocusPen").value<QPen>(); - } -- -- if (widget->property("setIconHoverClickHighlight").isValid() && widget->property("setIconHoverClickHighlight").canConvert<bool>()) { -- iconHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); -- } -- if (widget->property("setTextHoverClickHighlight").isValid() && widget->property("setTextHoverClickHighlight").canConvert<bool>()) { -- textHighlight = widget->property("setTextHoverClickHighlight").value<bool>(); -- } -- if (widget->property("setTextDefaultColor").isValid() && widget->property("setTextDefaultColor").canConvert<QColor>()) { -- textDefaultColor = widget->property("setTextDefaultColor").value<QColor>(); -- } -- if (widget->property("setTextHoverColor").isValid() && widget->property("setTextHoverColor").canConvert<QColor>()) { -- textHoverColor = widget->property("setTextHoverColor").value<QColor>(); -- } -- if (widget->property("setTextDisableColor").isValid() && widget->property("setTextDisableColor").canConvert<QColor>()) { -- textDisableColor = widget->property("setTextDisableColor").value<QColor>(); -- } - } - -- ConfigPushButtonParameters* pushButtonParameters = new ConfigPushButtonParameters; -- -- pushButtonParameters->radius = radius; -- pushButtonParameters->pushButtonDefaultBrush = defaultBrush; -- pushButtonParameters->pushButtonClickBrush = clickBrush; -- pushButtonParameters->pushButtonHoverBrush = hoverBrush; -- pushButtonParameters->pushButtonDisableBrush = disableBrush; -- pushButtonParameters->pushButtonCheckBrush = checkBrush; -- pushButtonParameters->pushButtonCheckHoverBrush = checkHoverBrush; -- pushButtonParameters->pushButtonCheckClickBrush = checkClickBrush; -- pushButtonParameters->pushButtonCheckDisableBrush = checkDisableBrush; -- pushButtonParameters->pushButtonDefaultPen = defaultPen; -- pushButtonParameters->pushButtonClickPen = clickPen; -- pushButtonParameters->pushButtonHoverPen = hoverPen; -- pushButtonParameters->pushButtonDisablePen = disablePen; -- pushButtonParameters->pushButtonCheckPen = checkPen; -- pushButtonParameters->pushButtonCheckHoverPen = checkHoverPen; -- pushButtonParameters->pushButtonCheckClickPen = checkClickPen; -- pushButtonParameters->pushButtonCheckDisablePen = checkDisablePen; -- pushButtonParameters->pushButtonFocusPen = focusPen; -- -- pushButtonParameters->iconHoverClickHighlight = iconHighlight; -- pushButtonParameters->textHoverClickHighlight = textHighlight; -- pushButtonParameters->textDefaultColor = textDefaultColor; -- pushButtonParameters->textHoverColor = textHoverColor; -- pushButtonParameters->textDisableColor = textDisableColor; -- --// QSharedPointer<ConfigPushButtonParameters> qsp(pushButtonParameters); -- return pushButtonParameters; -+ m_PushButtonParameters.radius = radius; -+ m_PushButtonParameters.pushButtonDefaultBrush = defaultBrush; -+ m_PushButtonParameters.pushButtonClickBrush = clickBrush; -+ m_PushButtonParameters.pushButtonHoverBrush = hoverBrush; -+ m_PushButtonParameters.pushButtonDisableBrush = disableBrush; -+ m_PushButtonParameters.pushButtonCheckBrush = checkBrush; -+ m_PushButtonParameters.pushButtonCheckHoverBrush = checkHoverBrush; -+ m_PushButtonParameters.pushButtonCheckClickBrush = checkClickBrush; -+ m_PushButtonParameters.pushButtonCheckDisableBrush = checkDisableBrush; -+ m_PushButtonParameters.pushButtonDefaultPen = defaultPen; -+ m_PushButtonParameters.pushButtonClickPen = clickPen; -+ m_PushButtonParameters.pushButtonHoverPen = hoverPen; -+ m_PushButtonParameters.pushButtonDisablePen = disablePen; -+ m_PushButtonParameters.pushButtonCheckPen = checkPen; -+ m_PushButtonParameters.pushButtonCheckHoverPen = checkHoverPen; -+ m_PushButtonParameters.pushButtonCheckClickPen = checkClickPen; -+ m_PushButtonParameters.pushButtonCheckDisablePen = checkDisablePen; -+ m_PushButtonParameters.pushButtonFocusPen = focusPen; - } - --ConfigPushButtonParameters* UKUIConfigStyleParameters::getConfigPushButtonLabelProperty(ConfigPushButtonParameters* pushButtonParameters, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -+ bool iconHighlight = false; -+ bool textHighlight = false; -+ -+ const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option); -+ bool isWindowButton = false; -+ bool useButtonPalette = false; -+ bool isImportant = false; -+ bool isWindowColoseButton = false; -+ bool needTranslucent = false; -+ -+ UKUIColorTheme::ButtonColorCfg buttonColorCfg = readCfg()->buttonColorCfg(option->palette); -+ - if (widget) { -- if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -- pushButtonParameters->radius = widget->property("setRadius").value<int>(); -- } -- if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { -- pushButtonParameters->pushButtonDefaultBrush = widget->property("setDefaultBrush").value<QBrush>(); -- } -- if (widget->property("setClickBrush").isValid() && widget->property("setClickBrush").canConvert<QBrush>()) { -- pushButtonParameters->pushButtonClickBrush = widget->property("setClickBrush").value<QBrush>(); -- } -- if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { -- pushButtonParameters->pushButtonHoverBrush = widget->property("setHoverBrush").value<QBrush>(); -- } -- if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { -- pushButtonParameters->pushButtonDisableBrush = widget->property("setDisableBrush").value<QBrush>(); -- } -- if (widget->property("setCheckBrush").isValid() && widget->property("setCheckBrush").canConvert<QBrush>()) { -- pushButtonParameters->pushButtonCheckBrush = widget->property("setCheckBrush").value<QBrush>(); -- } -- if (widget->property("setCheckHoverBrush").isValid() && widget->property("setCheckHoverBrush").canConvert<QBrush>()) { -- pushButtonParameters->pushButtonCheckHoverBrush = widget->property("setCheckHoverBrush").value<QBrush>(); -- } -- if (widget->property("setCheckClickBrush").isValid() && widget->property("setCheckClickBrush").canConvert<QBrush>()) { -- pushButtonParameters->pushButtonCheckClickBrush = widget->property("setCheckClickBrush").value<QBrush>(); -- } -- if (widget->property("setCheckDisableBrush").isValid() && widget->property("setCheckDisableBrush").canConvert<QBrush>()) { -- pushButtonParameters->pushButtonCheckDisableBrush = widget->property("setCheckDisableBrush").value<QBrush>(); -- } -- if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { -- pushButtonParameters->pushButtonDefaultPen = widget->property("setDefaultPen").value<QPen>(); -- } -- if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { -- pushButtonParameters->pushButtonClickPen = widget->property("setClickPen").value<QPen>(); -- } -- if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { -- pushButtonParameters->pushButtonHoverPen = widget->property("setHoverPen").value<QPen>(); -- } -- if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { -- pushButtonParameters->pushButtonDisablePen = widget->property("setDisablePen").value<QPen>(); -- } -- if (widget->property("setCheckPen").isValid() && widget->property("setCheckPen").canConvert<QPen>()) { -- pushButtonParameters->pushButtonCheckPen = widget->property("setCheckPen").value<QPen>(); -- } -- if (widget->property("setCheckHoverPen").isValid() && widget->property("setCheckHoverPen").canConvert<QPen>()) { -- pushButtonParameters->pushButtonCheckHoverPen = widget->property("setCheckHoverPen").value<QPen>(); -+ if (widget->property("isWindowButton").isValid()) { -+ if (widget->property("isWindowButton").toInt() == 0x01) { -+ isWindowButton = true; -+ } -+ if (widget->property("isWindowButton").toInt() == 0x02) { -+ isWindowColoseButton = true; -+ } - } -- if (widget->property("setCheckClickPen").isValid() && widget->property("setCheckClickPen").canConvert<QPen>()) { -- pushButtonParameters->pushButtonCheckClickPen = widget->property("setCheckClickPen").value<QPen>(); -+ if (widget->property("isImportant").isValid()) { -+ isImportant = widget->property("isImportant").toBool(); - } -- if (widget->property("setCheckDisablePen").isValid() && widget->property("setCheckDisablePen").canConvert<QPen>()) { -- pushButtonParameters->pushButtonCheckDisablePen = widget->property("setCheckDisablePen").value<QPen>(); -+ -+ if (widget->property("useButtonPalette").isValid()) { -+ useButtonPalette = widget->property("useButtonPalette").toBool(); - } -- if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { -- pushButtonParameters->pushButtonFocusPen = widget->property("setFocusPen").value<QPen>(); -+ -+ if (widget->property("needTranslucent").isValid()) { -+ needTranslucent = widget->property("needTranslucent").toBool(); - } -+ } -+ if (isWindowColoseButton) -+ buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_WindowCloseButton); -+ if (isWindowButton) -+ buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_WindowButton); -+ if (useButtonPalette || isWindowButton) { -+ if (needTranslucent) -+ buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_TranslucentButton); -+ else -+ buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_UseButtonPalette); -+ } -+ if (isImportant) -+ buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -+ -+ if(option->state & QStyle::State_On && option->state & QStyle::State_Enabled){ -+ buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -+ } -+ -+ QColor textDefaultColor = buttonColorCfg.textDefaultColor; -+ QColor textHoverColor = buttonColorCfg.textHoverColor; -+ QColor textDisableColor = buttonColorCfg.textDisableColor; -+ -+ //icon -+ if ((isWindowButton || useButtonPalette) && !(button->state & QStyle::State_On)) { -+ iconHighlight = false; -+ } else { -+ iconHighlight = true; -+ } -+ -+ if(m_adjustColorRules == AdjustColorRules::HSL) -+ iconHighlight = false; -+ -+ auto *w = const_cast<QWidget *>(widget); -+ if (w) { -+ w->setProperty("iconHighlight", iconHighlight); -+ w->setProperty("textHighlight", textHighlight); -+ w->setProperty("textDefaultColor", textDefaultColor); -+ w->setProperty("textHoverColor", textHoverColor); -+ w->setProperty("textDisableColor", textDisableColor); -+ -+ } -+ -+ if (widget) { -+// if(!widget->isEnabled()) -+// textColor = option->palette.color(QPalette::Disabled, QPalette::ButtonText); - - if (widget->property("setIconHoverClickHighlight").isValid() && widget->property("setIconHoverClickHighlight").canConvert<bool>()) { -- pushButtonParameters->iconHoverClickHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); -+ iconHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); - } - if (widget->property("setTextHoverClickHighlight").isValid() && widget->property("setTextHoverClickHighlight").canConvert<bool>()) { -- pushButtonParameters->textHoverClickHighlight = widget->property("setTextHoverClickHighlight").value<bool>(); -+ textHighlight = widget->property("setTextHoverClickHighlight").value<bool>(); - } - if (widget->property("setTextDefaultColor").isValid() && widget->property("setTextDefaultColor").canConvert<QColor>()) { -- pushButtonParameters->textDefaultColor = widget->property("setTextDefaultColor").value<QColor>(); -+ textDefaultColor = widget->property("setTextDefaultColor").value<QColor>(); - } - if (widget->property("setTextHoverColor").isValid() && widget->property("setTextHoverColor").canConvert<QColor>()) { -- pushButtonParameters->textHoverColor = widget->property("setTextHoverColor").value<QColor>(); -+ textHoverColor = widget->property("setTextHoverColor").value<QColor>(); - } - if (widget->property("setTextDisableColor").isValid() && widget->property("setTextDisableColor").canConvert<QColor>()) { -- pushButtonParameters->textDisableColor = widget->property("setTextDisableColor").value<QColor>(); -+ textDisableColor = widget->property("setTextDisableColor").value<QColor>(); - } - } - -- return pushButtonParameters; -+ m_PushButtonParameters.iconHoverClickHighlight = iconHighlight; -+ m_PushButtonParameters.textHoverClickHighlight = textHighlight; -+ m_PushButtonParameters.textDefaultColor = textDefaultColor; -+ m_PushButtonParameters.textHoverColor = textHoverColor; -+ m_PushButtonParameters.textDisableColor = textDisableColor; - } - --ConfigToolButtonParameters* UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - bool isWindowButton = false; - bool isWindowColoseButton = false; -@@ -1421,30 +1375,27 @@ ConfigToolButtonParameters* UKUIConfigStyleParameters::initConfigToolButtonPanel - } - } - -- ConfigToolButtonParameters* parameters = new ConfigToolButtonParameters; -- -- parameters->radius = radius; -- parameters->toolButtonDefaultBrush = defaultBrush; -- parameters->toolButtonClickBrush = clickBrush; -- parameters->toolButtonHoverBrush = hoverBrush; -- parameters->toolButtonDisableBrush = disableBrush; -- parameters->toolButtonCheckBrush = checkBrush; -- parameters->toolButtonCheckHoverBrush = checkHoverBrush; -- parameters->toolButtonCheckClickBrush = checkClickBrush; -- parameters->toolButtonCheckDisableBrush = checkDisableBrush; -- parameters->toolButtonDefaultPen = defaultPen; -- parameters->toolButtonClickPen = clickPen; -- parameters->toolButtonHoverPen = hoverPen; -- parameters->toolButtonDisablePen = disablePen; -- parameters->toolButtonCheckPen = checkPen; -- parameters->toolButtonCheckHoverPen = checkHoverPen; -- parameters->toolButtonCheckClickPen = checkClickPen; -- parameters->toolButtonCheckDisablePen = checkDisablePen; -- parameters->toolButtonFocusPen = focusPen; -- return parameters; -+ m_ToolButtonParameters.radius = radius; -+ m_ToolButtonParameters.toolButtonDefaultBrush = defaultBrush; -+ m_ToolButtonParameters.toolButtonClickBrush = clickBrush; -+ m_ToolButtonParameters.toolButtonHoverBrush = hoverBrush; -+ m_ToolButtonParameters.toolButtonDisableBrush = disableBrush; -+ m_ToolButtonParameters.toolButtonCheckBrush = checkBrush; -+ m_ToolButtonParameters.toolButtonCheckHoverBrush = checkHoverBrush; -+ m_ToolButtonParameters.toolButtonCheckClickBrush = checkClickBrush; -+ m_ToolButtonParameters.toolButtonCheckDisableBrush = checkDisableBrush; -+ m_ToolButtonParameters.toolButtonDefaultPen = defaultPen; -+ m_ToolButtonParameters.toolButtonClickPen = clickPen; -+ m_ToolButtonParameters.toolButtonHoverPen = hoverPen; -+ m_ToolButtonParameters.toolButtonDisablePen = disablePen; -+ m_ToolButtonParameters.toolButtonCheckPen = checkPen; -+ m_ToolButtonParameters.toolButtonCheckHoverPen = checkHoverPen; -+ m_ToolButtonParameters.toolButtonCheckClickPen = checkClickPen; -+ m_ToolButtonParameters.toolButtonCheckDisablePen = checkDisablePen; -+ m_ToolButtonParameters.toolButtonFocusPen = focusPen; - } - --ConfigToolButtonParameters* UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - bool iconHighlight = false; - bool textHighlight = false; -@@ -1539,17 +1490,14 @@ ConfigToolButtonParameters* UKUIConfigStyleParameters::initConfigToolButtonLabel - } - } - -- ConfigToolButtonParameters* parameters = new ConfigToolButtonParameters; -- -- parameters->iconHoverClickHighlight = iconHighlight; -- parameters->textHoverClickHighlight = textHighlight; -- parameters->textDefaultColor = textDefaultColor; -- parameters->textHoverColor = textHoverColor; -- parameters->textDisableColor = textDisableColor; -- return parameters; -+ m_ToolButtonParameters.iconHoverClickHighlight = iconHighlight; -+ m_ToolButtonParameters.textHoverClickHighlight = textHighlight; -+ m_ToolButtonParameters.textDefaultColor = textDefaultColor; -+ m_ToolButtonParameters.textHoverColor = textHoverColor; -+ m_ToolButtonParameters.textDisableColor = textDisableColor; - } - --ConfigLineEditParameters* UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -1627,21 +1575,18 @@ ConfigLineEditParameters* UKUIConfigStyleParameters::initConfigLineEditParameter - } - } - -- ConfigLineEditParameters* parameters = new ConfigLineEditParameters; -- -- parameters->radius = radius; -- parameters->lineEditDefaultBrush = defaultBrush; -- parameters->lineEditHoverBrush = hoverBrush; -- parameters->lineEditFocusBrush = focusBrush; -- parameters->lineEditDisableBrush = disableBrush; -- parameters->lineEditDefaultPen = defaultPen; -- parameters->lineEditHoverPen = hoverPen; -- parameters->lineEditFocusPen = focusPen; -- parameters->lineEditDisablePen = disablePen; -- return parameters; -+ m_LineEditParameters.radius = radius; -+ m_LineEditParameters.lineEditDefaultBrush = defaultBrush; -+ m_LineEditParameters.lineEditHoverBrush = hoverBrush; -+ m_LineEditParameters.lineEditFocusBrush = focusBrush; -+ m_LineEditParameters.lineEditDisableBrush = disableBrush; -+ m_LineEditParameters.lineEditDefaultPen = defaultPen; -+ m_LineEditParameters.lineEditHoverPen = hoverPen; -+ m_LineEditParameters.lineEditFocusPen = focusPen; -+ m_LineEditParameters.lineEditDisablePen = disablePen; - } - --ConfigSpinBoxParameters* UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout) -+void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - -@@ -1967,46 +1912,43 @@ ConfigSpinBoxParameters* UKUIConfigStyleParameters::initConfigSpinBoxParameters( - } - } - -- ConfigSpinBoxParameters* parameters = new ConfigSpinBoxParameters; -- -- parameters->radius = radius; -- parameters->spinBoxDefaultBrush = defaultBrush; -- parameters->spinBoxHoverBrush = hoverBrush; -- parameters->spinBoxFocusBrush = focusBrush; -- parameters->spinBoxDisableBrush = disableBrush; -- -- parameters->spinBoxDefaultPen = defaultPen; -- parameters->spinBoxHoverPen = hoverPen; -- parameters->spinBoxFocusPen = focusPen; -- parameters->spinBoxDisablePen = disablePen; -- -- parameters->spinBoxUpDefaultBrush = upDefaultBrush; -- parameters->spinBoxUpHoverBrush = upHoverBrush; -- parameters->spinBoxUpFocusHoverBrush = upFocusHoverBrush; -- parameters->spinBoxUpClickBrush = upClickBrush; -- parameters->spinBoxDownHoverBrush = downHoverBrush; -- parameters->spinBoxDownFocusHoverBrush = downFocusHoverBrush; -- parameters->spinBoxDownClickBrush = downClickBrush; -- parameters->spinBoxDownDefaultBrush = downDefaultBrush; -- -- parameters->spinBoxUpDefaultPen = upDefaultPen; -- parameters->spinBoxUpHoverPen = upHoverPen; -- parameters->spinBoxUpFocusHoverPen = upFocusHoverPen; -- parameters->spinBoxUpClickPen = upClickPen; -- parameters->spinBoxUpDisablePen = upDisablePen; -- -- parameters->spinBoxDownDefaultPen = downDefaultPen; -- parameters->spinBoxDownHoverPen = downHoverPen; -- parameters->spinBoxDownFocusHoverPen = downFocusHoverPen; -- parameters->spinBoxDownClickPen = downClickPen; -- parameters->spinBoxDownDisablePen = downDisablePen; -- -- parameters->spinBoxUpIconHightPixMap = (m_adjustColorRules == 0 ? true : false); -- parameters->spinBoxDownIconHightPixMap = (m_adjustColorRules == 0 ? true : false); -- return parameters; -+ m_SpinBoxParameters.radius = radius; -+ m_SpinBoxParameters.spinBoxDefaultBrush = defaultBrush; -+ m_SpinBoxParameters.spinBoxHoverBrush = hoverBrush; -+ m_SpinBoxParameters.spinBoxFocusBrush = focusBrush; -+ m_SpinBoxParameters.spinBoxDisableBrush = disableBrush; -+ -+ m_SpinBoxParameters.spinBoxDefaultPen = defaultPen; -+ m_SpinBoxParameters.spinBoxHoverPen = hoverPen; -+ m_SpinBoxParameters.spinBoxFocusPen = focusPen; -+ m_SpinBoxParameters.spinBoxDisablePen = disablePen; -+ -+ m_SpinBoxParameters.spinBoxUpDefaultBrush = upDefaultBrush; -+ m_SpinBoxParameters.spinBoxUpHoverBrush = upHoverBrush; -+ m_SpinBoxParameters.spinBoxUpFocusHoverBrush = upFocusHoverBrush; -+ m_SpinBoxParameters.spinBoxUpClickBrush = upClickBrush; -+ m_SpinBoxParameters.spinBoxDownHoverBrush = downHoverBrush; -+ m_SpinBoxParameters.spinBoxDownFocusHoverBrush = downFocusHoverBrush; -+ m_SpinBoxParameters.spinBoxDownClickBrush = downClickBrush; -+ m_SpinBoxParameters.spinBoxDownDefaultBrush = downDefaultBrush; -+ -+ m_SpinBoxParameters.spinBoxUpDefaultPen = upDefaultPen; -+ m_SpinBoxParameters.spinBoxUpHoverPen = upHoverPen; -+ m_SpinBoxParameters.spinBoxUpFocusHoverPen = upFocusHoverPen; -+ m_SpinBoxParameters.spinBoxUpClickPen = upClickPen; -+ m_SpinBoxParameters.spinBoxUpDisablePen = upDisablePen; -+ -+ m_SpinBoxParameters.spinBoxDownDefaultPen = downDefaultPen; -+ m_SpinBoxParameters.spinBoxDownHoverPen = downHoverPen; -+ m_SpinBoxParameters.spinBoxDownFocusHoverPen = downFocusHoverPen; -+ m_SpinBoxParameters.spinBoxDownClickPen = downClickPen; -+ m_SpinBoxParameters.spinBoxDownDisablePen = downDisablePen; -+ -+ m_SpinBoxParameters.spinBoxUpIconHightPixMap = (m_adjustColorRules == 0 ? true : false); -+ m_SpinBoxParameters.spinBoxDownIconHightPixMap = (m_adjustColorRules == 0 ? true : false); - } - --ConfigComboBoxParameters* UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -2104,26 +2046,23 @@ ConfigComboBoxParameters* UKUIConfigStyleParameters::initConfigComboBoxParameter - } - } - -- ConfigComboBoxParameters* parameters = new ConfigComboBoxParameters; -+ m_ComboBoxParameters.radius = radius; - -- parameters->radius = radius; -+ m_ComboBoxParameters.comboBoxDefaultBrush = defaultBrush; -+ m_ComboBoxParameters.comboBoxHoverBrush = hoverBrush; -+ m_ComboBoxParameters.comboBoxOnBrush = onBrush; -+ m_ComboBoxParameters.comboBoxEditBrush = editBrush; -+ m_ComboBoxParameters.comboBoxDisableBrush = disableBrush; - -- parameters->comboBoxDefaultBrush = defaultBrush; -- parameters->comboBoxHoverBrush = hoverBrush; -- parameters->comboBoxOnBrush = onBrush; -- parameters->comboBoxEditBrush = editBrush; -- parameters->comboBoxDisableBrush = disableBrush; -- -- parameters->comboBoxDefaultPen = defaultPen; -- parameters->comboBoxHoverPen = hoverPen; -- parameters->comboBoxOnPen = onPen; -- parameters->comboBoxEditPen = editPen; -- parameters->comboBoxDisablePen = disablePen; -- parameters->comboBoxFocusPen = focusPen; -- return parameters; -+ m_ComboBoxParameters.comboBoxDefaultPen = defaultPen; -+ m_ComboBoxParameters.comboBoxHoverPen = hoverPen; -+ m_ComboBoxParameters.comboBoxOnPen = onPen; -+ m_ComboBoxParameters.comboBoxEditPen = editPen; -+ m_ComboBoxParameters.comboBoxDisablePen = disablePen; -+ m_ComboBoxParameters.comboBoxFocusPen = focusPen; - } - --ConfigListParameters* UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -2246,23 +2185,20 @@ ConfigListParameters* UKUIConfigStyleParameters::initConfigListParameters(bool i - } - } - -- ConfigListParameters* parameters = new ConfigListParameters; -- -- parameters->radius = radius; -- parameters->listDefaultBrush = defaultBrush; -- parameters->listHoverBrush = hoverBrush; -- parameters->listSelectBrush = selectBrush; -- parameters->listDisableBrush = disableBrush; -- parameters->listTextHoverPen = textHoverPen; -- parameters->listTextSelectPen = textSelectPen; -- parameters->listTextDisablePen = textDisablePen; -- parameters->listHoverPen = hoverPen; -- parameters->listSelectPen = selectPen; -- parameters->listFocusPen = focusPen; -- return parameters; -+ m_ListParameters.radius = radius; -+ m_ListParameters.listDefaultBrush = defaultBrush; -+ m_ListParameters.listHoverBrush = hoverBrush; -+ m_ListParameters.listSelectBrush = selectBrush; -+ m_ListParameters.listDisableBrush = disableBrush; -+ m_ListParameters.listTextHoverPen = textHoverPen; -+ m_ListParameters.listTextSelectPen = textSelectPen; -+ m_ListParameters.listTextDisablePen = textDisablePen; -+ m_ListParameters.listHoverPen = hoverPen; -+ m_ListParameters.listSelectPen = selectPen; -+ m_ListParameters.listFocusPen = focusPen; - } - --ConfigTreeParameters* UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -2406,29 +2342,26 @@ ConfigTreeParameters* UKUIConfigStyleParameters::initConfigTreeParameters(bool i - } - } - -- ConfigTreeParameters* parameters = new ConfigTreeParameters; -+ m_TreeParameters.radius = radius; -+ m_TreeParameters.treeDefaultBrush = defaultBrush; -+ m_TreeParameters.treeHoverBrush = hoverBrush; -+ m_TreeParameters.treeSelectBrush = selectBrush; -+ m_TreeParameters.treeDisableBrush = disableBrush; - -- parameters->radius = radius; -- parameters->treeDefaultBrush = defaultBrush; -- parameters->treeHoverBrush = hoverBrush; -- parameters->treeSelectBrush = selectBrush; -- parameters->treeDisableBrush = disableBrush; -+ m_TreeParameters.treeBranchDefaultBrush = branchDefaultBrush; -+ m_TreeParameters.treeBranchHoverBrush = branchHoverBrush; -+ m_TreeParameters.treeBranchSelectBrush = branchSelectBrush; -+ m_TreeParameters.treeBranchDisableBrush = branchDisableBrush; - -- parameters->treeBranchDefaultBrush = branchDefaultBrush; -- parameters->treeBranchHoverBrush = branchHoverBrush; -- parameters->treeBranchSelectBrush = branchSelectBrush; -- parameters->treeBranchDisableBrush = branchDisableBrush; -- -- parameters->treeHoverPen = hoverPen; -- parameters->treeSelectPen = selectPen; -- parameters->treeFocusPen = focusPen; -- parameters->treeTextHoverPen = textHoverPen; -- parameters->treeTextSelectPen = textSelectPen; -- parameters->treeTextDisablePen = textDisablePen; -- return parameters; -+ m_TreeParameters.treeHoverPen = hoverPen; -+ m_TreeParameters.treeSelectPen = selectPen; -+ m_TreeParameters.treeFocusPen = focusPen; -+ m_TreeParameters.treeTextHoverPen = textHoverPen; -+ m_TreeParameters.treeTextSelectPen = textSelectPen; -+ m_TreeParameters.treeTextDisablePen = textDisablePen; - } - --ConfigTableParameters* UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -2544,24 +2477,21 @@ ConfigTableParameters* UKUIConfigStyleParameters::initConfigTableParameters(bool - } - } - -- ConfigTableParameters* parameters = new ConfigTableParameters; -- -- parameters->radius = radius; -- parameters->tableDefaultBrush = defaultBrush; -- parameters->tableHoverBrush = hoverBrush; -- parameters->tableSelectBrush = selectBrush; -- parameters->tableDisableBrush = disableBrush; -- parameters->tableHoverPen = hoverPen; -- parameters->tableSelectPen = selectPen; -- parameters->tableFocusPen = focusPen; -+ m_TableParameters.radius = radius; -+ m_TableParameters.tableDefaultBrush = defaultBrush; -+ m_TableParameters.tableHoverBrush = hoverBrush; -+ m_TableParameters.tableSelectBrush = selectBrush; -+ m_TableParameters.tableDisableBrush = disableBrush; -+ m_TableParameters.tableHoverPen = hoverPen; -+ m_TableParameters.tableSelectPen = selectPen; -+ m_TableParameters.tableFocusPen = focusPen; - -- parameters->tableTextHoverPen = textHoverPen; -- parameters->tableTextSelectPen = textSelectPen; -- parameters->tableTextDisablePen = textDisablePen; -- return parameters; -+ m_TableParameters.tableTextHoverPen = textHoverPen; -+ m_TableParameters.tableTextSelectPen = textSelectPen; -+ m_TableParameters.tableTextDisablePen = textDisablePen; - } - --ConfigCheckBoxParameters* UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - bool needTranslucent = false; - if (widget && widget->property("needTranslucent").isValid()) { -@@ -2774,33 +2704,30 @@ ConfigCheckBoxParameters* UKUIConfigStyleParameters::initConfigCheckBoxParameter - // qDebug() << "defaultpen..." << defaultPen.color().red() << defaultPen.color().green() << defaultPen.color().blue(); - - // qDebug() << "defaultbrush..." << defaultBrush.color().red() << defaultBrush.color().green() << defaultBrush.color().blue(); -- ConfigCheckBoxParameters* parameters = new ConfigCheckBoxParameters; -- -- parameters->radius = radius; -- parameters->checkBoxDefaultPen = defaultPen; -- parameters->checkBoxHoverPen = hoverPen; -- parameters->checkBoxClickPen = clickPen; -- parameters->checkBoxDisablePen = disablePen; -- parameters->checkBoxOnDefaultPen = onDefaultPen; -- parameters->checkBoxOnHoverPen = onHoverPen; -- parameters->checkBoxOnClickPen = onClickPen; -- parameters->checkBoxContentPen = contentPen; -- -- parameters->checkBoxDefaultBrush = defaultBrush; -- parameters->checkBoxHoverBrush = hoverBrush; -- parameters->checkBoxClickBrush = clickBrush; -- parameters->checkBoxDisableBrush = disableBrush; -- parameters->checkBoxOnDefaultBrush = onDefaultBrush; -- parameters->checkBoxOnHoverBrush = onHoverBrush; -- parameters->checkBoxOnClickBrush = onClickBrush; -- parameters->checkBoxPathBrush = pathBrush; -- parameters->checkBoxPathDisableBrush = pathDisableBrush; -- -- parameters->onHoverBrushIslinearGradient = onHoverBrushIslinearGradient; -- return parameters; -+ m_CheckBoxParameters.radius = radius; -+ m_CheckBoxParameters.checkBoxDefaultPen = defaultPen; -+ m_CheckBoxParameters.checkBoxHoverPen = hoverPen; -+ m_CheckBoxParameters.checkBoxClickPen = clickPen; -+ m_CheckBoxParameters.checkBoxDisablePen = disablePen; -+ m_CheckBoxParameters.checkBoxOnDefaultPen = onDefaultPen; -+ m_CheckBoxParameters.checkBoxOnHoverPen = onHoverPen; -+ m_CheckBoxParameters.checkBoxOnClickPen = onClickPen; -+ m_CheckBoxParameters.checkBoxContentPen = contentPen; -+ -+ m_CheckBoxParameters.checkBoxDefaultBrush = defaultBrush; -+ m_CheckBoxParameters.checkBoxHoverBrush = hoverBrush; -+ m_CheckBoxParameters.checkBoxClickBrush = clickBrush; -+ m_CheckBoxParameters.checkBoxDisableBrush = disableBrush; -+ m_CheckBoxParameters.checkBoxOnDefaultBrush = onDefaultBrush; -+ m_CheckBoxParameters.checkBoxOnHoverBrush = onHoverBrush; -+ m_CheckBoxParameters.checkBoxOnClickBrush = onClickBrush; -+ m_CheckBoxParameters.checkBoxPathBrush = pathBrush; -+ m_CheckBoxParameters.checkBoxPathDisableBrush = pathDisableBrush; -+ -+ m_CheckBoxParameters.onHoverBrushIslinearGradient = onHoverBrushIslinearGradient; - } - --ConfigRadioButtonParameters* UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - m_RadioButtonParameters.radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -3002,32 +2929,29 @@ ConfigRadioButtonParameters* UKUIConfigStyleParameters::initConfigRadioButtonPar - } - } - -- ConfigRadioButtonParameters* parameters = new ConfigRadioButtonParameters; -- -- parameters->radioButtonDefaultPen = defaultPen; -- parameters->radioButtonHoverPen = hoverPen; -- parameters->radioButtonClickPen = clickPen; -- parameters->radioButtonDisablePen = disablePen; -- parameters->radioButtonOnDefaultPen = onDefaultPen; -- parameters->radioButtonOnHoverPen = onHoverPen; -- parameters->radioButtonOnClickPen = onClickPen; -+ m_RadioButtonParameters.radioButtonDefaultPen = defaultPen; -+ m_RadioButtonParameters.radioButtonHoverPen = hoverPen; -+ m_RadioButtonParameters.radioButtonClickPen = clickPen; -+ m_RadioButtonParameters.radioButtonDisablePen = disablePen; -+ m_RadioButtonParameters.radioButtonOnDefaultPen = onDefaultPen; -+ m_RadioButtonParameters.radioButtonOnHoverPen = onHoverPen; -+ m_RadioButtonParameters.radioButtonOnClickPen = onClickPen; - -- parameters->radioButtonDefaultBrush = defaultBrush; -- parameters->radioButtonHoverBrush = hoverBrush; -- parameters->radioButtonClickBrush = clickBrush; -- parameters->radioButtonDisableBrush = disableBrush; -- parameters->radioButtonOnDefaultBrush = onDefaultBrush; -- parameters->radioButtonOnHoverBrush = onHoverBrush; -- parameters->radioButtonOnClickBrush = onClickBrush; -+ m_RadioButtonParameters.radioButtonDefaultBrush = defaultBrush; -+ m_RadioButtonParameters.radioButtonHoverBrush = hoverBrush; -+ m_RadioButtonParameters.radioButtonClickBrush = clickBrush; -+ m_RadioButtonParameters.radioButtonDisableBrush = disableBrush; -+ m_RadioButtonParameters.radioButtonOnDefaultBrush = onDefaultBrush; -+ m_RadioButtonParameters.radioButtonOnHoverBrush = onHoverBrush; -+ m_RadioButtonParameters.radioButtonOnClickBrush = onClickBrush; - -- parameters->radioButtonChildrenOnDefaultBrush = childrenOnDefaultBrush; -- parameters->radioButtonChildrenOnHoverBrush = childrenOnHoverBrush; -- parameters->radioButtonChildrenOnClickBrush = childrenOnClickBrush; -- parameters->radioButtonChildrenOnDisableBrush = childrenOnDisableBrush; -- return parameters; -+ m_RadioButtonParameters.radioButtonChildrenOnDefaultBrush = childrenOnDefaultBrush; -+ m_RadioButtonParameters.radioButtonChildrenOnHoverBrush = childrenOnHoverBrush; -+ m_RadioButtonParameters.radioButtonChildrenOnClickBrush = childrenOnClickBrush; -+ m_RadioButtonParameters.radioButtonChildrenOnDisableBrush = childrenOnDisableBrush; - } - --ConfigSliderParameters* UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int grooveRadius = Slider_GrooveLength/2; - -@@ -3256,36 +3180,34 @@ ConfigSliderParameters* UKUIConfigStyleParameters::initConfigSliderParameters(bo - } - } - -- ConfigSliderParameters* parameters = new ConfigSliderParameters; -+ m_SliderParameters.radius = radius; -+ m_SliderParameters.sliderGrooveRadius = grooveRadius; - -- parameters->radius = radius; -- parameters->sliderGrooveRadius = grooveRadius; -+ m_SliderParameters.sliderHandleDefaultBrush = handleDefaultBrush; -+ m_SliderParameters.sliderHandleHoverBrush = handleHoverBrush; -+ m_SliderParameters.sliderHandleClickBrush = handleClickBrush; -+ m_SliderParameters.sliderHandleDisableBrush = handleDisableBrush; - -- parameters->sliderHandleDefaultBrush = handleDefaultBrush; -- parameters->sliderHandleHoverBrush = handleHoverBrush; -- parameters->sliderHandleClickBrush = handleClickBrush; -- parameters->sliderHandleDisableBrush = handleDisableBrush; -+ m_SliderParameters.sliderGrooveValueDefaultBrush = grooveValueDefaultBrush; -+ m_SliderParameters.sliderGrooveValueHoverBrush = grooveValueHoverBrush; -+ m_SliderParameters.sliderGrooveValueDisableBrush = grooveValueDisableBrush; - -- parameters->sliderGrooveValueDefaultBrush = grooveValueDefaultBrush; -- parameters->sliderGrooveValueHoverBrush = grooveValueHoverBrush; -- parameters->sliderGrooveValueDisableBrush = grooveValueDisableBrush; -+ m_SliderParameters.sliderGrooveUnvalueDefaultBrush = grooveUnvalueDefaultBrush; -+ m_SliderParameters.sliderGrooveUnvalueHoverBrush = grooveUnvalueHoverBrush; -+ m_SliderParameters.sliderGrooveUnvalueDisableBrush = grooveUnvalueDisableBrush; - -- parameters->sliderGrooveUnvalueDefaultBrush = grooveUnvalueDefaultBrush; -- parameters->sliderGrooveUnvalueHoverBrush = grooveUnvalueHoverBrush; -- parameters->sliderGrooveUnvalueDisableBrush = grooveUnvalueDisableBrush; -+ m_SliderParameters.sliderHandleDefaultPen = handleDefaultPen; -+ m_SliderParameters.sliderHandleHoverPen = handleHoverPen; -+ m_SliderParameters.sliderHandleClickPen = handleClickPen; -+ m_SliderParameters.sliderHandleDisablePen = handleDisablePen; -+ m_SliderParameters.sliderGroovePen = sliderGroovePen; -+ m_SliderParameters.focusPen = focusPen; - -- parameters->sliderHandleDefaultPen = handleDefaultPen; -- parameters->sliderHandleHoverPen = handleHoverPen; -- parameters->sliderHandleClickPen = handleClickPen; -- parameters->sliderHandleDisablePen = handleDisablePen; -- parameters->sliderGroovePen = sliderGroovePen; -- parameters->focusPen = focusPen; - -- parameters->sliderHandlePath = handlePath; -- return parameters; -+ m_SliderParameters.sliderHandlePath = handlePath; - } - --ConfigProgressBarParameters* UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int normalRadius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -3386,7 +3308,7 @@ ConfigProgressBarParameters* UKUIConfigStyleParameters::initConfigProgressBarPar - grooveDisableBrush = widget->property("setGrooveDisableBrush").value<QBrush>(); - } - if (widget->property("setContentHightColor").isValid() && widget->property("setContentHightColor").canConvert<QColor>()) { -- startColor = widget->property("setContentHightColor").value<QColor>(); -+ startColor = widget->property("setContentHightColor").value<QColor>(); - } - if (widget->property("setContentMidLightColor").isValid() && widget->property("setContentMidLightColor").canConvert<QColor>()) { - endColor = widget->property("setContentMidLightColor").value<QColor>(); -@@ -3399,21 +3321,20 @@ ConfigProgressBarParameters* UKUIConfigStyleParameters::initConfigProgressBarPar - } - } - -- ConfigProgressBarParameters* parameters = new ConfigProgressBarParameters; -- - m_ProgressBarParameters.radius = radius; -+ - m_ProgressBarParameters.progressBarContentPen = contentPen; - m_ProgressBarParameters.progressBarGrooveDefaultPen = grooveDefaultPen; - m_ProgressBarParameters.progressBarGrooveDisablePen = grooveDisablePen; -+ - m_ProgressBarParameters.progressBarContentBrush = contentBrush; - m_ProgressBarParameters.progressBarGrooveDefaultBrush = grooveDefaultBrush; - m_ProgressBarParameters.progressBarGrooveDisableBrush = grooveDisableBrush; - m_ProgressBarParameters.progressBarContentHightColor = endColor; - m_ProgressBarParameters.progressBarContentMidLightColor = startColor; -- return parameters; - } - --ConfigScrollBarParameters* UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int sliderRadius; - bool needTranslucent = false; -@@ -3518,20 +3439,17 @@ ConfigScrollBarParameters* UKUIConfigStyleParameters::initConfigScrollBarParamet - } - } - -- ConfigScrollBarParameters* parameters = new ConfigScrollBarParameters; -- -+ m_ScrollBarParameters.radius = sliderRadius; - ScroolBar_Height= 68; -- parameters->radius = sliderRadius; -- parameters->scrollBarGrooveDefaultBrush = grooveDefaultBrush; -- parameters->scrollBarGrooveInactiveBrush = grooveInactiveBrush; -- parameters->scrollBarSliderDefaultBrush = sliderDefaultBrush; -- parameters->scrollBarSliderHoverBrush = sliderHoverBrush; -- parameters->scrollBarSliderClickBrush = sliderClickBrush; -- parameters->scrollBarSliderDisableBrush = sliderDisableBrush; -- return parameters; -+ m_ScrollBarParameters.scrollBarGrooveDefaultBrush = grooveDefaultBrush; -+ m_ScrollBarParameters.scrollBarGrooveInactiveBrush = grooveInactiveBrush; -+ m_ScrollBarParameters.scrollBarSliderDefaultBrush = sliderDefaultBrush; -+ m_ScrollBarParameters.scrollBarSliderHoverBrush = sliderHoverBrush; -+ m_ScrollBarParameters.scrollBarSliderClickBrush = sliderClickBrush; -+ m_ScrollBarParameters.scrollBarSliderDisableBrush = sliderDisableBrush; - } - --ConfigToolTipParameters* UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - UKUIColorTheme::ToolTipColorCfg tooltipColorCfg = readCfg()->toolTipColorCfg(option->palette, C_ToolTip_Default); - -@@ -3586,15 +3504,12 @@ ConfigToolTipParameters* UKUIConfigStyleParameters::initConfigToolTipParameters( - w->setProperty("backgroundBrush", backgroundBrush); - w->setProperty("backgroundPen", backgroundPen); - } -- ConfigToolTipParameters* parameters = new ConfigToolTipParameters; -- -- parameters->radius = radius; -- parameters->toolTipBackgroundBrush = backgroundBrush; -- parameters->toolTipBackgroundPen = backgroundPen; -- return parameters; -+ m_ToolTipParameters.radius = radius; -+ m_ToolTipParameters.toolTipBackgroundBrush = backgroundBrush; -+ m_ToolTipParameters.toolTipBackgroundPen = backgroundPen; - } - --ConfigTabWidgetParameters* UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int tabradius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -3716,23 +3631,20 @@ ConfigTabWidgetParameters* UKUIConfigStyleParameters::initConfigTabWidgetParamet - } - } - -- ConfigTabWidgetParameters* parameters = new ConfigTabWidgetParameters; -- -- parameters->radius = tabradius; -- parameters->tabWidgetBackgroundBrush = widgetBackgroundBrush; -- parameters->tabBarBackgroundBrush = tabBarBackgroundBrush; -- parameters->tabBarDefaultBrush = tabBarDefaultBrush; -- parameters->tabBarHoverBrush = tabBarHoverBrush; -- parameters->tabBarClickBrush = tabBarClickBrush; -- parameters->tabBarSelectBrush = tabBarSelectBrush; -- parameters->tabBarDefaultPen = tabBarDefaultPen; -- parameters->tabBarHoverPen = tabBarHoverPen; -- parameters->tabBarClickPen = tabBarClickPen; -- parameters->tabBarFocusPen = tabBarFocusPen; -- return parameters; -+ m_TabWidgetParameters.radius = tabradius; -+ m_TabWidgetParameters.tabWidgetBackgroundBrush = widgetBackgroundBrush; -+ m_TabWidgetParameters.tabBarBackgroundBrush = tabBarBackgroundBrush; -+ m_TabWidgetParameters.tabBarDefaultBrush = tabBarDefaultBrush; -+ m_TabWidgetParameters.tabBarHoverBrush = tabBarHoverBrush; -+ m_TabWidgetParameters.tabBarClickBrush = tabBarClickBrush; -+ m_TabWidgetParameters.tabBarSelectBrush = tabBarSelectBrush; -+ m_TabWidgetParameters.tabBarDefaultPen = tabBarDefaultPen; -+ m_TabWidgetParameters.tabBarHoverPen = tabBarHoverPen; -+ m_TabWidgetParameters.tabBarClickPen = tabBarClickPen; -+ m_TabWidgetParameters.tabBarFocusPen = tabBarFocusPen; - } - --ConfigMenuParameters* UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int frameradius = (widget && widget->property("maxRadius").isValid()) ? - widget->property("maxRadius").toInt() : m_radiusStruct.maxRadius; -@@ -3826,15 +3738,12 @@ ConfigMenuParameters* UKUIConfigStyleParameters::initConfigMenuParameters(bool i - } - } - -- ConfigMenuParameters* parameters = new ConfigMenuParameters; -- -- parameters->frameRadius = frameradius; -- parameters->itemRadius = itemradius; -+ m_MenuParameters.frameRadius = frameradius; -+ m_MenuParameters.itemRadius = itemradius; - // m_MenuParameters.menuFramePixmap = framePixmap; -- parameters->menuBackgroundBrush = menuBackgroundBrush; -- parameters->menuBackgroundPen = menuBackgroundPen; -- parameters->menuItemSelectBrush = itemSelectBrush; -- parameters->menuItemFocusPen = menuItemFocusPen; -- parameters->menuTextHoverPen = menuHoverPen; -- return parameters; -+ m_MenuParameters.menuBackgroundBrush = menuBackgroundBrush; -+ m_MenuParameters.menuBackgroundPen = menuBackgroundPen; -+ m_MenuParameters.menuItemSelectBrush = itemSelectBrush; -+ m_MenuParameters.menuItemFocusPen = menuItemFocusPen; -+ m_MenuParameters.menuTextHoverPen = menuHoverPen; - } -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -index 4ebc1ef..4fa3b67 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -@@ -23,7 +23,6 @@ - #ifndef UKUICONFIGSTYLEPARAMETERS_H - #define UKUICONFIGSTYLEPARAMETERS_H - --#include <QSharedPointer> - #include <QObject> - #include <QPalette> - #include <QStyleOption> -@@ -46,7 +45,6 @@ - #include "widget-parameters/config-menu-parameters.h" - #include "../readconfig.h" - --using namespace std; - namespace UKUIConfigStyleSpace { - - class UKUIConfigStyleParameters: public QObject -@@ -93,40 +91,40 @@ public: - virtual void initRadiusCfg(); - - //pushbutton -- virtual ConfigPushButtonParameters* initConfigPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -- virtual ConfigPushButtonParameters* getConfigPushButtonLabelProperty(ConfigPushButtonParameters* parameters, const QWidget *widget); -+ virtual void initConfigPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigPushButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - - //toolbutton -- virtual ConfigToolButtonParameters* initConfigToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -- virtual ConfigToolButtonParameters* initConfigToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual ConfigLineEditParameters* initConfigLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual ConfigSpinBoxParameters* initConfigSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false); -+ virtual void initConfigSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false); - -- virtual ConfigComboBoxParameters* initConfigComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual ConfigListParameters* initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual ConfigTreeParameters* initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual ConfigTableParameters* initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual ConfigCheckBoxParameters* initConfigCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual ConfigRadioButtonParameters* initConfigRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual ConfigSliderParameters* initConfigSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual ConfigProgressBarParameters* initConfigProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual ConfigScrollBarParameters* initConfigScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual ConfigToolTipParameters* initConfigToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual ConfigTabWidgetParameters* initConfigTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - -- virtual ConfigMenuParameters* initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - - virtual QColor lanhuHSLToQtHsl(int h, int s, int l, int a = 255); - virtual QColor adjustColor(const QColor c, int hRange = 0, int sRange = 0, int lRange = 0, int aRange = 0); -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 ef0d887..696428a 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -950,11 +950,6 @@ void UKUIConfigStyle::polish(QWidget *widget) - if(!widget) - return; - -- if(widget->objectName() == "button3333"){ -- qDebug() << "polish ..."; -- } -- -- - realSetWindowSurfaceFormatAlpha(widget); - - if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget && widget->inherits("QMenu"))) { -@@ -1022,21 +1017,6 @@ void UKUIConfigStyle::polish(QWidget *widget) - - if(qobject_cast<QPushButton*>(widget)) - { -- if(widget->objectName() == "button3333"){ -- qDebug() << "polish insert00000000 isUseDarkPalette()..." << isUseDarkPalette(); -- } -- -- if(m_controlParameters.contains(const_cast<const QWidget*>(widget))){ -- auto p = m_controlParameters.value(const_cast<const QWidget*>(widget)); -- m_controlParameters.remove(const_cast<const QWidget*>(widget)); -- p->deleteLater(); -- } -- QStyleOption option; -- option.init(widget); -- auto pt = sp->initConfigPushButtonBevelParameters(isUseDarkPalette(), &option, widget); -- -- m_controlParameters.insert(const_cast<const QWidget*>(widget), qobject_cast<ControlParameters*>(pt)); -- - // m_button_animation_helper->registerWidget(widget); - } - -@@ -1567,21 +1547,6 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - int width = 0; - QRect rect = option->rect; - -- ConfigPushButtonParameters* pushButtonParameters = nullptr; -- bool needNew = false; -- if(widget && m_controlParameters.contains(widget)){ -- auto cp = m_controlParameters.value(widget); -- pushButtonParameters = qobject_cast<ConfigPushButtonParameters *>(cp); -- if(!pushButtonParameters){ -- pushButtonParameters = new ConfigPushButtonParameters; -- needNew = true; -- } -- } -- else{ -- pushButtonParameters = new ConfigPushButtonParameters; -- needNew = true; -- } -- - // qDebug() << "PE_PanelButtonCommand........" << button->text << "active:" << active << "inActive;" << inActive; - if (widget && widget->property("isRoundButton").isValid()) { - roundButton = widget->property("isRoundButton").toBool(); -@@ -1595,74 +1560,72 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - // } - - if (on) { -- width = pushButtonParameters->pushButtonCheckDisablePen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonCheckDisablePen); -- painter->setBrush(pushButtonParameters->pushButtonCheckDisableBrush); -+ width = sp->m_PushButtonParameters.pushButtonCheckDisablePen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonCheckDisablePen); -+ painter->setBrush(sp->m_PushButtonParameters.pushButtonCheckDisableBrush); - } else if (button->features & QStyleOptionButton::Flat) { - width = 0; - painter->setPen(Qt::NoPen); - painter->setBrush(Qt::NoBrush); - } else { -- width = pushButtonParameters->pushButtonDisablePen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonDisablePen); -- painter->setBrush(pushButtonParameters->pushButtonDisableBrush); -+ width = sp->m_PushButtonParameters.pushButtonDisablePen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonDisablePen); -+ painter->setBrush(sp->m_PushButtonParameters.pushButtonDisableBrush); - } - } else { - if (on) { - if (sunken) { -- width = pushButtonParameters->pushButtonCheckClickPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonCheckClickPen); -- painter->setBrush(pushButtonParameters->pushButtonCheckClickBrush); -+ width = sp->m_PushButtonParameters.pushButtonCheckClickPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonCheckClickPen); -+ painter->setBrush(sp->m_PushButtonParameters.pushButtonCheckClickBrush); - } else if (hover) { -- width = pushButtonParameters->pushButtonCheckHoverPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonCheckHoverPen); -- painter->setBrush(pushButtonParameters->pushButtonCheckHoverBrush); -+ width = sp->m_PushButtonParameters.pushButtonCheckHoverPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonCheckHoverPen); -+ painter->setBrush(sp->m_PushButtonParameters.pushButtonCheckHoverBrush); - } else { -- width = pushButtonParameters->pushButtonCheckPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonCheckPen); -- painter->setBrush(pushButtonParameters->pushButtonCheckBrush); -+ width = sp->m_PushButtonParameters.pushButtonCheckPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonCheckPen); -+ painter->setBrush(sp->m_PushButtonParameters.pushButtonCheckBrush); - } - } else { - if (sunken) { -- width = pushButtonParameters->pushButtonClickPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonClickPen); -- painter->setBrush(pushButtonParameters->pushButtonClickBrush); -+ width = sp->m_PushButtonParameters.pushButtonClickPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonClickPen); -+ painter->setBrush(sp->m_PushButtonParameters.pushButtonClickBrush); - } else if (hover) { -- width = pushButtonParameters->pushButtonHoverPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonHoverPen); -- painter->setBrush(pushButtonParameters->pushButtonHoverBrush); -+ width = sp->m_PushButtonParameters.pushButtonHoverPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonHoverPen); -+ painter->setBrush(sp->m_PushButtonParameters.pushButtonHoverBrush); - } else { - if (button->features & QStyleOptionButton::Flat) { - width = 0; - painter->setPen(Qt::NoPen); - painter->setBrush(Qt::NoBrush); - } else { -- width = pushButtonParameters->pushButtonDefaultPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonDefaultPen); -- painter->setBrush(pushButtonParameters->pushButtonDefaultBrush); -+ width = sp->m_PushButtonParameters.pushButtonDefaultPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonDefaultPen); -+ painter->setBrush(sp->m_PushButtonParameters.pushButtonDefaultBrush); - } - } - } - //focus - if (focus) { -- width = pushButtonParameters->pushButtonFocusPen.width(); -- painter->setPen(width <= 0 ? Qt::NoPen : pushButtonParameters->pushButtonFocusPen); -+ width = sp->m_PushButtonParameters.pushButtonFocusPen.width(); -+ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonFocusPen); - } - } - -- painter->setRenderHint(QPainter::Antialiasing, pushButtonParameters->radius != 0); -+ painter->setRenderHint(QPainter::Antialiasing, sp->m_PushButtonParameters.radius != 0); - if (roundButton) { - painter->setRenderHint(QPainter::Antialiasing, true); - painter->drawEllipse(rect.adjusted(width, width, -width, -width)); - } else { -- if(width == 1 && pushButtonParameters->radius != 0) -+ if(width == 1 && sp->m_PushButtonParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->drawRoundedRect(rect.adjusted(width, width, -width, -width), -- pushButtonParameters->radius, pushButtonParameters->radius); -+ sp->m_PushButtonParameters.radius, sp->m_PushButtonParameters.radius); - } - painter->restore(); -- if(needNew) -- pushButtonParameters->deleteLater(); - return; - - // //button animation cancel temporary -@@ -4793,25 +4756,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - - case CE_PushButtonBevel: - { --// if(m_controlParameters.contains(widget)){ --// auto p = m_controlParameters.value(widget); --// m_controlParameters.remove(widget); --// p->deleteLater(); --// } --// QStyleOption option1; --// option1.init(widget); --// auto pt = sp->initConfigPushButtonBevelParameters(isUseDarkPalette(), &option1, widget); -- --// m_controlParameters.insert(widget, qobject_cast<ControlParameters*>(pt)); -- -- --// if(widget && m_controlParameters.contains(widget)){ --// ConfigPushButtonParameters* pushButtonParameters = qobject_cast<ConfigPushButtonParameters *>(m_controlParameters.value(widget)); --// if(pushButtonParameters){ --// auto pt = sp->getConfigPushButtonLabelProperty(pushButtonParameters, widget); --// m_controlParameters.insert(widget, qobject_cast<ControlParameters*>(pt)); --// } --// } -+ sp->initConfigPushButtonBevelParameters(isUseDarkPalette(), option, widget); - proxy()->drawPrimitive(PE_PanelButtonCommand, option, painter, widget); - return; - } -@@ -4819,26 +4764,12 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - case CE_PushButtonLabel: - { - if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { -+ sp->initConfigPushButtonLabelParameters(isUseDarkPalette(), option, widget); - const bool enable = button->state & State_Enabled; - const bool text = !button->text.isEmpty(); - const bool icon = !button->icon.isNull(); - const bool inactive = enable && !(button->state & State_Active); - -- ConfigPushButtonParameters* pushButtonParameters = nullptr; -- bool needNew = false; -- if(widget && m_controlParameters.contains(widget)){ -- auto cp = m_controlParameters.value(widget); -- pushButtonParameters = qobject_cast<ConfigPushButtonParameters *>(cp); -- if(!pushButtonParameters){ -- pushButtonParameters = new ConfigPushButtonParameters; -- needNew = true; -- } -- } -- else{ -- pushButtonParameters = new ConfigPushButtonParameters; -- needNew = true; -- } -- - bool isImportant = false; - if (widget && widget->property("isImportant").isValid()) { - isImportant = widget->property("isImportant").toBool(); -@@ -4847,7 +4778,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - QRect drawRect = button->rect; - int spacing = 8; - QStyleOption sub = *option; -- if (!pushButtonParameters->iconHoverClickHighlight) { -+ if (!sp->m_PushButtonParameters.iconHoverClickHighlight) { - sub.state = enable ? State_Enabled : State_None; - } else { - sub.state = option->state; -@@ -4921,7 +4852,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - drawColorPixmap(painter, color, pixmap); - } - else if (widget && !widget->property("useIconHighlightEffect").isValid()) { -- if (!pushButtonParameters->iconHoverClickHighlight) { -+ if (!sp->m_PushButtonParameters.iconHoverClickHighlight) { - pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, &sub, widget); - } - else{ -@@ -4942,7 +4873,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - - if (textRect.isValid()) { - // if (enable) { --// if (pushButtonParameters->textHoverClickHighlight) { -+// if (sp->m_PushButtonParameters.textHoverClickHighlight) { - // proxy()->drawItemText(painter, textRect, tf, button->palette, true, button->text, QPalette::HighlightedText); - // } else { - // proxy()->drawItemText(painter, textRect, tf, button->palette, true, button->text, QPalette::ButtonText); -@@ -4950,21 +4881,19 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - // } else { - // proxy()->drawItemText(painter, textRect, tf, button->palette, false, button->text, QPalette::ButtonText); - // } -- QColor penColor = pushButtonParameters->textDefaultColor; -+ QColor penColor = sp->m_PushButtonParameters.textDefaultColor; - if(!enable) -- penColor = pushButtonParameters->textDisableColor; -+ penColor = sp->m_PushButtonParameters.textDisableColor; - else if(button->state & QStyle::State_MouseOver || button->state & QStyle::State_Sunken) -- penColor = pushButtonParameters->textHoverColor; -+ penColor = sp->m_PushButtonParameters.textHoverColor; - - painter->setBrush(Qt::NoBrush); - painter->setPen(QPen(penColor)); - painter->drawText(textRect, button->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); - --// proxy()->drawItemText(painter, textRect, tf, button->palette, false, button->text, pushButtonParameters->textColor); -+// proxy()->drawItemText(painter, textRect, tf, button->palette, false, button->text, sp->m_PushButtonParameters.textColor); - - } -- if(needNew) -- pushButtonParameters->deleteLater(); - return; - } - break; -@@ -5945,8 +5874,8 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - { - if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { - sp->initConfigProgressBarParameters(isUseDarkPalette(), pb, widget); -- QColor progressBarContentHightColor = sp->m_ProgressBarParameters.progressBarContentHightColor; -- QColor progressBarContentMidLightColor = sp->m_ProgressBarParameters.progressBarContentMidLightColor; -+ -+ QBrush brush = sp->m_ProgressBarParameters.progressBarContentBrush; - - const bool vertical = pb->orientation == Qt::Vertical; - const bool inverted = pb->invertedAppearance; -@@ -5955,19 +5884,10 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - if (inverted) - reverse = !reverse; - -- QLinearGradient linearGradient; -- if(vertical){ -- linearGradient.setStart(pb->rect.bottomRight()); -- linearGradient.setFinalStop(pb->rect.topLeft()); -- } -- else{ -- linearGradient.setStart(pb->rect.topLeft()); -- linearGradient.setFinalStop(pb->rect.bottomRight()); -- } -- linearGradient.setColorAt(0, progressBarContentMidLightColor); -- linearGradient.setColorAt(1, progressBarContentHightColor); -- QBrush brush(linearGradient); -+ QColor progressBarContentHightColor = sp->m_ProgressBarParameters.progressBarContentHightColor; -+ QColor progressBarContentMidLightColor = sp->m_ProgressBarParameters.progressBarContentMidLightColor; - -+ QLinearGradient linearGradient; - if (QVariantAnimation *animation = m_animation_helper->animation(option->styleObject)) { - if(animation->state() == QAbstractAnimation::Running){ - bool forward = animation->direction() == QAbstractAnimation::Forward; -@@ -5999,6 +5919,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - } - } - -+ - painter->save(); - painter->setRenderHint(QPainter::Antialiasing, sp->m_ProgressBarParameters.radius != 0); - QColor penColor = sp->m_ProgressBarParameters.progressBarContentPen.color(); -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -index eee5cb3..6a4b64f 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -@@ -23,16 +23,13 @@ - #ifndef UKUICONFIGSTYLE_H - #define UKUICONFIGSTYLE_H - --#include <QSharedPointer> - #include <QProxyStyle> -+ - #include <QFontMetrics> - #include <QStyleOption> - #include <private/qtextengine_p.h> - #include <qmath.h> - #include <QGSettings> --#include "widget-parameters/control-parameters.h" -- --using namespace std; - - class QStyleOptionViewItem; - class QDBusInterface; -@@ -209,8 +206,6 @@ private: - bool m_blink_cursor = true; - int m_blink_cursor_time = 1200; - -- mutable QHash<const QWidget*, UKUIConfigStyleSpace::ControlParameters *> m_controlParameters; -- - }; - - #endif // UKUICONFIGSTYLE_H -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h -index 3166b90..9612e78 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h -@@ -26,13 +26,10 @@ - - #include <QBrush> - #include <QPen> --#include "control-parameters.h" -- - namespace UKUIConfigStyleSpace { - --class ConfigCheckBoxParameters : public ControlParameters -+class ConfigCheckBoxParameters - { -- Q_OBJECT - public: - ConfigCheckBoxParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h -index 37725a1..e6a4def 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h -@@ -25,13 +25,10 @@ - - #include <QBrush> - #include <QPen> --#include "control-parameters.h" -- - namespace UKUIConfigStyleSpace { - --class ConfigComboBoxParameters : public ControlParameters -+class ConfigComboBoxParameters - { -- Q_OBJECT - public: - ConfigComboBoxParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h -index 954c41d..2d6eaf1 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h -@@ -27,13 +27,10 @@ - - #include <QBrush> - #include <QPen> --#include "control-parameters.h" -- - namespace UKUIConfigStyleSpace { - --class ConfigLineEditParameters : public ControlParameters -+class ConfigLineEditParameters - { -- Q_OBJECT - public: - ConfigLineEditParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -index 34e5b9d..e3b8a69 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -@@ -26,13 +26,10 @@ - - #include <QBrush> - #include <QPen> --#include "control-parameters.h" -- - namespace UKUIConfigStyleSpace { - --class ConfigListParameters : public ControlParameters -+class ConfigListParameters - { -- Q_OBJECT - public: - ConfigListParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h -index 9364713..7cf419f 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h -@@ -27,13 +27,10 @@ - #include <QPixmap> - #include <QBrush> - #include <QPen> --#include "control-parameters.h" -- - namespace UKUIConfigStyleSpace { - --class ConfigMenuParameters : public ControlParameters -+class ConfigMenuParameters - { -- Q_OBJECT - public: - ConfigMenuParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h -index b6d4dc7..c79b738 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h -@@ -26,13 +26,10 @@ - - #include <QBrush> - #include <QPen> --#include "control-parameters.h" -- - namespace UKUIConfigStyleSpace { - --class ConfigProgressBarParameters : public ControlParameters -+class ConfigProgressBarParameters - { -- Q_OBJECT - public: - ConfigProgressBarParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h -index e2e7ad2..82ce1fd 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h -@@ -27,13 +27,10 @@ - - #include <QBrush> - #include <QPen> --#include "control-parameters.h" -- - namespace UKUIConfigStyleSpace { - --class ConfigPushButtonParameters : public ControlParameters -+class ConfigPushButtonParameters - { -- Q_OBJECT - public: - ConfigPushButtonParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h -index 66b0cd4..d1e738d 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h -@@ -25,13 +25,10 @@ - - #include <QBrush> - #include <QPen> --#include "control-parameters.h" -- - namespace UKUIConfigStyleSpace { - --class ConfigRadioButtonParameters : public ControlParameters -+class ConfigRadioButtonParameters - { -- Q_OBJECT - public: - ConfigRadioButtonParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h -index b406b43..1ecfb2f 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h -@@ -25,13 +25,10 @@ - #define SCROLLBARPARAMETERS_H - - #include <QBrush> --#include "control-parameters.h" -- - namespace UKUIConfigStyleSpace { - --class ConfigScrollBarParameters : public ControlParameters -+class ConfigScrollBarParameters - { -- Q_OBJECT - public: - ConfigScrollBarParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -index bc539fd..ef39fab 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -@@ -27,13 +27,10 @@ - #include <QBrush> - #include <QPainterPath> - #include <QPen> --#include "control-parameters.h" -- - namespace UKUIConfigStyleSpace { - --class ConfigSliderParameters : public ControlParameters -+class ConfigSliderParameters - { -- Q_OBJECT - public: - ConfigSliderParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h -index 7e09907..54c808f 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h -@@ -26,12 +26,11 @@ - - #include <QBrush> - #include <QPen> --#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigSpinBoxParameters : public ControlParameters -+class ConfigSpinBoxParameters - { -- Q_OBJECT - public: - ConfigSpinBoxParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -index 1c057e2..53a9a8d 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -@@ -25,13 +25,11 @@ - - #include <QBrush> - #include <QPen> --#include "control-parameters.h" - - namespace UKUIConfigStyleSpace { - --class ConfigTableParameters : public ControlParameters -+class ConfigTableParameters - { -- Q_OBJECT - public: - ConfigTableParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -index 487a10d..eb85537 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -@@ -26,13 +26,10 @@ - - #include <QBrush> - #include <QPen> --#include "control-parameters.h" -- - namespace UKUIConfigStyleSpace { - --class ConfigTabWidgetParameters : public ControlParameters -+class ConfigTabWidgetParameters - { -- Q_OBJECT - public: - ConfigTabWidgetParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h -index 741b812..81b2c9b 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h -@@ -26,13 +26,10 @@ - - #include <QBrush> - #include <QPen> --#include "control-parameters.h" -- - namespace UKUIConfigStyleSpace { - --class ConfigToolButtonParameters : public ControlParameters -+class ConfigToolButtonParameters - { -- Q_OBJECT - public: - ConfigToolButtonParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h -index 3f3be97..b126159 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h -@@ -26,12 +26,10 @@ - - #include <QBrush> - #include <QPen> --#include "control-parameters.h" - namespace UKUIConfigStyleSpace { - --class ConfigToolTipParameters : public ControlParameters -+class ConfigToolTipParameters - { -- Q_OBJECT - public: - ConfigToolTipParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -index ef357f3..e5291f7 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -@@ -25,12 +25,10 @@ - - #include <QBrush> - #include <QPen> --#include "control-parameters.h" - namespace UKUIConfigStyleSpace { - --class ConfigTreeParameters : public ControlParameters -+class ConfigTreeParameters - { -- Q_OBJECT - public: - ConfigTreeParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp -deleted file mode 100644 -index e5cbe7e..0000000 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp -+++ /dev/null -@@ -1,34 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#include "control-parameters.h" --using namespace UKUIConfigStyleSpace; -- --ControlParameters::ControlParameters(QObject *parent) : QObject(parent) --{ -- --} --ControlParameters::~ControlParameters() --{ -- --} -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h -deleted file mode 100644 -index bdaf05f..0000000 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h -+++ /dev/null -@@ -1,42 +0,0 @@ --/* -- * Qt5-UKUI's Library -- * -- * Copyright (C) 2023, KylinSoft Co., Ltd. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 3 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this library. If not, see <https://www.gnu.org/licenses/>. -- * -- * Authors: xibowen <lanyue@kylinos.cn> -- * -- */ -- -- --#ifndef ControlParameters_H --#define ControlParameters_H -- --#include <QObject> -- --namespace UKUIConfigStyleSpace { -- --class ControlParameters : public QObject --{ -- Q_OBJECT --public: -- explicit ControlParameters(QObject *parent = nullptr); -- -- ~ControlParameters(); -- --// virtual void getParameters(){} --}; --} --#endif // ControlParameters_H -diff --git a/ukui-styles/ukui-style-plugin.cpp b/ukui-styles/ukui-style-plugin.cpp -index ae81514..9b56722 100644 ---- a/ukui-styles/ukui-style-plugin.cpp -+++ b/ukui-styles/ukui-style-plugin.cpp -@@ -57,7 +57,6 @@ UKUIStylePlugin::UKUIStylePlugin(QObject *parent) : - if (appStyleSettings->currentStyleStretagy() != ApplicationStyleSettings::Default) - return; - -- qDebug() << "UKUIStyleSettings change...." << key; - auto styleName = settings->get("styleName").toString(); - auto widgetThemeName = settings->get("widgetThemeName").toString(); - diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0033-Remove-gitignore.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0033-Remove-gitignore.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0033-Remove-gitignore.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0033-Remove-gitignore.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,16 +0,0 @@ -From: xibowen <xibowen@kylinos.cn> -Date: Wed, 28 Feb 2024 15:12:22 +0800 -Subject: Remove gitignore - ---- - .gitignore | 1 - - 1 file changed, 1 deletion(-) - delete mode 100644 .gitignore - -diff --git a/.gitignore b/.gitignore -deleted file mode 100644 -index 8a9d35c..0000000 ---- a/.gitignore -+++ /dev/null -@@ -1 +0,0 @@ --*.user diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0034-progressbar.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0034-progressbar.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0034-progressbar.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0034-progressbar.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,47 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Wed, 28 Feb 2024 15:15:59 +0800 -Subject: =?utf-8?b?cHJvZ3Jlc3NiYXIg5aSW6YOo5bGe5oCn6K6+572u5rKh5pyJ5ZON5bqU?= - =?utf-8?b?5aSE55CG?= - ---- - .../qt5-config-style-ukui/ukui-config-style.cpp | 19 ++++++++++++++----- - 1 file changed, 14 insertions(+), 5 deletions(-) - -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 696428a..547a01b 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -5874,8 +5874,8 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - { - if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { - sp->initConfigProgressBarParameters(isUseDarkPalette(), pb, widget); -- -- QBrush brush = sp->m_ProgressBarParameters.progressBarContentBrush; -+ QColor progressBarContentHightColor = sp->m_ProgressBarParameters.progressBarContentHightColor; -+ QColor progressBarContentMidLightColor = sp->m_ProgressBarParameters.progressBarContentMidLightColor; - - const bool vertical = pb->orientation == Qt::Vertical; - const bool inverted = pb->invertedAppearance; -@@ -5884,10 +5884,19 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - if (inverted) - reverse = !reverse; - -- QColor progressBarContentHightColor = sp->m_ProgressBarParameters.progressBarContentHightColor; -- QColor progressBarContentMidLightColor = sp->m_ProgressBarParameters.progressBarContentMidLightColor; -- - QLinearGradient linearGradient; -+ if(vertical){ -+ linearGradient.setStart(pb->rect.bottomRight()); -+ linearGradient.setFinalStop(pb->rect.topLeft()); -+ } -+ else{ -+ linearGradient.setStart(pb->rect.topLeft()); -+ linearGradient.setFinalStop(pb->rect.bottomRight()); -+ } -+ linearGradient.setColorAt(0, progressBarContentMidLightColor); -+ linearGradient.setColorAt(1, progressBarContentHightColor); -+ QBrush brush(linearGradient); -+ - if (QVariantAnimation *animation = m_animation_helper->animation(option->styleObject)) { - if(animation->state() == QAbstractAnimation::Running){ - bool forward = animation->direction() == QAbstractAnimation::Forward; diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0035-Update-changelog-2024.03.11-4.1.0.0-0k31.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0035-Update-changelog-2024.03.11-4.1.0.0-0k31.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0035-Update-changelog-2024.03.11-4.1.0.0-0k31.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0035-Update-changelog-2024.03.11-4.1.0.0-0k31.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,115 +0,0 @@ -From: xibowen <xibowen@kylinos.cn> -Date: Mon, 11 Mar 2024 20:47:44 +0800 -Subject: Update changelog 2024.03.11 4.1.0.0-0k31 - ---- - .../qt5-config-style-ukui/ukui-config-style.cpp | 42 +++++++++++----------- - .../qt5-config-style-ukui/ukui-config-style.h | 4 +-- - ukui-styles/ukui-style-plugin.cpp | 12 +++---- - 3 files changed, 29 insertions(+), 29 deletions(-) - -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 547a01b..110e65c 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -163,27 +163,27 @@ UKUIConfigStyle::UKUIConfigStyle(bool dark, bool useDefault, QString type) : QPr - - m_window_manager = new WindowManager(this); - -- m_app_style_settings = ApplicationStyleSettings::getInstance(); -- if (m_app_style_settings) { -- connect(m_app_style_settings, &ApplicationStyleSettings::colorStretageChanged, [=](const ApplicationStyleSettings::ColorStretagy &stretagy) { -- ////todo implemet palette switch. -- switch (stretagy) { -- case ApplicationStyleSettings::System: { -- break; -- } -- case ApplicationStyleSettings::Bright: { -- break; -- } -- case ApplicationStyleSettings::Dark: { -- break; -- } -- default: -- break; -- } -- }); -- } else { -- qWarning("org.ukui.style is null!"); -- } -+// m_app_style_settings = ApplicationStyleSettings::getInstance(); -+// if (m_app_style_settings) { -+// connect(m_app_style_settings, &ApplicationStyleSettings::colorStretageChanged, [=](const ApplicationStyleSettings::ColorStretagy &stretagy) { -+// ////todo implemet palette switch. -+// switch (stretagy) { -+// case ApplicationStyleSettings::System: { -+// break; -+// } -+// case ApplicationStyleSettings::Bright: { -+// break; -+// } -+// case ApplicationStyleSettings::Dark: { -+// break; -+// } -+// default: -+// break; -+// } -+// }); -+// } else { -+// qWarning("org.ukui.style is null!"); -+// } - - if (QGSettings::isSchemaInstalled("org.ukui.peripherals-mouse")) { - QGSettings *settings = new QGSettings("org.ukui.peripherals-mouse"); -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -index 6a4b64f..ba8fa44 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -@@ -46,7 +46,7 @@ class BlurHelper; - class GestureHelper; - class WindowManager; - --class ApplicationStyleSettings; -+//class ApplicationStyleSettings; - //QT_BEGIN_NAMESPACE - //namespace UKUIConfigStyleSpace { class UKUIConfigStyle; } - //QT_END_NAMESPACE -@@ -201,7 +201,7 @@ private: - GestureHelper *m_gesture_helper = nullptr; - WindowManager *m_window_manager = nullptr; - -- ApplicationStyleSettings *m_app_style_settings = nullptr; -+// ApplicationStyleSettings *m_app_style_settings = nullptr; - - bool m_blink_cursor = true; - int m_blink_cursor_time = 1200; -diff --git a/ukui-styles/ukui-style-plugin.cpp b/ukui-styles/ukui-style-plugin.cpp -index 9b56722..32f6930 100644 ---- a/ukui-styles/ukui-style-plugin.cpp -+++ b/ukui-styles/ukui-style-plugin.cpp -@@ -53,9 +53,9 @@ UKUIStylePlugin::UKUIStylePlugin(QObject *parent) : - if (QApplication::style()->inherits("InternalStyle")) - return; - -- auto appStyleSettings = ApplicationStyleSettings::getInstance(); -- if (appStyleSettings->currentStyleStretagy() != ApplicationStyleSettings::Default) -- return; -+// auto appStyleSettings = ApplicationStyleSettings::getInstance(); -+// if (appStyleSettings->currentStyleStretagy() != ApplicationStyleSettings::Default) -+// return; - - auto styleName = settings->get("styleName").toString(); - auto widgetThemeName = settings->get("widgetThemeName").toString(); -@@ -191,9 +191,9 @@ void UKUIStylePlugin::tableModeChanged(bool isTableMode) - if (QApplication::style()->inherits("InternalStyle")) - return; - -- auto appStyleSettings = ApplicationStyleSettings::getInstance(); -- if (appStyleSettings->currentStyleStretagy() != ApplicationStyleSettings::Default) -- return; -+// auto appStyleSettings = ApplicationStyleSettings::getInstance(); -+// if (appStyleSettings->currentStyleStretagy() != ApplicationStyleSettings::Default) -+// return; - - auto settings = UKUIStyleSettings::globalInstance(); - auto styleName = settings->get("styleName").toString(); diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0036-.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0036-.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0036-.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0036-.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,2568 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Fri, 1 Mar 2024 14:42:22 +0800 -Subject: =?utf-8?b?5bGe5oCn5ZCO55qE6YCX5Y+35a+56b2Q?= - ---- - .../ukui-config-style-parameters.cpp | 838 +++++++++++++++------ - .../ukui-config-style-parameters.h | 33 +- - .../qt5-config-style-ukui/ukui-config-style.cpp | 352 ++++++++- - .../qt5-config-style-ukui/ukui-config-style.h | 7 +- - .../widget-parameters/config-checkbox-parameters.h | 5 +- - .../widget-parameters/config-combobox-parameters.h | 5 +- - .../widget-parameters/config-lineedit-parameters.h | 5 +- - .../widget-parameters/config-list-parameters.h | 5 +- - .../widget-parameters/config-menu-parameters.h | 5 +- - .../config-progressbar-parameters.h | 5 +- - .../config-pushbutton-parameters.h | 5 +- - .../config-radiobutton-parameters.h | 5 +- - .../config-scrollbar-parameters.h | 5 +- - .../widget-parameters/config-slider-parameters.h | 5 +- - .../widget-parameters/config-spinbox-parameters.h | 5 +- - .../widget-parameters/config-table-parameters.h | 4 +- - .../config-tabwidget-parameters.h | 5 +- - .../config-toolbutton-parameters.h | 5 +- - .../widget-parameters/config-tooltip-parameters.h | 4 +- - .../widget-parameters/config-tree-parameters.h | 4 +- - .../widget-parameters/control-parameters.cpp | 34 + - .../widget-parameters/control-parameters.h | 42 ++ - ukui-styles/ukui-style-plugin.cpp | 1 + - 23 files changed, 1146 insertions(+), 238 deletions(-) - create mode 100644 ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp - create mode 100644 ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h - -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index e0b3777..80c9a62 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -378,9 +378,10 @@ void UKUIConfigStyleParameters::setTabBarIndicatorLayout(TabBarIndicatorLayout l - m_tabBarIndicatorLayout = layout; - } - --void UKUIConfigStyleParameters::setUKUIThemeColor(QString themeColor) -+void UKUIConfigStyleParameters::setUKUIThemeColor(QPalette p,QString themeColor) - { - m_themeColor = themeColor; -+ m_stylePalette = p; - } - - QString UKUIConfigStyleParameters::themeColor() -@@ -666,8 +667,9 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - bool useButtonPalette = false; - bool needTranslucent = false; - -+ QPalette palette = option ? option->palette : m_stylePalette; - -- UKUIColorTheme::ButtonColorCfg buttonColorCfg = readCfg()->buttonColorCfg(option->palette); -+ UKUIColorTheme::ButtonColorCfg buttonColorCfg = readCfg()->buttonColorCfg(palette); - - if (widget) { - if (widget->property("isWindowButton").isValid()) { -@@ -691,17 +693,17 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - } - } - if (isWindowColoseButton) -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_WindowCloseButton); -+ buttonColorCfg = readCfg()->buttonColorCfg(palette, C_Button_WindowCloseButton); - if (isWindowButton) -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_WindowButton); -+ buttonColorCfg = readCfg()->buttonColorCfg(palette, C_Button_WindowButton); - if (useButtonPalette || isWindowButton) { - if (needTranslucent) -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_TranslucentButton); -+ buttonColorCfg = readCfg()->buttonColorCfg(palette, C_Button_TranslucentButton); - else -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_UseButtonPalette); -+ buttonColorCfg = readCfg()->buttonColorCfg(palette, C_Button_UseButtonPalette); - } - if (isImportant) -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -+ buttonColorCfg = readCfg()->buttonColorCfg(palette, C_Button_ImportButton); - - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -713,11 +715,11 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -+ linearGradient.setStart(option ? option->rect.topLeft() : QPoint(0, 0)); -+ linearGradient.setFinalStop(option ? option->rect.bottomLeft() :QPoint(0, 0)); - -- QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -+ QColor highlight = palette.color(QPalette::Active, QPalette::Highlight); -+ QColor mix = palette.color(QPalette::Active, QPalette::BrightText); - - QPen defaultPen ; - QPen hoverPen ; -@@ -743,7 +745,7 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - disablePen = QPen(QBrush(buttonColorCfg.disablePen), (buttonColorCfg.disablePen == Qt::NoPen || buttonColorCfg.disablePen.alpha() == 0) - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- auto checkableColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -+ auto checkableColorCfg = readCfg()->buttonColorCfg(palette, C_Button_ImportButton); - { - checkPen = QPen(QBrush(checkableColorCfg.defaultPen), (checkableColorCfg.defaultPen == Qt::NoPen || checkableColorCfg.defaultPen.alpha() == 0) - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -754,10 +756,10 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - checkDisablePen = QPen(QBrush(checkableColorCfg.disablePen), (checkableColorCfg.disablePen == Qt::NoPen || checkableColorCfg.disablePen.alpha() == 0) - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -+ checkBrush = palette.color(QPalette::Active, QPalette::Highlight); - checkHoverBrush = checkableColorCfg.hoverBrush; - checkClickBrush = checkableColorCfg.clickBrush; -- checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); -+ checkDisableBrush = palette.brush(QPalette::Disabled, QPalette::NoRole); - } - - if (isWindowColoseButton) { -@@ -853,9 +855,9 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - focusPen = clickPen; - } - else if (!isWindowColoseButton) { -- normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, -+ normalButtonColor(isDark, palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); -- focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), -+ focusPen = QPen(palette.brush(QPalette::Inactive, QPalette::Highlight), - (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? - 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - defaultPen = QPen(QBrush(buttonColorCfg.defaultPen), (buttonColorCfg.defaultPen == Qt::NoPen || buttonColorCfg.defaultPen.alpha() == 0) -@@ -974,6 +976,31 @@ void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, - m_PushButtonParameters.pushButtonCheckClickPen = checkClickPen; - m_PushButtonParameters.pushButtonCheckDisablePen = checkDisablePen; - m_PushButtonParameters.pushButtonFocusPen = focusPen; -+ -+} -+ -+void UKUIConfigStyleParameters::getDefaultConfigPushButtonBevelParameters(ConfigPushButtonParameters *p, bool isDark) -+{ -+ initConfigPushButtonBevelParameters(isDark, nullptr, nullptr); -+ p->radius = m_PushButtonParameters.radius; -+ p->pushButtonDefaultBrush = m_PushButtonParameters.pushButtonDefaultBrush ; -+ p->pushButtonClickBrush = m_PushButtonParameters.pushButtonClickBrush ; -+ p->pushButtonHoverBrush = m_PushButtonParameters.pushButtonHoverBrush ; -+ p->pushButtonDisableBrush = m_PushButtonParameters.pushButtonDisableBrush ; -+ p->pushButtonCheckBrush = m_PushButtonParameters.pushButtonCheckBrush ; -+ p->pushButtonCheckHoverBrush = m_PushButtonParameters.pushButtonCheckHoverBrush ; -+ p->pushButtonCheckClickBrush = m_PushButtonParameters.pushButtonCheckClickBrush ; -+ p->pushButtonCheckDisableBrush = m_PushButtonParameters.pushButtonCheckDisableBrush; -+ p->pushButtonDefaultPen = m_PushButtonParameters.pushButtonDefaultPen ; -+ p->pushButtonClickPen = m_PushButtonParameters.pushButtonClickPen ; -+ p->pushButtonHoverPen = m_PushButtonParameters.pushButtonHoverPen ; -+ p->pushButtonDisablePen = m_PushButtonParameters.pushButtonDisablePen ; -+ p->pushButtonCheckPen = m_PushButtonParameters.pushButtonCheckPen ; -+ p->pushButtonCheckHoverPen = m_PushButtonParameters.pushButtonCheckHoverPen ; -+ p->pushButtonCheckClickPen = m_PushButtonParameters.pushButtonCheckClickPen ; -+ p->pushButtonCheckDisablePen = m_PushButtonParameters.pushButtonCheckDisablePen ; -+ p->pushButtonFocusPen = m_PushButtonParameters.pushButtonFocusPen ; -+ - } - - void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -@@ -981,14 +1008,15 @@ void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, - bool iconHighlight = false; - bool textHighlight = false; - -- const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option); -+ QPalette palette = option ? option->palette : m_stylePalette; -+ const QStyleOptionButton *button = option ? qstyleoption_cast<const QStyleOptionButton *>(option) : nullptr; - bool isWindowButton = false; - bool useButtonPalette = false; - bool isImportant = false; - bool isWindowColoseButton = false; - bool needTranslucent = false; - -- UKUIColorTheme::ButtonColorCfg buttonColorCfg = readCfg()->buttonColorCfg(option->palette); -+ UKUIColorTheme::ButtonColorCfg buttonColorCfg = readCfg()->buttonColorCfg(palette); - - if (widget) { - if (widget->property("isWindowButton").isValid()) { -@@ -1012,20 +1040,20 @@ void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, - } - } - if (isWindowColoseButton) -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_WindowCloseButton); -+ buttonColorCfg = readCfg()->buttonColorCfg(palette, C_Button_WindowCloseButton); - if (isWindowButton) -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_WindowButton); -+ buttonColorCfg = readCfg()->buttonColorCfg(palette, C_Button_WindowButton); - if (useButtonPalette || isWindowButton) { - if (needTranslucent) -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_TranslucentButton); -+ buttonColorCfg = readCfg()->buttonColorCfg(palette, C_Button_TranslucentButton); - else -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_UseButtonPalette); -+ buttonColorCfg = readCfg()->buttonColorCfg(palette, C_Button_UseButtonPalette); - } - if (isImportant) -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -+ buttonColorCfg = readCfg()->buttonColorCfg(palette, C_Button_ImportButton); - -- if(option->state & QStyle::State_On && option->state & QStyle::State_Enabled){ -- buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); -+ if(option && option->state & QStyle::State_On && option->state & QStyle::State_Enabled){ -+ buttonColorCfg = readCfg()->buttonColorCfg(palette, C_Button_ImportButton); - } - - QColor textDefaultColor = buttonColorCfg.textDefaultColor; -@@ -1033,7 +1061,7 @@ void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, - QColor textDisableColor = buttonColorCfg.textDisableColor; - - //icon -- if ((isWindowButton || useButtonPalette) && !(button->state & QStyle::State_On)) { -+ if (button && (isWindowButton || useButtonPalette) && !(button->state & QStyle::State_On)) { - iconHighlight = false; - } else { - iconHighlight = true; -@@ -1054,7 +1082,7 @@ void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, - - if (widget) { - // if(!widget->isEnabled()) --// textColor = option->palette.color(QPalette::Disabled, QPalette::ButtonText); -+// textColor = palette.color(QPalette::Disabled, QPalette::ButtonText); - - if (widget->property("setIconHoverClickHighlight").isValid() && widget->property("setIconHoverClickHighlight").canConvert<bool>()) { - iconHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); -@@ -1080,6 +1108,16 @@ void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, - m_PushButtonParameters.textDisableColor = textDisableColor; - } - -+void UKUIConfigStyleParameters::getDefaultConfigPushButtonLabelParameters(ConfigPushButtonParameters *p, bool isDark) -+{ -+ initConfigPushButtonLabelParameters(isDark, nullptr, nullptr); -+ p->iconHoverClickHighlight = m_PushButtonParameters.iconHoverClickHighlight; -+ p->textHoverClickHighlight = m_PushButtonParameters.textHoverClickHighlight; -+ p->textDefaultColor = m_PushButtonParameters.textDefaultColor ; -+ p->textHoverColor = m_PushButtonParameters.textHoverColor ; -+ p->textDisableColor = m_PushButtonParameters.textDisableColor ; -+} -+ - void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - bool isWindowButton = false; -@@ -1087,7 +1125,9 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - bool isImportant = false; - bool useButtonPalette = false; - bool needTranslucent = false; -- UKUIColorTheme::ToolButtonColorCfg buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette); -+ QPalette palette = option ? option->palette : m_stylePalette; -+ -+ UKUIColorTheme::ToolButtonColorCfg buttonColorCfg = readCfg()->toolButtonColorCfg(palette); - - if (widget) { - if (widget->property("isWindowButton").isValid()) { -@@ -1111,17 +1151,17 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - } - } - if (isWindowColoseButton) -- buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_WindowCloseButton); -+ buttonColorCfg = readCfg()->toolButtonColorCfg(palette, C_Button_WindowCloseButton); - if (isWindowButton) -- buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_WindowButton); -+ buttonColorCfg = readCfg()->toolButtonColorCfg(palette, C_Button_WindowButton); - if (useButtonPalette || isWindowButton) { - if (needTranslucent) -- buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_TranslucentButton); -+ buttonColorCfg = readCfg()->toolButtonColorCfg(palette, C_Button_TranslucentButton); - else -- buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_UseButtonPalette); -+ buttonColorCfg = readCfg()->toolButtonColorCfg(palette, C_Button_UseButtonPalette); - } - if (isImportant) -- buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); -+ buttonColorCfg = readCfg()->toolButtonColorCfg(palette, C_Button_ImportButton); - - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -@@ -1133,11 +1173,11 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -+ linearGradient.setStart(option ? option->rect.topLeft() : QPoint(0, 0)); -+ linearGradient.setFinalStop(option ? option->rect.bottomLeft() : QPoint(0, 0)); - -- QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -+ QColor highlight = palette.color(QPalette::Active, QPalette::Highlight); -+ QColor mix = palette.color(QPalette::Active, QPalette::BrightText); - - QPen defaultPen ; - QPen hoverPen ; -@@ -1162,7 +1202,7 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - disablePen = QPen(QBrush(buttonColorCfg.disablePen), (buttonColorCfg.disablePen == Qt::NoPen) ? - 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- auto checkableColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); -+ auto checkableColorCfg = readCfg()->toolButtonColorCfg(palette, C_Button_ImportButton); - - { - checkPen = QPen(QBrush(checkableColorCfg.defaultPen), (checkableColorCfg.defaultPen == Qt::NoPen || checkableColorCfg.defaultPen.alpha() == 0) -@@ -1174,10 +1214,10 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - checkDisablePen = QPen(QBrush(checkableColorCfg.disablePen), (checkableColorCfg.disablePen == Qt::NoPen || checkableColorCfg.disablePen.alpha() == 0) - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - -- checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -+ checkBrush = palette.color(QPalette::Active, QPalette::Highlight); - checkHoverBrush = checkableColorCfg.hoverBrush; - checkClickBrush = checkableColorCfg.clickBrush; -- checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); -+ checkDisableBrush = palette.brush(QPalette::Disabled, QPalette::NoRole); - } - if (isWindowColoseButton){ - if (buttonColorCfg.hoverType == Obj_Gradient_Type) { -@@ -1273,9 +1313,9 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - focusPen = clickPen; - } - else if (!isWindowColoseButton) { -- normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, -+ normalButtonColor(isDark, palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); -- focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), -+ focusPen = QPen(palette.brush(QPalette::Inactive, QPalette::Highlight), - (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? - 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - defaultPen = QPen(QBrush(buttonColorCfg.defaultPen), (buttonColorCfg.defaultPen == Qt::NoPen || buttonColorCfg.defaultPen.alpha() == 0) -@@ -1395,6 +1435,30 @@ void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, - m_ToolButtonParameters.toolButtonFocusPen = focusPen; - } - -+void UKUIConfigStyleParameters::getDefaultConfigToolButtonPanelParameters(ConfigToolButtonParameters *p, bool isDark) -+{ -+ initConfigToolButtonPanelParameters(isDark, nullptr, nullptr); -+ p->radius = m_ToolButtonParameters.radius; -+ p->toolButtonDefaultBrush = m_ToolButtonParameters.toolButtonDefaultBrush ; -+ p->toolButtonClickBrush = m_ToolButtonParameters.toolButtonClickBrush ; -+ p->toolButtonHoverBrush = m_ToolButtonParameters.toolButtonHoverBrush ; -+ p->toolButtonDisableBrush = m_ToolButtonParameters.toolButtonDisableBrush ; -+ p->toolButtonCheckBrush = m_ToolButtonParameters.toolButtonCheckBrush ; -+ p->toolButtonCheckHoverBrush = m_ToolButtonParameters.toolButtonCheckHoverBrush ; -+ p->toolButtonCheckClickBrush = m_ToolButtonParameters.toolButtonCheckClickBrush ; -+ p->toolButtonCheckDisableBrush = m_ToolButtonParameters.toolButtonCheckDisableBrush; -+ p->toolButtonDefaultPen = m_ToolButtonParameters.toolButtonDefaultPen ; -+ p->toolButtonClickPen = m_ToolButtonParameters.toolButtonClickPen ; -+ p->toolButtonHoverPen = m_ToolButtonParameters.toolButtonHoverPen ; -+ p->toolButtonDisablePen = m_ToolButtonParameters.toolButtonDisablePen ; -+ p->toolButtonCheckPen = m_ToolButtonParameters.toolButtonCheckPen ; -+ p->toolButtonCheckHoverPen = m_ToolButtonParameters.toolButtonCheckHoverPen ; -+ p->toolButtonCheckClickPen = m_ToolButtonParameters.toolButtonCheckClickPen ; -+ p->toolButtonCheckDisablePen = m_ToolButtonParameters.toolButtonCheckDisablePen ; -+ p->toolButtonFocusPen = m_ToolButtonParameters.toolButtonFocusPen ; -+ -+} -+ - void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - bool iconHighlight = false; -@@ -1407,7 +1471,9 @@ void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, - bool isWindowColoseButton = false; - bool needTranslucent = false; - -- UKUIColorTheme::ToolButtonColorCfg buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette); -+ QPalette palette = option ? option->palette : m_stylePalette; -+ -+ UKUIColorTheme::ToolButtonColorCfg buttonColorCfg = readCfg()->toolButtonColorCfg(palette); - - if (widget) { - if (widget->property("isWindowButton").isValid()) { -@@ -1431,20 +1497,20 @@ void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, - } - } - if (isWindowColoseButton) -- buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_WindowCloseButton); -+ buttonColorCfg = readCfg()->toolButtonColorCfg(palette, C_Button_WindowCloseButton); - if (isWindowButton) -- buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_WindowButton); -+ buttonColorCfg = readCfg()->toolButtonColorCfg(palette, C_Button_WindowButton); - if (useButtonPalette || isWindowButton) { - if (needTranslucent) -- buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_TranslucentButton); -+ buttonColorCfg = readCfg()->toolButtonColorCfg(palette, C_Button_TranslucentButton); - else -- buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_UseButtonPalette); -+ buttonColorCfg = readCfg()->toolButtonColorCfg(palette, C_Button_UseButtonPalette); - } - if (isImportant) -- buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); -+ buttonColorCfg = readCfg()->toolButtonColorCfg(palette, C_Button_ImportButton); - -- if(option->state & QStyle::State_On && option->state & QStyle::State_Enabled){ -- buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); -+ if(option && option->state & QStyle::State_On && option->state & QStyle::State_Enabled){ -+ buttonColorCfg = readCfg()->toolButtonColorCfg(palette, C_Button_ImportButton); - } - - QColor textDefaultColor = buttonColorCfg.textDefaultColor; -@@ -1471,7 +1537,7 @@ void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, - } - if (widget) { - // if(!widget->isEnabled()) --// textColor = option->palette.color(QPalette::Disabled, QPalette::ButtonText); -+// textColor = palette.color(QPalette::Disabled, QPalette::ButtonText); - - if (widget->property("setIconHoverClickHighlight").isValid() && widget->property("setIconHoverClickHighlight").canConvert<bool>()) { - iconHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); -@@ -1497,6 +1563,16 @@ void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, - m_ToolButtonParameters.textDisableColor = textDisableColor; - } - -+void UKUIConfigStyleParameters::getDefaultConfigToolButtonLabelParameters(ConfigToolButtonParameters *p, bool isDark) -+{ -+ initConfigToolButtonLabelParameters(isDark, nullptr, nullptr); -+ p->iconHoverClickHighlight = m_ToolButtonParameters.iconHoverClickHighlight; -+ p->textHoverClickHighlight = m_ToolButtonParameters.textHoverClickHighlight; -+ p->textDefaultColor = m_ToolButtonParameters.textDefaultColor ; -+ p->textHoverColor = m_ToolButtonParameters.textHoverColor ; -+ p->textDisableColor = m_ToolButtonParameters.textDisableColor ; -+} -+ - void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? -@@ -1506,7 +1582,9 @@ void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const - needTranslucent = widget->property("needTranslucent").toBool(); - } - -- UKUIColorTheme::LineEditColorCfg lineEditColorCfg = readCfg()->lineEditColorCfg(option->palette, needTranslucent ? C_LineEdit_Translucent : C_LineEdit_Default); -+ QPalette palette = option ? option->palette : m_stylePalette; -+ -+ UKUIColorTheme::LineEditColorCfg lineEditColorCfg = readCfg()->lineEditColorCfg(palette, needTranslucent ? C_LineEdit_Translucent : C_LineEdit_Default); - - QBrush defaultBrush = lineEditColorCfg.defaultBrush; - QBrush hoverBrush = lineEditColorCfg.hoverBrush; -@@ -1522,8 +1600,8 @@ void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -+ linearGradient.setStart(option ? option->rect.topLeft() : QPoint(0, 0)); -+ linearGradient.setFinalStop(option ? option->rect.bottomLeft() :QPoint(0, 0)); - startColor = lineEditColorCfg.hoverGradientList.value(0); - endColor = lineEditColorCfg.hoverGradientList.value(1); - -@@ -1575,23 +1653,39 @@ void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const - } - } - -- m_LineEditParameters.radius = radius; -+ m_LineEditParameters.radius = radius; - m_LineEditParameters.lineEditDefaultBrush = defaultBrush; -- m_LineEditParameters.lineEditHoverBrush = hoverBrush; -- m_LineEditParameters.lineEditFocusBrush = focusBrush; -+ m_LineEditParameters.lineEditHoverBrush = hoverBrush; -+ m_LineEditParameters.lineEditFocusBrush = focusBrush; - m_LineEditParameters.lineEditDisableBrush = disableBrush; -- m_LineEditParameters.lineEditDefaultPen = defaultPen; -- m_LineEditParameters.lineEditHoverPen = hoverPen; -- m_LineEditParameters.lineEditFocusPen = focusPen; -- m_LineEditParameters.lineEditDisablePen = disablePen; -+ m_LineEditParameters.lineEditDefaultPen = defaultPen; -+ m_LineEditParameters.lineEditHoverPen = hoverPen; -+ m_LineEditParameters.lineEditFocusPen = focusPen; -+ m_LineEditParameters.lineEditDisablePen = disablePen; -+} -+ -+void UKUIConfigStyleParameters::getDefaultConfigLineEditParameters(ConfigLineEditParameters *p, bool isDark) -+{ -+ initConfigLineEditParameters(isDark, nullptr, nullptr); -+ p->radius = m_LineEditParameters.radius ; -+ p->lineEditDefaultBrush = m_LineEditParameters.lineEditDefaultBrush; -+ p->lineEditHoverBrush = m_LineEditParameters.lineEditHoverBrush ; -+ p->lineEditFocusBrush = m_LineEditParameters.lineEditFocusBrush ; -+ p->lineEditDisableBrush = m_LineEditParameters.lineEditDisableBrush; -+ p->lineEditDefaultPen = m_LineEditParameters.lineEditDefaultPen ; -+ p->lineEditHoverPen = m_LineEditParameters.lineEditHoverPen ; -+ p->lineEditFocusPen = m_LineEditParameters.lineEditFocusPen ; -+ p->lineEditDisablePen = m_LineEditParameters.lineEditDisablePen ; - } - - void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - -+ QPalette palette = option ? option->palette : m_stylePalette; -+ - UKUIColorTheme::SpinBoxColorCfg spinBoxColorCfg = -- readCfg()->spinBoxColorCfg(option->palette, C_SpinBox_Default, isHorizonLayout ? C_SpinBox_HorizonLayout : C_SpinBox_DefaultLayout); -+ readCfg()->spinBoxColorCfg(palette, C_SpinBox_Default, isHorizonLayout ? C_SpinBox_HorizonLayout : C_SpinBox_DefaultLayout); - - QBrush defaultBrush = spinBoxColorCfg.defaultBrush; - QBrush hoverBrush = spinBoxColorCfg.hoverBrush; -@@ -1646,8 +1740,8 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -+ linearGradient.setStart(!option ? QPoint(0, 0) : option->rect.topLeft()); -+ linearGradient.setFinalStop(!option ? QPoint(0, 0) : option->rect.bottomLeft()); - startColor = spinBoxColorCfg.hoverGradientList.value(0); - endColor = spinBoxColorCfg.hoverGradientList.value(1); - -@@ -1661,18 +1755,18 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - break; - } - -- QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor button = option->palette.color(QPalette::Active, QPalette::Button); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -+ QColor highlight = palette.color(QPalette::Active, QPalette::Highlight); -+ QColor button = palette.color(QPalette::Active, QPalette::Button); -+ QColor mix = palette.color(QPalette::Active, QPalette::BrightText); - QColor startColor; - QColor endColor; - - QLinearGradient upLinearGradient; -- upLinearGradient.setStart(option->rect.left(), option->rect.top()); -- upLinearGradient.setFinalStop(option->rect.left(), option->rect.center().y()); -+ upLinearGradient.setStart(!option ? QPoint(0, 0) : QPoint(option->rect.left(), option->rect.top())); -+ upLinearGradient.setFinalStop(!option ? QPoint(0, 0) : QPoint(option->rect.left(), option->rect.center().y())); - QLinearGradient downLinearGradient; -- downLinearGradient.setStart(option->rect.left(), option->rect.center().y()); -- downLinearGradient.setFinalStop(option->rect.left(), option->rect.bottom()); -+ downLinearGradient.setStart(!option ? QPoint(0, 0) : QPoint(option->rect.left(), option->rect.center().y())); -+ downLinearGradient.setFinalStop(!option ? QPoint(0, 0) : QPoint(option->rect.left(), option->rect.bottom())); - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ -@@ -1750,13 +1844,13 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - case AdjustColorRules::HSL:{ - //up hover - if (isDark) { -- upHoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), -+ upHoverPen = QPen(QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { -- upHoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), -+ upHoverPen = QPen(QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } -- upHoverBrush = QBrush(highlightHover(isDark, option->palette)); -+ upHoverBrush = QBrush(highlightHover(isDark, palette)); - - //up focus hover - upFocusHoverBrush = upHoverBrush; -@@ -1764,13 +1858,13 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - - //up click - if (isDark) { -- upClickPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), -+ upClickPen = QPen(palette.brush(QPalette::Active, QPalette::Highlight), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { -- upClickPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), -+ upClickPen = QPen(QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } -- upClickBrush = QBrush(highlightClick(isDark, option->palette)); -+ upClickBrush = QBrush(highlightClick(isDark, palette)); - - //up disable - upDisablePen = disablePen; -@@ -1948,13 +2042,54 @@ void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const Q - m_SpinBoxParameters.spinBoxDownIconHightPixMap = (m_adjustColorRules == 0 ? true : false); - } - -+void UKUIConfigStyleParameters::getDefaultConfigSpinBoxParameters(ConfigSpinBoxParameters *p, bool isDark) -+{ -+ initConfigSpinBoxParameters(isDark, nullptr, nullptr); -+ p->radius = m_SpinBoxParameters.radius ; -+ p->spinBoxDefaultBrush = m_SpinBoxParameters.spinBoxDefaultBrush ; -+ p->spinBoxHoverBrush = m_SpinBoxParameters.spinBoxHoverBrush ; -+ p->spinBoxFocusBrush = m_SpinBoxParameters.spinBoxFocusBrush ; -+ p->spinBoxDisableBrush = m_SpinBoxParameters.spinBoxDisableBrush ; -+ -+ p->spinBoxDefaultPen = m_SpinBoxParameters.spinBoxDefaultPen ; -+ p->spinBoxHoverPen = m_SpinBoxParameters.spinBoxHoverPen ; -+ p->spinBoxFocusPen = m_SpinBoxParameters.spinBoxFocusPen ; -+ p->spinBoxDisablePen = m_SpinBoxParameters.spinBoxDisablePen ; -+ -+ p->spinBoxUpDefaultBrush = m_SpinBoxParameters.spinBoxUpDefaultBrush ; -+ p->spinBoxUpHoverBrush = m_SpinBoxParameters.spinBoxUpHoverBrush ; -+ p->spinBoxUpFocusHoverBrush = m_SpinBoxParameters.spinBoxUpFocusHoverBrush ; -+ p->spinBoxUpClickBrush = m_SpinBoxParameters.spinBoxUpClickBrush ; -+ p->spinBoxDownHoverBrush = m_SpinBoxParameters.spinBoxDownHoverBrush ; -+ p->spinBoxDownFocusHoverBrush = m_SpinBoxParameters.spinBoxDownFocusHoverBrush ; -+ p->spinBoxDownClickBrush = m_SpinBoxParameters.spinBoxDownClickBrush ; -+ p->spinBoxDownDefaultBrush = m_SpinBoxParameters.spinBoxDownDefaultBrush ; -+ -+ p->spinBoxUpDefaultPen = m_SpinBoxParameters.spinBoxUpDefaultPen ; -+ p->spinBoxUpHoverPen = m_SpinBoxParameters.spinBoxUpHoverPen ; -+ p->spinBoxUpFocusHoverPen = m_SpinBoxParameters.spinBoxUpFocusHoverPen ; -+ p->spinBoxUpClickPen = m_SpinBoxParameters.spinBoxUpClickPen ; -+ p->spinBoxUpDisablePen = m_SpinBoxParameters.spinBoxUpDisablePen ; -+ -+ p->spinBoxDownDefaultPen = m_SpinBoxParameters.spinBoxDownDefaultPen ; -+ p->spinBoxDownHoverPen = m_SpinBoxParameters.spinBoxDownHoverPen ; -+ p->spinBoxDownFocusHoverPen = m_SpinBoxParameters.spinBoxDownFocusHoverPen ; -+ p->spinBoxDownClickPen = m_SpinBoxParameters.spinBoxDownClickPen ; -+ p->spinBoxDownDisablePen = m_SpinBoxParameters.spinBoxDownDisablePen ; -+ -+ p->spinBoxUpIconHightPixMap = m_SpinBoxParameters.spinBoxUpIconHightPixMap ; -+ p->spinBoxDownIconHightPixMap = m_SpinBoxParameters.spinBoxDownIconHightPixMap ; -+ -+} -+ - void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - -+ QPalette palette = option ? option->palette : m_stylePalette; - -- UKUIColorTheme::ComboBoxColorCfg comboBoxColorCfg = readCfg()->comboBoxColorCfg(option->palette, C_ComboBox_Default); -+ UKUIColorTheme::ComboBoxColorCfg comboBoxColorCfg = readCfg()->comboBoxColorCfg(palette, C_ComboBox_Default); - - QBrush defaultBrush = comboBoxColorCfg.defaultBrush; - QBrush hoverBrush = comboBoxColorCfg.hoverBrush; -@@ -1977,7 +2112,7 @@ void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const - - switch (m_adjustColorRules) { - case AdjustColorRules::HSL: -- normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, -+ normalButtonColor(isDark, palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - onPen, onBrush, disablePen, disableBrush); - defaultPen = QPen(QBrush(comboBoxColorCfg.defaultPen), (comboBoxColorCfg.defaultPen == Qt::NoPen || comboBoxColorCfg.defaultPen.alpha() == 0) - ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -2046,30 +2181,48 @@ void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const - } - } - -- m_ComboBoxParameters.radius = radius; -+ m_ComboBoxParameters.radius = radius; - - m_ComboBoxParameters.comboBoxDefaultBrush = defaultBrush; -- m_ComboBoxParameters.comboBoxHoverBrush = hoverBrush; -- m_ComboBoxParameters.comboBoxOnBrush = onBrush; -- m_ComboBoxParameters.comboBoxEditBrush = editBrush; -+ m_ComboBoxParameters.comboBoxHoverBrush = hoverBrush; -+ m_ComboBoxParameters.comboBoxOnBrush = onBrush; -+ m_ComboBoxParameters.comboBoxEditBrush = editBrush; - m_ComboBoxParameters.comboBoxDisableBrush = disableBrush; - -- m_ComboBoxParameters.comboBoxDefaultPen = defaultPen; -- m_ComboBoxParameters.comboBoxHoverPen = hoverPen; -- m_ComboBoxParameters.comboBoxOnPen = onPen; -- m_ComboBoxParameters.comboBoxEditPen = editPen; -- m_ComboBoxParameters.comboBoxDisablePen = disablePen; -- m_ComboBoxParameters.comboBoxFocusPen = focusPen; -+ m_ComboBoxParameters.comboBoxDefaultPen = defaultPen; -+ m_ComboBoxParameters.comboBoxHoverPen = hoverPen; -+ m_ComboBoxParameters.comboBoxOnPen = onPen; -+ m_ComboBoxParameters.comboBoxEditPen = editPen; -+ m_ComboBoxParameters.comboBoxDisablePen = disablePen; -+ m_ComboBoxParameters.comboBoxFocusPen = focusPen; -+} -+ -+void UKUIConfigStyleParameters::getDefaultConfigComboBoxParameters(ConfigComboBoxParameters *p, bool isDark) -+{ -+ initConfigComboBoxParameters(isDark, nullptr, nullptr); -+ p->radius = m_ComboBoxParameters.radius ; -+ p->comboBoxDefaultBrush = m_ComboBoxParameters.comboBoxDefaultBrush; -+ p->comboBoxHoverBrush = m_ComboBoxParameters.comboBoxHoverBrush ; -+ p->comboBoxOnBrush = m_ComboBoxParameters.comboBoxOnBrush ; -+ p->comboBoxEditBrush = m_ComboBoxParameters.comboBoxEditBrush ; -+ p->comboBoxDisableBrush = m_ComboBoxParameters.comboBoxDisableBrush; -+ p->comboBoxDefaultPen = m_ComboBoxParameters.comboBoxDefaultPen ; -+ p->comboBoxHoverPen = m_ComboBoxParameters.comboBoxHoverPen ; -+ p->comboBoxOnPen = m_ComboBoxParameters.comboBoxOnPen ; -+ p->comboBoxEditPen = m_ComboBoxParameters.comboBoxEditPen ; -+ p->comboBoxDisablePen = m_ComboBoxParameters.comboBoxDisablePen ; -+ p->comboBoxFocusPen = m_ComboBoxParameters.comboBoxFocusPen ; - } - --void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool highlight) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - -+ QPalette palette = option ? option->palette : m_stylePalette; - - bool needTranslucent = false; -- bool highlightMode = false; -+ bool highlightMode = highlight; - if (widget && widget->property("highlightMode").isValid()) { - highlightMode = widget->property("highlightMode").toBool(); - } -@@ -2077,7 +2230,7 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - needTranslucent = widget->property("needTranslucent").toBool(); - } - -- UKUIColorTheme::ListViewColorCfg listViewColorCfg = readCfg()->listViewColorCfg(option->palette, highlightMode ? -+ UKUIColorTheme::ListViewColorCfg listViewColorCfg = readCfg()->listViewColorCfg(palette, highlightMode ? - C_ListView_Highlight : (needTranslucent ? C_ListView_Translucent : C_ListView_Default)); - - QBrush defaultBrush = listViewColorCfg.defaultBrush; -@@ -2102,8 +2255,8 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -+ linearGradient.setStart(!option ? QPoint(0,0) : option->rect.topLeft()); -+ linearGradient.setFinalStop(!option ? QPoint(0,0) : option->rect.bottomLeft()); - - startColor = listViewColorCfg.hoverGradientList.value(0); - endColor = listViewColorCfg.hoverGradientList.value(1); -@@ -2113,21 +2266,21 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - } - break; - case AdjustColorRules::HSL: -- hoverBrush = QBrush(highlightHover(isDark, option->palette)); -- selectBrush = QBrush(highlightClick(isDark, option->palette)); -+ hoverBrush = QBrush(highlightHover(isDark, palette)); -+ selectBrush = QBrush(highlightClick(isDark, palette)); - - if(isDark) { -- hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), -+ hoverPen = QPen(QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { -- hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), -+ hoverPen = QPen(QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - if(isDark) { -- selectPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), -+ selectPen = QPen(QBrush(palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { -- selectPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), -+ selectPen = QPen(QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - break; -@@ -2198,16 +2351,52 @@ void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QSty - m_ListParameters.listFocusPen = focusPen; - } - --void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::getDefaultConfigListParameters(ConfigListParameters *p, bool isDark) -+{ -+ initConfigListParameters(isDark, nullptr, nullptr); -+ -+ p->radius = m_ListParameters.radius ; -+ p->listDefaultBrush = m_ListParameters.listDefaultBrush ; -+ p->listHoverBrush = m_ListParameters.listHoverBrush ; -+ p->listSelectBrush = m_ListParameters.listSelectBrush ; -+ p->listDisableBrush = m_ListParameters.listDisableBrush ; -+ p->listTextHoverPen = m_ListParameters.listTextHoverPen ; -+ p->listTextSelectPen = m_ListParameters.listTextSelectPen ; -+ p->listTextDisablePen = m_ListParameters.listTextDisablePen ; -+ p->listHoverPen = m_ListParameters.listHoverPen ; -+ p->listSelectPen = m_ListParameters.listSelectPen ; -+ p->listFocusPen = m_ListParameters.listFocusPen ; -+} -+ -+void UKUIConfigStyleParameters::getHighlightModeConfigListParameters(ConfigListParameters *p, bool isDark) -+{ -+ initConfigListParameters(isDark, nullptr, nullptr, true); -+ -+ p->radius = m_ListParameters.radius ; -+ p->listDefaultBrush = m_ListParameters.listDefaultBrush ; -+ p->listHoverBrush = m_ListParameters.listHoverBrush ; -+ p->listSelectBrush = m_ListParameters.listSelectBrush ; -+ p->listDisableBrush = m_ListParameters.listDisableBrush ; -+ p->listTextHoverPen = m_ListParameters.listTextHoverPen ; -+ p->listTextSelectPen = m_ListParameters.listTextSelectPen ; -+ p->listTextDisablePen = m_ListParameters.listTextDisablePen ; -+ p->listHoverPen = m_ListParameters.listHoverPen ; -+ p->listSelectPen = m_ListParameters.listSelectPen ; -+ p->listFocusPen = m_ListParameters.listFocusPen ; -+} -+ -+void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool highlight) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - -- bool highlightMode = false; -+ bool highlightMode = highlight; - if (widget && widget->property("highlightMode").isValid()) { - highlightMode = widget->property("highlightMode").toBool(); - } -- UKUIColorTheme::TreeViewColorCfg treeViewColorCfg = readCfg()->treeViewColorCfg(option->palette, -+ QPalette palette = option ? option->palette : m_stylePalette; -+ -+ UKUIColorTheme::TreeViewColorCfg treeViewColorCfg = readCfg()->treeViewColorCfg(palette, - highlightMode ? C_TreeView_HighLight : C_TreeView_Default); - - QBrush defaultBrush = treeViewColorCfg.defaultBrush; -@@ -2248,23 +2437,23 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - } - }break; - case AdjustColorRules::HSL:{ -- hoverBrush = QBrush(highlightHover(isDark, option->palette)); -+ hoverBrush = QBrush(highlightHover(isDark, palette)); - branchHoverBrush = hoverBrush; -- selectBrush = QBrush(highlightClick(isDark, option->palette)); -+ selectBrush = QBrush(highlightClick(isDark, palette)); - - if(isDark) { -- hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), -+ hoverPen = QPen(QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { -- hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), -+ hoverPen = QPen(QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - - if(isDark) { -- selectPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), -+ selectPen = QPen(QBrush(palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { -- selectPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), -+ selectPen = QPen(QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - }break; -@@ -2342,7 +2531,7 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - } - } - -- m_TreeParameters.radius = radius; -+ m_TreeParameters.radius = radius; - m_TreeParameters.treeDefaultBrush = defaultBrush; - m_TreeParameters.treeHoverBrush = hoverBrush; - m_TreeParameters.treeSelectBrush = selectBrush; -@@ -2353,25 +2542,69 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - m_TreeParameters.treeBranchSelectBrush = branchSelectBrush; - m_TreeParameters.treeBranchDisableBrush = branchDisableBrush; - -- m_TreeParameters.treeHoverPen = hoverPen; -- m_TreeParameters.treeSelectPen = selectPen; -- m_TreeParameters.treeFocusPen = focusPen; -- m_TreeParameters.treeTextHoverPen = textHoverPen; -- m_TreeParameters.treeTextSelectPen = textSelectPen; -+ m_TreeParameters.treeHoverPen = hoverPen; -+ m_TreeParameters.treeSelectPen = selectPen; -+ m_TreeParameters.treeFocusPen = focusPen; -+ m_TreeParameters.treeTextHoverPen = textHoverPen; -+ m_TreeParameters.treeTextSelectPen = textSelectPen; - m_TreeParameters.treeTextDisablePen = textDisablePen; - } - --void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -+void UKUIConfigStyleParameters::getDefaultConfigTreeParameters(ConfigTreeParameters *p, bool isDark) -+{ -+ initConfigTreeParameters(isDark, nullptr, nullptr); -+ -+ p->radius = m_TreeParameters.radius ; -+ p->treeDefaultBrush = m_TreeParameters.treeDefaultBrush ; -+ p->treeHoverBrush = m_TreeParameters.treeHoverBrush ; -+ p->treeSelectBrush = m_TreeParameters.treeSelectBrush ; -+ p->treeDisableBrush = m_TreeParameters.treeDisableBrush ; -+ p->treeBranchDefaultBrush = m_TreeParameters.treeBranchDefaultBrush; -+ p->treeBranchHoverBrush = m_TreeParameters.treeBranchHoverBrush ; -+ p->treeBranchSelectBrush = m_TreeParameters.treeBranchSelectBrush ; -+ p->treeBranchDisableBrush = m_TreeParameters.treeBranchDisableBrush; -+ p->treeHoverPen = m_TreeParameters.treeHoverPen ; -+ p->treeSelectPen = m_TreeParameters.treeSelectPen ; -+ p->treeFocusPen = m_TreeParameters.treeFocusPen ; -+ p->treeTextHoverPen = m_TreeParameters.treeTextHoverPen ; -+ p->treeTextSelectPen = m_TreeParameters.treeTextSelectPen ; -+ p->treeTextDisablePen = m_TreeParameters.treeTextDisablePen ; -+} -+ -+void UKUIConfigStyleParameters::getHighlightModeConfigTreeParameters(ConfigTreeParameters *p, bool isDark) -+{ -+ initConfigTreeParameters(isDark, nullptr, nullptr, true); -+ -+ p->radius = m_TreeParameters.radius ; -+ p->treeDefaultBrush = m_TreeParameters.treeDefaultBrush ; -+ p->treeHoverBrush = m_TreeParameters.treeHoverBrush ; -+ p->treeSelectBrush = m_TreeParameters.treeSelectBrush ; -+ p->treeDisableBrush = m_TreeParameters.treeDisableBrush ; -+ p->treeBranchDefaultBrush = m_TreeParameters.treeBranchDefaultBrush; -+ p->treeBranchHoverBrush = m_TreeParameters.treeBranchHoverBrush ; -+ p->treeBranchSelectBrush = m_TreeParameters.treeBranchSelectBrush ; -+ p->treeBranchDisableBrush = m_TreeParameters.treeBranchDisableBrush; -+ p->treeHoverPen = m_TreeParameters.treeHoverPen ; -+ p->treeSelectPen = m_TreeParameters.treeSelectPen ; -+ p->treeFocusPen = m_TreeParameters.treeFocusPen ; -+ p->treeTextHoverPen = m_TreeParameters.treeTextHoverPen ; -+ p->treeTextSelectPen = m_TreeParameters.treeTextSelectPen ; -+ p->treeTextDisablePen = m_TreeParameters.treeTextDisablePen ; -+} -+ -+void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool highlight) - { - int radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - - -- bool highlightMode = false; -+ bool highlightMode = highlight; - if (widget && widget->property("highlightMode").isValid()) { - highlightMode = widget->property("highlightMode").toBool(); - } -- UKUIColorTheme::TableColorCfg tableColorCfg = readCfg()->tableColorCfg(option->palette, -+ QPalette palette = option ? option->palette : m_stylePalette; -+ -+ UKUIColorTheme::TableColorCfg tableColorCfg = readCfg()->tableColorCfg(palette, - highlightMode ? C_Table_Highlight : C_Table_Default); - - QBrush defaultBrush = tableColorCfg.defaultBrush; -@@ -2392,8 +2625,8 @@ void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QSt - case AdjustColorRules::DefaultRGB:{ - if(tableColorCfg.hoverType == Obj_Gradient_Type) { - QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -+ linearGradient.setStart(!option ? QPoint(0,0) : option->rect.topLeft()); -+ linearGradient.setFinalStop(!option ? QPoint(0,0) : option->rect.bottomLeft()); - QColor startColor; - QColor endColor; - startColor = tableColorCfg.hoverGradientList.value(0); -@@ -2404,22 +2637,22 @@ void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QSt - } - } break; - case AdjustColorRules::HSL:{ -- hoverBrush = QBrush(highlightHover(isDark, option->palette)); -- selectBrush = QBrush(highlightClick(isDark, option->palette)); -+ hoverBrush = QBrush(highlightHover(isDark, palette)); -+ selectBrush = QBrush(highlightClick(isDark, palette)); - - if(isDark) { -- hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), -+ hoverPen = QPen(QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { -- hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), -+ hoverPen = QPen(QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - - if (isDark) { -- selectPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), -+ selectPen = QPen(QBrush(palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { -- selectPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), -+ selectPen = QPen(QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - } break; -@@ -2477,28 +2710,62 @@ void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QSt - } - } - -- m_TableParameters.radius = radius; -- m_TableParameters.tableDefaultBrush = defaultBrush; -- m_TableParameters.tableHoverBrush = hoverBrush; -- m_TableParameters.tableSelectBrush = selectBrush; -- m_TableParameters.tableDisableBrush = disableBrush; -- m_TableParameters.tableHoverPen = hoverPen; -- m_TableParameters.tableSelectPen = selectPen; -- m_TableParameters.tableFocusPen = focusPen; -- -- m_TableParameters.tableTextHoverPen = textHoverPen; -- m_TableParameters.tableTextSelectPen = textSelectPen; -+ m_TableParameters.radius = radius; -+ m_TableParameters.tableDefaultBrush = defaultBrush; -+ m_TableParameters.tableHoverBrush = hoverBrush; -+ m_TableParameters.tableSelectBrush = selectBrush; -+ m_TableParameters.tableDisableBrush = disableBrush; -+ m_TableParameters.tableHoverPen = hoverPen; -+ m_TableParameters.tableSelectPen = selectPen; -+ m_TableParameters.tableFocusPen = focusPen; -+ m_TableParameters.tableTextHoverPen = textHoverPen; -+ m_TableParameters.tableTextSelectPen = textSelectPen; - m_TableParameters.tableTextDisablePen = textDisablePen; - } - -+void UKUIConfigStyleParameters::getDefaultConfigTableParameters(ConfigTableParameters *p, bool isDark) -+{ -+ initConfigTableParameters(isDark, nullptr, nullptr); -+ -+ p->radius = m_TableParameters.radius ; -+ p->tableDefaultBrush = m_TableParameters.tableDefaultBrush ; -+ p->tableHoverBrush = m_TableParameters.tableHoverBrush ; -+ p->tableSelectBrush = m_TableParameters.tableSelectBrush ; -+ p->tableDisableBrush = m_TableParameters.tableDisableBrush ; -+ p->tableHoverPen = m_TableParameters.tableHoverPen ; -+ p->tableSelectPen = m_TableParameters.tableSelectPen ; -+ p->tableFocusPen = m_TableParameters.tableFocusPen ; -+ p->tableTextHoverPen = m_TableParameters.tableTextHoverPen ; -+ p->tableTextSelectPen = m_TableParameters.tableTextSelectPen ; -+ p->tableTextDisablePen = m_TableParameters.tableTextDisablePen; -+} -+ -+void UKUIConfigStyleParameters::getHighlightModeConfigTableParameters(ConfigTableParameters *p, bool isDark) -+{ -+ initConfigTableParameters(isDark, nullptr, nullptr, true); -+ -+ p->radius = m_TableParameters.radius ; -+ p->tableDefaultBrush = m_TableParameters.tableDefaultBrush ; -+ p->tableHoverBrush = m_TableParameters.tableHoverBrush ; -+ p->tableSelectBrush = m_TableParameters.tableSelectBrush ; -+ p->tableDisableBrush = m_TableParameters.tableDisableBrush ; -+ p->tableHoverPen = m_TableParameters.tableHoverPen ; -+ p->tableSelectPen = m_TableParameters.tableSelectPen ; -+ p->tableFocusPen = m_TableParameters.tableFocusPen ; -+ p->tableTextHoverPen = m_TableParameters.tableTextHoverPen ; -+ p->tableTextSelectPen = m_TableParameters.tableTextSelectPen ; -+ p->tableTextDisablePen = m_TableParameters.tableTextDisablePen; -+} -+ - void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - bool needTranslucent = false; - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } -+ QPalette palette = option ? option->palette : m_stylePalette; - -- UKUIColorTheme::CheckBoxColorCfg checkboxColorCfg = readCfg()->checkBoxColorCfg(option->palette, -+ UKUIColorTheme::CheckBoxColorCfg checkboxColorCfg = readCfg()->checkBoxColorCfg(palette, - needTranslucent ? C_CheckBox_Translucent : C_CheckBox_Default); - - int radius = (widget && widget->property("minRadius").isValid()) ? -@@ -2525,7 +2792,7 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - - bool onHoverBrushIslinearGradient = false; - -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -+ QColor mix = palette.color(QPalette::Active, QPalette::BrightText); - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ -@@ -2533,8 +2800,8 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -+ linearGradient.setStart(!option ? QPoint(0,0) : option->rect.topLeft()); -+ linearGradient.setFinalStop(!option ? QPoint(0,0) : option->rect.bottomLeft()); - startColor = checkboxColorCfg.hoverGradientList.value(0); - endColor = checkboxColorCfg.hoverGradientList.value(1); - linearGradient.setColorAt(0, startColor); -@@ -2547,12 +2814,12 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - onClickBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, isDark ? 0.05 : 0.2)); - } else if (checkboxColorCfg.onHoverType == Obj_Gradient_Type) { - //on default -- QColor DefaultPenColor = option->palette.color(QPalette::Active, QPalette::Highlight); -+ QColor DefaultPenColor = palette.color(QPalette::Active, QPalette::Highlight); - QColor onDefaultPenColor = configMixColor(DefaultPenColor, mix, 0.1); - onDefaultPen = QPen(QBrush(onDefaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -- onDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); -+ onDefaultBrush = palette.brush(QPalette::Active, QPalette::Highlight); - if(needTranslucent) { -- QColor onDefaultPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -+ QColor onDefaultPenColor = palette.color(QPalette::Active, QPalette::BrightText); - onDefaultPenColor.setAlphaF(0.1); - onDefaultPen = QPen(QBrush(onDefaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } -@@ -2563,8 +2830,8 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -+ linearGradient.setStart(!option ? QPoint(0,0) : option->rect.topLeft()); -+ linearGradient.setFinalStop(!option ? QPoint(0,0) : option->rect.bottomLeft()); - if (isDark) { - startColor = configMixColor(onDefaultBrush.color(), QColor(Qt::white), 0.2); - endColor = configMixColor(onDefaultBrush.color(), QColor(Qt::black), 0.05); -@@ -2576,7 +2843,7 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - linearGradient.setColorAt(1, endColor); - onHoverBrush = QBrush(linearGradient); - if(needTranslucent) { -- QColor onHoverPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -+ QColor onHoverPenColor = palette.color(QPalette::Active, QPalette::BrightText); - onHoverPenColor.setAlphaF(0.2); - onHoverPen = QPen(QBrush(onHoverPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } -@@ -2586,7 +2853,7 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - onClickPen = QPen(QBrush(onClickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - onClickBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, 0.1)); - if(needTranslucent) { -- QColor onClickPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); -+ QColor onClickPenColor = palette.color(QPalette::Active, QPalette::BrightText); - onClickPenColor.setAlphaF(0.2); - onClickPen = QPen(QBrush(onClickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } -@@ -2595,7 +2862,7 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - disablePen = defaultPen; - } break; - case AdjustColorRules::HSL:{ -- normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, -+ normalButtonColor(isDark, palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); - defaultPen = QPen(checkboxColorCfg.defaultPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - disablePen = QPen(checkboxColorCfg.disablePen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -2727,12 +2994,38 @@ void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const - m_CheckBoxParameters.onHoverBrushIslinearGradient = onHoverBrushIslinearGradient; - } - -+void UKUIConfigStyleParameters::getDefaultConfigCheckBoxParameters(ConfigCheckBoxParameters *p, bool isDark) -+{ -+ initConfigCheckBoxParameters(isDark, nullptr, nullptr); -+ -+ p->radius = m_CheckBoxParameters.radius ; -+ p->checkBoxDefaultPen = m_CheckBoxParameters.checkBoxDefaultPen ; -+ p->checkBoxHoverPen = m_CheckBoxParameters.checkBoxHoverPen ; -+ p->checkBoxClickPen = m_CheckBoxParameters.checkBoxClickPen ; -+ p->checkBoxDisablePen = m_CheckBoxParameters.checkBoxDisablePen ; -+ p->checkBoxOnDefaultPen = m_CheckBoxParameters.checkBoxOnDefaultPen ; -+ p->checkBoxOnHoverPen = m_CheckBoxParameters.checkBoxOnHoverPen ; -+ p->checkBoxOnClickPen = m_CheckBoxParameters.checkBoxOnClickPen ; -+ p->checkBoxContentPen = m_CheckBoxParameters.checkBoxContentPen ; -+ p->checkBoxDefaultBrush = m_CheckBoxParameters.checkBoxDefaultBrush ; -+ p->checkBoxHoverBrush = m_CheckBoxParameters.checkBoxHoverBrush ; -+ p->checkBoxClickBrush = m_CheckBoxParameters.checkBoxClickBrush ; -+ p->checkBoxDisableBrush = m_CheckBoxParameters.checkBoxDisableBrush ; -+ p->checkBoxOnDefaultBrush = m_CheckBoxParameters.checkBoxOnDefaultBrush ; -+ p->checkBoxOnHoverBrush = m_CheckBoxParameters.checkBoxOnHoverBrush ; -+ p->checkBoxOnClickBrush = m_CheckBoxParameters.checkBoxOnClickBrush ; -+ p->checkBoxPathBrush = m_CheckBoxParameters.checkBoxPathBrush ; -+ p->checkBoxPathDisableBrush = m_CheckBoxParameters.checkBoxPathDisableBrush ; -+ p->onHoverBrushIslinearGradient = m_CheckBoxParameters.onHoverBrushIslinearGradient; -+} -+ - void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { - m_RadioButtonParameters.radius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -+ QPalette palette = option ? option->palette : m_stylePalette; - -- UKUIColorTheme::RadioButtonColorCfg radioButtonColorCfg = readCfg()->radioButtonColorCfg(option->palette, C_RadioButton_Default); -+ UKUIColorTheme::RadioButtonColorCfg radioButtonColorCfg = readCfg()->radioButtonColorCfg(palette, C_RadioButton_Default); - QPen defaultPen = QPen(radioButtonColorCfg.defaultPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen hoverPen = QPen(radioButtonColorCfg.hoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen clickPen = QPen(radioButtonColorCfg.clickPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -2755,8 +3048,8 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - - if (radioButtonColorCfg.onHoverType == Obj_Gradient_Type) { - QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -+ linearGradient.setStart(!option ? QPoint(0,0) : option->rect.topLeft()); -+ linearGradient.setFinalStop(!option ? QPoint(0,0) : option->rect.bottomLeft()); - linearGradient.setColorAt(0, radioButtonColorCfg.onHoverGradientList.value(0)); - linearGradient.setColorAt(1, radioButtonColorCfg.onHoverGradientList.value(1)); - onHoverBrush = QBrush(linearGradient); -@@ -2764,8 +3057,9 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -+ QColor mix = palette.color(QPalette::Active, QPalette::BrightText); - -+ if(option) - m_RadioButtonParameters.childrenRadius = - (qstyleoption_cast<const QStyleOptionButton*>(option)->rect.adjusted(1, 1, -1, -1).width()) / 2 - 2; - -@@ -2799,8 +3093,8 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -+ linearGradient.setStart(!option ? QPoint(0,0) : option->rect.topLeft()); -+ linearGradient.setFinalStop(!option ? QPoint(0,0) : option->rect.bottomLeft()); - if (isDark) { - startColor = configMixColor(onDefaultBrush.color(), QColor(Qt::white), 0.2); - endColor = configMixColor(onDefaultBrush.color(), QColor(Qt::black), 0.05); -@@ -2823,7 +3117,7 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - break; - } - case AdjustColorRules::HSL:{ -- normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, -+ normalButtonColor(isDark, palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); - - defaultPen = QPen(radioButtonColorCfg.defaultPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -2841,6 +3135,7 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - onClickPen = clickPen; - onClickBrush = clickBrush; - -+ if(option) - m_RadioButtonParameters.childrenRadius = (qstyleoption_cast<const QStyleOptionButton*>(option)->rect.width()) / 2; - break; - } -@@ -2951,15 +3246,40 @@ void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, con - m_RadioButtonParameters.radioButtonChildrenOnDisableBrush = childrenOnDisableBrush; - } - -+void UKUIConfigStyleParameters::getDefaultConfigRadioButtonParameters(ConfigRadioButtonParameters *p, bool isDark) -+{ -+ initConfigRadioButtonParameters(isDark, nullptr, nullptr); -+ p->radioButtonDefaultPen = m_RadioButtonParameters.radioButtonDefaultPen ; -+ p->radioButtonHoverPen = m_RadioButtonParameters.radioButtonHoverPen ; -+ p->radioButtonClickPen = m_RadioButtonParameters.radioButtonClickPen ; -+ p->radioButtonDisablePen = m_RadioButtonParameters.radioButtonDisablePen ; -+ p->radioButtonOnDefaultPen = m_RadioButtonParameters.radioButtonOnDefaultPen ; -+ p->radioButtonOnHoverPen = m_RadioButtonParameters.radioButtonOnHoverPen ; -+ p->radioButtonOnClickPen = m_RadioButtonParameters.radioButtonOnClickPen ; -+ p->radioButtonDefaultBrush = m_RadioButtonParameters.radioButtonDefaultBrush ; -+ p->radioButtonHoverBrush = m_RadioButtonParameters.radioButtonHoverBrush ; -+ p->radioButtonClickBrush = m_RadioButtonParameters.radioButtonClickBrush ; -+ p->radioButtonDisableBrush = m_RadioButtonParameters.radioButtonDisableBrush ; -+ p->radioButtonOnDefaultBrush = m_RadioButtonParameters.radioButtonOnDefaultBrush ; -+ p->radioButtonOnHoverBrush = m_RadioButtonParameters.radioButtonOnHoverBrush ; -+ p->radioButtonOnClickBrush = m_RadioButtonParameters.radioButtonOnClickBrush ; -+ p->radioButtonChildrenOnDefaultBrush = m_RadioButtonParameters.radioButtonChildrenOnDefaultBrush; -+ p->radioButtonChildrenOnHoverBrush = m_RadioButtonParameters.radioButtonChildrenOnHoverBrush ; -+ p->radioButtonChildrenOnClickBrush = m_RadioButtonParameters.radioButtonChildrenOnClickBrush ; -+ p->radioButtonChildrenOnDisableBrush = m_RadioButtonParameters.radioButtonChildrenOnDisableBrush; -+} -+ - void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -+ QPalette palette = option ? option->palette : m_stylePalette; -+ - int grooveRadius = Slider_GrooveLength/2; - - bool needTranslucent = false; - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } -- UKUIColorTheme::SliderBarColorCfg sliderColorCfg = readCfg()->sliderBarColorCfg(option->palette, -+ UKUIColorTheme::SliderBarColorCfg sliderColorCfg = readCfg()->sliderBarColorCfg(palette, - needTranslucent ? C_SliderBar_Translucent : C_SliderBar_Default); - - QBrush handleDefaultBrush = sliderColorCfg.handleDefaultBrush; -@@ -2992,15 +3312,15 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - - const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option); -- const bool horizontal = slider->orientation == Qt::Horizontal; -+ const bool horizontal = slider ? slider->orientation == Qt::Horizontal : false; - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ -- QRect handleRect = option->rect; -+ QRect handleRect = option ? option->rect : QRect(0,0,0,0); - handlePath.addEllipse(handleRect); - -- QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -+ QColor highlight = palette.color(QPalette::Active, QPalette::Highlight); -+ QColor mix = palette.color(QPalette::Active, QPalette::BrightText); - - if (sliderColorCfg.handleHoverType == Obj_Color_Type) { - //handle hover -@@ -3014,12 +3334,12 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; -- if (slider->orientation == Qt::Vertical) { -- linearGradient.setStart(option->rect.topRight()); -- linearGradient.setFinalStop(option->rect.topLeft()); -+ if (!horizontal) { -+ linearGradient.setStart(!option ? QPoint(0,0) : option->rect.topRight()); -+ linearGradient.setFinalStop(!option ? QPoint(0,0) : option->rect.topLeft()); - } else { -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -+ linearGradient.setStart(!option ? QPoint(0,0) : option->rect.topLeft()); -+ linearGradient.setFinalStop(!option ? QPoint(0,0) : option->rect.bottomLeft()); - } - - if (isDark) { -@@ -3054,29 +3374,29 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - } break; - case AdjustColorRules::HSL:{ - if (isDark) { -- handleDefaultPen = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15); -+ handleDefaultPen = adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15); - } else { -- handleDefaultPen = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3); -+ handleDefaultPen = adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3); - } - handleDefaultPen.setWidth(1); - handleHoverPen = handleDefaultPen; - handleHoverPen.setWidth(1); -- handleHoverBrush = highlightHover(isDark, option->palette); -+ handleHoverBrush = highlightHover(isDark, palette); - - //handle click - handleClickPen = handleDefaultPen; - handleHoverPen.setWidth(1); -- handleClickBrush = highlightClick(isDark, option->palette); -+ handleClickBrush = highlightClick(isDark, palette); - - if (isDark) { -- grooveValueDefaultBrush = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15); -+ grooveValueDefaultBrush = adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15); - } else { -- grooveValueDefaultBrush = option->palette.color(QPalette::Active, QPalette::Highlight); -+ grooveValueDefaultBrush = palette.color(QPalette::Active, QPalette::Highlight); - } - //groove value hover - grooveValueHoverBrush = grooveValueDefaultBrush; - -- QRect handleRect = option->rect; -+ QRect handleRect = !option ? QRect(0,0,0,0) : option->rect; - if (horizontal) { - handlePath.moveTo(handleRect.left(), handleRect.top()); - handlePath.lineTo(handleRect.left(), handleRect.top() + (2 * (handleRect.height())/3)); -@@ -3207,8 +3527,33 @@ void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QS - m_SliderParameters.sliderHandlePath = handlePath; - } - -+void UKUIConfigStyleParameters::getDefaultSliderParameters(ConfigSliderParameters *p, bool isDark) -+{ -+ initConfigSliderParameters(isDark, nullptr, nullptr); -+ p->radius = m_SliderParameters.radius ; -+ p->sliderGrooveRadius = m_SliderParameters.sliderGrooveRadius ; -+ p->sliderHandleDefaultBrush = m_SliderParameters.sliderHandleDefaultBrush ; -+ p->sliderHandleHoverBrush = m_SliderParameters.sliderHandleHoverBrush ; -+ p->sliderHandleClickBrush = m_SliderParameters.sliderHandleClickBrush ; -+ p->sliderHandleDisableBrush = m_SliderParameters.sliderHandleDisableBrush ; -+ p->sliderGrooveValueDefaultBrush = m_SliderParameters.sliderGrooveValueDefaultBrush ; -+ p->sliderGrooveValueHoverBrush = m_SliderParameters.sliderGrooveValueHoverBrush ; -+ p->sliderGrooveValueDisableBrush = m_SliderParameters.sliderGrooveValueDisableBrush ; -+ p->sliderGrooveUnvalueDefaultBrush = m_SliderParameters.sliderGrooveUnvalueDefaultBrush; -+ p->sliderGrooveUnvalueHoverBrush = m_SliderParameters.sliderGrooveUnvalueHoverBrush ; -+ p->sliderGrooveUnvalueDisableBrush = m_SliderParameters.sliderGrooveUnvalueDisableBrush; -+ p->sliderHandleDefaultPen = m_SliderParameters.sliderHandleDefaultPen ; -+ p->sliderHandleHoverPen = m_SliderParameters.sliderHandleHoverPen ; -+ p->sliderHandleClickPen = m_SliderParameters.sliderHandleClickPen ; -+ p->sliderHandleDisablePen = m_SliderParameters.sliderHandleDisablePen ; -+ p->sliderGroovePen = m_SliderParameters.sliderGroovePen ; -+ p->focusPen = m_SliderParameters.focusPen ; -+} -+ - void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -+ QPalette palette = option ? option->palette : m_stylePalette; -+ - int normalRadius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - int radius = widget ? (widget->height() / 2 > normalRadius ? normalRadius : widget->height() / 2) : normalRadius; -@@ -3217,7 +3562,7 @@ void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, con - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } -- UKUIColorTheme::ProgressBarColorCfg progressColorCfg = readCfg()->progressBarColorCfg(option->palette, -+ UKUIColorTheme::ProgressBarColorCfg progressColorCfg = readCfg()->progressBarColorCfg(palette, - needTranslucent ? C_ProgressBar_Translucent : C_ProgressBar_Default); - - QBrush contentBrush = progressColorCfg.contentBrush; -@@ -3232,10 +3577,10 @@ void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, con - progressColorCfg.grooveDisablePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option); -- const bool vertical = pb->orientation == Qt::Vertical; -- const bool inverted = pb->invertedAppearance; -+ const bool vertical = pb ? pb->orientation == Qt::Vertical : false; -+ const bool inverted = pb ? pb->invertedAppearance : false; - -- bool reverse = (!vertical && (pb->direction == Qt::RightToLeft)) || vertical; -+ bool reverse = (!vertical && pb && (pb->direction == Qt::RightToLeft)) || vertical; - if (inverted) - reverse = !reverse; - QColor startColor = progressColorCfg.contentStartColor; -@@ -3251,19 +3596,19 @@ void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, con - linearGradient.setColorAt(1, endColor); - if (vertical) { - if (reverse) { -- linearGradient.setStart(pb->rect.bottomLeft()); -- linearGradient.setFinalStop(pb->rect.topLeft()); -+ linearGradient.setStart(!pb ? QPoint(0, 0) : pb->rect.bottomLeft()); -+ linearGradient.setFinalStop(!pb ? QPoint(0, 0) : pb->rect.topLeft()); - } else { -- linearGradient.setStart(pb->rect.topLeft()); -- linearGradient.setFinalStop(pb->rect.bottomLeft()); -+ linearGradient.setStart(!pb ? QPoint(0, 0) : pb->rect.topLeft()); -+ linearGradient.setFinalStop(!pb ? QPoint(0, 0) : pb->rect.bottomLeft()); - } - } else { - if (reverse) { -- linearGradient.setStart(pb->rect.topRight()); -+ linearGradient.setStart(!pb ? QPoint(0, 0) : pb->rect.topRight()); - linearGradient.setFinalStop(pb->rect.topLeft()); - } else { -- linearGradient.setStart(pb->rect.topLeft()); -- linearGradient.setFinalStop(pb->rect.topRight()); -+ linearGradient.setStart(!pb ? QPoint(0, 0) : pb->rect.topLeft()); -+ linearGradient.setFinalStop(!pb ? QPoint(0, 0) : pb->rect.topRight()); - } - } - contentBrush = QBrush(linearGradient); -@@ -3271,7 +3616,7 @@ void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, con - case AdjustColorRules::HSL: - //content - if(isDark) -- contentBrush = QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), -1, 15, -14)); -+ contentBrush = QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), -1, 15, -14)); - - endColor = contentBrush.color(); - startColor = contentBrush.color(); -@@ -3334,14 +3679,30 @@ void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, con - m_ProgressBarParameters.progressBarContentMidLightColor = startColor; - } - -+void UKUIConfigStyleParameters::getDefaultProgressBarParameters(ConfigProgressBarParameters *p, bool isDark) -+{ -+ initConfigProgressBarParameters(isDark, nullptr, nullptr); -+ p->radius = m_ProgressBarParameters.radius ; -+ p->progressBarContentPen = m_ProgressBarParameters.progressBarContentPen ; -+ p->progressBarGrooveDefaultPen = m_ProgressBarParameters.progressBarGrooveDefaultPen ; -+ p->progressBarGrooveDisablePen = m_ProgressBarParameters.progressBarGrooveDisablePen ; -+ p->progressBarContentBrush = m_ProgressBarParameters.progressBarContentBrush ; -+ p->progressBarGrooveDefaultBrush = m_ProgressBarParameters.progressBarGrooveDefaultBrush ; -+ p->progressBarGrooveDisableBrush = m_ProgressBarParameters.progressBarGrooveDisableBrush ; -+ p->progressBarContentHightColor = m_ProgressBarParameters.progressBarContentHightColor ; -+ p->progressBarContentMidLightColor = m_ProgressBarParameters.progressBarContentMidLightColor; -+} -+ - void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -+ QPalette palette = option ? option->palette : m_stylePalette; -+ - int sliderRadius; - bool needTranslucent = false; - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } -- UKUIColorTheme::ScrollBarColorCfg scrollBarColorCfg = readCfg()->scrollBarColorCfg(option->palette, -+ UKUIColorTheme::ScrollBarColorCfg scrollBarColorCfg = readCfg()->scrollBarColorCfg(palette, - needTranslucent ? C_ScrollBar_Translucent : C_ScrollBar_Default); - - QBrush grooveDefaultBrush = scrollBarColorCfg.grooveDefaultBrush; -@@ -3351,14 +3712,14 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - QBrush sliderClickBrush = scrollBarColorCfg.sliderClickBrush; - QBrush sliderDisableBrush = scrollBarColorCfg.sliderDisableBrush; - -- QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); -+ QColor mix = palette.color(QPalette::Active, QPalette::BrightText); - - const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option); - - //radius - int normalRadius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -- if (normalRadius != 0) { -+ if (bar && normalRadius != 0) { - if (bar->orientation == Qt::Horizontal) { - sliderRadius = (bar->rect.height()) / 4; - } else { -@@ -3385,12 +3746,12 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - case AdjustColorRules::DefaultRGB: - if (!needTranslucent) { - if (scrollBarColorCfg.sliderHoverType == Obj_Gradient_Type) { -- if (bar->orientation == Qt::Horizontal) { -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -+ if (bar && bar->orientation == Qt::Horizontal) { -+ linearGradient.setStart(!option ? QPoint(0,0) : option->rect.topLeft()); -+ linearGradient.setFinalStop(!option ? QPoint(0,0) : option->rect.bottomLeft()); - } else { -- linearGradient.setStart(option->rect.topRight()); -- linearGradient.setFinalStop(option->rect.topLeft()); -+ linearGradient.setStart(!option ? QPoint(0,0) : option->rect.topRight()); -+ linearGradient.setFinalStop(!option ? QPoint(0,0) : option->rect.topLeft()); - } - startColor = scrollBarColorCfg.sliderHoverGradientList.value(0); - endColor = scrollBarColorCfg.sliderHoverGradientList.value(1); -@@ -3449,9 +3810,23 @@ void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const - m_ScrollBarParameters.scrollBarSliderDisableBrush = sliderDisableBrush; - } - -+void UKUIConfigStyleParameters::getDefaultScrollBarParameters(ConfigScrollBarParameters *p, bool isDark) -+{ -+ initConfigScrollBarParameters(isDark, nullptr, nullptr); -+ p->radius = m_ScrollBarParameters.radius ; -+ p->scrollBarGrooveDefaultBrush = m_ScrollBarParameters.scrollBarGrooveDefaultBrush ; -+ p->scrollBarGrooveInactiveBrush = m_ScrollBarParameters.scrollBarGrooveInactiveBrush; -+ p->scrollBarSliderDefaultBrush = m_ScrollBarParameters.scrollBarSliderDefaultBrush ; -+ p->scrollBarSliderHoverBrush = m_ScrollBarParameters.scrollBarSliderHoverBrush ; -+ p->scrollBarSliderClickBrush = m_ScrollBarParameters.scrollBarSliderClickBrush ; -+ p->scrollBarSliderDisableBrush = m_ScrollBarParameters.scrollBarSliderDisableBrush ; -+} -+ - void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -- UKUIColorTheme::ToolTipColorCfg tooltipColorCfg = readCfg()->toolTipColorCfg(option->palette, C_ToolTip_Default); -+ QPalette palette = option ? option->palette : m_stylePalette; -+ -+ UKUIColorTheme::ToolTipColorCfg tooltipColorCfg = readCfg()->toolTipColorCfg(palette, C_ToolTip_Default); - - QPen backgroundPen = QPen(tooltipColorCfg.backgroundPen, (tooltipColorCfg.backgroundPen.alpha() == 0 || - tooltipColorCfg.backgroundPen == Qt::NoPen ) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -3509,11 +3884,21 @@ void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const Q - m_ToolTipParameters.toolTipBackgroundPen = backgroundPen; - } - -+void UKUIConfigStyleParameters::getDefaultToolTipParameters(ConfigToolTipParameters *p, bool isDark) -+{ -+ initConfigToolTipParameters(isDark, nullptr, nullptr); -+ p->radius = m_ToolTipParameters.radius ; -+ p->toolTipBackgroundBrush = m_ToolTipParameters.toolTipBackgroundBrush; -+ p->toolTipBackgroundPen = m_ToolTipParameters.toolTipBackgroundPen ; -+} -+ - void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -+ QPalette palette = option ? option->palette : m_stylePalette; -+ - int tabradius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; -- UKUIColorTheme::TabWidgetColorCfg tabWidgetColorCfg = readCfg()->tabWidgetColorCfg(option->palette, C_TabWidget_Default); -+ UKUIColorTheme::TabWidgetColorCfg tabWidgetColorCfg = readCfg()->tabWidgetColorCfg(palette, C_TabWidget_Default); - - QBrush widgetBackgroundBrush = tabWidgetColorCfg.widgetBackgroundBrush; - QBrush tabBarBackgroundBrush = tabWidgetColorCfg.tabBarBackgroundBrush; -@@ -3535,8 +3920,8 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -+ linearGradient.setStart(!option ? QPoint(0,0) : option->rect.topLeft()); -+ linearGradient.setFinalStop(!option ? QPoint(0,0) : option->rect.bottomLeft()); - startColor = tabWidgetColorCfg.tabBarHoverGradientList.value(0); - endColor = tabWidgetColorCfg.tabBarHoverGradientList.value(1); - linearGradient.setColorAt(0, startColor); -@@ -3545,30 +3930,30 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - } - break; - case AdjustColorRules::HSL:{ -- bool selected = option->state & QStyle::State_Selected; -- bool hover = option->state & QStyle::State_MouseOver; -- bool click = option->state & (QStyle::State_On | QStyle::State_Sunken); -+ bool selected = !option ? QStyle::State_None : (option->state & QStyle::State_Selected); -+ bool hover = !option ? QStyle::State_None : (option->state & QStyle::State_MouseOver); -+ bool click = !option ? QStyle::State_None : (option->state & (QStyle::State_On | QStyle::State_Sunken)); - - if (isDark) { -- tabBarHoverBrush = highlightHover(isDark, option->palette); -- tabBarClickBrush = highlightClick(isDark, option->palette); -+ tabBarHoverBrush = highlightHover(isDark, palette); -+ tabBarClickBrush = highlightClick(isDark, palette); - if (click) { -- tabBarClickPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), -+ tabBarClickPen = QPen(QBrush(palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else if(hover && !selected) { -- tabBarHoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), -+ tabBarHoverPen = QPen(QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - } else { -- tabBarHoverBrush = highlightHover(isDark, option->palette); -- tabBarClickBrush = highlightClick(isDark, option->palette); -+ tabBarHoverBrush = highlightHover(isDark, palette); -+ tabBarClickBrush = highlightClick(isDark, palette); - - if(click){ -- tabBarClickPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 1, -21, 3)), -+ tabBarClickPen = QPen(QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 1, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else if(hover && !selected){ -- tabBarHoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), -+ tabBarHoverPen = QPen(QBrush(adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - } -@@ -3644,8 +4029,27 @@ void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const - m_TabWidgetParameters.tabBarFocusPen = tabBarFocusPen; - } - -+void UKUIConfigStyleParameters::getDefaultTabWidgetParameters(ConfigTabWidgetParameters *p, bool isDark) -+{ -+ initConfigTabWidgetParameters(isDark, nullptr, nullptr); -+ -+ p->radius = m_TabWidgetParameters.radius ; -+ p->tabWidgetBackgroundBrush = m_TabWidgetParameters.tabWidgetBackgroundBrush; -+ p->tabBarBackgroundBrush = m_TabWidgetParameters.tabBarBackgroundBrush ; -+ p->tabBarDefaultBrush = m_TabWidgetParameters.tabBarDefaultBrush ; -+ p->tabBarHoverBrush = m_TabWidgetParameters.tabBarHoverBrush ; -+ p->tabBarClickBrush = m_TabWidgetParameters.tabBarClickBrush ; -+ p->tabBarSelectBrush = m_TabWidgetParameters.tabBarSelectBrush ; -+ p->tabBarDefaultPen = m_TabWidgetParameters.tabBarDefaultPen ; -+ p->tabBarHoverPen = m_TabWidgetParameters.tabBarHoverPen ; -+ p->tabBarClickPen = m_TabWidgetParameters.tabBarClickPen ; -+ p->tabBarFocusPen = m_TabWidgetParameters.tabBarFocusPen ; -+} -+ - void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) - { -+ QPalette palette = option ? option->palette : m_stylePalette; -+ - int frameradius = (widget && widget->property("maxRadius").isValid()) ? - widget->property("maxRadius").toInt() : m_radiusStruct.maxRadius; - -@@ -3656,7 +4060,7 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - int itemradius = (widget && widget->property("normalRadius").isValid()) ? - widget->property("normalRadius").toInt() : m_radiusStruct.normalRadius; - // QPixmap framePixmap(option->rect.size()); -- UKUIColorTheme::MenuColorCfg menuColorCfg = readCfg()->menuColorCfg(option->palette, C_Menu_Default); -+ UKUIColorTheme::MenuColorCfg menuColorCfg = readCfg()->menuColorCfg(palette, C_Menu_Default); - - QPen menuBackgroundPen = QPen(menuColorCfg.menuBackgroundPen, (menuColorCfg.menuBackgroundPen.alpha() == 0 || - menuColorCfg.menuBackgroundPen == Qt::NoPen ) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -@@ -3669,9 +4073,9 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - switch (m_adjustColorRules) { - case HSL: - if(isDark) { -- itemSelectBrush = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 3, 23, -11); -+ itemSelectBrush = adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 3, 23, -11); - } else { -- itemSelectBrush = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -17, -6); -+ itemSelectBrush = adjustColor(palette.color(QPalette::Active, QPalette::Highlight), 4, -17, -6); - } - break; - default: -@@ -3747,3 +4151,15 @@ void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QSty - m_MenuParameters.menuItemFocusPen = menuItemFocusPen; - m_MenuParameters.menuTextHoverPen = menuHoverPen; - } -+ -+void UKUIConfigStyleParameters::getDefaultMenuParameters(ConfigMenuParameters *p, bool isDark) -+{ -+ initConfigTabWidgetParameters(isDark, nullptr, nullptr); -+ p->frameRadius = m_MenuParameters.frameRadius ; -+ p->itemRadius = m_MenuParameters.itemRadius ; -+ p->menuBackgroundBrush = m_MenuParameters.menuBackgroundBrush; -+ p->menuBackgroundPen = m_MenuParameters.menuBackgroundPen ; -+ p->menuItemSelectBrush = m_MenuParameters.menuItemSelectBrush; -+ p->menuItemFocusPen = m_MenuParameters.menuItemFocusPen ; -+ p->menuTextHoverPen = m_MenuParameters.menuTextHoverPen ; -+} -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -index 4fa3b67..44e81de 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h -@@ -81,7 +81,7 @@ public: - int getTabBarIndicatorLayout(); - void setTabBarIndicatorLayout(TabBarIndicatorLayout layout); - -- void setUKUIThemeColor(QString themeColor); -+ void setUKUIThemeColor(QPalette p, QString themeColor); - QString themeColor(); - bool isDefaultThemeColor(); - -@@ -92,39 +92,62 @@ public: - - //pushbutton - virtual void initConfigPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void getDefaultConfigPushButtonBevelParameters(ConfigPushButtonParameters *p, bool isDark); -+ - virtual void initConfigPushButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void getDefaultConfigPushButtonLabelParameters(ConfigPushButtonParameters *p, bool isDark); - - //toolbutton - virtual void initConfigToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void getDefaultConfigToolButtonPanelParameters(ConfigToolButtonParameters *p, bool isDark); -+ - virtual void initConfigToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void getDefaultConfigToolButtonLabelParameters(ConfigToolButtonParameters *p, bool isDark); - - virtual void initConfigLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void getDefaultConfigLineEditParameters(ConfigLineEditParameters *p, bool isDark); - - virtual void initConfigSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false); -+ virtual void getDefaultConfigSpinBoxParameters(ConfigSpinBoxParameters *p, bool isDark); - - virtual void initConfigComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void getDefaultConfigComboBoxParameters(ConfigComboBoxParameters *p, bool isDark); - -- virtual void initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool highlightmode = false); -+ virtual void getDefaultConfigListParameters(ConfigListParameters *p, bool isDark); -+ virtual void getHighlightModeConfigListParameters(ConfigListParameters *p, bool isDark); - -- virtual void initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool highlightmode = false); -+ virtual void getDefaultConfigTreeParameters(ConfigTreeParameters *p, bool isDark); -+ virtual void getHighlightModeConfigTreeParameters(ConfigTreeParameters *p, bool isDark); - -- virtual void initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool highlightmode = false); -+ virtual void getDefaultConfigTableParameters(ConfigTableParameters *p, bool isDark); -+ virtual void getHighlightModeConfigTableParameters(ConfigTableParameters *p, bool isDark); - - virtual void initConfigCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void getDefaultConfigCheckBoxParameters(ConfigCheckBoxParameters *p, bool isDark); - - virtual void initConfigRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void getDefaultConfigRadioButtonParameters(ConfigRadioButtonParameters *p, bool isDark); - - virtual void initConfigSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void getDefaultSliderParameters(ConfigSliderParameters *p, bool isDark); - - virtual void initConfigProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void getDefaultProgressBarParameters(ConfigProgressBarParameters *p, bool isDark); - - virtual void initConfigScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void getDefaultScrollBarParameters(ConfigScrollBarParameters *p, bool isDark); - - virtual void initConfigToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void getDefaultToolTipParameters(ConfigToolTipParameters *p, bool isDark); - - virtual void initConfigTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void getDefaultTabWidgetParameters(ConfigTabWidgetParameters *p, bool isDark); - - virtual void initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget); -+ virtual void getDefaultMenuParameters(ConfigMenuParameters *p, bool isDark); - - virtual QColor lanhuHSLToQtHsl(int h, int s, int l, int a = 255); - virtual QColor adjustColor(const QColor c, int hRange = 0, int sRange = 0, int lRange = 0, int aRange = 0); -@@ -326,6 +349,8 @@ private: - ReadThemeConfig *m_readCfg = nullptr; - QString m_themeColor = "default"; - UKUIRadiusInformation::UKUIRadiusStruct m_radiusStruct; -+ QPalette m_stylePalette; -+ - }; - - } -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 110e65c..ed2f4b8 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -1,4 +1,4 @@ --/* -+/* - * Qt5-UKUI's Library - * - * Copyright (C) 2023, KylinSoft Co., Ltd. -@@ -27,6 +27,7 @@ - #include "settings/ukui-style-settings.h" - #include "animations/tabwidget/ukui-tabwidget-default-slide-animator.h" - -+#include <QSharedPointer> - #include <QStyleOption> - #include <QWidget> - #include <QPainter> -@@ -94,6 +95,7 @@ - #include <QCheckBox> - #include <KWindowEffects> - #include <KWindowSystem> -+#include <QtConcurrent/QtConcurrent> - - #include <private/qlineedit_p.h> - -@@ -777,7 +779,7 @@ QPalette UKUIConfigStyle::standardPalette() const - } - - setThemeColor(color, palette); -- sp->setUKUIThemeColor(themeColor); -+ sp->setUKUIThemeColor(palette, themeColor); - } - - return palette; -@@ -1287,6 +1289,14 @@ void UKUIConfigStyle::unpolish(QWidget *widget) - Style::unpolish(widget); - } - -+void UKUIConfigStyle::polish(QApplication *app) -+{ -+// QtConcurrent::run(this, &UKUIConfigStyle::getDefaultControlParameters, app); -+ getDefaultControlParameters(app); -+ -+ Style::polish(app); -+} -+ - QIcon UKUIConfigStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const - { - if (QApplication::desktopSettingsAware() && !QIcon::themeName().isEmpty()) { -@@ -5934,8 +5944,8 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - QColor penColor = sp->m_ProgressBarParameters.progressBarContentPen.color(); - int width = (penColor.alpha() == 0 || penColor == Qt::NoPen) ? 0 : sp->m_ProgressBarParameters.progressBarContentPen.width(); - painter->setPen(width > 0 ? sp->m_ProgressBarParameters.progressBarContentPen : Qt::NoPen); --// if(width == 1 && sp->m_ProgressBarParameters.radius != 0) --// painter->translate(0.5, 0.5); -+ // if(width == 1 && sp->m_ProgressBarParameters.radius != 0) -+ // painter->translate(0.5, 0.5); - painter->setBrush(brush); - - width = (sp->m_ProgressBarParameters.progressBarGrooveDefaultPen.color().alpha() == 0 || sp->m_ProgressBarParameters.progressBarGrooveDefaultPen.color() == Qt::NoPen) ? -@@ -7866,3 +7876,337 @@ void UKUIConfigStyle::realSetMenuTypeToMenu(const QWidget *widget) const - QRect UKUIConfigStyle::centerRect(const QRect &rect, int width, int height) const - { return QRect(rect.left() + (rect.width() - width)/2, rect.top() + (rect.height() - height)/2, width, height); } - -+void UKUIConfigStyle::getDefaultControlParameters(QApplication *app) -+{ -+ //pushbutton -+ QSharedPointer<ConfigPushButtonParameters> pb(new ConfigPushButtonParameters); -+ sp->getDefaultConfigPushButtonBevelParameters(pb.data(), isUseDarkPalette()); -+ app->setProperty("PushButton_DefaultParameters_Radius" , pb.data()->radius); -+ app->setProperty("PushButton_DefaultParameters_DefaultBrush" , pb.data()->pushButtonDefaultBrush ); -+ app->setProperty("PushButton_DefaultParameters_ClickBrush" , pb.data()->pushButtonClickBrush ); -+ app->setProperty("PushButton_DefaultParameters_HoverBrush" , pb.data()->pushButtonHoverBrush ); -+ app->setProperty("PushButton_DefaultParameters_DisableBrush" , pb.data()->pushButtonDisableBrush ); -+ app->setProperty("PushButton_DefaultParameters_CheckBrush" , pb.data()->pushButtonCheckBrush ); -+ app->setProperty("PushButton_DefaultParameters_CheckHoverBrush" , pb.data()->pushButtonCheckHoverBrush ); -+ app->setProperty("PushButton_DefaultParameters_CheckClickBrush" , pb.data()->pushButtonCheckClickBrush ); -+ app->setProperty("PushButton_DefaultParameters_CheckDisableBrush", pb.data()->pushButtonCheckDisableBrush); -+ app->setProperty("PushButton_DefaultParameters_DefaultPen" , pb.data()->pushButtonDefaultPen ); -+ app->setProperty("PushButton_DefaultParameters_ClickPen" , pb.data()->pushButtonClickPen ); -+ app->setProperty("PushButton_DefaultParameters_HoverPen" , pb.data()->pushButtonHoverPen ); -+ app->setProperty("PushButton_DefaultParameters_DisablePen" , pb.data()->pushButtonDisablePen ); -+ app->setProperty("PushButton_DefaultParameters_CheckPen" , pb.data()->pushButtonCheckPen ); -+ app->setProperty("PushButton_DefaultParameters_CheckHoverPen" , pb.data()->pushButtonCheckHoverPen ); -+ app->setProperty("PushButton_DefaultParameters_CheckClickPen" , pb.data()->pushButtonCheckClickPen ); -+ app->setProperty("PushButton_DefaultParameters_CheckDisablePen" , pb.data()->pushButtonCheckDisablePen ); -+ app->setProperty("PushButton_DefaultParameters_FocusPen" , pb.data()->pushButtonFocusPen ); -+ -+ sp->getDefaultConfigPushButtonLabelParameters(pb.data(), isUseDarkPalette()); -+ -+ app->setProperty("PushButton_DefaultParameters_TextDefaultColor" , pb.data()->textDefaultColor ); -+ app->setProperty("PushButton_DefaultParameters_TextHoverColor" , pb.data()->textHoverColor ); -+ -+ //ToolButton -+ QSharedPointer<ConfigToolButtonParameters> tb(new ConfigToolButtonParameters); -+ sp->getDefaultConfigToolButtonPanelParameters(tb.data(), isUseDarkPalette()); -+ app->setProperty("ToolButton_DefaultParameters_Radius" , tb.data()->radius); -+ app->setProperty("ToolButton_DefaultParameters_DefaultBrush" , tb.data()->toolButtonDefaultBrush ); -+ app->setProperty("ToolButton_DefaultParameters_ClickBrush" , tb.data()->toolButtonClickBrush ); -+ app->setProperty("ToolButton_DefaultParameters_HoverBrush" , tb.data()->toolButtonHoverBrush ); -+ app->setProperty("ToolButton_DefaultParameters_DisableBrush" , tb.data()->toolButtonDisableBrush ); -+ app->setProperty("ToolButton_DefaultParameters_CheckBrush" , tb.data()->toolButtonCheckBrush ); -+ app->setProperty("ToolButton_DefaultParameters_CheckHoverBrush" , tb.data()->toolButtonCheckHoverBrush ); -+ app->setProperty("ToolButton_DefaultParameters_CheckClickBrush" , tb.data()->toolButtonCheckClickBrush ); -+ app->setProperty("ToolButton_DefaultParameters_CheckDisableBrush", tb.data()->toolButtonCheckDisableBrush); -+ app->setProperty("ToolButton_DefaultParameters_DefaultPen" , tb.data()->toolButtonDefaultPen ); -+ app->setProperty("ToolButton_DefaultParameters_ClickPen" , tb.data()->toolButtonClickPen ); -+ app->setProperty("ToolButton_DefaultParameters_HoverPen" , tb.data()->toolButtonHoverPen ); -+ app->setProperty("ToolButton_DefaultParameters_DisablePen" , tb.data()->toolButtonDisablePen ); -+ app->setProperty("ToolButton_DefaultParameters_CheckPen" , tb.data()->toolButtonCheckPen ); -+ app->setProperty("ToolButton_DefaultParameters_CheckHoverPen" , tb.data()->toolButtonCheckHoverPen ); -+ app->setProperty("ToolButton_DefaultParameters_CheckClickPen" , tb.data()->toolButtonCheckClickPen ); -+ app->setProperty("ToolButton_DefaultParameters_CheckDisablePen" , tb.data()->toolButtonCheckDisablePen ); -+ app->setProperty("ToolButton_DefaultParameters_FocusPen" , tb.data()->toolButtonFocusPen ); -+ -+ sp->getDefaultConfigToolButtonLabelParameters(tb.data(), isUseDarkPalette()); -+ app->setProperty("ToolButton_DefaultParameters_TextDefaultColor" , tb.data()->textDefaultColor ); -+ app->setProperty("ToolButton_DefaultParameters_TextHoverColor" , tb.data()->textHoverColor ); -+ -+ //lineedit -+ QSharedPointer<ConfigLineEditParameters> lineedit(new ConfigLineEditParameters); -+ sp->getDefaultConfigLineEditParameters(lineedit.data(), isUseDarkPalette()); -+ app->setProperty("Lineedit_DefaultParameters_Radius", lineedit.data()->radius ); -+ app->setProperty("Lineedit_DefaultParameters_DefaultBrush", lineedit.data()->lineEditDefaultBrush); -+ app->setProperty("Lineedit_DefaultParameters_HoverBrush", lineedit.data()->lineEditHoverBrush ); -+ app->setProperty("Lineedit_DefaultParameters_FocusBrush", lineedit.data()->lineEditFocusBrush ); -+ app->setProperty("Lineedit_DefaultParameters_DisableBrush", lineedit.data()->lineEditDisableBrush); -+ app->setProperty("Lineedit_DefaultParameters_DefaultPen", lineedit.data()->lineEditDefaultPen ); -+ app->setProperty("Lineedit_DefaultParameters_HoverPen", lineedit.data()->lineEditHoverPen ); -+ app->setProperty("Lineedit_DefaultParameters_FocusPen", lineedit.data()->lineEditFocusPen ); -+ app->setProperty("Lineedit_DefaultParameters_DisablePen", lineedit.data()->lineEditDisablePen ); -+ -+ //spinbox -+ QSharedPointer<ConfigSpinBoxParameters> spinbox(new ConfigSpinBoxParameters); -+ sp->getDefaultConfigSpinBoxParameters(spinbox.data(), isUseDarkPalette()); -+ app->setProperty("SpinBox_DefaultParameters_Radius" ,spinbox.data()->radius ); -+ app->setProperty("SpinBox_DefaultParameters_DefaultBrush" ,spinbox.data()->spinBoxDefaultBrush ); -+ app->setProperty("SpinBox_DefaultParameters_HoverBrush" ,spinbox.data()->spinBoxHoverBrush ); -+ app->setProperty("SpinBox_DefaultParameters_FocusBrush" ,spinbox.data()->spinBoxFocusBrush ); -+ app->setProperty("SpinBox_DefaultParameters_DisableBrush" ,spinbox.data()->spinBoxDisableBrush ); -+ app->setProperty("SpinBox_DefaultParameters_DefaultPen" ,spinbox.data()->spinBoxDefaultPen ); -+ app->setProperty("SpinBox_DefaultParameters_HoverPen" ,spinbox.data()->spinBoxHoverPen ); -+ app->setProperty("SpinBox_DefaultParameters_FocusPen" ,spinbox.data()->spinBoxFocusPen ); -+ app->setProperty("SpinBox_DefaultParameters_DisablePen" ,spinbox.data()->spinBoxDisablePen ); -+ app->setProperty("SpinBox_DefaultParameters_UpDefaultBrush" ,spinbox.data()->spinBoxUpDefaultBrush ); -+ app->setProperty("SpinBox_DefaultParameters_UpHoverBrush" ,spinbox.data()->spinBoxUpHoverBrush ); -+ app->setProperty("SpinBox_DefaultParameters_UpFocusHoverBrush" ,spinbox.data()->spinBoxUpFocusHoverBrush ); -+ app->setProperty("SpinBox_DefaultParameters_UpClickBrush" ,spinbox.data()->spinBoxUpClickBrush ); -+ app->setProperty("SpinBox_DefaultParameters_DownHoverBrush" ,spinbox.data()->spinBoxDownHoverBrush ); -+ app->setProperty("SpinBox_DefaultParameters_DownFocusHoverBrush" ,spinbox.data()->spinBoxDownFocusHoverBrush); -+ app->setProperty("SpinBox_DefaultParameters_DownClickBrush" ,spinbox.data()->spinBoxDownClickBrush ); -+ app->setProperty("SpinBox_DefaultParameters_DownDefaultBrush" ,spinbox.data()->spinBoxDownDefaultBrush ); -+ app->setProperty("SpinBox_DefaultParameters_UpDefaultPen" ,spinbox.data()->spinBoxUpDefaultPen ); -+ app->setProperty("SpinBox_DefaultParameters_UpHoverPen" ,spinbox.data()->spinBoxUpHoverPen ); -+ app->setProperty("SpinBox_DefaultParameters_UpFocusHoverPen" ,spinbox.data()->spinBoxUpFocusHoverPen ); -+ app->setProperty("SpinBox_DefaultParameters_UpClickPen" ,spinbox.data()->spinBoxUpClickPen ); -+ app->setProperty("SpinBox_DefaultParameters_UpDisablePen" ,spinbox.data()->spinBoxUpDisablePen ); -+ app->setProperty("SpinBox_DefaultParameters_DownDefaultPen" ,spinbox.data()->spinBoxDownDefaultPen ); -+ app->setProperty("SpinBox_DefaultParameters_DownHoverPen" ,spinbox.data()->spinBoxDownHoverPen ); -+ app->setProperty("SpinBox_DefaultParameters_DownFocusHoverPen" ,spinbox.data()->spinBoxDownFocusHoverPen ); -+ app->setProperty("SpinBox_DefaultParameters_DownClickPen " ,spinbox.data()->spinBoxDownClickPen ); -+ app->setProperty("SpinBox_DefaultParameters_DownDisablePen" ,spinbox.data()->spinBoxDownDisablePen ); -+ app->setProperty("SpinBox_DefaultParameters_UpIconHightPixMap" ,spinbox.data()->spinBoxUpIconHightPixMap ); -+ app->setProperty("SpinBox_DefaultParameters_DownIconHightPixMap" ,spinbox.data()->spinBoxDownIconHightPixMap); -+ -+ //combobox -+ QSharedPointer<ConfigComboBoxParameters> comboBox(new ConfigComboBoxParameters); -+ sp->getDefaultConfigComboBoxParameters(comboBox.data(), isUseDarkPalette()); -+ app->setProperty("ComboBox_DefaultParameters_Radius" , comboBox.data()->radius ); -+ app->setProperty("ComboBox_DefaultParameters_DefaultBrush", comboBox.data()->comboBoxDefaultBrush); -+ app->setProperty("ComboBox_DefaultParameters_HoverBrush" , comboBox.data()->comboBoxHoverBrush ); -+ app->setProperty("ComboBox_DefaultParameters_OnBrush" , comboBox.data()->comboBoxOnBrush ); -+ app->setProperty("ComboBox_DefaultParameters_EditBrush" , comboBox.data()->comboBoxEditBrush ); -+ app->setProperty("ComboBox_DefaultParameters_DisableBrush", comboBox.data()->comboBoxDisableBrush); -+ app->setProperty("ComboBox_DefaultParameters_DefaultPen" , comboBox.data()->comboBoxDefaultPen ); -+ app->setProperty("ComboBox_DefaultParameters_HoverPen" , comboBox.data()->comboBoxHoverPen ); -+ app->setProperty("ComboBox_DefaultParameters_OnPen" , comboBox.data()->comboBoxOnPen ); -+ app->setProperty("ComboBox_DefaultParameters_EditPen" , comboBox.data()->comboBoxEditPen ); -+ app->setProperty("ComboBox_DefaultParameters_DisablePen" , comboBox.data()->comboBoxDisablePen ); -+ app->setProperty("ComboBox_DefaultParameters_FocusPen" , comboBox.data()->comboBoxFocusPen ); -+ -+ //list -+ QSharedPointer<ConfigListParameters> list(new ConfigListParameters); -+ sp->getDefaultConfigListParameters(list.data(), isUseDarkPalette()); -+ app->setProperty("List_DefaultParameters_Radius" , list.data()->radius ); -+ app->setProperty("List_DefaultParameters_DefaultBrush" , list.data()->listDefaultBrush ); -+ app->setProperty("List_DefaultParameters_HoverBrush" , list.data()->listHoverBrush ); -+ app->setProperty("List_DefaultParameters_SelectBrush" , list.data()->listSelectBrush ); -+ app->setProperty("List_DefaultParameters_DisableBrush" , list.data()->listDisableBrush ); -+ app->setProperty("List_DefaultParameters_TextHoverPen" , list.data()->listTextHoverPen ); -+ app->setProperty("List_DefaultParameters_TextSelectPen" , list.data()->listTextSelectPen ); -+ app->setProperty("List_DefaultParameters_TextDisablePen" , list.data()->listTextDisablePen); -+ app->setProperty("List_DefaultParameters_HoverPen" , list.data()->listHoverPen ); -+ app->setProperty("List_DefaultParameters_SelectPen" , list.data()->listSelectPen ); -+ app->setProperty("List_DefaultParameters_FocusPen" , list.data()->listFocusPen ); -+ -+ sp->getHighlightModeConfigListParameters(list.data(), isUseDarkPalette()); -+ app->setProperty("List_HighlightMode_Radius" , list.data()->radius ); -+ app->setProperty("List_HighlightMode_DefaultBrush" , list.data()->listDefaultBrush ); -+ app->setProperty("List_HighlightMode_HoverBrush" , list.data()->listHoverBrush ); -+ app->setProperty("List_HighlightMode_SelectBrush" , list.data()->listSelectBrush ); -+ app->setProperty("List_HighlightMode_DisableBrush" , list.data()->listDisableBrush ); -+ app->setProperty("List_HighlightMode_TextHoverPen" , list.data()->listTextHoverPen ); -+ app->setProperty("List_HighlightMode_TextSelectPen" , list.data()->listTextSelectPen ); -+ app->setProperty("List_HighlightMode_TextDisablePen", list.data()->listTextDisablePen); -+ app->setProperty("List_HighlightMode_HoverPen" , list.data()->listHoverPen ); -+ app->setProperty("List_HighlightMode_SelectPen" , list.data()->listSelectPen ); -+ app->setProperty("List_HighlightMode_FocusPen" , list.data()->listFocusPen ); -+ -+ //tree -+ QSharedPointer<ConfigTreeParameters> tree(new ConfigTreeParameters); -+ sp->getDefaultConfigTreeParameters(tree.data(), isUseDarkPalette()); -+ app->setProperty("Tree_DefaultParameters_Radius" , tree.data()->radius ); -+ app->setProperty("Tree_DefaultParameters_DefaultBrush" , tree.data()->treeDefaultBrush ); -+ app->setProperty("Tree_DefaultParameters_HoverBrush" , tree.data()->treeHoverBrush ); -+ app->setProperty("Tree_DefaultParameters_SelectBrush" , tree.data()->treeSelectBrush ); -+ app->setProperty("Tree_DefaultParameters_DisableBrush" , tree.data()->treeDisableBrush ); -+ app->setProperty("Tree_DefaultParameters_BranchDefaultBrush", tree.data()->treeBranchDefaultBrush); -+ app->setProperty("Tree_DefaultParameters_BranchHoverBrush" , tree.data()->treeBranchHoverBrush ); -+ app->setProperty("Tree_DefaultParameters_BranchSelectBrush" , tree.data()->treeBranchSelectBrush ); -+ app->setProperty("Tree_DefaultParameters_BranchDisableBrush", tree.data()->treeBranchDisableBrush); -+ app->setProperty("Tree_DefaultParameters_HoverPen" , tree.data()->treeHoverPen ); -+ app->setProperty("Tree_DefaultParameters_SelectPen" , tree.data()->treeSelectPen ); -+ app->setProperty("Tree_DefaultParameters_FocusPen" , tree.data()->treeFocusPen ); -+ app->setProperty("Tree_DefaultParameters_TextHoverPen" , tree.data()->treeTextHoverPen ); -+ app->setProperty("Tree_DefaultParameters_TextSelectPen" , tree.data()->treeTextSelectPen ); -+ app->setProperty("Tree_DefaultParameters_TextDisablePen" , tree.data()->treeTextDisablePen ); -+ -+ sp->getHighlightModeConfigTreeParameters(tree.data(), isUseDarkPalette()); -+ app->setProperty("Tree_HighlightMode_Radius" , tree.data()->radius ); -+ app->setProperty("Tree_HighlightMode_DefaultBrush" , tree.data()->treeDefaultBrush ); -+ app->setProperty("Tree_HighlightMode_HoverBrush" , tree.data()->treeHoverBrush ); -+ app->setProperty("Tree_HighlightMode_SelectBrush" , tree.data()->treeSelectBrush ); -+ app->setProperty("Tree_HighlightMode_DisableBrush" , tree.data()->treeDisableBrush ); -+ app->setProperty("Tree_HighlightMode_BranchDefaultBrush", tree.data()->treeBranchDefaultBrush); -+ app->setProperty("Tree_HighlightMode_BranchHoverBrush" , tree.data()->treeBranchHoverBrush ); -+ app->setProperty("Tree_HighlightMode_BranchSelectBrush" , tree.data()->treeBranchSelectBrush ); -+ app->setProperty("Tree_HighlightMode_BranchDisableBrush", tree.data()->treeBranchDisableBrush); -+ app->setProperty("Tree_HighlightMode_HoverPen" , tree.data()->treeHoverPen ); -+ app->setProperty("Tree_HighlightMode_SelectPen" , tree.data()->treeSelectPen ); -+ app->setProperty("Tree_HighlightMode_FocusPen" , tree.data()->treeFocusPen ); -+ app->setProperty("Tree_HighlightMode_TextHoverPen" , tree.data()->treeTextHoverPen ); -+ app->setProperty("Tree_HighlightMode_TextSelectPen" , tree.data()->treeTextSelectPen ); -+ app->setProperty("Tree_HighlightMode_TextDisablePen" , tree.data()->treeTextDisablePen ); -+ -+ //table -+ QSharedPointer<ConfigTableParameters> table(new ConfigTableParameters); -+ sp->getDefaultConfigTableParameters(table.data(), isUseDarkPalette()); -+ app->setProperty("Table_DefaultParameters_Radius" , table.data()->radius ); -+ app->setProperty("Table_DefaultParameters_DefaultBrush" , table.data()->tableDefaultBrush ); -+ app->setProperty("Table_DefaultParameters_HoverBrush" , table.data()->tableHoverBrush ); -+ app->setProperty("Table_DefaultParameters_SelectBrush" , table.data()->tableSelectBrush ); -+ app->setProperty("Table_DefaultParameters_DisableBrush" , table.data()->tableDisableBrush ); -+ app->setProperty("Table_DefaultParameters_HoverPen" , table.data()->tableHoverPen ); -+ app->setProperty("Table_DefaultParameters_SelectPen" , table.data()->tableSelectPen ); -+ app->setProperty("Table_DefaultParameters_FocusPen" , table.data()->tableFocusPen ); -+ app->setProperty("Table_DefaultParameters_TextHoverPen" , table.data()->tableTextHoverPen ); -+ app->setProperty("Table_DefaultParameters_TextSelectPen" , table.data()->tableTextSelectPen ); -+ app->setProperty("Table_DefaultParameters_TextDisablePen", table.data()->tableTextDisablePen); -+ -+ sp->getHighlightModeConfigTableParameters(table.data(), isUseDarkPalette()); -+ app->setProperty("Table_HighlightMode_Radius" , table.data()->radius ); -+ app->setProperty("Table_HighlightMode_DefaultBrush" , table.data()->tableDefaultBrush ); -+ app->setProperty("Table_HighlightMode_HoverBrush" , table.data()->tableHoverBrush ); -+ app->setProperty("Table_HighlightMode_SelectBrush" , table.data()->tableSelectBrush ); -+ app->setProperty("Table_HighlightMode_DisableBrush" , table.data()->tableDisableBrush ); -+ app->setProperty("Table_HighlightMode_HoverPen" , table.data()->tableHoverPen ); -+ app->setProperty("Table_HighlightMode_SelectPen" , table.data()->tableSelectPen ); -+ app->setProperty("Table_HighlightMode_FocusPen" , table.data()->tableFocusPen ); -+ app->setProperty("Table_HighlightMode_TextHoverPen" , table.data()->tableTextHoverPen ); -+ app->setProperty("Table_HighlightMode_TextSelectPen" , table.data()->tableTextSelectPen ); -+ app->setProperty("Table_HighlightMode_TextDisablePen", table.data()->tableTextDisablePen); -+ -+ -+ //checkbox -+ QSharedPointer<ConfigCheckBoxParameters> checkBox(new ConfigCheckBoxParameters); -+ sp->getDefaultConfigCheckBoxParameters(checkBox.data(), isUseDarkPalette()); -+ app->setProperty("CheckBox_DefaultParameters_Radius" , checkBox.data()->radius ); -+ app->setProperty("CheckBox_DefaultParameters_DefaultPen" , checkBox.data()->checkBoxDefaultPen ); -+ app->setProperty("CheckBox_DefaultParameters_HoverPen" , checkBox.data()->checkBoxHoverPen ); -+ app->setProperty("CheckBox_DefaultParameters_ClickPen" , checkBox.data()->checkBoxClickPen ); -+ app->setProperty("CheckBox_DefaultParameters_DisablePen" , checkBox.data()->checkBoxDisablePen ); -+ app->setProperty("CheckBox_DefaultParameters_OnDefaultPen" , checkBox.data()->checkBoxOnDefaultPen ); -+ app->setProperty("CheckBox_DefaultParameters_OnHoverPen" , checkBox.data()->checkBoxOnHoverPen ); -+ app->setProperty("CheckBox_DefaultParameters_OnClickPen" , checkBox.data()->checkBoxOnClickPen ); -+ app->setProperty("CheckBox_DefaultParameters_ContentPen" , checkBox.data()->checkBoxContentPen ); -+ app->setProperty("CheckBox_DefaultParameters_DefaultBrush" , checkBox.data()->checkBoxDefaultBrush ); -+ app->setProperty("CheckBox_DefaultParameters_HoverBrush" , checkBox.data()->checkBoxHoverBrush ); -+ app->setProperty("CheckBox_DefaultParameters_ClickBrush" , checkBox.data()->checkBoxClickBrush ); -+ app->setProperty("CheckBox_DefaultParameters_DisableBrush" , checkBox.data()->checkBoxDisableBrush ); -+ app->setProperty("CheckBox_DefaultParameters_OnDefaultBrush" , checkBox.data()->checkBoxOnDefaultBrush ); -+ app->setProperty("CheckBox_DefaultParameters_OnHoverBrush" , checkBox.data()->checkBoxOnHoverBrush ); -+ app->setProperty("CheckBox_DefaultParameters_OnClickBrush" , checkBox.data()->checkBoxOnClickBrush ); -+ app->setProperty("CheckBox_DefaultParameters_PathBrush" , checkBox.data()->checkBoxPathBrush ); -+ app->setProperty("CheckBox_DefaultParameters_PathDisableBrush", checkBox.data()->checkBoxPathDisableBrush); -+ -+ //radiobutton -+ QSharedPointer<ConfigRadioButtonParameters> radiobutton(new ConfigRadioButtonParameters); -+ sp->getDefaultConfigRadioButtonParameters(radiobutton.data(), isUseDarkPalette()); -+ app->setProperty("RadioButton_DefaultParameters_Radius" , radiobutton.data()->radius ); -+ app->setProperty("RadioButton_DefaultParameters_DefaultPen" , radiobutton.data()->radioButtonDefaultPen ); -+ app->setProperty("RadioButton_DefaultParameters_HoverPen" , radiobutton.data()->radioButtonHoverPen ); -+ app->setProperty("RadioButton_DefaultParameters_ClickPen" , radiobutton.data()->radioButtonClickPen ); -+ app->setProperty("RadioButton_DefaultParameters_DisablePen" , radiobutton.data()->radioButtonDisablePen ); -+ app->setProperty("RadioButton_DefaultParameters_OnDefaultPen" , radiobutton.data()->radioButtonOnDefaultPen ); -+ app->setProperty("RadioButton_DefaultParameters_OnHoverPen" , radiobutton.data()->radioButtonOnHoverPen ); -+ app->setProperty("RadioButton_DefaultParameters_OnClickPen" , radiobutton.data()->radioButtonOnClickPen ); -+ app->setProperty("RadioButton_DefaultParameters_DefaultBrush" , radiobutton.data()->radioButtonDefaultBrush ); -+ app->setProperty("RadioButton_DefaultParameters_HoverBrush" , radiobutton.data()->radioButtonHoverBrush ); -+ app->setProperty("RadioButton_DefaultParameters_ClickBrush" , radiobutton.data()->radioButtonClickBrush ); -+ app->setProperty("RadioButton_DefaultParameters_DisableBrush" , radiobutton.data()->radioButtonDisableBrush ); -+ app->setProperty("RadioButton_DefaultParameters_OnDefaultBrush" , radiobutton.data()->radioButtonOnDefaultBrush ); -+ app->setProperty("RadioButton_DefaultParameters_OnHoverBrush" , radiobutton.data()->radioButtonOnHoverBrush ); -+ app->setProperty("RadioButton_DefaultParameters_OnClickBrush" , radiobutton.data()->radioButtonOnClickBrush ); -+ app->setProperty("RadioButton_DefaultParameters_ChildrenOnDefaultBrush", radiobutton.data()->radioButtonChildrenOnDefaultBrush); -+ app->setProperty("RadioButton_DefaultParameters_ChildrenOnHoverBrush" , radiobutton.data()->radioButtonChildrenOnHoverBrush ); -+ app->setProperty("RadioButton_DefaultParameters_ChildrenOnClickBrush ", radiobutton.data()->radioButtonChildrenOnClickBrush ); -+ app->setProperty("RadioButton_DefaultParameters_ChildrenOnDisableBrush", radiobutton.data()->radioButtonChildrenOnDisableBrush); -+ -+ //slider -+ QSharedPointer<ConfigSliderParameters> slider(new ConfigSliderParameters); -+ sp->getDefaultSliderParameters(slider.data(), isUseDarkPalette()); -+ app->setProperty("Slider_DefaultParameters_Radius" , slider.data()->radius ); -+ app->setProperty("Slider_DefaultParameters_GrooveRadius" , slider.data()->sliderGrooveRadius ); -+ app->setProperty("Slider_DefaultParameters_HandleDefaultBrush" , slider.data()->sliderHandleDefaultBrush ); -+ app->setProperty("Slider_DefaultParameters_HandleHoverBrush" , slider.data()->sliderHandleHoverBrush ); -+ app->setProperty("Slider_DefaultParameters_HandleClickBrush" , slider.data()->sliderHandleClickBrush ); -+ app->setProperty("Slider_DefaultParameters_HandleDisableBrush" , slider.data()->sliderHandleDisableBrush ); -+ app->setProperty("Slider_DefaultParameters_GrooveValueDefaultBrush" , slider.data()->sliderGrooveValueDefaultBrush ); -+ app->setProperty("Slider_DefaultParameters_GrooveValueHoverBrush" , slider.data()->sliderGrooveValueHoverBrush ); -+ app->setProperty("Slider_DefaultParameters_GrooveValueDisableBrush" , slider.data()->sliderGrooveValueDisableBrush ); -+ app->setProperty("Slider_DefaultParameters_GrooveUnvalueDefaultBrush", slider.data()->sliderGrooveUnvalueDefaultBrush); -+ app->setProperty("Slider_DefaultParameters_GrooveUnvalueHoverBrush" , slider.data()->sliderGrooveUnvalueHoverBrush ); -+ app->setProperty("Slider_DefaultParameters_GrooveUnvalueDisableBrush", slider.data()->sliderGrooveUnvalueDisableBrush); -+ app->setProperty("Slider_DefaultParameters_HandleDefaultPen" , slider.data()->sliderHandleDefaultPen ); -+ app->setProperty("Slider_DefaultParameters_HandleHoverPen" , slider.data()->sliderHandleHoverPen ); -+ app->setProperty("Slider_DefaultParameters_HandleClickPen" , slider.data()->sliderHandleClickPen ); -+ app->setProperty("Slider_DefaultParameters_HandleDisablePen" , slider.data()->sliderHandleDisablePen ); -+ app->setProperty("Slider_DefaultParameters_GroovePen" , slider.data()->sliderGroovePen ); -+ app->setProperty("Slider_DefaultParameters_focusPen" , slider.data()->focusPen ); -+ -+ //progressabr -+ QSharedPointer<ConfigProgressBarParameters> progressbar(new ConfigProgressBarParameters); -+ sp->getDefaultProgressBarParameters(progressbar.data(), isUseDarkPalette()); -+ app->setProperty("ProgressBar_DefaultParameters_Radius" , progressbar.data()->radius ); -+ app->setProperty("ProgressBar_DefaultParameters_ContentPen" , progressbar.data()->progressBarContentPen ); -+ app->setProperty("ProgressBar_DefaultParameters_GrooveDefaultPen" , progressbar.data()->progressBarGrooveDefaultPen ); -+ app->setProperty("ProgressBar_DefaultParameters_GrooveDisablePen" , progressbar.data()->progressBarGrooveDisablePen ); -+ app->setProperty("ProgressBar_DefaultParameters_ContentBrush" , progressbar.data()->progressBarContentBrush ); -+ app->setProperty("ProgressBar_DefaultParameters_GrooveDefaultBrush" , progressbar.data()->progressBarGrooveDefaultBrush ); -+ app->setProperty("ProgressBar_DefaultParameters_GrooveDisableBrush" , progressbar.data()->progressBarGrooveDisableBrush ); -+ app->setProperty("ProgressBar_DefaultParameters_ContentHightColor" , progressbar.data()->progressBarContentHightColor ); -+ app->setProperty("ProgressBar_DefaultParameters_ContentMidLightColor", progressbar.data()->progressBarContentMidLightColor); -+ -+ //scrollbar -+ QSharedPointer<ConfigScrollBarParameters> scrollbar(new ConfigScrollBarParameters); -+ sp->getDefaultScrollBarParameters(scrollbar.data(), isUseDarkPalette()); -+ app->setProperty("ScrollBar_DefaultParameters_Radius" , scrollbar.data()->radius ); -+ app->setProperty("ScrollBar_DefaultParameters_GrooveDefaultBrush" , scrollbar.data()->scrollBarGrooveDefaultBrush ); -+ app->setProperty("ScrollBar_DefaultParameters_GrooveInactiveBrush", scrollbar.data()->scrollBarGrooveInactiveBrush); -+ app->setProperty("ScrollBar_DefaultParameters_SliderDefaultBrush" , scrollbar.data()->scrollBarSliderDefaultBrush ); -+ app->setProperty("ScrollBar_DefaultParameters_SliderHoverBrush" , scrollbar.data()->scrollBarSliderHoverBrush ); -+ app->setProperty("ScrollBar_DefaultParameters_SliderClickBrush" , scrollbar.data()->scrollBarSliderClickBrush ); -+ app->setProperty("ScrollBar_DefaultParameters_SliderDisableBrush" , scrollbar.data()->scrollBarSliderDisableBrush ); -+ -+ //tooltip -+ QSharedPointer<ConfigToolTipParameters> tooltip(new ConfigToolTipParameters); -+ sp->getDefaultToolTipParameters(tooltip.data(), isUseDarkPalette()); -+ app->setProperty("ToolTip_DefaultParameters_Radius" , tooltip.data()->radius ); -+ app->setProperty("ToolTip_DefaultParameters_BackgroundBrush", tooltip.data()->toolTipBackgroundBrush); -+ app->setProperty("ToolTip_DefaultParameters_BackgroundPen" , tooltip.data()->toolTipBackgroundPen ); -+ -+ //tabwidget -+ QSharedPointer<ConfigTabWidgetParameters> tabwidget(new ConfigTabWidgetParameters); -+ sp->getDefaultTabWidgetParameters(tabwidget.data(), isUseDarkPalette()); -+ app->setProperty("TabWidget_DefaultParameters_Radius" , tabwidget.data()->radius ); -+ app->setProperty("TabWidget_DefaultParameters_tabWidgetBackgroundBrush", tabwidget.data()->tabWidgetBackgroundBrush); -+ app->setProperty("TabWidget_DefaultParameters_tabBarBackgroundBrush" , tabwidget.data()->tabBarBackgroundBrush ); -+ app->setProperty("TabWidget_DefaultParameters_tabBarDefaultBrush" , tabwidget.data()->tabBarDefaultBrush ); -+ app->setProperty("TabWidget_DefaultParameters_tabBarHoverBrush" , tabwidget.data()->tabBarHoverBrush ); -+ app->setProperty("TabWidget_DefaultParameters_tabBarClickBrush" , tabwidget.data()->tabBarClickBrush ); -+ app->setProperty("TabWidget_DefaultParameters_tabBarSelectBrush" , tabwidget.data()->tabBarSelectBrush ); -+ app->setProperty("TabWidget_DefaultParameters_tabBarDefaultPen" , tabwidget.data()->tabBarDefaultPen ); -+ app->setProperty("TabWidget_DefaultParameters_tabBarHoverPen" , tabwidget.data()->tabBarHoverPen ); -+ app->setProperty("TabWidget_DefaultParameters_tabBarClickPen" , tabwidget.data()->tabBarClickPen ); -+ app->setProperty("TabWidget_DefaultParameters_tabBarFocusPen" , tabwidget.data()->tabBarFocusPen ); -+ -+ //menu -+ QSharedPointer<ConfigMenuParameters> menu(new ConfigMenuParameters); -+ sp->getDefaultMenuParameters(menu.data(), isUseDarkPalette()); -+ app->setProperty("Menu_DefaultParameters_frameRadius" , menu.data()->frameRadius ); -+ app->setProperty("Menu_DefaultParameters_itemRadius" , menu.data()->itemRadius ); -+ app->setProperty("Menu_DefaultParameters_menuBackgroundBrush", menu.data()->menuBackgroundBrush); -+ app->setProperty("Menu_DefaultParameters_menuBackgroundPen" , menu.data()->menuBackgroundPen ); -+ app->setProperty("Menu_DefaultParameters_menuItemSelectBrush", menu.data()->menuItemSelectBrush); -+ app->setProperty("Menu_DefaultParameters_menuItemFocusPen" , menu.data()->menuItemFocusPen ); -+ app->setProperty("Menu_DefaultParameters_menuTextHoverPen" , menu.data()->menuTextHoverPen ); -+} -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -index ba8fa44..8a444d7 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.h -@@ -24,12 +24,13 @@ - #define UKUICONFIGSTYLE_H - - #include <QProxyStyle> -- - #include <QFontMetrics> - #include <QStyleOption> - #include <private/qtextengine_p.h> - #include <qmath.h> - #include <QGSettings> -+#include "widget-parameters/control-parameters.h" -+ - - class QStyleOptionViewItem; - class QDBusInterface; -@@ -88,6 +89,8 @@ public: - void polish(QWidget *widget); - void unpolish(QWidget *widget); - void polish(QPalette& palette) ; -+ void polish(QApplication *app); -+ - - QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = nullptr, - const QWidget *widget = nullptr) const override; -@@ -170,6 +173,7 @@ private: - void viewItemLayout(const QStyleOptionViewItem *option, QRect *checkRect, QRect *pixmapRect, QRect *textRect, bool sizehint) const; - QSize viewItemSize(const QStyleOptionViewItem *option, int role) const; - -+ void getDefaultControlParameters(QApplication *app); - - private: - UKUIConfigStyleSpace::ConfigTabWidgetAnimationHelper *m_tab_animation_helper = nullptr; -@@ -205,7 +209,6 @@ private: - - bool m_blink_cursor = true; - int m_blink_cursor_time = 1200; -- - }; - - #endif // UKUICONFIGSTYLE_H -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h -index 9612e78..3166b90 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h -@@ -26,10 +26,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigCheckBoxParameters -+class ConfigCheckBoxParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigCheckBoxParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h -index e6a4def..37725a1 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h -@@ -25,10 +25,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigComboBoxParameters -+class ConfigComboBoxParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigComboBoxParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h -index 2d6eaf1..954c41d 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h -@@ -27,10 +27,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigLineEditParameters -+class ConfigLineEditParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigLineEditParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -index e3b8a69..34e5b9d 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h -@@ -26,10 +26,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigListParameters -+class ConfigListParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigListParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h -index 7cf419f..9364713 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h -@@ -27,10 +27,13 @@ - #include <QPixmap> - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigMenuParameters -+class ConfigMenuParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigMenuParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h -index c79b738..b6d4dc7 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h -@@ -26,10 +26,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigProgressBarParameters -+class ConfigProgressBarParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigProgressBarParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h -index 82ce1fd..e2e7ad2 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h -@@ -27,10 +27,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigPushButtonParameters -+class ConfigPushButtonParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigPushButtonParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h -index d1e738d..66b0cd4 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h -@@ -25,10 +25,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigRadioButtonParameters -+class ConfigRadioButtonParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigRadioButtonParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h -index 1ecfb2f..b406b43 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h -@@ -25,10 +25,13 @@ - #define SCROLLBARPARAMETERS_H - - #include <QBrush> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigScrollBarParameters -+class ConfigScrollBarParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigScrollBarParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -index ef39fab..bc539fd 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h -@@ -27,10 +27,13 @@ - #include <QBrush> - #include <QPainterPath> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigSliderParameters -+class ConfigSliderParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigSliderParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h -index 54c808f..7e09907 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h -@@ -26,11 +26,12 @@ - - #include <QBrush> - #include <QPen> -- -+#include "control-parameters.h" - namespace UKUIConfigStyleSpace { - --class ConfigSpinBoxParameters -+class ConfigSpinBoxParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigSpinBoxParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -index 53a9a8d..1c057e2 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h -@@ -25,11 +25,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" - - namespace UKUIConfigStyleSpace { - --class ConfigTableParameters -+class ConfigTableParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigTableParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -index eb85537..487a10d 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h -@@ -26,10 +26,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigTabWidgetParameters -+class ConfigTabWidgetParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigTabWidgetParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h -index 81b2c9b..741b812 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h -@@ -26,10 +26,13 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" -+ - namespace UKUIConfigStyleSpace { - --class ConfigToolButtonParameters -+class ConfigToolButtonParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigToolButtonParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h -index b126159..3f3be97 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h -@@ -26,10 +26,12 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" - namespace UKUIConfigStyleSpace { - --class ConfigToolTipParameters -+class ConfigToolTipParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigToolTipParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -index e5291f7..ef357f3 100644 ---- a/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h -@@ -25,10 +25,12 @@ - - #include <QBrush> - #include <QPen> -+#include "control-parameters.h" - namespace UKUIConfigStyleSpace { - --class ConfigTreeParameters -+class ConfigTreeParameters : public ControlParameters - { -+ Q_OBJECT - public: - ConfigTreeParameters(); - -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp b/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp -new file mode 100644 -index 0000000..e5cbe7e ---- /dev/null -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp -@@ -0,0 +1,34 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: xibowen <lanyue@kylinos.cn> -+ * -+ */ -+ -+ -+#include "control-parameters.h" -+using namespace UKUIConfigStyleSpace; -+ -+ControlParameters::ControlParameters(QObject *parent) : QObject(parent) -+{ -+ -+} -+ControlParameters::~ControlParameters() -+{ -+ -+} -diff --git a/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h b/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h -new file mode 100644 -index 0000000..bdaf05f ---- /dev/null -+++ b/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h -@@ -0,0 +1,42 @@ -+/* -+ * Qt5-UKUI's Library -+ * -+ * Copyright (C) 2023, KylinSoft Co., Ltd. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 3 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this library. If not, see <https://www.gnu.org/licenses/>. -+ * -+ * Authors: xibowen <lanyue@kylinos.cn> -+ * -+ */ -+ -+ -+#ifndef ControlParameters_H -+#define ControlParameters_H -+ -+#include <QObject> -+ -+namespace UKUIConfigStyleSpace { -+ -+class ControlParameters : public QObject -+{ -+ Q_OBJECT -+public: -+ explicit ControlParameters(QObject *parent = nullptr); -+ -+ ~ControlParameters(); -+ -+// virtual void getParameters(){} -+}; -+} -+#endif // ControlParameters_H -diff --git a/ukui-styles/ukui-style-plugin.cpp b/ukui-styles/ukui-style-plugin.cpp -index 32f6930..0949da5 100644 ---- a/ukui-styles/ukui-style-plugin.cpp -+++ b/ukui-styles/ukui-style-plugin.cpp -@@ -57,6 +57,7 @@ UKUIStylePlugin::UKUIStylePlugin(QObject *parent) : - // if (appStyleSettings->currentStyleStretagy() != ApplicationStyleSettings::Default) - // return; - -+ qDebug() << "UKUIStyleSettings change...." << key; - auto styleName = settings->get("styleName").toString(); - auto widgetThemeName = settings->get("widgetThemeName").toString(); - diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0037-Update-changelog-2024.04.10-4.1.0.0-0k33.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0037-Update-changelog-2024.04.10-4.1.0.0-0k33.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0037-Update-changelog-2024.04.10-4.1.0.0-0k33.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0037-Update-changelog-2024.04.10-4.1.0.0-0k33.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,51 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Wed, 10 Apr 2024 10:46:49 +0800 -Subject: Update changelog 2024.04.10 4.1.0.0-0k33 - ---- - .../qt5-config-style-ukui/ukui-config-style.cpp | 19 +++++++++++-------- - 1 file changed, 11 insertions(+), 8 deletions(-) - -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 ed2f4b8..e6bd5a4 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -375,13 +375,13 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - } - - if (qobject_cast<QSlider *>(obj)) { --// if (e->type() == QEvent::Wheel) { --// if (QWidget *w = qobject_cast<QWidget *>(obj)) { --// if (!w->hasFocus()) { --// return true; --// } --// } --// } -+ if (e->type() == QEvent::Wheel) { -+ if (QWidget *w = qobject_cast<QWidget *>(obj)) { -+ if (!w->hasFocus()) { -+ return true; -+ } -+ } -+ } - auto mousePressEvent = static_cast<QMouseEvent*>(e); - - if((e->type() ==QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) && (proxy()->styleHint(QStyle::SH_Slider_AbsoluteSetButtons) == mousePressEvent->button() || -@@ -488,13 +488,16 @@ bool UKUIConfigStyle::eventFilter(QObject *obj, QEvent *e) - animator->setExtraProperty("start_position", startPosition); - - // qApp->sendEvent(slider, e); -+ slider->setFocus(); - return true; - } - } - } - } -- else -+ else{ -+ slider->setFocus(); - return true; -+ } - return false; - } - diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0038-Update-changelog-2024.04.16-4.1.0.0-0k34.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0038-Update-changelog-2024.04.16-4.1.0.0-0k34.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0038-Update-changelog-2024.04.16-4.1.0.0-0k34.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0038-Update-changelog-2024.04.16-4.1.0.0-0k34.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,76 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Tue, 16 Apr 2024 16:51:53 +0800 -Subject: Update changelog 2024.04.16 4.1.0.0-0k34 - ---- - ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -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 e6bd5a4..1c6a510 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -1221,6 +1221,8 @@ void UKUIConfigStyle::unpolish(QWidget *widget) - } - } - -+ if(!widget) -+ return; - m_shadow_helper->unregisterWidget(widget); - - widget->removeEventFilter(this); -@@ -1479,7 +1481,8 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - painter->setBrush(sp->m_MenuParameters.menuBackgroundBrush); - painter->setPen(sp->m_MenuParameters.menuBackgroundPen); -- painter->drawRoundedRect(widget->rect(), sp->m_MenuParameters.frameRadius, sp->m_MenuParameters.frameRadius); -+ if(widget) -+ painter->drawRoundedRect(widget->rect(), sp->m_MenuParameters.frameRadius, sp->m_MenuParameters.frameRadius); - painter->restore(); - - if(sp->Menu_Right_Bottom_Corner){ -@@ -4563,7 +4566,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - animator->startAnimator("groove_width"); - } - } -- if(widget->isEnabled()) -+ if(widget && widget->isEnabled()) - len = animator->value("groove_width").toReal() * 4 * sp->m_scaleRatio2_1 + 4; - else - len = 4; -@@ -4856,7 +4859,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - - if (iconRect.isValid()) { - if(sp->getAdjustColorRules() == UKUIConfigStyleParameters::AdjustColorRules::HSL && -- inactive && useTransparentButtonList().contains(qAppName()) && -+ inactive && useTransparentButtonList().contains(qAppName()) && widget && - widget->property("isWindowButton").isValid() && - (widget->property("isWindowButton").toInt() == 0x01 || - widget->property("isWindowButton").toInt() == 0x02)) { -@@ -5770,7 +5773,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - if (const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(option)) { - painter->save(); - painter->setPen(Qt::NoPen); -- if(widget->isEnabled()){ -+ if(widget && widget->isEnabled()){ - painter->setBrush(tb->palette.button().color()); - if(option->state & State_MouseOver) - { -@@ -7263,7 +7266,7 @@ QRect UKUIConfigStyle::subElementRect(SubElement element, const QStyleOption *op - if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(option)) { - bool clear = false; - if (widget) { -- if (qobject_cast<QComboBox *>(widget->parent())) -+ if (widget->parent() && qobject_cast<QComboBox *>(widget->parent())) - { - return option->rect; - } -@@ -7548,7 +7551,7 @@ QSize UKUIConfigStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt - newSize.setWidth(qMin(newSize.width(), sp->TabBar_DefaultMaxWidth)); - } - -- if (qobject_cast<const QTabBar*>(widget)) { -+ if (widget && qobject_cast<const QTabBar*>(widget)) { - //set height between min and max - newSize.setHeight(qMax(newSize.height(), widget->minimumHeight())); - newSize.setHeight(qMin(newSize.height(), widget->maximumHeight())); diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0039-translations-qt5-ukui-platformtheme_zh_Hans.ts.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0039-translations-qt5-ukui-platformtheme_zh_Hans.ts.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0039-translations-qt5-ukui-platformtheme_zh_Hans.ts.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0039-translations-qt5-ukui-platformtheme_zh_Hans.ts.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,274 +0,0 @@ -From: KevinDuan <duankaiwen@ubuntukylin.com> -Date: Thu, 18 Apr 2024 05:53:15 +0000 -Subject: =?utf-8?b?5Yig6Zmk5paH5Lu2IHRyYW5zbGF0aW9ucy9xdDUtdWt1aS1wbGF0Zm9y?= - =?utf-8?b?bXRoZW1lX3poX0hhbnMudHM=?= - ---- - translations/qt5-ukui-platformtheme_zh_Hans.ts | 258 ------------------------- - 1 file changed, 258 deletions(-) - delete mode 100644 translations/qt5-ukui-platformtheme_zh_Hans.ts - -diff --git a/translations/qt5-ukui-platformtheme_zh_Hans.ts b/translations/qt5-ukui-platformtheme_zh_Hans.ts -deleted file mode 100644 -index 7380cc3..0000000 ---- a/translations/qt5-ukui-platformtheme_zh_Hans.ts -+++ /dev/null -@@ -1,258 +0,0 @@ --<?xml version="1.0" encoding="utf-8"?> --<!DOCTYPE TS> --<TS version="2.1" language="zh_Hans"> --<context> -- <name>KyFileDialogHelper</name> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2524"/> -- <source>Open File</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2525"/> -- <source>Save File</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2538"/> -- <source>All Files (*)</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>KyNativeFileDialog</name> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="192"/> -- <source>Go Back</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="199"/> -- <source>Go Forward</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="205"/> -- <source>Cd Up</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="212"/> -- <source>Search</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="220"/> -- <source>View Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="231"/> -- <source>Sort Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="348"/> -- <source>Maximize</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="250"/> -- <source>Close</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="345"/> -- <source>Restore</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="941"/> -- <source>Name</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="944"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1532"/> -- <source>Open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="945"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="954"/> -- <source>Cancel</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="949"/> -- <source>Save as</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <source>New Folder</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="953"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1536"/> -- <source>Save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="989"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="992"/> -- <source>Directories</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -- <source>Warning</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -- <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1858"/> -- <source>NewFolder</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2146"/> -- <source>Undo</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2153"/> -- <source>Redo</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -- <source>warn</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -- <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>MessageBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="166"/> -- <source>Close</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>QApplication</name> -- <message> -- <location filename="../widget/messagebox/message-box.h" line="190"/> -- <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.h" line="192"/> -- <source>Incompatible Qt Library Error</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>QDialogButtonBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="423"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1106"/> -- <source>OK</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>QMessageBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="479"/> -- <location filename="../widget/messagebox/message-box.cpp" line="897"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -- <source>Show Details...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="897"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -- <source>Hide Details...</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>QObject</name> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="19"/> -- <source>File Name</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="23"/> -- <source>Modified Date</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="27"/> -- <source>File Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="31"/> -- <source>File Size</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="35"/> -- <source>Original Path</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="44"/> -- <source>Descending</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="49"/> -- <source>Ascending</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="55"/> -- <source>Use global sorting</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="75"/> -- <source>List View</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="76"/> -- <source>Icon View</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -- <source>Default Slide</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -- <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -- </message> --</context> --</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0040-qt5-ukui-platformtheme-translations-qt5-ukui-platfor.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0040-qt5-ukui-platformtheme-translations-qt5-ukui-platfor.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0040-qt5-ukui-platformtheme-translations-qt5-ukui-platfor.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0040-qt5-ukui-platformtheme-translations-qt5-ukui-platfor.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,274 +0,0 @@ -From: KevinDuan <duankaiwen@ubuntukylin.com> -Date: Thu, 18 Apr 2024 05:54:44 +0000 -Subject: =?utf-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6_qt5-ukui-platformth?= - =?utf-8?q?eme/translations/qt5-ukui-platformtheme=5Fzh=5FHans=2Ets?= - ---- - .../translations/qt5-ukui-platformtheme_zh_Hans.ts | 258 --------------------- - 1 file changed, 258 deletions(-) - delete mode 100644 qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hans.ts - -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hans.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hans.ts -deleted file mode 100644 -index 7380cc3..0000000 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hans.ts -+++ /dev/null -@@ -1,258 +0,0 @@ --<?xml version="1.0" encoding="utf-8"?> --<!DOCTYPE TS> --<TS version="2.1" language="zh_Hans"> --<context> -- <name>KyFileDialogHelper</name> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2524"/> -- <source>Open File</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2525"/> -- <source>Save File</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2538"/> -- <source>All Files (*)</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>KyNativeFileDialog</name> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="192"/> -- <source>Go Back</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="199"/> -- <source>Go Forward</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="205"/> -- <source>Cd Up</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="212"/> -- <source>Search</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="220"/> -- <source>View Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="231"/> -- <source>Sort Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="348"/> -- <source>Maximize</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="250"/> -- <source>Close</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="345"/> -- <source>Restore</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="941"/> -- <source>Name</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="944"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1532"/> -- <source>Open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="945"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="954"/> -- <source>Cancel</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="949"/> -- <source>Save as</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <source>New Folder</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="953"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1536"/> -- <source>Save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="989"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="992"/> -- <source>Directories</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -- <source>Warning</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -- <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1858"/> -- <source>NewFolder</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2146"/> -- <source>Undo</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2153"/> -- <source>Redo</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -- <source>warn</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -- <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>MessageBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="166"/> -- <source>Close</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>QApplication</name> -- <message> -- <location filename="../widget/messagebox/message-box.h" line="190"/> -- <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.h" line="192"/> -- <source>Incompatible Qt Library Error</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>QDialogButtonBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="423"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1106"/> -- <source>OK</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>QMessageBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="479"/> -- <location filename="../widget/messagebox/message-box.cpp" line="897"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -- <source>Show Details...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="897"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -- <source>Hide Details...</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>QObject</name> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="19"/> -- <source>File Name</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="23"/> -- <source>Modified Date</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="27"/> -- <source>File Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="31"/> -- <source>File Size</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="35"/> -- <source>Original Path</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="44"/> -- <source>Descending</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="49"/> -- <source>Ascending</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="55"/> -- <source>Use global sorting</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="75"/> -- <source>List View</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="76"/> -- <source>Icon View</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -- <source>Default Slide</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -- <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -- </message> --</context> --</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0041-Update-changelog-2024.04.19-4.1.0.0-0k35.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0041-Update-changelog-2024.04.19-4.1.0.0-0k35.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0041-Update-changelog-2024.04.19-4.1.0.0-0k35.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0041-Update-changelog-2024.04.19-4.1.0.0-0k35.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,305 +0,0 @@ -From: xibowen <xibowen@kylinos.cn> -Date: Fri, 19 Apr 2024 15:10:04 +0800 -Subject: Update changelog 2024.04.19 4.1.0.0-0k35 - ---- - .../translations/qt5-ukui-filedialog_zh_Hans.ts | 258 --------------------- - .../animations/config-checkbox-animator.cpp | 6 +- - 2 files changed, 3 insertions(+), 261 deletions(-) - delete mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hans.ts - -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hans.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hans.ts -deleted file mode 100644 -index 7380cc3..0000000 ---- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hans.ts -+++ /dev/null -@@ -1,258 +0,0 @@ --<?xml version="1.0" encoding="utf-8"?> --<!DOCTYPE TS> --<TS version="2.1" language="zh_Hans"> --<context> -- <name>KyFileDialogHelper</name> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2524"/> -- <source>Open File</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2525"/> -- <source>Save File</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2538"/> -- <source>All Files (*)</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>KyNativeFileDialog</name> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="192"/> -- <source>Go Back</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="199"/> -- <source>Go Forward</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="205"/> -- <source>Cd Up</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="212"/> -- <source>Search</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="220"/> -- <source>View Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="231"/> -- <source>Sort Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="348"/> -- <source>Maximize</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="250"/> -- <source>Close</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="345"/> -- <source>Restore</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="941"/> -- <source>Name</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="944"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1532"/> -- <source>Open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="945"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="954"/> -- <source>Cancel</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="949"/> -- <source>Save as</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> -- <source>New Folder</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="953"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1536"/> -- <source>Save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="989"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="992"/> -- <source>Directories</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -- <source>Warning</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> -- <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="1858"/> -- <source>NewFolder</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2146"/> -- <source>Undo</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2153"/> -- <source>Redo</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -- <source>warn</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> -- <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>MessageBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="166"/> -- <source>Close</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>QApplication</name> -- <message> -- <location filename="../widget/messagebox/message-box.h" line="190"/> -- <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.h" line="192"/> -- <source>Incompatible Qt Library Error</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>QDialogButtonBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="423"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1106"/> -- <source>OK</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>QMessageBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="479"/> -- <location filename="../widget/messagebox/message-box.cpp" line="897"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -- <source>Show Details...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="897"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1518"/> -- <source>Hide Details...</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>QObject</name> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="19"/> -- <source>File Name</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="23"/> -- <source>Modified Date</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="27"/> -- <source>File Type</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="31"/> -- <source>File Size</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="35"/> -- <source>Original Path</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="44"/> -- <source>Descending</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="49"/> -- <source>Ascending</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="55"/> -- <source>Use global sorting</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="75"/> -- <source>List View</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="76"/> -- <source>Icon View</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -- <source>Default Slide</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -- <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -- </message> --</context> --</TS> -diff --git a/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.cpp b/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.cpp -index e9c6d9a..b827ad3 100644 ---- a/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.cpp -+++ b/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.cpp -@@ -67,7 +67,7 @@ bool ConfigCheckBoxAnimator::bindWidget(QWidget *w) - m_onScale->setStartValue(0.0); - m_onScale->setEndValue(1.0); - m_onScale->setDuration(260); -- m_onScale->setEasingCurve(QEasingCurve::InOutSine); -+ m_onScale->setEasingCurve(QEasingCurve::OutCubic); - addAnimation(m_onScale); - connect(m_onScale, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { - w->update(); -@@ -80,7 +80,7 @@ bool ConfigCheckBoxAnimator::bindWidget(QWidget *w) - m_onOpacity->setStartValue(0.0); - m_onOpacity->setEndValue(1.0); - m_onOpacity->setDuration(120); -- m_onOpacity->setEasingCurve(QEasingCurve::InOutSine); -+ m_onOpacity->setEasingCurve(QEasingCurve::OutCubic); - addAnimation(m_onOpacity); - connect(m_onOpacity, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { - w->update(); -@@ -93,7 +93,7 @@ bool ConfigCheckBoxAnimator::bindWidget(QWidget *w) - m_onBase->setStartValue(0.0); - m_onBase->setEndValue(1.0); - m_onBase->setDuration(180); -- m_onBase->setEasingCurve(QEasingCurve::InOutSine); -+ m_onBase->setEasingCurve(QEasingCurve::OutCubic); - addAnimation(m_onBase); - connect(m_onBase, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { - w->update(); diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0042-.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0042-.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0042-.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0042-.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,25 +0,0 @@ -From: openkylin2 <duankaiwen@kylinos.cn> -Date: Mon, 22 Apr 2024 14:14:40 +0800 -Subject: =?utf-8?b?5aKe5Yqg57u05ZOI5p+v5aSa6K+t6KiA5LuO5Y+z5b6A5bem5pSv5oyB?= - ---- - ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp | 6 ++++++ - 1 file changed, 6 insertions(+) - -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 1c6a510..be9a22b 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -4529,6 +4529,12 @@ void UKUIConfigStyle::drawComplexControl(QStyle::ComplexControl control, const Q - - void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const - { -+ QString systemLang = QLocale::system().name(); -+ if(systemLang == "ug_CN" || systemLang == "ky_KG" || systemLang == "kk_KZ"){ -+ QGuiApplication::setLayoutDirection(Qt::RightToLeft); -+ } else { -+ QGuiApplication::setLayoutDirection(Qt::LeftToRight); -+ } - switch (element) { - case CE_ScrollBarSlider: - { diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0043-Update-changelog-2024.04.26-4.1.0.0-0k37.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0043-Update-changelog-2024.04.26-4.1.0.0-0k37.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0043-Update-changelog-2024.04.26-4.1.0.0-0k37.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0043-Update-changelog-2024.04.26-4.1.0.0-0k37.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,23 +0,0 @@ -From: tanjing <tanjing@kylinos.cn> -Date: Fri, 26 Apr 2024 01:13:50 +0800 -Subject: Update changelog 2024.04.26 4.1.0.0-0k37 - ---- - ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -index 80c9a62..d929484 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp -@@ -2426,8 +2426,8 @@ void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QSty - QLinearGradient linearGradient; - QColor startColor; - QColor endColor; -- linearGradient.setStart(option->rect.topLeft()); -- linearGradient.setFinalStop(option->rect.bottomLeft()); -+ linearGradient.setStart(!option ? QPoint(0,0) : option->rect.topLeft()); -+ linearGradient.setFinalStop(!option ? QPoint(0,0) : option->rect.bottomLeft()); - startColor = treeViewColorCfg.hoverGradientList.value(0); - endColor = treeViewColorCfg.hoverGradientList.value(1); - linearGradient.setColorAt(0, startColor); diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0044-Deleted-translation-using-Weblate-Uyghur.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0044-Deleted-translation-using-Weblate-Uyghur.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0044-Deleted-translation-using-Weblate-Uyghur.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0044-Deleted-translation-using-Weblate-Uyghur.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,267 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.com> -Date: Tue, 7 May 2024 20:07:49 +0800 -Subject: Deleted translation using Weblate (Uyghur) - ---- - .../translations/qt5-ukui-filedialog_ug.ts | 252 --------------------- - 1 file changed, 252 deletions(-) - delete mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts - -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts -deleted file mode 100644 -index 68c3584..0000000 ---- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts -+++ /dev/null -@@ -1,252 +0,0 @@ --<?xml version="1.0" encoding="utf-8"?> --<!DOCTYPE TS> --<TS version="2.1" language="ug_CN"> --<context> -- <name>MessageBox</name> -- <message> -- <source>Close</source> -- <translation type="vanished">ياپ</translation> -- </message> --</context> --<context> -- <name>QApplication</name> -- <message> -- <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="vanished">ئىجرا قىلىشقا بولىدىغان '٪1' Qt ٪2 نى تەلەپ قىلىدۇ، تېپىلغان Qt ٪3.</translation> -- </message> -- <message> -- <source>Incompatible Qt Library Error</source> -- <translation type="vanished">بىردەك بولمىغان QT ئامبىرى خاتالىقى</translation> -- </message> --</context> --<context> -- <name>QDialogButtonBox</name> -- <message> -- <source>OK</source> -- <translation type="vanished">ماقۇل</translation> -- </message> --</context> --<context> -- <name>QMessageBox</name> -- <message> -- <source>Show Details...</source> -- <translation type="vanished">تەپسىلاتىنى كۆرسەت...</translation> -- </message> -- <message> -- <source>Hide Details...</source> -- <translation type="vanished">تەپسىلاتىنى يوشۇرۇش...</translation> -- </message> --</context> --<context> -- <name>QObject</name> -- <message> -- <location filename="../ui_kyfiledialog.cpp" line="259"/> -- <source>File Name</source> -- <translation>ھۆججەت نامى</translation> -- </message> -- <message> -- <location filename="../ui_kyfiledialog.cpp" line="263"/> -- <source>Modified Date</source> -- <translation>ئۆزگەرتىلگەن ۋاقتى</translation> -- </message> -- <message> -- <location filename="../ui_kyfiledialog.cpp" line="267"/> -- <source>File Type</source> -- <translation>ھۆججەت تۈرى</translation> -- </message> -- <message> -- <location filename="../ui_kyfiledialog.cpp" line="271"/> -- <source>File Size</source> -- <translation>ھۆججەت چوڭلۇقى</translation> -- </message> -- <message> -- <location filename="../ui_kyfiledialog.cpp" line="275"/> -- <source>Original Path</source> -- <translation>ئەسلى يول</translation> -- </message> -- <message> -- <location filename="../ui_kyfiledialog.cpp" line="284"/> -- <source>Descending</source> -- <translation>پەسكە چۈشمەكتە</translation> -- </message> -- <message> -- <location filename="../ui_kyfiledialog.cpp" line="289"/> -- <source>Ascending</source> -- <translation>ئۆرلەش</translation> -- </message> -- <message> -- <location filename="../ui_kyfiledialog.cpp" line="295"/> -- <source>Use global sorting</source> -- <translation>يەر شارىنى تۈرگە ئايرىشنى ئىشلىتىش</translation> -- </message> -- <message> -- <location filename="../ui_kyfiledialog.cpp" line="315"/> -- <source>List View</source> -- <translation>تىزىملىك كۆرۈش</translation> -- </message> -- <message> -- <location filename="../ui_kyfiledialog.cpp" line="316"/> -- <source>Icon View</source> -- <translation>ئايكون كۆرۈش</translation> -- </message> -- <message> -- <source>Close</source> -- <translation type="obsolete">ياپ</translation> -- </message> --</context> --<context> -- <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -- <source>Default Slide</source> -- <translation>كۆڭۈلدىكى سىيرىلما</translation> -- </message> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -- <source>Let tab widget switch with a slide animation.</source> -- <translation>سىيرىلما كارتون ئارقىلىق تاختا ۋىكىپات ئالماشتۇرسۇن.</translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyFileDialogHelper</name> -- <message> -- <location filename="../kyfiledialog.cpp" line="2715"/> -- <source>Open File</source> -- <translation type="unfinished">ھۆججەتنى ئېچىش</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="2716"/> -- <source>Save File</source> -- <translation type="unfinished">ھۆججەت ساقلاش</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="2729"/> -- <source>All Files (*)</source> -- <translation type="unfinished">بارلىق ھۆججەتلەر (*)</translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyNativeFileDialog</name> -- <message> -- <location filename="../kyfiledialog.cpp" line="221"/> -- <source>Go Back</source> -- <translation type="unfinished">قايت</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="228"/> -- <source>Go Forward</source> -- <translation type="unfinished">ئالدىغا ماڭ</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="234"/> -- <source>Cd Up</source> -- <translation type="unfinished">Cd Up</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="241"/> -- <source>Search</source> -- <translation type="unfinished">ئىزدە</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="249"/> -- <source>View Type</source> -- <translation type="unfinished">كۆرۈش تىپى</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="260"/> -- <source>Sort Type</source> -- <translation type="unfinished">تۈر تۈرى</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="265"/> -- <location filename="../kyfiledialog.cpp" line="378"/> -- <source>Maximize</source> -- <translation type="unfinished">ئەڭ چوڭ چەككە</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="279"/> -- <source>Close</source> -- <translation type="unfinished">ياپ</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="375"/> -- <source>Restore</source> -- <translation type="unfinished">ئەسلىگە كەلتۈرۈش</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="987"/> -- <source>Name</source> -- <translation type="unfinished">ئىسىم-فامىلىسى</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="990"/> -- <location filename="../kyfiledialog.cpp" line="1578"/> -- <source>Open</source> -- <translation type="unfinished">ئېچىش</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="991"/> -- <location filename="../kyfiledialog.cpp" line="1000"/> -- <source>Cancel</source> -- <translation type="unfinished">ئەمەلدىن قالدۇرۇش</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="995"/> -- <source>Save as</source> -- <translation type="unfinished">تېجەش</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="997"/> -- <source>New Folder</source> -- <translation type="unfinished">يېڭى ھۆججەت قىسقۇچ</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="999"/> -- <location filename="../kyfiledialog.cpp" line="1582"/> -- <source>Save</source> -- <translation type="unfinished">ساقلاش</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="1035"/> -- <location filename="../kyfiledialog.cpp" line="1036"/> -- <location filename="../kyfiledialog.cpp" line="1038"/> -- <source>Directories</source> -- <translation type="unfinished">مۇندەرىجىلەر</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="1227"/> -- <source>Warning</source> -- <translation type="unfinished">دىققەت</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="1227"/> -- <source>exist, are you sure replace?</source> -- <translation type="unfinished">مەۋجۇت، سىز راستىنلا ئالماشتۇرۇۋاتامسىز؟</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="1920"/> -- <source>NewFolder</source> -- <translation type="unfinished">يېڭى قاتلىغۇچ</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="2208"/> -- <source>Undo</source> -- <translation type="unfinished">Undo</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="2215"/> -- <source>Redo</source> -- <translation type="unfinished">قايتا-قايتا</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="2414"/> -- <source>warn</source> -- <translation type="unfinished">ئاگاھلاندۇرۇش</translation> -- </message> -- <message> -- <location filename="../kyfiledialog.cpp" line="2414"/> -- <source>This operation is not supported.</source> -- <translation type="unfinished">بۇ مەشغۇلات قوللىمايدۇ.</translation> -- </message> --</context> --</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0045-Added-translation-using-Weblate-Uyghur.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0045-Added-translation-using-Weblate-Uyghur.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0045-Added-translation-using-Weblate-Uyghur.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0045-Added-translation-using-Weblate-Uyghur.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,875 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.com> -Date: Tue, 7 May 2024 20:08:42 +0800 -Subject: Added translation using Weblate (Uyghur) - ---- - .../translations/qt5-ukui-filedialog_kk.ts | 92 ++++---- - .../translations/qt5-ukui-filedialog_ky.ts | 92 ++++---- - .../translations/qt5-ukui-filedialog_ug.ts | 252 +++++++++++++++++++++ - 3 files changed, 344 insertions(+), 92 deletions(-) - create mode 100644 qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts - -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts -index 491611c..2eae87d 100644 ---- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts -@@ -1,40 +1,40 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> --<TS version="2.1" language="kk_KZ"> -+<TS version="2.1" language="kk"> - <context> - <name>MessageBox</name> - <message> - <source>Close</source> -- <translation type="vanished">Жабу</translation> -+ <translation type="vanished">关闭</translation> - </message> - </context> - <context> - <name>QApplication</name> - <message> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="vanished">Орындалатын '% 1' Qt% 2 дегенді қажет етеді, табылған Qt% 3.</translation> -+ <translation type="vanished">可执行文件“%1”需要数量%2,找到数量%3。</translation> - </message> - <message> - <source>Incompatible Qt Library Error</source> -- <translation type="vanished">Үйлеспейтін Qt кітапхана қатесі</translation> -+ <translation type="vanished">不兼容的Qt库错误</translation> - </message> - </context> - <context> - <name>QDialogButtonBox</name> - <message> - <source>OK</source> -- <translation type="vanished">ЖАҚСЫ</translation> -+ <translation type="vanished">确认</translation> - </message> - </context> - <context> - <name>QMessageBox</name> - <message> - <source>Show Details...</source> -- <translation type="vanished">Егжей-тегжейін көрсету...</translation> -+ <translation type="vanished">显示细节……</translation> - </message> - <message> - <source>Hide Details...</source> -- <translation type="vanished">Мәліметтерді жасыру...</translation> -+ <translation type="vanished">隐藏细节……</translation> - </message> - </context> - <context> -@@ -42,56 +42,56 @@ - <message> - <location filename="../ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation>Файл атауы</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation>Өзгертілген күн</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation>Файл түрі</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation>Файл өлшемі</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation>Бастапқы жол</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation>Кему</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation>Көтерілу</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation>Ғаламдық сұрыптауды пайдалану</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation>Тізім көрінісі</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation>Белгіше көрінісі</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <source>Close</source> -- <translation type="obsolete">Жабу</translation> -+ <translation type="vanished">关闭</translation> - </message> - </context> - <context> -@@ -99,12 +99,12 @@ - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation>Әдетті слайд</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation>Слайд анимациясы бар tab widget ауыстырып қосқышына рұқсат етіңіз.</translation> -+ <translation type="unfinished"></translation> - </message> - </context> - <context> -@@ -112,17 +112,17 @@ - <message> - <location filename="../kyfiledialog.cpp" line="2715"/> - <source>Open File</source> -- <translation>Файлды ашу</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2716"/> - <source>Save File</source> -- <translation>Файлды сақтау</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2729"/> - <source>All Files (*)</source> -- <translation>Барлық файлдар (*)</translation> -+ <translation type="unfinished"></translation> - </message> - </context> - <context> -@@ -130,123 +130,123 @@ - <message> - <location filename="../kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation>Қайтып бар</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation>Алға жылжу</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation>Cd Up</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation>Іздеу</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation>Көрініс түрі</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation>Сұрыптау түрі</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="265"/> - <location filename="../kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation>Барынша көбейту</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation>Жабу</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation>Қалпына келтіру</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation>Атауы</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="990"/> - <location filename="../kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation>Ашу</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="991"/> - <location filename="../kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation>Болдырмау</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation>Басқаша сақтау</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation>Жаңа қапшық</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="999"/> - <location filename="../kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation>Сақтау</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1035"/> - <location filename="../kyfiledialog.cpp" line="1036"/> - <location filename="../kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation>Каталогтар</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation>Ескерту</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation>бар, сіз алмастырасыз ба?</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1920"/> - <source>NewFolder</source> -- <translation>NewFolder</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2208"/> - <source>Undo</source> -- <translation>Болдырмау</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2215"/> - <source>Redo</source> -- <translation>Редо</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2414"/> - <source>warn</source> -- <translation>Ескерту</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2414"/> - <source>This operation is not supported.</source> -- <translation>Бұл операцияға қолдау көрсетілмеген.</translation> -+ <translation type="unfinished"></translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts -index f946fbb..119a334 100644 ---- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts -@@ -1,40 +1,40 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> --<TS version="2.1" language="ky_KG"> -+<TS version="2.1" language="ky"> - <context> - <name>MessageBox</name> - <message> - <source>Close</source> -- <translation type="vanished">Жабуу</translation> -+ <translation type="vanished">关闭</translation> - </message> - </context> - <context> - <name>QApplication</name> - <message> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="vanished">Аткарыла турган '%1' Qt %2 талап кылынат, Qt %3 табылган.</translation> -+ <translation type="vanished">可执行文件“%1”需要数量%2,找到数量%3。</translation> - </message> - <message> - <source>Incompatible Qt Library Error</source> -- <translation type="vanished">Qt китепканасынын шайкеш келбеген катасы</translation> -+ <translation type="vanished">不兼容的Qt库错误</translation> - </message> - </context> - <context> - <name>QDialogButtonBox</name> - <message> - <source>OK</source> -- <translation type="vanished">МАКУЛ</translation> -+ <translation type="vanished">确认</translation> - </message> - </context> - <context> - <name>QMessageBox</name> - <message> - <source>Show Details...</source> -- <translation type="vanished">Егжей-тегжейин</translation> -+ <translation type="vanished">显示细节……</translation> - </message> - <message> - <source>Hide Details...</source> -- <translation type="vanished">Маалымат жашыруу...</translation> -+ <translation type="vanished">隐藏细节……</translation> - </message> - </context> - <context> -@@ -42,56 +42,56 @@ - <message> - <location filename="../ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation>Файлдын аты</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation>Өзгөртүлгөн дата</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation>Файл түрү</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation>Файл өлчөмү</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation>Оригиналдуу жол</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation>Түшүп</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation>Көтөрүлүш</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation>Глобалдык сорттоону колдонуу</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation>Тизменин көрүнүшү</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation>Икона көрүнүшү</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <source>Close</source> -- <translation type="obsolete">Жабуу</translation> -+ <translation type="vanished">关闭</translation> - </message> - </context> - <context> -@@ -99,12 +99,12 @@ - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation>Дефолт слайды</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation>Таблица виджет слайд анимациясы менен которуп берсин.</translation> -+ <translation type="unfinished"></translation> - </message> - </context> - <context> -@@ -112,17 +112,17 @@ - <message> - <location filename="../kyfiledialog.cpp" line="2715"/> - <source>Open File</source> -- <translation>Файлды ачуу</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2716"/> - <source>Save File</source> -- <translation>Файлды сактоо</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2729"/> - <source>All Files (*)</source> -- <translation>Бардык файлдар (*)</translation> -+ <translation type="unfinished"></translation> - </message> - </context> - <context> -@@ -130,123 +130,123 @@ - <message> - <location filename="../kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation>Артка кайрыл</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation>Алга илгерилетүү</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation>Cd Up</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation>Издөө</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation>Көрүү түрү</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation>Түрүн сорттоо</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="265"/> - <location filename="../kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation>Максималдуу</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation>Жабуу</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation>Калыбына келтирүү</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation>Аты-жөнү</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="990"/> - <location filename="../kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation>Ачуу</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="991"/> - <location filename="../kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation>Жокко чыгаруу</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation>Үнөмдөө</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation>Жаңы папка</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="999"/> - <location filename="../kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation>Сактоо</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1035"/> - <location filename="../kyfiledialog.cpp" line="1036"/> - <location filename="../kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation>Каталогдор</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation>Эскертүү</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation>бар, сиз сөзсүз алмаштырып жатасызбы?</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1920"/> - <source>NewFolder</source> -- <translation>Жаңы папкалар</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2208"/> - <source>Undo</source> -- <translation>Ундо</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2215"/> - <source>Redo</source> -- <translation>Редо</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2414"/> - <source>warn</source> -- <translation>эскертүү</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2414"/> - <source>This operation is not supported.</source> -- <translation>Бул операция колдолбойт.</translation> -+ <translation type="unfinished"></translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts -new file mode 100644 -index 0000000..ed3ef51 ---- /dev/null -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts -@@ -0,0 +1,252 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="ug"> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">关闭</translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="vanished">可执行文件“%1”需要数量%2,找到数量%3。</translation> -+ </message> -+ <message> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="vanished">不兼容的Qt库错误</translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <source>OK</source> -+ <translation type="vanished">确认</translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <source>Show Details...</source> -+ <translation type="vanished">显示细节……</translation> -+ </message> -+ <message> -+ <source>Hide Details...</source> -+ <translation type="vanished">隐藏细节……</translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">关闭</translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2715"/> -+ <source>Open File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2716"/> -+ <source>Save File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2729"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="265"/> -+ <location filename="../kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="990"/> -+ <location filename="../kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="991"/> -+ <location filename="../kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="999"/> -+ <location filename="../kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1035"/> -+ <location filename="../kyfiledialog.cpp" line="1036"/> -+ <location filename="../kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0046-Deleted-translation-using-Weblate-Kyrgyz.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0046-Deleted-translation-using-Weblate-Kyrgyz.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0046-Deleted-translation-using-Weblate-Kyrgyz.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0046-Deleted-translation-using-Weblate-Kyrgyz.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,745 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.com> -Date: Tue, 7 May 2024 20:09:28 +0800 -Subject: Deleted translation using Weblate (Kyrgyz) - ---- - translations/qt5-ukui-platformtheme_kk.ts | 361 ------------------------------ - translations/qt5-ukui-platformtheme_ky.ts | 361 ------------------------------ - 2 files changed, 722 deletions(-) - delete mode 100644 translations/qt5-ukui-platformtheme_kk.ts - delete mode 100644 translations/qt5-ukui-platformtheme_ky.ts - -diff --git a/translations/qt5-ukui-platformtheme_kk.ts b/translations/qt5-ukui-platformtheme_kk.ts -deleted file mode 100644 -index 7aea298..0000000 ---- a/translations/qt5-ukui-platformtheme_kk.ts -+++ /dev/null -@@ -1,361 +0,0 @@ --<?xml version="1.0" encoding="utf-8"?> --<!DOCTYPE TS> --<TS version="2.1" language="kk_KZ"> --<context> -- <name>MainWindow</name> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../test/system-settings/mainwindow.ui" line="14"/> -- <source>MainWindow</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="30"/> -- <source>test open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="37"/> -- <source>directory</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="47"/> -- <source>selected uri</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="54"/> -- <source>test show</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="64"/> -- <source>test exec</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="71"/> -- <source>test save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="78"/> -- <source>test static open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -- <source>PushButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -- <source>...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <source>highlightOnly</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -- <source>RadioButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/system-settings/mainwindow.ui" line="21"/> -- <source>style</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/system-settings/mainwindow.ui" line="31"/> -- <source>icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/system-settings/mainwindow.ui" line="41"/> -- <source>menu opacity</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/system-settings/mainwindow.ui" line="55"/> -- <source>font</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>MessageBox</name> -- <message> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -- <source>Close</source> -- <translation>Жабу</translation> -- </message> --</context> --<context> -- <name>QApplication</name> -- <message> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -- <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation>Орындалатын '% 1' Qt% 2 дегенді қажет етеді, табылған Qt% 3.</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -- <source>Incompatible Qt Library Error</source> -- <translation>Үйлеспейтін Qt кітапхана қатесі</translation> -- </message> --</context> --<context> -- <name>QDialogButtonBox</name> -- <message> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -- <source>OK</source> -- <translation>ЖАҚСЫ</translation> -- </message> --</context> --<context> -- <name>QMessageBox</name> -- <message> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -- <source>Show Details...</source> -- <translation>Егжей-тегжейін көрсету...</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -- <source>Hide Details...</source> -- <translation>Мәліметтерді жасыру...</translation> -- </message> --</context> --<context> -- <name>QObject</name> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -- <source>File Name</source> -- <translation>Файл атауы</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -- <source>Modified Date</source> -- <translation>Өзгертілген күн</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -- <source>File Type</source> -- <translation>Файл түрі</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -- <source>File Size</source> -- <translation>Файл өлшемі</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -- <source>Original Path</source> -- <translation>Бастапқы жол</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -- <source>Descending</source> -- <translation>Кему</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -- <source>Ascending</source> -- <translation>Көтерілу</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -- <source>Use global sorting</source> -- <translation>Ғаламдық сұрыптауды пайдалану</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -- <source>List View</source> -- <translation>Тізім көрінісі</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -- <source>Icon View</source> -- <translation>Белгіше көрінісі</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -- <source>Close</source> -- <translation type="unfinished">Жабу</translation> -- </message> --</context> --<context> -- <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -- <message> -- <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -- <source>Default Slide</source> -- <translation>Әдетті слайд</translation> -- </message> -- <message> -- <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -- <source>Let tab widget switch with a slide animation.</source> -- <translation>Слайд анимациясы бар tab widget ауыстырып қосқышына рұқсат етіңіз.</translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyFileDialogHelper</name> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -- <source>Open File</source> -- <translation>Файлды ашу</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -- <source>Save File</source> -- <translation>Файлды сақтау</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -- <source>All Files (*)</source> -- <translation>Барлық файлдар (*)</translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyNativeFileDialog</name> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -- <source>Go Back</source> -- <translation>Қайтып бар</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -- <source>Go Forward</source> -- <translation>Алға жылжу</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -- <source>Cd Up</source> -- <translation>Cd Up</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -- <source>Search</source> -- <translation>Іздеу</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -- <source>View Type</source> -- <translation>Көрініс түрі</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -- <source>Sort Type</source> -- <translation>Сұрыптау түрі</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -- <source>Maximize</source> -- <translation>Барынша көбейту</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -- <source>Close</source> -- <translation>Жабу</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -- <source>Restore</source> -- <translation>Қалпына келтіру</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -- <source>Name</source> -- <translation>Атауы</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -- <source>Open</source> -- <translation>Ашу</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -- <source>Cancel</source> -- <translation>Болдырмау</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -- <source>Save as</source> -- <translation>Басқаша сақтау</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -- <source>New Folder</source> -- <translation>Жаңа қапшық</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -- <source>Save</source> -- <translation>Сақтау</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -- <source>Directories</source> -- <translation>Каталогтар</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -- <source>Warning</source> -- <translation>Ескерту</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -- <source>exist, are you sure replace?</source> -- <translation>бар, сіз алмастырасыз ба?</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -- <source>NewFolder</source> -- <translation>NewFolder</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -- <source>Undo</source> -- <translation>Болдырмау</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -- <source>Redo</source> -- <translation>Редо</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -- <source>warn</source> -- <translation>Ескерту</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -- <source>This operation is not supported.</source> -- <translation>Бұл операцияға қолдау көрсетілмеген.</translation> -- </message> --</context> --</TS> -diff --git a/translations/qt5-ukui-platformtheme_ky.ts b/translations/qt5-ukui-platformtheme_ky.ts -deleted file mode 100644 -index 1c2f91e..0000000 ---- a/translations/qt5-ukui-platformtheme_ky.ts -+++ /dev/null -@@ -1,361 +0,0 @@ --<?xml version="1.0" encoding="utf-8"?> --<!DOCTYPE TS> --<TS version="2.1" language="ky_KG"> --<context> -- <name>MainWindow</name> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="14"/> -- <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -- <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -- <location filename="../test/system-settings/mainwindow.ui" line="14"/> -- <source>MainWindow</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="30"/> -- <source>test open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="37"/> -- <source>directory</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="47"/> -- <source>selected uri</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="54"/> -- <source>test show</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="64"/> -- <source>test exec</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="71"/> -- <source>test save</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/filedialog/mainwindow.ui" line="78"/> -- <source>test static open</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -- <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -- <source>PushButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -- <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -- <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -- <source>...</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -- <source>highlightOnly</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -- <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -- <source>RadioButton</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/system-settings/mainwindow.ui" line="21"/> -- <source>style</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/system-settings/mainwindow.ui" line="31"/> -- <source>icon</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/system-settings/mainwindow.ui" line="41"/> -- <source>menu opacity</source> -- <translation type="unfinished"></translation> -- </message> -- <message> -- <location filename="../test/system-settings/mainwindow.ui" line="55"/> -- <source>font</source> -- <translation type="unfinished"></translation> -- </message> --</context> --<context> -- <name>MessageBox</name> -- <message> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -- <source>Close</source> -- <translation>Жабуу</translation> -- </message> --</context> --<context> -- <name>QApplication</name> -- <message> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -- <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation>Аткарыла турган '%1' Qt %2 талап кылынат, Qt %3 табылган.</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -- <source>Incompatible Qt Library Error</source> -- <translation>Qt китепканасынын шайкеш келбеген катасы</translation> -- </message> --</context> --<context> -- <name>QDialogButtonBox</name> -- <message> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -- <source>OK</source> -- <translation>МАКУЛ</translation> -- </message> --</context> --<context> -- <name>QMessageBox</name> -- <message> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -- <source>Show Details...</source> -- <translation>Егжей-тегжейин</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -- <source>Hide Details...</source> -- <translation>Маалымат жашыруу...</translation> -- </message> --</context> --<context> -- <name>QObject</name> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -- <source>File Name</source> -- <translation>Файлдын аты</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -- <source>Modified Date</source> -- <translation>Өзгөртүлгөн дата</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -- <source>File Type</source> -- <translation>Файл түрү</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -- <source>File Size</source> -- <translation>Файл өлчөмү</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -- <source>Original Path</source> -- <translation>Оригиналдуу жол</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -- <source>Descending</source> -- <translation>Түшүп</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -- <source>Ascending</source> -- <translation>Көтөрүлүш</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -- <source>Use global sorting</source> -- <translation>Глобалдык сорттоону колдонуу</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -- <source>List View</source> -- <translation>Тизменин көрүнүшү</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -- <source>Icon View</source> -- <translation>Икона көрүнүшү</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -- <source>Close</source> -- <translation type="unfinished">Жабуу</translation> -- </message> --</context> --<context> -- <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -- <message> -- <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -- <source>Default Slide</source> -- <translation>Дефолт слайды</translation> -- </message> -- <message> -- <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -- <source>Let tab widget switch with a slide animation.</source> -- <translation>Таблица виджет слайд анимациясы менен которуп берсин.</translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyFileDialogHelper</name> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -- <source>Open File</source> -- <translation>Файлды ачуу</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -- <source>Save File</source> -- <translation>Файлды сактоо</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -- <source>All Files (*)</source> -- <translation>Бардык файлдар (*)</translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyNativeFileDialog</name> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -- <source>Go Back</source> -- <translation>Артка кайрыл</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -- <source>Go Forward</source> -- <translation>Алга илгерилетүү</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -- <source>Cd Up</source> -- <translation>Cd Up</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -- <source>Search</source> -- <translation>Издөө</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -- <source>View Type</source> -- <translation>Көрүү түрү</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -- <source>Sort Type</source> -- <translation>Түрүн сорттоо</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -- <source>Maximize</source> -- <translation>Максималдуу</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -- <source>Close</source> -- <translation>Жабуу</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -- <source>Restore</source> -- <translation>Калыбына келтирүү</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -- <source>Name</source> -- <translation>Аты-жөнү</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -- <source>Open</source> -- <translation>Ачуу</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -- <source>Cancel</source> -- <translation>Жокко чыгаруу</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -- <source>Save as</source> -- <translation>Үнөмдөө</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -- <source>New Folder</source> -- <translation>Жаңы папка</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -- <source>Save</source> -- <translation>Сактоо</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -- <source>Directories</source> -- <translation>Каталогдор</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -- <source>Warning</source> -- <translation>Эскертүү</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -- <source>exist, are you sure replace?</source> -- <translation>бар, сиз сөзсүз алмаштырып жатасызбы?</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -- <source>NewFolder</source> -- <translation>Жаңы папкалар</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -- <source>Undo</source> -- <translation>Ундо</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -- <source>Redo</source> -- <translation>Редо</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -- <source>warn</source> -- <translation>эскертүү</translation> -- </message> -- <message> -- <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -- <source>This operation is not supported.</source> -- <translation>Бул операция колдолбойт.</translation> -- </message> --</context> --</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0047-Added-translation-using-Weblate-Uyghur.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0047-Added-translation-using-Weblate-Uyghur.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0047-Added-translation-using-Weblate-Uyghur.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0047-Added-translation-using-Weblate-Uyghur.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,1059 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.com> -Date: Tue, 7 May 2024 20:09:55 +0800 -Subject: Added translation using Weblate (Uyghur) - ---- - translations/qt5-ukui-platformtheme_kk.ts | 361 ++++++++++++++++++++++++++++++ - translations/qt5-ukui-platformtheme_ky.ts | 361 ++++++++++++++++++++++++++++++ - translations/qt5-ukui-platformtheme_ug.ts | 92 ++++---- - 3 files changed, 768 insertions(+), 46 deletions(-) - create mode 100644 translations/qt5-ukui-platformtheme_kk.ts - create mode 100644 translations/qt5-ukui-platformtheme_ky.ts - -diff --git a/translations/qt5-ukui-platformtheme_kk.ts b/translations/qt5-ukui-platformtheme_kk.ts -new file mode 100644 -index 0000000..c37e35e ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_kk.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="kk"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_ky.ts b/translations/qt5-ukui-platformtheme_ky.ts -new file mode 100644 -index 0000000..c4f7b75 ---- /dev/null -+++ b/translations/qt5-ukui-platformtheme_ky.ts -@@ -0,0 +1,361 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="ky"> -+<context> -+ <name>MainWindow</name> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="14"/> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> -+ <location filename="../test/system-settings/mainwindow.ui" line="14"/> -+ <source>MainWindow</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="30"/> -+ <source>test open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="37"/> -+ <source>directory</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="47"/> -+ <source>selected uri</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="54"/> -+ <source>test show</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="64"/> -+ <source>test exec</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="71"/> -+ <source>test save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/filedialog/mainwindow.ui" line="78"/> -+ <source>test static open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> -+ <source>PushButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -+ <source>use auto highlight icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> -+ <source>...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -+ <source>highlightOnly</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> -+ <source>bothDefaultAndHighlight</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> -+ <source>RadioButton</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="21"/> -+ <source>style</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="31"/> -+ <source>icon</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="41"/> -+ <source>menu opacity</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../test/system-settings/mainwindow.ui" line="55"/> -+ <source>font</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> -+ <source>File Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> -+ <source>Modified Date</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> -+ <source>File Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> -+ <source>File Size</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> -+ <source>Original Path</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> -+ <source>Descending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> -+ <source>Ascending</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> -+ <source>Use global sorting</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> -+ <source>List View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> -+ <source>Icon View</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> -+ <source>Open File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -+ <source>Save File</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -+ <source>All Files (*)</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> -+ <source>Go Back</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> -+ <source>Go Forward</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -+ <source>Cd Up</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -+ <source>Search</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -+ <source>View Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> -+ <source>Sort Type</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> -+ <source>Maximize</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> -+ <source>Restore</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> -+ <source>Name</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> -+ <source>Open</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> -+ <source>Cancel</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> -+ <source>Save as</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> -+ <source>New Folder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> -+ <source>Save</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> -+ <source>Directories</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>Warning</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -+ <source>exist, are you sure replace?</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -+ <source>NewFolder</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> -+ <source>Undo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> -+ <source>Redo</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>warn</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> -+ <source>This operation is not supported.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+</TS> -diff --git a/translations/qt5-ukui-platformtheme_ug.ts b/translations/qt5-ukui-platformtheme_ug.ts -index d4bb0e8..fc6e404 100644 ---- a/translations/qt5-ukui-platformtheme_ug.ts -+++ b/translations/qt5-ukui-platformtheme_ug.ts -@@ -1,6 +1,6 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE TS> --<TS version="2.1" language="ug_CN"> -+<TS version="2.1" language="ug"> - <context> - <name>MainWindow</name> - <message> -@@ -104,7 +104,7 @@ - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> -- <translation>ياپ</translation> -+ <translation type="unfinished"></translation> - </message> - </context> - <context> -@@ -112,12 +112,12 @@ - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation>ئىجرا قىلىشقا بولىدىغان '٪1' Qt ٪2 نى تەلەپ قىلىدۇ، تېپىلغان Qt ٪3.</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> -- <translation>بىردەك بولمىغان QT ئامبىرى خاتالىقى</translation> -+ <translation type="unfinished"></translation> - </message> - </context> - <context> -@@ -126,7 +126,7 @@ - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> -- <translation>ماقۇل</translation> -+ <translation type="unfinished"></translation> - </message> - </context> - <context> -@@ -136,13 +136,13 @@ - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> -- <translation>تەپسىلاتىنى كۆرسەت...</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> -- <translation>تەپسىلاتىنى يوشۇرۇش...</translation> -+ <translation type="unfinished"></translation> - </message> - </context> - <context> -@@ -150,57 +150,57 @@ - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation>ھۆججەت نامى</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation>ئۆزگەرتىلگەن ۋاقتى</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation>ھۆججەت تۈرى</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation>ھۆججەت چوڭلۇقى</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation>ئەسلى يول</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation>پەسكە چۈشمەكتە</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation>ئۆرلەش</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation>يەر شارىنى تۈرگە ئايرىشنى ئىشلىتىش</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation>تىزىملىك كۆرۈش</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation>ئايكون كۆرۈش</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> -- <translation type="unfinished">ياپ</translation> -+ <translation type="unfinished"></translation> - </message> - </context> - <context> -@@ -208,12 +208,12 @@ - <message> - <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation>كۆڭۈلدىكى سىيرىلما</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation>سىيرىلما كارتون ئارقىلىق تاختا ۋىكىپات ئالماشتۇرسۇن.</translation> -+ <translation type="unfinished"></translation> - </message> - </context> - <context> -@@ -221,17 +221,17 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> - <source>Open File</source> -- <translation type="unfinished">ھۆججەتنى ئېچىش</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> - <source>Save File</source> -- <translation type="unfinished">ھۆججەت ساقلاش</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> - <source>All Files (*)</source> -- <translation type="unfinished">بارلىق ھۆججەتلەر (*)</translation> -+ <translation type="unfinished"></translation> - </message> - </context> - <context> -@@ -239,123 +239,123 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation type="unfinished">قايت</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation type="unfinished">ئالدىغا ماڭ</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation type="unfinished">Cd Up</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation type="unfinished">ئىزدە</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation type="unfinished">كۆرۈش تىپى</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation type="unfinished">تۈر تۈرى</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation type="unfinished">ئەڭ چوڭ چەككە</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation type="unfinished">ياپ</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation type="unfinished">ئەسلىگە كەلتۈرۈش</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation type="unfinished">ئىسىم-فامىلىسى</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation type="unfinished">ئېچىش</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation type="unfinished">ئەمەلدىن قالدۇرۇش</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation type="unfinished">تېجەش</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation type="unfinished">يېڭى ھۆججەت قىسقۇچ</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation type="unfinished">ساقلاش</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation type="unfinished">مۇندەرىجىلەر</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation type="unfinished">دىققەت</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation type="unfinished">مەۋجۇت، سىز راستىنلا ئالماشتۇرۇۋاتامسىز؟</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> - <source>NewFolder</source> -- <translation type="unfinished">يېڭى قاتلىغۇچ</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> - <source>Undo</source> -- <translation type="unfinished">Undo</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> - <source>Redo</source> -- <translation type="unfinished">قايتا-قايتا</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> - <source>warn</source> -- <translation type="unfinished">ئاگاھلاندۇرۇش</translation> -+ <translation type="unfinished"></translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> - <source>This operation is not supported.</source> -- <translation type="unfinished">بۇ مەشغۇلات قوللىمايدۇ.</translation> -+ <translation type="unfinished"></translation> - </message> - </context> - </TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0048-Deleted-translation-using-Weblate-Kyrgyz.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0048-Deleted-translation-using-Weblate-Kyrgyz.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0048-Deleted-translation-using-Weblate-Kyrgyz.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0048-Deleted-translation-using-Weblate-Kyrgyz.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,236 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.com> -Date: Tue, 7 May 2024 20:25:58 +0800 -Subject: Deleted translation using Weblate (Kyrgyz) - ---- - .../translations/qt5-ukui-platformtheme_ky.ts | 221 --------------------- - 1 file changed, 221 deletions(-) - delete mode 100644 qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts - -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts -deleted file mode 100644 -index 026c8ac..0000000 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts -+++ /dev/null -@@ -1,221 +0,0 @@ --<?xml version="1.0" encoding="utf-8"?> --<!DOCTYPE TS> --<TS version="2.1" language="ky_KG"> --<context> -- <name>MessageBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="97"/> -- <source>Close</source> -- <translation>Жабуу</translation> -- </message> --</context> --<context> -- <name>QApplication</name> -- <message> -- <location filename="../widget/messagebox/message-box.h" line="272"/> -- <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation>Аткарыла турган '%1' Qt %2 талап кылынат, Qt %3 табылган.</translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.h" line="274"/> -- <source>Incompatible Qt Library Error</source> -- <translation>Qt китепканасынын шайкеш келбеген катасы</translation> -- </message> --</context> --<context> -- <name>QDialogButtonBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="362"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1090"/> -- <source>OK</source> -- <translation>МАКУЛ</translation> -- </message> --</context> --<context> -- <name>QMessageBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="418"/> -- <location filename="../widget/messagebox/message-box.cpp" line="881"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -- <source>Show Details...</source> -- <translation>Егжей-тегжейин</translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="881"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -- <source>Hide Details...</source> -- <translation>Маалымат жашыруу...</translation> -- </message> --</context> --<context> -- <name>QObject</name> -- <message> -- <source>File Name</source> -- <translation type="vanished">Файлдын аты</translation> -- </message> -- <message> -- <source>Modified Date</source> -- <translation type="vanished">Өзгөртүлгөн дата</translation> -- </message> -- <message> -- <source>File Type</source> -- <translation type="vanished">Файл түрү</translation> -- </message> -- <message> -- <source>File Size</source> -- <translation type="vanished">Файл өлчөмү</translation> -- </message> -- <message> -- <source>Original Path</source> -- <translation type="vanished">Оригиналдуу жол</translation> -- </message> -- <message> -- <source>Descending</source> -- <translation type="vanished">Түшүп</translation> -- </message> -- <message> -- <source>Ascending</source> -- <translation type="vanished">Көтөрүлүш</translation> -- </message> -- <message> -- <source>Use global sorting</source> -- <translation type="vanished">Глобалдык сорттоону колдонуу</translation> -- </message> -- <message> -- <source>List View</source> -- <translation type="vanished">Тизменин көрүнүшү</translation> -- </message> -- <message> -- <source>Icon View</source> -- <translation type="vanished">Икона көрүнүшү</translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="730"/> -- <source>Close</source> -- <translation type="unfinished">Жабуу</translation> -- </message> --</context> --<context> -- <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -- <source>Default Slide</source> -- <translation>Дефолт слайды</translation> -- </message> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -- <source>Let tab widget switch with a slide animation.</source> -- <translation>Таблица виджет слайд анимациясы менен которуп берсин.</translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyFileDialogHelper</name> -- <message> -- <source>Open File</source> -- <translation type="vanished">Файлды ачуу</translation> -- </message> -- <message> -- <source>Save File</source> -- <translation type="vanished">Файлды сактоо</translation> -- </message> -- <message> -- <source>All Files (*)</source> -- <translation type="vanished">Бардык файлдар (*)</translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyNativeFileDialog</name> -- <message> -- <source>Go Back</source> -- <translation type="vanished">Артка кайрыл</translation> -- </message> -- <message> -- <source>Go Forward</source> -- <translation type="vanished">Алга илгерилетүү</translation> -- </message> -- <message> -- <source>Cd Up</source> -- <translation type="vanished">Cd Up</translation> -- </message> -- <message> -- <source>Search</source> -- <translation type="vanished">Издөө</translation> -- </message> -- <message> -- <source>View Type</source> -- <translation type="vanished">Көрүү түрү</translation> -- </message> -- <message> -- <source>Sort Type</source> -- <translation type="vanished">Түрүн сорттоо</translation> -- </message> -- <message> -- <source>Maximize</source> -- <translation type="vanished">Максималдуу</translation> -- </message> -- <message> -- <source>Close</source> -- <translation type="vanished">Жабуу</translation> -- </message> -- <message> -- <source>Restore</source> -- <translation type="vanished">Калыбына келтирүү</translation> -- </message> -- <message> -- <source>Name</source> -- <translation type="vanished">Аты-жөнү</translation> -- </message> -- <message> -- <source>Open</source> -- <translation type="vanished">Ачуу</translation> -- </message> -- <message> -- <source>Cancel</source> -- <translation type="vanished">Жокко чыгаруу</translation> -- </message> -- <message> -- <source>Save as</source> -- <translation type="vanished">Үнөмдөө</translation> -- </message> -- <message> -- <source>New Folder</source> -- <translation type="vanished">Жаңы папка</translation> -- </message> -- <message> -- <source>Save</source> -- <translation type="vanished">Сактоо</translation> -- </message> -- <message> -- <source>Directories</source> -- <translation type="vanished">Каталогдор</translation> -- </message> -- <message> -- <source>Warning</source> -- <translation type="vanished">Эскертүү</translation> -- </message> -- <message> -- <source>exist, are you sure replace?</source> -- <translation type="vanished">бар, сиз сөзсүз алмаштырып жатасызбы?</translation> -- </message> -- <message> -- <source>NewFolder</source> -- <translation type="vanished">Жаңы папкалар</translation> -- </message> -- <message> -- <source>Undo</source> -- <translation type="vanished">Ундо</translation> -- </message> -- <message> -- <source>Redo</source> -- <translation type="vanished">Редо</translation> -- </message> -- <message> -- <source>warn</source> -- <translation type="vanished">эскертүү</translation> -- </message> -- <message> -- <source>This operation is not supported.</source> -- <translation type="vanished">Бул операция колдолбойт.</translation> -- </message> --</context> --</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0049-Deleted-translation-using-Weblate-Kazakh.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0049-Deleted-translation-using-Weblate-Kazakh.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0049-Deleted-translation-using-Weblate-Kazakh.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0049-Deleted-translation-using-Weblate-Kazakh.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,465 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.com> -Date: Tue, 7 May 2024 20:26:19 +0800 -Subject: Deleted translation using Weblate (Kazakh) - ---- - .../translations/qt5-ukui-platformtheme_kk.ts | 221 --------------------- - .../translations/qt5-ukui-platformtheme_ug.ts | 221 --------------------- - 2 files changed, 442 deletions(-) - delete mode 100644 qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts - delete mode 100644 qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts - -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts -deleted file mode 100644 -index ef6c812..0000000 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts -+++ /dev/null -@@ -1,221 +0,0 @@ --<?xml version="1.0" encoding="utf-8"?> --<!DOCTYPE TS> --<TS version="2.1" language="kk_KZ"> --<context> -- <name>MessageBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="97"/> -- <source>Close</source> -- <translation>Жабу</translation> -- </message> --</context> --<context> -- <name>QApplication</name> -- <message> -- <location filename="../widget/messagebox/message-box.h" line="272"/> -- <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation>Орындалатын '% 1' Qt% 2 дегенді қажет етеді, табылған Qt% 3.</translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.h" line="274"/> -- <source>Incompatible Qt Library Error</source> -- <translation>Үйлеспейтін Qt кітапхана қатесі</translation> -- </message> --</context> --<context> -- <name>QDialogButtonBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="362"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1090"/> -- <source>OK</source> -- <translation>ЖАҚСЫ</translation> -- </message> --</context> --<context> -- <name>QMessageBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="418"/> -- <location filename="../widget/messagebox/message-box.cpp" line="881"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -- <source>Show Details...</source> -- <translation>Егжей-тегжейін көрсету...</translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="881"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -- <source>Hide Details...</source> -- <translation>Мәліметтерді жасыру...</translation> -- </message> --</context> --<context> -- <name>QObject</name> -- <message> -- <source>File Name</source> -- <translation type="vanished">Файл атауы</translation> -- </message> -- <message> -- <source>Modified Date</source> -- <translation type="vanished">Өзгертілген күн</translation> -- </message> -- <message> -- <source>File Type</source> -- <translation type="vanished">Файл түрі</translation> -- </message> -- <message> -- <source>File Size</source> -- <translation type="vanished">Файл өлшемі</translation> -- </message> -- <message> -- <source>Original Path</source> -- <translation type="vanished">Бастапқы жол</translation> -- </message> -- <message> -- <source>Descending</source> -- <translation type="vanished">Кему</translation> -- </message> -- <message> -- <source>Ascending</source> -- <translation type="vanished">Көтерілу</translation> -- </message> -- <message> -- <source>Use global sorting</source> -- <translation type="vanished">Ғаламдық сұрыптауды пайдалану</translation> -- </message> -- <message> -- <source>List View</source> -- <translation type="vanished">Тізім көрінісі</translation> -- </message> -- <message> -- <source>Icon View</source> -- <translation type="vanished">Белгіше көрінісі</translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="730"/> -- <source>Close</source> -- <translation type="unfinished">Жабу</translation> -- </message> --</context> --<context> -- <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -- <source>Default Slide</source> -- <translation>Әдетті слайд</translation> -- </message> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -- <source>Let tab widget switch with a slide animation.</source> -- <translation>Слайд анимациясы бар tab widget ауыстырып қосқышына рұқсат етіңіз.</translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyFileDialogHelper</name> -- <message> -- <source>Open File</source> -- <translation type="vanished">Файлды ашу</translation> -- </message> -- <message> -- <source>Save File</source> -- <translation type="vanished">Файлды сақтау</translation> -- </message> -- <message> -- <source>All Files (*)</source> -- <translation type="vanished">Барлық файлдар (*)</translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyNativeFileDialog</name> -- <message> -- <source>Go Back</source> -- <translation type="vanished">Қайтып бар</translation> -- </message> -- <message> -- <source>Go Forward</source> -- <translation type="vanished">Алға жылжу</translation> -- </message> -- <message> -- <source>Cd Up</source> -- <translation type="vanished">Cd Up</translation> -- </message> -- <message> -- <source>Search</source> -- <translation type="vanished">Іздеу</translation> -- </message> -- <message> -- <source>View Type</source> -- <translation type="vanished">Көрініс түрі</translation> -- </message> -- <message> -- <source>Sort Type</source> -- <translation type="vanished">Сұрыптау түрі</translation> -- </message> -- <message> -- <source>Maximize</source> -- <translation type="vanished">Барынша көбейту</translation> -- </message> -- <message> -- <source>Close</source> -- <translation type="vanished">Жабу</translation> -- </message> -- <message> -- <source>Restore</source> -- <translation type="vanished">Қалпына келтіру</translation> -- </message> -- <message> -- <source>Name</source> -- <translation type="vanished">Атауы</translation> -- </message> -- <message> -- <source>Open</source> -- <translation type="vanished">Ашу</translation> -- </message> -- <message> -- <source>Cancel</source> -- <translation type="vanished">Болдырмау</translation> -- </message> -- <message> -- <source>Save as</source> -- <translation type="vanished">Басқаша сақтау</translation> -- </message> -- <message> -- <source>New Folder</source> -- <translation type="vanished">Жаңа қапшық</translation> -- </message> -- <message> -- <source>Save</source> -- <translation type="vanished">Сақтау</translation> -- </message> -- <message> -- <source>Directories</source> -- <translation type="vanished">Каталогтар</translation> -- </message> -- <message> -- <source>Warning</source> -- <translation type="vanished">Ескерту</translation> -- </message> -- <message> -- <source>exist, are you sure replace?</source> -- <translation type="vanished">бар, сіз алмастырасыз ба?</translation> -- </message> -- <message> -- <source>NewFolder</source> -- <translation type="vanished">NewFolder</translation> -- </message> -- <message> -- <source>Undo</source> -- <translation type="vanished">Болдырмау</translation> -- </message> -- <message> -- <source>Redo</source> -- <translation type="vanished">Редо</translation> -- </message> -- <message> -- <source>warn</source> -- <translation type="vanished">Ескерту</translation> -- </message> -- <message> -- <source>This operation is not supported.</source> -- <translation type="vanished">Бұл операцияға қолдау көрсетілмеген.</translation> -- </message> --</context> --</TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts -deleted file mode 100644 -index 712e12a..0000000 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts -+++ /dev/null -@@ -1,221 +0,0 @@ --<?xml version="1.0" encoding="utf-8"?> --<!DOCTYPE TS> --<TS version="2.1" language="ug_CN"> --<context> -- <name>MessageBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="97"/> -- <source>Close</source> -- <translation>ياپ</translation> -- </message> --</context> --<context> -- <name>QApplication</name> -- <message> -- <location filename="../widget/messagebox/message-box.h" line="272"/> -- <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation>ئىجرا قىلىشقا بولىدىغان '٪1' Qt ٪2 نى تەلەپ قىلىدۇ، تېپىلغان Qt ٪3.</translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.h" line="274"/> -- <source>Incompatible Qt Library Error</source> -- <translation>بىردەك بولمىغان QT ئامبىرى خاتالىقى</translation> -- </message> --</context> --<context> -- <name>QDialogButtonBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="362"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1090"/> -- <source>OK</source> -- <translation>ماقۇل</translation> -- </message> --</context> --<context> -- <name>QMessageBox</name> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="418"/> -- <location filename="../widget/messagebox/message-box.cpp" line="881"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -- <source>Show Details...</source> -- <translation>تەپسىلاتىنى كۆرسەت...</translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="881"/> -- <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -- <source>Hide Details...</source> -- <translation>تەپسىلاتىنى يوشۇرۇش...</translation> -- </message> --</context> --<context> -- <name>QObject</name> -- <message> -- <source>File Name</source> -- <translation type="vanished">ھۆججەت نامى</translation> -- </message> -- <message> -- <source>Modified Date</source> -- <translation type="vanished">ئۆزگەرتىلگەن ۋاقتى</translation> -- </message> -- <message> -- <source>File Type</source> -- <translation type="vanished">ھۆججەت تۈرى</translation> -- </message> -- <message> -- <source>File Size</source> -- <translation type="vanished">ھۆججەت چوڭلۇقى</translation> -- </message> -- <message> -- <source>Original Path</source> -- <translation type="vanished">ئەسلى يول</translation> -- </message> -- <message> -- <source>Descending</source> -- <translation type="vanished">پەسكە چۈشمەكتە</translation> -- </message> -- <message> -- <source>Ascending</source> -- <translation type="vanished">ئۆرلەش</translation> -- </message> -- <message> -- <source>Use global sorting</source> -- <translation type="vanished">يەر شارىنى تۈرگە ئايرىشنى ئىشلىتىش</translation> -- </message> -- <message> -- <source>List View</source> -- <translation type="vanished">تىزىملىك كۆرۈش</translation> -- </message> -- <message> -- <source>Icon View</source> -- <translation type="vanished">ئايكون كۆرۈش</translation> -- </message> -- <message> -- <location filename="../widget/messagebox/message-box.cpp" line="730"/> -- <source>Close</source> -- <translation type="unfinished">ياپ</translation> -- </message> --</context> --<context> -- <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -- <source>Default Slide</source> -- <translation>كۆڭۈلدىكى سىيرىلما</translation> -- </message> -- <message> -- <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -- <source>Let tab widget switch with a slide animation.</source> -- <translation>سىيرىلما كارتون ئارقىلىق تاختا ۋىكىپات ئالماشتۇرسۇن.</translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyFileDialogHelper</name> -- <message> -- <source>Open File</source> -- <translation type="obsolete">ھۆججەتنى ئېچىش</translation> -- </message> -- <message> -- <source>Save File</source> -- <translation type="obsolete">ھۆججەت ساقلاش</translation> -- </message> -- <message> -- <source>All Files (*)</source> -- <translation type="obsolete">بارلىق ھۆججەتلەر (*)</translation> -- </message> --</context> --<context> -- <name>UKUIFileDialog::KyNativeFileDialog</name> -- <message> -- <source>Go Back</source> -- <translation type="obsolete">قايت</translation> -- </message> -- <message> -- <source>Go Forward</source> -- <translation type="obsolete">ئالدىغا ماڭ</translation> -- </message> -- <message> -- <source>Cd Up</source> -- <translation type="obsolete">Cd Up</translation> -- </message> -- <message> -- <source>Search</source> -- <translation type="obsolete">ئىزدە</translation> -- </message> -- <message> -- <source>View Type</source> -- <translation type="obsolete">كۆرۈش تىپى</translation> -- </message> -- <message> -- <source>Sort Type</source> -- <translation type="obsolete">تۈر تۈرى</translation> -- </message> -- <message> -- <source>Maximize</source> -- <translation type="obsolete">ئەڭ چوڭ چەككە</translation> -- </message> -- <message> -- <source>Close</source> -- <translation type="obsolete">ياپ</translation> -- </message> -- <message> -- <source>Restore</source> -- <translation type="obsolete">ئەسلىگە كەلتۈرۈش</translation> -- </message> -- <message> -- <source>Name</source> -- <translation type="obsolete">ئىسىم-فامىلىسى</translation> -- </message> -- <message> -- <source>Open</source> -- <translation type="obsolete">ئېچىش</translation> -- </message> -- <message> -- <source>Cancel</source> -- <translation type="obsolete">ئەمەلدىن قالدۇرۇش</translation> -- </message> -- <message> -- <source>Save as</source> -- <translation type="obsolete">تېجەش</translation> -- </message> -- <message> -- <source>New Folder</source> -- <translation type="obsolete">يېڭى ھۆججەت قىسقۇچ</translation> -- </message> -- <message> -- <source>Save</source> -- <translation type="obsolete">ساقلاش</translation> -- </message> -- <message> -- <source>Directories</source> -- <translation type="obsolete">مۇندەرىجىلەر</translation> -- </message> -- <message> -- <source>Warning</source> -- <translation type="obsolete">دىققەت</translation> -- </message> -- <message> -- <source>exist, are you sure replace?</source> -- <translation type="obsolete">مەۋجۇت، سىز راستىنلا ئالماشتۇرۇۋاتامسىز؟</translation> -- </message> -- <message> -- <source>NewFolder</source> -- <translation type="obsolete">يېڭى قاتلىغۇچ</translation> -- </message> -- <message> -- <source>Undo</source> -- <translation type="obsolete">Undo</translation> -- </message> -- <message> -- <source>Redo</source> -- <translation type="obsolete">قايتا-قايتا</translation> -- </message> -- <message> -- <source>warn</source> -- <translation type="obsolete">ئاگاھلاندۇرۇش</translation> -- </message> -- <message> -- <source>This operation is not supported.</source> -- <translation type="obsolete">بۇ مەشغۇلات قوللىمايدۇ.</translation> -- </message> --</context> --</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0050-Added-translation-using-Weblate-Uyghur.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0050-Added-translation-using-Weblate-Uyghur.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0050-Added-translation-using-Weblate-Uyghur.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0050-Added-translation-using-Weblate-Uyghur.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,694 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.com> -Date: Tue, 7 May 2024 20:26:52 +0800 -Subject: Added translation using Weblate (Uyghur) - ---- - .../translations/qt5-ukui-platformtheme_kk.ts | 221 +++++++++++++++++++++ - .../translations/qt5-ukui-platformtheme_ky.ts | 221 +++++++++++++++++++++ - .../translations/qt5-ukui-platformtheme_ug.ts | 221 +++++++++++++++++++++ - 3 files changed, 663 insertions(+) - create mode 100644 qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts - create mode 100644 qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts - create mode 100644 qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts - -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts -new file mode 100644 -index 0000000..a76f5af ---- /dev/null -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts -@@ -0,0 +1,221 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="kk"> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <source>File Name</source> -+ <translation type="vanished">文件名称</translation> -+ </message> -+ <message> -+ <source>Modified Date</source> -+ <translation type="vanished">修改日期</translation> -+ </message> -+ <message> -+ <source>File Type</source> -+ <translation type="vanished">文件类型</translation> -+ </message> -+ <message> -+ <source>File Size</source> -+ <translation type="vanished">文件大小</translation> -+ </message> -+ <message> -+ <source>Original Path</source> -+ <translation type="vanished">原始路径</translation> -+ </message> -+ <message> -+ <source>Descending</source> -+ <translation type="vanished">降序</translation> -+ </message> -+ <message> -+ <source>Ascending</source> -+ <translation type="vanished">升序</translation> -+ </message> -+ <message> -+ <source>Use global sorting</source> -+ <translation type="vanished">使用全局排序</translation> -+ </message> -+ <message> -+ <source>List View</source> -+ <translation type="vanished">列表视图</translation> -+ </message> -+ <message> -+ <source>Icon View</source> -+ <translation type="vanished">图标视图</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <source>Open File</source> -+ <translation type="vanished">打开</translation> -+ </message> -+ <message> -+ <source>Save File</source> -+ <translation type="vanished">保存</translation> -+ </message> -+ <message> -+ <source>All Files (*)</source> -+ <translation type="vanished">所有(*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <source>Go Back</source> -+ <translation type="vanished">后退</translation> -+ </message> -+ <message> -+ <source>Go Forward</source> -+ <translation type="vanished">前进</translation> -+ </message> -+ <message> -+ <source>Cd Up</source> -+ <translation type="vanished">向上</translation> -+ </message> -+ <message> -+ <source>Search</source> -+ <translation type="vanished">搜索</translation> -+ </message> -+ <message> -+ <source>View Type</source> -+ <translation type="vanished">视图类型</translation> -+ </message> -+ <message> -+ <source>Sort Type</source> -+ <translation type="vanished">排序类型</translation> -+ </message> -+ <message> -+ <source>Maximize</source> -+ <translation type="vanished">最大化</translation> -+ </message> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">关闭</translation> -+ </message> -+ <message> -+ <source>Restore</source> -+ <translation type="vanished">还原</translation> -+ </message> -+ <message> -+ <source>Name</source> -+ <translation type="vanished">文件名</translation> -+ </message> -+ <message> -+ <source>Open</source> -+ <translation type="vanished">打开</translation> -+ </message> -+ <message> -+ <source>Cancel</source> -+ <translation type="vanished">取消</translation> -+ </message> -+ <message> -+ <source>Save as</source> -+ <translation type="vanished">另存为</translation> -+ </message> -+ <message> -+ <source>New Folder</source> -+ <translation type="vanished">新建文件夹</translation> -+ </message> -+ <message> -+ <source>Save</source> -+ <translation type="vanished">保存</translation> -+ </message> -+ <message> -+ <source>Directories</source> -+ <translation type="vanished">目录</translation> -+ </message> -+ <message> -+ <source>Warning</source> -+ <translation type="vanished">警告</translation> -+ </message> -+ <message> -+ <source>exist, are you sure replace?</source> -+ <translation type="vanished">已存在,是否替换?</translation> -+ </message> -+ <message> -+ <source>NewFolder</source> -+ <translation type="vanished">新建文件夹</translation> -+ </message> -+ <message> -+ <source>Undo</source> -+ <translation type="vanished">撤销</translation> -+ </message> -+ <message> -+ <source>Redo</source> -+ <translation type="vanished">重做</translation> -+ </message> -+ <message> -+ <source>warn</source> -+ <translation type="vanished">警告</translation> -+ </message> -+ <message> -+ <source>This operation is not supported.</source> -+ <translation type="vanished">不支持此操作。</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts -new file mode 100644 -index 0000000..0de3104 ---- /dev/null -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts -@@ -0,0 +1,221 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="ky"> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <source>File Name</source> -+ <translation type="vanished">文件名称</translation> -+ </message> -+ <message> -+ <source>Modified Date</source> -+ <translation type="vanished">修改日期</translation> -+ </message> -+ <message> -+ <source>File Type</source> -+ <translation type="vanished">文件类型</translation> -+ </message> -+ <message> -+ <source>File Size</source> -+ <translation type="vanished">文件大小</translation> -+ </message> -+ <message> -+ <source>Original Path</source> -+ <translation type="vanished">原始路径</translation> -+ </message> -+ <message> -+ <source>Descending</source> -+ <translation type="vanished">降序</translation> -+ </message> -+ <message> -+ <source>Ascending</source> -+ <translation type="vanished">升序</translation> -+ </message> -+ <message> -+ <source>Use global sorting</source> -+ <translation type="vanished">使用全局排序</translation> -+ </message> -+ <message> -+ <source>List View</source> -+ <translation type="vanished">列表视图</translation> -+ </message> -+ <message> -+ <source>Icon View</source> -+ <translation type="vanished">图标视图</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <source>Open File</source> -+ <translation type="vanished">打开</translation> -+ </message> -+ <message> -+ <source>Save File</source> -+ <translation type="vanished">保存</translation> -+ </message> -+ <message> -+ <source>All Files (*)</source> -+ <translation type="vanished">所有(*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <source>Go Back</source> -+ <translation type="vanished">后退</translation> -+ </message> -+ <message> -+ <source>Go Forward</source> -+ <translation type="vanished">前进</translation> -+ </message> -+ <message> -+ <source>Cd Up</source> -+ <translation type="vanished">向上</translation> -+ </message> -+ <message> -+ <source>Search</source> -+ <translation type="vanished">搜索</translation> -+ </message> -+ <message> -+ <source>View Type</source> -+ <translation type="vanished">视图类型</translation> -+ </message> -+ <message> -+ <source>Sort Type</source> -+ <translation type="vanished">排序类型</translation> -+ </message> -+ <message> -+ <source>Maximize</source> -+ <translation type="vanished">最大化</translation> -+ </message> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">关闭</translation> -+ </message> -+ <message> -+ <source>Restore</source> -+ <translation type="vanished">还原</translation> -+ </message> -+ <message> -+ <source>Name</source> -+ <translation type="vanished">文件名</translation> -+ </message> -+ <message> -+ <source>Open</source> -+ <translation type="vanished">打开</translation> -+ </message> -+ <message> -+ <source>Cancel</source> -+ <translation type="vanished">取消</translation> -+ </message> -+ <message> -+ <source>Save as</source> -+ <translation type="vanished">另存为</translation> -+ </message> -+ <message> -+ <source>New Folder</source> -+ <translation type="vanished">新建文件夹</translation> -+ </message> -+ <message> -+ <source>Save</source> -+ <translation type="vanished">保存</translation> -+ </message> -+ <message> -+ <source>Directories</source> -+ <translation type="vanished">目录</translation> -+ </message> -+ <message> -+ <source>Warning</source> -+ <translation type="vanished">警告</translation> -+ </message> -+ <message> -+ <source>exist, are you sure replace?</source> -+ <translation type="vanished">已存在,是否替换?</translation> -+ </message> -+ <message> -+ <source>NewFolder</source> -+ <translation type="vanished">新建文件夹</translation> -+ </message> -+ <message> -+ <source>Undo</source> -+ <translation type="vanished">撤销</translation> -+ </message> -+ <message> -+ <source>Redo</source> -+ <translation type="vanished">重做</translation> -+ </message> -+ <message> -+ <source>warn</source> -+ <translation type="vanished">警告</translation> -+ </message> -+ <message> -+ <source>This operation is not supported.</source> -+ <translation type="vanished">不支持此操作。</translation> -+ </message> -+</context> -+</TS> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts -new file mode 100644 -index 0000000..0c6496e ---- /dev/null -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts -@@ -0,0 +1,221 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<!DOCTYPE TS> -+<TS version="2.1" language="ug"> -+<context> -+ <name>MessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="97"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QApplication</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="272"/> -+ <source>Executable '%1' requires Qt %2, found Qt %3.</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.h" line="274"/> -+ <source>Incompatible Qt Library Error</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QDialogButtonBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="362"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1090"/> -+ <source>OK</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QMessageBox</name> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="418"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Show Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="881"/> -+ <location filename="../widget/messagebox/message-box.cpp" line="1517"/> -+ <source>Hide Details...</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>QObject</name> -+ <message> -+ <source>File Name</source> -+ <translation type="vanished">文件名称</translation> -+ </message> -+ <message> -+ <source>Modified Date</source> -+ <translation type="vanished">修改日期</translation> -+ </message> -+ <message> -+ <source>File Type</source> -+ <translation type="vanished">文件类型</translation> -+ </message> -+ <message> -+ <source>File Size</source> -+ <translation type="vanished">文件大小</translation> -+ </message> -+ <message> -+ <source>Original Path</source> -+ <translation type="vanished">原始路径</translation> -+ </message> -+ <message> -+ <source>Descending</source> -+ <translation type="vanished">降序</translation> -+ </message> -+ <message> -+ <source>Ascending</source> -+ <translation type="vanished">升序</translation> -+ </message> -+ <message> -+ <source>Use global sorting</source> -+ <translation type="vanished">使用全局排序</translation> -+ </message> -+ <message> -+ <source>List View</source> -+ <translation type="vanished">列表视图</translation> -+ </message> -+ <message> -+ <source>Icon View</source> -+ <translation type="vanished">图标视图</translation> -+ </message> -+ <message> -+ <location filename="../widget/messagebox/message-box.cpp" line="730"/> -+ <source>Close</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> -+ <source>Default Slide</source> -+ <translation type="unfinished"></translation> -+ </message> -+ <message> -+ <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> -+ <source>Let tab widget switch with a slide animation.</source> -+ <translation type="unfinished"></translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyFileDialogHelper</name> -+ <message> -+ <source>Open File</source> -+ <translation type="vanished">打开</translation> -+ </message> -+ <message> -+ <source>Save File</source> -+ <translation type="vanished">保存</translation> -+ </message> -+ <message> -+ <source>All Files (*)</source> -+ <translation type="vanished">所有(*)</translation> -+ </message> -+</context> -+<context> -+ <name>UKUIFileDialog::KyNativeFileDialog</name> -+ <message> -+ <source>Go Back</source> -+ <translation type="vanished">后退</translation> -+ </message> -+ <message> -+ <source>Go Forward</source> -+ <translation type="vanished">前进</translation> -+ </message> -+ <message> -+ <source>Cd Up</source> -+ <translation type="vanished">向上</translation> -+ </message> -+ <message> -+ <source>Search</source> -+ <translation type="vanished">搜索</translation> -+ </message> -+ <message> -+ <source>View Type</source> -+ <translation type="vanished">视图类型</translation> -+ </message> -+ <message> -+ <source>Sort Type</source> -+ <translation type="vanished">排序类型</translation> -+ </message> -+ <message> -+ <source>Maximize</source> -+ <translation type="vanished">最大化</translation> -+ </message> -+ <message> -+ <source>Close</source> -+ <translation type="vanished">关闭</translation> -+ </message> -+ <message> -+ <source>Restore</source> -+ <translation type="vanished">还原</translation> -+ </message> -+ <message> -+ <source>Name</source> -+ <translation type="vanished">文件名</translation> -+ </message> -+ <message> -+ <source>Open</source> -+ <translation type="vanished">打开</translation> -+ </message> -+ <message> -+ <source>Cancel</source> -+ <translation type="vanished">取消</translation> -+ </message> -+ <message> -+ <source>Save as</source> -+ <translation type="vanished">另存为</translation> -+ </message> -+ <message> -+ <source>New Folder</source> -+ <translation type="vanished">新建文件夹</translation> -+ </message> -+ <message> -+ <source>Save</source> -+ <translation type="vanished">保存</translation> -+ </message> -+ <message> -+ <source>Directories</source> -+ <translation type="vanished">目录</translation> -+ </message> -+ <message> -+ <source>Warning</source> -+ <translation type="vanished">警告</translation> -+ </message> -+ <message> -+ <source>exist, are you sure replace?</source> -+ <translation type="vanished">已存在,是否替换?</translation> -+ </message> -+ <message> -+ <source>NewFolder</source> -+ <translation type="vanished">新建文件夹</translation> -+ </message> -+ <message> -+ <source>Undo</source> -+ <translation type="vanished">撤销</translation> -+ </message> -+ <message> -+ <source>Redo</source> -+ <translation type="vanished">重做</translation> -+ </message> -+ <message> -+ <source>warn</source> -+ <translation type="vanished">警告</translation> -+ </message> -+ <message> -+ <source>This operation is not supported.</source> -+ <translation type="vanished">不支持此操作。</translation> -+ </message> -+</context> -+</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0051-Translated-using-Weblate-Uyghur.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0051-Translated-using-Weblate-Uyghur.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0051-Translated-using-Weblate-Uyghur.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0051-Translated-using-Weblate-Uyghur.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,89 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.com> -Date: Tue, 21 May 2024 03:06:15 +0000 -Subject: Translated using Weblate (Uyghur) - -Currently translated at 100.0% (9 of 9 strings) - -Translation: openkylin-nile-new/qt5-ukui-platformtheme-qt5 -Translate-URL: http://weblate.openkylin.top/projects/openkylin-nile-new/qt5-ukui-platformtheme-qt5/ug/ ---- - .../translations/qt5-ukui-platformtheme_ug.ts | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts -index 0c6496e..66652c0 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts -@@ -6,7 +6,7 @@ - <message> - <location filename="../widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>تاقاش</translation> - </message> - </context> - <context> -@@ -14,12 +14,12 @@ - <message> - <location filename="../widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="unfinished"></translation> -+ <translation>ئىجرا قىلىشقا بولىدىغان ھۆججەت 1، ئىھتىياجلىق سان 2، ئىزدەپ تاپقان سان 3</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> -- <translation type="unfinished"></translation> -+ <translation>سىغىشمىغانQT ئامبىرىدا خاتالىق كۆرۈلدى</translation> - </message> - </context> - <context> -@@ -28,7 +28,7 @@ - <location filename="../widget/messagebox/message-box.cpp" line="362"/> - <location filename="../widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> -- <translation type="unfinished"></translation> -+ <translation>ماقۇل</translation> - </message> - </context> - <context> -@@ -38,13 +38,13 @@ - <location filename="../widget/messagebox/message-box.cpp" line="881"/> - <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> -- <translation type="unfinished"></translation> -+ <translation>تەپسىلاتىنى كۆرسىتىش</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="881"/> - <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> -- <translation type="unfinished"></translation> -+ <translation>تەپسىلاتىنى يوشۇرۇش</translation> - </message> - </context> - <context> -@@ -92,7 +92,7 @@ - <message> - <location filename="../widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>تاقاش</translation> - </message> - </context> - <context> -@@ -100,12 +100,12 @@ - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation type="unfinished"></translation> -+ <translation>ئالدىن بىكىتىلگەن slide</translation> - </message> - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -+ <translation>تاللانما كارتىدىكى كىچىك زاپچاسلارنى پرويېكسىيە كارتون فىلىمىگە ئالماشتۇرۇش</translation> - </message> - </context> - <context> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0052-Translated-using-Weblate-Uyghur.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0052-Translated-using-Weblate-Uyghur.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0052-Translated-using-Weblate-Uyghur.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0052-Translated-using-Weblate-Uyghur.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,328 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.com> -Date: Tue, 21 May 2024 03:06:56 +0000 -Subject: Translated using Weblate (Uyghur) - -Currently translated at 68.2% (43 of 63 strings) - -Translation: openkylin-nile-new/qt5-ukui-platformtheme -Translate-URL: http://weblate.openkylin.top/projects/openkylin-nile-new/qt5-ukui-platformtheme/ug/ ---- - translations/qt5-ukui-platformtheme_ug.ts | 86 +++++++++++++++---------------- - 1 file changed, 43 insertions(+), 43 deletions(-) - -diff --git a/translations/qt5-ukui-platformtheme_ug.ts b/translations/qt5-ukui-platformtheme_ug.ts -index fc6e404..9f1e357 100644 ---- a/translations/qt5-ukui-platformtheme_ug.ts -+++ b/translations/qt5-ukui-platformtheme_ug.ts -@@ -9,7 +9,7 @@ - <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> - <location filename="../test/system-settings/mainwindow.ui" line="14"/> - <source>MainWindow</source> -- <translation type="unfinished"></translation> -+ <translation>MainWindow</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="30"/> -@@ -19,7 +19,7 @@ - <message> - <location filename="../test/filedialog/mainwindow.ui" line="37"/> - <source>directory</source> -- <translation type="unfinished"></translation> -+ <translation>مۇندەرىجە</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="47"/> -@@ -50,7 +50,7 @@ - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> - <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> - <source>PushButton</source> -- <translation type="unfinished"></translation> -+ <translation>PushButton</translation> - </message> - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> -@@ -61,7 +61,7 @@ - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> - <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> - <source>...</source> -- <translation type="unfinished"></translation> -+ <translation>...</translation> - </message> - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> -@@ -104,7 +104,7 @@ - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>تاقاش</translation> - </message> - </context> - <context> -@@ -112,12 +112,12 @@ - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="unfinished"></translation> -+ <translation>ئىجرا قىلىشقا بولىدىغان ھۆججەت 1، ئىھتىياجلىق سان 2، ئىزدەپ تاپقان سان 3</translation> - </message> - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> -- <translation type="unfinished"></translation> -+ <translation>سىغىشمىغانQT ئامبىرىدا خاتالىق كۆرۈلدى</translation> - </message> - </context> - <context> -@@ -126,7 +126,7 @@ - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> -- <translation type="unfinished"></translation> -+ <translation>ماقۇل</translation> - </message> - </context> - <context> -@@ -136,13 +136,13 @@ - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> -- <translation type="unfinished"></translation> -+ <translation>تەپسىلاتىنى كۆرسىتىش</translation> - </message> - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> -- <translation type="unfinished"></translation> -+ <translation>تەپسىلاتىنى يوشۇرۇش</translation> - </message> - </context> - <context> -@@ -150,57 +150,57 @@ - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation type="unfinished"></translation> -+ <translation>ھۆججەت نامى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation type="unfinished"></translation> -+ <translation>ئۆزگەرتىلگەن ۋاقتى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation type="unfinished"></translation> -+ <translation>ھۆججەت تۈرى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation type="unfinished"></translation> -+ <translation>ھۆججەت چوڭلۇقى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation type="unfinished"></translation> -+ <translation>ئەسلى يول</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation type="unfinished"></translation> -+ <translation>چوڭدىن كىچىككە قارىتىپ تىزىش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation type="unfinished"></translation> -+ <translation>كىچىكتىن چوڭغا قارىتىپ تىزىش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation type="unfinished"></translation> -+ <translation>ئومومىيلىق بىلەن تىزىشنى ئىشلىتىش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation type="unfinished"></translation> -+ <translation>تىزىملىك كۆرۈنۈشى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation type="unfinished"></translation> -+ <translation>شەكىل كۆرۈنۈشى</translation> - </message> - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>تاقاش</translation> - </message> - </context> - <context> -@@ -208,12 +208,12 @@ - <message> - <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation type="unfinished"></translation> -+ <translation>ئالدىن بىكىتىلگەن slide</translation> - </message> - <message> - <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -+ <translation>تاللانما كارتىدىكى كىچىك زاپچاسلارنى پرويېكسىيە كارتون فىلىمىگە ئالماشتۇرۇش</translation> - </message> - </context> - <context> -@@ -221,7 +221,7 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> - <source>Open File</source> -- <translation type="unfinished"></translation> -+ <translation>ھۆججەتنى ئېچىش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> -@@ -231,7 +231,7 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> - <source>All Files (*)</source> -- <translation type="unfinished"></translation> -+ <translation>بارلىق ھۆججەتلەر (*)</translation> - </message> - </context> - <context> -@@ -239,12 +239,12 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation type="unfinished"></translation> -+ <translation>قايت</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation type="unfinished"></translation> -+ <translation>ئالدىغا ماڭ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> -@@ -254,7 +254,7 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation type="unfinished"></translation> -+ <translation>ئىزدە</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> -@@ -270,62 +270,62 @@ - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation type="unfinished"></translation> -+ <translation>چوڭايتىش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>تاقاش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation type="unfinished"></translation> -+ <translation>ئەسلىگە كەلتۈرۈش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation type="unfinished"></translation> -+ <translation>ئىسىم-فامىلىسى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation type="unfinished"></translation> -+ <translation>ئېچىش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation type="unfinished"></translation> -+ <translation>ئەمەلدىن قالدۇرۇش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation type="unfinished"></translation> -+ <translation>تېجەش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation type="unfinished"></translation> -+ <translation>يېڭى ھۆججەت قىسقۇچ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation type="unfinished"></translation> -+ <translation>ساقلاش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation type="unfinished"></translation> -+ <translation>مۇندەرىجىلەر</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation type="unfinished"></translation> -+ <translation>ئاگاھلاندۇرۇش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> -@@ -335,22 +335,22 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> - <source>NewFolder</source> -- <translation type="unfinished"></translation> -+ <translation>يېڭى قاتلىغۇچ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> - <source>Undo</source> -- <translation type="unfinished"></translation> -+ <translation>Undo</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> - <source>Redo</source> -- <translation type="unfinished"></translation> -+ <translation>قايتا-قايتا</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> - <source>warn</source> -- <translation type="unfinished"></translation> -+ <translation>ئاگاھلاندۇرۇش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0053-Translated-using-Weblate-Uyghur.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0053-Translated-using-Weblate-Uyghur.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0053-Translated-using-Weblate-Uyghur.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0053-Translated-using-Weblate-Uyghur.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,237 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.com> -Date: Tue, 21 May 2024 03:07:20 +0000 -Subject: Translated using Weblate (Uyghur) - -Currently translated at 84.2% (32 of 38 strings) - -Translation: openkylin-nile-new/qt5-ukui-filedialog -Translate-URL: http://weblate.openkylin.top/projects/openkylin-nile-new/qt5-ukui-filedialog/ug/ ---- - .../translations/qt5-ukui-filedialog_ug.ts | 64 +++++++++++----------- - 1 file changed, 32 insertions(+), 32 deletions(-) - -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts -index ed3ef51..402bb69 100644 ---- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts -@@ -42,52 +42,52 @@ - <message> - <location filename="../ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation type="unfinished"></translation> -+ <translation>ھۆججەت نامى</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation type="unfinished"></translation> -+ <translation>ئۆزگەرتىلگەن ۋاقتى</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation type="unfinished"></translation> -+ <translation>ھۆججەت تۈرى</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation type="unfinished"></translation> -+ <translation>ھۆججەت چوڭلۇقى</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation type="unfinished"></translation> -+ <translation>ئەسلى يول</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation type="unfinished"></translation> -+ <translation>چوڭدىن كىچىككە قارىتىپ تىزىش</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation type="unfinished"></translation> -+ <translation>كىچىكتىن چوڭغا قارىتىپ تىزىش</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation type="unfinished"></translation> -+ <translation>ئومومىيلىق بىلەن تىزىشنى ئىشلىتىش</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation type="unfinished"></translation> -+ <translation>تىزىملىك كۆرۈنۈشى</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation type="unfinished"></translation> -+ <translation>شەكىل كۆرۈنۈشى</translation> - </message> - <message> - <source>Close</source> -@@ -99,12 +99,12 @@ - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation type="unfinished"></translation> -+ <translation>ئالدىن بىكىتىلگەن slide</translation> - </message> - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -+ <translation>تاللانما كارتىدىكى كىچىك زاپچاسلارنى پرويېكسىيە كارتون فىلىمىگە ئالماشتۇرۇش</translation> - </message> - </context> - <context> -@@ -112,7 +112,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="2715"/> - <source>Open File</source> -- <translation type="unfinished"></translation> -+ <translation>ھۆججەتنى ئېچىش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2716"/> -@@ -122,7 +122,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="2729"/> - <source>All Files (*)</source> -- <translation type="unfinished"></translation> -+ <translation>بارلىق ھۆججەتلەر (*)</translation> - </message> - </context> - <context> -@@ -130,12 +130,12 @@ - <message> - <location filename="../kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation type="unfinished"></translation> -+ <translation>قايت</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation type="unfinished"></translation> -+ <translation>ئالدىغا ماڭ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="234"/> -@@ -145,7 +145,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation type="unfinished"></translation> -+ <translation>ئىزدە</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="249"/> -@@ -161,62 +161,62 @@ - <location filename="../kyfiledialog.cpp" line="265"/> - <location filename="../kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation type="unfinished"></translation> -+ <translation>چوڭايتىش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>تاقاش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation type="unfinished"></translation> -+ <translation>ئەسلىگە كەلتۈرۈش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation type="unfinished"></translation> -+ <translation>ئىسىم-فامىلىسى</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="990"/> - <location filename="../kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation type="unfinished"></translation> -+ <translation>ئېچىش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="991"/> - <location filename="../kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation type="unfinished"></translation> -+ <translation>ئەمەلدىن قالدۇرۇش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation type="unfinished"></translation> -+ <translation>تېجەش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation type="unfinished"></translation> -+ <translation>يېڭى ھۆججەت قىسقۇچ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="999"/> - <location filename="../kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation type="unfinished"></translation> -+ <translation>ساقلاش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1035"/> - <location filename="../kyfiledialog.cpp" line="1036"/> - <location filename="../kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation type="unfinished"></translation> -+ <translation>مۇندەرىجىلەر</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation type="unfinished"></translation> -+ <translation>ئاگاھلاندۇرۇش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1227"/> -@@ -226,22 +226,22 @@ - <message> - <location filename="../kyfiledialog.cpp" line="1920"/> - <source>NewFolder</source> -- <translation type="unfinished"></translation> -+ <translation>يېڭى قاتلىغۇچ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2208"/> - <source>Undo</source> -- <translation type="unfinished"></translation> -+ <translation>Undo</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2215"/> - <source>Redo</source> -- <translation type="unfinished"></translation> -+ <translation>قايتا-قايتا</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2414"/> - <source>warn</source> -- <translation type="unfinished"></translation> -+ <translation>ئاگاھلاندۇرۇش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2414"/> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0054-108.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0054-108.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0054-108.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0054-108.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,79 +0,0 @@ -From: Yue-Lan <lanyue@kylinos.cn> -Date: Thu, 23 May 2024 04:12:30 +0000 -Subject: =?utf-8?b?ITEwOCDpgILphY3mmbrog73mlbDmja7nrqHnkIYgTWVyZ2UgcHVsbCBy?= - =?utf-8?b?ZXF1ZXN0ICExMDggZnJvbSBZdWUtTGFuL29wZW5reWxpbi9uaWxl?= - ---- - ukui-qml-style-helper/kyquickstyleitem.cpp | 8 ++++---- - ukui-qqc2-style/org.ukui.style/Button.qml | 2 +- - ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp | 8 +++++--- - 3 files changed, 10 insertions(+), 8 deletions(-) - -diff --git a/ukui-qml-style-helper/kyquickstyleitem.cpp b/ukui-qml-style-helper/kyquickstyleitem.cpp -index b2514d6..dbb527c 100644 ---- a/ukui-qml-style-helper/kyquickstyleitem.cpp -+++ b/ukui-qml-style-helper/kyquickstyleitem.cpp -@@ -1497,13 +1497,13 @@ void KyQuickStyleItem::paint(QPainter *painter) - switch (m_itemType) { - case Button:{ - QWidget wid; -- if(m_buttonType == "MaxButton" || m_buttonType == "MinButton") { -+ if(m_buttonType == "MaxButton" || m_buttonType == "MinButton" || m_buttonType == "WindowButton") { - wid.setProperty("isWindowButton", QVariant(0x01)); -- } -- if(m_buttonType == "CloseButton") { -+ } else if(m_buttonType == "CloseButton") { - wid.setProperty("isWindowButton", QVariant(0x02)); - } -- if(m_buttonType == "blueButton") { -+ -+ if(m_buttonType == "BlueButton" || m_buttonType == "ImportantButton") { - wid.setProperty("isImportant", true); - } - if(m_roundButton == "RoundButton") { -diff --git a/ukui-qqc2-style/org.ukui.style/Button.qml b/ukui-qqc2-style/org.ukui.style/Button.qml -index 306648a..04b00de 100644 ---- a/ukui-qqc2-style/org.ukui.style/Button.qml -+++ b/ukui-qqc2-style/org.ukui.style/Button.qml -@@ -9,7 +9,7 @@ T.Button { - palette: StylePrivate.StyleHelper.palette - - /* The value type of buttonType are "CloseButton","MaxButton","MinButton","blueButton","Default". */ -- StylePrivate.StyleHelper.buttonType: "Default" -+ StylePrivate.StyleHelper.buttonType: state - - - implicitWidth: background.implicitWidth -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 be9a22b..542a4c6 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -6603,7 +6603,7 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - - case SC_ScrollBarSlider: - { -- if(!animator->isRunning("move_position") && animator->currentAnimatorTime("move_position") != 0){ -+ if(animator && !animator->isRunning("move_position") && animator->currentAnimatorTime("move_position") != 0){ - aScrollBarDebug << "stop animator time........."; - animator->setAnimatorCurrentTime("move_position", 0); - animator->setExtraProperty("end_position", 0); -@@ -6616,7 +6616,8 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - r = QRect(0, sliderstart, rect.width(), sliderlen); - QWidget *w = const_cast<QWidget *>(widget); - aScrollBarDebug << "SC_ScrollBarSlider......" << w << r; -- w->setProperty("ScrollBarSliderRect", r); -+ if (w) -+ w->setProperty("ScrollBarSliderRect", r); - return r; - } - -@@ -6629,7 +6630,8 @@ QRect UKUIConfigStyle::subControlRect(QStyle::ComplexControl control, const QSty - r = QRect(rect.x(), rect.y() + lineLength, rect.width(), rect.height() - 2 * lineLength); - QWidget *w = const_cast<QWidget *>(widget); - aScrollBarDebug << "SC_ScrollBarGroove......" << w << r; -- w->setProperty("ScrollBarGrooveRect", r); -+ if (w) -+ w->setProperty("ScrollBarGrooveRect", r); - return r; - } - diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0055-109.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0055-109.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0055-109.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0055-109.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,44 +0,0 @@ -From: Yue-Lan <lanyue@kylinos.cn> -Date: Tue, 28 May 2024 08:35:36 +0000 -Subject: =?utf-8?b?ITEwOSDkv67lpI3ml7bpl7TpgInmi6nnqbrpl7TkuIvmi4nmjInpkq4=?= - =?utf-8?b?5pi+56S66Zeu6aKYIE1lcmdlIHB1bGwgcmVxdWVzdCAhMTA5IGZyb20gWXVlLUxh?= - =?utf-8?b?bi9vcGVua3lsaW4vbmlsZQ==?= - ---- - ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -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 542a4c6..7925d8f 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -3959,6 +3959,14 @@ void UKUIConfigStyle::drawComplexControl(QStyle::ComplexControl control, const Q - - painter->drawRoundedRect(option->rect.adjusted(width, width, -width, -width), sp->m_ComboBoxParameters.radius, sp->m_ComboBoxParameters.radius); - painter->restore(); -+ -+ if (comboBox->subControls & SC_ComboBoxArrow) { -+ QRect arrowRect = proxy()->subControlRect(CC_ComboBox, comboBox, SC_ComboBoxArrow, widget); -+ QStyleOption arrow = *option; -+ arrow.state = option->state & State_Enabled ? State_Enabled : State_None; -+ arrow.rect = arrowRect; -+ proxy()->drawPrimitive(PE_IndicatorArrowDown, &arrow, painter, widget); -+ } - return; - } - break; -@@ -5357,14 +5365,8 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - case CE_ComboBoxLabel: - { - if (const QStyleOptionComboBox *comboBox = qstyleoption_cast<const QStyleOptionComboBox *>(option)) { -- QRect arrowRect = proxy()->subControlRect(CC_ComboBox, comboBox, SC_ComboBoxArrow, widget); - QRect editRect = proxy()->subControlRect(CC_ComboBox, comboBox, SC_ComboBoxEditField, widget); - -- QStyleOption arrow = *option; -- arrow.state = option->state & State_Enabled ? State_Enabled : State_None; -- arrow.rect = arrowRect; -- proxy()->drawPrimitive(PE_IndicatorArrowDown, &arrow, painter, widget); -- - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - if (!comboBox->currentIcon.isNull()) { diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0056-udpate-changelog.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0056-udpate-changelog.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0056-udpate-changelog.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0056-udpate-changelog.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,50 +0,0 @@ -From: Yue-Lan <lanyue@kylinos.cn> -Date: Tue, 4 Jun 2024 17:34:20 +0800 -Subject: udpate changelog. - ---- - libqt5-ukui-style/effects/highlight-effect.cpp | 6 ++++++ - ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp | 3 ++- - 2 files changed, 8 insertions(+), 1 deletion(-) - -diff --git a/libqt5-ukui-style/effects/highlight-effect.cpp b/libqt5-ukui-style/effects/highlight-effect.cpp -index 44bd0fb..943a590 100644 ---- a/libqt5-ukui-style/effects/highlight-effect.cpp -+++ b/libqt5-ukui-style/effects/highlight-effect.cpp -@@ -398,9 +398,15 @@ QPixmap HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(const QPixmap &pixma - option->state.testFlag(QStyle::State_Sunken) || - option->state.testFlag(QStyle::State_On) || - option->state.testFlag(QStyle::State_Selected); -+ - if (qobject_cast<const QAbstractItemView *>(widget)) { - if (!option->state.testFlag(QStyle::State_Selected)) - overOrDown = false; -+ } else if (option->styleObject->inherits("QQuickStyleItem1")) { -+ // 修复qml菜单高亮状态异常问题 -+ overOrDown = option->state.testFlag(QStyle::State_MouseOver) || -+ option->state.testFlag(QStyle::State_Sunken) || -+ option->state.testFlag(QStyle::State_Selected); - } - - QPainter p(&target); -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 7925d8f..63c8c06 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -4872,6 +4872,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - } - - if (iconRect.isValid()) { -+ bool qqcButtonUseSymbolicIcon = option->styleObject && option->styleObject->inherits("QQuickStyleItem1") && button->icon.name().contains("symbolic"); - if(sp->getAdjustColorRules() == UKUIConfigStyleParameters::AdjustColorRules::HSL && - inactive && useTransparentButtonList().contains(qAppName()) && widget && - widget->property("isWindowButton").isValid() && -@@ -4881,7 +4882,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - color.setAlphaF(0.45); - drawColorPixmap(painter, color, pixmap); - } -- else if (widget && !widget->property("useIconHighlightEffect").isValid()) { -+ else if ((widget && !widget->property("useIconHighlightEffect").isValid()) || qqcButtonUseSymbolicIcon) { - if (!sp->m_PushButtonParameters.iconHoverClickHighlight) { - pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, &sub, widget); - } diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0057-update-changelog.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0057-update-changelog.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0057-update-changelog.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0057-update-changelog.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,21 +0,0 @@ -From: Yue-Lan <lanyue@kylinos.cn> -Date: Thu, 6 Jun 2024 09:10:24 +0800 -Subject: update changelog. - ---- - libqt5-ukui-style/effects/highlight-effect.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libqt5-ukui-style/effects/highlight-effect.cpp b/libqt5-ukui-style/effects/highlight-effect.cpp -index 943a590..81bec19 100644 ---- a/libqt5-ukui-style/effects/highlight-effect.cpp -+++ b/libqt5-ukui-style/effects/highlight-effect.cpp -@@ -402,7 +402,7 @@ QPixmap HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(const QPixmap &pixma - if (qobject_cast<const QAbstractItemView *>(widget)) { - if (!option->state.testFlag(QStyle::State_Selected)) - overOrDown = false; -- } else if (option->styleObject->inherits("QQuickStyleItem1")) { -+ } else if (option->styleObject && option->styleObject->inherits("QQuickStyleItem1")) { - // 修复qml菜单高亮状态异常问题 - overOrDown = option->state.testFlag(QStyle::State_MouseOver) || - option->state.testFlag(QStyle::State_Sunken) || diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0058-Update-changelog-2024.06.06-4.1.0.0-0k43.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0058-Update-changelog-2024.06.06-4.1.0.0-0k43.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0058-Update-changelog-2024.06.06-4.1.0.0-0k43.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0058-Update-changelog-2024.06.06-4.1.0.0-0k43.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,157 +0,0 @@ -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 - -- -- - 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)) { diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0059-update-changelog.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0059-update-changelog.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0059-update-changelog.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0059-update-changelog.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,23 +0,0 @@ -From: Yue-Lan <lanyue@kylinos.cn> -Date: Fri, 7 Jun 2024 14:48:54 +0800 -Subject: update changelog. - ---- - ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -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 1a5a323..646775d 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -2925,6 +2925,10 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - painter->drawRoundedRect(vi->rect, Radius, Radius); - painter->restore(); - } -+ -+ if (dynamic_cast<QPixmap *>(painter->device())) { -+ proxy()->drawPrimitive(PE_PanelItemViewItem, option, painter, widget); -+ } - return; - } - break; diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0060-Translated-using-Weblate-Uyghur.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0060-Translated-using-Weblate-Uyghur.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0060-Translated-using-Weblate-Uyghur.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0060-Translated-using-Weblate-Uyghur.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,67 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.cn> -Date: Tue, 18 Jun 2024 03:27:21 +0000 -Subject: Translated using Weblate (Uyghur) - -Currently translated at 100.0% (38 of 38 strings) - -Translation: openkylin-nile-new/qt5-ukui-filedialog -Translate-URL: http://weblate.openkylin.top/projects/openkylin-nile-new/qt5-ukui-filedialog/ug/ ---- - qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts -index 402bb69..7663e4e 100644 ---- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts -@@ -117,7 +117,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="2716"/> - <source>Save File</source> -- <translation type="unfinished"></translation> -+ <translation>ھۆججەتنى ساقلاش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2729"/> -@@ -140,7 +140,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation type="unfinished"></translation> -+ <translation>Cd نىڭ ئۈستى</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="241"/> -@@ -150,12 +150,12 @@ - <message> - <location filename="../kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation type="unfinished"></translation> -+ <translation>كۆرۈنۈش تىپى</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation type="unfinished"></translation> -+ <translation>رەتلەنگەن تىپ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="265"/> -@@ -221,7 +221,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -+ <translation>مەۋجۇت، ئالماشتۇرۇشنى جەزىملەشتۈرەلەمسىز؟</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1920"/> -@@ -246,7 +246,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="2414"/> - <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -+ <translation>بۇ مەشغۇلاتنى قوللىمايدۇ.</translation> - </message> - </context> - </TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0061-Update-changelog-2024.06.19-4.1.0.0-ok45.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0061-Update-changelog-2024.06.19-4.1.0.0-ok45.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0061-Update-changelog-2024.06.19-4.1.0.0-ok45.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0061-Update-changelog-2024.06.19-4.1.0.0-ok45.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,227 +0,0 @@ -From: xibowen <xibowen@kylinos.cn> -Date: Wed, 19 Jun 2024 18:37:27 +0800 -Subject: Update changelog 2024.06.19 4.1.0.0-ok45 - ---- - qt5-ukui-filedialog/kyfiledialog.cpp | 25 +++++----- - .../widget/messagebox/message-box.cpp | 13 +++-- - .../qt5-config-style-ukui/ukui-config-style.cpp | 57 ++++++++++++---------- - 3 files changed, 52 insertions(+), 43 deletions(-) - -diff --git a/qt5-ukui-filedialog/kyfiledialog.cpp b/qt5-ukui-filedialog/kyfiledialog.cpp -index 354f88b..848c71c 100644 ---- a/qt5-ukui-filedialog/kyfiledialog.cpp -+++ b/qt5-ukui-filedialog/kyfiledialog.cpp -@@ -2689,17 +2689,20 @@ bool KyFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality wi - else if(options()->viewMode() == QFileDialog::Detail && mKyFileDialog->viewMode() != KyNativeFileDialog::List) - mKyFileDialog->setViewMode(KyNativeFileDialog::List); - -- QString platform = QGuiApplication::platformName(); -- if(platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) -- { -- kdk::UkuiStyleHelper::self()->removeHeader(mKyFileDialog); -- } else { -- MotifWmHints hints; -- hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; -- hints.functions = MWM_FUNC_ALL; -- hints.decorations = MWM_DECOR_BORDER; -- XAtomHelper::getInstance()->setWindowMotifHint(mKyFileDialog->winId(), hints); -- } -+ //remove windows header -+// QString platform = QGuiApplication::platformName(); -+// if(platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) -+// { -+// kdk::UkuiStyleHelper::self()->removeHeader(mKyFileDialog); -+// } else { -+// MotifWmHints hints; -+// hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; -+// hints.functions = MWM_FUNC_ALL; -+// hints.decorations = MWM_DECOR_BORDER; -+// XAtomHelper::getInstance()->setWindowMotifHint(mKyFileDialog->winId(), hints); -+// } -+ kdk::UkuiStyleHelper::self()->removeHeader(mKyFileDialog); -+ - - mKyFileDialog->delayShow(); - viewInitialFinished(); -diff --git a/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp b/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -index 6eadac2..9c108f4 100644 ---- a/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -+++ b/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -@@ -90,7 +90,7 @@ MessageBox::MessageBox(QWidget *parent) : QDialog(*new MessageBoxPrivate, parent - else - qWarning() << "Load translations file failed!" << locale; - -- setProperty("useStyleWindowManager", false); -+ setProperty("useStyleWindowManager", true); - setBackgroundRole(QPalette::Base); - setAutoFillBackground(true); - d->init(); -@@ -721,7 +721,7 @@ void MessageBoxPrivate::init(const QString &title, const QString &text) - } - - -- mCloseButtton = new QPushButton(/*q*/); -+ mCloseButtton = new QPushButton(); - mCloseButtton->setFlat(true); - mCloseButtton->setFocusPolicy(Qt::NoFocus); - mCloseButtton->setProperty("isWindowButton", 0x2); -@@ -737,7 +737,7 @@ void MessageBoxPrivate::init(const QString &title, const QString &text) - q->close(); - }); - -- mTitleText = new QLabel(/*q*/); -+ mTitleText = new QLabel(); - mTitleText->setText(title); - mTitleIcon = new QLabel(); - mTitleIcon->setPixmap(QIcon(qApp->windowIcon()).pixmap(QSize(22, 22))); -@@ -807,8 +807,8 @@ void MessageBoxPrivate::setupLayout() - layout->setContentsMargins(4, 4, 4, 4); - layout->setSpacing(4); - // layout->addWidget(mCloseButtton, 0, Qt::AlignRight); --// layout->addLayout(titleLayout); -- layout->addSpacing(16); -+ layout->addLayout(titleLayout); -+ layout->addSpacing(0); - layout->addLayout(contentLayout); - - q->setLayout(layout); -@@ -1470,6 +1470,7 @@ bool MessageBoxHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality wind - } - */ - -+ //remove windows header - // QString platform = QGuiApplication::platformName(); - // if(platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) - // { -@@ -1481,6 +1482,8 @@ bool MessageBoxHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality wind - // hints.decorations = MWM_DECOR_BORDER; - // XAtomHelper::getInstance()->setWindowMotifHint(mMessageBox->winId(), hints); - // } -+ kdk::UkuiStyleHelper::self()->removeHeader(mMessageBox); -+ - - foreach (QAbstractButton *ab, mMessageBox->buttons()) { - if (QPushButton *pb = qobject_cast<QPushButton *>(ab)) { -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 646775d..e38ff1f 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -81,6 +81,7 @@ - #include <QTreeWidget> - #include <QListWidget> - #include <QHeaderView> -+#include <QTextEdit> - #include <QEvent> - #include <QDebug> - #include <QPixmapCache> -@@ -710,6 +711,11 @@ int UKUIConfigStyle::styleHint(QStyle::StyleHint hint, const QStyleOption *optio - case SH_BlinkCursorWhenTextSelected: { - return m_blink_cursor; - } -+ case SH_TabBar_Alignment: { -+ if (widget && widget->layoutDirection() == Qt::RightToLeft) -+ return Qt::AlignRight; -+ return Qt::AlignLeft; -+ } - default: - break; - } -@@ -1187,6 +1193,23 @@ void UKUIConfigStyle::polish(QWidget *widget) - - } - -+ //input right to left -+ QString systemLang = QLocale::system().name(); -+ if(systemLang == "ug_CN" || systemLang == "ky_KG" || systemLang == "kk_KZ") { -+ if (auto spinbox = qobject_cast<QSpinBox *>(widget)) { -+ spinbox->setAlignment(Qt::AlignRight); -+ } -+ if (auto lineedit = qobject_cast<QLineEdit *>(widget)) { -+ lineedit->setAlignment(Qt::AlignRight); -+ } -+ if (auto textedit = qobject_cast<QTextEdit *>(widget)) { -+ textedit->setAlignment(Qt::AlignRight); -+ } -+ if (auto label = qobject_cast<QLabel *>(widget)) { -+ label->setAlignment(Qt::AlignRight); -+ } -+ } -+ - widget->installEventFilter(this); - } - -@@ -3061,7 +3084,7 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 0, -90); - borderPath1.lineTo(rect.left(), rect.bottom() - 1); - } else if (vi->viewItemPosition == QStyleOptionViewItem::OnlyOne) { -- if(vi->rect.left() == 0) { -+ if(vi->rect.left() == 0) { - path.addRoundedRect(vi->rect.adjusted(0, 0, 1, 1), sp->m_TreeParameters.radius, sp->m_TreeParameters.radius); - borderPath0.addRoundedRect(vi->rect.adjusted(0, 0, 1, 1), sp->m_TreeParameters.radius, sp->m_TreeParameters.radius); - } else { -@@ -5657,30 +5680,9 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - if (isComboBox) { - if(!menuItem->icon.isNull()) - hasIcon = true; --// auto *comboBox = qobject_cast<const QComboBox*>(widget); --// int column = comboBox->count(); --// for(int i = 0; i < column; i++) --// { --// if(!comboBox->itemIcon(i).isNull()){ --// hasIcon = true; --// break; --// } --// } -- } else if(menuItem->maxIconWidth != 0) -+ } else if(menuItem->maxIconWidth != 0) { - hasIcon = true; -- --// if(qobject_cast<const QMenu*>(widget)) --// { --// auto *menu = qobject_cast<const QMenu*>(widget); --// int column = menu->actions().length(); --// for(int i = 0; i < column; i++) --// { --// if(!menu->actions().at(i)->icon().isNull()) --// { --// hasIcon = true; --// } --// } --// } -+ } - - if (menuItem->menuHasCheckableItems || hasIcon) { - int iconWidth = proxy()->pixelMetric(PM_SmallIconSize, option, widget); -@@ -5730,6 +5732,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - painter->drawPixmap(iconRect, target); - painter->restore(); - } -+ - //text - if (!menuItem->text.isEmpty()) { - QString text = menuItem->text; -@@ -5756,7 +5759,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - if (layout) - textToDraw_flags |= Qt::AlignRight; - else -- textToDraw_flags |= Qt::AlignLeft; -+ textToDraw_flags |= Qt::AlignLeft | Qt::AlignAbsolute; - painter->drawText(drawRect, textToDraw_flags, textToDraw); - } - -@@ -5769,12 +5772,12 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp - if (layout) - text_flags |= Qt::AlignLeft; - else -- text_flags |= Qt::AlignRight; -+ text_flags |= Qt::AlignRight | Qt::AlignAbsolute; - - QFontMetrics metrics(font); - QString elidedText = metrics.elidedText(text, Qt::ElideRight, drawRect.width()); -- - painter->drawText(drawRect, text_flags, elidedText); -+ - painter->restore(); - } - return; diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0062-Update-changelog-2024.06.28-4.1.0.0-ok45.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0062-Update-changelog-2024.06.28-4.1.0.0-ok45.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0062-Update-changelog-2024.06.28-4.1.0.0-ok45.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0062-Update-changelog-2024.06.28-4.1.0.0-ok45.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,25 +0,0 @@ -From: xibowen <xibowen@kylinos.cn> -Date: Fri, 28 Jun 2024 15:25:21 +0800 -Subject: Update changelog 2024.06.28 4.1.0.0-ok45 - ---- - ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -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 e38ff1f..a57e813 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -1205,9 +1205,9 @@ void UKUIConfigStyle::polish(QWidget *widget) - if (auto textedit = qobject_cast<QTextEdit *>(widget)) { - textedit->setAlignment(Qt::AlignRight); - } -- if (auto label = qobject_cast<QLabel *>(widget)) { -- label->setAlignment(Qt::AlignRight); -- } -+// if (auto label = qobject_cast<QLabel *>(widget)) { -+// label->setAlignment(Qt::AlignRight); -+// } - } - - widget->installEventFilter(this); diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0063-Translated-using-Weblate-Uyghur.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0063-Translated-using-Weblate-Uyghur.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0063-Translated-using-Weblate-Uyghur.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0063-Translated-using-Weblate-Uyghur.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,137 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.cn> -Date: Sun, 30 Jun 2024 08:57:23 +0000 -Subject: Translated using Weblate (Uyghur) - -Currently translated at 100.0% (38 of 38 strings) - -Translation: openkylin-nile-new/qt5-ukui-filedialog -Translate-URL: http://weblate.openkylin.top/projects/openkylin-nile-new/qt5-ukui-filedialog/ug/ ---- - qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts | 12 ++++++------ - qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts | 12 ++++++------ - qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts | 2 +- - 3 files changed, 13 insertions(+), 13 deletions(-) - -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts -index 2eae87d..661deae 100644 ---- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts -@@ -117,7 +117,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="2716"/> - <source>Save File</source> -- <translation type="unfinished"></translation> -+ <translation>حۇجاتتى ساقتاۋ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2729"/> -@@ -140,7 +140,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation type="unfinished"></translation> -+ <translation>Cd نىڭ ٷستٸندە</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="241"/> -@@ -150,12 +150,12 @@ - <message> - <location filename="../kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation type="unfinished"></translation> -+ <translation>كورىنۋ تيپى</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation type="unfinished"></translation> -+ <translation>رەتتەلگەن تيپ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="265"/> -@@ -221,7 +221,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -+ <translation>ساقتالعان، الماستٸرۋدٸ تۇراقتاستىراسىزبا؟</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1920"/> -@@ -246,7 +246,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="2414"/> - <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -+ <translation>نۇ جوبالاۋدى قولدامايدى.</translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts -index 119a334..f73ec1f 100644 ---- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts -@@ -117,7 +117,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="2716"/> - <source>Save File</source> -- <translation type="unfinished"></translation> -+ <translation>ۅجۅتۉن ساقتوو</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2729"/> -@@ -140,7 +140,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation type="unfinished"></translation> -+ <translation>Cd نىڭ ۉستۉندۆ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="241"/> -@@ -150,12 +150,12 @@ - <message> - <location filename="../kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation type="unfinished"></translation> -+ <translation>كۅرۉنۉش تۉرۉ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation type="unfinished"></translation> -+ <translation>ىرەتتەلگەن تىپ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="265"/> -@@ -221,7 +221,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -+ <translation>باربولۇۇسۇ ، الماشتىرۇۇنۇ تۇراقتاندىرا الاسىزبى؟</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1920"/> -@@ -246,7 +246,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="2414"/> - <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -+ <translation>بۇل ماشقۇلدانۇۇنۇ قولدوبويت.</translation> - </message> - </context> - </TS> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts -index 7663e4e..66b4c6c 100644 ---- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts -@@ -140,7 +140,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation>Cd نىڭ ئۈستى</translation> -+ <translation>Cd نىڭ ئۈستىدە</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="241"/> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0064-Translated-using-Weblate-Uyghur.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0064-Translated-using-Weblate-Uyghur.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0064-Translated-using-Weblate-Uyghur.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0064-Translated-using-Weblate-Uyghur.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,163 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.cn> -Date: Tue, 18 Jun 2024 03:27:21 +0000 -Subject: Translated using Weblate (Uyghur) - -Currently translated at 100.0% (63 of 63 strings) - -Translation: openkylin-nile-new/qt5-ukui-platformtheme -Translate-URL: http://weblate.openkylin.top/projects/openkylin-nile-new/qt5-ukui-platformtheme/ug/ ---- - translations/qt5-ukui-platformtheme_ug.ts | 40 +++++++++++++++---------------- - 1 file changed, 20 insertions(+), 20 deletions(-) - -diff --git a/translations/qt5-ukui-platformtheme_ug.ts b/translations/qt5-ukui-platformtheme_ug.ts -index 9f1e357..3b8b0a0 100644 ---- a/translations/qt5-ukui-platformtheme_ug.ts -+++ b/translations/qt5-ukui-platformtheme_ug.ts -@@ -14,7 +14,7 @@ - <message> - <location filename="../test/filedialog/mainwindow.ui" line="30"/> - <source>test open</source> -- <translation type="unfinished"></translation> -+ <translation>سېناقنى ئېچىش</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="37"/> -@@ -24,27 +24,27 @@ - <message> - <location filename="../test/filedialog/mainwindow.ui" line="47"/> - <source>selected uri</source> -- <translation type="unfinished"></translation> -+ <translation>تاللانغان uri</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="54"/> - <source>test show</source> -- <translation type="unfinished"></translation> -+ <translation>سىناقنى كۆرسىتىش</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="64"/> - <source>test exec</source> -- <translation type="unfinished"></translation> -+ <translation>ئىجرا قىلغۇچنى ئۆلچەش</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="71"/> - <source>test save</source> -- <translation type="unfinished"></translation> -+ <translation>سىناقنى ساقلاش</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="78"/> - <source>test static open</source> -- <translation type="unfinished"></translation> -+ <translation>تىنچ ھالەتتە ئېچىشنى سىناش</translation> - </message> - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> -@@ -55,7 +55,7 @@ - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> - <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -+ <translation>ئاپتوماتىك يارقىن كۆرسىتىش سىنبەلگىسىنى ئىشلىتىڭ</translation> - </message> - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> -@@ -66,37 +66,37 @@ - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> - <source>highlightOnly</source> -- <translation type="unfinished"></translation> -+ <translation>پەقەت يۇقىرى يورۇقلۇقتا كۆرسىتىلىدۇ.</translation> - </message> - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> - <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -+ <translation>كۆڭۈلدىكى ۋە گەۋدىلىك كۆرسىتىش</translation> - </message> - <message> - <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> - <source>RadioButton</source> -- <translation type="unfinished"></translation> -+ <translation>تاق تاللاش كۇنۇپكىسى</translation> - </message> - <message> - <location filename="../test/system-settings/mainwindow.ui" line="21"/> - <source>style</source> -- <translation type="unfinished"></translation> -+ <translation>ئۇسلۇب</translation> - </message> - <message> - <location filename="../test/system-settings/mainwindow.ui" line="31"/> - <source>icon</source> -- <translation type="unfinished"></translation> -+ <translation>ئايكون</translation> - </message> - <message> - <location filename="../test/system-settings/mainwindow.ui" line="41"/> - <source>menu opacity</source> -- <translation type="unfinished"></translation> -+ <translation>تاماق تىزىملىكىنىڭ سۈزۈكلۈك دەرىجىسى يوق</translation> - </message> - <message> - <location filename="../test/system-settings/mainwindow.ui" line="55"/> - <source>font</source> -- <translation type="unfinished"></translation> -+ <translation>خەت نۇسخىسى</translation> - </message> - </context> - <context> -@@ -226,7 +226,7 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> - <source>Save File</source> -- <translation type="unfinished"></translation> -+ <translation>ھۆججەتنى ساقلاش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> -@@ -249,7 +249,7 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation type="unfinished"></translation> -+ <translation>Cd نىڭ ئۈستى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> -@@ -259,12 +259,12 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation type="unfinished"></translation> -+ <translation>كۆرۈنۈش تىپى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation type="unfinished"></translation> -+ <translation>رەتلەنگەن تىپ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> -@@ -330,7 +330,7 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -+ <translation>مەۋجۇت، ئالماشتۇرۇشنى جەزىملەشتۈرەلەمسىز؟</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> -@@ -355,7 +355,7 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> - <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -+ <translation>بۇ مەشغۇلاتنى قوللىمايدۇ.</translation> - </message> - </context> - </TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0065-Update-changelog-2024.07.11-4.1.0.0-ok47.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0065-Update-changelog-2024.07.11-4.1.0.0-ok47.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0065-Update-changelog-2024.07.11-4.1.0.0-ok47.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0065-Update-changelog-2024.07.11-4.1.0.0-ok47.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,30 +0,0 @@ -From: xibowen <xibowen@kylinos.cn> -Date: Thu, 11 Jul 2024 09:13:14 +0800 -Subject: Update changelog 2024.07.11 4.1.0.0-ok47 - ---- - qt5-ukui-platformtheme/widget/messagebox/message-box.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp b/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -index 9c108f4..d57415e 100644 ---- a/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -+++ b/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -@@ -740,7 +740,7 @@ void MessageBoxPrivate::init(const QString &title, const QString &text) - mTitleText = new QLabel(); - mTitleText->setText(title); - mTitleIcon = new QLabel(); -- mTitleIcon->setPixmap(QIcon(qApp->windowIcon()).pixmap(QSize(22, 22))); -+// mTitleIcon->setPixmap(QIcon(qApp->windowIcon()).pixmap(QSize(22, 22))); - mTitleIcon->setFixedSize(22, 22); - - q->setModal(true); -@@ -795,7 +795,7 @@ void MessageBoxPrivate::setupLayout() - - QHBoxLayout *titleLayout = new QHBoxLayout; - titleLayout->setContentsMargins(6,0,0,0); -- if(!mTitleIcon->pixmap()->isNull()){ -+ if (mTitleIcon->pixmap() && !mTitleIcon->pixmap()->isNull()) { - titleLayout->addWidget(mTitleIcon, Qt::AlignLeft | Qt::AlignVCenter); - titleLayout->addSpacing(5); - } diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0066-Update-changelog-2024.07.11-4.1.0.0-ok48.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0066-Update-changelog-2024.07.11-4.1.0.0-ok48.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0066-Update-changelog-2024.07.11-4.1.0.0-ok48.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0066-Update-changelog-2024.07.11-4.1.0.0-ok48.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,28 +0,0 @@ -From: xibowen <xibowen@kylinos.cn> -Date: Thu, 11 Jul 2024 10:02:49 +0800 -Subject: Update changelog 2024.07.11 4.1.0.0-ok48 - ---- - qt5-ukui-platformtheme/widget/messagebox/message-box.cpp | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp b/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -index d57415e..72a602d 100644 ---- a/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -+++ b/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp -@@ -795,10 +795,11 @@ void MessageBoxPrivate::setupLayout() - - QHBoxLayout *titleLayout = new QHBoxLayout; - titleLayout->setContentsMargins(6,0,0,0); -- if (mTitleIcon->pixmap() && !mTitleIcon->pixmap()->isNull()) { -- titleLayout->addWidget(mTitleIcon, Qt::AlignLeft | Qt::AlignVCenter); -- titleLayout->addSpacing(5); -- } -+// //ukui should remove title icon -+// if (mTitleIcon->pixmap() && !mTitleIcon->pixmap()->isNull()) { -+// titleLayout->addWidget(mTitleIcon, Qt::AlignLeft | Qt::AlignVCenter); -+// titleLayout->addSpacing(5); -+// } - titleLayout->addWidget(mTitleText, Qt::AlignLeft | Qt::AlignVCenter); - titleLayout->addWidget(mCloseButtton, Qt::AlignRight | Qt::AlignVCenter); - diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0067-Translated-using-Weblate-Kyrgyz.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0067-Translated-using-Weblate-Kyrgyz.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0067-Translated-using-Weblate-Kyrgyz.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0067-Translated-using-Weblate-Kyrgyz.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,463 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.cn> -Date: Tue, 23 Jul 2024 09:11:45 +0000 -Subject: Translated using Weblate (Kyrgyz) - -Currently translated at 100.0% (38 of 38 strings) - -Translation: openkylin-nile-new/qt5-ukui-filedialog -Translate-URL: http://weblate.openkylin.top/projects/openkylin-nile-new/qt5-ukui-filedialog/ky/ ---- - .../translations/qt5-ukui-filedialog_kk.ts | 64 +++++++++++----------- - .../translations/qt5-ukui-filedialog_ky.ts | 64 +++++++++++----------- - 2 files changed, 64 insertions(+), 64 deletions(-) - -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts -index 661deae..6d57e4b 100644 ---- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts -@@ -42,52 +42,52 @@ - <message> - <location filename="../ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation type="unfinished"></translation> -+ <translation>حۇجات مى</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation type="unfinished"></translation> -+ <translation>وزگەرتىلگەن ۋاقىتى</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation type="unfinished"></translation> -+ <translation>حۇجات تۇرى</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation type="unfinished"></translation> -+ <translation>حۇجات ۇلكەندىگى</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation type="unfinished"></translation> -+ <translation>وڭ جول</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation type="unfinished"></translation> -+ <translation>چوڭدىن كىچىككە قاراتىپ تىزۋ</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation type="unfinished"></translation> -+ <translation>كىشىدەن ۇلكەنگە قاراتىپ تىزۋ</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation type="unfinished"></translation> -+ <translation>ئومومىيلىق مەنەن تىزۋدى ٸستەتۋ</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation type="unfinished"></translation> -+ <translation>تٸزٸمدٸك كورىنۋى</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation type="unfinished"></translation> -+ <translation>پىشىن كورىنۋى</translation> - </message> - <message> - <source>Close</source> -@@ -99,12 +99,12 @@ - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation type="unfinished"></translation> -+ <translation>الدىن بەكٸتٸلگەن slide</translation> - </message> - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -+ <translation>تالدانبا كارتونىن كشكەنە زاپشاستارىن پٸروبيكسيا كارتون فىلىمىگە سايكەستىرۋ</translation> - </message> - </context> - <context> -@@ -112,7 +112,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="2715"/> - <source>Open File</source> -- <translation type="unfinished"></translation> -+ <translation>حۇجاتتى ٸشٸۋ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2716"/> -@@ -122,7 +122,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="2729"/> - <source>All Files (*)</source> -- <translation type="unfinished"></translation> -+ <translation>بارلٸق حۇجاتتار (*)</translation> - </message> - </context> - <context> -@@ -130,12 +130,12 @@ - <message> - <location filename="../kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation type="unfinished"></translation> -+ <translation>قايتۋ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation type="unfinished"></translation> -+ <translation>ىلگەرلەۋ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="234"/> -@@ -145,7 +145,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation type="unfinished"></translation> -+ <translation>ٸزدەۋ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="249"/> -@@ -161,62 +161,62 @@ - <location filename="../kyfiledialog.cpp" line="265"/> - <location filename="../kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation type="unfinished"></translation> -+ <translation>ۇلكەيتۋ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>تاقاۋ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation type="unfinished"></translation> -+ <translation>قالپىنا كەلتىرىلگەن</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation type="unfinished"></translation> -+ <translation>ات-فاميليا</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="990"/> - <location filename="../kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation type="unfinished"></translation> -+ <translation>ٸشٸۋ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="991"/> - <location filename="../kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation type="unfinished"></translation> -+ <translation>كۇشىنەن قالدىرۋ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation type="unfinished"></translation> -+ <translation>تەجەۋ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation type="unfinished"></translation> -+ <translation>جاڭا حۇجات قىسقىش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="999"/> - <location filename="../kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation type="unfinished"></translation> -+ <translation>ساقتاۋ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1035"/> - <location filename="../kyfiledialog.cpp" line="1036"/> - <location filename="../kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation type="unfinished"></translation> -+ <translation>مازمۇندار</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation type="unfinished"></translation> -+ <translation>ەسكەرتۋ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1227"/> -@@ -226,22 +226,22 @@ - <message> - <location filename="../kyfiledialog.cpp" line="1920"/> - <source>NewFolder</source> -- <translation type="unfinished"></translation> -+ <translation>جاڭا قاتتاعىش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2208"/> - <source>Undo</source> -- <translation type="unfinished"></translation> -+ <translation>Undo</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2215"/> - <source>Redo</source> -- <translation type="unfinished"></translation> -+ <translation>قاتە-قاتە</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2414"/> - <source>warn</source> -- <translation type="unfinished"></translation> -+ <translation>ەسكەرتۋ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2414"/> -diff --git a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts -index f73ec1f..a878ea1 100644 ---- a/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts -+++ b/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts -@@ -42,52 +42,52 @@ - <message> - <location filename="../ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation type="unfinished"></translation> -+ <translation>ۅجۅت ناامى</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation type="unfinished"></translation> -+ <translation>ۅزگۅرتۉلگۅن ۇباقتى</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation type="unfinished"></translation> -+ <translation>ۅجۅت تۉرۉ</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation type="unfinished"></translation> -+ <translation>ۅجۅت چوڭدۇعۇ</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation type="unfinished"></translation> -+ <translation>العاچى جول</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation type="unfinished"></translation> -+ <translation>چوڭدىن كىچىككە قاراتىپ تىزۉۉ</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation type="unfinished"></translation> -+ <translation>كىچىكتەن چوڭعو قاراتىپ تىزۉۉ</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation type="unfinished"></translation> -+ <translation>ئومومىيلىق مەنەن تىزۉۉنۉ ىشتەتىش</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation type="unfinished"></translation> -+ <translation>تىزىمدىك گۅرۉنۉشۉ</translation> - </message> - <message> - <location filename="../ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation type="unfinished"></translation> -+ <translation>تۉر گۅرۉنۉشۉ</translation> - </message> - <message> - <source>Close</source> -@@ -99,12 +99,12 @@ - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation type="unfinished"></translation> -+ <translation>الدىن بەكىتىلگەن slide</translation> - </message> - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -+ <translation>تاندالما كارتاداقى كىچىك شايمانداردى پرويەكسىيە كارتون فىلىمىگە الماشتىرۇۇ</translation> - </message> - </context> - <context> -@@ -112,7 +112,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="2715"/> - <source>Open File</source> -- <translation type="unfinished"></translation> -+ <translation>ۅجۅتۉن اچۇۇ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2716"/> -@@ -122,7 +122,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="2729"/> - <source>All Files (*)</source> -- <translation type="unfinished"></translation> -+ <translation>باردىق ۅجۅتتۅر (*)</translation> - </message> - </context> - <context> -@@ -130,12 +130,12 @@ - <message> - <location filename="../kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation type="unfinished"></translation> -+ <translation>قايتۇۇ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation type="unfinished"></translation> -+ <translation>ىلگەرلۅۅ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="234"/> -@@ -145,7 +145,7 @@ - <message> - <location filename="../kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation type="unfinished"></translation> -+ <translation>ىزدۅۅ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="249"/> -@@ -161,62 +161,62 @@ - <location filename="../kyfiledialog.cpp" line="265"/> - <location filename="../kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation type="unfinished"></translation> -+ <translation>چوڭويتۇش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>بەكىتىش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation type="unfinished"></translation> -+ <translation>العاچىنا كەلتىرۉۉ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation type="unfinished"></translation> -+ <translation>ات-تەك اتى</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="990"/> - <location filename="../kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation type="unfinished"></translation> -+ <translation>اچۇۇ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="991"/> - <location filename="../kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation type="unfinished"></translation> -+ <translation>ارعادان قالتىرىش</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation type="unfinished"></translation> -+ <translation>تەجۅۅ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation type="unfinished"></translation> -+ <translation>جاڭى ۅجۅت قىپچىعىچ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="999"/> - <location filename="../kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation type="unfinished"></translation> -+ <translation>ساقتوو</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1035"/> - <location filename="../kyfiledialog.cpp" line="1036"/> - <location filename="../kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation type="unfinished"></translation> -+ <translation>مازمۇۇندار</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation type="unfinished"></translation> -+ <translation>ەسكەرتۉۉ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="1227"/> -@@ -226,22 +226,22 @@ - <message> - <location filename="../kyfiledialog.cpp" line="1920"/> - <source>NewFolder</source> -- <translation type="unfinished"></translation> -+ <translation>جاڭى قاتتاعىچ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2208"/> - <source>Undo</source> -- <translation type="unfinished"></translation> -+ <translation>Undo</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2215"/> - <source>Redo</source> -- <translation type="unfinished"></translation> -+ <translation>قايرا-قايرا</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2414"/> - <source>warn</source> -- <translation type="unfinished"></translation> -+ <translation>ەسكەرتۉۉ</translation> - </message> - <message> - <location filename="../kyfiledialog.cpp" line="2414"/> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0068-Translated-using-Weblate-Kyrgyz.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0068-Translated-using-Weblate-Kyrgyz.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0068-Translated-using-Weblate-Kyrgyz.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0068-Translated-using-Weblate-Kyrgyz.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,849 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.cn> -Date: Tue, 23 Jul 2024 09:13:12 +0000 -Subject: Translated using Weblate (Kyrgyz) - -Currently translated at 100.0% (63 of 63 strings) - -Translation: openkylin-nile-new/qt5-ukui-platformtheme -Translate-URL: http://weblate.openkylin.top/projects/openkylin-nile-new/qt5-ukui-platformtheme/ky/ ---- - translations/qt5-ukui-platformtheme_kk.ts | 126 +++++++++++++++--------------- - translations/qt5-ukui-platformtheme_ky.ts | 126 +++++++++++++++--------------- - 2 files changed, 126 insertions(+), 126 deletions(-) - -diff --git a/translations/qt5-ukui-platformtheme_kk.ts b/translations/qt5-ukui-platformtheme_kk.ts -index c37e35e..ca808f3 100644 ---- a/translations/qt5-ukui-platformtheme_kk.ts -+++ b/translations/qt5-ukui-platformtheme_kk.ts -@@ -9,94 +9,94 @@ - <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> - <location filename="../test/system-settings/mainwindow.ui" line="14"/> - <source>MainWindow</source> -- <translation type="unfinished"></translation> -+ <translation>نەگٸزگٸ كوز بەك</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="30"/> - <source>test open</source> -- <translation type="unfinished"></translation> -+ <translation>سېناقنى ٸشٸۋ</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="37"/> - <source>directory</source> -- <translation type="unfinished"></translation> -+ <translation>باس مازمۇن</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="47"/> - <source>selected uri</source> -- <translation type="unfinished"></translation> -+ <translation>تالدانعان uri</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="54"/> - <source>test show</source> -- <translation type="unfinished"></translation> -+ <translation>سىناقتى كورسەتۋ</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="64"/> - <source>test exec</source> -- <translation type="unfinished"></translation> -+ <translation>اتقار ورىنداۋدى ولشەۋ</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="71"/> - <source>test save</source> -- <translation type="unfinished"></translation> -+ <translation>سىناقتى ساقتاۋ</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="78"/> - <source>test static open</source> -- <translation type="unfinished"></translation> -+ <translation>تىنىش كۇيدە اشۋدٸ سىناۋ</translation> - </message> - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> - <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> - <source>PushButton</source> -- <translation type="unfinished"></translation> -+ <translation>تالداۋ كىنوپكاسى</translation> - </message> - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> - <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -+ <translation>اۆتوماتتى جارقىن كورسەتۋ سىن بەلگىسىن ٸستەتڭٸز</translation> - </message> - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> - <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> - <source>...</source> -- <translation type="unfinished"></translation> -+ <translation>...</translation> - </message> - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> - <source>highlightOnly</source> -- <translation type="unfinished"></translation> -+ <translation>تەك جوعارعى جارقتا كورسەتىلدى.</translation> - </message> - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> - <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -+ <translation>كوڭىلدەگى ۋا ەرەكشە كورسەتۋ</translation> - </message> - <message> - <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> - <source>RadioButton</source> -- <translation type="unfinished"></translation> -+ <translation>تاق تالداۋ كىنوپكاسى</translation> - </message> - <message> - <location filename="../test/system-settings/mainwindow.ui" line="21"/> - <source>style</source> -- <translation type="unfinished"></translation> -+ <translation>سلوب</translation> - </message> - <message> - <location filename="../test/system-settings/mainwindow.ui" line="31"/> - <source>icon</source> -- <translation type="unfinished"></translation> -+ <translation>ئايكون</translation> - </message> - <message> - <location filename="../test/system-settings/mainwindow.ui" line="41"/> - <source>menu opacity</source> -- <translation type="unfinished"></translation> -+ <translation>تاماق تىزىمدىگنىڭ تۇنىقتىق دارەجەسى جوق</translation> - </message> - <message> - <location filename="../test/system-settings/mainwindow.ui" line="55"/> - <source>font</source> -- <translation type="unfinished"></translation> -+ <translation>ٴارىپ نۇسقاسى</translation> - </message> - </context> - <context> -@@ -104,7 +104,7 @@ - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>تاقاۋ</translation> - </message> - </context> - <context> -@@ -112,12 +112,12 @@ - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="unfinished"></translation> -+ <translation>اتقار ىستەۋگە بولاتٸن حۇجات 1، مۇقتاجدىق ارگومەنتتٸ 2، ٸزدەپ تاپقان ارگومەنتتٸ 3</translation> - </message> - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> -- <translation type="unfinished"></translation> -+ <translation>سىغىشمىغانQT قامبادا قاتەلىك كورىلدى</translation> - </message> - </context> - <context> -@@ -126,7 +126,7 @@ - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> -- <translation type="unfinished"></translation> -+ <translation>ماقۇل</translation> - </message> - </context> - <context> -@@ -136,13 +136,13 @@ - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> -- <translation type="unfinished"></translation> -+ <translation>ناقتى مازمۇنىن كورسەتۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> -- <translation type="unfinished"></translation> -+ <translation>ناقتى مازمۇنىن جاسىرۋ</translation> - </message> - </context> - <context> -@@ -150,57 +150,57 @@ - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation type="unfinished"></translation> -+ <translation>حۇجات مى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation type="unfinished"></translation> -+ <translation>وزگەرتىلگەن ۋاقىتى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation type="unfinished"></translation> -+ <translation>حۇجات تۇرى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation type="unfinished"></translation> -+ <translation>حۇجات ۇلكەندىگى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation type="unfinished"></translation> -+ <translation>وڭ جول</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation type="unfinished"></translation> -+ <translation>چوڭدىن كىچىككە قاراتىپ تىزۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation type="unfinished"></translation> -+ <translation>كىشىدەن ۇلكەنگە قاراتىپ تىزۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation type="unfinished"></translation> -+ <translation>ئومومىيلىق مەنەن تىزۋدى ٸستەتۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation type="unfinished"></translation> -+ <translation>تٸزٸمدٸك كورىنۋى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation type="unfinished"></translation> -+ <translation>پىشىن كورىنۋى</translation> - </message> - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>تاقاۋ</translation> - </message> - </context> - <context> -@@ -208,12 +208,12 @@ - <message> - <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation type="unfinished"></translation> -+ <translation>الدىن بەكٸتٸلگەن slide</translation> - </message> - <message> - <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -+ <translation>تالدانبا كارتونىن كشكەنە زاپشاستارىن پٸروبيكسيا كارتون فىلىمىگە سايكەستىرۋ</translation> - </message> - </context> - <context> -@@ -221,17 +221,17 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> - <source>Open File</source> -- <translation type="unfinished"></translation> -+ <translation>حۇجاتتى ٸشٸۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> - <source>Save File</source> -- <translation type="unfinished"></translation> -+ <translation>حۇجاتتى ساقتاۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> - <source>All Files (*)</source> -- <translation type="unfinished"></translation> -+ <translation>بارلٸق حۇجاتتار (*)</translation> - </message> - </context> - <context> -@@ -239,123 +239,123 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation type="unfinished"></translation> -+ <translation>قايتۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation type="unfinished"></translation> -+ <translation>ىلگەرلەۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation type="unfinished"></translation> -+ <translation>Cd نىڭ ٷستٸن</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation type="unfinished"></translation> -+ <translation>ٸزدەۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation type="unfinished"></translation> -+ <translation>كورىنۋ تيپى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation type="unfinished"></translation> -+ <translation>رەتتەلگەن تيپ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation type="unfinished"></translation> -+ <translation>ۇلكەيتۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>تاقاۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation type="unfinished"></translation> -+ <translation>قالپىنا كەلتىرىلگەن</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation type="unfinished"></translation> -+ <translation>ەسىمى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation type="unfinished"></translation> -+ <translation>ٸشٸۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation type="unfinished"></translation> -+ <translation>كۇشىنەن قالدىرۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation type="unfinished"></translation> -+ <translation>تەجەۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation type="unfinished"></translation> -+ <translation>جاڭا حۇجات قىسقىش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation type="unfinished"></translation> -+ <translation>ساقتاۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation type="unfinished"></translation> -+ <translation>مازمۇندار</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation type="unfinished"></translation> -+ <translation>ەسكەرتۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -+ <translation>ساقتالعان، الماستٸرۋدٸ تۇراقتاستىراسىزبا؟</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> - <source>NewFolder</source> -- <translation type="unfinished"></translation> -+ <translation>جاڭا قاتتاعىش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> - <source>Undo</source> -- <translation type="unfinished"></translation> -+ <translation>ٸشٸۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> - <source>Redo</source> -- <translation type="unfinished"></translation> -+ <translation>قاتە-قاتە سىناۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> - <source>warn</source> -- <translation type="unfinished"></translation> -+ <translation>ەسكەرتۋ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> - <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -+ <translation>نۇ جوبالاۋدى قولدامايدى.</translation> - </message> - </context> - </TS> -diff --git a/translations/qt5-ukui-platformtheme_ky.ts b/translations/qt5-ukui-platformtheme_ky.ts -index c4f7b75..c444534 100644 ---- a/translations/qt5-ukui-platformtheme_ky.ts -+++ b/translations/qt5-ukui-platformtheme_ky.ts -@@ -9,94 +9,94 @@ - <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> - <location filename="../test/system-settings/mainwindow.ui" line="14"/> - <source>MainWindow</source> -- <translation type="unfinished"></translation> -+ <translation>نەگىزگى كۅزۅنۅك</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="30"/> - <source>test open</source> -- <translation type="unfinished"></translation> -+ <translation>سېناقنى اچۇۇ</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="37"/> - <source>directory</source> -- <translation type="unfinished"></translation> -+ <translation>تىزىمدىك</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="47"/> - <source>selected uri</source> -- <translation type="unfinished"></translation> -+ <translation>تاندالعان uri</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="54"/> - <source>test show</source> -- <translation type="unfinished"></translation> -+ <translation>سىناقتى كۅرسۅتۉۉ</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="64"/> - <source>test exec</source> -- <translation type="unfinished"></translation> -+ <translation>اتقارماق قىلۇۇچۇنۇ ۅلچۅ</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="71"/> - <source>test save</source> -- <translation type="unfinished"></translation> -+ <translation>سىناقتى ساقتوو</translation> - </message> - <message> - <location filename="../test/filedialog/mainwindow.ui" line="78"/> - <source>test static open</source> -- <translation type="unfinished"></translation> -+ <translation>تىنچ ، تىم تىرس ابالدا اچۇۇنۇ سىنوو</translation> - </message> - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> - <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> - <source>PushButton</source> -- <translation type="unfinished"></translation> -+ <translation>تانداش كونۇپكاسى</translation> - </message> - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> - <source>use auto highlight icon</source> -- <translation type="unfinished"></translation> -+ <translation>اپتوماتتىك يارقىن كۅرسۅتۉۉ سىن بەلگىسىن ىشتەتىڭ</translation> - </message> - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> - <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> - <source>...</source> -- <translation type="unfinished"></translation> -+ <translation>...</translation> - </message> - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> - <source>highlightOnly</source> -- <translation type="unfinished"></translation> -+ <translation>جالاڭ عانا جوعورۇ يورۇقلۇقتا كۅرسۅتۉلۅت .</translation> - </message> - <message> - <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> - <source>bothDefaultAndHighlight</source> -- <translation type="unfinished"></translation> -+ <translation>ويۇنداقى جانا ورقويۇپ چىعۇۇ كۅرسۅتۉۉ</translation> - </message> - <message> - <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> - <source>RadioButton</source> -- <translation type="unfinished"></translation> -+ <translation>تاق تانداش كونۇپكاسى</translation> - </message> - <message> - <location filename="../test/system-settings/mainwindow.ui" line="21"/> - <source>style</source> -- <translation type="unfinished"></translation> -+ <translation>ۇسلۇپ</translation> - </message> - <message> - <location filename="../test/system-settings/mainwindow.ui" line="31"/> - <source>icon</source> -- <translation type="unfinished"></translation> -+ <translation>ايكون</translation> - </message> - <message> - <location filename="../test/system-settings/mainwindow.ui" line="41"/> - <source>menu opacity</source> -- <translation type="unfinished"></translation> -+ <translation>تاماق ، اش تىزىمدىگىنىن تۇنۇقتۇق داراجاسى جوق</translation> - </message> - <message> - <location filename="../test/system-settings/mainwindow.ui" line="55"/> - <source>font</source> -- <translation type="unfinished"></translation> -+ <translation>قات ۉلگۉسۉ</translation> - </message> - </context> - <context> -@@ -104,7 +104,7 @@ - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>بەكىتىش</translation> - </message> - </context> - <context> -@@ -112,12 +112,12 @@ - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="unfinished"></translation> -+ <translation>اتقارماق جاسووعو بولوتۇرعان ۅجۅت 1، كەرەكتۉۉ سان 2، ىزدەپ تاپقان سان 3</translation> - </message> - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> -- <translation type="unfinished"></translation> -+ <translation>سىغىشمىغانQT قامپادا قاتاالىق كۅرۉلدۉ</translation> - </message> - </context> - <context> -@@ -126,7 +126,7 @@ - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> -- <translation type="unfinished"></translation> -+ <translation>ماقۇل</translation> - </message> - </context> - <context> -@@ -136,13 +136,13 @@ - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> -- <translation type="unfinished"></translation> -+ <translation>جۅن جايىن كۅرسۅتۉۉ</translation> - </message> - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> -- <translation type="unfinished"></translation> -+ <translation>جۅن جايىن جاشىرۇۇ</translation> - </message> - </context> - <context> -@@ -150,57 +150,57 @@ - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> - <source>File Name</source> -- <translation type="unfinished"></translation> -+ <translation>ۅجۅت ناامى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> - <source>Modified Date</source> -- <translation type="unfinished"></translation> -+ <translation>ۅزگۅرتۉلگۅن ۇباقتى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> - <source>File Type</source> -- <translation type="unfinished"></translation> -+ <translation>ۅجۅت تۉرۉ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> - <source>File Size</source> -- <translation type="unfinished"></translation> -+ <translation>ۅجۅت چوڭدۇعۇ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> - <source>Original Path</source> -- <translation type="unfinished"></translation> -+ <translation>العاچى جول</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> - <source>Descending</source> -- <translation type="unfinished"></translation> -+ <translation>چوڭدىن كىچىككە قاراتىپ تىزۉۉ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> - <source>Ascending</source> -- <translation type="unfinished"></translation> -+ <translation>كىچىكتەن چوڭعو قاراتىپ تىزۉۉ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> - <source>Use global sorting</source> -- <translation type="unfinished"></translation> -+ <translation>ئومومىيلىق مەنەن تىزۉۉنۉ ىشتەتىش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> - <source>List View</source> -- <translation type="unfinished"></translation> -+ <translation>تىزىمدىك گۅرۉنۉشۉ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> - <source>Icon View</source> -- <translation type="unfinished"></translation> -+ <translation>تۉر گۅرۉنۉشۉ</translation> - </message> - <message> - <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>بەكىتىش</translation> - </message> - </context> - <context> -@@ -208,12 +208,12 @@ - <message> - <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation type="unfinished"></translation> -+ <translation>الدىن بەكىتىلگەن slide</translation> - </message> - <message> - <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -+ <translation>تاندالما كارتاداقى كىچىك شايمانداردى پرويەكسىيە كارتون فىلىمىگە الماشتىرۇۇ</translation> - </message> - </context> - <context> -@@ -221,17 +221,17 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> - <source>Open File</source> -- <translation type="unfinished"></translation> -+ <translation>ۅجۅتۉن اچۇۇ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> - <source>Save File</source> -- <translation type="unfinished"></translation> -+ <translation>ۅجۅتۉن ساقتوو</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> - <source>All Files (*)</source> -- <translation type="unfinished"></translation> -+ <translation>باردىق ۅجۅتتۅر (*)</translation> - </message> - </context> - <context> -@@ -239,123 +239,123 @@ - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> - <source>Go Back</source> -- <translation type="unfinished"></translation> -+ <translation>قايتۇۇ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> - <source>Go Forward</source> -- <translation type="unfinished"></translation> -+ <translation>ىلگەرلۅۅ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> - <source>Cd Up</source> -- <translation type="unfinished"></translation> -+ <translation>Cd نىڭ ۉستۉ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> - <source>Search</source> -- <translation type="unfinished"></translation> -+ <translation>ىزدۅۅ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> - <source>View Type</source> -- <translation type="unfinished"></translation> -+ <translation>كۅرۉنۉش تۉرۉ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> - <source>Sort Type</source> -- <translation type="unfinished"></translation> -+ <translation>ىرەتتەلگەن تىپ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> - <source>Maximize</source> -- <translation type="unfinished"></translation> -+ <translation>چوڭويتۇش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>بەكىتىش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> - <source>Restore</source> -- <translation type="unfinished"></translation> -+ <translation>العاچىنا كەلتىرۉۉ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> - <source>Name</source> -- <translation type="unfinished"></translation> -+ <translation>اتى</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> - <source>Open</source> -- <translation type="unfinished"></translation> -+ <translation>اچۇۇ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> - <source>Cancel</source> -- <translation type="unfinished"></translation> -+ <translation>ارعادان قالتىرىش</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> - <source>Save as</source> -- <translation type="unfinished"></translation> -+ <translation>تەجۅۅ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> - <source>New Folder</source> -- <translation type="unfinished"></translation> -+ <translation>جاڭى ۅجۅت قىپچىعىچ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> - <source>Save</source> -- <translation type="unfinished"></translation> -+ <translation>ساقتوو</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> - <source>Directories</source> -- <translation type="unfinished"></translation> -+ <translation>مازمۇۇندار</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> - <source>Warning</source> -- <translation type="unfinished"></translation> -+ <translation>ەسكەرتۉۉ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> - <source>exist, are you sure replace?</source> -- <translation type="unfinished"></translation> -+ <translation>باربولۇۇسۇ ، الماشتىرۇۇنۇ تۇراقتاندىرا الاسىزبى؟</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> - <source>NewFolder</source> -- <translation type="unfinished"></translation> -+ <translation>جاڭى قاتتاعىچ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> - <source>Undo</source> -- <translation type="unfinished"></translation> -+ <translation>اچۇۇ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> - <source>Redo</source> -- <translation type="unfinished"></translation> -+ <translation>قايرا-قايرا سىنوو</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> - <source>warn</source> -- <translation type="unfinished"></translation> -+ <translation>ەسكەرتۉۉ</translation> - </message> - <message> - <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> - <source>This operation is not supported.</source> -- <translation type="unfinished"></translation> -+ <translation>بۇل ماشقۇلدانۇۇنۇ قولدوبويت.</translation> - </message> - </context> - </TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0069-Translated-using-Weblate-Kyrgyz.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0069-Translated-using-Weblate-Kyrgyz.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0069-Translated-using-Weblate-Kyrgyz.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0069-Translated-using-Weblate-Kyrgyz.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,167 +0,0 @@ -From: KevinDuan <duankaiwen@kylinos.cn> -Date: Tue, 23 Jul 2024 09:15:03 +0000 -Subject: Translated using Weblate (Kyrgyz) - -Currently translated at 100.0% (9 of 9 strings) - -Translation: openkylin-nile-new/qt5-ukui-platformtheme-qt5 -Translate-URL: http://weblate.openkylin.top/projects/openkylin-nile-new/qt5-ukui-platformtheme-qt5/ky/ ---- - .../translations/qt5-ukui-platformtheme_kk.ts | 18 +++++++++--------- - .../translations/qt5-ukui-platformtheme_ky.ts | 18 +++++++++--------- - 2 files changed, 18 insertions(+), 18 deletions(-) - -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts -index a76f5af..fb6fa10 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts -@@ -6,7 +6,7 @@ - <message> - <location filename="../widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>تاقاۋ</translation> - </message> - </context> - <context> -@@ -14,12 +14,12 @@ - <message> - <location filename="../widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="unfinished"></translation> -+ <translation>اتقار ىستەۋگە بولاتٸن حۇجات 1، مۇقتاجدىق ارگومەنتتٸ 2، ٸزدەپ تاپقان ارگومەنتتٸ 3</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> -- <translation type="unfinished"></translation> -+ <translation>سىغىشمىغانQT قامبادا قاتەلىك كورىلدى</translation> - </message> - </context> - <context> -@@ -28,7 +28,7 @@ - <location filename="../widget/messagebox/message-box.cpp" line="362"/> - <location filename="../widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> -- <translation type="unfinished"></translation> -+ <translation>ماقۇل</translation> - </message> - </context> - <context> -@@ -38,13 +38,13 @@ - <location filename="../widget/messagebox/message-box.cpp" line="881"/> - <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> -- <translation type="unfinished"></translation> -+ <translation>ناقتى مازمۇنىن كورسەتۋ</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="881"/> - <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> -- <translation type="unfinished"></translation> -+ <translation>ناقتى مازمۇنىن جاسىرۋ</translation> - </message> - </context> - <context> -@@ -92,7 +92,7 @@ - <message> - <location filename="../widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>تاقاۋ</translation> - </message> - </context> - <context> -@@ -100,12 +100,12 @@ - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation type="unfinished"></translation> -+ <translation>الدىن بەكٸتٸلگەن slide</translation> - </message> - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -+ <translation>تالدانبا كارتونىن كشكەنە زاپشاستارىن پٸروبيكسيا كارتون فىلىمىگە سايكەستىرۋ</translation> - </message> - </context> - <context> -diff --git a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts -index 0de3104..78600c4 100644 ---- a/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts -+++ b/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts -@@ -6,7 +6,7 @@ - <message> - <location filename="../widget/messagebox/message-box.cpp" line="97"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>بەكىتىش</translation> - </message> - </context> - <context> -@@ -14,12 +14,12 @@ - <message> - <location filename="../widget/messagebox/message-box.h" line="272"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> -- <translation type="unfinished"></translation> -+ <translation>اتقارماق جاسووعو بولوتۇرعان ۅجۅت 1، كەرەكتۉۉ سان 2، ىزدەپ تاپقان سان 3</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.h" line="274"/> - <source>Incompatible Qt Library Error</source> -- <translation type="unfinished"></translation> -+ <translation>سىغىشمىغانQT قامپادا قاتاالىق كۅرۉلدۉ</translation> - </message> - </context> - <context> -@@ -28,7 +28,7 @@ - <location filename="../widget/messagebox/message-box.cpp" line="362"/> - <location filename="../widget/messagebox/message-box.cpp" line="1090"/> - <source>OK</source> -- <translation type="unfinished"></translation> -+ <translation>ماقۇل</translation> - </message> - </context> - <context> -@@ -38,13 +38,13 @@ - <location filename="../widget/messagebox/message-box.cpp" line="881"/> - <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Show Details...</source> -- <translation type="unfinished"></translation> -+ <translation>جۅن جايىن كۅرسۅتۉۉ</translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="881"/> - <location filename="../widget/messagebox/message-box.cpp" line="1517"/> - <source>Hide Details...</source> -- <translation type="unfinished"></translation> -+ <translation>جۅن جايىن جاشىرۇۇ</translation> - </message> - </context> - <context> -@@ -92,7 +92,7 @@ - <message> - <location filename="../widget/messagebox/message-box.cpp" line="730"/> - <source>Close</source> -- <translation type="unfinished"></translation> -+ <translation>بەكىتىش</translation> - </message> - </context> - <context> -@@ -100,12 +100,12 @@ - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> -- <translation type="unfinished"></translation> -+ <translation>الدىن بەكىتىلگەن slide</translation> - </message> - <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> -- <translation type="unfinished"></translation> -+ <translation>تاندالما كارتاداقى كىچىك شايمانداردى پرويەكسىيە كارتون فىلىمىگە الماشتىرۇۇ</translation> - </message> - </context> - <context> diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0070-Update-changelog-2024.07.24-4.1.0.0-ok49.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0070-Update-changelog-2024.07.24-4.1.0.0-ok49.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0070-Update-changelog-2024.07.24-4.1.0.0-ok49.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0070-Update-changelog-2024.07.24-4.1.0.0-ok49.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,42 +0,0 @@ -From: xibowen <xibowen@kylinos.cn> -Date: Wed, 24 Jul 2024 16:22:34 +0800 -Subject: Update changelog 2024.07.24 4.1.0.0-ok49 - ---- - qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp | 7 +++++++ - ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp | 4 ++-- - 2 files changed, 9 insertions(+), 2 deletions(-) - -diff --git a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -index fda7688..a00c357 100644 ---- a/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -+++ b/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp -@@ -178,6 +178,13 @@ Qt5UKUIPlatformTheme::Qt5UKUIPlatformTheme(const QStringList &args) - if(qApp->inherits("QApplication") == true && qAppName() != "cura") { - QQuickStyle::setStyle("org.ukui.style"); - } -+ -+ QString systemLang = QLocale::system().name(); -+ if(systemLang == "ug_CN" || systemLang == "ky_KG" || systemLang == "kk_KZ"){ -+ QGuiApplication::setLayoutDirection(Qt::RightToLeft); -+ } else { -+ QGuiApplication::setLayoutDirection(Qt::LeftToRight); -+ } - } - - Qt5UKUIPlatformTheme::~Qt5UKUIPlatformTheme() -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 a57e813..e8759fd 100644 ---- a/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -+++ b/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp -@@ -3085,8 +3085,8 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty - borderPath1.lineTo(rect.left(), rect.bottom() - 1); - } else if (vi->viewItemPosition == QStyleOptionViewItem::OnlyOne) { - if(vi->rect.left() == 0) { -- path.addRoundedRect(vi->rect.adjusted(0, 0, 1, 1), sp->m_TreeParameters.radius, sp->m_TreeParameters.radius); -- borderPath0.addRoundedRect(vi->rect.adjusted(0, 0, 1, 1), sp->m_TreeParameters.radius, sp->m_TreeParameters.radius); -+ path.addRoundedRect(vi->rect, sp->m_TreeParameters.radius, sp->m_TreeParameters.radius); -+ borderPath0.addRoundedRect(vi->rect, sp->m_TreeParameters.radius, sp->m_TreeParameters.radius); - } else { - QRect rect = vi->rect.adjusted(0, 0, 1, 1); - int margin = 4; diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/0071-Update-changelog-2024.08.09-4.1.0.0-ok50.patch qt5-ukui-platformtheme-4.10.0.1/debian/patches/0071-Update-changelog-2024.08.09-4.1.0.0-ok50.patch --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/0071-Update-changelog-2024.08.09-4.1.0.0-ok50.patch 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/0071-Update-changelog-2024.08.09-4.1.0.0-ok50.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,67 +0,0 @@ -From: xibowen <xibowen@kylinos.cn> -Date: Fri, 9 Aug 2024 09:25:53 +0800 -Subject: Update changelog 2024.08.09 4.1.0.0-ok50 - ---- - qt5-ukui-filedialog/kyfiledialog.cpp | 15 +++++++++------ - qt5-ukui-filedialog/kyfiledialog.h | 2 +- - 2 files changed, 10 insertions(+), 7 deletions(-) - -diff --git a/qt5-ukui-filedialog/kyfiledialog.cpp b/qt5-ukui-filedialog/kyfiledialog.cpp -index 848c71c..780d592 100644 ---- a/qt5-ukui-filedialog/kyfiledialog.cpp -+++ b/qt5-ukui-filedialog/kyfiledialog.cpp -@@ -192,14 +192,14 @@ KyNativeFileDialog::KyNativeFileDialog(QWidget *parent) - - }); - connect(mKyFileDialogUi->m_pathbar, &Peony::AdvancedLocationBar::searchRequest, this, [=](const QString &path, const QString &key){ -- pDebug << "path.....:" << path << "key:" << key << m_lastSearchPath; -+ pDebug << "path.....:" << path << "key:" << key << m_last_no_SearchPath; - if(key == "") - { - forceStopLoading(); -- pDebug << "key is null m_lastSearchPath:" << m_lastSearchPath; -+ pDebug << "key is null m_last_no_SearchPath:" << m_last_no_SearchPath; - m_isClearSearchKey = true; - // m_needSearch = false; -- goToUri(m_lastSearchPath, true); -+ goToUri(m_last_no_SearchPath, true); - - // QCursor c; - // c.setShape(Qt::ArrowCursor); -@@ -1993,8 +1993,11 @@ void KyNativeFileDialog::searchButtonClicked() - mKyFileDialogUi->m_fileNameEdit->setReadOnly(false); - } - pDebug << "searchButtonClicked searchButtonClicked" <<m_searchMode; -- m_lastSearchPath = getCurrentUri(); -- pDebug << "m_lastSearchPath....." << m_lastSearchPath << getCurrentUri() << getCurrentPage()->getCurrentUri(); -+ -+ if (! getCurrentUri().startsWith("search://")) -+ m_last_no_SearchPath = getCurrentUri(); -+ -+ pDebug << "m_last_no_SearchPath....." << m_last_no_SearchPath << getCurrentUri() << getCurrentPage()->getCurrentUri(); - //Q_EMIT this->updateSearchRequest(m_search_mode); - setSearchMode(m_searchMode); - } -@@ -2003,7 +2006,7 @@ void KyNativeFileDialog::setSearchMode(bool mode) - { - mKyFileDialogUi->m_searchBtn->setCheckable(mode); - mKyFileDialogUi->m_searchBtn->setChecked(mode); -- mKyFileDialogUi->m_searchBtn->setDown(mode); -+// mKyFileDialogUi->m_searchBtn->setDown(mode); - mKyFileDialogUi->m_pathbar->switchEditMode(mode); - } - -diff --git a/qt5-ukui-filedialog/kyfiledialog.h b/qt5-ukui-filedialog/kyfiledialog.h -index 6ad68dd..290f2be 100644 ---- a/qt5-ukui-filedialog/kyfiledialog.h -+++ b/qt5-ukui-filedialog/kyfiledialog.h -@@ -272,7 +272,7 @@ private: - KyFileDialogHelper *m_fileDialogHelper = nullptr; - bool isInitialGoToUriNum = true; - bool m_shortcutsSet = false; -- QString m_lastSearchPath; -+ QString m_last_no_SearchPath; - bool m_isClearSearchKey = false; - QStringListModel *m_model = nullptr; - QString m_copyEditText; diff -Nru qt5-ukui-platformtheme-4.1.0.0/debian/patches/series qt5-ukui-platformtheme-4.10.0.1/debian/patches/series --- qt5-ukui-platformtheme-4.1.0.0/debian/patches/series 2024-08-09 09:24:53.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/debian/patches/series 2025-02-28 09:39:53.000000000 +0800 @@ -1,71 +1,7 @@ -0001-Add-a-changelog-2023.09.01-4.1.0.0-0k1.patch -0002-update-changelog.patch -0003-Add-a-changelog-2023.10.08-4.1.0.0-0k3.patch -0004-Add-a-changelog-2023.10.08-4.1.0.0-0k4.patch -0005-menu-tooltip.patch -0006-Add-a-changelog-2023.10.13-4.1.0.0-0k6.patch -0007-Add-a-changelog-2023.10.16-4.1.0.0-0k7.patch -0008-commit-2c7dbff6-fixbug145709.patch -0009-Add-a-changelog-2023.11.1-4.1.0.0-0k10.patch -0010-Update-changelog-4.1.0.0-0k11.patch -0011-Update-changelog-4.1.0.0-0k12.patch -0012-rebuild-for-qt-5.15.10.patch -0013-Update-changelog-4.1.0.0-0k14.patch -0014-Update-changelog-4.1.0.0-0k15.patch -0015-Update-changelog-4.1.0.0-0k16.patch -0016-Update-changelog-4.1.0.0-0k17.patch -0017-Update-changelog-4.1.0.0-0k18.patch -0018-Update-changelog-4.1.0.0-0k19.patch -0019-Update-changelog-4.1.0.0-0k20.patch -0020-Update-changelog-4.1.0.0-0k22.patch -0021-Update-changelog-4.1.0.0-0k23.patch -0022-Add-rounded-corners-for-tabbar-hover-state.patch -0023-Refresh-update-changelog-4.1.0.0-0k24.patch -0024-fixed-a0625c7-from-https-gitee.com-yangxibowen-qt5-u.patch -0025-Update-changelog-4.1.0.0-0k26.patch -0026-Update-changelog-4.1.0.0-0k27.patch -0027-Update-changelog-4.1.0.0-0k28.patch -0028-Update-changelog-4.1.0.0-0k29.patch -0029-Update-changelog-4.1.0.0-0k30.patch -0030-Update-changelog-4.1.0.0-0k31.patch -0031-test.patch -0032-Update-changelog-4.1.0.0-0k31.patch -0033-Remove-gitignore.patch -0034-progressbar.patch -0035-Update-changelog-2024.03.11-4.1.0.0-0k31.patch -0036-.patch -0037-Update-changelog-2024.04.10-4.1.0.0-0k33.patch -0038-Update-changelog-2024.04.16-4.1.0.0-0k34.patch -0039-translations-qt5-ukui-platformtheme_zh_Hans.ts.patch -0040-qt5-ukui-platformtheme-translations-qt5-ukui-platfor.patch -0041-Update-changelog-2024.04.19-4.1.0.0-0k35.patch -0042-.patch -0043-Update-changelog-2024.04.26-4.1.0.0-0k37.patch -0044-Deleted-translation-using-Weblate-Uyghur.patch -0045-Added-translation-using-Weblate-Uyghur.patch -0046-Deleted-translation-using-Weblate-Kyrgyz.patch -0047-Added-translation-using-Weblate-Uyghur.patch -0048-Deleted-translation-using-Weblate-Kyrgyz.patch -0049-Deleted-translation-using-Weblate-Kazakh.patch -0050-Added-translation-using-Weblate-Uyghur.patch -0051-Translated-using-Weblate-Uyghur.patch -0052-Translated-using-Weblate-Uyghur.patch -0053-Translated-using-Weblate-Uyghur.patch -0054-108.patch -0055-109.patch -0056-udpate-changelog.patch -0057-update-changelog.patch -0058-Update-changelog-2024.06.06-4.1.0.0-0k43.patch -0059-update-changelog.patch -0060-Translated-using-Weblate-Uyghur.patch -0061-Update-changelog-2024.06.19-4.1.0.0-ok45.patch -0062-Update-changelog-2024.06.28-4.1.0.0-ok45.patch -0063-Translated-using-Weblate-Uyghur.patch -0064-Translated-using-Weblate-Uyghur.patch -0065-Update-changelog-2024.07.11-4.1.0.0-ok47.patch -0066-Update-changelog-2024.07.11-4.1.0.0-ok48.patch -0067-Translated-using-Weblate-Kyrgyz.patch -0068-Translated-using-Weblate-Kyrgyz.patch -0069-Translated-using-Weblate-Kyrgyz.patch -0070-Update-changelog-2024.07.24-4.1.0.0-ok49.patch -0071-Update-changelog-2024.08.09-4.1.0.0-ok50.patch +0001-.patch +0002-Update-changelog-2024.12.23-4.10.0.1-ok0.3.patch +0003-ok2-copyright.patch +0004-.patch +0005-Add-comments-and-remove-debugging-code.patch +0006-.patch +0007-cameke.patch diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,93 @@ +cmake_minimum_required(VERSION 3.16) + +project(qt5-ukui-style) + +# 设置共享库的版本号 +set(QT5_UKUI-STYLE_VERSION_MAJOR 1) +set(QT5_UKUI-STYLE_VERSION_MINOR 0) +set(QT5_UKUI-STYLE_VERSION_PATCH 0) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(QT_MIN_VERSION "5.12.0") +set(KF5_MIN_VERSION "5.66.0") + +find_package(Qt5Concurrent) +find_package(Qt5Widgets) + +include_directories(${Qt5Widgets_PRIVATE_INCLUDE_DIRS}) +include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) + +#find_package(Qt5QtThemeSupport REQUIRED) + +find_package(KF5WindowSystem ${KF5_MIN_VERSION} CONFIG REQUIRED COMPONENTS) +find_package(KF5Wayland CONFIG REQUIRED COMPONENTS) + +find_package(X11) + +find_package(PkgConfig) +pkg_check_modules(GLIB2 REQUIRED glib-2.0 gio-2.0 ) +pkg_check_modules(Qsettings REQUIRED gsettings-qt) +pkg_check_modules(KYSDKCONF2 REQUIRED kysdk-conf2) + +include_directories(${Qsettings_INCLUDE_DIRS}) +include_directories(${GLIB2_INCLUDE_DIRS}) +if (KYSDKCONF2_FOUND) + include_directories(${KYSDKCONF2_INCLUDE_DIRS}) + link_directories(${KYSDKCONF2_LIBRARY_DIRS}) +endif() + +file(GLOB_RECURSE Header "*.h" "*.hpp") +file(GLOB_RECURSE Sources "*.cpp" "*.c" "*.ui") +file(GLOB_RECURSE XML "org.ukui.style.gschema.xml") + +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${Header} ${Sources} ${XML}) + +add_library(qt5-ukui-style SHARED ${Sources} ${Header} ${XML}) + +# 设置共享库的命名规则 +set_target_properties(qt5-ukui-style PROPERTIES + OUTPUT_NAME "qt5-ukui-style" + VERSION ${QT5_UKUI-STYLE_VERSION_MAJOR}.${QT5_UKUI-STYLE_VERSION_MINOR}.${QT5_UKUI-STYLE_VERSION_PATCH} + SOVERSION ${QT5_UKUI-STYLE_VERSION_MAJOR} +) + +target_link_libraries(qt5-ukui-style PRIVATE + Qt5::Widgets + Qt5::Concurrent + gsettings-qt + gio-2.0 + ${KYSDKCONF2_LIBRARIES} + ) + + +add_definitions(-DLIBQT5UKUISTYLE_LIBRARY) +add_definitions(-DQT_DEPRECATED_WARNINGS) +add_definitions(-DQT_MESSAGELOGCONTEXT) + + +if(UNIX) + set(TARGET_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + + install(TARGETS ${PROJECT_NAME} DESTINATION ${TARGET_PATH}) + + set(GSCHEMA_PATH "/usr/share/glib-2.0/schemas") + set(GSCHEMA_FILE "${CMAKE_CURRENT_SOURCE_DIR}/settings/org.ukui.style.gschema.xml") + install(FILES ${GSCHEMA_FILE} DESTINATION ${GSCHEMA_PATH}) + + set(KCONF2_PATH "/etc/kylin-config/basic/") + set(KCONF2_FILE "${CMAKE_CURRENT_SOURCE_DIR}/settings/org.ukui.style.yaml") + install(FILES ${KCONF2_FILE} DESTINATION ${KCONF2_PATH}) + + set(PKGCONFIG_PATH "${TARGET_PATH}/pkgconfig") + set(PKGCONFIG_FILE "${CMAKE_CURRENT_SOURCE_DIR}/development-files/qt5-ukui.pc") + install(FILES ${PKGCONFIG_FILE} DESTINATION ${PKGCONFIG_PATH}) + + install(FILES ${Header} DESTINATION "libqt5-ukui-style/") + +endif() diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/animation-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/animation-helper.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/animation-helper.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/animations.pri qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/animations.pri --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/animations.pri 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/animations.pri 1970-01-01 08:00:00.000000000 +0800 @@ -1,13 +0,0 @@ -INCLUDEPATH += $$PWD -INCLUDEPATH += $$PWD/.. - -include(tabwidget/tabwidget.pri) -include(scrollbar/scrollbar.pri) - -HEADERS += \ - $$PWD/animator-plugin-iface.h \ - $$PWD/animator-iface.h \ - $$PWD/animation-helper.h - -SOURCES += \ - $$PWD/animation-helper.cpp diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/animator-iface.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/animator-iface.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/animator-iface.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/animator-iface.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/animator-plugin-iface.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/animator-plugin-iface.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/animator-plugin-iface.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/animator-plugin-iface.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/scrollbar/scrollbar.pri qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/scrollbar/scrollbar.pri --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/scrollbar/scrollbar.pri 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/scrollbar/scrollbar.pri 1970-01-01 08:00:00.000000000 +0800 @@ -1,5 +0,0 @@ -HEADERS += \ - $$PWD/ukui-scrollbar-default-interaction-animator.h - -SOURCES += \ - $$PWD/ukui-scrollbar-default-interaction-animator.cpp diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.cpp qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.cpp --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/scrollbar/ukui-scrollbar-default-interaction-animator.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,7 +24,7 @@ #define UKUISCROLLBARDEFAULTINTERACTIONANIMATOR_H #include <QParallelAnimationGroup> -#include "animator-iface.h" +#include "../animator-iface.h" class QVariantAnimation; diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/tabwidget/tabwidget.pri qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/tabwidget/tabwidget.pri --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/tabwidget/tabwidget.pri 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/tabwidget/tabwidget.pri 1970-01-01 08:00:00.000000000 +0800 @@ -1,13 +0,0 @@ -INCLUDEPATH += $$PWD - -HEADERS += \ - $$PWD/ukui-tabwidget-animator-iface.h \ - $$PWD/ukui-tabwidget-animator-plugin-iface.h \ - $$PWD/ukui-tabwidget-default-slide-animator-factory.h \ - $$PWD/ukui-tabwidget-default-slide-animator.h - -SOURCES += \ - $$PWD/ukui-tabwidget-default-slide-animator-factory.cpp \ - $$PWD/ukui-tabwidget-default-slide-animator.cpp - -INCLUDEPATH += $$PWD/.. diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-iface.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-iface.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-iface.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-iface.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,7 +24,7 @@ #define UKUITABWIDGETANIMATORIFACE_H #include <QTabWidget> -#include "animator-iface.h" +#include "../animator-iface.h" /*! * \brief The UKUITabWidgetAnimatorIface class diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-plugin-iface.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-plugin-iface.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-plugin-iface.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-animator-plugin-iface.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,7 +24,7 @@ #define UKUITABWIDGETANIMATORPLUGINIFACE_H #include <QString> -#include "animator-plugin-iface.h" +#include "../animator-plugin-iface.h" #include "ukui-tabwidget-animator-iface.h" #define UKUITabWidgetAnimatorPluginInterface_iid "org.ukui.style.animatons.TabWidgetPluginInterface" diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.cpp qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.cpp --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.cpp qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.cpp --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/effects/effects.pri qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/effects/effects.pri --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/effects/effects.pri 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/effects/effects.pri 1970-01-01 08:00:00.000000000 +0800 @@ -1,8 +0,0 @@ -INCLUDEPATH += $$PWD -INCLUDEPATH += $$PWD/.. - -HEADERS += \ - $$PWD/highlight-effect.h - -SOURCES += \ - $$PWD/highlight-effect.cpp diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/effects/highlight-effect.cpp qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/effects/highlight-effect.cpp --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/effects/highlight-effect.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/effects/highlight-effect.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -398,9 +398,15 @@ option->state.testFlag(QStyle::State_Sunken) || option->state.testFlag(QStyle::State_On) || option->state.testFlag(QStyle::State_Selected); + if (qobject_cast<const QAbstractItemView *>(widget)) { if (!option->state.testFlag(QStyle::State_Selected)) overOrDown = false; + } else if (option->styleObject && option->styleObject->inherits("QQuickStyleItem1")) { + // 修复qml菜单高亮状态异常问题 + overOrDown = option->state.testFlag(QStyle::State_MouseOver) || + option->state.testFlag(QStyle::State_Sunken) || + option->state.testFlag(QStyle::State_Selected); } QPainter p(&target); diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/effects/highlight-effect.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/effects/highlight-effect.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/effects/highlight-effect.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/effects/highlight-effect.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/gestures/gestures.pri qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/gestures/gestures.pri --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/gestures/gestures.pri 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/gestures/gestures.pri 1970-01-01 08:00:00.000000000 +0800 @@ -1,10 +0,0 @@ -INCLUDEPATH += $$PWD -INCLUDEPATH += $$PWD/.. - -HEADERS += \ - $$PWD/ukui-two-finger-slide-gesture.h \ - $$PWD/ukui-two-finger-zoom-gesture.h - -SOURCES += \ - $$PWD/ukui-two-finger-slide-gesture.cpp \ - $$PWD/ukui-two-finger-zoom-gesture.cpp diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.cpp qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.cpp --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/gestures/ukui-two-finger-slide-gesture.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.cpp qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.cpp --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/gestures/ukui-two-finger-zoom-gesture.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/internal-styles/internal-style.cpp qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/internal-styles/internal-style.cpp --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/internal-styles/internal-style.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/internal-styles/internal-style.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/internal-styles/internal-style.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/internal-styles/internal-style.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/internal-styles/internal-style.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/internal-styles/internal-style.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/internal-styles/internal-styles.pri qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/internal-styles/internal-styles.pri --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/internal-styles/internal-styles.pri 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/internal-styles/internal-styles.pri 1970-01-01 08:00:00.000000000 +0800 @@ -1,8 +0,0 @@ -INCLUDEPATH += $$PWD -INCLUDEPATH += $$PWD/.. - -SOURCES += $$PWD/internal-style.cpp \ - $$PWD/mps-style.cpp - -HEADERS += $$PWD/internal-style.h \ - $$PWD/mps-style.h diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/internal-styles/mps-style.cpp qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/internal-styles/mps-style.cpp --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/internal-styles/mps-style.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/internal-styles/mps-style.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/internal-styles/mps-style.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/internal-styles/mps-style.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/internal-styles/mps-style.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/internal-styles/mps-style.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/libqt5-ukui-style.pri qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/libqt5-ukui-style.pri --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/libqt5-ukui-style.pri 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/libqt5-ukui-style.pri 1970-01-01 08:00:00.000000000 +0800 @@ -1,7 +0,0 @@ -INCLUDEPATH += $$PWD - -include(animations/animations.pri) -include(settings/settings.pri) -include(internal-styles/internal-styles.pri) -include(effects/effects.pri) -include(gestures/gestures.pri) diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/libqt5-ukui-style.pro qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/libqt5-ukui-style.pro --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/libqt5-ukui-style.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/libqt5-ukui-style.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,46 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2020-01-02T12:00:35 -# -#------------------------------------------------- - -QT += widgets concurrent - -TARGET = qt5-ukui-style -TEMPLATE = lib - -DEFINES += LIBQT5UKUISTYLE_LIBRARY - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which has been marked as deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS -#DEFINES += QT_NO_DEBUG_OUTPUT -DEFINES += QT_MESSAGELOGCONTEXT - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -include(libqt5-ukui-style.pri) - -CONFIG += c++11 link_pkgconfig -PKGCONFIG += gsettings-qt - -DISTFILES += \ - org.ukui.style.gschema.xml - -unix { - target.path = $$[QT_INSTALL_LIBS] - INSTALLS += target - - gschema.path = /usr/share/glib-2.0/schemas - gschema.files += $$PWD/settings/org.ukui.style.gschema.xml - INSTALLS += gschema - - pkgconfig.path = $$[QT_INSTALL_LIBS]/pkgconfig - pkgconfig.files += development-files/qt5-ukui.pc - INSTALLS += pkgconfig -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/application-style-settings.cpp qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/application-style-settings.cpp --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/application-style-settings.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/application-style-settings.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/application-style-settings.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/application-style-settings.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/application-style-settings.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/application-style-settings.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/black-list.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/black-list.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/black-list.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/black-list.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -44,7 +44,7 @@ static const QStringList blackAppListWithBlurHelper() { QStringList l; l<<"youker-assistant"; - l<<"kylin-assistant"; +// l<<"kylin-assistant"; // l<<"kylin-video"; // l<<"ukui-control-center"; l<<"ubuntu-kylin-software-center.py"; @@ -92,6 +92,8 @@ l<<"kylin-video"; l<<"kylin-ipmsg"; l<<"kylin-weather"; + l<<"ukui-notebook"; + // l<<"kylin-recorder"; return l; @@ -102,8 +104,22 @@ QStringList l; l<<"ukui-menu"; l<<"platformthemeDemo"; + l<<"ukui-greeter-dialog"; + l<<"ukui-screensaver"; return l; } +static const QStringList windowManageBlackList() { + QStringList l; + l << "iflyime-spe-sym"; + l << "iflyime-qimpanel"; + l << "iflyime-setw"; + l << "iflyime-sett"; + l << "iflyime-qim"; + l << "iflyime-hw"; + l << "SpecificSymbol"; + return l; +} + #endif // BLACKLIST_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/libqt5-ukui-style_global.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/libqt5-ukui-style_global.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/libqt5-ukui-style_global.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/libqt5-ukui-style_global.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -25,8 +25,6 @@ #include <QtCore/qglobal.h> -#define blackStyleChangeApp "kylin-software-center" - #if defined(LIBQT5UKUISTYLE_LIBRARY) # define LIBQT5UKUISTYLESHARED_EXPORT Q_DECL_EXPORT #else diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/org.ukui.style.gschema.xml qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/org.ukui.style.gschema.xml --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/org.ukui.style.gschema.xml 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/org.ukui.style.gschema.xml 2024-12-20 09:22:49.000000000 +0800 @@ -61,9 +61,10 @@ <description>Set default system palette for UKUI desktop environment.</description> </key> <key type="s" name="theme-color"> - <default>"daybreakBlue"</default> + <default>"#3790FA"</default> <summary> theme color</summary> - <description>Set theme color for UKUI desktop environment.include default,daybreakBlue,jamPurple,magenta,sunRed,sunsetOrange,dustGold,polarGreen</description> + <description>Set theme color for UKUI desktop environment.include default,daybreakBlue,jamPurple,magenta,sunRed,sunsetOrange,dustGold,polarGreen, + and using rgba for example "(125,125,125) or #3790FA" </description> </key> <key type="b" name="cursor-blink"> <default>true</default> @@ -87,5 +88,11 @@ <summary>Custom highlight color</summary> <description>Set custom highlight color for UKUI desktop environment.Now is to compatible with third party application</description> </key> + <key type="i" name="window-radius"> + <default>12</default> + <range min="0" max="12"/> + <summary>Window Radius</summary> + <description>Set the rounded corner size of the window</description> + </key> </schema> </schemalist> diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/org.ukui.style.yaml qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/org.ukui.style.yaml --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/org.ukui.style.yaml 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/org.ukui.style.yaml 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,94 @@ +style: + 4.3.1.2: + keys: + blur-exception-classes: + _type: s + default: '[]' + description: 'Example: [QWidget, QWidget1, QWidget2]' + summary: a list of QWidget based classes do not blur. + cursor-blink: + _type: b + default: 'true' + description: Globally enable or disable blinking text cursor. + summary: Blink text cursor. + cursor-blink-time: + _type: i + default: '1200' + description: The interval of text cursor blink. + summary: Blink text cursor interval. + custom-highlight-color: + _type: s + default: '#3D6BE5' + description: Set custom highlight color for UKUI desktop environment.Now is + to compatible with third party application + summary: Custom highlight color + enabled-global-blur: + _type: b + default: 'true' + description: "Globally enable or disable the window blur effects for transparent\ + \ window.\n Setting it to \"false\" will disable the effects." + summary: Enable Window Blur Effects. + icon-theme-name: + _type: s + default: ukui-icon-theme-default + description: Icon Theme for Qt Applications.Have ukui ukui-classical ukui-fashion + summary: Icon Theme for Qt Applications. + menu-transparency: + _type: i + default: '72' + description: The default transparency of menu. + summary: Menu's transparency. + peony-side-bar-transparency: + _type: i + default: '72' + description: The default transparency of the peony side bar. + summary: Peony::SideBar's transparency. + style-name: + _type: s + default: ukui-light + description: Set style for UKUI desktop environment. Have ukui-dark ukui-default + ukui-light + summary: Current Qt Style + system-font: + _type: s + default: Noto Sans CJK SC + description: System Font for Qt Applications. + summary: System Font for Qt Applications. + system-font-size: + _type: s + default: '11' + description: System Font Size for Qt Applications. Use point size. + summary: System Font Size for Qt Applications. + system-palette: + _type: s + default: '' + description: Set default system palette for UKUI desktop environment. + summary: System Palette + theme-color: + _type: s + default: '#3790FA' + description: "Set theme color for UKUI desktop environment.include default,daybreakBlue,jamPurple,magenta,sunRed,sunsetOrange,dustGold,polarGreen,\n\ + \ and using rgba for example \"(125,125,125) or #3790FA" + summary: theme color + use-custom-highlight-color: + _type: b + default: 'false' + description: Globally enable or disable custom highlight color.Now is to compatible + with third party application + summary: Use custom highlight color. + use-system-palette: + _type: b + default: 'false' + description: Globally enable or disable system palette provided by ukui platform. + summary: Use system palette. + widget-theme-name: + _type: s + default: default + description: Set system theme. Have default,classical and fashion + summary: Current widget theme name + window-radius: + _type: i + default: '12' + description: Set the rounded corner size of the window + range: 0,12 + summary: Window Radius diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/settings.pri qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/settings.pri --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/settings.pri 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/settings.pri 1970-01-01 08:00:00.000000000 +0800 @@ -1,10 +0,0 @@ -HEADERS += $$PWD/libqt5-ukui-style_global.h \ - $$PWD/ukui-style-settings.h \ - $$PWD/black-list.h \ - $$PWD/application-style-settings.h - -SOURCES += $$PWD/ukui-style-settings.cpp \ - $$PWD/application-style-settings.cpp - -INCLUDEPATH += $$PWD/.. -INCLUDEPATH += $$PWD diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/ukui-style-conf-settings.cpp qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/ukui-style-conf-settings.cpp --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/ukui-style-conf-settings.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/ukui-style-conf-settings.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,231 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: xibowen <xibowen@kylinos.cn> + * + */ + +#include "ukui-style-conf-settings.h" +#include "libkysettings.h" +#include <glib.h> +#include <QDebug> + +//char to QString +QString qtify_name(const char *name) +{ + bool next_cap = false; + QString result; + + while (*name) { + if (*name == '-') { + next_cap = true; + } else if (next_cap) { + result.append(QChar(*name).toUpper().toLatin1()); + next_cap = false; + } else { + result.append(*name); + } + + name++; + } + + return result; +} + +//QString to char +char * unqtify_name(const QString &name) +{ + const char *p; + QByteArray bytes; + GString *str; + + bytes = name.toUtf8(); + str = g_string_new (NULL); + + for (p = bytes.constData(); *p; p++) { + const QChar c(*p); + if (c.isUpper()) { + g_string_append_c (str, '-'); + g_string_append_c (str, c.toLower().toLatin1()); + } + else { + g_string_append_c (str, *p); + } + } + + return g_string_free(str, FALSE); +} + + +static void settingChanged(KSettings *ukuistyle_settings, const char *key, void *user_data) +{ + ukuiStyleConfSettings *self = (ukuiStyleConfSettings *)user_data; + + QMetaObject::invokeMethod(self, "changed", Qt::QueuedConnection, Q_ARG(QString, qtify_name(key))); +} + +ukuiStyleConfSettings::ukuiStyleConfSettings(const QByteArray &schema_id) +{ + if (!ukuistyle_settings) + ukuistyle_settings = kdk_conf2_new(schema_id, NULL); + + signal_handler_id = kdk_conf2_connect_signal(ukuistyle_settings, "changed", + (KCallBack)settingChanged, this); +} + +ukuiStyleConfSettings::~ukuiStyleConfSettings() +{ + if (ukuistyle_settings) { + kdk_conf2_ksettings_destroy(ukuistyle_settings); + ukuistyle_settings = NULL; + } +} + +QVariant ukuiStyleConfSettings::types_to_qvariant(const char *key,const char* value) const +{ + char *type = kdk_conf2_get_type(this->ukuistyle_settings, key); + switch (*type) { + case VARIANT_CLASS_BOOLEAN: + return QVariant(value); + + case VARIANT_CLASS_BYTE: + return QVariant(QString(value)); + + case VARIANT_CLASS_INT16: + return QVariant(QString(value).toShort()); + + case VARIANT_CLASS_UINT16: + return QVariant(QString(value).toUShort()); + + case VARIANT_CLASS_INT32: + return QVariant(QString(value).toInt()); + + case VARIANT_CLASS_UINT32: + return QVariant(QString(value).toUInt()); + + case VARIANT_CLASS_INT64: + return QVariant(QString(value).toLongLong()); + + case VARIANT_CLASS_UINT64: + return QVariant(QString(value).toULongLong()); + + case VARIANT_CLASS_DOUBLE: + return QVariant(QString(value).toDouble()); + + case VARIANT_CLASS_STRING: + return QVariant(QString(value)); + + case VARIANT_CLASS_ARRAY: +// if (g_variant_is_of_type(value, G_VARIANT_TYPE_STRING_ARRAY)) { +// GVariantIter iter; +// QStringList list; +// const gchar *str; + +// g_variant_iter_init (&iter, value); +// while (g_variant_iter_next (&iter, "&s", &str)) +// list.append (str); + +// return QVariant(list); +// } else if (g_variant_is_of_type(value, G_VARIANT_TYPE_BYTESTRING)) { +// return QVariant(QByteArray(g_variant_get_bytestring(value))); +// } else if (g_variant_is_of_type(value, G_VARIANT_TYPE("a{ss}"))) { +// GVariantIter iter; +// QMap<QString, QVariant> map; +// const gchar *key; +// const gchar *val; + +// g_variant_iter_init (&iter, value); +// while (g_variant_iter_next (&iter, "{&s&s}", &key, &val)) +// map.insert(key, QVariant(val)); + +// return map; +// } + + // fall through + default: + g_assert_not_reached(); + } +} + +QVariant ukuiStyleConfSettings::get(const QString &key) const +{ + char *ckey = unqtify_name(key); + char *value = kdk_conf2_get_value(ukuistyle_settings, ckey); + + QVariant qvalue = types_to_qvariant(ckey, value); + + g_free(value); + g_free(ckey); + return qvalue; +} + +void ukuiStyleConfSettings::set(const QString &key, const QVariant &value) +{ + if (!this->trySet(key, value)) + qWarning("unable to set key '%s' to value '%s'", key.toUtf8().constData(), value.toString().toUtf8().constData()); +} + +bool ukuiStyleConfSettings::trySet(const QString &key, const QVariant &value) +{ + if (!ukuistyle_settings) + return false; + + char *ckey = unqtify_name(key); + char *cvalue = unqtify_name(value.value<QString>()); + bool success = false; + + success = kdk_conf2_set_value(ukuistyle_settings, ckey, cvalue); + g_free(ckey); + g_free(cvalue); + return success; +} + +QStringList ukuiStyleConfSettings::keys() const +{ + QStringList list; + + char **keys = kdk_conf2_list_keys(ukuistyle_settings); + for (int i = 0; keys[i]; i++) + list.append(qtify_name(keys[i])); + + g_strfreev(keys); + + return list; +} + +void ukuiStyleConfSettings::reset(const QString &qkey) +{ + if (!ukuistyle_settings) + return; + + char *key = unqtify_name(qkey); + kdk_conf2_reset(ukuistyle_settings, key); + g_free(key); +} + +bool ukuiStyleConfSettings::isSettingsAvailable(const QString &schema_id) +{ + char *schema = unqtify_name(schema_id); + bool result = false; + if (kdk_conf2_new(schema, NULL)) { + result = true; + } + + g_free(schema); + return result; +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/ukui-style-conf-settings.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/ukui-style-conf-settings.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/ukui-style-conf-settings.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/ukui-style-conf-settings.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,87 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: xibowen <xibowen@kylinos.cn> + * + */ + +#ifndef UKUISTYLECONFSETTINGS_H +#define UKUISTYLECONFSETTINGS_H + + +#include <QObject> +#include <QVariant> + +typedef struct _KSettings KSettings; + +class ukuiStyleConfSettings : public QObject +{ + Q_OBJECT +public: + + enum VariantClass { + VARIANT_CLASS_BOOLEAN = 'b', + VARIANT_CLASS_BYTE = 'y', + VARIANT_CLASS_INT16 = 'n', + VARIANT_CLASS_UINT16 = 'q', + VARIANT_CLASS_INT32 = 'i', + VARIANT_CLASS_UINT32 = 'u', + VARIANT_CLASS_INT64 = 'x', + VARIANT_CLASS_UINT64 = 't', + VARIANT_CLASS_HANDLE = 'h', + VARIANT_CLASS_DOUBLE = 'd', + VARIANT_CLASS_STRING = 's', + VARIANT_CLASS_OBJECT_PATH = 'o', + VARIANT_CLASS_SIGNATURE = 'g', + VARIANT_CLASS_VARIANT = 'v', + VARIANT_CLASS_MAYBE = 'm', + VARIANT_CLASS_ARRAY = 'a', + VARIANT_CLASS_TUPLE = '(', + VARIANT_CLASS_DICT_ENTRY = '{' + }; + + + ukuiStyleConfSettings(const QByteArray &schema_id); + + ~ukuiStyleConfSettings(); + + QVariant types_to_qvariant(const char *key, const char *value) const; + + static ukuiStyleConfSettings *globalInstance(); + + QVariant get(const QString &key) const; + + void set(const QString &key, const QVariant &value); + + bool trySet(const QString &key, const QVariant &value); + + QStringList keys() const; + + void reset(const QString &key); + + static bool isSettingsAvailable(const QString &schema_id); + +Q_SIGNALS: + void changed(const QString &key); + +private: + KSettings *ukuistyle_settings = NULL; + long signal_handler_id; +}; + +#endif // UKUISTYLECONFSETTINGS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/ukui-style-settings.cpp qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/ukui-style-settings.cpp --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/ukui-style-settings.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/ukui-style-settings.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/ukui-style-settings.h qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/ukui-style-settings.h --- qt5-ukui-platformtheme-4.1.0.0/libqt5-ukui-style/settings/ukui-style-settings.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/libqt5-ukui-style/settings/ukui-style-settings.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -26,6 +26,9 @@ #include "libqt5-ukui-style_global.h" #include <QGSettings> +//Fix me:after so +//#include "ukui-style-conf-settings.h" + /*! * \brief The UKUIStyleSettings class * \details diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,280 @@ +cmake_minimum_required(VERSION 3.16) + +project(qt5-ukui-filedialog) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(QT_MIN_VERSION "5.12.0") +set(KF5_MIN_VERSION "5.66.0") + +# QtCreator supports the following variables for Android, which are identical to qmake Android variables. +# Check http://doc.qt.io/qt-5/deployment-android.html for more information. +# They need to be set before the find_package(Qt5 ...) call. + +#if(ANDROID) +# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android") +# if (ANDROID_ABI STREQUAL "armeabi-v7a") +# set(ANDROID_EXTRA_LIBS +# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libcrypto.so +# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libssl.so) +# endif() +#endif() + +find_package(Qt5Gui) +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + DBus + Widgets + X11Extras +) + +include_directories(${Qt5Widgets_PRIVATE_INCLUDE_DIRS}) +include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) + + +find_package(Qt5LinguistTools) + +find_package(KF5WindowSystem ${KF5_MIN_VERSION} CONFIG REQUIRED COMPONENTS) +find_package(KF5Wayland CONFIG REQUIRED COMPONENTS) + +find_package(X11) + +find_package(PkgConfig) +pkg_check_modules(QGSETTINGS REQUIRED gsettings-qt) +pkg_check_modules(PEONY REQUIRED peony) +pkg_check_modules(REQUIRED kysdk-waylandhelper) +pkg_check_modules(GLIB2 REQUIRED glib-2.0 gio-2.0 ) +pkg_check_modules(KYSDKWAYLANDHELPER REQUIRED kysdk-waylandhelper) +pkg_check_modules(KYSDKCONF2 REQUIRED kysdk-conf2) + +include_directories(${QGSETTINGS_INCLUDE_DIRS}) +include_directories(${GLIB2_INCLUDE_DIRS}) + +if (PEONY_FOUND) + include_directories(${PEONY_INCLUDE_DIRS}) + link_directories(${PEONY_LIBRARY_DIRS}) +endif() +if (KYSDKWAYLANDHELPER_FOUND) + include_directories(${KYSDKWAYLANDHELPER_INCLUDE_DIRS}) + link_directories(${KYSDKWAYLANDHELPER_LIBRARY_DIRS}) +endif() +if (QGSETTINGS_FOUND) + include_directories(${QGSETTINGS_INCLUDE_DIRS}) + link_directories(${QGSETTINGS_LIBRARY_DIRS}) +endif() + +if (KYSDKCONF2_FOUND) + include_directories(${KYSDKCONF2_INCLUDE_DIRS}) + link_directories(${KYSDKCONF2_LIBRARY_DIRS}) +endif() + +include_directories(../libqt5-ukui-style/) + +file(GLOB_RECURSE TS_FILES + translations/qt5-ukui-filedialog_zh_HK.ts + translations/qt5-ukui-filedialog_zh_Hant.ts + translations/qt5-ukui-filedialog_zh_Hans.ts + translations/qt5-ukui-filedialog_zh_CN.ts + translations/qt5-ukui-filedialog_ug.ts + translations/qt5-ukui-filedialog_tr.ts + translations/qt5-ukui-filedialog_mn.ts + translations/qt5-ukui-filedialog_ky.ts + translations/qt5-ukui-filedialog_kk.ts + translations/qt5-ukui-filedialog_fr.ts + translations/qt5-ukui-filedialog_fa.ts + translations/qt5-ukui-filedialog_es.ts + translations/qt5-ukui-filedialog_en_US.ts + translations/qt5-ukui-filedialog_de.ts + translations/qt5-ukui-filedialog_cs.ts + translations/qt5-ukui-filedialog_bo_CN.ts + ) + +set(Sources + sidebar.cpp + kyfiledialogprivate.cpp + kyfiledialog.cpp + uikyfiledialog.cpp + pathbar.cpp + menutoolbutoon.cpp + filedialogplugin.cpp + sidebar.h + kyfiledialogprivate.h + uikyfiledialog.h + pathbar.h + menutoolbutoon.h + kyfiledialog.h + filedialogplugin.h + filedialogplugin_global.h + filedialoginterface.h + debug.h + file-operation-dialog/kyfiledialogrename.cpp + file-operation-dialog/kyfiledialogrename.h + file-operation-dialog/kyfileoperationdialog.cpp + file-operation-dialog/kyfileoperationdialog.h + file-operation-dialog/rename-editor.cpp + file-operation-dialog/rename-editor.h + ) + +set(Json + filedialogplugin.json) + +# i18n +set(UKUI_TRANSLATIONS_DIR "/usr/share/qt5-ukui-platformtheme") +add_definitions( + -DUKUI_TRANSLATIONS_DIR="${UKUI_TRANSLATIONS_DIR}" +) +if (NOT DEFINED UPDATE_TRANSLATIONS) + set(UPDATE_TRANSLATIONS "No") +endif() + +# To create a new ts file: lupdate -recursive . -target-language en_US -ts translations/en_US.ts -no-ui-lines +#file(GLOB TS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts") +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${TS_FILES}) + + +# cmake -DUPDATE_TRANSLATIONS=yes +if (UPDATE_TRANSLATIONS) + qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) +else() + qt5_add_translation(QM_FILES ${TS_FILES}) +endif() + +MESSAGE("QM_FILES PATH: ${QM_FILES}") + +add_custom_target(translations ALL DEPENDS ${QM_FILES}) + +add_library(qt5-ukui-filedialog MODULE ${Sources} ${Json} ${TS_FILES}) + +target_link_libraries(qt5-ukui-filedialog + Qt5::Widgets + Qt5::DBus + Qt5::Gui + Qt5::X11Extras + KF5::WaylandClient + KF5::WindowSystem + ${QGSETTINGS_LIBRARIES} + ${KYSDKWAYLANDHELPER_LIBRARIES} + xcb + glib-2.0 + ${PEONY_LIBRARIES} + ${XCB_LIBS} + qt5-ukui-style + ${KYSDKCONF2_LIBRARIES} + ) + +add_definitions(-DQT5UKUIPLATFORMTHEME_LIBRARY) +add_definitions(-DQT_DEPRECATED_WARNINGS) +add_definitions(-DQT_MESSAGELOGCONTEXT) + +if(UNIX) + set(TARGET_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/qt5/plugins") + + MESSAGE("libqt5-ukui-filedialog TARGET_PATH: ${TARGET_PATH}") + + install(TARGETS ${PROJECT_NAME} DESTINATION ${TARGET_PATH}/platformthemes/) + + install(FILES ${QM_FILES} DESTINATION "${UKUI_TRANSLATIONS_DIR}") +endif() + +set(test_libs + Qt5::Widgets + glib-2.0 + peony + ) + +SET(_code " + #include <glib-object.h> + #include <peony-qt/search-vfs-uri-parser.h> + + int main() + { + Peony::SearchVFSUriParser::addSearchKey(\"\", true); + return 0; + }") +SET(_file ${CMAKE_CURRENT_BINARY_DIR}/DetermineHavePeonyInterface.cpp) +FILE(WRITE "${_file}" "${_code}") +TRY_COMPILE(HAVE_PEONY_INTERFACE + "${CMAKE_CURRENT_BINARY_DIR}" + "${_file}" + LINK_LIBRARIES ${test_libs} + CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${GLIB2_INCLUDE_DIRS} ${PEONY_INCLUDE_DIRS}" + OUTPUT_VARIABLE OUTPUT) +MESSAGE("Build output: ${OUTPUT} HAVE_PEONY_INTERFACE: ${HAVE_PEONY_INTERFACE}") + +if(HAVE_PEONY_INTERFACE) + add_definitions(-DHAVE_PEONY_INTERFACE=1) +endif() + + +#set(OPEN_ACTIONS_SEPARATOR "open-actions-seperator") +#set(CREATE_ACTIONS_SEPARATOR "create-actions-seperator") +#set(VIEW_ACTIONS_SEPARATOR "view-actions-seperator") +#set(FILE_OPERATION_ACTIONS_SEPARATOR "file-operation-actions-seperator") +#set(PLUGIN_ACTIONS_SEPARATOR "plugin-actions-seperator") +#set(PROPERTIES_ACTIONS_SEPARATOR "properties-actions-seperator") +#set(COMPUTER_ACTIONS_SEPARATOR "computer-actions-seperator") +#set(TRASH_ACTIONS_SEPARATOR "trash-actions-seperator") +#set(OPEN_IN_NEW_WINDOW_ACTION "open-in-new-window-action") +#set(OPEN_IN_NEW_TAB_ACTION "open-in-new-tab-action") +#set(ADD_TO_BOOKMARK_ACTION "add-to-bookmark-action") +#set(OPEN_ACTION "open-action") +#set(OPEN_WITH_ACTION "open-with-action") +#set(OPEN_SELECTED_FILES_ACTION "open-selected-files-action") +#set(CREATE_ACTION "create-action") +#set(VIEW_TYPE_ACTION "view-type-action") +#set(SORT_TYPE_ACTION "sort-type-action") +#set(SORT_ORDER_ACTION "sort-order-action") +#set(SORT_PREFERENCES_ACTION "sort-preferences-action") +#set(COPY_ACTION "copy-action") +#set(CUT_ACTION "cut-action") +#set(TRASH_ACTION "trash-action") +#set(DELETE_ACTION "delete-action") +#set(RENAME_ACTION "rename-action") +#set(PASTE_ACTION "paste-action") +#set(REFRESH_ACTION "refresh-action") +#set(SELECT_ALL_ACTION "select-all-action") +#set(REVERSE_SELECT_ACTION "reverse-select-action") +#set(PROPERTIES_ACTION "properties-action") +#set(FORMAT_ACTION "format-action") +#set(CLEAN_THE_TRASH_ACTION "clean-the-trash-action") +#set(RESTORE_ACTION "restore-action") +#set(CLEAN_THE_RECENT_ACTION "clean-the-recent-action") + +#add_compile_definitions(OPEN_ACTIONS_SEPARATOR=${OPEN_ACTIONS_SEPARATOR}) +#add_compile_definitions(CREATE_ACTIONS_SEPARATOR=${CREATE_ACTIONS_SEPARATOR}) +#add_compile_definitions(VIEW_ACTIONS_SEPARATOR=${VIEW_ACTIONS_SEPARATOR}) +#add_compile_definitions(FILE_OPERATION_ACTIONS_SEPARATOR=${FILE_OPERATION_ACTIONS_SEPARATOR}) +#add_compile_definitions(PLUGIN_ACTIONS_SEPARATOR=${PLUGIN_ACTIONS_SEPARATOR}) +#add_compile_definitions(PROPERTIES_ACTIONS_SEPARATOR=${PROPERTIES_ACTIONS_SEPARATOR}) +#add_compile_definitions(COMPUTER_ACTIONS_SEPARATOR=${COMPUTER_ACTIONS_SEPARATOR}) +#add_compile_definitions(TRASH_ACTIONS_SEPARATOR=${TRASH_ACTIONS_SEPARATOR}) +#add_compile_definitions(OPEN_IN_NEW_WINDOW_ACTION=${OPEN_IN_NEW_WINDOW_ACTION}) +#add_compile_definitions(OPEN_IN_NEW_TAB_ACTION=${OPEN_IN_NEW_TAB_ACTION}) +#add_compile_definitions(ADD_TO_BOOKMARK_ACTION=${ADD_TO_BOOKMARK_ACTION}) +#add_compile_definitions(OPEN_ACTION=${OPEN_ACTION}) +#add_compile_definitions(OPEN_WITH_ACTION=${OPEN_WITH_ACTION}) +#add_compile_definitions(OPEN_SELECTED_FILES_ACTION=${OPEN_SELECTED_FILES_ACTION}) +#add_compile_definitions(CREATE_ACTION=${CREATE_ACTION}) +#add_compile_definitions(VIEW_TYPE_ACTION=${VIEW_TYPE_ACTION}) +#add_compile_definitions(SORT_TYPE_ACTION=${SORT_TYPE_ACTION}) +#add_compile_definitions(SORT_ORDER_ACTION=${SORT_ORDER_ACTION}) +#add_compile_definitions(SORT_PREFERENCES_ACTION=${SORT_PREFERENCES_ACTION}) +#add_compile_definitions(COPY_ACTION=${COPY_ACTION}) +#add_compile_definitions(CUT_ACTION=${CUT_ACTION}) +#add_compile_definitions(TRASH_ACTION=${TRASH_ACTION}) +#add_compile_definitions(DELETE_ACTION=${DELETE_ACTION}) +#add_compile_definitions(RENAME_ACTION=${RENAME_ACTION}) +#add_compile_definitions(PASTE_ACTION=${PASTE_ACTION}) +#add_compile_definitions(REFRESH_ACTION=${REFRESH_ACTION}) +#add_compile_definitions(SELECT_ALL_ACTION=${SELECT_ALL_ACTION}) +#add_compile_definitions(REVERSE_SELECT_ACTION=${REVERSE_SELECT_ACTION}) +#add_compile_definitions(PROPERTIES_ACTION=${PROPERTIES_ACTION}) +#add_compile_definitions(FORMAT_ACTION=${FORMAT_ACTION}) +#add_compile_definitions(CLEAN_THE_TRASH_ACTION=${CLEAN_THE_TRASH_ACTION}) +#add_compile_definitions(RESTORE_ACTION=${RESTORE_ACTION}) +#add_compile_definitions(CLEAN_THE_RECENT_ACTION=${CLEAN_THE_RECENT_ACTION}) + diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/debug.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/debug.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/debug.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/debug.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,37 @@ +#ifndef PDEBUG_H +#define PDEBUG_H +#include <QDebug> +#include <QDateTime> + +#define UKUI_SEARCH_SCHEMAS "org.ukui.search.settings" +#define SEARCH_METHOD_KEY "fileIndexEnable" + +class NullDebug + +{ + +public: + +template<typename T> + +NullDebug & operator <<(const T&){return *this;} + +}; + +inline NullDebug nullDebug(){return NullDebug();} + + + +//#define LOG_TIMI + +#ifdef LOG_TIMI + +# define pDebug qDebug() << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss:zzz") << " platformtheme input:" + +#else + +# define pDebug nullDebug() + +#endif + +#endif // KYFILEDIALOG_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,665 @@ +#include "kyfiledialogrename.h" + +#include <QStackedWidget> +#include <QGridLayout> +#include <QHBoxLayout> +#include <QLabel> +#include <QDialogButtonBox> +#include <QPushButton> +#include <QTextEdit> +#include <QRadioButton> +#include <QButtonGroup> +#include <QCheckBox> +#include <QFileInfo> +#include <QStandardPaths> + +#include <QApplication> +#include <QFontMetrics> +#include "file-utils.h" +#include "rename-editor.h" +#include "../kyfiledialog.h" +#include "../debug.h" + +#define PEONY_TRUNCATE_NAME_LIMIT 225 +#define PEONY_RENAME_LIMIT 255 + +extern bool isFuseFileSystem(QString path); + +MyTextEdit:: MyTextEdit(QWidget *parent) : QTextEdit(parent) +{ + setReadOnly(true); + setStyleSheet("QTextEdit { border: none; }"); + setWordWrapMode(QTextOption::WrapAnywhere); +} + +MyTextEdit::~MyTextEdit() +{ + +} + +KyFileDialogRename::KyFileDialogRename(QWidget *parent) : KyFileOperationDialog(parent), Peony::FileOperationErrorHandler() +{ + setFixedWidth(600); + setFixedHeight(300); +} + +KyFileDialogRename::~KyFileDialogRename() +{ + +} + +void KyFileDialogRename::handle(Peony::FileOperationError &error) +{ + Peony::ExceptionResponse responseCode = Peony::ExceptionResponse::Cancel; + QString newName = Peony::FileUtils::getUriBaseName(error.destDirUri); + newName = Peony::FileUtils::urlDecode(newName); + + auto fsType = Peony::FileUtils::getFsTypeFromFile(m_currentUri); + QString path = error.destDirUri.left(error.destDirUri.lastIndexOf("/")); + if(isFuseFileSystem(path)) + fsType = "fuse.kyfs"; + pDebug << "handle path......" << path << fsType; + + QString byteText(tr("bytes")); + QString capitalByteText(tr("Bytes")); + + if (fsType.contains("ntfs") || fsType.contains("fuse.kyfs")) { + byteText = QString(tr("character")); + capitalByteText = QString(tr("Character")); + } + + auto stack = new QStackedWidget(this); + stack->setContentsMargins(20, 0, 20, 20); + auto layout = new QHBoxLayout; + layout->setContentsMargins(0, 0, 0, 0); + layout->addWidget(stack); + mainWidget()->setLayout(layout); + + // todo: + // 根据错误码和文件操作码拼接文件信息 + QString line1; + QString line2; + QString line3; + + switch (error.op) { + case Peony::FileOpRename: { + line1 = tr("File \"%1\"").arg(newName); + line2 = tr("Saving failed, the reason is: %1").arg(error.errorCode == G_IO_ERROR_FILENAME_TOO_LONG? + tr("The file name is too long. "): error.errorStr) + + tr("Please choose the following processing method:") + ('\n'); + break; + } + } + + QString line; + QStringList messages; + line = qApp->fontMetrics().elidedText(line1, Qt::ElideMiddle, 500); +// messages.append(line); +// line.append('\n'); +// line2 = qApp->fontMetrics().elidedText(line2, Qt::ElideMiddle, 600); +// messages.append(line2); +// line = qApp->fontMetrics().elidedText(line3, Qt::ElideMiddle, 500); +// messages.append(line); + + auto labelText = line + line2; + + // page1: save to long file directory + auto pageOne = new QWidget(this); +// QRadioButton *skip = new QRadioButton(tr("Skip"), this); + QRadioButton *cutOff = new QRadioButton(tr("Truncation"), this); + QRadioButton *save = new QRadioButton(tr("Save to long file name directory"), this); + QRadioButton *rename = new QRadioButton(tr("Rename"), this); + QButtonGroup *onePageGroup = new QButtonGroup(this); + QLabel *specificationLabel = new QLabel(this); + specificationLabel->setWordWrap(true); + +// onePageGroup->addButton(skip, 0); + onePageGroup->addButton(rename, 0); + onePageGroup->addButton(cutOff, 1); + onePageGroup->addButton(save, 2); + +// save->setVisible(); + + QVBoxLayout *oneLayout = new QVBoxLayout(); + auto content = new QLabel(this); + content->setWordWrap(true); + //int textWidth = (this->width() - 40 - 40 - 24) * 3; + //QString elidedString = qApp->fontMetrics().elidedText(error.errorStr, Qt::ElideMiddle, textWidth); + content->setText(labelText); +// QHBoxLayout *labelLayout = new QHBoxLayout(this); + + auto labelIcon = new QLabel(this); + labelIcon->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(24, 24)); +// labelIcon->setGeometry(0, content->y(), labelIcon->size().width(), labelIcon->size().height()); + labelIcon->setAlignment(Qt::AlignTop); +// labelLayout->addWidget(labelIcon); +// labelLayout->addStretch(); + + QHBoxLayout *centerLayout = new QHBoxLayout(); +// centerLayout->addWidget(skip); + centerLayout->addWidget(save); + centerLayout->addWidget(rename); + centerLayout->addWidget(cutOff); + centerLayout->addStretch(); + QCheckBox *allApp = new QCheckBox(tr("All applications"), this); + allApp->setVisible(false); + QDialogButtonBox *buttonBoxOne = new QDialogButtonBox(this); + buttonBoxOne->setStandardButtons(QDialogButtonBox::NoButton); + QPushButton *cancelBt = buttonBoxOne->addButton(tr("Cancel"), QDialogButtonBox::ActionRole); + QPushButton *applyBt = buttonBoxOne->addButton(tr("OK"), QDialogButtonBox::ActionRole); + applyBt->setDefault(true); + applyBt->setProperty("isImportant", true); + QHBoxLayout *bottomLayout = new QHBoxLayout(); + bottomLayout->addWidget(allApp); + bottomLayout->addStretch(); + bottomLayout->addWidget(buttonBoxOne); + bottomLayout->setAlignment(buttonBoxOne, Qt::AlignRight); + + oneLayout->addWidget(content); + oneLayout->addLayout(centerLayout); + oneLayout->addWidget(specificationLabel); + oneLayout->addLayout(bottomLayout); + + QHBoxLayout *mainLayout = new QHBoxLayout(); + mainLayout->addWidget(labelIcon); + mainLayout->addLayout(oneLayout); + pageOne->setLayout(mainLayout); + + stack->addWidget(pageOne); + + // page2: test rename + auto page2 = new QWidget(this); + auto layout2 = new QGridLayout(this); + auto textEdit = new RenameEditor(this); + textEdit->setBackgroundRole(QPalette::Button); + textEdit->setAutoFillBackground(true); + textEdit->viewport()->setBackgroundRole(QPalette::Button); + textEdit->viewport()->setAutoFillBackground(true); +// int height = qApp->fontMetrics().lineSpacing() * 3 + qApp->fontMetrics().descent(); +// textEdit->setFixedHeight(height); + + auto num = new QLabel(this); + int newNameCount = newName.toLocal8Bit().count(); + if (fsType.contains("ntfs") || fsType.contains("fuse.kyfs")) { + newNameCount = newName.count(); + } + QString totalNum = + QString("<span style=\"color:red;\">%1</span>/%2%3").arg(newNameCount).arg(m_maxLength).arg(capitalByteText); + num->setText(totalNum); + auto buttonBox2 = new QDialogButtonBox(this); + buttonBox2->setStandardButtons(QDialogButtonBox::NoButton); + auto cancel2 = buttonBox2->addButton(tr("Cancel"), QDialogButtonBox::ActionRole); + auto ensure2 = buttonBox2->addButton(tr("OK"), QDialogButtonBox::ActionRole); + ensure2->setDefault(true); + ensure2->setEnabled(false); + ensure2->setProperty("isImportant", true); + + layout2->addWidget(textEdit, 0, 0, 4, 2, Qt::AlignTop); + layout2->addWidget(num, 4, 1, Qt::AlignBottom|Qt::AlignRight); + layout2->addWidget(buttonBox2, 5, 1, Qt::AlignBottom|Qt::AlignRight); + page2->setLayout(layout2); + stack->addWidget(page2); + + textEdit->setText(newName); + textEdit->selectAll(); + //textEdit->setFocus(); + auto cursor = textEdit->textCursor(); + cursor.setPosition(0, QTextCursor::MoveAnchor); + cursor.movePosition(QTextCursor::End, QTextCursor::KeepAnchor); + bool isDir = Peony::FileUtils::getFileIsFolder(textEdit->toPlainText()); + bool isDesktopFile = textEdit->toPlainText().endsWith(".desktop"); + bool isSoftLink = Peony::FileUtils::getFileIsSymbolicLink(textEdit->toPlainText()); + + if (!isDesktopFile && !isSoftLink && !isDir && textEdit->toPlainText().contains(".") && + !textEdit->toPlainText().startsWith(".")) { + int n = 1; + if(textEdit->toPlainText().contains(".tar.")) //ex xxx.tar.gz xxx.tar.bz2 + n = 2; + while(n){ + cursor.movePosition(QTextCursor::WordLeft, QTextCursor::KeepAnchor, 1); + cursor.movePosition(QTextCursor::Left, QTextCursor::KeepAnchor, 1); + --n; + } + } + + textEdit->setTextCursor(cursor); + textEdit->activateWindow(); + //textEdit->setFocus(); + + connect(textEdit, &QTextEdit::textChanged, this, [=](){ + QString currentNum ; + int textCount = textEdit->toPlainText().toLocal8Bit().count(); + if (fsType.contains("ntfs") || fsType.contains("fuse.kyfs")) { + textCount = textEdit->toPlainText().count(); + pDebug << "textCount 11111" << textCount; + + } + + if (textCount > m_maxLength) { + ensure2->setEnabled(false); + currentNum = QString("<span style=\"color:red;\">%1</span>").arg(textCount); + } else { + currentNum = QString("<span style=\"color:\">%1</span>").arg(textCount); + ensure2->setEnabled(true); + } + QString totalNum = QString("%1/%2%3").arg(currentNum).arg(m_maxLength).arg(capitalByteText); + num->setText(totalNum); + }); + + // page3: text truncation + QWidget *truncationWidget = new QWidget(this); + QRadioButton *frontTruncation = new QRadioButton(tr("Front truncation"), this); + QRadioButton *laterTruncation = new QRadioButton(tr("Post truncation"), this); + QButtonGroup *truncationGroup = new QButtonGroup(this); + truncationGroup->addButton(laterTruncation, 0); + truncationGroup->addButton(frontTruncation, 1); + laterTruncation->setChecked(true); + QDialogButtonBox *buttonBox = new QDialogButtonBox(this); + buttonBox->setStandardButtons(QDialogButtonBox::NoButton); + QPushButton *cancelButton = buttonBox->addButton(tr("Cancel"), QDialogButtonBox::ActionRole); + QPushButton *okButton = buttonBox->addButton(tr("OK"), QDialogButtonBox::ActionRole); + okButton->setDefault(true); + okButton->setProperty("isImportant", true); + + QHBoxLayout *pageThreebottomLayout = new QHBoxLayout(); + pageThreebottomLayout->addWidget(frontTruncation); + pageThreebottomLayout->addWidget(laterTruncation); + pageThreebottomLayout->addStretch(); + pageThreebottomLayout->addWidget(buttonBox); + + MyTextEdit *truncatedLabel = new MyTextEdit(this); + truncatedLabel->setText(newName); + + QVBoxLayout *cutOffLayout = new QVBoxLayout(truncationWidget); + cutOffLayout->addWidget(truncatedLabel); + cutOffLayout->addStretch(); + cutOffLayout->addLayout(pageThreebottomLayout); + truncationWidget->setLayout(cutOffLayout); + stack->addWidget(truncationWidget); + stack->setCurrentWidget(pageOne); + + connect(cancelButton, &QPushButton::clicked, this, &KyFileDialogRename::reject); + connect(okButton, &QPushButton::clicked, this, [=, &error]{ + int id = truncationGroup->checkedId(); + error.respValue.insert("cateType", id); + if (Qt::CheckState::Checked == allApp->checkState()) { + error.respCode = Peony::ExceptionResponse::TruncateAll; + } else { + error.respCode = Peony::ExceptionResponse::TruncateOne; + } + Q_EMIT changeFileName(m_truncateFileName); + accept(); + }); + + connect(truncationGroup, QOverload<QAbstractButton*>::of(&QButtonGroup::buttonClicked), + this, [=](QAbstractButton* button) { + const int id = truncationGroup->id(button); + const QString destName = truncateDestFileName(newName, id, fsType); + truncatedLabel->setText(destName); + }); + Q_EMIT truncationGroup->buttonClicked(laterTruncation); + +// m_currentWidget = page2; + + QString renameClickText = "<a href=\" \" style=\"color: #3D6BE5;text-decoration: none;\">" + + tr("modify the name") + + "</a>" + tr("."); + QString renameText = tr("Explanation: When renaming a file name, ensure it is within %1 %2 and ").arg(m_maxLength).arg(byteText); + renameText = renameText + renameClickText; + + QString truncateClickText = "<a href=\" \" style=\"color: #3D6BE5;text-decoration: none;\">" + + tr("truncate interval") + + "</a>" + tr("."); + QString truncateText = tr("Explanation: Truncate the portion of the file name that exceeds %1 %2 and select ").arg(PEONY_TRUNCATE_NAME_LIMIT).arg(byteText); + truncateText = truncateText + truncateClickText; + + QString downloadPath = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation); + QString pathText = QString(tr("Description: Save long file names to \"") + downloadPath + "/扩展" + tr("\".")); + + connect(onePageGroup, QOverload<QAbstractButton*>::of(&QButtonGroup::buttonClicked), + this, [=](QAbstractButton* button) { + const int id = onePageGroup->id(button); + switch(id) { + case 0:{ + specificationLabel->setText(renameText); + m_currentWidget = page2; + break; + } + case 1:{ + specificationLabel->setText(truncateText); + m_currentWidget = truncationWidget; + break; + } + case 2:{ + specificationLabel->setText(pathText); + break; + } + + }; + }); +// Q_EMIT onePageGroup->buttonClicked(skip); + + connect(specificationLabel, &QLabel::linkActivated, this, [=]() { + const int id = onePageGroup->checkedId(); + pDebug << "linkActivated......." << id; + + if (1 == id) { + QRect textRect = fontMetrics().boundingRect(truncatedLabel->toPlainText()); + int len = textRect.width()/(this->width() - stack->contentsMargins().left() - stack->contentsMargins().right()); + int totalHeight = qApp->fontMetrics().lineSpacing() *(len+1) + qApp->fontMetrics().descent(); + totalHeight = totalHeight + 150 > this->height() ? totalHeight + 150 : this->height(); + this->setFixedHeight(totalHeight); + stack->setCurrentWidget(truncationWidget); + } else if (0 == id) { + stack->setCurrentWidget(page2); + textEdit->setFocus(); + } + stack->setCurrentWidget(m_currentWidget); + }); + + if (QGSettings::isSchemaInstalled("org.ukui.style")) { + QGSettings *settings = new QGSettings("org.ukui.style", QByteArray(), this); + connect(settings, &QGSettings::changed, this, [=](const QString &key) { + if("iconThemeName" == key){ + labelIcon->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(24, 24)); + //renameIcon->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(24, 24)); + } else if ("systemFont" == key || "systemFontSize" == key) { + if (0 != stack->currentIndex()) { + QFontMetrics font = qApp->fontMetrics(); + QRect textRect = fontMetrics().boundingRect(truncatedLabel->toPlainText()); + int len = textRect.width()/(this->width() - stack->contentsMargins().left() - stack->contentsMargins().right()); + int totalHeight = qApp->fontMetrics().lineSpacing() *(len+1) + qApp->fontMetrics().descent(); + totalHeight = totalHeight + 150 > this->height() ? totalHeight + 150 : this->height(); + this->setFixedHeight(totalHeight); + } +// int height = font.lineSpacing() * 3 + font.descent(); +// textEdit->setFixedHeight(height); +// textEdit->setTextCursor(cursor); + +// QStringList messages; +// QString line; +// line = qApp->fontMetrics().elidedText(line1, Qt::ElideMiddle, 500); +// messages.append(line); +// line = qApp->fontMetrics().elidedText(line2, Qt::ElideMiddle, 500); +// messages.append(line); +// line = qApp->fontMetrics().elidedText(line3, Qt::ElideMiddle, 500); +// messages.append(line); +// auto labelText = messages.join('\n'); + content->setText(labelText); + this->repaint(); + } + }); + } + + connect(cancelBt, &QPushButton::clicked, this, &KyFileDialogRename::reject); + connect(applyBt, &QPushButton::clicked, this, [=, &error]{ + const int id = onePageGroup->checkedId(); + switch(id) { + case 0:{ + stack->setCurrentWidget(page2); + break; + } + + case 1:{ + QRect textRect = fontMetrics().boundingRect(truncatedLabel->toPlainText()); + int len = textRect.width()/(this->width() - stack->contentsMargins().left() - stack->contentsMargins().right()); + int totalHeight = qApp->fontMetrics().lineSpacing() *(len+1) + qApp->fontMetrics().descent(); + totalHeight = totalHeight + 150 > this->height() ? totalHeight + 150 : this->height(); + this->setFixedHeight(totalHeight); + stack->setCurrentWidget(truncationWidget); + break; + } + case 2:{ + if (Qt::CheckState::Checked == allApp->checkState()) { + error.respCode = Peony::ExceptionResponse::SaveAll; + } else { + error.respCode = Peony::ExceptionResponse::SaveOne; + } + accept(); + break; + } + } + }); + connect(cancel2, &QPushButton::clicked, this, &KyFileDialogRename::reject); + connect(ensure2, &QPushButton::clicked, this, [=, &error]{ + error.respValue.insert("newName", textEdit->toPlainText()); + error.respCode = Peony::ExceptionResponse::RenameOne; + pDebug << "ensure2 clicked...." << newName << textEdit->toPlainText(); + Q_EMIT changeFileName(textEdit->toPlainText()); + accept(); + }); + + connect(this, &KyFileDialogRename::rejected, this, [&](){ + pDebug << "reject......."; + m_dialogAccept = false; + }); + connect(this, &KyFileDialogRename::accepted, this, [&](){ + pDebug << "accepted......."; + + m_dialogAccept = true; + }); + connect(textEdit, &RenameEditor::returnPressed, ensure2, &QPushButton::click); + + connect(this, &KyFileDialogRename::rejected, this, [&](){ + if(!save->isVisible()) { + Q_EMIT muchLongNameReject(); + } + }); + + if(fsType.contains("ext")){ + save->setVisible(true); + save->setChecked(true); + specificationLabel->setText(pathText); + } + else{ + save->setVisible(false); + rename->setChecked(true); + specificationLabel->setText(renameText); + m_currentWidget = page2; + } + + + if (!exec()) { + pDebug << "responseCode......" << responseCode; + error.respCode = responseCode; + } +} + +const QString KyFileDialogRename::truncateDestFileName(const QString &uri, const int cateType, QString fsType) +{ + /*调试代码 + { + QString uri("file:///home/tanjing/下载/扩展/少时诵诗书所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所少时诵诗书多多多多的点点滴滴多多多多多多多长城长城错错错错错错错错错错错错错错错错错错错的点点滴滴多多多多多多多就还好还或或或或或能解决军军军军军军军军军军军军军军军军军军军军军军军军军合并报表不不不不不不不不不不不不不不不不不不不不不不不不不不不不不不不不不不不不不不不接口可扩扩扩扩扩不不不.png"); + auto newName = Peony::FileUtils::getNonSuffixedBaseNameFromUri(uri); + QString baseName = Peony::FileUtils::getUriBaseName(uri); + baseName = Peony::FileUtils::urlDecode(baseName); + auto destDirUri = Peony::FileUtils::getParentUri(uri); + auto fsType = Peony::FileUtils::getFsTypeFromFile(uri); + bool setLimitBytes = true; + if (fsType.contains("ntfs")) { + setLimitBytes = false; + } + auto suffix = baseName; + suffix = suffix.remove(newName); + newName.remove(suffix); + pDebug << "newName0000......" << newName; + pDebug << "baseName 000000......" << baseName; + pDebug << "suffix 000000......" << suffix; + } + */ + + + QFileInfo file(uri); + QString newName;//去掉后缀的名字// = Peony::FileUtils::getNonSuffixedBaseNameFromUri(uri); + { + QString suffixedBaseName = uri; + int index = suffixedBaseName.lastIndexOf("."); + if (index != -1) { +#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) + QString suffix = suffixedBaseName.chopped(suffixedBaseName.size() - index); + pDebug << "suffix 00000000000000000" << suffix; + if (suffix == ".gz" || suffix == ".xz" || suffix == ".bz" + || suffix == ".bz2" || suffix == ".Z" || + suffix == ".sit") { + int secondIndex = suffixedBaseName.lastIndexOf('.'); + suffixedBaseName.chop(suffixedBaseName.size() - secondIndex); + } + else + suffixedBaseName = suffix; +#else + suffixedBaseName.chop(suffixedBaseName.size() - index); +#endif + } + newName = suffixedBaseName; + } + + QString baseName = uri; + + //auto fsType = Peony::FileUtils::getFsTypeFromFile(uri); + bool setLimitBytes = true; + if (fsType.contains("ntfs") || fsType.contains("fuse.kyfs")) { + setLimitBytes = false; + } + auto suffix = baseName; + suffix = suffix.remove(newName); + newName.remove(suffix); + pDebug << "newName 11111......" << newName; +// pDebug << "baseName 22222......" << baseName; +// pDebug << "suffix 22222......" << suffix; + + pDebug << "setLimitBytes......" << fsType << setLimitBytes << newName.length() << newName.count() << newName.toLocal8Bit().count(); + QString truncatedText; + QString destName; + if (setLimitBytes) { + bool useForceChop = false; + if (suffix.toLocal8Bit().count() > PEONY_TRUNCATE_NAME_LIMIT) { + qWarning()<<"suffix too long:"<<uri<<"use force chop instead"; + useForceChop = true; + } else if (newName == baseName) { + qWarning()<<"failed to truncate suffix of"<<uri<<", use force chop instead"; + useForceChop = true; + } else if (file.isDir()) { + useForceChop = true; + } + if (useForceChop) { + newName = baseName; + int len = newName.length(); + if (TurnCateType::Post == cateType) { + while (newName.toLocal8Bit().count() > PEONY_TRUNCATE_NAME_LIMIT) { + newName.chop(1); + } + truncatedText = baseName.right(len - newName.length()); + destName = newName + "<s>" + truncatedText + "</s>"; + } else if (TurnCateType::Front == cateType) { + while (newName.toLocal8Bit().count() > PEONY_TRUNCATE_NAME_LIMIT) { + newName.remove(0,1); + } + truncatedText = baseName.left(len - newName.length()); + destName = "<s>" + truncatedText + "</s>" + newName; + } + } else { + QString tmp = newName; + int len = tmp.length(); + int limitBytes = PEONY_TRUNCATE_NAME_LIMIT - suffix.toLocal8Bit().count(); + if (TurnCateType::Post == cateType) { + while (newName.toLocal8Bit().count() > limitBytes) { + newName.chop(1); + } + truncatedText = tmp.right(len - newName.length()); + destName = newName + "<s>" + truncatedText + "</s>"; + } else if (TurnCateType::Front == cateType){ + while (newName.toLocal8Bit().count() > limitBytes) { + newName.remove(0,1); + } + truncatedText = tmp.left(len - newName.length()); + destName = "<s>" + truncatedText + "</s>" + newName; + } + destName = destName + suffix; + } + } else { + bool useForceChop = false; + if (suffix.length() > PEONY_TRUNCATE_NAME_LIMIT) { + qWarning()<<"suffix too long:"<<uri<<"use force chop instead"; + useForceChop = true; + } else if (newName == baseName) { + qWarning()<<"failed to truncate suffix of"<<uri<<", use force chop instead"; + useForceChop = true; + } else if (file.isDir()) { + useForceChop = true; + } + pDebug << "useForceChop......" << useForceChop; + if (useForceChop) { + newName = baseName; +// while (newName.length() > PEONY_TRUNCATE_NAME_LIMIT) { +// newName.chop(1); +// } + int len = baseName.length(); + + if (TurnCateType::Post == cateType) { + while (newName.count() > PEONY_TRUNCATE_NAME_LIMIT) { + newName.chop(1); + } + truncatedText = baseName.right(len - newName.length()); + destName = newName + "<s>" + truncatedText + "</s>"; + } else if (TurnCateType::Front == cateType) { + while (newName.count() > PEONY_TRUNCATE_NAME_LIMIT) { + newName.remove(0,1); + } + truncatedText = baseName.left(len - newName.length()); + destName = "<s>" + truncatedText + "</s>" + newName; + } + +// truncatedText = baseName.right(len - newName.length()); +// destName = newName + "<s>" + truncatedText + "</s>"; + } else { + QString tmp = newName; + int limitBytes = PEONY_TRUNCATE_NAME_LIMIT - suffix.length(); + int len = tmp.length(); + + if (TurnCateType::Post == cateType) { + while (newName.length() > limitBytes) { + newName.chop(1); + } + truncatedText = tmp.right(len - newName.length()); + destName = newName + "<s>" + truncatedText + "</s>"; + } else if (TurnCateType::Front == cateType){ + while (newName.length() > limitBytes) { + newName.remove(0,1); + } + + truncatedText = tmp.left(len - newName.length()); + destName = "<s>" + truncatedText + "</s>" + newName; + } + +// truncatedText = tmp.right(len - newName.length()); +// destName = newName + "<s>" + truncatedText + "</s>"; + destName = destName + suffix; + } + } + m_truncateFileName = newName + suffix; + + pDebug << "m_truncateFileName......." << m_truncateFileName; + pDebug << "destName......" << destName; + return destName; +} + +bool KyFileDialogRename::dialogResult(){ + return m_dialogAccept; +} + +void KyFileDialogRename::setCurrentUri(QString uri) +{ + if(m_currentUri != uri) + m_currentUri = uri; +} + +QString KyFileDialogRename::currentUri() +{ + return m_currentUri; +} + +void KyFileDialogRename::setMaxLength(int maxLength) +{ + if(m_maxLength != maxLength) + m_maxLength = maxLength; +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/file-operation-dialog/kyfiledialogrename.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,51 @@ +#ifndef KYFILEDIALOGRENAME_H +#define KYFILEDIALOGRENAME_H + +#include <QTextEdit> +#include "file-operation-error-handler.h" +#include "kyfileoperationdialog.h" + +enum TurnCateType { + Post = 0, + Front, +}; + +class MyTextEdit : public QTextEdit +{ + Q_OBJECT +public: + explicit MyTextEdit(QWidget *parent = nullptr); + ~MyTextEdit(); + +}; + + +class KyFileDialogRename : public KyFileOperationDialog, public Peony::FileOperationErrorHandler +{ + Q_OBJECT +public: + explicit KyFileDialogRename(QWidget *parent = nullptr); + ~KyFileDialogRename(); + + void handle(Peony::FileOperationError &error) override; + const QString truncateDestFileName(const QString &uri, const int cateType, QString fsType); + QWidget *m_currentWidget = nullptr; + + bool dialogResult(); + + void setCurrentUri(QString uri); + QString currentUri(); + void setMaxLength(int maxLength); + +Q_SIGNALS: + void changeFileName(QString name); + void muchLongNameReject(); + +private: + bool m_dialogAccept = true; + QString m_truncateFileName; + QString m_currentUri; + int m_maxLength = 255; +}; + +#endif // KYFILEDIALOGRENAME_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,11 @@ +#include "kyfileoperationdialog.h" + +KyFileOperationDialog::KyFileOperationDialog(QWidget *parent) : kdk::KDialog(parent) +{ + setWindowIcon(nullptr); + minimumButton()->setVisible(false); + closeButton()->setVisible(true); +// setFixedWidth(536); +// setFixedHeight(192); +} + diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/file-operation-dialog/kyfileoperationdialog.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,14 @@ +#ifndef KYFILEOPERATIONDIALOG_H +#define KYFILEOPERATIONDIALOG_H + +#include <QWidget> +#include <kysdk/applications/kdialog.h> + +class KyFileOperationDialog : public kdk::KDialog +{ + Q_OBJECT +public: + explicit KyFileOperationDialog(QWidget *parent = nullptr); +}; + +#endif // KYFILEOPERATIONDIALOG_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/file-operation-dialog/rename-editor.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/file-operation-dialog/rename-editor.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/file-operation-dialog/rename-editor.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/file-operation-dialog/rename-editor.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,15 @@ +#include "rename-editor.h" +#include <QKeyEvent> + +RenameEditor::RenameEditor(QWidget *parent) : QTextEdit(parent) +{ +} + +void RenameEditor::keyPressEvent(QKeyEvent *e) +{ + if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) { + Q_EMIT returnPressed(); + return; + } + QTextEdit::keyPressEvent(e); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/file-operation-dialog/rename-editor.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/file-operation-dialog/rename-editor.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/file-operation-dialog/rename-editor.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/file-operation-dialog/rename-editor.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,21 @@ +#ifndef RENAMEEDITOR_H +#define RENAMEEDITOR_H + +#include <QTextEdit> + +class RenameEditor: public QTextEdit +{ + Q_OBJECT +public: + explicit RenameEditor(QWidget *parent = nullptr); + +Q_SIGNALS: + void returnPressed(); + +protected: + + void keyPressEvent(QKeyEvent *e) override; + +}; + +#endif // RENAMEEDITOR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/filedialoginterface.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/filedialoginterface.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/filedialoginterface.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/filedialoginterface.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,17 @@ +#ifndef FILEDIALOGINTERFACE_H +#define FILEDIALOGINTERFACE_H +#include "qpa/qplatformdialoghelper.h" +//定义接口 +class FileDialogInterface +{ +public: + virtual ~FileDialogInterface() {} + virtual QPlatformDialogHelper* create() = 0; +}; + +//一定是唯一的标识符 +#define FileDialogInterface_iid "UKUIPlatformTheme.Plugin.FileDialogInterface" + +Q_DECLARE_INTERFACE(FileDialogInterface, FileDialogInterface_iid) + +#endif // FILEDIALOGINTERFACE_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/filedialogplugin.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/filedialogplugin.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/filedialogplugin.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/filedialogplugin.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,11 @@ +#include "filedialogplugin.h" +#include "kyfiledialog.h" +#if QT_VERSION < 0x050000 +Q_EXPORT_PLUGIN2(plugin, myPlugin) +#endif // QT_VERSION < 0x050000 + +QPlatformDialogHelper *FileDialogPlugin::create() +{ + return new KyFileDialogHelper; +} + diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/filedialogplugin.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/filedialogplugin.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/filedialogplugin.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/filedialogplugin.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,15 @@ +#ifndef MYPLUGIN_H +#define MYPLUGIN_H +#include <QtPlugin> +#include "filedialoginterface.h" +class FileDialogPlugin : public QObject,public FileDialogInterface +{ + Q_OBJECT +#if QT_VERSION >= 0x050000 + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QGenericPluginFactoryInterface" FILE "filedialogplugin.json") + Q_INTERFACES(FileDialogInterface); +#endif // QT_VERSION >= 0x050000 +public: + QPlatformDialogHelper *create(); +}; +#endif diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/filedialogplugin.json qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/filedialogplugin.json --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/filedialogplugin.json 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/filedialogplugin.json 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,3 @@ +{ + "Keys": [ "UKUIFiledialog" ] +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/filedialogplugin_global.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/filedialogplugin_global.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/filedialogplugin_global.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/filedialogplugin_global.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,12 @@ +#ifndef FILEDIALOGPLUGIN_GLOBAL_H +#define FILEDIALOGPLUGIN_GLOBAL_H + +#include <QtCore/qglobal.h> + +#if defined(QT5UKUIFILEDIALOG_LIBRARY) +# define FILEDIALOGPLUGIN_EXPORT Q_DECL_EXPORT +#else +# define FILEDIALOGPLUGIN_EXPORT Q_DECL_IMPORT +#endif + +#endif // FILEDIALOGPLUGIN_GLOBAL_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/kyfiledialog.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/kyfiledialog.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/kyfiledialog.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/kyfiledialog.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,3760 @@ +#include <QDebug> +#include <QDesktopServices> +#include <QUrl> +#include <QMimeDatabase> +#include <QMimeType> +#include <QPainter> +#include <QRect> +#include <QVector4D> +#include <QRegExp> +#include <QMessageBox> +#include <QScrollBar> +#include <QCoreApplication> +#include <QTranslator> +#include <QWindow> +#include <QScreen> +#include <QDesktopWidget> +#include <QPainterPath> +#include <QDBusReply> +#include <qpa/qplatformdialoghelper.h> +#include <fcntl.h> +#include <peony-qt/controls/directory-view/directory-view-container.h> +#include <peony-qt/controls/menu/directory-view-menu/directory-view-menu.h> +#include <peony-qt/controls/directory-view/directory-view-widget.h> +#include <peony-qt/controls/directory-view/directory-view-factory/directory-view-factory-manager.h> +#include <peony-qt/file-operation-utils.h> +#include <peony-qt/file-utils.h> +#include <peony-qt/create-template-operation.h> +#include <peony-qt/global-settings.h> +#include <peony-qt/search-vfs-uri-parser.h> +#include <peony-qt/file-meta-info.h> +#include <peony-qt/clipboard-utils.h> +#include <PeonyFileInfo> +#include <PeonyFileItemModel> +#include <peony-qt/thumbnail-manager.h> +#include <KWindowEffects> +#include <KWindowSystem> +#include "debug.h" +#include "uikyfiledialog.h" +#include "kyfiledialogprivate.h" +#include "sidebar.h" +#include "pathbar.h" +#include "../qt5-ukui-platformtheme/xatom-helper.h" +#include "../libqt5-ukui-style/settings/ukui-style-settings.h" +#include "kyfiledialog.h" +#include "file-operation-dialog/kyfiledialogrename.h" + +#define PERSONALSIE_SCHEMA "org.ukui.control-center.personalise" +#define PERSONALSIE_TRAN_KEY "transparency" + +bool isFuseFileSystem(QString path) +{ + g_autoptr (GUnixMountEntry) entry = g_unix_mount_at(path.toUtf8().constData(), NULL); + if (!entry) { + entry = g_unix_mount_for(path.toUtf8().constData(), NULL); + if (!entry) { + return false; + } + } + auto fsType = g_unix_mount_get_fs_type(entry); + if (QString(fsType).contains("fuse.kyfs")) { + return true; + } else { + return false; + } +} + +KyNativeFileDialog::KyNativeFileDialog(QWidget *parent) + : QDialog(parent), + d_ptr(new KyNativeFileDialogPrivate) +{ + QString locale = QLocale::system().name(); + + if(qApp->property("Language").isValid()) + { + QString language = qApp->property("Language").toString(); + QFile file("/usr/share/qt5-ukui-platformtheme/qt5-ukui-filedialog_" + language + ".qm"); + if(file.exists()) + locale = language; + } + installTranslate(locale); + + mKyFileDialogUi = new Ui_KyFileDialog(this); + + connect(d_ptr.get()->m_timer, &QTimer::timeout, this, [&](){ +// pDebug << "timeout isActive:..........." << d_ptr.get()->m_timer->isActive(); + this->show(); + if(d_ptr.get()->m_timer->isActive()){ + pDebug << "timer stop...."; + d_ptr.get()->m_timer->stop(); + } + }); + + mKyFileDialogUi->setupUi(this); + d_ptr.get()->m_container = mKyFileDialogUi->m_container; + +// QString path = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); +// pDebug << "initialDirPath:" << path << selectedUrls(); +// goToUri(path, false); + getCurrentPage()->setContextMenuPolicy(Qt::CustomContextMenu); + + connect(mKyFileDialogUi->m_sider, &FileDialogSideBar::goToUriRequest, this, [this](const QString &uri, bool addToHistory, bool forceUpdate){ + pDebug << "goToUri0000" << uri; + if (uri.startsWith("favorite://") && uri != "favorite:///") { + QString u = Peony::FileUtils::getTargetUri(uri); + goToUri(u, addToHistory, forceUpdate); + + } + else + goToUri(uri, addToHistory, forceUpdate); + }); + + connect(getCurrentPage(), &Peony::DirectoryViewContainer::signal_responseUnmounted, this, &KyNativeFileDialog::slot_responseUnmounted); + connect(getCurrentPage(), &Peony::DirectoryViewContainer::directoryChanged, this, &KyNativeFileDialog::updateWindowState); + + connect(getCurrentPage(), &Peony::DirectoryViewContainer::directoryChanged, this, [=](){ + pDebug << "directoryChanged........" << getCurrentUri(); + + mKyFileDialogUi->m_pathbarWidget->updatePath(getCurrentUri()); + + Q_EMIT directoryEntered(QUrl(getCurrentUri())); + pDebug << "locationChangeEnd...."; +// QCursor c; +// c.setShape(Qt::ArrowCursor); +// this->setCursor(c); +// mKyFileDialogUi->m_sider->setCursor(c); + + if(m_fileDialogHelper->isViewInitialFinished()) + intiContainerSort(); + + if(acceptMode() == QFileDialog::AcceptOpen){ + if(!m_isLoadSelect && !mKyFileDialogUi->m_fileNameEdit->text().isEmpty()) + mKyFileDialogUi->m_fileNameEdit->setText(""); + } + setShortCuts(); + m_isLoading = false; + }); + + connect(getCurrentPage(), &Peony::DirectoryViewContainer::directoryChanged, this, [=](){ +// if(m_longNameChangeDir){ +// onAcceptButtonClicked(); +// m_longNameChangeDir = false; +// return; +// } + updateSearchProgressBar(); + }); + connect(getCurrentPage(), &Peony::DirectoryViewContainer::directoryChanged, this, &KyNativeFileDialog::locationChangeEnd); + connect(getCurrentPage(), &Peony::DirectoryViewContainer::viewDoubleClicked, this, [=](const QString &uri){ + auto info = Peony::FileInfo::fromUri(uri); + pDebug << "viewDoubleClicked....." << uri << info->isDir() << info->isVolume(); + if (info->isDir() || info->isVolume()) { + pDebug << "goToUrixxxxxxx...."; + goToUri(uri); + } else { + onAcceptButtonClicked(); + } + }); + + connect(getCurrentPage(), &Peony::DirectoryViewContainer::selectionChanged, this, &KyNativeFileDialog::selectionChanged); + + connect(getCurrentPage(), &Peony::DirectoryViewContainer::menuRequest, this, &KyNativeFileDialog::containerMenuRequest); + + connect(getCurrentPage(), &Peony::DirectoryViewContainer::signal_itemAdded, this, [=](const QString& uri){ + pDebug << "signal_itemAdded....." << m_uris_to_edit << uri; + if(m_uris_to_edit.isEmpty()) + return; + QString editUri = Peony::FileUtils::urlDecode(m_uris_to_edit.first()); + QString infoUri = Peony::FileUtils::urlDecode(uri); + if (editUri == infoUri ) { + getCurrentPage()->getView()->scrollToSelection(uri); + getCurrentPage()->getView()->editUri(uri); + } + m_uris_to_edit.clear(); + }); + + connect(getCurrentPage(), &Peony::DirectoryViewContainer::updateWindowLocationRequest, this, [=](const QString &uri, bool addToHistory, bool forceUpdate){ + pDebug << "page updateWindowLocationRequest.....uri:" << uri << getCurrentUri() << forceUpdate; + if(uri == "") + return; + QString s = uri; + QString s1 = s.endsWith("/") ? s.remove(s.length() - 1, 1) : s; + QString s2 = getCurrentUri(); + QString s3 = s2.endsWith("/") ? s2.remove(s2.length() - 1, 1) : s2; + if(s1 != s3 && m_fileDialogHelper->isViewInitialFinished()) + { + pDebug << "s1:" << s1 << "s3:" << s3; + goToUri(uri, addToHistory); + } + }); + + //location change + connect(this, &KyNativeFileDialog::locationChangeStart, this, [=]() { + pDebug << "locationChangeStart........." << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss:zzz"); + QCursor c; + c.setShape(Qt::BusyCursor); + this->setCursor(c); + mKyFileDialogUi->setCursor(c); + if(getCurrentPage() && getCurrentPage()->getView()) + getCurrentPage()->getView()->setCursor(c); + mKyFileDialogUi->m_sider->setCursor(c); + }); + + connect(this, &KyNativeFileDialog::locationChangeEnd, this, [=]() { + pDebug << "locationChangeEnd........." << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss:zzz"); + QCursor c; + c.setShape(Qt::ArrowCursor); + this->setCursor(c); + if(getCurrentPage() && getCurrentPage()->getView()) + getCurrentPage()->getView()->setCursor(c); + mKyFileDialogUi->m_sider->setCursor(c); + mKyFileDialogUi->setCursor(c); + }); + + connect(mKyFileDialogUi->m_pathbar, &Peony::AdvancedLocationBar::updateWindowLocationRequest, + this, [this](const QString &uri, bool addHistory, bool forceUpdate){ + pDebug << "goToUrijjjjj...." << uri; + goToUri(uri, addHistory, forceUpdate); + }); + + connect(mKyFileDialogUi->m_pathbar, &Peony::AdvancedLocationBar::refreshRequest, this, [=](){ + pDebug << "AdvancedLocationBar refreshRequest......" << getCurrentUri(); + }); + connect(mKyFileDialogUi->m_pathbar, &Peony::AdvancedLocationBar::searchRequest, this, [=](const QString &path, const QString &key){ + pDebug << "path.....:" << path << "key:" << key << m_lastSearchPath; + if(key == "") + { + forceStopLoading(); + pDebug << "key is null m_lastSearchPath:" << m_lastSearchPath; + m_isClearSearchKey = true; + m_needSearch = false; + QCursor c; + c.setShape(Qt::ArrowCursor); + this->setCursor(c); + if(getCurrentPage() && getCurrentPage()->getView()) + getCurrentPage()->getView()->setCursor(c); + mKyFileDialogUi->m_sider->setCursor(c); + mKyFileDialogUi->setCursor(c); + + goToUri(m_lastSearchPath, true); + } + else + { + bool isSearchEngine = true; + const QByteArray id(UKUI_SEARCH_SCHEMAS); + if (QGSettings::isSchemaInstalled(id)) { + QGSettings *searchSettings = new QGSettings(id, QByteArray(), this); + if (!searchSettings || !searchSettings->keys().contains(SEARCH_METHOD_KEY)) { + isSearchEngine = false; + } + } else { + isSearchEngine = false; + } + + auto targetUri = Peony::SearchVFSUriParser::parseSearchKey(path, key, true, false, "", true); + targetUri = Peony::SearchVFSUriParser::addSearchKey(targetUri, isSearchEngine); + pDebug << "updateSearch targetUri:" <<targetUri; + pDebug << "updateSearch path:" <<path; + m_needSearch = true; + goToUri(targetUri, true); + + QCursor c; + c.setShape(Qt::BusyCursor); + this->setCursor(c); + if(getCurrentPage() && getCurrentPage()->getView()) + getCurrentPage()->getView()->setCursor(c); + mKyFileDialogUi->m_sider->setCursor(c); + mKyFileDialogUi->setCursor(c); + } + }); + + mKyFileDialogUi->m_backButton->setToolTip(tr("Go Back")); + mKyFileDialogUi->m_backButton->setIcon(QIcon::fromTheme("go-previous-symbolic")); + mKyFileDialogUi->m_backButton->setAutoRaise(true); + mKyFileDialogUi->m_backButton->setEnabled(false); + connect(mKyFileDialogUi->m_backButton, &QToolButton::clicked, this, &KyNativeFileDialog::goBack); + + + mKyFileDialogUi->m_forwardButton->setToolTip(tr("Go Forward")); + mKyFileDialogUi->m_forwardButton->setIcon(QIcon::fromTheme("go-next-symbolic")); + mKyFileDialogUi->m_forwardButton->setAutoRaise(true); + mKyFileDialogUi->m_forwardButton->setEnabled(false); + connect(mKyFileDialogUi->m_forwardButton, &QToolButton::clicked, this, &KyNativeFileDialog::goForward); + + mKyFileDialogUi->m_toParentButton->setToolTip(tr("Cd Up")); + mKyFileDialogUi->m_toParentButton->setIcon(QIcon::fromTheme("go-up-symbolic")); + mKyFileDialogUi->m_toParentButton->setAutoRaise(true); + mKyFileDialogUi->m_toParentButton->setEnabled(false); + connect(mKyFileDialogUi->m_toParentButton, &QToolButton::clicked, this, &KyNativeFileDialog::goToParent); + + mKyFileDialogUi->m_searchBtn->setIcon(QIcon::fromTheme("edit-find-symbolic")); + mKyFileDialogUi->m_searchBtn->setToolTip(tr("Search")); + mKyFileDialogUi->m_searchBtn->setIconSize(QSize(16, 16)); + mKyFileDialogUi->m_searchBtn->setAutoRaise(true); + + mKyFileDialogUi->m_searchBtn->setProperty("useIconHighlightEffect", true); + mKyFileDialogUi->m_searchBtn->setProperty("iconHighlightEffectMode", 1); + connect(mKyFileDialogUi->m_searchBtn, &QToolButton::clicked, this, &KyNativeFileDialog::searchButtonClicked); + + mKyFileDialogUi->m_modeButton->setToolTip(tr("View Type")); + mKyFileDialogUi->m_modeButton->setIcon(QIcon::fromTheme("view-grid-symbolic")); + mKyFileDialogUi->m_modeButton->setProperty("isWindowButton", 1); + mKyFileDialogUi->m_modeButton->setProperty("useIconHighlightEffect", 0x2); + mKyFileDialogUi->m_modeButton->setAutoRaise(true); + + mKyFileDialogUi->m_useGlobalSortAction->setChecked(Peony::GlobalSettings::getInstance()->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()); + connect(mKyFileDialogUi->m_useGlobalSortAction, &QAction::triggered, this, [=](bool checked){ + Peony::GlobalSettings::getInstance()->setValue(USE_GLOBAL_DEFAULT_SORTING, checked); + }); + + mKyFileDialogUi->m_sortButton->setToolTip(tr("Sort Type")); + mKyFileDialogUi->m_sortButton->setProperty("isWindowButton", 1); + mKyFileDialogUi->m_sortButton->setProperty("useIconHighlightEffect", 0x2); + mKyFileDialogUi->m_sortButton->setAutoRaise(true); + + mKyFileDialogUi->m_maximizeAndRestore->setToolTip(tr("Maximize")); + mKyFileDialogUi->m_maximizeAndRestore->setIcon(QIcon::fromTheme("window-close-symbolic")); + mKyFileDialogUi->m_maximizeAndRestore->setAutoRaise(true); + mKyFileDialogUi->m_maximizeAndRestore->setProperty("isWindowButton", 1); + mKyFileDialogUi->m_maximizeAndRestore->setProperty("useIconHighlightEffect", 0x2); + connect(mKyFileDialogUi->m_maximizeAndRestore, &QToolButton::clicked, this, [=]() { + if (!this->isMaximized()) { + this->showMaximized(); + } else { + this->showNormal(); + } + updateMaximizeState(); + }); + + mKyFileDialogUi->m_closeButton->setToolTip(tr("Close")); + mKyFileDialogUi->m_closeButton->setIcon(QIcon::fromTheme("window-close-symbolic")); + mKyFileDialogUi->m_closeButton->setAutoRaise(true); + mKyFileDialogUi->m_closeButton->setProperty("isWindowButton", 0x2); + + connect(mKyFileDialogUi->m_modeMenu, &QMenu::triggered, this, [=](QAction *action) { + if (action == mKyFileDialogUi->m_listModeAction) { + this->getCurrentPage()->switchViewType("List View"); + } else { + this->getCurrentPage()->switchViewType("Icon View"); + } + }); + + connect(mKyFileDialogUi->m_acceptButton, &QPushButton::clicked, this, &KyNativeFileDialog::onAcceptButtonClicked); + + connect(mKyFileDialogUi->m_rejectButton, &QPushButton::clicked, this, &KyNativeFileDialog::onRejectButtonClicked); + +// connect(mKyFileDialogUi->m_fileTypeCombo, +// static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated), +// this, [this](const QString s){ +// pDebug << "activated..." << s; +// selectNameFilter(s);}); + + connect(mKyFileDialogUi->m_fileTypeCombo, + static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated), + this, &KyNativeFileDialog::selectedNameFilterChanged); + + connect(mKyFileDialogUi->m_fileTypeCombo, + static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged), + this, [this](const QString s){ + pDebug << "currentIndexChanged..." << s << mKyFileDialogUi->m_fileTypeCombo->currentIndex(); + selectNameFilter(s);}); + + connect(mKyFileDialogUi->m_closeButton, &QToolButton::clicked, this, &KyNativeFileDialog::onRejectButtonClicked); + + connect(mKyFileDialogUi->m_fileNameEdit, &QLineEdit::textChanged, this, [=](const QString &text){ + pDebug << "m_fileNameEdit textChanged...." << text.isEmpty(); + lineEditTextChange(text); + }); + + connect(getCurrentPage(), &Peony::DirectoryViewContainer::viewTypeChanged, this, &KyNativeFileDialog::onSwitchView); + + connect(mKyFileDialogUi->m_sortOrderGroup, &QActionGroup::triggered, this, [=](QAction *action) { + int index = mKyFileDialogUi->m_sortOrderGroup->actions().indexOf(action); + getCurrentPage()->setSortOrder(Qt::SortOrder(index)); + setSortType(); + }); + + connect(mKyFileDialogUi->m_sortTypeGroup, &QActionGroup::triggered, this, [=](QAction *action) { + int index = mKyFileDialogUi->m_sortTypeGroup->actions().indexOf(action); + getCurrentPage()->setSortType(Peony::FileItemModel::ColumnType(index)); + }); + + connect(mKyFileDialogUi->m_sortMenu, &QMenu::aboutToShow, this, [=]() { + bool originPathVisible = getCurrentUri()== "trash:///"; + mKyFileDialogUi->m_originalPath->setVisible(originPathVisible); + mKyFileDialogUi->m_sortTypeGroup->actions().at(getCurrentSortColumn())->setChecked(true); + mKyFileDialogUi->m_sortOrderGroup->actions().at(getCurrentSortOrder())->setChecked(true); + }); + + foreach (QAction *action, mKyFileDialogUi->m_sortTypeGroup->actions()) + { + bool checked = (int(getCurrentPage()->getSortType()) == + mKyFileDialogUi->m_sortTypeGroup->actions().indexOf(action) ? true : false); + action->setChecked(checked); + } + + refreshContainerSort(); + updateMaximizeState(); + onSwitchView(); + + m_model = new QStringListModel(this); + m_completer = new QCompleter(mKyFileDialogUi->m_fileNameEdit); + m_completer->setModel(m_model); + m_completer->setMaxVisibleItems(10); + m_completer->setModelSorting(QCompleter::CaseInsensitivelySortedModel); +// m_completer->setCompletionMode(QCompleter::UnfilteredPopupCompletion); + mKyFileDialogUi->m_fileNameEdit->setCompleter(m_completer); + + int number = QApplication::desktop()->screenNumber(QCursor::pos()); + if(number<0){ + number=0; + } + QSize size = QGuiApplication::screens().at(number)->geometry().size(); + pDebug << "setmaxsize:" << size; + this->setMaximumSize(size); + + QString downloadPath = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation); + m_longSavePath = "file://" + downloadPath + QString("/扩展"); + + + //transparency + KWindowEffects::enableBlurBehind(this->winId(), true); + QGSettings *settings = nullptr; + if (QGSettings::isSchemaInstalled(PERSONALSIE_SCHEMA)) { + settings = new QGSettings(PERSONALSIE_SCHEMA, QByteArray(), this); + m_transparency = settings->get(PERSONALSIE_TRAN_KEY).toDouble() * 255; + + connect(settings,&QGSettings::changed,this,[=](QString changedKey) { + if (changedKey == PERSONALSIE_TRAN_KEY) { + m_transparency = settings->get(PERSONALSIE_TRAN_KEY).toDouble() * 255; + + this->update(); + } + }); + } else { + settings = nullptr; + pDebug << PERSONALSIE_SCHEMA<<"not installed"; + } +} + +KyNativeFileDialog::~KyNativeFileDialog() +{ + pDebug << "~~~~~~~~KyNativeFileDialog"; +} + +void KyNativeFileDialog::updateMaximizeState() +{ + bool maximized = this->isMaximized(); + if (maximized) { + mKyFileDialogUi->m_maximizeAndRestore->setToolTip(tr("Restore")); + mKyFileDialogUi->m_maximizeAndRestore->setIcon(QIcon::fromTheme("window-restore-symbolic")); + } else { + mKyFileDialogUi->m_maximizeAndRestore->setToolTip(tr("Maximize")); + mKyFileDialogUi->m_maximizeAndRestore->setIcon(QIcon::fromTheme("window-maximize-symbolic")); + } +} + +Peony::FMWindowIface *KyNativeFileDialog::create(const QString &uri) +{ + auto dialog = new KyNativeFileDialog(); + + return dialog; +} + +Peony::FMWindowIface *KyNativeFileDialog::create(const QStringList &uris) +{ + auto dialog = new KyNativeFileDialog(); + + return dialog; +} + +const QStringList KyNativeFileDialog::getCurrentSelections() +{ + if(containerView()) + return containerView()->getSelections(); + else + return QStringList(); +} + +const QStringList KyNativeFileDialog::getCurrentSelectionsList() +{ + QStringList list; + foreach (QString str, getCurrentSelections()) { + list.append(Peony::FileUtils::urlDecode(str)); + } + return list; +} + +const QStringList KyNativeFileDialog::getCurrentAllFileUris() +{ + if(containerView()) + return containerView()->getAllFileUris(); + return QStringList(); +} +const QList<std::shared_ptr<Peony::FileInfo>> KyNativeFileDialog::getCurrentSelectionFileInfos() +{ + const QStringList uris = getCurrentSelections(); + QList<std::shared_ptr<Peony::FileInfo>> infos; + for(auto uri : uris) { + auto info = Peony::FileInfo::fromUri(uri); + infos<<info; + } + return infos; +} + +void KyNativeFileDialog::setCurrentSelections(QStringList selections) +{ + QStringList list; + foreach (QString str, selections) { + list.append(Peony::FileUtils::urlEncode(str)); + } + if(containerView()){ + pDebug << "setCurrentSelections........" << list << containerView()->getSelections().length(); + + //是耗时操作 且会先将之前的选中内容清空,有selectchange信号 + containerView()->setSelections(list); + pDebug << "get setCurrentSelections....:" << containerView()->getSelections(); + } +} + +Qt::SortOrder KyNativeFileDialog::getCurrentSortOrder() +{ + return getCurrentPage()->getSortOrder(); +} + +int KyNativeFileDialog::getCurrentSortColumn() +{ + return getCurrentPage()->getSortType(); +} + +bool KyNativeFileDialog::getWindowShowHidden() +{ + auto settings = Peony::GlobalSettings::getInstance(); + if (settings->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()) { + return settings->getValue(SHOW_HIDDEN_PREFERENCE).toBool(); + } else { + auto uri = getCurrentUri(); + auto metaInfo = Peony::FileMetaInfo::fromUri(uri); + if (metaInfo) { + return metaInfo->getMetaInfoVariant(SHOW_HIDDEN_PREFERENCE).isValid()? metaInfo->getMetaInfoVariant(SHOW_HIDDEN_PREFERENCE).toBool(): (settings->getValue(SHOW_HIDDEN_PREFERENCE).toBool()); + } else { + pDebug<<"can not get file meta info"<<uri; + return settings->getValue(SHOW_HIDDEN_PREFERENCE).toBool(); + } + } +} +bool KyNativeFileDialog::getWindowUseDefaultNameSortOrder() +{ + auto settings = Peony::GlobalSettings::getInstance(); + if (settings->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()) { + return settings->getValue(SORT_CHINESE_FIRST).isValid()? settings->getValue(SORT_CHINESE_FIRST).toBool(): true; + } else { + auto uri = getCurrentUri(); + auto metaInfo = Peony::FileMetaInfo::fromUri(uri); + if (metaInfo) { + return metaInfo->getMetaInfoVariant(SORT_CHINESE_FIRST).isValid()? metaInfo->getMetaInfoVariant(SORT_CHINESE_FIRST).toBool(): (settings->getValue(SORT_CHINESE_FIRST).isValid()? settings->getValue(SORT_CHINESE_FIRST).toBool(): true); + } else { + pDebug<<"can not get file meta info"<<uri; + return settings->getValue(SORT_CHINESE_FIRST).isValid()? settings->getValue(SORT_CHINESE_FIRST).toBool(): true; + } + } +} +bool KyNativeFileDialog::getWindowSortFolderFirst() +{ + auto settings = Peony::GlobalSettings::getInstance(); + if (settings->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()) { + return settings->getValue(SORT_FOLDER_FIRST).isValid()? settings->getValue(SORT_FOLDER_FIRST).toBool(): true; + } else { + auto uri = getCurrentUri(); + auto metaInfo = Peony::FileMetaInfo::fromUri(uri); + if (metaInfo) { + return metaInfo->getMetaInfoVariant(SORT_FOLDER_FIRST).isValid()? metaInfo->getMetaInfoVariant(SORT_FOLDER_FIRST).toBool(): (settings->getValue(SORT_FOLDER_FIRST).isValid()? settings->getValue(SORT_FOLDER_FIRST).toBool(): true); + } else { + pDebug<<"can not get file meta info"<<uri; + return settings->getValue(SORT_FOLDER_FIRST).isValid()? settings->getValue(SORT_FOLDER_FIRST).toBool(): true; + } + } +} + +void KyNativeFileDialog::refresh() +{ + getCurrentPage()->refresh(); +} + +void KyNativeFileDialog::forceStopLoading() +{ + getCurrentPage()->stopLoading(); + + //Key_escape also use as cancel + if (Peony::ClipboardUtils::isClipboardHasFiles()) + { + Peony::ClipboardUtils::clearClipboard(); + if(containerView()) + containerView()->repaintView(); + } +} + +void KyNativeFileDialog::setShowHidden(bool showHidden) +{ + getCurrentPage()->setShowHidden(showHidden); +} + +void KyNativeFileDialog::setUseDefaultNameSortOrder(bool use) +{ + if (!getCurrentPage()) { + return; + } + getCurrentPage()->setUseDefaultNameSortOrder(use); +} + +void KyNativeFileDialog::setSortFolderFirst(bool set) +{ + if (!getCurrentPage()) { + return; + } + getCurrentPage()->setSortFolderFirst(set); +} + +void KyNativeFileDialog::setCurrentSelectionUris(const QStringList &uris) +{ + getCurrentPage()->stopLoading(); + + //Key_escape also use as cancel + if (Peony::ClipboardUtils::isClipboardHasFiles()) + { + Peony::ClipboardUtils::clearClipboard(); + if(containerView()) + containerView()->repaintView(); + } +} + +void KyNativeFileDialog::setCurrentSortOrder (Qt::SortOrder order) +{ + getCurrentPage()->setSortOrder(order); +} + +void KyNativeFileDialog::setCurrentSortColumn (int sortColumn) +{ + getCurrentPage()->setSortType(Peony::FileItemModel::ColumnType(sortColumn)); +} + +void KyNativeFileDialog::editUri(const QString &uri) +{ + if(containerView()) + containerView()->editUri(uri); +} + +void KyNativeFileDialog::editUris(const QStringList &uris) +{ + if(containerView()) + containerView()->editUris(uris); +} + +bool KyNativeFileDialog::getFilterWorking() +{ + return false; +} + +void KyNativeFileDialog::beginSwitchView(const QString &viewId) +{ + if (getCurrentUri() == "computer:///") + return; + auto selection = getCurrentSelections(); + if(!getCurrentPage()||!(getCurrentPage()->getView())) + return; + + if (getCurrentPage()->getView()->viewId() == viewId) + return; + + getCurrentPage()->switchViewType(viewId); + + // change default view id + auto factoryManager = Peony::DirectoryViewFactoryManager2::getInstance(); + auto internalViews = factoryManager->internalViews(); + if (internalViews.contains(viewId)) + Peony::GlobalSettings::getInstance()->setValue(DEFAULT_VIEW_ID, viewId); + + setCurrentSelections(selection); + if (selection.count() >0) + getCurrentPage()->getView()->scrollToSelection(selection.first()); + +} + + +/** + * @brief 当前目录 + */ +const QString KyNativeFileDialog::getCurrentUri() +{ + return Peony::FileUtils::urlDecode(getCurrentPage()->getCurrentUri()); +} + +/** + * @param directory 路径 + * @brief 设置路径为directory + */ +void KyNativeFileDialog::setDirectory(const QString &directory) +{ + pDebug << "setDirectoryoooo...:" << directory; + setDirectoryUrl(QUrl(directory)); +} + +void KyNativeFileDialog::setDirectory(const QDir &directory) +{ + setDirectoryUrl(QUrl::fromLocalFile(directory.absolutePath())); +} + +QDir KyNativeFileDialog::directory() const +{ + QString uri = directoryUrl().toString(); + + if (uri.startsWith("trash://") || uri.startsWith("recent://") || + uri.startsWith("computer://") || uri.startsWith("favorite://") || + uri.startsWith("filesafe://")){ + uri = convertSpecialPath(uri); + pDebug << "directory uri 00000000..:" << uri; + } + else if(uri.startsWith("mult://") || uri.startsWith("smb://") || + uri.startsWith("ftp://") || uri.startsWith("sftp://") || + uri.startsWith("mtp://") || uri.startsWith("gphoto2://")){ + uri = getCurrentPage()->getCurrentUri();//特殊路径不能先编码转换 可能会造成结果不准 + + uri = convertSpecialPath(uri); + } + else if(!uri.isEmpty()) + uri = directoryUrl().toLocalFile(); + else{ + QDir dir; + dir.setPath(uri); + return dir; + } + pDebug << "directory 111111 uri......" << uri; + return QDir(uri); +} + +void KyNativeFileDialog::setDirectoryUrl(const QUrl &directory) +{ + pDebug << "setDirectoryUrl.....:" << directory; + if (!getCurrentPage()) { + return; + } + goToUri(directory.toString(), true); +} + +QUrl KyNativeFileDialog::directoryUrl() const +{ + if (!getCurrentPage()) { + return QUrl(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)); + } else { + QString uri = getCurrentPage()->getCurrentUri(); + if(uri.startsWith("mult://") || uri.startsWith("smb://") || + uri.startsWith("ftp://") || uri.startsWith("sftp://") || + uri.startsWith("mtp://") || uri.startsWith("gphoto2://")) + return QUrl(uri); + return QUrl(Peony::FileUtils::urlDecode(uri)); + } +} + +void KyNativeFileDialog::goToUri(const QString &uri, bool addToHistory, bool forceUpdate) +{ + pDebug << "goToUri....,,,,:" << uri << getCurrentUri(); + + if(containerView() && m_fileDialogHelper){ + pDebug << "connect............"; + connect(containerView(), &Peony::DirectoryViewWidget::viewDirectoryChanged, + m_fileDialogHelper, &KyFileDialogHelper::viewInitialFinished, Qt::UniqueConnection); + } + + QString gUri = uri; + pDebug << "goto uri00000........" << gUri; + if ((gUri == "file:///data" || gUri == "file:///data/") && Peony::FileUtils::isFileExsit("file:///data/usershare")){ + bool isDBlockHasUserFile = isDataBlockHasUserFile(); + if(!isDBlockHasUserFile) { + pDebug << "isDataBlockHasUserFile......"; + gUri = "file:///data/usershare"; + } + } + + if(gUri.isEmpty() || gUri == getCurrentUri()) + return; + QString nUri = gUri, nCurrentUri = getCurrentUri(); + pDebug << "nUri000..." << nUri << "nCurrentUri...." << nCurrentUri; + if(nUri.endsWith("/")){ + if((nUri.length() >= 2 && nUri[nUri.length() - 2] != "/") || nUri.length() <2) + nUri = nUri.remove(nUri.length() - 1, 1); + } + if(nCurrentUri.endsWith("/")){ + if((nCurrentUri.length() >= 2 && nCurrentUri[nCurrentUri.length() - 2] != "/") || nCurrentUri.length() <2) + nCurrentUri = nCurrentUri.remove(nCurrentUri.length() - 1, 1); + } + pDebug << "nUri..." << nUri << "nCurrentUri...." << nCurrentUri; + if(nUri == nCurrentUri) { + return; + } + pDebug << "getCurrentUri....,,,,:" << getCurrentUri(); + pDebug << "isShow......:" << (m_fileDialogHelper == nullptr) << m_fileDialogHelper->isShow() << isInitialGoToUriNum; + if(true)//(isInitialGoToUriNum || (m_fileDialogHelper != nullptr && m_fileDialogHelper->isShow())) + { + isInitialGoToUriNum = false; + getCurrentPage()->stopLoading(); + if(!m_fileDialogHelper->isShow()) + addToHistory = false; + pDebug << "getCurrentUri....,,,,:" << m_fileDialogHelper->isShow() << getCurrentUri(); + pDebug << "gotouri123123:" << uri << addToHistory << forceUpdate; + Q_EMIT locationChangeStart(); + m_isLoading = true; + mKyFileDialogUi->m_pathbarWidget->updatePath(gUri); + + if(gUri.startsWith("search:///search_uris=")) + getCurrentPage()->goToUri(gUri, addToHistory, forceUpdate); + else + getCurrentPage()->goToUri(Peony::FileUtils::urlEncode(gUri), addToHistory, forceUpdate); + } +} + +/** + * @param filename文件名 + * @brief 选择指定文件 + */ +void KyNativeFileDialog::selectFile(const QString &filename) +{ + QUrl url = getCurrentUri(); + pDebug << "selectFileoooo..........:" << filename; +// if(!QFile::exists(filename.remove(0,7))) +// { +// pDebug << "selectFile not exist:" << filename.remove(0,7); +// return; +// } + QString path = filename; + + if(url.toString() != path) + { + if(path.startsWith("/")) + path = ("file://" + path); + + pDebug << "select filename path:" << path; + + QUrl pathUrl(path); + pDebug << "select pathUrl:" << pathUrl.path(); + + QDir dir(pathUrl.path()); + + if(!path.endsWith("/")) + dir.cdUp(); + setDirectoryUrl(QUrl("file://" + dir.path())); + pDebug << "url2222:" << dir.path(); + } + pDebug << "select url...."; + QList<QUrl> urls; + if(path.startsWith("/")) + path = "file://" + path; + pDebug << "filename:...." << path; + urls.append(QUrl(path)); + pDebug << "setInitiallySelectedFiles......" << path; + //m_fileDialogHelper->options()->setInitiallySelectedFiles(urls); +// QDir dir(url.path()); +// url.setPath(dir.absoluteFilePath(filename)); +// pDebug << "selectFile url:" << url << dir.absoluteFilePath(filename) << filename; + selectUrl(QUrl(path)); +} + +QStringList KyNativeFileDialog::selectedFiles() const +{ + QStringList list; + for (const QUrl &url : selectedUrls()) { + QUrl fileUrl(url); + pDebug << "selectedFiles fileUrl.....:" << fileUrl.toString() << fileUrl.path(); +// if(!fileUrl.toString().startsWith("recent://") && !fileUrl.toString().startsWith("trash://")) +// list << fileUrl.toLocalFile(); +// else{ +// list << Peony::FileUtils::getEncodedUri(fileUrl.toString()); +// } + list << Peony::FileUtils::getEncodedUri(fileUrl.toString()); + } + pDebug << "selectedFiles...." << list; + return list; +} + +void KyNativeFileDialog::selectUrl(const QUrl &url) +{ + return; + Q_D(KyNativeFileDialog); + pDebug << "selectUrlkkkkk........url.path:" << url.path() << isDir(url.path()); + if(d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory && isDir(url.path())) + setCurrentInputName(QFileInfo(url.path()).fileName()); +} + +QList<QUrl> KyNativeFileDialog::selectedUrls() const +{ + pDebug << "selectedUrls........:"; + if (!getCurrentPage()) { + return QList<QUrl>(); + } + pDebug << "selectedUrls........:" << getCurrentPage()->getCurrentSelections(); + QStringList urlStrList = getCurrentPage()->getCurrentSelections(); + QList<QUrl> urls; + for (auto uri : urlStrList) { + pDebug << "selectedUrls urlDecode....:" << Peony::FileUtils::urlDecode(uri) << QUrl(Peony::FileUtils::urlDecode(uri)) << Peony::FileUtils::getTargetUri(uri); + if (!uri.startsWith("trash://") && !uri.startsWith("recent://") && + !uri.startsWith("computer://") && !uri.startsWith("favorite://") && + !uri.startsWith("filesafe://") && !uri.startsWith("mult://") && + !uri.startsWith("smb://") && !uri.startsWith("ftp://") && + !uri.startsWith("sftp://") &&!uri.startsWith("mtp://") && + !uri.startsWith("gphoto2://")){ + + if(uri.startsWith("file:///")) + uri = uri.remove(0,7); + pDebug << "open selectedFiles00000..........:" << uri; + urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(uri)); + } + else + { + urls << convertSpecialPath(uri); + } + pDebug << "selectedUrls uri test......." << uri << urls; + } + pDebug << "selectedUrls..." << urls; + return urls; +} + +QStringList qt_strip_filters(const QStringList &filters) +{ + QStringList strippedFilters; + QRegExp r(QString::fromLatin1("^(.*)\\(([^()]*)\\)$")); + const int numFilters = filters.count(); + strippedFilters.reserve(numFilters); + for (int i = 0; i < numFilters; ++i) { + QString filterName; + int index = r.indexIn(filters[i]); + if (index >= 0) + filterName = r.cap(1); + strippedFilters.append(filterName.simplified()); + } + return strippedFilters; +} + +void KyNativeFileDialog::setComBoxItems(const QStringList &filters) +{ + mKyFileDialogUi->m_fileTypeCombo->clear(); + mKyFileDialogUi->m_fileTypeCombo->addItems(filters); +} + +void KyNativeFileDialog::setNameFilters(const QStringList &filters) +{ + Q_D(KyNativeFileDialog); + d->nameFilters = filters; + pDebug << "setNameFilters filters..... :" << filters; + m_nameFilterMap.clear(); + + QStringList l; + if (testOption(QFileDialog::HideNameFilterDetails) && (d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory)) { + l = qt_strip_filters(filters); + pDebug << "HideNameFilterDetails..." << l; + setComBoxItems(l); + } else { + l = filters; + setComBoxItems(filters); + } + for(int i = 0; i < filters.length(); i++) + m_nameFilterMap.insert(i, l[i]); + + int index = mKyFileDialogUi->m_fileTypeCombo->currentIndex(); + pDebug << "setNameFilters index.....:" << index; + selectNameFilterCurrentIndex(index); +} + +QStringList KyNativeFileDialog::nameFilters() const +{ + Q_D( const KyNativeFileDialog); + return d->nameFilters; +} + +void KyNativeFileDialog::selectNameFilter(const QString &filter) +{ + Q_D( const KyNativeFileDialog); + + pDebug << "selectNameFilter.,,,,,....." << filter; + QString key = filter; + int index = 0; + if(!mKyFileDialogUi->m_fileTypeCombo->findText(key)){ + if (testOption(QFileDialog::HideNameFilterDetails) && (d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory)) { + QStringList l = qt_strip_filters(QStringList(filter)); + pDebug << "llllllllllll" << l << l.length(); + if(l.length() > 0) + key = l.first(); + } else { + key = filter; + } + } + pDebug << "key:" << key; + if(!key.isEmpty()) + index = mKyFileDialogUi->m_fileTypeCombo->findText(key); + if(index < 0) + return; + pDebug << "index:" << index; + + selectNameFilterCurrentIndex(index); + selectNameFilterByIndex(index); + Q_EMIT filterSelected(filter); +} + + +QString KyNativeFileDialog::selectedNameFilter() const +{ + Q_D(const KyNativeFileDialog); + const QComboBox *box = mKyFileDialogUi->m_fileTypeCombo; + return box ? d->nameFilters.value(box->currentIndex()) : QString(); +} + +void KyNativeFileDialog::selectNameFilterByIndex(int index) +{ + Q_D(KyNativeFileDialog); + if (index < 0 || index >= d->nameFilters.length() || !getCurrentPage()) { + return; + } + mKyFileDialogUi->m_fileTypeCombo->setCurrentIndex(index); + QStringList nameFilters = d->nameFilters; + if (index == nameFilters.size()) { + nameFilters.append(d->nameFilters[d->nameFilters.length() - 1]); + setNameFilters(nameFilters); + } + QString nameFilter = nameFilters.at(index); + QStringList newNameFilters = QPlatformFileDialogHelper::cleanFilterList(nameFilter); + pDebug << "selectNameFilterByIndex00000000000" << newNameFilters; + if (/*d->acceptMode == QFileDialog::AcceptSave &&*/ !newNameFilters.isEmpty() && (d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory)) { + QMimeDatabase db; + QString text = copyEditText();//mKyFileDialogUi->m_fileNameEdit->text(); + pDebug << "selectNameFilterByIndex text...." << text; + pDebug << "selectNameFilterByIndex newNameFilters...." << newNameFilters; + QStringList list = text.split("."); + pDebug << "selectNameFilterByIndex11111111 list" << list; + QString filter = newNameFilters[0]; + if(filter.startsWith("*.")) + filter = filter.remove(0,2); + if(list.length() > 1) + { + if(list[list.length() - 1] != filter) + { + int m = list[list.length() - 1].length(); + int n = text.length() - m; + pDebug << "mmmmmmmmmm..." << m << " nnnnnnnn.... " << n; + QString s = text.remove(n, m); + pDebug << "s000000....." << s; + s = s + filter; + pDebug << "s11111111....." << s; + mKyFileDialogUi->m_fileNameEdit->setText(s); + } + }else{ + + } + } + if ((d->fileMode == QFileDialog::DirectoryOnly || d->fileMode == QFileDialog::Directory) && QStringList("/") != newNameFilters) { + newNameFilters = QStringList("/"); + } +} + +void KyNativeFileDialog::selectNameFilterCurrentIndex(int index) +{ + Q_D(KyNativeFileDialog); + + if(index < 0 || index >= d->nameFilters.length()) + return; + QString nameFilter = d->nameFilters[index]; + pDebug << "selectNameFilterCurrentIndex nameFilter..." << nameFilter; + + if(nameFilter.isEmpty()) + return; + QStringList filterList = QPlatformFileDialogHelper::cleanFilterList(nameFilter); + + pDebug << "selectNameFilterCurrentIndex filterList:" << filterList; + QStringList mimeTypeFilterList; + + pDebug << "selectNameFilterCurrentIndex filemode.....:" << fileMode(); + if(fileMode() == QFileDialog::Directory || fileMode() == QFileDialog::DirectoryOnly) + { + getCurrentPage()->addFileDialogFiltersCondition(mimeTypeFilterList, filterList, QDir::Dirs, Qt::CaseInsensitive); + } + else + getCurrentPage()->addFileDialogFiltersCondition(mimeTypeFilterList, filterList, filter(), Qt::CaseInsensitive); + pDebug << "addFileDialogFiltersCondition 0000000000000" << getCurrentSelections().length(); + if(m_fileDialogHelper->isViewInitialFinished()){ + refreshContainerSort(); + refreshCompleter(); + } + pDebug << "addFileDialogFiltersCondition 11111111111111" << getCurrentSelections().length(); + selectionChanged(); +} + +int KyNativeFileDialog::selectNameFilterIndex() const +{ + const QComboBox *box = mKyFileDialogUi->m_fileTypeCombo; + return box ? box->currentIndex() : -1; +} + +QDir::Filters KyNativeFileDialog::filter() +{ + Q_D(KyNativeFileDialog); + return d->filters; +} + +void KyNativeFileDialog::setFilter(QDir::Filters filters) +{ + Q_D(KyNativeFileDialog); + d->filters = filters; +} + +void KyNativeFileDialog::setAcceptMode(QFileDialog::AcceptMode mode) +{ + Q_D(KyNativeFileDialog); + d->acceptMode = mode; + updateAcceptButtonState(); + if (mode == QFileDialog::AcceptOpen) { + mKyFileDialogUi->m_fileNameLabel->setText(tr("Name"));//文件名 + mKyFileDialogUi->m_fileNameLabel->setAlignment(Qt::AlignCenter); + mKyFileDialogUi->m_newFolderButton->hide(); + mKyFileDialogUi->m_acceptButton->setText(tr("Open")); + mKyFileDialogUi->m_rejectButton->setText(tr("Cancel")); + connect(mKyFileDialogUi->m_fileNameEdit , &QLineEdit::textChanged, this, &KyNativeFileDialog::onCurrentInputNameChanged); + + } else { + mKyFileDialogUi->m_fileNameLabel->setText(tr("Save as")); + mKyFileDialogUi->m_fileNameLabel->setAlignment(Qt::AlignCenter); + mKyFileDialogUi->m_newFolderButton->setText(tr("New Folder")); + mKyFileDialogUi->m_newFolderButton->show(); + mKyFileDialogUi->m_acceptButton->setText(tr("Save")); + mKyFileDialogUi->m_rejectButton->setText(tr("Cancel")); + mKyFileDialogUi->m_acceptButton->setDefault(true); + connect(mKyFileDialogUi->m_fileNameEdit, &QLineEdit::textChanged, this, &KyNativeFileDialog::onCurrentInputNameChanged); + connect(mKyFileDialogUi->m_newFolderButton, &QPushButton::clicked, this, &KyNativeFileDialog::onNewFolder); + } +} + +QFileDialog::AcceptMode KyNativeFileDialog::acceptMode() const +{ + Q_D(const KyNativeFileDialog); + return d->acceptMode; +} + +void KyNativeFileDialog::setFileMode(QFileDialog::FileMode mode) +{ + Q_D(KyNativeFileDialog); +// if (d->fileMode == QFileDialog::DirectoryOnly || d->fileMode == QFileDialog::Directory) { +// mKyFileDialog->setNameFilters(QStringList()); +// } + if(mode == QFileDialog::ExistingFile || mode == QFileDialog::AnyFile || + mode == QFileDialog::DirectoryOnly) + { + pDebug << "setFileMode000................" << mode; + + getCurrentPage()->setSelectionMode(QAbstractItemView::SingleSelection); + } + else + { + pDebug << "setFileMode00011111................" << mode; + + getCurrentPage()->setSelectionMode(QAbstractItemView::ExtendedSelection); + } + + if (mode == QFileDialog::DirectoryOnly || mode == QFileDialog::Directory) { + pDebug << "m_fileDialogHelper options setNameFilters...."; + m_fileDialogHelper->options()->setNameFilters(QStringList() << tr("Directories")); + setNameFilters(QStringList() << tr("Directories")); + mKyFileDialogUi->m_fileTypeCombo->clear(); + mKyFileDialogUi->m_fileTypeCombo->addItem(tr("Directories")); + mKyFileDialogUi->m_fileTypeCombo->setEnabled(false); + } + + d->fileMode = mode; + updateAcceptButtonState(); +} + +QFileDialog::FileMode KyNativeFileDialog::fileMode() +{ + Q_D(KyNativeFileDialog); + return d->fileMode; +} + +void KyNativeFileDialog::setViewMode(ViewMode mode) +{ + if(containerView()){ + pDebug << "setViewMode...." << mode << containerView()->viewId(); + if(mode == ViewMode::List && containerView()->viewId() != "List View") + { + this->getCurrentPage()->switchViewType("List View"); + } + else if(mode == ViewMode::Icon && containerView()->viewId() != "Icon View") + this->getCurrentPage()->switchViewType("Icon View"); + onSwitchView(); + } +} + +KyNativeFileDialog::ViewMode KyNativeFileDialog::viewMode() const +{ +// this->getCurrentPage()->switchViewType("List View"); + + if(containerView() && containerView()->viewId() == "List View") + return ViewMode::List; + return ViewMode::Icon; +} + +void KyNativeFileDialog::setLabelText(QFileDialog::DialogLabel label, const QString &text) +{ + switch (static_cast<int>(label)) { + case QFileDialog::Accept: + mKyFileDialogUi->m_acceptButton->setText(text); + break; + case QFileDialog::Reject: + mKyFileDialogUi->m_rejectButton->setText(text); + default: + break; + } +} + +QString KyNativeFileDialog::labelText(QFileDialog::DialogLabel label) const +{ + switch (static_cast<int>(label)) { + case QFileDialog::Accept: + return mKyFileDialogUi->m_acceptButton->text(); + case QFileDialog::Reject: + return mKyFileDialogUi->m_rejectButton->text(); + default: + break; + } + + return QString(); +} + +void KyNativeFileDialog::setOptions(QFileDialog::Options options) +{ + Q_D(KyNativeFileDialog); + d->options = options; + if (options.testFlag(QFileDialog::ShowDirsOnly)) { + d->m_container->setFilterLabelConditions(selectedNameFilter()); + } +} + +void KyNativeFileDialog::setOption(QFileDialog::Option option, bool on) +{ + Q_D(KyNativeFileDialog); + QFileDialog::Options options = d->options; + if (on) { + options |= option; + } else { + options &= ~option; + } + setOptions(options); +} + +bool KyNativeFileDialog::testOption(QFileDialog::Option option) const +{ + Q_D(const KyNativeFileDialog); + return m_fileDialogHelper->options()->testOption(static_cast<QFileDialogOptions::FileDialogOption>(option)); +} + +QFileDialog::Options KyNativeFileDialog::options() const +{ + Q_D(const KyNativeFileDialog); + return d->options; +} + +void KyNativeFileDialog::setCurrentInputName(const QString &name) +{ + pDebug << "setCurrentInputName.........:" << name; + m_copyEditText = name; +// mKyFileDialogUi->m_fileNameEdit->setText(name); + QMimeDatabase db; + const QString &suffix = db.suffixForFileName(name); + if (suffix.isEmpty()) { + mKyFileDialogUi->m_fileNameEdit->selectAll(); + } else { + mKyFileDialogUi->m_fileNameEdit->setSelection(0, name.length() - suffix.length() - 1); + } +} + +void KyNativeFileDialog::onAcceptButtonClicked() +{ + Q_D(KyNativeFileDialog); + if (!getCurrentPage()) { + return; + } + pDebug << "onAcceptButtonClicked:" << d->acceptMode << d->fileMode<<QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss:zzz"); + pDebug << "onAcceptButtonClicked000 sfiles..........:" << getCurrentSelectionsList(); + pDebug << "onAcceptButtonClicked111 sfiles..........:" << selectedFiles(); + + if(d->fileMode == QFileDialog::ExistingFile || d->fileMode == QFileDialog::ExistingFiles || d->fileMode == QFileDialog::AnyFile) + { + QList<QString> sFiles = selectedFiles(); + for (int i = 0; i < sFiles.length(); ++i) { + if(isDir(sFiles[i])) + { + pDebug << "gotouri666666" << "file://" + sFiles[i]; + goToUri(sFiles[i], true); + return; + } + } + } + + if(copyEditText() != "") + { + lineEditTextChange(copyEditText()); + } + pDebug << "onAcceptButtonClicked directoryUrl:" << directoryUrl() << directory(); + QList<QString> sFiles = selectedFiles(); + pDebug << "onAcceptButtonClicked sfiles..........:" << sFiles; +// pDebug << "getSelections........:" << containerView()->getSelections(); +// pDebug << "uri:" << Peony::FileUtils::getTargetUri(getCurrentUri()); +// pDebug << "uri1111111111:" << Peony::FileUtils::getParentUri(getCurrentUri()); + if(!m_searchMode) + { + pDebug << "onAcceptButtonClicked getCurrentUri........:" << getCurrentUri(); + if(!Peony::FileUtils::isFileExsit(getCurrentUri())){ + pDebug << directory().path() << "getCurrentUri directory not exists" << getCurrentUri(); + return; + } + } + else + { + foreach (QString str, sFiles) { + if(!Peony::FileUtils::isFileExsit(str))// + { + pDebug << "FileUtils path,,,:" << str << "not exists!"; + return; + } + } + } + + if (d->acceptMode == QFileDialog::AcceptSave) + { + if(!doSave(sFiles)) + { + pDebug << "da save faile!"; + return; + } + else + pDebug << "da save success!"; + + } + else if(d->acceptMode == QFileDialog::AcceptOpen) + { + if(!doOpen(sFiles)) + { + pDebug << "da open faile!"; + return; + } + else + pDebug << "da open success!"; + } + Q_EMIT m_fileDialogHelper->accept(); +} + +bool KyNativeFileDialog::saveMessageBox(QString name) +{ + m_RecodPath = ""; + if(QMessageBox::warning(this, tr("Warning"), name + " " + tr("exist, are you sure replace?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) + { + return true; + } + return false; +} + +bool KyNativeFileDialog::checkSaveFileExsits(QString path, QString fileName) +{ + bool exists = false; + + QString directoryPath = directoryUrl().toString(); + if (directoryPath.startsWith("trash://") || directoryPath.startsWith("recent://") + || directoryPath.startsWith("computer://") || directoryPath.startsWith("favorite://")){ + QStringList urlStrList = getCurrentPage()->getCurrentSelections(); + QStringList pathList; + for (auto uri : urlStrList) { + pDebug << "checkselect....:" << Peony::FileUtils::urlDecode(uri) << QUrl(Peony::FileUtils::urlDecode(uri)) << Peony::FileUtils::getTargetUri(uri); + pathList << Peony::FileUtils::getTargetUri(uri); + QString str = Peony::FileUtils::getFileDisplayName(uri); + pDebug << "str....." << str << fileName; + if(str == fileName){ + exists = true; + pDebug << "checkSaveFileExsits path000000...." << path << exists; + + return exists; + } + } + } + + if(fileMode() == QFileDialog::Directory || fileMode() == QFileDialog::DirectoryOnly) + { + QDir dir(path); + exists = dir.exists(); + } + else{ + QFile file(path); + exists = file.exists(); + if(!exists) + exists = Peony::FileUtils::isFileExsit(path); + } + pDebug << "checkSaveFileExsits path...." << path << exists; + return exists; +} + +bool KyNativeFileDialog::doSave(QStringList sFiles) +{ + Q_D(KyNativeFileDialog); + + QString file_name = copyEditText(); + QString originName = file_name; + + pDebug << "file_name000......:" << file_name; + bool suffixCheck = false; + QStringList nameFilters = d->nameFilters; + + if(mKyFileDialogUi->m_fileTypeCombo->currentIndex() >= 0 && + mKyFileDialogUi->m_fileTypeCombo->currentIndex() < nameFilters.length()) + { + QString nameFilterList = nameFilters[mKyFileDialogUi->m_fileTypeCombo->currentIndex()]; + + for (QString nameFilter : QPlatformFileDialogHelper::cleanFilterList(nameFilterList)) { + pDebug << "nameFilter:" << nameFilter << "nameFilterList:" << nameFilterList; +// if(nameFilter == "*") +// break; + QRegExp re(nameFilter, Qt::CaseInsensitive, QRegExp::Wildcard); + if (re.exactMatch(file_name)) { + pDebug << "file_name:" << file_name; + suffixCheck = true; + }; + if (suffixCheck) { + break; + } + } + } + pDebug << "suffixCheck 0000:" << suffixCheck; + if(!suffixCheck && !m_fileDialogHelper->options()->defaultSuffix().isEmpty()){ + QRegExp re(m_fileDialogHelper->options()->defaultSuffix(), Qt::CaseInsensitive, QRegExp::Wildcard); + if (re.exactMatch(file_name)) { + pDebug << "file_name 1111:" << file_name; + if(!file_name.contains(".")) + file_name.append('.' + m_fileDialogHelper->options()->defaultSuffix()); + + if(checkLongName(directory().path(), file_name)){ + if(longNameDialog(directory().path(), file_name)){ + onAcceptButtonClicked(); + } + return false; + } + setCurrentInputName(file_name); + pDebug << "path///:" << directory().path() + "/" + file_name; + if(checkSaveFileExsits(directory().path() + "/" + file_name, file_name)) + if(!saveMessageBox(file_name)) + return false; + } + } + pDebug << "suffixCheck:" << suffixCheck << "nameFilters:" << nameFilters << "defaultSuffix:" << m_fileDialogHelper->options()->defaultSuffix(); + if (!suffixCheck && !nameFilters.isEmpty()) { + QMimeDatabase mdb; + if(mKyFileDialogUi->m_fileTypeCombo->currentIndex() < 0 || + mKyFileDialogUi->m_fileTypeCombo->currentIndex() >= nameFilters.length()) + return false; + QString nameFilter = nameFilters[mKyFileDialogUi->m_fileTypeCombo->currentIndex()]; + QStringList newNameFilters = QPlatformFileDialogHelper::cleanFilterList(nameFilter); + if (!newNameFilters.isEmpty()) { +// if(m_fileDialogHelper->options()->defaultSuffix() == ""){ + + QString defaultSuffix = m_fileDialogHelper->options()->defaultSuffix().isEmpty() ? "" : + m_fileDialogHelper->options()->defaultSuffix(); + for (const QString &filter : newNameFilters) { + QString suffix = mdb.suffixForFileName(filter); + if(suffix.isEmpty()) + suffix = defaultSuffix; + pDebug << "suffix....." << suffix; + if (suffix.isEmpty()) { + QRegExp regExp(filter.mid(2), Qt::CaseInsensitive, QRegExp::Wildcard); + mdb.allMimeTypes().first().suffixes().first(); + for (QMimeType m : mdb.allMimeTypes()) { + pDebug << "m.suffixes()......" << filter << m.suffixes(); + for (QString suffixe : m.suffixes()) { + if (regExp.exactMatch(suffixe)) { + suffix = suffixe; + break; + } + } + if (!suffix.isEmpty()) { + break; + } + } + + } + + pDebug << "suffix:" << suffix; + if (!suffix.isEmpty()) { + QString oldName = file_name; + oldName.append('.' + suffix); + if(checkLongName(directory().path(), oldName)){ + if(longNameDialog(directory().path(), oldName)){ + onAcceptButtonClicked(); + } + return false; + } + setCurrentInputName(oldName); + pDebug << "path///:" << directory().path() + "/" + oldName; + if(checkSaveFileExsits(directory().path() + "/" + oldName, oldName)){ + if(!saveMessageBox(oldName)) + return false; + break; + } + if(filter == newNameFilters[newNameFilters.length() - 1]) + { + QString oldName = file_name; + oldName.append('.' + mdb.suffixForFileName(newNameFilters[0])); + if(checkLongName(directory().path(), oldName)){ + if(longNameDialog(directory().path(), oldName)){ + onAcceptButtonClicked(); + } + return false; + } + + if(checkSaveFileExsits(directory().path() + "/" + oldName, oldName)){ + if(!saveMessageBox(oldName)) + return false; + break; + } + setCurrentInputName(oldName); + return true; + } + } +// } + } + } + } + else if(suffixCheck) + { + pDebug << "suffixCheck.....:" << suffixCheck << "path///:" << directory().path() + "/" + file_name; + if(checkLongName(directory().path(), file_name)){ + if(longNameDialog(directory().path(), file_name)){ + onAcceptButtonClicked(); + } + return false; + } + pDebug << "suffixCheck.....:" << suffixCheck << "path///:" << directory().path() + "/" + file_name; + + if(checkSaveFileExsits(directory().path() + "/" + file_name, file_name)){ + if(!saveMessageBox(file_name)) + return false; + } + + } + return true; +} + +bool KyNativeFileDialog::doOpen(QStringList sFiles) +{ + Q_D(KyNativeFileDialog); + +// if(d->fileMode != QFileDialog::AnyFile && sFiles.length() == 0) +// return false; +// if(d->fileMode == QFileDialog::DirectoryOnly && sFiles.length() > 1) +// return false; + pDebug << "doOpen fileMode:" << d->fileMode; + if(d->fileMode == QFileDialog::ExistingFile || d->fileMode == QFileDialog::ExistingFiles) + { + int isfiles = 0; + int isDirctory = 0; + foreach (QString files, sFiles) + { + if(isDir(files)) + { + isDirctory++; + } + else + isfiles++; + } + pDebug << "isfiles:" << isfiles << "isDirctory:" << isDirctory; + if((isfiles > 0 && isDirctory > 0) || (isDirctory > 1) || (isfiles <= 0 && isDirctory <= 0)) + return false; + else{ + pDebug << "open setSelected..."; + Q_EMIT filesSelected(selectedUrls()); + } + } + else if(d->fileMode == QFileDialog::AnyFile) + { + if(sFiles.length() > 0) + { + Q_EMIT filesSelected(selectedUrls()); + } + else if(copyEditText() != "") + { + QList<QUrl> urlList; + pDebug << "directory path:" << directory().path() << directoryUrl().path(); + urlList.append(QUrl(directory().path() + "/" + copyEditText())); + Q_EMIT filesSelected(urlList); + } + else + return false; + } + else if(d->fileMode == QFileDialog::DirectoryOnly || d->fileMode == QFileDialog::Directory) + { + if(copyEditText() != "") + { + if(sFiles.isEmpty() || (!sFiles.isEmpty() && !isDir(sFiles[0]))) + { + return false; + } + else + Q_EMIT filesSelected(selectedUrls()); + } + else + { + if (!getCurrentPage()) { + return false; + } + QList<QUrl> urls; + QString uri = getCurrentPage()->getCurrentUri(); + pDebug << "current uri........:" << uri; + + if (!uri.startsWith("trash://") && !uri.startsWith("recent://") && + !uri.startsWith("computer://") && !uri.startsWith("favorite://") && + !uri.startsWith("filesafe://") && !uri.startsWith("mult://") && + !uri.startsWith("smb://") && !uri.startsWith("ftp://") && + !uri.startsWith("sftp://") && !uri.startsWith("mtp://") && + !uri.startsWith("gphoto2://")){ + + if(uri.startsWith("file:///")) + uri = uri.remove(0,7); + pDebug << "open selectedFiles00000..........:" << uri; + urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(uri)); + } + else + { + urls << convertSpecialPath(uri); + } + if(containerView()) + pDebug << "select uri....:" << containerView()->getSelections(); + + Q_EMIT filesSelected(urls); + } + } + pDebug << "onAcceptButtonClicked selectedfiles:" << sFiles; + + return true; +} + + +void KyNativeFileDialog::onRejectButtonClicked() +{ + Q_EMIT m_fileDialogHelper->reject(); +} + +bool KyNativeFileDialog::isDir(QString path) +{ + pDebug << "isDir 0000....." << path; + if(path.startsWith("smb://")){ + g_autofree char* gPath = g_file_get_path(const_cast<GFile*>(g_file_new_for_uri(path.toLocal8Bit()))); + pDebug << "isDir gPath:......" << (gPath == nullptr) << gPath; + + if(gPath == nullptr){ + gPath = g_file_get_path(const_cast<GFile*>(g_file_new_for_uri(Peony::FileUtils::urlDecode(path).toLocal8Bit()))); + pDebug << "isDir gPath 1111:......" << (gPath == nullptr) << gPath; + } + if(gPath == nullptr){ + gPath = g_file_get_path(const_cast<GFile*>(g_file_new_for_uri(Peony::FileUtils::urlEncode(path).toLocal8Bit()))); + pDebug << "isDir gPath 222222:......" << (gPath == nullptr) << gPath; + } + if(gPath == nullptr) + return true; + } + pDebug << "isDir 1111....." << path; + + auto fileSymLinkInfo = Peony::FileInfo::fromUri(path); + if(fileSymLinkInfo->isSymbolLink()) { + path = fileSymLinkInfo->symlinkTarget(); + } + else + path = Peony::FileUtils::urlEncode(path); + + QFile file(path); + QFileInfo fileInfo(file); + pDebug << "isDir path1111:" << path << fileInfo.isDir() << Peony::FileUtils::isFileDirectory(path) << Peony::FileUtils::getFileIsFolder(path);; + if(fileInfo.isDir()) + return true; + + pDebug << "isDir path2222222..:" << path << Peony::FileUtils::isFileDirectory(path) << Peony::FileUtils::getFileIsFolder(path); + return (Peony::FileUtils::isFileDirectory(path) || Peony::FileUtils::getFileIsFolder(path)); +} + +void KyNativeFileDialog::goBack() +{ + pDebug << "goback...." << getCurrentPage()->canGoBack(); + getCurrentPage()->goBack(); +} + +void KyNativeFileDialog::goForward() +{ + pDebug << "goForward...." << getCurrentPage()->canGoForward(); + getCurrentPage()->goForward(); +} + +void KyNativeFileDialog::goToParent() +{ + pDebug << "goToParent...." << getCurrentPage()->canCdUp(); + getCurrentPage()->cdUp(); + +} + +void KyNativeFileDialog::setHelper(KyFileDialogHelper* helepr) +{ + if(helepr != nullptr) + m_fileDialogHelper = helepr; +} + +void KyNativeFileDialog::onSwitchView() +{ + pDebug << "onSwitchView containerView:" << (containerView() == nullptr); + if(containerView() != nullptr) + { + QString viewId = containerView()->viewId(); + pDebug << "onSwitchView:" << viewId; + if (viewId == "List View") { + mKyFileDialogUi->m_modeButton->setIcon(QIcon::fromTheme("view-list-symbolic")); + this->mKyFileDialogUi->m_listModeAction->setChecked(true); + this->mKyFileDialogUi->m_iconModeAction->setChecked(false); + } else { + mKyFileDialogUi->m_modeButton->setIcon(QIcon::fromTheme("view-grid-symbolic")); + this->mKyFileDialogUi->m_listModeAction->setChecked(false); + this->mKyFileDialogUi->m_iconModeAction->setChecked(true); + } + } +} + +void KyNativeFileDialog::updateWindowState() +{ + Q_D(KyNativeFileDialog); + pDebug << "updateWindowState.............." << getCurrentUri() << directory() << directoryUrl() << mKyFileDialogUi->m_fileNameEdit->text() << copyEditText(); + //mKyFileDialogUi->m_fileNameEdit->setText(""); + pDebug << "updateWindowState m_searchMode.............." <<m_searchMode << getCurrentUri() << m_isClearSearchKey; + +// if(m_searchMode && !getCurrentUri().startsWith("search:///") && !m_isClearSearchKey) +// { +// m_isClearSearchKey = false; +// searchButtonClicked(); +// } + + refreshCompleter(); +// const QStringList list = getCurrentPage()->getAllFileUris(); +// pDebug << "getAllFileUris:" << list; +// pDebug << "getselectUris:" << getCurrentSelectionsList(); + +// m_CurrentPathAllFiles.clear(); + +// foreach (QString str, list) { +// str = Peony::FileUtils::urlDecode(str); +// m_CurrentPathAllFiles.append(str.split("/").last()); +// } + +// pDebug << "updateWindowState 1111111111111"; +// QStringListModel *model = (QStringListModel *)(m_completer->model()); +// model->setStringList(m_CurrentPathAllFiles); +// pDebug << "updateWindowState 2222222222222"; + + auto uri = getCurrentUri(); + pDebug << "updateWindowState uri updatePath....." << uri << getCurrentPage()->canGoBack(); + //mKyFileDialogUi->m_pathbarWidget->updatePath(uri); + mKyFileDialogUi->m_backButton->setEnabled(getCurrentPage()->canGoBack()); + mKyFileDialogUi->m_forwardButton->setEnabled(getCurrentPage()->canGoForward()); + bool canCdUp = getCurrentPage()->canCdUp(); + if(uri.startsWith("mult://")) + canCdUp = false; + if ((uri == "file:///data/usershare" || uri == "file:///data/usershare/") && Peony::FileUtils::isFileExsit("file:///data/usershare")){ + bool isDBlockHasUserFile = isDataBlockHasUserFile(); + if(!isDBlockHasUserFile) { + canCdUp = false; + } + } + mKyFileDialogUi->m_toParentButton->setEnabled(canCdUp); + updateStatusBar(); + pDebug << "updateWindowState 44444" << copyEditText().isEmpty(); + lineEditTextChange(copyEditText()); + pDebug << "updateWindowState 55555555555555555555" << uri; + +} + +QString KyNativeFileDialog::selectName() +{ + QStringList selectList = getCurrentPage()->getCurrentSelections(); + QString nameStr = ""; + m_displayNameMap.clear(); + bool selectFiles = false; + for(int i = 0; i < selectList.length(); i++) + { + pDebug << "parenturi....." << Peony::FileUtils::getParentUri(selectList[i]); + pDebug << "selectName ....i:" << i << selectList[i] << Peony::FileUtils::getFileDisplayName(selectList[i]) << Peony::FileUtils::urlDecode(selectList[i]) << isDir(selectList[i]); + QString str = Peony::FileUtils::getFileDisplayName(selectList[i]);//Peony::FileUtils::urlDecode(selectList[i]); + m_displayNameMap.insert(Peony::FileUtils::urlDecode(selectList[i]), Peony::FileUtils::getParentUri(selectList[i]) + "/" + str); + + if(acceptMode() == QFileDialog::AcceptSave && isDir(selectList[i])){ + continue; + } + if(acceptMode() == QFileDialog::AcceptOpen && (fileMode() == QFileDialog::ExistingFile || + fileMode() == QFileDialog::ExistingFiles || fileMode() == QFileDialog::AnyFile) && isDir(selectList[i])){ + continue; + } + selectFiles = true; + QString name = ""; + if(selectList.length() == 1) + name += str.split("/").last(); + else if(i < (selectList.length() -1)) + name += "\"" + str.split("/").last() + "\" "; + else + name += "\"" + str.split("/").last() + "\""; + nameStr += name; + } + if(selectFiles || selectList.length() == 0) + setSelectIsDir(false); + else + setSelectIsDir(true); + + pDebug << "acceptMode....." << acceptMode() << selectList.length(); + if(acceptMode() == QFileDialog::AcceptSave){ + for(int i = 0; i < selectList.length(); i++) { + if(isDir(selectList[i])) { + pDebug << "selectList 00000000000" << selectList[i] << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss:zzz"); + mKyFileDialogUi->m_acceptButton->setText(tr("Open")); + return nameStr; + } + } + mKyFileDialogUi->m_acceptButton->setText(tr("Save")); + } + return nameStr; +} + +void KyNativeFileDialog::updateStatusBar() +{ + if(getCurrentSelectionsList().length() > 0) + { + foreach (QString str, getCurrentSelections()) { + pDebug << "updateStatusBar str" << str; + Q_EMIT currentChanged(QUrl(QUrl(str).path())); + } + } + updateAcceptButtonState(); + pDebug << "updateStatusBar 000000"; + QString nameStr = selectName(); + + if(!selectIsDir() && nameStr != mKyFileDialogUi->m_fileNameEdit->text()){ + pDebug << "updateStatusBar 000000" << nameStr.isEmpty() << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss:zzz"); + if(acceptMode() == QFileDialog::AcceptOpen){ + if(!nameStr.isEmpty())//如果这里不进行判断,那选中后再修改输入框内容会被清空;这里判断的话,选中后,鼠标点击空白处,输入框不会被清空,qt原生对话框也这样 + mKyFileDialogUi->m_fileNameEdit->setText(nameStr); + } + else if(!nameStr.isEmpty()) + mKyFileDialogUi->m_fileNameEdit->setText(nameStr); + } + setSelectIsDir(false); +} + +void KyNativeFileDialog::containerMenuRequest(const QPoint &pos) +{ + pDebug << "menuRequest....00000" << pos << QCursor::pos() << (this->getCurrentPage() == nullptr); + if(this->getCurrentPage()) + pDebug << "menuRequest....1111111" << (this->getCurrentPage()->getView() == nullptr); + Peony::DirectoryViewMenu menu(this, this); + QStringList hideActionsName; + hideActionsName.append(OPEN_IN_NEW_WINDOW_ACTION); + hideActionsName.append(OPEN_IN_NEW_TAB_ACTION); + pDebug << "hideActionsName...." << hideActionsName; + menu.setHiddenActionsByObjectName(hideActionsName); + pDebug << "menuRequest....11111"; + menu.exec(QCursor::pos()); + m_uris_to_edit = menu.urisToEdit(); +} + +void KyNativeFileDialog::delayShow() +{ + Q_D(const KyNativeFileDialog); + //QTBUG48248 借鉴kde plasma-integration里用的QTimer + pDebug << "delayShow start..........." << getCurrentUri(); + d->m_timer->start(); +} + +void KyNativeFileDialog::discardDelayedShow() +{ + Q_D(const KyNativeFileDialog); + pDebug << "discardDelayedShow stop..........."; + d->m_timer->stop(); +} + + +void KyNativeFileDialog::resizeEvent(QResizeEvent *e) +{ + pDebug << "resizeEvent....." << this->width() << mKyFileDialogUi->m_siderWidget->width() << mKyFileDialogUi->m_container->width(); + QDialog::resizeEvent(e); +} + +void KyNativeFileDialog::paintEvent(QPaintEvent *e) +{ + QColor color = this->palette().base().color(); + QColor colorBase = QColor(this->palette().base().color()); + + int R1 = color.red(); + int G1 = color.green(); + int B1 = color.blue(); + qreal a1 = 0.3; + + int R2 = colorBase.red(); + int G2 = colorBase.green(); + int B2 = colorBase.blue(); + qreal a2 = 1; + + qreal a = 1 - (1 - a1)*(1 - a2); + + qreal R = (a1*R1 + (1 - a1)*a2*R2) / a; + qreal G = (a1*G1 + (1 - a1)*a2*G2) / a; + qreal B = (a1*B1 + (1 - a1)*a2*B2) / a; + + colorBase.setRed(R); + colorBase.setGreen(G); + colorBase.setBlue(B); + colorBase.setAlphaF(m_transparency/255.0); + + + QPalette palette = mKyFileDialogUi->m_sider->viewport()->palette(); + palette.setColor(QPalette::Base, Qt::transparent); + mKyFileDialogUi->m_sider->viewport()->setPalette(palette); + + + QPainterPath sidebarPath; + QRect sideBarRect = QRect(mKyFileDialogUi->m_sider->mapTo(this, QPoint()), mKyFileDialogUi->m_sider->size()); + auto adjustedRect = sideBarRect.adjusted(0, 0, 0, 0); + sidebarPath.addRoundedRect(adjustedRect, 6, 6); + +// sidebarPath.addRect(adjustedRect.adjusted(0, 0, 0, -6)); +// sidebarPath.addRect(adjustedRect.adjusted(6, 0, 0, 0)); + QPainter p(this); + QPainterPath contentPath; + contentPath.addRoundedRect(this->rect(), 8, 8); + auto bgPath = contentPath - sidebarPath; + p.fillPath(bgPath, color); + p.fillPath(sidebarPath, colorBase); + + QDialog::paintEvent(e); +} + +void KyNativeFileDialog::keyPressEvent(QKeyEvent *e) +{ + if (e->key() == Qt::Key_Backspace) + { + auto uri = Peony::FileUtils::getParentUri(getCurrentUri()); + //pDebug << "goUp Action" << getCurrentUri() << uri; + if (uri.isNull()) + return; + goToUri(uri, true, true); + } + + return QDialog::keyPressEvent(e); +} + + +Peony::DirectoryViewContainer *KyNativeFileDialog::getCurrentPage() +{ + Q_D(const KyNativeFileDialog); + return d->m_container; +} + +Peony::DirectoryViewContainer *KyNativeFileDialog::getCurrentPage() const +{ + Q_D(const KyNativeFileDialog); + return d->m_container; +} + +Peony::DirectoryViewWidget *KyNativeFileDialog::containerView() const +{ + return getCurrentPage()->getView(); +} + +void KyNativeFileDialog::updateAcceptButtonState() +{ + Q_D(const KyNativeFileDialog); + + pDebug << "updateAcceptButtonState......" << getCurrentUri() << d->acceptMode << d->fileMode; + if(d->acceptMode == QFileDialog::AcceptOpen) + { + if(d->fileMode != QFileDialog::Directory && d->fileMode != QFileDialog::DirectoryOnly) + { + mKyFileDialogUi->m_acceptButton->setEnabled(!(getCurrentSelectionsList().length() == 0)); + return; + bool isSelectFile = false; + if(copyEditText() == "") + mKyFileDialogUi->m_acceptButton->setEnabled(!(getCurrentSelectionsList().length() == 0)); + + if(copyEditText() != "") + { + QString text = copyEditText(); + QStringList list = text.split("\""); + pDebug << "list234565432............" << list; + for (int i = list.length() - 1; i >= 0; i--) { + if(list[i] == "" || list[i] == " ") + list.removeAt(i); + } + pDebug << "list testtttttt..............:" << list; + + foreach (QString str, list) { + if(str.length() > 0 && str[0] == "\"") + str = str.remove(0, 1); + if(str.length() > 0 && str[str.length() - 1] == "\"") + str = str.remove(str.length() - 1, 1); + QString parentPath = getCurrentUri(); + + if(parentPath.endsWith("/")) + parentPath.remove(parentPath.length() - 1, 1); + pDebug << "updateAcceptButtonState str0000:" << (parentPath + "/" + str);//parentPath.startsWith("recent://") + + if (!parentPath.startsWith("trash://") && !parentPath.startsWith("recent://") && + !parentPath.startsWith("computer://") && !parentPath.startsWith("favorite://") && + !parentPath.startsWith("filesafe://") && !parentPath.startsWith("mult://") && + !parentPath.startsWith("smb://") && !parentPath.startsWith("ftp://") && + !parentPath.startsWith("sftp://") && !parentPath.startsWith("mtp://") && + !parentPath.startsWith("gphoto2://")){ + + QString targetPath = Peony::FileUtils::urlDecode(parentPath + "/" + str); + pDebug << "targetPath11111 uri....." << targetPath << Peony::FileUtils::isFileExsit(targetPath); + + QString targetPath1 = Peony::FileUtils::urlEncode(parentPath + "/" + str); + pDebug << "targetPath123432 uri....." << targetPath1 << Peony::FileUtils::isFileExsit(targetPath1); + + if(Peony::FileUtils::isFileExsit(parentPath + "/" + str)) + isSelectFile = true; + pDebug << "isSelectFileeeeeee22222...." << isSelectFile; + break; + } + else + { + QString targetPath = convertSpecialPath(getCurrentSelections()[0]); + if(Peony::FileUtils::isFileExsit(targetPath)) + { + isSelectFile = true; + pDebug << "isSelectFileeeeeeee3333333333333...." << isSelectFile; + break; + } + } + } + mKyFileDialogUi->m_acceptButton->setEnabled(isSelectFile); + return; + } + } + else + { + bool isSelectFile = true; + if(copyEditText() != "") + { + QString text = copyEditText(); + QStringList list = text.split("\""); + pDebug << "list0000............" << list; + for (int i = list.length() - 1; i >= 0; i--) { + if(list[i] == "" || list[i] == " ") + list.removeAt(i); + } + pDebug << "list1111..............:" << list; + + foreach (QString str, list) { + pDebug << "strrrrrrrrr....." << str; + if(str.length() > 0 && str[0] == "\"") + str = str.remove(0, 1); + if(str.length() > 0 && str[str.length() - 1] == "\"") + str = str.remove(str.length() - 1, 1); + QString parentPath = directory().path();//getCurrentUri(); + + pDebug << "parentPath......" << parentPath; + if(parentPath.endsWith("/")) + parentPath.remove(parentPath.length() - 1, 1); + pDebug << "updateAcceptButtonState str,,,,,,:" << (parentPath + "/" + str) << Peony::FileUtils::isFileExsit(parentPath + "/" + str); + + const QStringList allUriList = getCurrentPage()->getAllFileUris(); + pDebug << "allUriList..." << allUriList.length(); + if(allUriList.length() <= 0) + isSelectFile = false; + else{ + foreach (QString urlStr, allUriList) { + QString displayStr = Peony::FileUtils::getFileDisplayName(urlStr); + pDebug << "displayStr:" << displayStr << "str:" << str << "urlStr:" << Peony::FileUtils::urlDecode(urlStr); + + if(displayStr == str && !str.isEmpty()){ + QString path = Peony::FileUtils::urlDecode(urlStr); + pDebug << "00000path..........." << path; + auto fileSymLinkInfo = Peony::FileInfo::fromUri(path); + if(fileSymLinkInfo->isSymbolLink()) { + path = fileSymLinkInfo->symlinkTarget(); + } + else + path = Peony::FileUtils::urlEncode(path); + + QFile file(path); + QFileInfo fileInfo(file); + pDebug << "00000isDir path1111:" << path << fileInfo.isDir() << Peony::FileUtils::isFileDirectory(path) << Peony::FileUtils::getFileIsFolder(path);; + if(fileInfo.isDir() || Peony::FileUtils::isFileDirectory(path) || Peony::FileUtils::getFileIsFolder(path)){ + isSelectFile = true; + break; + } + } + if(urlStr == allUriList[allUriList.length() - 1]){ + pDebug << "urlStr...." << urlStr; + isSelectFile = false; + } + } + } + +// if(isDir(parentPath + "/" + str)) +// { +// pDebug << "isSelectFile000000...:" << isSelectFile << (parentPath + "/" + str); +// isSelectFile = true; +// break; +// } +// else +// { +// isSelectFile = false; +// } + } + } + pDebug << "isSelectFile...." << isSelectFile; + + QString path = directoryUrl().toString(); + if(path.startsWith("mult://") || path.startsWith("smb://") || + path.startsWith("ftp://") || path.startsWith("sftp://") || + path.startsWith("mtp://") || path.startsWith("gphoto2://")){ + g_autofree char* gPath = nullptr; + gPath = g_file_get_path(const_cast<GFile*>(g_file_new_for_uri(getCurrentUri().toLocal8Bit()))); + pDebug << "updateAcceptButtonState open....gpath.....:" << (gPath == nullptr) << gPath; + if(gPath == nullptr) + isSelectFile = false; + } + + mKyFileDialogUi->m_acceptButton->setEnabled(isSelectFile); + } + } + else + { + //TODO 目录权限判断 + + + QString path = directoryUrl().toString(); + pDebug << "updateAcceptButtonState....path:" << path; + if ((path == "trash:///" || path == "recent:///" + || path == "computer:///" || path == "favorite:///")){ + mKyFileDialogUi->m_newFolderButton->setEnabled(false); + if(getCurrentSelectionsList().isEmpty()){ + mKyFileDialogUi->m_acceptButton->setEnabled(false); + return; + } + } + else if(path.startsWith("mult://") || path.startsWith("smb://") || + path.startsWith("ftp://") || path.startsWith("sftp://") || + path.startsWith("mtp://") || path.startsWith("gphoto2://")){ + g_autofree char* gPath = nullptr; + gPath = g_file_get_path(const_cast<GFile*>(g_file_new_for_uri(getCurrentUri().toLocal8Bit()))); + pDebug << "updateAcceptButtonState save....gpath.....:" << (gPath == nullptr) << gPath; + if(gPath == nullptr){ + mKyFileDialogUi->m_newFolderButton->setEnabled(false); + bool enable = false; + QStringList selectList = getCurrentPage()->getCurrentSelections(); + for(int i = 0; i < selectList.length(); i++) { + if(isDir(selectList[i])) { + pDebug << "selectList dir 00000000000" << selectList[i] << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss:zzz"); + enable = true; + } + } + mKyFileDialogUi->m_acceptButton->setEnabled(enable); + return; + } + else if(gPath[0] == '\0') + { + bool enable = false; + QStringList selectList = getCurrentPage()->getCurrentSelections(); + for(int i = 0; i < selectList.length(); i++) { + if(isDir(selectList[i])) { + pDebug << "selectList dir 00000000000" << selectList[i] << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss:zzz"); + enable = true; + } + } + pDebug << "enable......" << enable; + mKyFileDialogUi->m_newFolderButton->setEnabled(false); + mKyFileDialogUi->m_acceptButton->setEnabled(enable); + pDebug << "gpath is empty......."; + return; + } +// else{ +// pDebug << "updateAcceptButtonState path no exsit....." << Peony::FileUtils::isFileDirectory(path) << Peony::FileUtils::getFileIsFolder(path) << +// Peony::FileUtils::isFileDirectory(gPath) << Peony::FileUtils::getFileIsFolder(gPath); + +// if(!Peony::FileUtils::isFileDirectory(path) && !Peony::FileUtils::getFileIsFolder(path) && +// !Peony::FileUtils::isFileDirectory(gPath) && !Peony::FileUtils::getFileIsFolder(gPath)){ +// mKyFileDialogUi->m_newFolderButton->setEnabled(false); +// mKyFileDialogUi->m_acceptButton->setEnabled(false); +// return; +// } +// } + } + + if(getCurrentSelectionsList().length() != 0){ + mKyFileDialogUi->m_acceptButton->setEnabled(true); + return; + } + if(copyEditText() == "") + mKyFileDialogUi->m_acceptButton->setEnabled(false); + else + mKyFileDialogUi->m_acceptButton->setEnabled(true); + mKyFileDialogUi->m_newFolderButton->setEnabled(true); + + pDebug << "isenabled......:" << mKyFileDialogUi->m_acceptButton->isEnabled(); + } + pDebug << "acceptButton isEnabled:" << mKyFileDialogUi->m_acceptButton->isEnabled(); +} + +void KyNativeFileDialog::onCurrentInputNameChanged() +{ + Q_D(KyNativeFileDialog); + d->currentInputName = copyEditText(); + updateAcceptButtonState(); +} + +void KyNativeFileDialog::onNewFolder() +{ + Peony::CreateTemplateOperation op(getCurrentUri(), Peony::CreateTemplateOperation::EmptyFolder); + op.run(); + return; + QDir dir = directory(); + pDebug << "onNewFolder getCurrentUri:" << getCurrentUri() << directory() << directoryUrl(); + QString path = ""; + if(directory().path() != "/") + path = directory().path(); + path += "/" + tr("NewFolder"); + if(!dir.exists(path)) + { + bool newFolder = dir.mkdir(path); + pDebug << "newFolder:" << newFolder; + } +} + +void KyNativeFileDialog::setSortType() +{ + if(getCurrentPage()->getSortOrder() == Qt::AscendingOrder) + { + mKyFileDialogUi->m_sortButton->setIcon(QIcon::fromTheme("view-sort-descending-symbolic")); + mKyFileDialogUi->m_descending->setChecked(true); + mKyFileDialogUi->m_ascending->setChecked(false); + } + else + { + mKyFileDialogUi->m_sortButton->setIcon(QIcon::fromTheme("view-sort-ascending-symbolic")); + mKyFileDialogUi->m_ascending->setChecked(true); + mKyFileDialogUi->m_descending->setChecked(false); + } +} + +void KyNativeFileDialog::intiContainerSort() +{ + auto settings = Peony::GlobalSettings::getInstance(); + auto sortType = settings->isExist(SORT_COLUMN)? settings->getValue(SORT_COLUMN).toInt() : 0; + auto sortOrder = settings->isExist(SORT_ORDER)? settings->getValue(SORT_ORDER).toInt() : 0; + pDebug << "sortType:" << sortType << sortOrder; + getCurrentPage()->setSortType(Peony::FileItemModel::ColumnType(sortType)); + getCurrentPage()->setSortOrder(Qt::SortOrder(sortOrder)); + setSortType(); + setShowHidden(getWindowShowHidden()); +} + +void KyNativeFileDialog::refreshContainerSort() +{ + intiContainerSort(); + setUseDefaultNameSortOrder(getWindowUseDefaultNameSortOrder()); + setSortFolderFirst(getWindowSortFolderFirst()); +} + +void KyNativeFileDialog::refreshCompleter() +{ + const QStringList list = getCurrentPage()->getAllFileUris(); + pDebug << "getAllFileUris:" << list; + pDebug << "getselectUris:" << getCurrentSelectionsList(); + + m_CurrentPathAllFiles.clear(); + + foreach (QString str, list) { + str = Peony::FileUtils::getFileDisplayName(str); + m_CurrentPathAllFiles.append(str); + } + + pDebug << "updateWindowState 1111111111111"; + QStringListModel *model = (QStringListModel *)(m_completer->model()); + model->setStringList(m_CurrentPathAllFiles); + pDebug << "updateWindowState 2222222222222"; +} + +void KyNativeFileDialog::searchButtonClicked() +{ + m_searchMode = ! m_searchMode; + if(m_searchMode) + { + mKyFileDialogUi->m_fileNameEdit->setText(""); + mKyFileDialogUi->m_fileNameEdit->setReadOnly(true); + setCurrentSelections(QStringList()); + + m_lastSearchPath = getCurrentUri(); + pDebug << "m_lastSearchPath....." << m_lastSearchPath << getCurrentUri() << getCurrentPage()->getCurrentUri(); + } + else + { + mKyFileDialogUi->m_fileNameEdit->setReadOnly(false); + } + pDebug << "searchButtonClicked searchButtonClicked" <<m_searchMode; + //Q_EMIT this->updateSearchRequest(m_search_mode); + setSearchMode(m_searchMode); +} + +void KyNativeFileDialog::setSearchMode(bool mode) +{ + mKyFileDialogUi->m_searchBtn->setCheckable(mode); + mKyFileDialogUi->m_searchBtn->setChecked(mode); + mKyFileDialogUi->m_searchBtn->setDown(mode); + mKyFileDialogUi->m_pathbar->switchEditMode(mode); +} + +void KyNativeFileDialog::lineEditTextChange(QString text) +{ + m_copyEditText = text; + if(m_searchMode) + return; + pDebug << "lineEditTextChange........." << text; + QString url; + if(directory().path() != "/") + url = QUrl(getCurrentUri()).path();//directoryUrl().toString();//getCurrentUri() + pDebug << "mKyFileDialogUi->m_fileNameEdit......:" << getCurrentUri() << url << text; + pDebug << "listview55555555555555.........." << m_CurrentPathAllFiles.length(); + QString parentPath = getCurrentUri(); + + if(parentPath.endsWith("/")) + parentPath.remove(parentPath.length() - 1, 1); + if(url.endsWith("/")) + url.remove(url.length() - 1, 1); + + pDebug << "parentPath:" << parentPath; + pDebug << "getCurrentSelections......:" << getCurrentSelectionsList() << text; + + if(!text.contains("\""))//输入框中只有1个文件 + { + if ((parentPath.startsWith("trash://") || parentPath.startsWith("recent://") + || parentPath.startsWith("computer://") || parentPath.startsWith("favorite://") + || parentPath.startsWith("filesafe://") || parentPath.startsWith("mult://") + || parentPath.startsWith("smb://") || parentPath.startsWith("ftp://") + || parentPath.startsWith("sftp://") || parentPath.startsWith("mtp://") + || parentPath.startsWith("gphoto2://")) && getCurrentSelections().length() > 0) + { + for(int i = 0; i < getCurrentSelections().length(); i++) + { + QString targetUri = Peony::FileUtils::getTargetUri(getCurrentSelections()[i]); + Peony::FileInfo fileInfo(targetUri); + QString displayname = fileInfo.displayName(); + pDebug << "text......:" << text << "displayName:" << displayname; + if(displayname.isEmpty()) + displayname = Peony::FileUtils::getFileDisplayName(getCurrentSelections()[i]); + pDebug << "display name......." << displayname; + if(displayname == text){ + updateAcceptButtonState(); + return; + } + } + QString targetUri = Peony::FileUtils::getTargetUri(getCurrentSelections()[0]); + QString targetPath = Peony::FileUtils::urlDecode(targetUri); + pDebug << "getTargetUri uri....." << targetUri; + pDebug << "uriiiiii...." << targetPath; + + targetPath = convertSpecialPath(getCurrentSelections()[0]); + if(Peony::FileUtils::isFileExsit(targetPath)) + { + Peony::FileInfo fileInfo(targetPath); + QString displayname = fileInfo.displayName(); + pDebug << "text......:" << text << "displayName:" << displayname; + if(displayname.isEmpty()) + displayname = Peony::FileUtils::getFileDisplayName(targetPath); + pDebug << "display name......." << displayname; + if(displayname == text){ + QStringList selectList; + selectList.append(getCurrentSelections()[0]); + pDebug << "selectList...000000" << selectList; + setCurrentSelections(selectList); + updateAcceptButtonState(); + return; + } + } + setCurrentSelections(QStringList()); + updateAcceptButtonState(); + return; + + } + else + { + pDebug << "Peony::FileUtils::isFileExsit123:" << (parentPath + "/" + text) << Peony::FileUtils::isFileExsit(parentPath + "/" + text); + // pDebug << "Peony::FileUtils::isFileExsit:" << (parentPath + "/" + text) << Peony::FileUtils::isFileExsit(parentPath + "/" + text); + + if(!text.isEmpty()) + { + for(int i = 0; i < getCurrentPage()->getCurrentSelections().length(); i++) + { + if(Peony::FileUtils::getFileDisplayName(getCurrentPage()->getCurrentSelections()[i]) == text){ + updateAcceptButtonState(); + return; + } + } + } + +// if(Peony::FileUtils::isFileExsit(parentPath + "/" + text)){ +// pDebug << "file exists...."; +// //m_container选择指定文件 +// QStringList selectList; +// selectList.append(parentPath + "/" + text); +// pDebug << "selectList...1111111" << selectList; +// setCurrentSelections(selectList); +// if(containerView()) +// pDebug << "selectList...22222222222" << containerView()->getSelections(); +// updateAcceptButtonState(); +// return; +// } +// else + { + QString path = parentPath + "/" + text; + + if(!text.isEmpty()){ + const QStringList list = getCurrentPage()->getAllFileUris(); + foreach (QString str, list) { + QString displayStr = Peony::FileUtils::getFileDisplayName(str); + pDebug << "displayStr......." << displayStr << text; + if(text == displayStr){ + QStringList selectStr; + selectStr.append(Peony::FileUtils::urlDecode(str)); + pDebug << "selectStrqqqqqqq....." << selectStr << text; + setCurrentSelections(selectStr); + updateAcceptButtonState(); + return; + } + } + } + setCurrentSelections(QStringList()); + + + pDebug << path << text << "not exists!"; +// if(getCurrentSelectionsList().isEmpty()){ +// setCurrentSelections(QStringList()); +// pDebug << "setCurrentSelections empty........"; +// } + updateAcceptButtonState(); + return; + } + } + } + else + { + if (parentPath.startsWith("trash://") || parentPath.startsWith("recent://") + || parentPath.startsWith("computer://") || parentPath.startsWith("favorite://") + || parentPath.startsWith("filesafe://") || parentPath.startsWith("mult://") + || parentPath.startsWith("smb://") || parentPath.startsWith("ftp://") + || parentPath.startsWith("sftp://") || parentPath.startsWith("mtp://") + || parentPath.startsWith("gphoto2://")) + { + QStringList list = text.split("\""); + pDebug << "listttt1111............" << list; + for (int i = list.length() - 1; i >= 0; i--) { + if(list[i] == "" || list[i] == " ") + list.removeAt(i); + } + QStringList displayNameList; + for(int i = 0; i < getCurrentSelections().length(); i++) + { + QString targetUri = Peony::FileUtils::getTargetUri(getCurrentSelections()[i]); + Peony::FileInfo fileInfo(targetUri); + QString displayname = fileInfo.displayName(); + pDebug << "text:" << text << "displayName:" << displayname; + if(displayname.isEmpty()) + displayname = Peony::FileUtils::getFileDisplayName(getCurrentSelections()[i]); + + pDebug << "text:" << text << "displayName:" << fileInfo.displayName(); + displayNameList.append(displayname); + } + pDebug << "list:" << list; + pDebug << "displayNameList:" << displayNameList; + for(int i = 0; i < list.length(); i++){ + if(!displayNameList.contains(list[i])) + break; + else if(i == list.length() - 1){ + updateAcceptButtonState(); + return; + } + } + + QStringList selectList; + foreach (QString str, getCurrentSelections()) + { + QString targetUri = Peony::FileUtils::getTargetUri(str); + QString targetPath = Peony::FileUtils::urlDecode(targetUri); + pDebug << "getTargetUri uri0000....." << targetUri; + pDebug << "uriiiiii00000...." << targetPath; + + targetPath = convertSpecialPath(str); + if(Peony::FileUtils::isFileExsit(targetPath)) + { + Peony::FileInfo fileInfo(targetPath); + QString displayname = fileInfo.displayName(); + pDebug << "text......:" << text << "displayName:" << displayname; + if(displayname.isEmpty()) + displayname = Peony::FileUtils::getFileDisplayName(targetPath); + pDebug << "display name......." << displayname; + if(list.contains(displayname)){ + selectList.append(str); + } + + } + } + pDebug << "selectList...222222222" << selectList; + setCurrentSelections(selectList); + updateAcceptButtonState(); + return; + } + else{ + QStringList oldSelectList = getCurrentPage()->getCurrentSelections(); + QStringList selectList; + QStringList list = text.split("\""); + pDebug << "listttt1111............" << list; + for (int i = list.length() - 1; i >= 0; i--) { + if(list[i] == "" || list[i] == " " || QString(list[i]).isEmpty()) + list.removeAt(i); + } + pDebug << "listtttt22222222..............:" << list; + + QStringList selectDisplayNameList; + for(int i = 0; i < oldSelectList.length(); i++) + { + QString displayName = Peony::FileUtils::getFileDisplayName(oldSelectList[i]); + selectDisplayNameList.append(displayName); + } + pDebug << "list:" << list; + pDebug << "compareTwoList 1111111........." << list.length() << selectDisplayNameList.length(); + + if(!mKyFileDialogUi->m_fileNameEdit->hasFocus() && compareTwoList(selectDisplayNameList, list).length() == 0){ + updateAcceptButtonState(); + pDebug << "compare 0000000.........."; + return; + } + + pDebug << "listtttttt3333333........................."; + QStringList strList, allDisplayNameList; + QMap<QString, QString> displayUrlMap; + const QStringList allUriList = getCurrentPage()->getAllFileUris(); + + foreach (QString str, list) { + if(str.length() > 0 && str[0] == "\"") + str = str.remove(0, 1); + if(str.length() > 0 && str[str.length() - 1] == "\"") + str = str.remove(str.length() - 1, 1); + if(!str.isEmpty()){ + strList.append(str); + } + pDebug << "str:" << str; + + } + + foreach (QString urlStr, allUriList) { + QString displayStr = Peony::FileUtils::getFileDisplayName(urlStr); + if(!displayStr.isEmpty()){ + displayUrlMap.insert(displayStr, urlStr); + allDisplayNameList.append(displayStr); + } + } + pDebug << "selectList 11111111........." << strList.length() << allDisplayNameList.length(); + QStringList displaySelectList = sameTwoList(strList, allDisplayNameList); + for (int i = 0; i < displaySelectList.length(); i++) { + selectList.append(displayUrlMap.value(displaySelectList[i])); + } + pDebug << "selectList 222222222........." << selectList.length(); + + if(compareTwoList(selectList, oldSelectList).length() != 0 || compareTwoList(oldSelectList, selectList).length() != 0){ + pDebug << "compareTwoListcompareTwoListcompareTwoList............."; + setCurrentSelections(selectList); + pDebug << "selectList........ 4444444444444" << selectList.length(); + } + updateAcceptButtonState(); + } + return; + } +} + +void KyNativeFileDialog::setShortCuts() +{ + if (!m_shortcutsSet) { + //stop loading action + QAction *stopLoadingAction = new QAction(this); + stopLoadingAction->setShortcut(QKeySequence(Qt::Key_Escape)); + addAction(stopLoadingAction); + connect(stopLoadingAction, &QAction::triggered, this, &KyNativeFileDialog::forceStopLoading); + + //show hidden action + QAction *showHiddenAction = new QAction(this); + showHiddenAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_H)); + showHiddenAction->setCheckable(true); + addAction(showHiddenAction); + connect(showHiddenAction, &QAction::triggered, this, [=]() { + //pDebug << "show hidden"; + this->setShowHidden(!getWindowShowHidden()); + }); + + auto undoAction = new QAction(QIcon::fromTheme("edit-undo-symbolic"), tr("Undo"), this); + undoAction->setShortcut(QKeySequence::Undo); + addAction(undoAction); + connect(undoAction, &QAction::triggered, [=]() { + Peony::FileOperationManager::getInstance()->undo(); + }); + + auto redoAction = new QAction(QIcon::fromTheme("edit-redo-symbolic"), tr("Redo"), this); + redoAction->setShortcut(QKeySequence::Redo); + addAction(redoAction); + connect(redoAction, &QAction::triggered, [=]() { + Peony::FileOperationManager::getInstance()->redo(); + }); + + //add CTRL+D for delete operation + auto trashAction = new QAction(this); + trashAction->setShortcuts(QList<QKeySequence>()<<Qt::Key_Delete<<QKeySequence(Qt::CTRL + Qt::Key_D)); + connect(trashAction, &QAction::triggered, [=]() { + auto currentUri = getCurrentUri(); + if (currentUri.startsWith("search://") + || currentUri.startsWith("favorite://") || currentUri == "filesafe:///" + || currentUri.startsWith("kmre://") || currentUri.startsWith("kydroid://")) + return; + + auto uris = this->getCurrentSelections(); + + QString desktopPath = "file://" + QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); + QString desktopUri = Peony::FileUtils::getEncodedUri(desktopPath); + QString homeUri = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); + QString documentPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)); + QString musicPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MusicLocation)); + QString moviesPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MoviesLocation)); + QString picturespPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::PicturesLocation)); + QString downloadPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)); + if (!uris.isEmpty() && !uris.contains(desktopUri) && !uris.contains(homeUri) && !uris.contains(documentPath) && !uris.contains(musicPath) + && !uris.contains(moviesPath) && !uris.contains(picturespPath) && !uris.contains(downloadPath)) { + bool isTrash = this->getCurrentUri() == "trash:///"; + if (!isTrash) { + Peony::FileOperationUtils::trash(uris, true); + } else { + Peony::FileOperationUtils::executeRemoveActionWithDialog(uris); + } + } + }); + addAction(trashAction); + + auto deleteAction = new QAction(this); + deleteAction->setShortcuts(QList<QKeySequence>()<<QKeySequence(Qt::SHIFT + Qt::Key_Delete)); + addAction(deleteAction); + connect(deleteAction, &QAction::triggered, [=]() { + auto currentUri = getCurrentUri(); + if (currentUri.startsWith("search://") || currentUri == "filesafe:///" + || currentUri.startsWith("kmre://") || currentUri.startsWith("kydroid://")) + return; + + auto uris = this->getCurrentSelections(); + + QString desktopPath = "file://" + QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); + QString documentPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)); + QString musicPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MusicLocation)); + QString moviesPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MoviesLocation)); + QString picturespPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::PicturesLocation)); + QString downloadPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)); + QString desktopUri = Peony::FileUtils::getEncodedUri(desktopPath); + QString homeUri = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); + if (! uris.contains(desktopUri) && !uris.contains(homeUri) && !uris.contains(documentPath) && !uris.contains(musicPath) + && !uris.contains(moviesPath) && !uris.contains(picturespPath) && !uris.contains(downloadPath)) { + Peony::FileOperationUtils::executeRemoveActionWithDialog(uris); + } + }); + + auto searchAction = new QAction(this); + searchAction->setShortcuts(QList<QKeySequence>()<<QKeySequence(Qt::CTRL + Qt::Key_F)); + connect(searchAction, &QAction::triggered, this, [=]() { + searchButtonClicked(); + }); + addAction(searchAction); + + //F4 or Alt+D, change to address + auto locationAction = new QAction(this); + locationAction->setShortcuts(QList<QKeySequence>()<<Qt::Key_F4<<QKeySequence(Qt::ALT + Qt::Key_D)); + connect(locationAction, &QAction::triggered, this, [=]() { + mKyFileDialogUi->m_pathbar->startEdit(); + }); + addAction(locationAction); + + auto closeWindowAction = new QAction(this); + closeWindowAction->setShortcuts(QList<QKeySequence>()<<QKeySequence(Qt::ALT + Qt::Key_F4)); + connect(closeWindowAction, &QAction::triggered, this, [=]() { + this->close(); + }); + addAction(closeWindowAction); + + auto maxAction = new QAction(this); + maxAction->setShortcut(QKeySequence(Qt::Key_F11)); + connect(maxAction, &QAction::triggered, this, [=]() { + //showFullScreen has some issue, change to showMaximized, fix #20043 + mKyFileDialogUi->m_pathbar->cancelEdit(); + if (!this->isMaximized()) { + this->showMaximized(); + } else { + this->showNormal(); + } + updateMaximizeState(); + }); + addAction(maxAction); + + auto refreshWindowAction = new QAction(this); + refreshWindowAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_R)); + connect(refreshWindowAction, &QAction::triggered, this, [=]() { + this->refresh(); + }); + addAction(refreshWindowAction); + + auto listToIconViewAction = new QAction(this); + listToIconViewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_1)); + connect(listToIconViewAction, &QAction::triggered, this, [=]() { + this->beginSwitchView(QString("Icon View")); + }); + addAction(listToIconViewAction); + + auto iconToListViewAction = new QAction(this); + iconToListViewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_2)); + connect(iconToListViewAction, &QAction::triggered, this, [=]() { + this->beginSwitchView(QString("List View")); + }); + addAction(iconToListViewAction); + + auto reverseSelectAction = new QAction(this); + reverseSelectAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_L)); + connect(reverseSelectAction, &QAction::triggered, this, [=]() { + this->getCurrentPage()->getView()->invertSelections(); + }); + addAction(reverseSelectAction); + + auto refreshAction = new QAction(this); + refreshAction->setShortcut(Qt::Key_F5); + connect(refreshAction, &QAction::triggered, this, [=]() { + this->refresh(); + }); + addAction(refreshAction); + + //select all files in view, fix bug#115442 + auto *selectAllAction = new QAction(this); + selectAllAction->setShortcut(QKeySequence::SelectAll); + connect(selectAllAction, &QAction::triggered, this, [=]() { + if (this->getCurrentPage()->getView()) + { + /// note: 通过getAllFileUris设置的全选效率过低,如果增加接口则会导致二进制兼容性问题 + /// 所以这里使用现有的反选接口实现高效的全选,这个方法在mainwindow中也有用到 + //auto allFiles = this->getCurrentPage()->getView()->getAllFileUris(); + //this->getCurrentPage()->getView()->setSelections(allFiles); + setCurrentSelections(QStringList()); + this->getCurrentPage()->getView()->invertSelections(); + } + }); + addAction(selectAllAction); + + //file operations + auto *copyAction = new QAction(this); + copyAction->setShortcut(QKeySequence::Copy); + connect(copyAction, &QAction::triggered, [=]() { + bool is_recent = false; + if (!this->getCurrentSelections().isEmpty()) + { + // if (this->getCurrentSelections().first().startsWith("trash://", Qt::CaseInsensitive)) { + // return ; + // } + if (this->getCurrentSelections().first().startsWith("recent://", Qt::CaseInsensitive)) { + is_recent = true; + } + if (this->getCurrentSelections().first().startsWith("favorite://", Qt::CaseInsensitive)) { + return ; + } + } + else + return; + + QStringList selections; + if (is_recent) + { + for(auto uri:this->getCurrentSelections()) + { + uri = Peony::FileUtils::getTargetUri(uri); + selections << uri; + } + } + else{ + selections = this->getCurrentSelections(); + } + + Peony::ClipboardUtils::setClipboardFiles(selections, false); + }); + addAction(copyAction); + + auto *pasteAction = new QAction(this); + pasteAction->setShortcut(QKeySequence::Paste); + connect(pasteAction, &QAction::triggered, [=]() { + auto currentUri = getCurrentUri(); + if (currentUri.startsWith("trash://") || currentUri.startsWith("recent://") + || currentUri.startsWith("computer://") || currentUri.startsWith("favorite://") + || currentUri.startsWith("search://") || currentUri == "filesafe:///") + { + /* Add hint information,link to bug#107640. */ + QMessageBox::warning(this, tr("warn"), tr("This operation is not supported.")); + return; + } + if (Peony::ClipboardUtils::isClipboardHasFiles()) { + //FIXME: how about duplicated copy? + //FIXME: how to deal with a failed move? + auto op = Peony::ClipboardUtils::pasteClipboardFiles(this->getCurrentUri()); + if (op) { + connect(op, &Peony::FileOperation::operationFinished, this, [=](){ + auto opInfo = op->getOperationInfo(); + auto targetUirs = opInfo->dests(); + setCurrentSelectionUris(targetUirs); + }, Qt::BlockingQueuedConnection); + } + else{ + //fix paste file in old path not update issue, link to bug#71627 + this->getCurrentPage()->getView()->repaintView(); + } + } + }); + addAction(pasteAction); + + auto *cutAction = new QAction(this); + cutAction->setShortcut(QKeySequence::Cut); + connect(cutAction, &QAction::triggered, [=]() { + if (!this->getCurrentSelections().isEmpty()) { + // if (this->getCurrentSelections().first().startsWith("trash://", Qt::CaseInsensitive)) { + // return ; + // } + if (this->getCurrentSelections().first().startsWith("recent://", Qt::CaseInsensitive)) { + return ; + } + if (this->getCurrentSelections().first().startsWith("favorite://", Qt::CaseInsensitive)) { + return ; + } + + auto currentUri = getCurrentUri(); + if (currentUri.startsWith("search://")) + return; + + QString desktopPath = "file://" + QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); + QString desktopUri = Peony::FileUtils::getEncodedUri(desktopPath); + QString homeUri = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); + if (! this->getCurrentSelections().contains(desktopUri) && ! this->getCurrentSelections().contains(homeUri)) + { + Peony::ClipboardUtils::setClipboardFiles(this->getCurrentSelections(), true); + this->getCurrentPage()->getView()->repaintView(); + } + } + }); + addAction(cutAction); + + m_shortcutsSet = true; + } +} + +void KyNativeFileDialog::initialViewId() +{ + if(!containerView()) + return; + int zoomLevel = containerView()->currentZoomLevel(); + + auto viewId = Peony::DirectoryViewFactoryManager2::getInstance()->getDefaultViewId(zoomLevel, getCurrentUri()); + pDebug << "initialViewId viewId:" << viewId; + beginSwitchView(viewId); +} + +QString KyNativeFileDialog::copyEditText() +{ + return m_copyEditText; +} + +void KyNativeFileDialog::updateSearchProgressBar() +{ + if(m_needSearch){ + pDebug << "updateSearchProgressBar...." << m_searchMode << m_needSearch; + Q_EMIT mKyFileDialogUi->m_pathbar->updateSearchProgress(false); + + QCursor c; + c.setShape(Qt::ArrowCursor); + this->setCursor(c); + if(getCurrentPage() && getCurrentPage()->getView()) + getCurrentPage()->getView()->setCursor(c); + mKyFileDialogUi->m_sider->setCursor(c); + mKyFileDialogUi->setCursor(c); + } +} + +void KyNativeFileDialog::installTranslate(QString locale) +{ + m_translator = new QTranslator(this); + pDebug << "local: " << locale; + if (m_translator->load("/usr/share/qt5-ukui-platformtheme/qt5-ukui-filedialog_" + locale)) { + pDebug << "Load translations file success!"; + QApplication::installTranslator(m_translator); + } else { + pDebug << "Load translations file failed!"; + } + m_translator0 = new QTranslator(this); + if (m_translator0->load("/usr/share/qt5-ukui-platformtheme/qt5-ukui-platformtheme_" + locale)) { + pDebug << "Load translations file success!"; + QApplication::installTranslator(m_translator0); + } else { + pDebug << "Load translations file failed!"; + } + + m_translator1 = new QTranslator(this); + pDebug << "QTranslator t load" << m_translator1->load("/usr/share/libpeony-qt/libpeony-qt_" + locale); + QApplication::installTranslator(m_translator1); + m_translator2 = new QTranslator(this); + pDebug << "QTranslator t2 load" << m_translator2->load("/usr/share/peony-qt-desktop/peony-qt-desktop_" + locale); + QApplication::installTranslator(m_translator2); + m_translator3 = new QTranslator(this); + pDebug << "QTranslator t3 load" << m_translator3->load("/usr/share/qt5/translations/qt_" + locale); + QApplication::installTranslator(m_translator3); + + m_translatorSDK = new QTranslator(this); + if (m_translatorSDK->load(":/translations/gui_" + locale)) { + QApplication::installTranslator(m_translatorSDK); + } +} + +//获得newlist里比oldlist多的东西 +QStringList KyNativeFileDialog::compareTwoList(QStringList oldList, QStringList newList) +{ + QSet<QString> oldSet = oldList.toSet(); + QSet<QString> newSet = newList.toSet(); + QStringList list = newSet.subtract(oldSet).toList(); + return list; +} + +//获得两个list相同部分的内容 +QStringList KyNativeFileDialog::sameTwoList(QStringList oldList, QStringList newList) +{ + QSet<QString> oldSet = oldList.toSet(); + QSet<QString> newSet = newList.toSet(); + + QStringList list = newSet.intersect(oldSet).toList(); + return list; +} + +bool KyNativeFileDialog::selectIsDir() +{ + return m_selectIsDir; +} + +void KyNativeFileDialog::setSelectIsDir(bool selectIsDir) +{ + if(m_selectIsDir != selectIsDir) + m_selectIsDir = selectIsDir; +} + +bool KyNativeFileDialog::checkLongName(QString path, QString name) +{ + pDebug << "checkLongName..,........ name:" << path << name; + if(name.toLocal8Bit().isNull()){ + pDebug << "name local null....."; + return false; + } + int nameLocalLong = name.toLocal8Bit().length(); + int nameLong = name.length(); + pDebug << "name count 000..." << nameLocalLong << nameLong; + + auto fsType = Peony::FileUtils::getFsTypeFromFile(getCurrentPage()->getCurrentUri()); + + QDBusInterface iface ("com.kylin.file.system.fuse","/com/kylin/file/system/fuse","com.kylin.file.system.fuse",QDBusConnection::systemBus()); + if (iface.isValid()) { + QDir dir(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)); + if (Peony::FileUtils::isFileExsit(m_longSavePath)) { + QDBusReply<bool> reply = iface.call("SetSetings", "true", dir.path().append("/扩展")); + } + else{ + pDebug << "is not FileExsit" << m_longSavePath; + } + auto currentPath = path; + if(currentPath.startsWith("file://")) + currentPath = currentPath.remove(0, 7); + if(currentPath.endsWith("/")) + currentPath = currentPath.left(currentPath.length() - 1); + + if (isFuseFileSystem(currentPath)) { + fsType = "fuse.kyfs"; + } + } + + + pDebug << "checkLongName fsType,......." << fsType; + + + if (fsType.contains("ext")) { + if(nameLocalLong <= LONG_NAME_LIMIT) + return false; + } else if (fsType.contains("ntfs")) { + if(nameLong <= LONG_NAME_LIMIT) + return false; + } else if (fsType.contains("fuse.kyfs")) { + int32_t maxLength = LONG_NAME_LIMIT; + //TODO超时机制 + QDBusReply<int32_t> reply = iface.call("GetFilenameLength"); + + if (reply.isValid()) { + maxLength = reply.value(); + m_maxLenth = maxLength; + } + + if(nameLong <= maxLength) + return false; + } + + if(nameLocalLong <= LONG_NAME_LIMIT){ + pDebug << "checkLongName 0000000000" << name; + return false; + } + + return true; +} + +bool KyNativeFileDialog::longNameDialog(QString path, QString name){ + pDebug << "new kyfiledialogRename....."; + KyFileDialogRename* handle = new KyFileDialogRename(); + handle->setCurrentUri(getCurrentPage()->getCurrentUri()); + handle->setMaxLength(m_maxLenth); + + Peony::FileOperationError error; + error.op = Peony::FileOpRename; + error.destDirUri = path + "/" + name; + error.errorCode = G_IO_ERROR_FILENAME_TOO_LONG; + + connect(handle, &KyFileDialogRename::changeFileName, this, [&](QString name){ + mKyFileDialogUi->m_fileNameEdit->setText(name); + }); + + connect(handle, &KyFileDialogRename::rejected, this, [&](){ + }); + connect(handle, &KyFileDialogRename::accepted, this, [&](){ + pDebug << "handle accepted......."; + m_RecodPath = ""; + }); + + connect(handle, &KyFileDialogRename::muchLongNameReject, this, [&](){ + pDebug << "muchLongNameReject.........." << m_RecodPath; + if(!m_RecodPath.isEmpty()){ + goToUri(m_RecodPath); + m_RecodPath = ""; + } + }); + + pDebug << "exec...." << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss:zzz"); + handle->handle(error); + bool handleResult = handle->dialogResult(); + delete handle; + + if (!handleResult) { + pDebug << "error.respCode......." << error.respCode; + return false; + } + if (error.respCode == Peony::ExceptionResponse::SaveAll || + error.respCode == Peony::ExceptionResponse::SaveOne) { + //todo 判断路径是否存在 不存在创建? + + QString destUri = m_longSavePath; + QDBusInterface iface ("com.kylin.file.system.fuse","/com/kylin/file/system/fuse","com.kylin.file.system.fuse",QDBusConnection::systemBus()); + if (!iface.isValid()) { + qWarning() << "fuse dbus has error : " << iface.lastError() << SaveErrorType::DBUS_ERROR; + QMessageBox::warning(this, tr("Warning"), QString(tr("File save failed! "))); + + return false; + } + QDir dir(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)); + + if (!Peony::FileUtils::isFileExsit(destUri)) { + if (!dir.mkdir("扩展")) { + qWarning() << "create dir error : " << SaveErrorType::DBUS_ERROR; + QMessageBox::warning(this, tr("Warning"), QString(tr("File save failed! "))); + + return false; + } + } + auto path = dir.path().append("/扩展"); + QDBusReply<bool> reply = iface.call("SetSetings", "true", path); + + if (reply.isValid()) { + if (reply.value()) { + qInfo() << "fuse setings true"; + pDebug << "save on path:" << m_longSavePath; + m_RecodPath = getCurrentPage()->getCurrentUri(); + + goToUri(m_longSavePath); + m_longNameChangeDir = true; + } else { + qWarning() << "fuse setings false : "<< iface.lastError() << SaveErrorType::DBUSValue_ERROR; + QMessageBox::warning(this, tr("Warning"), QString(tr("File save failed! "))); + + return false; + } + } else { + qWarning() << "fuse dbus has error : " << iface.lastError() << SaveErrorType::DBUSValid_ERROR; + QMessageBox::warning(this, tr("Warning"), QString(tr("File save failed! "))); + + return false; + } + + } + + pDebug << "longNameDialog true....."; + return true; +} + + +void KyNativeFileDialog::selectionChanged() +{ + // qApp->processEvents(); + pDebug << "selectionChanged 0000000............" << getCurrentSelectionsList().length() << getCurrentSelectionsList() << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss:zzz"); + // if(mKyFileDialogUi->m_fileNameEdit->hasFocus() && getCurrentSelectionsList().length() == 0) + // return; + + // QTimer::singleShot(1000, this, [this](){ + // pDebug << "selectionChanged 111111111............" << getCurrentSelectionsList().length() << getCurrentSelectionsList() << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss:zzz"); + + // }); + + //文件对话框被隐藏时,不更新 + if(this->isHidden()){ + pDebug << "selectionChanged filedialog is hidden"; + return; + } + + if(!getCurrentSelectionsList().isEmpty()) + m_isLoadSelect = m_isLoading; + else + m_isLoadSelect = false; + if(getCurrentSelectionsList().length() == 1) + pDebug << "selectionChanged getCurrentSelectionsList........" << getCurrentSelectionsList(); + + updateStatusBar(); +} + +QString KyNativeFileDialog::convertSpecialPath(QString uri) const +{ + if (uri.startsWith("trash://") || uri.startsWith("recent://") + || uri.startsWith("computer://") || uri.startsWith("favorite://")){ + pDebug << "convertSpecialPath directory............" << uri; + + return Peony::FileUtils::getTargetUri(uri); + } + else if(uri.startsWith("filesafe://")){ + QString boxpath = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.box"; + QString path = boxpath + uri.remove(0,11); + return path; + } + else if(uri.startsWith("mult://") || uri.startsWith("smb://") || + uri.startsWith("ftp://") || uri.startsWith("sftp://") || + uri.startsWith("mtp://") || uri.startsWith("gphoto2://")){ +// QString copyUri = getCurrentPage()->getCurrentUri(); + pDebug << "directory uri sssssssssssss:......" << uri; + + g_autofree char* path = g_file_get_path(const_cast<GFile*>(g_file_new_for_uri(uri.toLocal8Bit()))); + pDebug << "directory mult path:......" << (path == nullptr) << path; + + if(path == nullptr){ + path = g_file_get_path(const_cast<GFile*>(g_file_new_for_uri(Peony::FileUtils::urlDecode(uri).toLocal8Bit()))); + pDebug << "directory mult path 1111:......" << (path == nullptr) << path; + } + if(path == nullptr){ + path = g_file_get_path(const_cast<GFile*>(g_file_new_for_uri(Peony::FileUtils::urlEncode(uri).toLocal8Bit()))); + pDebug << "directory mult path 222222:......" << (path == nullptr) << path; + } + + if(path == nullptr) + return uri; + return QString("file://").append(path); + } + else{ + //TODO network mtp burn kydroid kmre gphoto2 thumbnail + } + + return uri; +} + +//需求28545 数据盘路径跳转 +bool KyNativeFileDialog::isDataBlockHasUserFile() +{ + QString configFilePath = "/etc/xdg/peony-data.conf"; + if (! QFile::exists(configFilePath)) + return true; + + QFile file(configFilePath); + if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { + QTextStream in(&file); + QString line = in.readLine(); + // 判断标识是否为true, 是的话,存在用户数据,如果是false, 则是干净的数据盘,可以使用新方案 + if (line != "true") + return false; + file.close(); + } else { + qWarning() << "open /etc/xdg/peony-data.conf failed"; + } + + return true; +} + +void KyNativeFileDialog::slot_responseUnmounted(const QString &destUri, const QString &sourceUri) +{ + QString decodedSrcUri = Peony::FileUtils::urlDecode(sourceUri); + QString uri = getCurrentPage()->getCurrentUri(); + uri = Peony::FileUtils::urlDecode(uri); + pDebug<<"decodedSrcUri:"<<decodedSrcUri<<" uri:"<<uri; + if(!decodedSrcUri.isEmpty() && uri.contains(decodedSrcUri) && uri != "file:///" && uri!= "filesafe:///") + { + pDebug<<"sourceUri:"<<sourceUri; + if (uri.startsWith("filesafe:///")) + goToUri("filesafe:///", true, true); /* 跳转到文件保护箱路径 */ + else + goToUri(destUri, true, true);/* 跳转到计算机页 */ + } +} + + +/* +GAsyncReadyCallback KyNativeFileDialog::async_query_permisson_callback(GObject *obj, GAsyncResult *res, Peony::PermissionsPropertiesPage *p_this) +{ + GError *err = nullptr; + auto info = g_file_query_info_finish(G_FILE(obj), res, &err); + + if (info) { + if (p_this) { + guint32 mode = 0; + if (g_file_info_has_attribute(info, G_FILE_ATTRIBUTE_UNIX_MODE)) + mode = g_file_info_get_attribute_uint32(info, G_FILE_ATTRIBUTE_UNIX_MODE); + + auto owner_readable = mode & S_IRUSR; + auto owner_writeable = mode & S_IWUSR; + auto owner_executable = mode & S_IXUSR; + + qDebug() << "owner_writeable......" << owner_writeable; + } + + g_object_unref(info); + } + return nullptr; +} +*/ + +KyFileDialogHelper::KyFileDialogHelper() : QPlatformFileDialogHelper(), mKyFileDialog(new KyNativeFileDialog) +{ + mKyFileDialog->setHelper(this); + + pDebug << "KyFileDialogHelper........." << (options() == nullptr); + connect(mKyFileDialog, &KyNativeFileDialog::currentChanged, this, &KyFileDialogHelper::currentChanged); + connect(mKyFileDialog, &KyNativeFileDialog::directoryEntered, this, &KyFileDialogHelper::directoryEntered); + //QFileDialog::accept()里_q_emitUrlSelected会发送fileSelected信号 这里会导致发两次fileSelected的信号 + // connect(mKyFileDialog, &KyNativeFileDialog::fileSelected, this, &KyFileDialogHelper::fileSelected); + //QFileDialog::accept()里_q_emitUrlsSelected会发送filesSelected信号 这里会导致发两次filesSelected的信号 + // connect(mKyFileDialog, &KyNativeFileDialog::filesSelected, this, &KyFileDialogHelper::filesSelected); + connect(mKyFileDialog, &KyNativeFileDialog::filterSelected, this, &KyFileDialogHelper::filterSelected); + connect(mKyFileDialog, &QDialog::accepted, this, &KyFileDialogHelper::accept); + connect(mKyFileDialog, &QDialog::rejected, this, &KyFileDialogHelper::reject); + +} + +KyFileDialogHelper::~KyFileDialogHelper() +{ + pDebug << "~~~~~~~~KyFileDialogHelper"; + ///不可以析构 普通函数里QFileDialog::show不显示和QFiledialog->show()会显示 析构的话BT下载工具打开不显示界面 +// if(mKyFileDialog){ +// mKyFileDialog->deleteLater(); +// mKyFileDialog = nullptr; +// } + +} + +void KyFileDialogHelper::exec() +{ + mKyFileDialog->discardDelayedShow(); + pDebug << "KyFileDialogHelper::exec.............."; + mKyFileDialog->exec(); +} + +void KyFileDialogHelper::hide() +{ + mKyFileDialog->discardDelayedShow(); + mKyFileDialog->hide(); +} + +bool KyFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) +{ + if(m_isShow){ + mKyFileDialog->delayShow(); + return true; + } + pDebug << "show........." << (options() == nullptr) << options()->viewMode(); + pDebug << "option initialselectfiles..." << options()->initiallySelectedFiles(); + pDebug << "option initialDirectory..." << options()->initialDirectory(); + + m_initialDirectory = options()->initialDirectory(); + m_initialSelectFiles = options()->initiallySelectedFiles(); + + if(parent != nullptr) + pDebug << "window....:" << parent->x() << parent->y() << parent->width() << parent->height(); + else + pDebug << "window is nullptr...."; + initDialog(); + + mKyFileDialog->setAttribute(Qt::WA_NativeWindow, true); + mKyFileDialog->setWindowFlags(windowFlags); + mKyFileDialog->setWindowModality(windowModality); + + if(parent){ + if(QWidget *p = mKyFileDialog->find(parent->winId())){ + for(QFileDialog *fd : p->findChildren<QFileDialog *>()){ + if(options()->windowTitle() == fd->windowTitle()){ + pDebug << "filedoalog set parent...." << fd->geometry(); + if(mKyFileDialog->parentWidget() != fd){ + ///设置parent是QFiledialog 之前设置的是p 会有问题 showevent里有时候会找不到对应name的 + mKyFileDialog->setParent(fd, windowFlags); + KWindowSystem::setState(mKyFileDialog->winId(), NET::SkipPager | NET::SkipSwitcher); + } + pDebug << "filediaog directory000...." << fd->directory(); + pDebug << "filedialog select000....." << fd->selectedFiles(); + pDebug << "filedialog selectUrls000....." << fd->selectedUrls(); + pDebug << "filedialog directoryUrl000....." << fd->directoryUrl(); + if(m_initialSelectFiles.length() > 0 && QFile::exists(m_initialSelectFiles.value(0).path())){ + QDir dir(m_initialSelectFiles.value(0).path()); + dir.cdUp(); + pDebug <<"dirrrrr..." << dir.path(); + mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(dir.absolutePath()).toString()); + mKyFileDialog->setDirectory(dir); + } else if(fd->directory().exists() || Peony::FileUtils::isFileExsit(fd->directory().path())){ + pDebug << "directory exsits...." << fd->directory().path(); + mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(fd->directory().absolutePath()).toString()); + + mKyFileDialog->setDirectory(fd->directory()); + } + else{ + QString path = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); + pDebug << "pathhhhhhh" << path; + mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(path); + mKyFileDialog->setDirectory(path); + } +// if(fd->directoryUrl().) + + // for(QPushButton *btn : mKyFileDialog->findChildren<QPushButton*>()) + // { + // if(btn->objectName() == "acceptButton") + // { + // pDebug << "mydialog find object acceptButton"; + // } + // } + break; + } + } + } + } + else{ + for(QWidget *widget : qApp->allWidgets()){ + if(QFileDialog *fd = qobject_cast<QFileDialog *>(widget)){ + if(options()->windowTitle() == fd->windowTitle()){ + pDebug << "parent us null filedoalog set parent...." << fd->geometry() << options()->windowTitle() << fd->objectName(); + if(mKyFileDialog->parentWidget() != fd){ + mKyFileDialog->setParent(fd, windowFlags); + } + pDebug << "parent us null filedoalog directory...." << fd->directory(); + pDebug << "parent us null filedoalog selectedFiles...." << m_initialSelectFiles.value(0).path() << QFile::exists(m_initialSelectFiles.value(0).path()); + pDebug << "parent us null filedoalog selectedFiles11111111...." << fd->selectedFiles(); + + if(m_initialSelectFiles.length() > 0 && QFile::exists(m_initialSelectFiles.value(0).path())){ + QDir dir(m_initialSelectFiles.value(0).path()); + dir.cdUp(); + pDebug <<"dirrrrr..." << dir.path(); + mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(dir.absolutePath()).toString()); + + mKyFileDialog->setDirectory(dir); + } + else if(fd->directory().exists() || Peony::FileUtils::isFileExsit(fd->directory().path())){ + pDebug << "updatePath........." << fd->directory(); + mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(QUrl::fromLocalFile(fd->directory().absolutePath()).toString()); + + mKyFileDialog->setDirectory(fd->directory()); + } + else{ + QString path = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); + pDebug << "pathhhhhhh" << path; + mKyFileDialog->mKyFileDialogUi->m_pathbarWidget->updatePath(path); + mKyFileDialog->setDirectory(path); + } + break; + } + } + } + } + + pDebug << "options viewmode..." << options()->viewMode() << mKyFileDialog->viewMode(); + if(options()->viewMode() == QFileDialog::List && mKyFileDialog->viewMode() != KyNativeFileDialog::Icon) + mKyFileDialog->setViewMode(KyNativeFileDialog::Icon); + else if(options()->viewMode() == QFileDialog::Detail && mKyFileDialog->viewMode() != KyNativeFileDialog::List) + mKyFileDialog->setViewMode(KyNativeFileDialog::List); + + MotifWmHints hints; + hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; + hints.functions = MWM_FUNC_ALL; + hints.decorations = MWM_DECOR_BORDER; + XAtomHelper::getInstance()->setWindowMotifHint(mKyFileDialog->winId(), hints); + + + mKyFileDialog->delayShow(); + viewInitialFinished(); + return true; +} + +void KyFileDialogHelper::initDialog() +{ + m_isShow = true; + + pDebug << "initDialog filter...." << options()->filter() << options()->nameFilters() << options()->mimeTypeFilters() << options()->viewMode(); + if (options()->windowTitle().isEmpty()) { + mKyFileDialog->setWindowTitle(options()->acceptMode() == QFileDialogOptions::AcceptOpen ? tr("Open File") + : tr("Save File")); + } else { + mKyFileDialog->setWindowTitle(options()->windowTitle()); + } + QStringList nameFilters; + foreach (QString nameFilter, options()->nameFilters()) { + nameFilters.append(QPlatformFileDialogHelper::cleanFilterList(nameFilter)); + } + pDebug << "nameFilters....:" << nameFilters; + if(nameFilters.length() < 1) + { + pDebug << "contains *...."; + QStringList list = options()->nameFilters(); + list.append(tr("All Files (*)")); + options()->setNameFilters(list); + } + pDebug << "option NameFilters:" << options()->nameFilters(); + pDebug << "option mode:" << options()->acceptMode() << options()->fileMode() << options()->viewMode(); + mKyFileDialog->setFilter(options()->filter()); + mKyFileDialog->setFileMode(QFileDialog::FileMode(options()->fileMode())); + mKyFileDialog->setAcceptMode(QFileDialog::AcceptMode(options()->acceptMode())); + pDebug << "initDialog filters:" << options()->nameFilters(); + mKyFileDialog->setNameFilters(options()->nameFilters()); + pDebug << "view mode:" << options()->viewMode() << mKyFileDialog->viewMode(); +// if(options()->viewMode() == QFileDialog::List && mKyFileDialog->viewMode() != KyNativeFileDialog::Icon) +// mKyFileDialog->setViewMode(KyNativeFileDialog::Icon); +// else if(options()->viewMode() == QFileDialog::Detail && mKyFileDialog->viewMode() != KyNativeFileDialog::List) +// mKyFileDialog->setViewMode(KyNativeFileDialog::List); + + for(int i = 0; i < QFileDialogOptions::DialogLabelCount; ++i) { + auto label = static_cast<QFileDialogOptions::DialogLabel>(i); + if(options()->isLabelExplicitlySet(label)) { + mKyFileDialog->setLabelText(static_cast<QFileDialog::DialogLabel>(label), options()->labelText(label)); + } + } +// pDebug << "initiallySelectedMimeTypeFilter,,,,:" << options()->initiallySelectedMimeTypeFilter() << options()->initiallySelectedNameFilter(); + auto filter = options()->initiallySelectedMimeTypeFilter(); + pDebug << "filter.........." << filter; + if(!filter.isEmpty()) { + selectMimeTypeFilter(filter); + } + else { + filter = options()->initiallySelectedNameFilter(); + if(!filter.isEmpty()) { + pDebug << "initiallySelectedNameFilter...." << filter; + selectNameFilter(filter); + } + } + + connect(mKyFileDialog->containerView(), &Peony::DirectoryViewWidget::viewDirectoryChanged, + this, &KyFileDialogHelper::viewInitialFinished, Qt::UniqueConnection); +} + +void KyFileDialogHelper::viewInitialFinished() +{ + if(m_viewInitialFinished) + return; + pDebug << "viewInitialFinished...."; + QTimer::singleShot(100, this, [this](){ + pDebug << "viewport update1111111......."; + mKyFileDialog->mKyFileDialogUi->m_sider->viewport()->update(); + }); + + QTimer::singleShot(500, this, [this](){ + + auto selectirectory = m_initialDirectory;// options()->initialDirectory(); + auto selectedFiles = m_initialSelectFiles; //options()->initiallySelectedFiles(); + QStringList strList; + + pDebug << "m_viewInitialFinished:" << m_viewInitialFinished; + pDebug << "viewInitialFinished selectirectory:" << selectirectory; + pDebug << "viewInitialFinished selectedFiles:" << selectedFiles; + + if(m_viewInitialFinished) + return; + if(selectedFiles.length() > 0) + { + pDebug << "initiallySelectedFiles:" << selectedFiles; + + for(const auto& selectedFile: selectedFiles) { + auto info = Peony::FileInfo::fromUri(selectedFile.path()); +// if (!info->isDir() && !info->isVolume()) +// { + selectFile(selectedFile); + strList.append(selectedFile.toString()); +// } + } + pDebug << "strList.......:" << strList; + pDebug << "getCurrentUri,,.......:" << mKyFileDialog->getCurrentUri(); + + if(strList.length() > 0){ + QString path; + QUrl url(strList[0]); + if(mKyFileDialog->isDir(url.path()) && options()->fileMode() != QFileDialog::Directory && + options()->fileMode() != QFileDialog::DirectoryOnly){ + path = url.path(); + } + else{ + QDir dir(url.path()); + dir.cdUp(); + path = dir.path(); + } + pDebug << "initial path:" << path << url; + if(mKyFileDialog->getCurrentUri() != ("file://" + path)) + { + pDebug << "initial change directory..." << ("file://" + path); + mKyFileDialog->setDirectoryUrl(QUrl("file://" + path)); + } + + pDebug << "setSelections...." << strList << (mKyFileDialog->containerView() == nullptr); + + mKyFileDialog->setCurrentSelections(strList); + pDebug << "initial getselections:" << mKyFileDialog->getCurrentSelectionsList(); + //mKyFileDialog->containerView()->scrollToSelection(strList[0]); + QString selectName = mKyFileDialog->selectName(); + mKyFileDialog->setSelectIsDir(false); + if(selectName == "" && strList.length() > 0) + { + QString str0 = strList[0]; + selectName = str0.split("/").last(); + } + pDebug << "initial selectName:" << selectName; + mKyFileDialog->mKyFileDialogUi->m_fileNameEdit->setText(selectName); + } + } + + pDebug << "initially selectirectory:" << selectirectory.toString() << selectirectory.path() << QFile::exists(selectirectory.path()) << Peony::FileUtils::isFileExsit(selectirectory.toString()); + pDebug << "current path....." << mKyFileDialog->getCurrentUri(); + if(strList.length() <= 0 && Peony::FileUtils::isFileExsit(selectirectory.toString()))//QFile::exists(selectirectory.path())) + { + QString cStr = mKyFileDialog->getCurrentUri(); + QString sStr = selectirectory.toString(); + + if(cStr.endsWith("/")) + cStr = cStr.remove(cStr.length() - 1, 1); + if(sStr.endsWith("/")) + sStr = sStr.remove(sStr.length() - 1, 1); + pDebug << "cStr...." << cStr << "sStr...." << sStr; + if(cStr != sStr) + mKyFileDialog->setDirectoryUrl(selectirectory); + } + + mKyFileDialog->intiContainerSort(); + mKyFileDialog->initialViewId(); + pDebug << "viewport update222222......."; + mKyFileDialog->mKyFileDialogUi->m_sider->viewport()->update(); +// mKyFileDialog->refresh(); + m_viewInitialFinished = true; + }); +} + +bool KyFileDialogHelper::isViewInitialFinished() +{ + return m_viewInitialFinished; +} + +bool KyFileDialogHelper::isShow() +{ + return m_isShow; +} + +bool KyFileDialogHelper::defaultNameFilterDisables() const +{ + return false; +} + +void KyFileDialogHelper::setDirectory(const QUrl &directory) +{ + QString path = directory.path(); + if(path.startsWith("/")) + path = "file://" + path; + pDebug << "helper setDirectory...." << directory.toString() << directory.path() << path; + mKyFileDialog->setDirectory(path); +// pDebug << "setInitialDirectory....."; +// options()->setInitialDirectory(directory); +} + +QUrl KyFileDialogHelper::directory() const +{ + return QUrl(mKyFileDialog->directory().absolutePath()); +} + +void KyFileDialogHelper::selectFile(const QUrl &filename) +{ + pDebug << "KyFileDialogHelper selectFile.............:" << filename; + m_selectedFiles = filename; + mKyFileDialog->selectFile(filename.toString()); +} + +QList<QUrl> KyFileDialogHelper::selectedFiles() const +{ + pDebug << "selectedFiles0000..........:" << mKyFileDialog->directoryUrl() << mKyFileDialog->directory() << mKyFileDialog->getCurrentUri() << mKyFileDialog->acceptMode(); + if(options()->acceptMode() == QFileDialogOptions::AcceptOpen) + { + QList<QUrl> urlList = mKyFileDialog->selectedUrls(); + if((options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly) && + mKyFileDialog->copyEditText() == "" && m_viewInitialFinished) + { + if (!mKyFileDialog->getCurrentPage()) { + return QList<QUrl>(); + } + QList<QUrl> urls; + QString uri = mKyFileDialog->getCurrentPage()->getCurrentUri(); + pDebug << "KyFileDialogHelper selectedFiles current uri........:" << uri; + + if (!uri.startsWith("trash://") && !uri.startsWith("recent://") && + !uri.startsWith("computer://") && !uri.startsWith("favorite://") && + !uri.startsWith("filesafe://") && !uri.startsWith("mult://") && + !uri.startsWith("smb://") && !uri.startsWith("ftp://") && + !uri.startsWith("sftp://") && !uri.startsWith("mtp://") && + !uri.startsWith("gphoto2://")){ + + if(uri.startsWith("file:///")) + uri = uri.remove(0,7); + pDebug << "open selectedFiles00000..........:" << uri; + urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(uri)); + } + else + { + urls << mKyFileDialog->convertSpecialPath(uri); + + } + + return urls; + } + if(options()->fileMode() != QFileDialogOptions::AnyFile || urlList.length() > 0){ + pDebug << "selectedFiles 111111111111......" << urlList; + return urlList; + } + else if(urlList.length() == 0) + { + QString path = mKyFileDialog->getCurrentUri(); + if(path.isEmpty()) + return urlList; + if(!path.endsWith("/")) + path += "/"; + pDebug << "selected filesss...:" << path + mKyFileDialog->copyEditText(); + urlList.append(QUrl(path + mKyFileDialog->copyEditText())); + pDebug << "selectedFiles 2222222222222" << urlList; + return urlList; + } + } + else + { + QList<QUrl> urls; + QString directoryPath = mKyFileDialog->directoryUrl().toString(); + if (directoryPath.startsWith("trash://") || directoryPath.startsWith("recent://") + || directoryPath.startsWith("computer://") || directoryPath.startsWith("favorite://") || + directoryPath.startsWith("filesafe://") || directoryPath.startsWith("mult://") || + directoryPath.startsWith("smb://") || directoryPath.startsWith("ftp://") || + directoryPath.startsWith("sftp://") || directoryPath.startsWith("mtp://") || + directoryPath.startsWith("gphoto2://")){ + QStringList urlStrList = mKyFileDialog->getCurrentPage()->getCurrentSelections(); + QStringList pathList; + QString fileName = mKyFileDialog->copyEditText(); + for (auto uri : urlStrList) { + QString targetPath = mKyFileDialog->convertSpecialPath(uri); + pDebug << "targetpath......" << targetPath; + pDebug << "selectedFiles11111....:" << Peony::FileUtils::urlDecode(uri) << QUrl(Peony::FileUtils::urlDecode(uri)) << targetPath; + pathList << Peony::FileUtils::getTargetUri(uri); + QString str = Peony::FileUtils::getFileDisplayName(uri); + pDebug << "selectedFiles22222....." << str << fileName; + pDebug << "uri......" << uri << Peony::FileUtils::urlDecode(targetPath) << Peony::FileUtils::urlEncode(targetPath); + + if(str == fileName){ + QString path = targetPath; + if(path.isEmpty()) + return urls; + if(path.startsWith("file:///")) + path = path.remove(0,7); + pDebug << "save selectedFiles00000..........:" << path; + urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(path)); + + return urls; + } + } + } + + QString path = mKyFileDialog->directory().path(); + pDebug << "selectedFiles path........" << path << mKyFileDialog->directoryUrl().toString(); + if(path.isEmpty()) + return urls; + if(!path.endsWith("/")) + path += "/"; + path += mKyFileDialog->copyEditText(); + if(path.startsWith("file:///")) + path = path.remove(0,7); + pDebug << "save selectedFiles00000..........:" << path; + urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(path)); + pDebug << "save selectedFiles2222..........:" << urls; + return urls; + } +} + +void KyFileDialogHelper::setFilter() +{ +} + +void KyFileDialogHelper::selectNameFilter(const QString &filter) +{ + pDebug << "helper selectNameFilter......" << filter; + mKyFileDialog->selectNameFilter(filter); +} + +void KyFileDialogHelper::selectMimeTypeFilter(const QString &filter) +{ + pDebug << "selectMimeTypeFilter0000001111....." << filter; + QMimeDatabase db; + QMimeType mimetype = db.mimeTypeForName(filter); + if(!mimetype.isValid()) + return; + mKyFileDialog->selectNameFilter(mimetype.filterString()); +} + +QString KyFileDialogHelper::selectedNameFilter() const +{ + return mKyFileDialog->selectedNameFilter(); +} + +QString KyFileDialogHelper::selectedMimeTypeFilter() const +{ + pDebug << "selectMimeTypeFilter0000002222222......"; + return QString(); +} + +bool KyFileDialogHelper::isSupportedUrl(const QUrl &url) const +{ + pDebug << "isSupportedUrl options viewmode..." << options()->viewMode(); + + pDebug << "options initialdirectory...." << options()->initialDirectory(); + pDebug << "options selectfiles..." << options()->initiallySelectedFiles(); + pDebug << "isSupportedUrl..." << url << url.isLocalFile(); + pDebug << "options windowTitle" << options()->windowTitle(); + if(!mKyFileDialog->isVisible()){ + return false; + } +// return false; + return url.isLocalFile(); + +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/kyfiledialog.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/kyfiledialog.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/kyfiledialog.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/kyfiledialog.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,448 @@ +#ifndef KYNATIVEFILEDIALOG_H +#define KYNATIVEFILEDIALOG_H +#include <QDialog> +#include <QDir> +#include <QFileDialog> +#include <QFileSystemModel> +#include <QCompleter> +#include <QListView> +#include <QStringListModel> +#include <QTranslator> +#include "qpa/qplatformdialoghelper.h" +#include <peony-qt/FMWindowIface.h> +#include <peony-qt/controls/property-page/permissions-properties-page.h> + +#define OPEN_ACTIONS_SEPARATOR "open-actions-seperator" +#define CREATE_ACTIONS_SEPARATOR "create-actions-seperator" +#define VIEW_ACTIONS_SEPARATOR "view-actions-seperator" +#define FILE_OPERATION_ACTIONS_SEPARATOR "file-operation-actions-seperator" +#define PLUGIN_ACTIONS_SEPARATOR "plugin-actions-seperator" +#define PROPERTIES_ACTIONS_SEPARATOR "properties-actions-seperator" +#define COMPUTER_ACTIONS_SEPARATOR "computer-actions-seperator" +#define TRASH_ACTIONS_SEPARATOR "trash-actions-seperator" +#define OPEN_IN_NEW_WINDOW_ACTION "open-in-new-window-action" +#define OPEN_IN_NEW_TAB_ACTION "open-in-new-tab-action" +#define ADD_TO_BOOKMARK_ACTION "add-to-bookmark-action" +#define OPEN_ACTION "open-action" +#define OPEN_WITH_ACTION "open-with-action" +#define OPEN_SELECTED_FILES_ACTION "open-selected-files-action" +#define CREATE_ACTION "create-action" +#define VIEW_TYPE_ACTION "view-type-action" +#define SORT_TYPE_ACTION "sort-type-action" +#define SORT_ORDER_ACTION "sort-order-action") +#define SORT_PREFERENCES_ACTION "sort-preferences-action" +#define COPY_ACTION "copy-action" +#define CUT_ACTION "cut-action" +#define TRASH_ACTION "trash-action" +#define DELETE_ACTION "delete-action" +#define RENAME_ACTION "rename-action" +#define PASTE_ACTION "paste-action" +#define REFRESH_ACTION "refresh-action" +#define SELECT_ALL_ACTION "select-all-action" +#define REVERSE_SELECT_ACTION "reverse-select-action" +#define PROPERTIES_ACTION "properties-action" +#define FORMAT_ACTION "format-action" +#define CLEAN_THE_TRASH_ACTION "clean-the-trash-action" +#define RESTORE_ACTION "restore-action" +#define CLEAN_THE_RECENT_ACTION "clean-the-recent-action" + + +#define LONG_NAME_LIMIT 255 + +QT_BEGIN_NAMESPACE +namespace Ui { class KyNativeFileDialog; } +QT_END_NAMESPACE + +bool isFuseFileSystem(QString path); + +namespace Peony { +class DirectoryViewContainer; +class DirectoryViewWidget; +class FMWindowIface; +} +class Ui_KyFileDialog; +class FileDialogSideBar; +class FileDialogPathBar; +class KyNativeFileDialogPrivate; +class KyFileDialogHelper; + +class KyNativeFileDialog : public QDialog, public Peony::FMWindowIface +{ + Q_OBJECT + friend class KyFileDialogHelper; + +public: + enum ViewMode { List, Icon }; + enum SaveErrorType { + DIR_ERROR = 001, + DBUS_ERROR = 002, + DBUSValid_ERROR = 003, + DBUSValue_ERROR = 004 + }; + + KyNativeFileDialog(QWidget *parent = nullptr); + ~KyNativeFileDialog(); + + Peony::FMWindowIface *create(const QString &uri); + Peony::FMWindowIface *create(const QStringList &uris); + + + /** + * @brief 获取当前目录 + * @return + */ + const QString getCurrentUri(); + /** + * @brief 获取当前选中的文件 无转码 + * @return + */ + const QStringList getCurrentSelections(); + /** + * @brief 获取当前目录下所有文件的uri + * @return + */ + const QStringList getCurrentAllFileUris(); + /** + * @brief 获取当前选中的文件 有转码 + * @return + */ + const QStringList getCurrentSelectionsList(); + /** + * @brief 获取当前选中的文件的信息 + * @return + */ + const QList<std::shared_ptr<Peony::FileInfo>> getCurrentSelectionFileInfos(); + + /** + * @brief 设置选中列表 + * @return + */ + void setCurrentSelections(QStringList selections); + + /** + * @brief 获取排序方式 + * @return + */ + Qt::SortOrder getCurrentSortOrder(); + /** + * @brief 获取排序类型 + * @return + */ + int getCurrentSortColumn(); + + bool getWindowShowHidden(); + bool getWindowUseDefaultNameSortOrder(); + bool getWindowSortFolderFirst(); + + /** + * @brief 强制刷新 + * @return + */ + void refresh(); + /** + * @brief 停止当前界面加载 + * @return + */ + void forceStopLoading(); + + void setShowHidden(bool showHidden); + void setUseDefaultNameSortOrder(bool use); + void setSortFolderFirst(bool set); + + void setCurrentSelectionUris(const QStringList &uris); + void setCurrentSortOrder (Qt::SortOrder order); + void setCurrentSortColumn (int sortColumn); + + void editUri(const QString &uri); + void editUris(const QStringList &uris); + + bool getFilterWorking(); + + void beginSwitchView(const QString &viewId); + + /** + * @brief 设置路径 + * @return + */ + void setDirectory(const QString &directory); + void setDirectory(const QDir &directory); + /** + * @brief 获取路径 + * @return + */ + QDir directory() const; + /** + * @param filename文件名 + * @brief 选择指定文件 + */ + void selectFile(const QString &filename); + /** + * @brief 获取选中的文件 + * @return + */ + QStringList selectedFiles() const; + + /** + * @brief 设置路径 + * @return + */ + void setDirectoryUrl(const QUrl &directory); + /** + * @brief 获取路径 + * @return + */ + QUrl directoryUrl() const; + + /** + * @brief 设置选中的url + * @return + */ + void selectUrl(const QUrl &url); + /** + * @brief 获取选中的urls + * @return + */ + QList<QUrl> selectedUrls() const; + +// void setNameFilterDetailsVisible(bool enabled); +// bool isNameFilterDetailsVisible() const; + +// void setNameFilter(const QString &filter); + /** + * @brief 设置后缀过滤器 + * @return + */ + void setNameFilters(const QStringList &filters); + QStringList nameFilters() const; + /** + * @brief 设置后缀 + * @return + */ + void selectNameFilter(const QString &filter); + QString selectedMimeTypeFilter() const; + QString selectedNameFilter() const; + void selectNameFilterByIndex(int index); + void selectNameFilterCurrentIndex(int index); + int selectNameFilterIndex() const; + + QDir::Filters filter(); + void setFilter(QDir::Filters filters); + + void setViewMode(ViewMode mode); + ViewMode viewMode() const; + + void setFileMode(QFileDialog::FileMode mode); + QFileDialog::FileMode fileMode(); + + void setAcceptMode(QFileDialog::AcceptMode mode); + QFileDialog::AcceptMode acceptMode() const; + + void setLabelText(QFileDialog::DialogLabel label, const QString &text); + QString labelText(QFileDialog::DialogLabel label) const; + + void setOptions(QFileDialog::Options options); + void setOption(QFileDialog::Option option, bool on = true); + bool testOption(QFileDialog::Option option) const; + QFileDialog::Options options() const; + void setCurrentInputName(const QString &name); + Peony::DirectoryViewContainer *getCurrentPage(); + Peony::DirectoryViewContainer *getCurrentPage() const; + + Peony::DirectoryViewWidget *containerView() const; + + void setComBoxItems(const QStringList &filters); + + bool isDir(QString path); + + void updateMaximizeState(); + + void intiContainerSort(); + + void refreshContainerSort(); + + void refreshCompleter(); + + bool doSave(QStringList sFiles); + + bool doOpen(QStringList sFiles); + + bool saveMessageBox(QString name); + + void setHelper(KyFileDialogHelper* helepr); + + void setShortCuts(); + + void initialViewId(); + + void delayShow(); + + void discardDelayedShow(); + + QString copyEditText(); + + void installTranslate(QString local); + + bool selectIsDir(); + void setSelectIsDir(bool); + + /** + * @brief 判断名字是否过长 + * @return + */ + bool checkLongName(QString path, QString name); + /** + * @brief 显示长文件名弹窗 + * @return + */ + bool longNameDialog(QString path, QString name); + /** + * @brief 虚拟路径转化 + * @return + */ + QString convertSpecialPath(QString path) const; + +Q_SIGNALS: + void switchViewRequest(const QString &viewId); + + void fileSelected(const QUrl &file); + void filesSelected(const QList<QUrl> &files); + void currentChanged(const QUrl &path); + void directoryEntered(const QUrl &directory); + void selectedNameFilterChanged(); + void filterSelected(const QString &filter); + void locationChangeEnd(); + void locationChangeStart(); + +public Q_SLOTS: + void goToUri(const QString &uri, bool addToHistory = true, bool forceUpdate = false); + void goBack(); + void goForward(); + void goToParent(); + void onSwitchView(); + void updateWindowState(); + QString selectName(); + void updateStatusBar(); + void onNewFolder(); + void setSortType(); + void searchButtonClicked(); + void setSearchMode(bool mode); + void lineEditTextChange(QString text); + void containerMenuRequest(const QPoint &pos); + void updateSearchProgressBar(); + void selectionChanged(); + bool isDataBlockHasUserFile(); + void slot_responseUnmounted(const QString &destUri, const QString &sourceUri); + +protected: + void resizeEvent(QResizeEvent *e); + void paintEvent(QPaintEvent *e); + void keyPressEvent(QKeyEvent *e); + +private: + Ui_KyFileDialog *mKyFileDialogUi = nullptr; + QScopedPointer<KyNativeFileDialogPrivate> d_ptr; + Q_DECLARE_PRIVATE_D(qGetPtrHelper(d_ptr), KyNativeFileDialog) + void onAcceptButtonClicked(); + void onRejectButtonClicked(); + void onCurrentInputNameChanged(); + void handleEnterPressed(); + void updateAcceptButtonState(); + bool checkSaveFileExsits(QString path, QString fileName); + + QStringList compareTwoList(QStringList oldList, QStringList newList); + QStringList sameTwoList(QStringList oldList, QStringList newList); + + //判断当前目录权限 +// static GAsyncReadyCallback async_query_permisson_callback(GObject *obj, GAsyncResult *res, Peony::PermissionsPropertiesPage *p_this); +private: + bool m_searchMode = false; +// QFileSystemModel *m_fileSystemModel = nullptr; + QCompleter * m_completer = nullptr; + QListView *m_listView = nullptr; + QStringList m_CurrentPathAllFiles; + KyFileDialogHelper *m_fileDialogHelper = nullptr; + bool isInitialGoToUriNum = true; + bool m_shortcutsSet = false; + QString m_lastSearchPath; + bool m_isClearSearchKey = false; + QStringListModel *m_model = nullptr; + QString m_copyEditText; + QMap<int, QString> m_nameFilterMap; + QMap<QString, QString> m_displayNameMap; + QStringList m_uris_to_edit; + bool m_needSearch = false; + bool m_selectIsDir = false; + bool m_isLoading = false;//是否开始加载 + bool m_isLoadSelect = false;//是否是在加载中选中的 + bool m_longNameChangeDir = false;//是否保存到长文件目录 + QString m_longSavePath; //保存长文件的目录 + int m_maxLenth = LONG_NAME_LIMIT;//文件名的最长长度 + QString m_RecodPath;//记录的最后一个非长文件名目录 + int m_transparency = 0; + + QTranslator *m_translator = nullptr; + QTranslator *m_translator0 = nullptr; + QTranslator *m_translator1 = nullptr; + QTranslator *m_translator2 = nullptr; + QTranslator *m_translator3 = nullptr; + QTranslator *m_translatorSDK = nullptr; +}; + +class KyFileDialogHelper : public QPlatformFileDialogHelper +{ + Q_OBJECT +public: + explicit KyFileDialogHelper(); + + ~KyFileDialogHelper() override; + + + virtual void exec() override; + virtual bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) override; + virtual void hide() override; + + virtual bool defaultNameFilterDisables() const override; + virtual void setDirectory(const QUrl &directory) override; + virtual QUrl directory() const override; + virtual void selectFile(const QUrl &filename) override; + virtual QList<QUrl> selectedFiles() const override; + virtual void setFilter() override; + virtual void selectNameFilter(const QString &filter) override; + + virtual void selectMimeTypeFilter(const QString &filter) override; + virtual QString selectedNameFilter() const override; + virtual QString selectedMimeTypeFilter() const override; + + virtual bool isSupportedUrl(const QUrl &url) const override; + + bool isViewInitialFinished(); + + bool isShow(); + +public Q_SLOTS: + void viewInitialFinished(); +Q_SIGNALS: + void fileSelected(const QUrl &file); + void filesSelected(const QList<QUrl> &files); + void currentChanged(const QUrl &path); + void directoryEntered(const QUrl &directory); + void filterSelected(const QString &filter); + + +private: + KyNativeFileDialog* mKyFileDialog = nullptr; + QUrl m_selectedFiles; + bool m_viewInitialFinished = false; + bool m_isShow = false; + QUrl m_initialDirectory; + QList<QUrl> m_initialSelectFiles; + + +private: + void initDialog(); +}; + + + + +#endif // KYNATIVEFILEDIALOG_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/kyfiledialogprivate.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/kyfiledialogprivate.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/kyfiledialogprivate.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/kyfiledialogprivate.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,65 @@ +#include <QFileDialog> +#include <QTimer> +#include <QLineEdit> +#include "kyfiledialog.h" +#include "uikyfiledialog.h" +#include "kyfiledialogprivate.h" + +KyNativeFileDialogPrivate::KyNativeFileDialogPrivate() +{ +// Q_Q(KyNativeFileDialog); + + m_timer = new QTimer; +// m_container = q->m_container; +} + +KyNativeFileDialogPrivate::~KyNativeFileDialogPrivate() +{ + if(m_timer){ + delete m_timer; + m_timer = nullptr; + } +} + +QStringList KyNativeFileDialogPrivate::typedFiles() +{ + /* + Q_Q(KyNativeFileDialog); + QStringList files; + QString editText = q->mKyFileDialogUi->m_fileNameEdit->text(); + if (!editText.contains(QLatin1Char('"'))) { +#ifdef Q_OS_UNIX + const QString prefix = q->directory().absolutePath() + QDir::separator(); + if (QFile::exists(prefix + editText)) + files << editText; + else + files << qt_tildeExpansion(editText); +#else + files << editText; + Q_UNUSED(q) +#endif + } else { + // " is used to separate files like so: "file1" "file2" "file3" ... + // ### need escape character for filenames with quotes (") + QStringList tokens = editText.split(QLatin1Char('\"')); + for (int i=0; i<tokens.size(); ++i) { + if ((i % 2) == 0) + continue; // Every even token is a separator +#ifdef Q_OS_UNIX + const QString token = tokens.at(i); + const QString prefix = q->directory().absolutePath() + QDir::separator(); + if (QFile::exists(prefix + token)) + files << token; + else + files << qt_tildeExpansion(token); +#else + files << toInternal(tokens.at(i)); +#endif + } + } + return addDefaultSuffixToFiles(files); + + */ + return QStringList(); +} + diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/kyfiledialogprivate.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/kyfiledialogprivate.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/kyfiledialogprivate.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/kyfiledialogprivate.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,81 @@ +#ifndef KYNATIVEFILEDIALOGPRIVATE_H +#define KYNATIVEFILEDIALOGPRIVATE_H + +#include <QFileDialog> +#include <QTimer> + +namespace Peony { +class DirectoryViewContainer; +} +class KyFileDialogHelper; +class KyNativeFileDialogPrivate +{ + friend class KyNativeFileDialog; +public: + KyNativeFileDialogPrivate(); + ~KyNativeFileDialogPrivate(); + +private: + QStringList typedFiles(); + + QStringList nameFilters; + QFileDialog::AcceptMode acceptMode; + QFileDialog::FileMode fileMode; + QFileDialog::Options options; + Peony::DirectoryViewContainer *m_container = nullptr; + QString currentInputName; + QTimer *m_timer = nullptr; + QDir::Filters filters = QDir::AllEntries; +}; + +#endif // KYNATIVEFILEDIALOGPRIVATE_H + +/* +KyNativeFileDialogPrivate::KyNativeFileDialogPrivate() +{ +// Q_Q(KyNativeFileDialog); + + m_timer = new QTimer; +// m_container = q->m_container; +} + +QStringList KyNativeFileDialogPrivate::typedFiles() const +{ + Q_Q(KyNativeFileDialog); + QStringList files; + QString editText = q->mk ->text(); + if (!editText.contains(QLatin1Char('"'))) { +#ifdef Q_OS_UNIX + const QString prefix = q->directory().absolutePath() + QDir::separator(); + if (QFile::exists(prefix + editText)) + files << editText; + else + files << qt_tildeExpansion(editText); +#else + files << editText; + Q_UNUSED(q) +#endif + } else { + // " is used to separate files like so: "file1" "file2" "file3" ... + // ### need escape character for filenames with quotes (") + QStringList tokens = editText.split(QLatin1Char('\"')); + for (int i=0; i<tokens.size(); ++i) { + if ((i % 2) == 0) + continue; // Every even token is a separator +#ifdef Q_OS_UNIX + const QString token = tokens.at(i); + const QString prefix = q->directory().absolutePath() + QDir::separator(); + if (QFile::exists(prefix + token)) + files << token; + else + files << qt_tildeExpansion(token); +#else + files << toInternal(tokens.at(i)); +#endif + } + } + return addDefaultSuffixToFiles(files); + + return QStringList(); +} +*/ diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/menutoolbutoon.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/menutoolbutoon.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/menutoolbutoon.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/menutoolbutoon.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,62 @@ +#include <QApplication> +#include "menutoolbutoon.h" +static ToolButtonStyle *global_instance = nullptr; + +MenuToolButton::MenuToolButton(QWidget *parent) : QToolButton(parent) +{ + setStyle(ToolButtonStyle::getStyle()); +} + +ToolButtonStyle *ToolButtonStyle::getStyle() +{ + if (!global_instance) { + global_instance = new ToolButtonStyle; + } + return global_instance; +} + +int ToolButtonStyle::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, const QWidget *widget) const +{ + if (qobject_cast<const QToolButton *>(widget)) + return 0; + + switch (metric) { + case PM_ToolBarIconSize: + return 16; + case PM_ToolBarSeparatorExtent: + return 1; + case PM_ToolBarItemSpacing: { + return 1; + } + default: + return QProxyStyle::pixelMetric(metric, option, widget); + } +} + +void ToolButtonStyle::drawComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const +{ + //This is a "lie". We want to use instant popup menu for tool button, and we aslo + //want use popup menu style with this tool button, so we change the related flags + //to draw in our expected. + if (control == CC_ToolButton) { + QStyleOptionToolButton button = *qstyleoption_cast<const QStyleOptionToolButton *>(option); + if (button.features.testFlag(QStyleOptionToolButton::HasMenu)) { + button.features = QStyleOptionToolButton::None; + if (!widget->property("isOptionButton").toBool()) { + button.features |= QStyleOptionToolButton::HasMenu; + button.features |= QStyleOptionToolButton::MenuButtonPopup; + button.subControls |= QStyle::SC_ToolButtonMenu; + } + return qApp->style()->drawComplexControl(control, &button, painter, widget); + } + } + return qApp->style()->drawComplexControl(control, option, painter, widget); +} + +void ToolButtonStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const +{ + if (element == PE_IndicatorToolBarSeparator) { + return; + } + return qApp->style()->drawPrimitive(element, option, painter, widget); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/menutoolbutoon.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/menutoolbutoon.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/menutoolbutoon.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/menutoolbutoon.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,36 @@ +#ifndef MENUTOOLBUTTON_H +#define MENUTOOLBUTTON_H +#include <QToolButton> +#include <QProxyStyle> +#include <QStyleOption> +#include <QPainter> + +class MenuToolButton : public QToolButton +{ + Q_OBJECT +public: + explicit MenuToolButton(QWidget *parent = nullptr); + ~MenuToolButton(){} + +Q_SIGNALS: + + +public Q_SLOTS: + +}; + +class ToolButtonStyle : public QProxyStyle +{ + friend class MenuToolButton; + friend class HeaderBarContainer; + static ToolButtonStyle *getStyle(); + + ToolButtonStyle() {} + ~ToolButtonStyle() {} + + int pixelMetric(PixelMetric metric, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override; + + void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget = nullptr) const override; + void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = nullptr) const override; +}; +#endif // MENUTOOLBUTTON_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/pathbar.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/pathbar.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/pathbar.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/pathbar.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,40 @@ +#include <QDebug> +#include <QObject> +#include <PeonyPathCompleter> +#include <PeonyPathBarModel> +#include <peony-qt/file-utils.h> +#include "debug.h" +#include "pathbar.h" + +FileDialogPathBar::FileDialogPathBar(QWidget *parent) : QWidget(parent)//Peony::AdvancedLocationBar(parent)//QLineEdit(parent)// +{ + setAttribute(Qt::WA_TranslucentBackground); + m_pathBar = new Peony::AdvancedLocationBar(this); + m_pathBar->setFixedWidth(this->width()); + m_pathBar->setGeometry(0, (this->height() - m_pathBar->height()) / 2, this->width(), m_pathBar->height()); +} + +FileDialogPathBar::~FileDialogPathBar() +{ + m_pathBar->deleteLater(); + m_pathBar = nullptr; +} + +void FileDialogPathBar::updatePath(const QString &uri) +{ +// qDebug() << "m_pathBar........ updatePath:" << uri << Peony::FileUtils::getEncodedUri(uri); + m_pathBar->updateLocation(Peony::FileUtils::urlEncode(uri)); +// setText(uri); +// clearFocus(); +} + +void FileDialogPathBar::resizeEvent(QResizeEvent *e) +{ + m_pathBar->setFixedWidth(this->width()); + m_pathBar->setGeometry(0, (this->height() - m_pathBar->height()) / 2, this->width(), m_pathBar->height()); +} + +Peony::AdvancedLocationBar *FileDialogPathBar::getPathBar() +{ + return m_pathBar; +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/pathbar.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/pathbar.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/pathbar.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/pathbar.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,27 @@ +#ifndef PATHBAR_H +#define PATHBAR_H +#include <QLineEdit> +#include <QResizeEvent> +#include <peony-qt/controls/navigation-bar/advanced-location-bar.h> + +class FileDialogPathBar : public QWidget//public QLineEdit// +{ + Q_OBJECT +public: + explicit FileDialogPathBar(QWidget *parent = nullptr); + ~FileDialogPathBar(); + void resizeEvent(QResizeEvent *e); + Peony::AdvancedLocationBar *getPathBar(); + +Q_SIGNALS: + void goToUriRequest(const QString &uri, bool addToHistory = true); + void updateWindowLocationRequest(const QString &uri, bool addHistory, bool forceUpdate = false); + void refreshRequest(); + void searchRequest(const QString &path, const QString &key); + +public Q_SLOTS: + void updatePath(const QString &uri); +private: + Peony::AdvancedLocationBar *m_pathBar = nullptr; +}; +#endif // PATHBAR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/sidebar.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/sidebar.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/sidebar.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/sidebar.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,482 @@ +#include <QTimer> +#include <PeonySideBarModel> +#include <QScrollBar> +#include <QHeaderView> +#include <QPainterPath> +#include <QPainter> +#include <QDebug> +#include <QApplication> +#include <QTreeWidget> +#include <QMessageBox> +#include <QToolTip> +#include <QScreen> +#include "peony-qt/controls/menu/side-bar-menu/side-bar-menu.h" +#include "peony-qt/side-bar-abstract-item.h" +#include "peony-qt/volume-manager.h" +#include "peony-qt/file-enumerator.h" +#include "peony-qt/file-utils.h" +#include "peony-qt/file-info.h" +#include "vfs-plugin-iface.h" +#include "side-bar-abstract-item.h" +#include "global-settings.h" +#include "plugin-manager.h" +#include "../libqt5-ukui-style/settings/ukui-style-settings.h" +#include "debug.h" +#include "kyfiledialog.h" +#include "sidebar.h" + +using namespace Peony; + +FileDialogComboBox::FileDialogComboBox(QWidget *parent):QComboBox(parent) +{ + if (QGSettings::isSchemaInstalled("org.ukui.style")) { + auto settings = UKUIStyleSettings::globalInstance(); + connect(settings, &QGSettings::changed, this, [=](const QString &key){ + pDebug << "key changed:" << key << this->size(); + m_styleChanged = true; + }); + } + + connect(this, &FileDialogComboBox::setStyleChanged, this, [=](bool change){ + pDebug << "setStyleChanged m_styleChanged:" << change; + m_styleChanged = change; + }); + m_minSize = this->minimumSize(); +} + +QSize FileDialogComboBox::minimumSizeHint() const +{ + pDebug << "minimumSizeHint...." << m_styleChanged << this->size() << m_minSize; + if(m_styleChanged || (qApp->screenAt(QCursor::pos())->availableSize().width() - 300) < QComboBox::minimumSizeHint().width()) + { + Q_EMIT setStyleChanged(false); + return m_minSize;//this->size(); + } + QSize size = QComboBox::minimumSizeHint(); + + return size; +} + + +FileDialogSideBar::FileDialogSideBar(QWidget *parent) : QTreeView(parent) +{ + static SideBarStyle *global_style = new SideBarStyle; + + setIconSize(QSize(16, 16)); + +// header()->setSectionResizeMode(QHeaderView::Stretch ); + header()->setStretchLastSection(false); + header()->hide(); + + this->verticalScrollBar()->setProperty("drawScrollBarGroove", false); + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + this->setFrameStyle(QFrame::NoFrame); + setSortingEnabled(true); + + setProperty("useIconHighlightEffect", true); + setDragDropMode(QTreeView::NoDragDrop); + setProperty("doNotBlur", true); + viewport()->setProperty("doNotBlur", true); + setContextMenuPolicy(Qt::CustomContextMenu); + + setExpandsOnDoubleClick(false); + setMouseTracking(true);//追踪鼠标 + setAutoScrollMargin(0); + + + m_delegate = new SideBarItemDelegate(this); + setItemDelegate(m_delegate); + + m_model = new Peony::SideBarModel(this); + m_proxyModel = new Peony::SideBarProxyFilterSortModel(this); + m_proxyModel->setSourceModel(m_model); + setModel(m_proxyModel); + + Peony::VolumeManager *volumeManager = Peony::VolumeManager::getInstance(); + connect(volumeManager,&Peony::VolumeManager::volumeAdded,this,[=](const std::shared_ptr<Peony::Volume> &volume){ + m_proxyModel->invalidate();//display DVD device in real time. + }); + connect(volumeManager,&Peony::VolumeManager::volumeRemoved,this,[=](const std::shared_ptr<Peony::Volume> &volume){ + m_proxyModel->invalidate();//The drive does not display when the DVD device is removed. + //pDebug << "volumeRemoved:" <<QToolTip::text(); + //fix abnormal pull out usb device tips not hide issue, link to bug#81190 + if (QToolTip::isVisible()) { + QToolTip::hideText(); + } + }); + connect(volumeManager,&Peony::VolumeManager::driveDisconnected,this,[=](const std::shared_ptr<Peony::Drive> &drive){ + m_proxyModel->invalidate();//Multiple udisk eject display problem + }); + connect(volumeManager,&Peony::VolumeManager::mountAdded,this,[=](const std::shared_ptr<Peony::Mount> &mount){ + m_proxyModel->invalidate();//display udisk in real time after format it. + }); + + + connect(this, &FileDialogSideBar::clicked, this, [=](const QModelIndex &index){ + switch (index.column()) { + case 0: { + auto item = m_proxyModel->itemFromIndex(index); + + if (! item) + break; + //continue to fix crash issue, related to bug#116201,116589 + if(item->isMountable()&&!item->isMounted()) + item->mount(); + else{ + auto uri = item->uri(); + + if (!item->uri().isEmpty()){ + if (uri == "computer:///ukui-data-volume") { + uri = "file:///data"; + } + Q_EMIT goToUriRequest(uri); + } + } + break; + } + case 1: { + auto item = m_proxyModel->itemFromIndex(index); + if (item->isMounted() || item->isEjectable()||item->isStopable()) { + auto leftIndex = m_proxyModel->index(index.row(), 0, index.parent()); + this->collapse(leftIndex); + item->ejectOrUnmount(); + } else { + // if item is not unmountable, just be same with first column. + // fix #39716 + auto uri = item->uri(); + + if (!item->uri().isNull()){ + if (uri == "computer:///ukui-data-volume") { + uri = "file:///data"; + } + Q_EMIT goToUriRequest(uri); + } + } + break; + } + default: + break; + } + }); + + connect(this, &FileDialogSideBar::expanded, this, [=](const QModelIndex &index){ + auto item = m_proxyModel->itemFromIndex(index); + /*! + \bug can not expanded? enumerator can not get prepared signal, why? + */ + bool isShowNetwork = Peony::GlobalSettings::getInstance()->isExist(SHOW_NETWORK) ? + Peony::GlobalSettings::getInstance()->getValue(SHOW_NETWORK).toBool() : true; + if (item->type() == Peony::SideBarAbstractItem::NetWorkItem && !isShowNetwork) { + this->setRowHidden(index.row(), index.parent(), true); + return; + } + + QStringList disExtensions = Peony::GlobalSettings::getInstance()->getValue(DISABLED_EXTENSIONS).toStringList(); + for (auto extensions : disExtensions) { + Peony::VFSPluginIface *pIface = dynamic_cast<Peony::VFSPluginIface*>(Peony::PluginManager::getInstance()->getPluginByFileName(extensions)); + if (pIface && pIface->pluginType() == Peony::PluginInterface::VFSPlugin + && item->type() == Peony::SideBarAbstractItem::FileSystemItem + && !item->uri().contains("computer:///") + && item->uri().contains(pIface->uriScheme())) { + this->setRowHidden(index.row(), index.parent(), true); + return; + } + + if (pIface && pIface->pluginType() == PluginInterface::VFSPlugin + && item->type() == SideBarAbstractItem::FavoriteItem + && pIface->uriScheme() == "kmre://" + && item->uri().contains(pIface->uriScheme())) { + this->setRowHidden(index.row(), index.parent(), true); + return; + } + } + + item->findChildrenAsync(); + }); + + connect(this, &FileDialogSideBar::collapsed, this, [=](const QModelIndex &index){ + auto item = m_proxyModel->itemFromIndex(index); + item->clearChildren(); + }); + + connect(this, &QTreeView::customContextMenuRequested, this, [=](const QPoint &pos){ + auto index = indexAt(pos); + auto item = m_proxyModel->itemFromIndex(index); + if (item) { + if (item->type() != Peony::SideBarAbstractItem::SeparatorItem) { + Peony::SideBarMenu menu(item, nullptr, parent ? parent : this); + QList<QAction *> actionList; + if (item->type() == Peony::SideBarAbstractItem::FileSystemItem) { + if ((0 != QString::compare(item->uri(), "computer:///")) && + (0 != QString::compare(item->uri(), "filesafe:///"))) { + for (const auto &actionItem : actionList) { + if(item->isVolume())/* 分区才去需要判断是否已挂载 */ + actionItem->setEnabled(item->isMounted()); + } + } + } + + menu.exec(QCursor::pos()); + } + } + }); + +// if (QGSettings::isSchemaInstalled("org.ukui.style")) { +// auto settings = UKUIStyleSettings::globalInstance(); +// connect(settings, &QGSettings::changed, this, [=](const QString &key){ +// pDebug << "key changed:" << key << width(); +// if (key == "styleName") { +// m_siderWidth = this->width(); +// } +// }); +// } + expandToDepth(1); + setStyle(global_style); + setViewportMargins(8, 4, 4, 4); + + pDebug << "columndffffffffffffffff"; +// setColumnHidden(1, true); +} + +FileDialogSideBar::~FileDialogSideBar() +{ + if(m_proxyModel){ + m_proxyModel->deleteLater(); + m_proxyModel = nullptr; + } + if(m_model){ + m_model->deleteLater(); + m_model = nullptr; + } + if(m_delegate){ + m_delegate->deleteLater(); + m_delegate = nullptr; + } +} + +void FileDialogSideBar::resizeEvent(QResizeEvent *e) +{ + setViewportMargins(8, 4, 4, 4); + +// this->setGeometry(this->x(), this->y(), m_siderWidth, this->height()); + QTreeView::resizeEvent(e); + pDebug << "FileDialogSideBar resizeEvent header count......:" << header()->count() << this->viewport()->width() << this->columnWidth(0) << this->columnWidth(1); + if (header()->count() > 0) { + this->setColumnWidth(1, 20); + header()->resizeSection(0, this->viewport()->width() - this->columnWidth(1)); + } +} + +QSize FileDialogSideBar::sizeHint() const +{ + return QTreeView::sizeHint(); +} + +void FileDialogSideBar::menuRequest(const QPoint &pos) +{ +// auto index = indexAt(pos); +// auto item = proxyModel->itemFromIndex(index); +// if (item) { +// pDebug << "sider bar menu00000" << item->type() << index; +// if (item->type() != Peony::SideBarAbstractItem::SeparatorItem) { +// pDebug << "sider bar menu11111"; +//// Peony::SideBarMenu *menu = new Peony::SideBarMenu(item, this); +// pDebug << "sider bar menu22222222"; +//// menu->exec(QCursor::pos()); +// pDebug << "sider bar menu3333333"; +// } +// } +} + +void FileDialogSideBar::paintEvent(QPaintEvent *event) +{ + QPalette palette = qApp->palette(); + palette.setColor(QPalette::Base, QColor(Qt::transparent));//window AlternateBase Base NoRole + this->setPalette(palette); + + QTreeView::paintEvent(event); +} + +//void FileDialogSideBar::paintEvent(QPaintEvent *e) +//{ +// QColor color = this->palette().window().color(); +// QColor colorBase = QColor(Qt::red); //this->palette().base().color(); + +// int R1 = color.red(); +// int G1 = color.green(); +// int B1 = color.blue(); +// qreal a1 = 0.3; + +// int R2 = colorBase.red(); +// int G2 = colorBase.green(); +// int B2 = colorBase.blue(); +// qreal a2 = 1; + +// qreal a = 1 - (1 - a1)*(1 - a2); + +// qreal R = (a1*R1 + (1 - a1)*a2*R2) / a; +// qreal G = (a1*G1 + (1 - a1)*a2*G2) / a; +// qreal B = (a1*B1 + (1 - a1)*a2*B2) / a; + +// colorBase.setRed(R); +// colorBase.setGreen(G); +// colorBase.setBlue(B); +// colorBase.setAlphaF(1); + +//// QPainter p(this); +//// QPainterPath sidebarPath; +//// sidebarPath.addRoundedRect(this->geometry(), 6, 6); +//// p.fillPath(sidebarPath, colorBase); +//// viewport()->setObjectName("viewport"); +//// viewport()->setStyleSheet("QWidget#viewport{background-color:rgba(255,255,255,0.5)");////" + QString::number(colorBase.red()) + "," + QString::number(colorBase.green()) + "," + QString::number(colorBase.blue()) + "," + QString::number(colorBase.alpha()) + "}"); +// QTreeView::paintEvent(e); +//} + + +SideBarItemDelegate::SideBarItemDelegate(QObject *parent) +{ +// if (QGSettings::isSchemaInstalled("org.ukui.style")) { +// auto settings = UKUIStyleSettings::globalInstance(); +// connect(settings, &QGSettings::changed, this, [=](const QString &key){ +// pDebug << "key changed:" << key; +// if (key == "styleName") { +// pDebug << "key changed...."; +// this->paint(); +// this->update(); +// } +// }); +// } +} + +QSize SideBarItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const +{ + auto size = QStyledItemDelegate::sizeHint(option, index); + size.setHeight(36); + return size; +} + + +void SideBarItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const +{ +// painter->save(); +// if (index.column() == 1) { +// QPainterPath rightRoundedRegion; +// rightRoundedRegion.setFillRule(Qt::WindingFill); +// auto rect = option.rect; +// auto view = qobject_cast<const QAbstractItemView *>(option.widget); +// if (view) { +// rect.setRight(view->viewport()->rect().right()); +// } +// rightRoundedRegion.addRoundedRect(rect, 4, 4); +// rightRoundedRegion.addRect(rect.adjusted(0, 0, -4, 0)); +// painter->setClipPath(rightRoundedRegion); +// } + +// painter->setRenderHint(QPainter::Antialiasing); +// QStyledItemDelegate::paint(painter, option, index); +// painter->restore(); + + QStyledItemDelegate::paint(painter, option, index); +} + +SideBarStyle::SideBarStyle() +{ + +} + +void SideBarStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const +{ + painter->save(); + switch (element) { + case QStyle::PE_IndicatorItemViewItemDrop: { + painter->setRenderHint(QPainter::Antialiasing, true);/* 反锯齿 */ + /* 按设计要求,边框颜色为调色板highlight值,圆角为6px */ + QColor color = option->palette.color(QPalette::Highlight); + painter->setPen(color); + painter->drawRoundedRect(option->rect, 6, 6); + painter->restore(); + return; + } + + case QStyle::PE_IndicatorBranch: { + if (option->rect.x() == 0) { + QPainterPath leftRoundedRegion; + leftRoundedRegion.setFillRule(Qt::WindingFill); + leftRoundedRegion.addRoundedRect(option->rect, 4, 4); + leftRoundedRegion.addRect(option->rect.adjusted(4, 0, 0, 0)); + painter->setClipPath(leftRoundedRegion); + } + const QStyleOptionViewItem *tmp = qstyleoption_cast<const QStyleOptionViewItem *>(option); + QStyleOptionViewItem opt = *tmp; + if (!opt.state.testFlag(QStyle::State_Selected)) { + if (opt.state & QStyle::State_Sunken) { + opt.palette.setColor(QPalette::Highlight, opt.palette.button().color()); +// opt.palette.setColor(QPalette::Highlight, Qt::red); + } + if (opt.state & QStyle::State_MouseOver) { + opt.palette.setColor(QPalette::Highlight, opt.palette.mid().color()); +// opt.palette.setColor(QPalette::Highlight, Qt::green); + } + } + qApp->style()->drawPrimitive(element, &opt, painter, widget); + painter->restore(); + return; + } + case QStyle::PE_PanelItemViewRow: { + painter->restore(); + return; + break; + } + case QStyle::PE_PanelItemViewItem: { + /* + const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option); + QStyleOptionViewItem opt = *vi; + painter->save(); + painter->setPen(Qt::NoPen); + QPainterPath path; + if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) { + path.addRoundedRect(vi->rect, 6, 6); + } + else { + path.addRect(vi->rect); + } +// pDebug << "vi->rect:" << vi->rect; + + if (!opt.state.testFlag(QStyle::State_Selected)) { + if (opt.state & QStyle::State_Sunken) { + opt.palette.setColor(QPalette::Highlight, opt.palette.button().color()); + } + if (opt.state & QStyle::State_MouseOver) { + opt.palette.setColor(QPalette::Highlight, opt.palette.mid().color()); + } + } + painter->drawPath(path); + */ + break; + } + + default: + break; + } + + qApp->style()->drawPrimitive(element, option, painter, widget); + painter->restore(); +} + +void SideBarStyle::drawControl(QStyle::ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const +{ + if (element == QStyle::CE_ItemViewItem) { + const QStyleOptionViewItem *tmp = qstyleoption_cast<const QStyleOptionViewItem *>(option); + QStyleOptionViewItem opt = *tmp; + if (!opt.state.testFlag(QStyle::State_Selected)) { + if (opt.state & QStyle::State_Sunken) { + opt.palette.setColor(QPalette::Highlight, opt.palette.button().color()); + } + if (opt.state & QStyle::State_MouseOver) { + opt.palette.setColor(QPalette::Highlight, opt.palette.mid().color()); + } + } + return qApp->style()->drawControl(element, &opt, painter, widget); + } +} + diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/sidebar.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/sidebar.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/sidebar.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/sidebar.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,78 @@ +#ifndef SIDEBAR_H +#define SIDEBAR_H +#include <QTreeView> +#include <QPaintEvent> +#include <QStyledItemDelegate> +#include <QStyleOptionViewItem> +#include <QModelIndex> +#include <QPainter> +#include <QProxyStyle> +#include <QStyleOption> +#include <PeonySideBarProxyModel> +#include <QComboBox> +#include <QSize> +#include <PeonySideBarModel> + +class FileDialogComboBox : public QComboBox +{ + Q_OBJECT +public: + explicit FileDialogComboBox(QWidget *parent = nullptr); + ~FileDialogComboBox(){} + QSize minimumSizeHint() const; + +Q_SIGNALS: + void setStyleChanged(bool change) const; + +private: + bool m_styleChanged = false; + QSize m_minSize; +}; + + +class SideBarItemDelegate : public QStyledItemDelegate +{ + friend class FileDialogSideBar; + explicit SideBarItemDelegate(QObject *parent = nullptr); + ~SideBarItemDelegate(){} + + QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; + void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; +}; + + +class FileDialogSideBar : public QTreeView +{ + + Q_OBJECT +public: + explicit FileDialogSideBar(QWidget *parent = nullptr); + ~FileDialogSideBar(); + void resizeEvent(QResizeEvent *e); + void paintEvent(QPaintEvent *event); + + QSize sizeHint() const; + +public Q_SLOTS: + void menuRequest(const QPoint &pos); + +private: + Peony::SideBarProxyFilterSortModel *m_proxyModel = nullptr; + Peony::SideBarModel *m_model = nullptr; + SideBarItemDelegate *m_delegate = nullptr; + +Q_SIGNALS: + void goToUriRequest(const QString &uri, bool addToHistory = true, bool forceUpdate = false); + +}; + + +class SideBarStyle : public QProxyStyle +{ +public: + explicit SideBarStyle(); + ~SideBarStyle(){} + void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override; + void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override; +}; +#endif // SIDEBAR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_bo_CN.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_bo_CN.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_bo_CN.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_bo_CN.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,433 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="bo_CN"> +<context> + <name>KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> + <translation>ཁ་འབྱེད།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3082"/> + <source>Save File</source> + <translation>ཉར་ཚགས།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3095"/> + <source>All Files (*)</source> + <translation>ཡོད་ཚད་(*)</translation> + </message> +</context> +<context> + <name>KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> + <translation>ཡིག་ཚིགས།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="47"/> + <source>Bytes</source> + <translation>ཡིག་ཚིགས།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="50"/> + <source>character</source> + <translation>ཡིག་རྟགས།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="51"/> + <source>Character</source> + <translation>ཡིག་རྟགས།</translation> + </message> + <message> + <source>Saving "%1"</source> + <translation type="vanished">"%1"ཉར་ཚགས་བྱེད་བཞིན་ཡོད།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>Saving failed, the reason is: %1</source> + <translation>ཉར་ཚགས་བྱེད་ཐུབ་མ་སོང་རྒྱུ་མཚན་ནི། : %1</translation> + </message> + <message> + <source>Filename too long</source> + <translation type="vanished">ཡིག་ཆའི་མིང་རིང་དྲགས་པ།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>Description: Save long file names to "</source> + <translation>གསལ་བཤད :ཡིག་ཆའི་མིང་རིང་པོའི་ཡིག་ཆ་ཉར་ཚགས་བྱེད།</translation> + </message> + <message> + <source>Copying "%1"</source> + <translation type="vanished">"བརྒྱ་ཆ་1"འདྲ་བཟོ་བྱེད་བཞིན་ཡོད།</translation> + </message> + <message> + <source>To "%1"</source> + <translation type="vanished">"བརྒྱ་ཆ་1"ལ་སླེབས་པར་བྱ་དགོས།</translation> + </message> + <message> + <source>Copying failed, the reason is: %1</source> + <translation type="vanished">འདྲ་བཟོ་བྱས་པར་ཕམ་ཉེས་བྱུང་བའི་རྒྱུ་མཚན་ནི། བརྒྱ་ཆ་1ཡིན།</translation> + </message> + <message> + <source>Moving "%1"</source> + <translation type="vanished">"བརྒྱ་ཆ་1"སྤོ་བཞིན་ཡོད།</translation> + </message> + <message> + <source>Moving failed, the reason is: %1</source> + <translation type="vanished">སྤོ་འགུལ་ཕམ་ཉེས་བྱུང་བའི་རྒྱུ་མཚན་གཤམ་གསལ།</translation> + </message> + <message> + <source>File operation error:</source> + <translation type="vanished">ཡིག་ཆ་བཀོལ་སྤྱོད་ཀྱི་ནོར་འཁྲུལ་ནི།</translation> + </message> + <message> + <source>The reason is: %1</source> + <translation type="vanished">རྒྱུ་མཚན་ནི་བརྒྱ་ཆ་1ཡོད་</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="91"/> + <source>Truncation</source> + <translation>བར་མཚམས་གཅོད་པ།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="92"/> + <source>Save to long file name directory</source> + <translation>ཡིག་ཆ་མིང་རིང་དཀར་ཆག་ཉར་ཚགས་བྱས།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="93"/> + <source>Rename</source> + <translation>མིང་བསྐྱར་བཏགས་པ།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="286"/> + <source>modify the name</source> + <translation>མིང་བཟོ་བཅོས་རྒྱག་པ།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="287"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="293"/> + <source>.</source> + <translation>.</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="288"/> + <source>Explanation: When renaming a file name, ensure it is within %1 %2 and </source> + <translation>གསལ་བཤད:སྤྱོད་མཁན་གྱིས་ཡིག་ཆའི་མིང་བསྐྱར་དུ་བཏགས་ན%1ནས་%2བར་འགན་ལེན་དགོས། </translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="126"/> + <source>All applications</source> + <translation>སྤྱོད་བྱ་ཚང་མ།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>The file name is too long. </source> + <translation>ཡིག་ཆའི་མིང་རིང་དྲག་འདུག། </translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="130"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="172"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="239"/> + <source>Cancel</source> + <translation>ཕྱིར་འཐེན།</translation> + </message> + <message> + <source>Apply</source> + <translation type="vanished">ཉེར་སྤྱོད།</translation> + </message> + <message> + <source>Save</source> + <translation type="vanished">གྲོན་ཆུང་བྱེད་དགོས།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="231"/> + <source>Front truncation</source> + <translation>མདུན་ནས་བར་མཚམས་གཅོད་པ།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="232"/> + <source>Post truncation</source> + <translation>རྗེས་ནས་བར་མཚམས་གཅོད་པ།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="131"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="173"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="240"/> + <source>OK</source> + <translation>གཏན་འཁེལ།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="69"/> + <source>File "%1"</source> + <translation>ཡིག་ཆ་"%1"</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="71"/> + <source>Please choose the following processing method:</source> + <translation>གཤམ་གྱི་ཐག་གཅོད་བྱེད་ཐབས་གདམ་རོག།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="292"/> + <source>truncate interval</source> + <translation>བར་མཚམས་བཅད་པ།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="294"/> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select </source> + <translation>གསལ་བཤད་: ཡིག་ཆའི་མིང་བཅད་པ་%1ལས་བརྒལ་འདུག།%2ཆ་ཤས་གདམ་ག་བྱེད་རོག། </translation> + </message> + <message> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select</source> + <translation type="vanished">དེའི་ཐོག་ནས་སྤྱོད་མཁན་གྱིས་ཡིག་ཆའི་མིང་བསྐྱར་དུ་བཏགས་ཏེ་བརྒྱ་ཆ་12ནང་ཚུན་དུ་འགན་ལེན་བྱ་དགོས་པ་དང་།</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>".</source> + <translation>".</translation> + </message> + <message> + <source>Description: Save the file to "%1/扩展".</source> + <translation type="vanished">གསལ་བཤད་བྱས་དོན། ཡིག་ཆ་དེ་"བརྒྱ་ཆ་1/1བར་དུ་ཉར་ཚགས་བྱེད་དགོས་"ཞེས་གསལ་བཤད་བྱས་ཡོད།</translation> + </message> +</context> +<context> + <name>KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> + <translation>ཕྱིར་ལོག</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="289"/> + <source>Go Forward</source> + <translation>མདུན་སྐྱོད།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="295"/> + <source>Cd Up</source> + <translation>གོང་མ།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="302"/> + <source>Search</source> + <translation>འཚོལ་ཞིབ།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="310"/> + <source>View Type</source> + <translation>མཐོང་རིས་རིགས།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="321"/> + <source>Sort Type</source> + <translation>གོ་རིམ་རིགས།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="326"/> + <location filename="../kyfiledialog.cpp" line="444"/> + <source>Maximize</source> + <translation>ཆེས་ཆེ་བསྒྱུར།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="340"/> + <source>Close</source> + <translation>ཁ་རྒྱག་པ།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="441"/> + <source>Restore</source> + <translation>སླར་གསོ་བྱེད་པ།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1058"/> + <source>Name</source> + <translation>ཡིག་ཆའི་མིང་།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1061"/> + <location filename="../kyfiledialog.cpp" line="1698"/> + <source>Open</source> + <translation>སྒོ་ཕྱེ་བ།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1062"/> + <location filename="../kyfiledialog.cpp" line="1071"/> + <source>Cancel</source> + <translation>ཕྱིར་འཐེན།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1066"/> + <source>Save as</source> + <translation>གཞན་དུ་ཉར་ཚགས།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1068"/> + <source>New Folder</source> + <translation>ཡིག་ཁུག་གསར་འཛུགས།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1070"/> + <location filename="../kyfiledialog.cpp" line="1702"/> + <source>Save</source> + <translation>ཉར་ཚག།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1106"/> + <location filename="../kyfiledialog.cpp" line="1107"/> + <location filename="../kyfiledialog.cpp" line="1109"/> + <source>Directories</source> + <translation>དཀར་ཆག</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>Warning</source> + <translation>ཐ་ཚིག།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <source>exist, are you sure replace?</source> + <translation>ཡོད་ཟིན། བརྗེ་དགོས་སམ།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2064"/> + <source>NewFolder</source> + <translation>དཀར་ཆག་གསར་འཛུགས།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2405"/> + <source>Undo</source> + <translation>ཕྱིར་འཐེན།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2412"/> + <source>Redo</source> + <translation>ཡང་བསྐྱར་བྱེད་པ།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>warn</source> + <translation>ཐ་ཚིག།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>This operation is not supported.</source> + <translation>བཀོལ་སྤྱོད་འདི་ལ་རྒྱབ་སྐྱོར་མི་བྱེད།</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>File save failed! </source> + <translation>ཡིག་ཆ་ཉར་ཚགས་བྱེད་ཐུབ་མ་སོང། </translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <source>Close</source> + <translation type="vanished">ཁ་རྒྱག་པ།</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation type="vanished">ལག་བསྟར་བྱེད་ཆོག་པའི་'%1'ལ་Qt %2,Qt%3རྙེད་པ་རེད།</translation> + </message> + <message> + <source>Incompatible Qt Library Error</source> + <translation type="vanished">ཕན་ཚུན་མཐུན་ཐབས་མེད་པའི་Qt དཔེ་མཛོད་ཁང་གི་ནོར་འཁྲུལ།</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <source>OK</source> + <translation type="vanished">འགྲིགས།</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <source>Show Details...</source> + <translation type="vanished">ཞིབ་ཕྲའི་གནས་ཚུལ་གསལ་བཤད་བྱ་དགོས།</translation> + </message> + <message> + <source>Hide Details...</source> + <translation type="vanished">གནས་ཚུལ་ཞིབ་ཕྲ་སྦས་སྐུང་བྱེད་</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../uikyfiledialog.cpp" line="237"/> + <source>File Name</source> + <translation>ཡིག་ཆའི་མིང་།</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="241"/> + <source>Modified Date</source> + <translation>དུས་འགྱུར་བ།</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="245"/> + <source>File Type</source> + <translation>ཡིག་ཆའི་རིགས།</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="249"/> + <source>File Size</source> + <translation>ཡིག་ཆའི་ཆེ་ཆུང་།</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="253"/> + <source>Original Path</source> + <translation>དང་ཐོག་མའི་ལམ།</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="262"/> + <source>Descending</source> + <translation>མར་འབབ་པ།</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="267"/> + <source>Ascending</source> + <translation>འཕར།</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="273"/> + <source>Use global sorting</source> + <translation>ཁྱོན་ཡོངས་་གོ་རིམ་སྒྲིག་པ།</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="293"/> + <source>List View</source> + <translation>མཐོང་རིས་རེའུ་མིག</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="294"/> + <source>Icon View</source> + <translation>མཚོན་རྟགས་ལྟ་རིས།</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <source>Default Slide</source> + <translation type="vanished">ཁ་ཆད་བཞག་པའི་སྒྲོན་བརྙན</translation> + </message> + <message> + <source>Let tab widget switch with a slide animation.</source> + <translation type="vanished">སྒྲོན་བརྙན་གྱི་འགུལ་རིས་ལ་བརྟེན་ནས་ཤོག་བྱང་ཆུང་ཆུང་བརྗེ་རེས་བྱེད་དུ་འཇུག་དགོས།</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_cs.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_cs.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_cs.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_cs.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,334 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="cs_CZ"> +<context> + <name>KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3082"/> + <source>Save File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3095"/> + <source>All Files (*)</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="47"/> + <source>Bytes</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="50"/> + <source>character</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="51"/> + <source>Character</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>Saving failed, the reason is: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="71"/> + <source>Please choose the following processing method:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="91"/> + <source>Truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="92"/> + <source>Save to long file name directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="93"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="286"/> + <source>modify the name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="294"/> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>Description: Save long file names to "</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>".</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="287"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="293"/> + <source>.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="288"/> + <source>Explanation: When renaming a file name, ensure it is within %1 %2 and </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="126"/> + <source>All applications</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="69"/> + <source>File "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>The file name is too long. </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="130"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="172"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="239"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="231"/> + <source>Front truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="232"/> + <source>Post truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="131"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="173"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="240"/> + <source>OK</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="292"/> + <source>truncate interval</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="289"/> + <source>Go Forward</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="295"/> + <source>Cd Up</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="302"/> + <source>Search</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="310"/> + <source>View Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="321"/> + <source>Sort Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="326"/> + <location filename="../kyfiledialog.cpp" line="444"/> + <source>Maximize</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="340"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="441"/> + <source>Restore</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1058"/> + <source>Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1061"/> + <location filename="../kyfiledialog.cpp" line="1698"/> + <source>Open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1062"/> + <location filename="../kyfiledialog.cpp" line="1071"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1066"/> + <source>Save as</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1068"/> + <source>New Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1070"/> + <location filename="../kyfiledialog.cpp" line="1702"/> + <source>Save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1106"/> + <location filename="../kyfiledialog.cpp" line="1107"/> + <location filename="../kyfiledialog.cpp" line="1109"/> + <source>Directories</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>Warning</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <source>exist, are you sure replace?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2064"/> + <source>NewFolder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2405"/> + <source>Undo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2412"/> + <source>Redo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>warn</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>This operation is not supported.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>File save failed! </source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../uikyfiledialog.cpp" line="237"/> + <source>File Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="241"/> + <source>Modified Date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="245"/> + <source>File Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="249"/> + <source>File Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="253"/> + <source>Original Path</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="262"/> + <source>Descending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="267"/> + <source>Ascending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="273"/> + <source>Use global sorting</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="293"/> + <source>List View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="294"/> + <source>Icon View</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_de.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_de.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_de.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_de.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="de"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>Schließen</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>Die ausführbare Datei '%1' erfordert Qt %2, Qt %3 gefunden.</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation>Fehler in der inkompatiblen Qt-Bibliothek</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>OKAY</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation>Details anzeigen...</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation>Details ausblenden...</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation>Dateiname</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation>Änderungsdatum</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation>Dateityp</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation>Dateigröße</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation>Ursprünglicher Pfad</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation>Absteigend</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation>Aufsteigend</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation>Globale Sortierung verwenden</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation>Listenansicht</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation>Icon-Ansicht</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation>Schließen</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>Standard-Folie</translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>Lassen Sie das Tab-Widget mit einer Folienanimation wechseln.</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation>Offene Linie</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation>Datei speichern</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation>Alle Dateien (*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>Zurück</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>Vorwärts gehen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>Cd nach oben</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>Suchen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>Typ der Ansicht</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>Art der Sortierung</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>Maximieren</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>Schließen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>Wiederherstellen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>Name</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>Offen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>Abbrechen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>Speichern unter</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>Neuer Ordner</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>Retten</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>Verzeichnisse</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>Warnung</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>existieren, sind Sie sicher, ersetzen?</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation>Neuer Ordner</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation>Aufmachen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation>Noch einmal machen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation>warnen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation>Dieser Vorgang wird nicht unterstützt.</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_en_US.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_en_US.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_en_US.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_en_US.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,390 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="en_US"> +<context> + <name>KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> + <translation>Open File</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3082"/> + <source>Save File</source> + <translation>Save File</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3095"/> + <source>All Files (*)</source> + <translation>All Files (*)</translation> + </message> +</context> +<context> + <name>KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> + <translation>bytes</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="47"/> + <source>Bytes</source> + <translation>Bytes</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="50"/> + <source>character</source> + <translation>character</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="51"/> + <source>Character</source> + <translation>Character</translation> + </message> + <message> + <source>Saving "%1"</source> + <translation type="vanished">Saving "%1"</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>Saving failed, the reason is: %1</source> + <translation>Saving failed, the reason is: %1</translation> + </message> + <message> + <source>Filename too long</source> + <translation type="vanished">Filename too long</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>Description: Save long file names to "</source> + <translation>Description: Save long file names to "</translation> + </message> + <message> + <source>Copying "%1"</source> + <translation type="vanished">Copying "%1"</translation> + </message> + <message> + <source>To "%1"</source> + <translation type="vanished">To "%1"</translation> + </message> + <message> + <source>Copying failed, the reason is: %1</source> + <translation type="vanished">Copying failed, the reason is: %1</translation> + </message> + <message> + <source>Moving "%1"</source> + <translation type="vanished">Moving "%1"</translation> + </message> + <message> + <source>Moving failed, the reason is: %1</source> + <translation type="vanished">Moving failed, the reason is: %1</translation> + </message> + <message> + <source>File operation error:</source> + <translation type="vanished">File operation error:</translation> + </message> + <message> + <source>The reason is: %1</source> + <translation type="vanished">The reason is: %1</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="91"/> + <source>Truncation</source> + <translation>Truncation</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="92"/> + <source>Save to long file name directory</source> + <translation>Save to long file name directory</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="93"/> + <source>Rename</source> + <translation>Rename</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="286"/> + <source>modify the name</source> + <translation>modify the name</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="287"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="293"/> + <source>.</source> + <translation>.</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="288"/> + <source>Explanation: When renaming a file name, ensure it is within %1 %2 and </source> + <translation>Explanation: When renaming a file name, ensure it is within %1 %2 and</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="126"/> + <source>All applications</source> + <translation>All applications</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>The file name is too long. </source> + <translation>The file name is too long. </translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="130"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="172"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="239"/> + <source>Cancel</source> + <translation>Cancel</translation> + </message> + <message> + <source>Save</source> + <translation type="vanished">Save</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="231"/> + <source>Front truncation</source> + <translation>Front truncation</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="232"/> + <source>Post truncation</source> + <translation>Post truncation</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="131"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="173"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="240"/> + <source>OK</source> + <translation>OK</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="69"/> + <source>File "%1"</source> + <translation>File "%1"</translation> + </message> + <message> + <source>Filename too long. </source> + <translation type="obsolete">Filename too long. </translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="71"/> + <source>Please choose the following processing method:</source> + <translation>Please choose the following processing method:</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="292"/> + <source>truncate interval</source> + <translation>truncate interval</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="294"/> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select </source> + <translation>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select </translation> + </message> + <message> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select</source> + <translation type="vanished">Explanation: Truncate the portion of the file name that exceeds %1 %2 and select</translation> + </message> + <message> + <source>Description: Save the file to "</source> + <translation type="vanished">Description: Save the file to "</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>".</source> + <translation>".</translation> + </message> + <message> + <source>Description: Save the file to "%1/扩展".</source> + <translation type="vanished">Description: Save the file to "%1/扩展".</translation> + </message> +</context> +<context> + <name>KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> + <translation>Go Back</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="289"/> + <source>Go Forward</source> + <translation>Go Forward</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="295"/> + <source>Cd Up</source> + <translation>Cd Up</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="302"/> + <source>Search</source> + <translation>Search</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="310"/> + <source>View Type</source> + <translation>View Type</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="321"/> + <source>Sort Type</source> + <translation>Sort Type</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="326"/> + <location filename="../kyfiledialog.cpp" line="444"/> + <source>Maximize</source> + <translation>Maximize</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="340"/> + <source>Close</source> + <translation>Close</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="441"/> + <source>Restore</source> + <translation>Restore</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1058"/> + <source>Name</source> + <translation>Name</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1061"/> + <location filename="../kyfiledialog.cpp" line="1698"/> + <source>Open</source> + <translation>Open</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1062"/> + <location filename="../kyfiledialog.cpp" line="1071"/> + <source>Cancel</source> + <translation>Cancel</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1066"/> + <source>Save as</source> + <translation>Save as</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1068"/> + <source>New Folder</source> + <translation>New Folder</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1070"/> + <location filename="../kyfiledialog.cpp" line="1702"/> + <source>Save</source> + <translation>Save</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1106"/> + <location filename="../kyfiledialog.cpp" line="1107"/> + <location filename="../kyfiledialog.cpp" line="1109"/> + <source>Directories</source> + <translation>Directories</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>Warning</source> + <translation>Warning</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <source>exist, are you sure replace?</source> + <translation>exist, are you sure replace?</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2064"/> + <source>NewFolder</source> + <translation>NewFolder</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2405"/> + <source>Undo</source> + <translation>Undo</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2412"/> + <source>Redo</source> + <translation>Redo</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>warn</source> + <translation>warn</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>This operation is not supported.</source> + <translation>This operation is not supported.</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>File save failed! </source> + <translation>File save failed! </translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../uikyfiledialog.cpp" line="237"/> + <source>File Name</source> + <translation>File Name</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="241"/> + <source>Modified Date</source> + <translation>Modified Date</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="245"/> + <source>File Type</source> + <translation>File Type</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="249"/> + <source>File Size</source> + <translation>File Size</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="253"/> + <source>Original Path</source> + <translation>Original Path</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="262"/> + <source>Descending</source> + <translation>Descending</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="267"/> + <source>Ascending</source> + <translation>Ascending</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="273"/> + <source>Use global sorting</source> + <translation>Use global sorting</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="293"/> + <source>List View</source> + <translation>List View</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="294"/> + <source>Icon View</source> + <translation>Icon View</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_es.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_es.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_es.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_es.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="es"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/uikyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fa.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fa.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fa.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fa.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,334 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="fa_IR"> +<context> + <name>KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3082"/> + <source>Save File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3095"/> + <source>All Files (*)</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="47"/> + <source>Bytes</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="50"/> + <source>character</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="51"/> + <source>Character</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>Saving failed, the reason is: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="71"/> + <source>Please choose the following processing method:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="91"/> + <source>Truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="92"/> + <source>Save to long file name directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="93"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="286"/> + <source>modify the name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="294"/> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>Description: Save long file names to "</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>".</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="287"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="293"/> + <source>.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="288"/> + <source>Explanation: When renaming a file name, ensure it is within %1 %2 and </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="126"/> + <source>All applications</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="69"/> + <source>File "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>The file name is too long. </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="130"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="172"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="239"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="231"/> + <source>Front truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="232"/> + <source>Post truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="131"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="173"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="240"/> + <source>OK</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="292"/> + <source>truncate interval</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="289"/> + <source>Go Forward</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="295"/> + <source>Cd Up</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="302"/> + <source>Search</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="310"/> + <source>View Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="321"/> + <source>Sort Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="326"/> + <location filename="../kyfiledialog.cpp" line="444"/> + <source>Maximize</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="340"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="441"/> + <source>Restore</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1058"/> + <source>Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1061"/> + <location filename="../kyfiledialog.cpp" line="1698"/> + <source>Open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1062"/> + <location filename="../kyfiledialog.cpp" line="1071"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1066"/> + <source>Save as</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1068"/> + <source>New Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1070"/> + <location filename="../kyfiledialog.cpp" line="1702"/> + <source>Save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1106"/> + <location filename="../kyfiledialog.cpp" line="1107"/> + <location filename="../kyfiledialog.cpp" line="1109"/> + <source>Directories</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>Warning</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <source>exist, are you sure replace?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2064"/> + <source>NewFolder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2405"/> + <source>Undo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2412"/> + <source>Redo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>warn</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>This operation is not supported.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>File save failed! </source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../uikyfiledialog.cpp" line="237"/> + <source>File Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="241"/> + <source>Modified Date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="245"/> + <source>File Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="249"/> + <source>File Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="253"/> + <source>Original Path</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="262"/> + <source>Descending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="267"/> + <source>Ascending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="273"/> + <source>Use global sorting</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="293"/> + <source>List View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="294"/> + <source>Icon View</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fr.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fr.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fr.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_fr.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,334 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="fr_FR"> +<context> + <name>KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3082"/> + <source>Save File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3095"/> + <source>All Files (*)</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="47"/> + <source>Bytes</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="50"/> + <source>character</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="51"/> + <source>Character</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>Saving failed, the reason is: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="71"/> + <source>Please choose the following processing method:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="91"/> + <source>Truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="92"/> + <source>Save to long file name directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="93"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="286"/> + <source>modify the name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="294"/> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>Description: Save long file names to "</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>".</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="287"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="293"/> + <source>.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="288"/> + <source>Explanation: When renaming a file name, ensure it is within %1 %2 and </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="126"/> + <source>All applications</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="69"/> + <source>File "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>The file name is too long. </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="130"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="172"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="239"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="231"/> + <source>Front truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="232"/> + <source>Post truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="131"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="173"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="240"/> + <source>OK</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="292"/> + <source>truncate interval</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="289"/> + <source>Go Forward</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="295"/> + <source>Cd Up</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="302"/> + <source>Search</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="310"/> + <source>View Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="321"/> + <source>Sort Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="326"/> + <location filename="../kyfiledialog.cpp" line="444"/> + <source>Maximize</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="340"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="441"/> + <source>Restore</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1058"/> + <source>Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1061"/> + <location filename="../kyfiledialog.cpp" line="1698"/> + <source>Open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1062"/> + <location filename="../kyfiledialog.cpp" line="1071"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1066"/> + <source>Save as</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1068"/> + <source>New Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1070"/> + <location filename="../kyfiledialog.cpp" line="1702"/> + <source>Save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1106"/> + <location filename="../kyfiledialog.cpp" line="1107"/> + <location filename="../kyfiledialog.cpp" line="1109"/> + <source>Directories</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>Warning</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <source>exist, are you sure replace?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2064"/> + <source>NewFolder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2405"/> + <source>Undo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2412"/> + <source>Redo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>warn</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>This operation is not supported.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>File save failed! </source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../uikyfiledialog.cpp" line="237"/> + <source>File Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="241"/> + <source>Modified Date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="245"/> + <source>File Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="249"/> + <source>File Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="253"/> + <source>Original Path</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="262"/> + <source>Descending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="267"/> + <source>Ascending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="273"/> + <source>Use global sorting</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="293"/> + <source>List View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="294"/> + <source>Icon View</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_kk.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,493 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="kk_KZ"> +<context> + <name>KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3082"/> + <source>Save File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3095"/> + <source>All Files (*)</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="47"/> + <source>Bytes</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="50"/> + <source>character</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="51"/> + <source>Character</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>Saving failed, the reason is: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="71"/> + <source>Please choose the following processing method:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="91"/> + <source>Truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="92"/> + <source>Save to long file name directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="93"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="286"/> + <source>modify the name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="294"/> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>Description: Save long file names to "</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>".</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="287"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="293"/> + <source>.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="288"/> + <source>Explanation: When renaming a file name, ensure it is within %1 %2 and </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="126"/> + <source>All applications</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="69"/> + <source>File "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>The file name is too long. </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="130"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="172"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="239"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="231"/> + <source>Front truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="232"/> + <source>Post truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="131"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="173"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="240"/> + <source>OK</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="292"/> + <source>truncate interval</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="289"/> + <source>Go Forward</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="295"/> + <source>Cd Up</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="302"/> + <source>Search</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="310"/> + <source>View Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="321"/> + <source>Sort Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="326"/> + <location filename="../kyfiledialog.cpp" line="444"/> + <source>Maximize</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="340"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="441"/> + <source>Restore</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1058"/> + <source>Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1061"/> + <location filename="../kyfiledialog.cpp" line="1698"/> + <source>Open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1062"/> + <location filename="../kyfiledialog.cpp" line="1071"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1066"/> + <source>Save as</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1068"/> + <source>New Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1070"/> + <location filename="../kyfiledialog.cpp" line="1702"/> + <source>Save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1106"/> + <location filename="../kyfiledialog.cpp" line="1107"/> + <location filename="../kyfiledialog.cpp" line="1109"/> + <source>Directories</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>Warning</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <source>exist, are you sure replace?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2064"/> + <source>NewFolder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2405"/> + <source>Undo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2412"/> + <source>Redo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>warn</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>This operation is not supported.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>File save failed! </source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../uikyfiledialog.cpp" line="237"/> + <source>File Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="241"/> + <source>Modified Date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="245"/> + <source>File Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="249"/> + <source>File Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="253"/> + <source>Original Path</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="262"/> + <source>Descending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="267"/> + <source>Ascending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="273"/> + <source>Use global sorting</source> + <translation>ئومومىيلىق مەنەن تىزۋدى ٸستەتۋ</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="293"/> + <source>List View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="294"/> + <source>Icon View</source> + <translation>پىشىن كورىنۋى</translation> + </message> + <message> + <source>Close</source> + <translation type="vanished">关闭</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>الدىن بەكٸتٸلگەن slide</translation> + </message> + <message> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>تالدانبا كارتونىن كشكەنە زاپشاستارىن پٸروبيكسيا كارتون فىلىمىگە سايكەستىرۋ</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="2715"/> + <source>Open File</source> + <translation>حۇجاتتى ٸشٸۋ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2716"/> + <source>Save File</source> + <translation>حۇجاتتى ساقتاۋ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2729"/> + <source>All Files (*)</source> + <translation>بارلٸق حۇجاتتار (*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>قايتۋ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>ىلگەرلەۋ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>Cd نىڭ ٷستٸندە</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>ٸزدەۋ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>كورىنۋ تيپى</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>رەتتەلگەن تيپ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="265"/> + <location filename="../kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>ۇلكەيتۋ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>تاقاۋ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>قالپىنا كەلتىرىلگەن</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>ات-فاميليا</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="990"/> + <location filename="../kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>ٸشٸۋ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="991"/> + <location filename="../kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>كۇشىنەن قالدىرۋ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>تەجەۋ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>جاڭا حۇجات قىسقىش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="999"/> + <location filename="../kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>ساقتاۋ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1035"/> + <location filename="../kyfiledialog.cpp" line="1036"/> + <location filename="../kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>مازمۇندار</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>ەسكەرتۋ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>ساقتالعان، الماستٸرۋدٸ تۇراقتاستىراسىزبا؟</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation>جاڭا قاتتاعىش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation>Undo</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation>قاتە-قاتە</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation>ەسكەرتۋ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation>نۇ جوبالاۋدى قولدامايدى.</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ky.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,493 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ky_KG"> +<context> + <name>KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3082"/> + <source>Save File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3095"/> + <source>All Files (*)</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="47"/> + <source>Bytes</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="50"/> + <source>character</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="51"/> + <source>Character</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>Saving failed, the reason is: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="71"/> + <source>Please choose the following processing method:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="91"/> + <source>Truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="92"/> + <source>Save to long file name directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="93"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="286"/> + <source>modify the name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="294"/> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>Description: Save long file names to "</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>".</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="287"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="293"/> + <source>.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="288"/> + <source>Explanation: When renaming a file name, ensure it is within %1 %2 and </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="126"/> + <source>All applications</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="69"/> + <source>File "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>The file name is too long. </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="130"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="172"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="239"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="231"/> + <source>Front truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="232"/> + <source>Post truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="131"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="173"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="240"/> + <source>OK</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="292"/> + <source>truncate interval</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="289"/> + <source>Go Forward</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="295"/> + <source>Cd Up</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="302"/> + <source>Search</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="310"/> + <source>View Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="321"/> + <source>Sort Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="326"/> + <location filename="../kyfiledialog.cpp" line="444"/> + <source>Maximize</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="340"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="441"/> + <source>Restore</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1058"/> + <source>Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1061"/> + <location filename="../kyfiledialog.cpp" line="1698"/> + <source>Open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1062"/> + <location filename="../kyfiledialog.cpp" line="1071"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1066"/> + <source>Save as</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1068"/> + <source>New Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1070"/> + <location filename="../kyfiledialog.cpp" line="1702"/> + <source>Save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1106"/> + <location filename="../kyfiledialog.cpp" line="1107"/> + <location filename="../kyfiledialog.cpp" line="1109"/> + <source>Directories</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>Warning</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <source>exist, are you sure replace?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2064"/> + <source>NewFolder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2405"/> + <source>Undo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2412"/> + <source>Redo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>warn</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>This operation is not supported.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>File save failed! </source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../uikyfiledialog.cpp" line="237"/> + <source>File Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="241"/> + <source>Modified Date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="245"/> + <source>File Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="249"/> + <source>File Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="253"/> + <source>Original Path</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="262"/> + <source>Descending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="267"/> + <source>Ascending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="273"/> + <source>Use global sorting</source> + <translation>ئومومىيلىق مەنەن تىزۉۉنۉ ىشتەتىش</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="293"/> + <source>List View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="294"/> + <source>Icon View</source> + <translation>تۉر گۅرۉنۉشۉ</translation> + </message> + <message> + <source>Close</source> + <translation type="vanished">关闭</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>الدىن بەكىتىلگەن slide</translation> + </message> + <message> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>تاندالما كارتاداقى كىچىك شايمانداردى پرويەكسىيە كارتون فىلىمىگە الماشتىرۇۇ</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="2715"/> + <source>Open File</source> + <translation>ۅجۅتۉن اچۇۇ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2716"/> + <source>Save File</source> + <translation>ۅجۅتۉن ساقتوو</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2729"/> + <source>All Files (*)</source> + <translation>باردىق ۅجۅتتۅر (*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>قايتۇۇ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>ىلگەرلۅۅ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>Cd نىڭ ۉستۉندۆ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>ىزدۅۅ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>كۅرۉنۉش تۉرۉ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>ىرەتتەلگەن تىپ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="265"/> + <location filename="../kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>چوڭويتۇش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>بەكىتىش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>العاچىنا كەلتىرۉۉ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>ات-تەك اتى</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="990"/> + <location filename="../kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>اچۇۇ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="991"/> + <location filename="../kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>ارعادان قالتىرىش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>تەجۅۅ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>جاڭى ۅجۅت قىپچىعىچ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="999"/> + <location filename="../kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>ساقتوو</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1035"/> + <location filename="../kyfiledialog.cpp" line="1036"/> + <location filename="../kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>مازمۇۇندار</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>ەسكەرتۉۉ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>باربولۇۇسۇ ، الماشتىرۇۇنۇ تۇراقتاندىرا الاسىزبى؟</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation>جاڭى قاتتاعىچ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation>Undo</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation>قايرا-قايرا</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation>ەسكەرتۉۉ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation>بۇل ماشقۇلدانۇۇنۇ قولدوبويت.</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_mn.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_mn.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_mn.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_mn.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,400 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="mn_MN"> +<context> + <name>KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> + <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3082"/> + <source>Save File</source> + <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3095"/> + <source>All Files (*)</source> + <translation>ᠪᠦᠬᠦᠢᠯᠡ (*)</translation> + </message> +</context> +<context> + <name>KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> + <translation>ᠪᠸᠲ᠋ᠠ</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="47"/> + <source>Bytes</source> + <translation>ᠪᠸᠲ᠋ᠠ</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="50"/> + <source>character</source> + <translation>ᠦᠰᠦᠭ ᠦᠨ ᠲᠡᠮᠲᠡᠭ ᠃</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="51"/> + <source>Character</source> + <translation>ᠦᠰᠦᠭ ᠦᠨ ᠲᠡᠮᠲᠡᠭ ᠃</translation> + </message> + <message> + <source>Saving "%1"</source> + <translation type="vanished">ᠬᠠᠳᠠᠭᠠᠯᠠᠵᠤ ᠪᠠᠢᠨᠠ "%1"</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>Saving failed, the reason is: %1</source> + <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ ᠳᠤ ᠢᠯᠠᠭᠳᠠᠯ ᠢ ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ ᠶᠢᠨ ᠰᠢᠯᠲᠠᠭᠠᠨ ᠨᠢ ᠄%1</translation> + </message> + <message> + <source>Filename too long</source> + <translation type="vanished">ᠪᠢᠴᠢᠭ᠌ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ ᠤᠨ ᠨᠡᠷᠡ ᠬᠡᠲᠦᠷᠬᠡᠢ ᠤᠷ</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>Description: Save long file names to "</source> + <translation>ᠳᠦᠷᠰᠦᠯᠡᠭᠰᠡᠨ ᠨᠢ ᠤᠷᠲᠤ ᠪᠢᠴᠢᠭ ᠮᠠᠲ᠋ᠸᠷᠢᠶᠠᠯ ᠤᠨ ᠨᠡᠷᠡ ᠶᠢ ᠬᠠᠲᠠᠭᠠᠯᠠᠶᠠ ᠭᠡᠵᠡᠢ</translation> + </message> + <message> + <source>Copying "%1"</source> + <translation type="vanished">%1"ᠶ᠋ᠢ ᠺᠤᠫᠢᠳᠠᠵᠤ ᠪᠣᠢ</translation> + </message> + <message> + <source>To "%1"</source> + <translation type="vanished">"%1" ᠪᠣᠯᠬᠤ ᠳᠤ ᠬᠦᠷᠲᠡᠯᠡ</translation> + </message> + <message> + <source>Copying failed, the reason is: %1</source> + <translation type="vanished">ᠪᠠᠭᠤᠯᠭᠠᠬᠤ ᠳᠤ ᠢᠯᠠᠭᠳᠠᠯ ᠳᠤ ᠢᠯᠠᠭᠳᠠᠭᠰᠠᠨ ᠰᠢᠯᠲᠠᠭᠠᠨ᠄ 1᠃</translation> + </message> + <message> + <source>Moving "%1"</source> + <translation type="vanished">ᠶᠢᠡᠨ %1"ᠶ᠋ᠢ ᠰᠢᠯᠵᠢᠭᠦᠯᠵᠦ ᠪᠣᠢ</translation> + </message> + <message> + <source>Moving failed, the reason is: %1</source> + <translation type="vanished">ᠰᠢᠯᠵᠢᠮᠡᠯ ᠢᠯᠠᠭᠳᠠᠭᠰᠠᠨ ᠤ ᠰᠢᠯᠲᠠᠭᠠᠨ ᠄ 1 ᠃</translation> + </message> + <message> + <source>File operation error:</source> + <translation type="vanished">ᠪᠢᠴᠢᠭ᠌ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ ᠤᠨ ᠠᠵᠢᠯᠯᠠᠭᠤᠯᠬᠤ ᠪᠤᠷᠤᠭᠤ</translation> + </message> + <message> + <source>The reason is: %1</source> + <translation type="vanished">ᠰᠢᠯᠲᠠᠭᠠᠨ ᠄ 1 ᠃</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="91"/> + <source>Truncation</source> + <translation>ᠲᠠᠰᠤᠯᠤᠨᠠ ᠃</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="92"/> + <source>Save to long file name directory</source> + <translation>ᠤᠷᠲᠤ ᠪᠢᠴᠢᠭ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ ᠤᠨ ᠨᠡᠷᠡᠰ ᠦᠨ ᠭᠠᠷᠴᠠᠭ ᠲᠤ ᠬᠠᠳᠠᠭᠠᠯᠠᠨᠠ ᠃</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="93"/> + <source>Rename</source> + <translation>ᠬᠦᠨᠳᠦ ᠨᠡᠷᠡᠶᠢᠳᠦᠨᠡ ᠃</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="286"/> + <source>modify the name</source> + <translation>ᠨᠡᠷᠡᠶᠢᠳᠬᠦ ᠶᠢ ᠵᠠᠰᠠᠨᠠ ᠃</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="287"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="293"/> + <source>.</source> + <translation>.</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="288"/> + <source>Explanation: When renaming a file name, ensure it is within %1 %2 and </source> + <translation>ᠲᠠᠶᠢᠯᠪᠤᠷᠢᠯᠠᠯᠲᠠ ᠄ ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ ᠨᠡᠷᠡᠶᠢᠳᠦᠭᠰᠡᠨ ᠪᠢᠴᠢᠭ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ ᠤᠨ ᠨᠡᠷᠡ ᠶᠢ ᠬᠦᠨᠳᠦᠷᠡᠭᠦᠯᠵᠦ ᠂ %1%2 ᠶᠢᠨ ᠳᠣᠲᠣᠷᠠ ᠂ ᠣᠴᠢᠬᠤ ᠶᠢ ᠪᠠᠲᠤᠯᠠᠨᠠ ᠃ </translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="126"/> + <source>All applications</source> + <translation>ᠪᠦᠬᠦᠨ ᠢ ᠬᠡᠷᠡᠭᠯᠡᠨᠡ᠃</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>The file name is too long. </source> + <translation>ᠪᠢᠴᠢᠭ᠌ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ ᠤᠨ ᠨᠡᠷᠡ ᠬᠡᠲᠦᠷᠬᠡᠢ ᠤᠷ </translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="130"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="172"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="239"/> + <source>Cancel</source> + <translation>ᠦᠬᠡᠢᠰᠭᠡᠬᠦ᠌</translation> + </message> + <message> + <source>Apply</source> + <translation type="vanished">ᠬᠡᠷᠡᠭᠯᠡᠨᠡ᠃</translation> + </message> + <message> + <source>Save</source> + <translation type="vanished">ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="231"/> + <source>Front truncation</source> + <translation>ᠡᠮᠦᠨᠡ ᠲᠠᠰᠤᠯᠤᠨᠠ ᠃</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="232"/> + <source>Post truncation</source> + <translation>ᠬᠣᠢ᠌ᠨᠠ ᠠᠴᠠ ᠲᠠᠰᠤᠷᠠᠪᠠ ᠃</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="131"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="173"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="240"/> + <source>OK</source> + <translation>ᠪᠠᠰᠠ ᠪᠣᠯᠣᠨᠠ ᠃</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="69"/> + <source>File "%1"</source> + <translation>ᠪᠢᠴᠢᠭ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ %1</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="71"/> + <source>Please choose the following processing method:</source> + <translation>ᠳᠣᠣᠷᠠᠬᠢ ᠮᠡᠲᠦ ᠰᠢᠢᠳᠪᠦᠷᠢᠯᠡᠬᠦ ᠠᠷᠭᠠ ᠶᠢ ᠰᠣᠩᠭᠣᠭᠠᠷᠠᠢ᠄</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="292"/> + <source>truncate interval</source> + <translation>ᠣᠷᠣᠨ ᠵᠠᠢ ᠶᠢ ᠲᠠᠰᠤᠯᠤᠨᠠ ᠃</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="294"/> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select </source> + <translation>ᠲᠠᠶᠢᠯᠪᠤᠷᠢᠯᠠᠯᠲᠠ ᠄ ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ ᠨᠡᠷᠡᠶᠢᠳᠦᠭᠰᠡᠨ ᠪᠢᠴᠢᠭ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ ᠤᠨ ᠨᠡᠷᠡ ᠶᠢ ᠬᠦᠨᠳᠦᠷᠡᠭᠦᠯᠵᠦ ᠂%1 %2 ᠶᠢᠨ ᠳᠣᠲᠣᠷᠠ ᠂ ᠣᠴᠢᠬᠤ ᠶᠢ ᠪᠠᠲᠤᠯᠠᠨᠠ ᠃ </translation> + </message> + <message> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select</source> + <translation type="vanished">ᠲᠠᠶᠢᠯᠪᠤᠷᠢᠯᠠᠯᠲᠠ ᠄ ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ ᠨᠡᠷᠡᠶᠢᠳᠦᠭᠰᠡᠨ ᠪᠢᠴᠢᠭ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ ᠤᠨ ᠨᠡᠷᠡ ᠶᠢ ᠬᠦᠨᠳᠦᠷᠡᠭᠦᠯᠵᠦ ᠂ 1% 2 ᠶᠢᠨ ᠳᠣᠲᠣᠷᠠ ᠂ ᠣᠴᠢᠬᠤ ᠶᠢ ᠪᠠᠲᠤᠯᠠᠨᠠ ᠃</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>".</source> + <translation>".</translation> + </message> + <message> + <source>Description: Save the file to "%1/扩展".</source> + <translation type="vanished">ᠲᠠᠶᠢᠯᠪᠤᠷᠢᠯᠠᠯᠲᠠ ᠄ ᠪᠢᠴᠢᠭ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ ᠢ 《 1/ᠥᠷᠭᠡᠳᠬᠡᠬᠦ 》 ᠪᠣᠯᠭᠠᠨ ᠬᠠᠳᠠᠭᠠᠯᠠᠨᠠ ᠃</translation> + </message> +</context> +<context> + <name>KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> + <translation>ᠤᠬᠤᠷᠢᠬᠤ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="289"/> + <source>Go Forward</source> + <translation>ᠤᠷᠤᠭᠰᠢᠯᠠᠬᠤ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="295"/> + <source>Cd Up</source> + <translation>ᠳᠡᠭᠡᠭᠰᠢ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="302"/> + <source>Search</source> + <translation>ᠬᠠᠢᠯᠳᠠ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="310"/> + <source>View Type</source> + <translation>ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="321"/> + <source>Sort Type</source> + <translation>ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="326"/> + <location filename="../kyfiledialog.cpp" line="444"/> + <source>Maximize</source> + <translation>ᠬᠠᠮᠤᠭ ᠤ᠋ᠨ ᠶᠡᠬᠡᠴᠢᠯᠡᠯ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="340"/> + <source>Close</source> + <translation>ᠬᠠᠭᠠᠬᠤ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="441"/> + <source>Restore</source> + <translation>ᠡᠬᠡᠬᠦᠯᠬᠦ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1058"/> + <source>Name</source> + <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1061"/> + <location filename="../kyfiledialog.cpp" line="1698"/> + <source>Open</source> + <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1062"/> + <location filename="../kyfiledialog.cpp" line="1071"/> + <source>Cancel</source> + <translation>ᠦᠬᠡᠢᠰᠭᠡᠬᠦ᠌</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1066"/> + <source>Save as</source> + <translation>ᠦᠭᠡᠷᠡ ᠭᠠᠵᠠᠷ ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1068"/> + <source>New Folder</source> + <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1070"/> + <location filename="../kyfiledialog.cpp" line="1702"/> + <source>Save</source> + <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1106"/> + <location filename="../kyfiledialog.cpp" line="1107"/> + <location filename="../kyfiledialog.cpp" line="1109"/> + <source>Directories</source> + <translation>ᠭᠠᠷᠴᠠᠭ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>Warning</source> + <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠦᠯ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <source>exist, are you sure replace?</source> + <translation>ᠪᠠᠢᠨᠠ᠂ ᠰᠤᠯᠢᠬᠤ ᠤᠤ?</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2064"/> + <source>NewFolder</source> + <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2405"/> + <source>Undo</source> + <translation>ᠬᠦᠴᠦᠨ ᠦᠬᠡᠢ ᠪᠤᠯᠭᠠᠬᠤ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2412"/> + <source>Redo</source> + <translation>ᠳᠠᠬᠢᠵᠤ ᠬᠢᠬᠦ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>warn</source> + <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠬᠦ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>This operation is not supported.</source> + <translation>ᠳᠤᠰ ᠠᠵᠢᠯᠯᠠᠬᠤᠢ ᠵᠢ ᠳᠡᠮᠵᠢᠬᠦ ᠦᠬᠡᠢ.</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>File save failed! </source> + <translation>ᠪᠢᠴᠢᠭ᠌ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ ᠢ ᠬᠠᠳᠠᠭᠠᠯᠠᠵᠤ ᠢᠯᠠᠭᠳᠠᠵᠠᠢ ! </translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation type="vanished">ᠭᠦᠢᠴᠡᠳᠬᠡᠵᠦ ᠪᠣᠯᠬᠤ ᠹᠠᠢᠯ '%1' Qt% 2 ᠬᠡᠷᠡᠭᠰᠡᠵᠦ ᠂ Qt% 3 ᠢ᠋/ ᠵᠢ ᠡᠷᠢᠵᠦ ᠣᠯᠬᠤ ᠬᠡᠷᠡᠭᠲᠡᠶ .</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <source>OK</source> + <translation type="vanished">OK</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../uikyfiledialog.cpp" line="237"/> + <source>File Name</source> + <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡᠢᠳᠦᠯ</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="241"/> + <source>Modified Date</source> + <translation>ᠵᠠᠰᠠᠭᠰᠠᠨ ᠡᠳᠦᠷ ᠰᠠᠷᠠ</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="245"/> + <source>File Type</source> + <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="249"/> + <source>File Size</source> + <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠶᠡᠬᠡ ᠪᠠᠭᠠ</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="253"/> + <source>Original Path</source> + <translation>ᠤᠭ ᠤ᠋ᠨ ᠵᠠᠮ ᠱᠤᠭᠤᠮ</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="262"/> + <source>Descending</source> + <translation>ᠪᠠᠭᠠᠰᠬᠠᠬᠤ</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="267"/> + <source>Ascending</source> + <translation>ᠶᠡᠬᠡᠰᠬᠡᠬᠦ</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="273"/> + <source>Use global sorting</source> + <translation>ᠪᠦᠬᠦ ᠪᠠᠢᠳᠠᠯ ᠤ᠋ᠨ ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠢ᠋ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="293"/> + <source>List View</source> + <translation>ᠵᠢᠭᠰᠠᠭᠠᠯᠳᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="294"/> + <source>Icon View</source> + <translation>ᠰᠢᠪᠠᠭᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_tr.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_tr.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_tr.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_tr.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,334 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="tr_TR"> +<context> + <name>KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3082"/> + <source>Save File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3095"/> + <source>All Files (*)</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="47"/> + <source>Bytes</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="50"/> + <source>character</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="51"/> + <source>Character</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>Saving failed, the reason is: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="71"/> + <source>Please choose the following processing method:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="91"/> + <source>Truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="92"/> + <source>Save to long file name directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="93"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="286"/> + <source>modify the name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="294"/> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>Description: Save long file names to "</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>".</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="287"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="293"/> + <source>.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="288"/> + <source>Explanation: When renaming a file name, ensure it is within %1 %2 and </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="126"/> + <source>All applications</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="69"/> + <source>File "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>The file name is too long. </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="130"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="172"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="239"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="231"/> + <source>Front truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="232"/> + <source>Post truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="131"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="173"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="240"/> + <source>OK</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="292"/> + <source>truncate interval</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="289"/> + <source>Go Forward</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="295"/> + <source>Cd Up</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="302"/> + <source>Search</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="310"/> + <source>View Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="321"/> + <source>Sort Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="326"/> + <location filename="../kyfiledialog.cpp" line="444"/> + <source>Maximize</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="340"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="441"/> + <source>Restore</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1058"/> + <source>Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1061"/> + <location filename="../kyfiledialog.cpp" line="1698"/> + <source>Open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1062"/> + <location filename="../kyfiledialog.cpp" line="1071"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1066"/> + <source>Save as</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1068"/> + <source>New Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1070"/> + <location filename="../kyfiledialog.cpp" line="1702"/> + <source>Save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1106"/> + <location filename="../kyfiledialog.cpp" line="1107"/> + <location filename="../kyfiledialog.cpp" line="1109"/> + <source>Directories</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>Warning</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <source>exist, are you sure replace?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2064"/> + <source>NewFolder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2405"/> + <source>Undo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2412"/> + <source>Redo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>warn</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>This operation is not supported.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>File save failed! </source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../uikyfiledialog.cpp" line="237"/> + <source>File Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="241"/> + <source>Modified Date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="245"/> + <source>File Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="249"/> + <source>File Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="253"/> + <source>Original Path</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="262"/> + <source>Descending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="267"/> + <source>Ascending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="273"/> + <source>Use global sorting</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="293"/> + <source>List View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="294"/> + <source>Icon View</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_ug.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,493 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ug_CN"> +<context> + <name>KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3082"/> + <source>Save File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3095"/> + <source>All Files (*)</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="47"/> + <source>Bytes</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="50"/> + <source>character</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="51"/> + <source>Character</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>Saving failed, the reason is: %1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="71"/> + <source>Please choose the following processing method:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="91"/> + <source>Truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="92"/> + <source>Save to long file name directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="93"/> + <source>Rename</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="286"/> + <source>modify the name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="294"/> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>Description: Save long file names to "</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>".</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="287"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="293"/> + <source>.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="288"/> + <source>Explanation: When renaming a file name, ensure it is within %1 %2 and </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="126"/> + <source>All applications</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="69"/> + <source>File "%1"</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>The file name is too long. </source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="130"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="172"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="239"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="231"/> + <source>Front truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="232"/> + <source>Post truncation</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="131"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="173"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="240"/> + <source>OK</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="292"/> + <source>truncate interval</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="289"/> + <source>Go Forward</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="295"/> + <source>Cd Up</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="302"/> + <source>Search</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="310"/> + <source>View Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="321"/> + <source>Sort Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="326"/> + <location filename="../kyfiledialog.cpp" line="444"/> + <source>Maximize</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="340"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="441"/> + <source>Restore</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1058"/> + <source>Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1061"/> + <location filename="../kyfiledialog.cpp" line="1698"/> + <source>Open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1062"/> + <location filename="../kyfiledialog.cpp" line="1071"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1066"/> + <source>Save as</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1068"/> + <source>New Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1070"/> + <location filename="../kyfiledialog.cpp" line="1702"/> + <source>Save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1106"/> + <location filename="../kyfiledialog.cpp" line="1107"/> + <location filename="../kyfiledialog.cpp" line="1109"/> + <source>Directories</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>Warning</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <source>exist, are you sure replace?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2064"/> + <source>NewFolder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2405"/> + <source>Undo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2412"/> + <source>Redo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>warn</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>This operation is not supported.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>File save failed! </source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../uikyfiledialog.cpp" line="237"/> + <source>File Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="241"/> + <source>Modified Date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="245"/> + <source>File Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="249"/> + <source>File Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="253"/> + <source>Original Path</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="262"/> + <source>Descending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="267"/> + <source>Ascending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="273"/> + <source>Use global sorting</source> + <translation>ئومومىيلىق بىلەن تىزىشنى ئىشلىتىش</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="293"/> + <source>List View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="294"/> + <source>Icon View</source> + <translation>شەكىل كۆرۈنۈشى</translation> + </message> + <message> + <source>Close</source> + <translation type="vanished">关闭</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>ئالدىن بىكىتىلگەن slide</translation> + </message> + <message> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>تاللانما كارتىدىكى كىچىك زاپچاسلارنى پرويېكسىيە كارتون فىلىمىگە ئالماشتۇرۇش</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="2715"/> + <source>Open File</source> + <translation>ھۆججەتنى ئېچىش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2716"/> + <source>Save File</source> + <translation>ھۆججەتنى ساقلاش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2729"/> + <source>All Files (*)</source> + <translation>بارلىق ھۆججەتلەر (*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>قايت</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>ئالدىغا ماڭ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>Cd نىڭ ئۈستىدە</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>ئىزدە</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>كۆرۈنۈش تىپى</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>رەتلەنگەن تىپ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="265"/> + <location filename="../kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>چوڭايتىش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>تاقاش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>ئەسلىگە كەلتۈرۈش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>ئىسىم-فامىلىسى</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="990"/> + <location filename="../kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>ئېچىش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="991"/> + <location filename="../kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>ئەمەلدىن قالدۇرۇش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>تېجەش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>يېڭى ھۆججەت قىسقۇچ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="999"/> + <location filename="../kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>ساقلاش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1035"/> + <location filename="../kyfiledialog.cpp" line="1036"/> + <location filename="../kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>مۇندەرىجىلەر</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>ئاگاھلاندۇرۇش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>مەۋجۇت، ئالماشتۇرۇشنى جەزىملەشتۈرەلەمسىز؟</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation>يېڭى قاتلىغۇچ</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation>Undo</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation>قايتا-قايتا</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation>ئاگاھلاندۇرۇش</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation>بۇ مەشغۇلاتنى قوللىمايدۇ.</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_CN.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_CN.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_CN.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_CN.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,409 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="zh_CN"> +<context> + <name>KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> + <translation>打开</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3082"/> + <source>Save File</source> + <translation>保存</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3095"/> + <source>All Files (*)</source> + <translation>所有(*)</translation> + </message> +</context> +<context> + <name>KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> + <translation>字节</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="47"/> + <source>Bytes</source> + <translation>字节</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="50"/> + <source>character</source> + <translation>字符</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="51"/> + <source>Character</source> + <translation>字符</translation> + </message> + <message> + <source>Saving "%1"</source> + <translation type="vanished">正在保存 “%1”</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>Saving failed, the reason is: %1</source> + <translation>保存失败, 原因: %1</translation> + </message> + <message> + <source>Filename too long</source> + <translation type="vanished">文件名过长</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>Description: Save long file names to "</source> + <translation>说明:将长文件名文件保存至“</translation> + </message> + <message> + <source>Copying "%1"</source> + <translation type="vanished">正在复制 "%1"</translation> + </message> + <message> + <source>To "%1"</source> + <translation type="vanished">到 "%1"</translation> + </message> + <message> + <source>Copying failed, the reason is: %1</source> + <translation type="vanished">复制失败, 原因: %1</translation> + </message> + <message> + <source>Moving "%1"</source> + <translation type="vanished">正在移动 "%1"</translation> + </message> + <message> + <source>Moving failed, the reason is: %1</source> + <translation type="vanished">移动失败, 原因: %1</translation> + </message> + <message> + <source>File operation error:</source> + <translation type="vanished">文件操作错误:</translation> + </message> + <message> + <source>The reason is: %1</source> + <translation type="vanished">原因: %1</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="91"/> + <source>Truncation</source> + <translation>截断</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="92"/> + <source>Save to long file name directory</source> + <translation>保存至长文件名目录</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="93"/> + <source>Rename</source> + <translation>重命名</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="286"/> + <source>modify the name</source> + <translation>修改命名</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="287"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="293"/> + <source>.</source> + <translation>。</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="288"/> + <source>Explanation: When renaming a file name, ensure it is within %1 %2 and </source> + <translation>说明:用户重命名文件名,保证在 %1 %2 以内,去</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="126"/> + <source>All applications</source> + <translation>全部应用</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>The file name is too long. </source> + <translation>文件名过长。</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="130"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="172"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="239"/> + <source>Cancel</source> + <translation>取消</translation> + </message> + <message> + <source>Apply</source> + <translation type="vanished">应用</translation> + </message> + <message> + <source>Save</source> + <translation type="vanished">保存</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="231"/> + <source>Front truncation</source> + <translation>前截断</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="232"/> + <source>Post truncation</source> + <translation>后截断</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="131"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="173"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="240"/> + <source>OK</source> + <translation>确定</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="69"/> + <source>File "%1"</source> + <translation>文件“%1”</translation> + </message> + <message> + <source>Filename too long. </source> + <translation type="obsolete">文件名过长。</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="71"/> + <source>Please choose the following processing method:</source> + <translation>请选择一下处理方式:</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="292"/> + <source>truncate interval</source> + <translation>截断区间</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="294"/> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select </source> + <translation>说明:截断文件名的超过 %1 %2的部分,去选择</translation> + </message> + <message> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select</source> + <translation type="vanished">说明:截断文件名的超过 %1 %2的部分,去选择</translation> + </message> + <message> + <source>Description: Save the file to "</source> + <translation type="vanished">说明:将文件保存至“</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>".</source> + <translation>”。</translation> + </message> + <message> + <source>Description: Save the file to "%1/扩展".</source> + <translation type="vanished">说明:将文件保存至“%1/扩展”。</translation> + </message> + <message> + <source>Description: By default, save to "%1/扩展".</source> + <translation type="vanished">说明:将文件保存至“%1/扩展”。</translation> + </message> +</context> +<context> + <name>KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> + <translation>后退</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="289"/> + <source>Go Forward</source> + <translation>前进</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="295"/> + <source>Cd Up</source> + <translation>向上</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="302"/> + <source>Search</source> + <translation>搜索</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="310"/> + <source>View Type</source> + <translation>视图类型</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="321"/> + <source>Sort Type</source> + <translation>排序类型</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="326"/> + <location filename="../kyfiledialog.cpp" line="444"/> + <source>Maximize</source> + <translation>最大化</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="340"/> + <source>Close</source> + <translation>关闭</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="441"/> + <source>Restore</source> + <translation>还原</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1058"/> + <source>Name</source> + <translation>文件名</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1061"/> + <location filename="../kyfiledialog.cpp" line="1698"/> + <source>Open</source> + <translation>打开</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1062"/> + <location filename="../kyfiledialog.cpp" line="1071"/> + <source>Cancel</source> + <translation>取消</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1066"/> + <source>Save as</source> + <translation>另存为</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1068"/> + <source>New Folder</source> + <translation>新建文件夹</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1070"/> + <location filename="../kyfiledialog.cpp" line="1702"/> + <source>Save</source> + <translation>保存</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1106"/> + <location filename="../kyfiledialog.cpp" line="1107"/> + <location filename="../kyfiledialog.cpp" line="1109"/> + <source>Directories</source> + <translation>目录</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>Warning</source> + <translation>警告</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <source>exist, are you sure replace?</source> + <translation>已存在,是否替换?</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2064"/> + <source>NewFolder</source> + <translation>新建文件夹</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2405"/> + <source>Undo</source> + <translation>撤销</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2412"/> + <source>Redo</source> + <translation>重做</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>warn</source> + <translation>警告</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>This operation is not supported.</source> + <translation>不支持此操作。</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>File save failed! </source> + <translation>文件保存失败!</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <source>Show Details...</source> + <translation type="vanished">显示细节……</translation> + </message> + <message> + <source>Hide Details...</source> + <translation type="vanished">隐藏细节……</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../uikyfiledialog.cpp" line="237"/> + <source>File Name</source> + <translation>文件名称</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="241"/> + <source>Modified Date</source> + <translation>修改日期</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="245"/> + <source>File Type</source> + <translation>文件类型</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="249"/> + <source>File Size</source> + <translation>文件大小</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="253"/> + <source>Original Path</source> + <translation>原始路径</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="262"/> + <source>Descending</source> + <translation>降序</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="267"/> + <source>Ascending</source> + <translation>升序</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="273"/> + <source>Use global sorting</source> + <translation>使用全局排序</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="293"/> + <source>List View</source> + <translation>列表视图</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="294"/> + <source>Icon View</source> + <translation>图标视图</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_HK.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_HK.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_HK.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_HK.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,405 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="zh"> +<context> + <name>KyFileDialogHelper</name> + <message> + <location filename="../kyfiledialog.cpp" line="3081"/> + <source>Open File</source> + <translation>打開</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3082"/> + <source>Save File</source> + <translation>保存</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="3095"/> + <source>All Files (*)</source> + <translation>所有(*)</translation> + </message> +</context> +<context> + <name>KyFileDialogRename</name> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="46"/> + <source>bytes</source> + <translation>位元組</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="47"/> + <source>Bytes</source> + <translation>位元組</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="50"/> + <source>character</source> + <translation>字元</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="51"/> + <source>Character</source> + <translation>字元</translation> + </message> + <message> + <source>Saving "%1"</source> + <translation type="vanished">正在儲存"%1"</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>Saving failed, the reason is: %1</source> + <translation>儲存失敗, 原因: %1</translation> + </message> + <message> + <source>Filename too long</source> + <translation type="vanished">檔名過長</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>Description: Save long file names to "</source> + <translation>说明:将长文件名文件保存至</translation> + </message> + <message> + <source>Copying "%1"</source> + <translation type="vanished">複製%1</translation> + </message> + <message> + <source>To "%1"</source> + <translation type="vanished">到%1”</translation> + </message> + <message> + <source>Copying failed, the reason is: %1</source> + <translation type="vanished">複製失敗, 原因: %1</translation> + </message> + <message> + <source>Moving "%1"</source> + <translation type="vanished">正在移動%1</translation> + </message> + <message> + <source>Moving failed, the reason is: %1</source> + <translation type="vanished">移動失敗, 原因: %1</translation> + </message> + <message> + <source>File operation error:</source> + <translation type="vanished">檔案操作錯誤:</translation> + </message> + <message> + <source>The reason is: %1</source> + <translation type="vanished">原因: %1</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="91"/> + <source>Truncation</source> + <translation>截斷</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="92"/> + <source>Save to long file name directory</source> + <translation>保存至長檔名目錄</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="93"/> + <source>Rename</source> + <translation>重新命名</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="286"/> + <source>modify the name</source> + <translation>修改命名</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="287"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="293"/> + <source>.</source> + <translation>。</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="288"/> + <source>Explanation: When renaming a file name, ensure it is within %1 %2 and </source> + <translation>說明:使用者重命名檔名,保證在 %1 %2 以內,去 </translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="126"/> + <source>All applications</source> + <translation>全部應用</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="70"/> + <source>The file name is too long. </source> + <translation>檔名太長。 </translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="130"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="172"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="239"/> + <source>Cancel</source> + <translation>取消</translation> + </message> + <message> + <source>Apply</source> + <translation type="vanished">應用</translation> + </message> + <message> + <source>Save</source> + <translation type="vanished">保存</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="231"/> + <source>Front truncation</source> + <translation>前截斷</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="232"/> + <source>Post truncation</source> + <translation>後截斷</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="131"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="173"/> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="240"/> + <source>OK</source> + <translation>確認</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="69"/> + <source>File "%1"</source> + <translation>檔案“%1”</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="71"/> + <source>Please choose the following processing method:</source> + <translation>請選擇以下處理方法:</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="292"/> + <source>truncate interval</source> + <translation>截斷區間</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="294"/> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select </source> + <translation>說明:使用者重命名檔名,保證在 %1 %2 以內,去 </translation> + </message> + <message> + <source>Explanation: Truncate the portion of the file name that exceeds %1 %2 and select</source> + <translation type="vanished">說明:使用者重命名檔名,保證在 %1 %2 以內,去</translation> + </message> + <message> + <source>Description: Save the file to "</source> + <translation type="vanished">說明:將檔保存至“</translation> + </message> + <message> + <location filename="../file-operation-dialog/kyfiledialogrename.cpp" line="298"/> + <source>".</source> + <translation>”。</translation> + </message> + <message> + <source>Description: Save the file to "%1/扩展".</source> + <translation type="vanished">說明:將檔保存至“%1/擴展”。</translation> + </message> + <message> + <source>Description: By default, save to "%1/扩展".</source> + <translation type="vanished">说明:将文件保存至“%1/扩展”。</translation> + </message> +</context> +<context> + <name>KyNativeFileDialog</name> + <message> + <location filename="../kyfiledialog.cpp" line="282"/> + <source>Go Back</source> + <translation>後退</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="289"/> + <source>Go Forward</source> + <translation>前進</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="295"/> + <source>Cd Up</source> + <translation>向上</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="302"/> + <source>Search</source> + <translation>搜索</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="310"/> + <source>View Type</source> + <translation>視圖類型</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="321"/> + <source>Sort Type</source> + <translation>排序類型</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="326"/> + <location filename="../kyfiledialog.cpp" line="444"/> + <source>Maximize</source> + <translation>最大化</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="340"/> + <source>Close</source> + <translation>關閉</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="441"/> + <source>Restore</source> + <translation>還原</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1058"/> + <source>Name</source> + <translation>檔名</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1061"/> + <location filename="../kyfiledialog.cpp" line="1698"/> + <source>Open</source> + <translation>打開</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1062"/> + <location filename="../kyfiledialog.cpp" line="1071"/> + <source>Cancel</source> + <translation>取消</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1066"/> + <source>Save as</source> + <translation>另存為</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1068"/> + <source>New Folder</source> + <translation>新建資料夾</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1070"/> + <location filename="../kyfiledialog.cpp" line="1702"/> + <source>Save</source> + <translation>保存</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1106"/> + <location filename="../kyfiledialog.cpp" line="1107"/> + <location filename="../kyfiledialog.cpp" line="1109"/> + <source>Directories</source> + <translation>目錄</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>Warning</source> + <translation>警告</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="1299"/> + <source>exist, are you sure replace?</source> + <translation>已存在,是否替換?</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2064"/> + <source>NewFolder</source> + <translation>新建資料夾</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2405"/> + <source>Undo</source> + <translation>撤銷</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2412"/> + <source>Redo</source> + <translation>重做</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>warn</source> + <translation>警告</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2609"/> + <source>This operation is not supported.</source> + <translation>不支援此操作。</translation> + </message> + <message> + <location filename="../kyfiledialog.cpp" line="2878"/> + <location filename="../kyfiledialog.cpp" line="2887"/> + <location filename="../kyfiledialog.cpp" line="2907"/> + <location filename="../kyfiledialog.cpp" line="2914"/> + <source>File save failed! </source> + <translation>檔案儲存失敗! </translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <source>Show Details...</source> + <translation type="vanished">显示细节……</translation> + </message> + <message> + <source>Hide Details...</source> + <translation type="vanished">隐藏细节……</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../uikyfiledialog.cpp" line="237"/> + <source>File Name</source> + <translation>檔名稱</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="241"/> + <source>Modified Date</source> + <translation>修改日期</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="245"/> + <source>File Type</source> + <translation>檔案類型</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="249"/> + <source>File Size</source> + <translation>檔大小</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="253"/> + <source>Original Path</source> + <translation>原始路徑</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="262"/> + <source>Descending</source> + <translation>降序</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="267"/> + <source>Ascending</source> + <translation>升序</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="273"/> + <source>Use global sorting</source> + <translation>使用全域排序</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="293"/> + <source>List View</source> + <translation>清單檢視</translation> + </message> + <message> + <location filename="../uikyfiledialog.cpp" line="294"/> + <source>Icon View</source> + <translation>圖示檢視</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hant.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hant.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hant.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/translations/qt5-ukui-filedialog_zh_Hant.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,386 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="zh"> +<context> + <name>MainWindow</name> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../../test/system-settings/mainwindow.ui" line="14"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> + <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> + <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="30"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="37"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="47"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="54"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="64"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="71"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="78"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> + <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> + <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> + <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/system-settings/mainwindow.ui" line="21"/> + <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/system-settings/mainwindow.ui" line="31"/> + <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/system-settings/mainwindow.ui" line="41"/> + <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/system-settings/mainwindow.ui" line="55"/> + <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>關閉</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>可執行檔「%1」 需要數量%2,找到數量%3。</translation> + </message> + <message> + <location filename="../widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation>不相容的Qt庫錯誤</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="362"/> + <location filename="../widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>確認</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="418"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation>顯示細節......</translation> + </message> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation>隱藏細節......</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../widget/filedialog/uikyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation>檔名稱</translation> + </message> + <message> + <location filename="../widget/filedialog/uikyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation>修改日期</translation> + </message> + <message> + <location filename="../widget/filedialog/uikyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation>檔案類型</translation> + </message> + <message> + <location filename="../widget/filedialog/uikyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation>檔大小</translation> + </message> + <message> + <location filename="../widget/filedialog/uikyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation>原始路徑</translation> + </message> + <message> + <location filename="../widget/filedialog/uikyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation>降序</translation> + </message> + <message> + <location filename="../widget/filedialog/uikyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation>升序</translation> + </message> + <message> + <location filename="../widget/filedialog/uikyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation>使用全域排序</translation> + </message> + <message> + <location filename="../widget/filedialog/uikyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation>清單檢視</translation> + </message> + <message> + <location filename="../widget/filedialog/uikyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation>圖示檢視</translation> + </message> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation type="unfinished">關閉</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>默認slide</translation> + </message> + <message> + <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>讓選項卡小部件切換為幻燈片動畫。</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> + <source>Open File</source> + <translation>打開</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> + <source>Save File</source> + <translation>保存</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> + <source>All Files (*)</source> + <translation>所有(*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>後退</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>前進</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>向上</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>搜索</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>視圖類型</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>排序類型</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>最大化</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>關閉</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>還原</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>檔名</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>打開</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>取消</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>另存為</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>新建資料夾</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>保存</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>目錄</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>警告</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>已存在,是否替換?</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> + <source>NewFolder</source> + <translation>新建資料夾</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> + <source>Undo</source> + <translation>撤銷</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> + <source>Redo</source> + <translation>重做</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> + <source>warn</source> + <translation>警告</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> + <source>This operation is not supported.</source> + <translation>不支援此操作。</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/uikyfiledialog.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/uikyfiledialog.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/uikyfiledialog.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/uikyfiledialog.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,497 @@ +#include <QFileDialog> +#include <peony-qt/global-settings.h> +#include "plugin-manager.h" +#include "kyfiledialog.h" +#include "debug.h" +#include "uikyfiledialog.h" + +//Ui_KyFileDialog::Ui_KyFileDialog(QDialog *parent) +//{ +// setupUi(parent); +//} + +Ui_KyFileDialog::Ui_KyFileDialog(QWidget *parent) : QWidget(parent) +{ + +} + +Ui_KyFileDialog::~Ui_KyFileDialog() +{ + pDebug << "Ui_KyFileDialog destory111.........."; +/* + if(m_pathbarWidget){ + m_pathbarWidget->deleteLater(); + m_pathbarWidget = nullptr; + } + qDebug() << "Ui_KyFileDialog destory122222.........."; + + if(m_pathbar){ + m_pathbar->deleteLater(); + m_pathbar = nullptr; + } + if(m_searchBtn){ + m_searchBtn->deleteLater(); + m_searchBtn = nullptr; + } + if(m_backButton){ + m_backButton->deleteLater(); + m_backButton = nullptr; + } + qDebug() << "Ui_KyFileDialog destory3223.........."; + + if(m_forwardButton){ + m_forwardButton->deleteLater(); + m_forwardButton = nullptr; + } + if(m_toParentButton){ + m_toParentButton->deleteLater(); + m_toParentButton = nullptr; + } + if(m_modeButton){ + m_modeButton->deleteLater(); + m_modeButton = nullptr; + } + if(m_sortButton){ + m_sortButton->deleteLater(); + m_sortButton = nullptr; + } + if(m_maximizeAndRestore){ + m_maximizeAndRestore->deleteLater(); + m_maximizeAndRestore = nullptr; + } + if(m_closeButton){ + m_closeButton->deleteLater(); + m_closeButton = nullptr; + } + if(m_modeMenu){ + m_modeMenu->deleteLater(); + m_modeMenu = nullptr; + } + qDebug() << "Ui_KyFileDialog destory3555423.........."; + + if(m_sortMenu){ + m_sortMenu->deleteLater(); + m_sortMenu = nullptr; + } + if(m_listModeAction){ + m_listModeAction->deleteLater(); + m_listModeAction = nullptr; + } + if(m_iconModeAction){ + m_iconModeAction->deleteLater(); + m_iconModeAction = nullptr; + } + if(m_sider){ + m_sider->deleteLater(); + m_sider = nullptr; + } + qDebug() << "Ui_KyFileDialog destory223322.........."; + + if(m_frame){ + m_frame->deleteLater(); + m_frame = nullptr; + } + if(m_splitter){ + m_splitter->deleteLater(); + m_splitter = nullptr; + } + if(vboxLayout){ + vboxLayout->deleteLater(); + vboxLayout = nullptr; + } + if(m_treeView){ + m_treeView->deleteLater(); + m_treeView = nullptr; + } + if(m_fileNameLabel){ + m_fileNameLabel->deleteLater(); + m_fileNameLabel = nullptr; + } + if(m_fileNameEdit){ + m_fileNameEdit->deleteLater(); + m_fileNameEdit = nullptr; + } + qDebug() << "Ui_KyFileDialog destory1245677.........."; + + if(m_fileTypeCombo){ + m_fileTypeCombo->deleteLater(); + m_fileTypeCombo = nullptr; + } + if(m_newFolderButton){ + m_newFolderButton->deleteLater(); + m_newFolderButton = nullptr; + } + if(m_acceptButton){ + m_acceptButton->deleteLater(); + m_acceptButton = nullptr; + } + if(m_rejectButton){ + m_rejectButton->deleteLater(); + m_rejectButton = nullptr; + } + qDebug() << "Ui_KyFileDialog destory23467899.........."; + + if(m_upSeperate){ + m_upSeperate->deleteLater(); + m_upSeperate = nullptr; + } + if(m_downSeperate){ + m_downSeperate->deleteLater(); + m_downSeperate = nullptr; + } + if(m_widget){ + m_widget->deleteLater(); + m_widget = nullptr; + } + qDebug() << "destory345.........."; + + if(m_container){ + qDebug() << "destory555.........."; + + m_container->deleteLater(); + m_container = nullptr; + qDebug() << "destory666.........."; + + } + qDebug() << "destory777.........."; + + if(m_siderWidget){ + m_siderWidget->deleteLater(); + m_siderWidget = nullptr; + } + + if(m_sortTypeGroup){ + m_sortTypeGroup->deleteLater(); + m_sortTypeGroup = nullptr; + } + if(m_fileName){ + m_fileName->deleteLater(); + m_fileName = nullptr; + } + if(m_modifiedDate){ + m_modifiedDate->deleteLater(); + m_modifiedDate = nullptr; + } + if(m_fileType){ + m_fileType->deleteLater(); + m_fileType = nullptr; + } + if(m_fileSize){ + m_fileSize->deleteLater(); + m_fileSize = nullptr; + } + if(m_originalPath){ + m_originalPath->deleteLater(); + m_originalPath = nullptr; + } + if(m_sortOrderGroup){ + m_sortOrderGroup->deleteLater(); + m_sortOrderGroup = nullptr; + } + if(m_descending){ + m_descending->deleteLater(); + m_descending = nullptr; + } + if(m_ascending){ + m_ascending->deleteLater(); + m_ascending = nullptr; + } + if(m_useGlobalSortAction){ + m_useGlobalSortAction->deleteLater(); + m_useGlobalSortAction = nullptr; + } + qDebug() << "Ui_KyFileDialog destory8888.........."; + + if(m_siderLayout){ + m_siderLayout->deleteLater(); + m_siderLayout = nullptr; + } +// if(m_gridLayout){ +// m_gridLayout->deleteLater(); +// m_gridLayout= nullptr; +// } + + if(m_hHeaderLayout){ + m_hHeaderLayout->deleteLater(); + m_hHeaderLayout = nullptr; + } + if(m_hLineEditLayout){ + m_hLineEditLayout->deleteLater(); + m_hLineEditLayout = nullptr; + } + if(m_hBtnLayout){ + m_hBtnLayout->deleteLater(); + m_hBtnLayout = nullptr; + } + qDebug() << "Ui_KyFileDialog destory123.........."; +*/ +} + +void Ui_KyFileDialog::initSortMenu(QDialog *mKyFileDialog) +{ + m_sortButton = new MenuToolButton(this); + m_sortMenu = new QMenu(m_sortButton); + + m_sortTypeGroup = new QActionGroup(m_sortMenu); + m_sortTypeGroup->setExclusive(true); + + m_fileName = m_sortMenu->addAction(QObject::tr("File Name")); + m_fileName->setCheckable(true); + m_sortTypeGroup->addAction(m_fileName); + + m_modifiedDate = m_sortMenu->addAction(QObject::tr("Modified Date")); + m_modifiedDate->setCheckable(true); + m_sortTypeGroup->addAction(m_modifiedDate); + + m_fileType = m_sortMenu->addAction(QObject::tr("File Type")); + m_fileType->setCheckable(true); + m_sortTypeGroup->addAction(m_fileType); + + m_fileSize = m_sortMenu->addAction(QObject::tr("File Size")); + m_fileSize->setCheckable(true); + m_sortTypeGroup->addAction(m_fileSize); + + m_originalPath = m_sortMenu->addAction(QObject::tr("Original Path")); + m_originalPath->setCheckable(true); + m_sortTypeGroup->addAction(m_originalPath); + + m_sortMenu->addSeparator(); + + m_sortOrderGroup = new QActionGroup(m_sortMenu); + m_sortOrderGroup->setExclusive(true); + + m_descending = m_sortMenu->addAction(QObject::tr("Descending")); + m_descending->setCheckable(true); + m_sortOrderGroup->addAction(m_descending); + + //switch defautl Descending Ascending order, fix bug#99924 + m_ascending = m_sortMenu->addAction(QObject::tr("Ascending")); + m_ascending->setCheckable(true); + m_sortOrderGroup->addAction(m_ascending); + + m_sortMenu->addSeparator(); + + m_useGlobalSortAction = m_sortMenu->addAction(QObject::tr("Use global sorting")); + m_useGlobalSortAction->setCheckable(true); + + m_sortButton->setMenu(m_sortMenu); + m_sortButton->setPopupMode(QToolButton::InstantPopup); + m_sortButton->setAutoRaise(true); + m_sortButton->setFixedSize(QSize(57, 40)); + m_sortButton->setIconSize(QSize(16, 16)); + +} + +void Ui_KyFileDialog::initModeMenu(QDialog *mKyFileDialog) +{ + m_modeButton = new MenuToolButton(this); + m_modeButton->setPopupMode(QToolButton::InstantPopup); + m_modeButton->setAutoRaise(true); + m_modeButton->setFixedSize(QSize(57, 40)); + m_modeButton->setIconSize(QSize(16, 16)); + + m_modeMenu = new QMenu(m_modeButton); + m_listModeAction = m_modeMenu->addAction(QIcon::fromTheme("view-list-symbolic"), QObject::tr("List View")); + m_iconModeAction = m_modeMenu->addAction(QIcon::fromTheme("view-grid-symbolic"), QObject::tr("Icon View")); + m_listModeAction->setCheckable(true); + m_iconModeAction->setCheckable(true); + m_modeButton->setMenu(m_modeMenu); +} + +void Ui_KyFileDialog::initSiderBar(QDialog *mKyFileDialog) +{ + m_siderWidget = new QWidget(this); + m_siderLayout = new QVBoxLayout(); + m_siderLayout->setContentsMargins(0,0,0,0); + + m_sider = new FileDialogSideBar(mKyFileDialog); + m_sider->setAttribute(Qt::WA_TranslucentBackground); +} + +void Ui_KyFileDialog::initHeaderBar(QDialog *mKyFileDialog) +{ + m_hHeaderLayout = new QHBoxLayout(this); + initModeMenu(mKyFileDialog); + initSortMenu(mKyFileDialog); + + m_hHeaderLayout->setContentsMargins(0,0,8,0); + m_hHeaderLayout->setObjectName(QString::fromUtf8("hboxLayout")); + m_backButton = new QToolButton(this); + m_forwardButton = new QToolButton(this); + m_toParentButton = new QToolButton(this); + + m_pathbarWidget = new FileDialogPathBar(this);//new Peony::AdvancedLocationBar(mKyFileDialog);// + m_pathbar = m_pathbarWidget->getPathBar(); + m_pathbar->setMinimumWidth(250); + m_pathbar->setFocusPolicy(Qt::FocusPolicy(m_pathbar->focusPolicy() & ~Qt::TabFocus)); + + m_searchBtn = new QToolButton(this); + + m_maximizeAndRestore = new QToolButton(this); + + m_closeButton = new QToolButton(this); + m_hHeaderLayout->setAlignment(Qt::AlignVCenter); + + m_hHeaderLayout->addWidget(m_backButton); + m_hHeaderLayout->addWidget(m_forwardButton); + m_hHeaderLayout->addWidget(m_toParentButton); + m_hHeaderLayout->addWidget(m_pathbarWidget); + m_hHeaderLayout->addWidget(m_searchBtn); + m_hHeaderLayout->addWidget(m_modeButton); + m_hHeaderLayout->addWidget(m_sortButton); + m_hHeaderLayout->addWidget(m_maximizeAndRestore); + m_hHeaderLayout->addWidget(m_closeButton); + +} + +void Ui_KyFileDialog::initLineEditLayout(QDialog *mKyFileDialog) +{ + m_hLineEditLayout = new QHBoxLayout(this); + m_hLineEditLayout->setContentsMargins(4,0,24,0); + m_fileNameLabel = new QLabel(this); + m_fileNameLabel->setObjectName(QString::fromUtf8("fileNameLabel")); + QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred); + sizePolicy2.setHorizontalStretch(0); + sizePolicy2.setVerticalStretch(0); + sizePolicy2.setHeightForWidth(m_fileNameLabel->sizePolicy().hasHeightForWidth()); + m_fileNameLabel->setSizePolicy(sizePolicy2); + m_fileNameLabel->setMinimumSize(QSize(0, 0)); + pDebug << "3333333333333333333"; + + m_fileNameEdit = new QLineEdit(mKyFileDialog); + m_fileNameEdit->setObjectName("fileNameEdit"); + m_fileNameEdit->setMaxLength(-1); + QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Fixed); + sizePolicy3.setHorizontalStretch(1); + sizePolicy3.setVerticalStretch(0); + sizePolicy3.setHeightForWidth(m_fileNameEdit->sizePolicy().hasHeightForWidth()); + m_fileNameEdit->setSizePolicy(sizePolicy3); + pDebug << "44444444444444444"; + + m_fileTypeCombo = new FileDialogComboBox(this); + QSizePolicy sizePolicy4(QSizePolicy::Expanding, QSizePolicy::Fixed); + sizePolicy4.setHorizontalStretch(0); + sizePolicy4.setVerticalStretch(0); + sizePolicy4.setHeightForWidth(m_fileTypeCombo->sizePolicy().hasHeightForWidth()); + m_fileTypeCombo->setSizePolicy(sizePolicy4); +// m_fileTypeCombo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength); + //m_fileTypeCombo->setVisible(false); + + m_hLineEditLayout->addWidget(m_fileNameLabel); + m_hLineEditLayout->addWidget(m_fileNameEdit); + m_hLineEditLayout->addWidget(m_fileTypeCombo); + m_hLineEditLayout->setSpacing(15); +} + +void Ui_KyFileDialog::intiBtnLayout(QDialog *mKyFileDialog) +{ + m_hBtnLayout = new QHBoxLayout(this); + m_hBtnLayout->addSpacing(20); + m_hBtnLayout->setContentsMargins(0,0,24,0); + m_newFolderButton =new QPushButton(mKyFileDialog); + m_newFolderButton->setObjectName(QString::fromUtf8("newFolderButton")); + m_hBtnLayout->addWidget(m_newFolderButton); + + + m_acceptButton = new QPushButton(mKyFileDialog); + m_rejectButton = new QPushButton(mKyFileDialog); + m_acceptButton->setEnabled(false); + m_hBtnLayout->addStretch(); + m_hBtnLayout->addWidget(m_rejectButton, 0, Qt::AlignRight | Qt::AlignVCenter); + m_hBtnLayout->addSpacing(15); + m_hBtnLayout->addWidget(m_acceptButton, 0, Qt::AlignRight | Qt::AlignVCenter); + + m_acceptButton->setObjectName(QString::fromUtf8("acceptButton")); + m_rejectButton->setObjectName(QString::fromUtf8("rejectButton")); + + pDebug << "6666666666666666"; +} + +void Ui_KyFileDialog::setupUi(QDialog *mKyFileDialog) +{ + if(mKyFileDialog->objectName().isEmpty()) { + mKyFileDialog->setObjectName(QString::fromUtf8("KyNativeFileDialog")); + } + auto sliderWidth = Peony::GlobalSettings::getInstance()->getValue(DEFAULT_SIDEBAR_WIDTH).toInt(); + int viewWidth = 125 * 6 + 24; + //qDebug() << "width..." << sliderWidth + viewWidth; + mKyFileDialog->resize(sliderWidth + viewWidth, 635); + + mKyFileDialog->setSizeGripEnabled(true); + mKyFileDialog->setAttribute(Qt::WA_TranslucentBackground); + mKyFileDialog->setContentsMargins(0,0,0,0); + + //FIXME: should I load plugins async? +// Peony::PluginManager::init();//文管插件(保护箱 多端协同等) + + + m_gridLayout = new QGridLayout(mKyFileDialog); + m_gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + + m_container = new Peony::DirectoryViewContainer(this); + m_frame = new QFrame(this); + vboxLayout = new QVBoxLayout(this); + + initSiderBar(mKyFileDialog); + + initHeaderBar(mKyFileDialog); + initLineEditLayout(mKyFileDialog); + intiBtnLayout(mKyFileDialog); + + vboxLayout->addSpacing(8); + vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setContentsMargins(0, 0, 0, 0); + + vboxLayout->addLayout(m_hHeaderLayout); + vboxLayout->addSpacing(6); + m_upSeperate = new QFrame(mKyFileDialog); + m_upSeperate->setFrameShape(QFrame::HLine); + m_upSeperate->setFrameShadow(QFrame::Plain); + vboxLayout->addWidget(m_upSeperate); + vboxLayout->addSpacing(6); + vboxLayout->addWidget(m_container); + vboxLayout->addSpacing(15); + + vboxLayout->addLayout(m_hLineEditLayout); + vboxLayout->addSpacing(16); + + m_downSeperate = new QFrame(mKyFileDialog); + m_downSeperate->setFrameShape(QFrame::HLine); + m_downSeperate->setFrameShadow(QFrame::Plain); + vboxLayout->addWidget(m_downSeperate); + vboxLayout->addSpacing(16); + + vboxLayout->addLayout(m_hBtnLayout); + vboxLayout->addSpacing(25); + + m_frame->setFrameShadow(QFrame::Raised); + m_frame->setFrameShape(QFrame::NoFrame); + m_frame->setLayout(vboxLayout); + + m_splitter = new QSplitter(this); + m_splitter->setAttribute(Qt::WA_TranslucentBackground); + QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(m_splitter->sizePolicy().hasHeightForWidth()); + m_splitter->setSizePolicy(sizePolicy1); + m_splitter->setOrientation(Qt::Horizontal); + m_splitter->setHandleWidth(0); + m_siderLayout->addWidget(m_sider); + m_siderWidget->setLayout(m_siderLayout); + m_siderWidget->setMinimumWidth(180); + m_splitter->addWidget(m_siderWidget); + m_splitter->addWidget(m_frame); + QList<int> list; + list << sliderWidth << viewWidth; + m_splitter->setSizes(list); + int siderWidIndex = m_splitter->indexOf(m_siderWidget); + int frameIndex = m_splitter->indexOf(m_frame); + m_splitter->setCollapsible(siderWidIndex, false); + m_splitter->setCollapsible(frameIndex, false); + m_gridLayout->addWidget(m_splitter); + m_gridLayout->setContentsMargins(0,0,0,0); + + m_splitter->setStretchFactor(0, 0); + m_splitter->setStretchFactor(1, 1); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/uikyfiledialog.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/uikyfiledialog.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-filedialog/uikyfiledialog.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-filedialog/uikyfiledialog.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,114 @@ +#ifndef UI_KYFILEDIALOG_H +#define UI_KYFILEDIALOG_H +#include <QApplication> +#include <QComboBox> +#include <QTreeView> +#include <QToolButton> +#include <QLineEdit> +#include <QFrame> +#include <QSplitter> +#include <QLabel> +#include <QMenu> +#include <QAction> +#include <QGridLayout> +#include <QHBoxLayout> +#include <QVBoxLayout> +#include <QDialogButtonBox> +#include <QDebug> +#include <QPushButton> +#include <QToolBar> +#include <QObject> +#include <QDialog> +#include <QSizePolicy> +#include <peony-qt/controls/directory-view/directory-view-container.h> +#include <peony-qt/controls/navigation-bar/advanced-location-bar.h> +#include "pathbar.h" +#include "menutoolbutoon.h" +#include "sidebar.h" +#include "kyfiledialog.h" + +namespace Peony { +class DirectoryViewContainer; +} +class Ui_KyFileDialog: public QWidget +{ + QOBJECT_H + public: + explicit Ui_KyFileDialog(QWidget *parent = nullptr); + ~Ui_KyFileDialog(); + + QGridLayout *m_gridLayout = nullptr; + QHBoxLayout *m_hHeaderLayout = nullptr; + QHBoxLayout *m_hLineEditLayout = nullptr; + QHBoxLayout *m_hBtnLayout = nullptr; + FileDialogPathBar *m_pathbarWidget = nullptr; + Peony::AdvancedLocationBar *m_pathbar = nullptr; + QToolButton *m_searchBtn = nullptr; + //QWidget *m_pathbar = nullptr; + QToolButton *m_backButton = nullptr; + QToolButton *m_forwardButton = nullptr; + QToolButton *m_toParentButton = nullptr; + MenuToolButton *m_modeButton = nullptr; + MenuToolButton *m_sortButton = nullptr; + QToolButton *m_maximizeAndRestore = nullptr; + QToolButton *m_closeButton = nullptr; + QMenu *m_modeMenu = nullptr; + QMenu *m_sortMenu = nullptr; + QAction *m_listModeAction = nullptr; + QAction *m_iconModeAction = nullptr; + FileDialogSideBar *m_sider = nullptr; + QFrame *m_frame = nullptr; + QSplitter *m_splitter = nullptr; + QVBoxLayout *vboxLayout = nullptr; + QTreeView *m_treeView = nullptr; + QLabel *m_fileNameLabel = nullptr; + QLineEdit *m_fileNameEdit = nullptr; + FileDialogComboBox *m_fileTypeCombo = nullptr; + QPushButton *m_newFolderButton = nullptr; + QPushButton *m_acceptButton = nullptr; + QPushButton *m_rejectButton = nullptr; + QFrame *m_upSeperate = nullptr; + QFrame *m_downSeperate = nullptr; + + QWidget *m_widget = nullptr; + //文管提供的中间显示文件的控件 + Peony::DirectoryViewContainer *m_container = nullptr; + + QWidget *m_siderWidget = nullptr; + QVBoxLayout *m_siderLayout = nullptr; + + QActionGroup *m_sortTypeGroup = nullptr; + QAction *m_fileName = nullptr; + QAction *m_modifiedDate = nullptr; + QAction *m_fileType = nullptr; + QAction *m_fileSize = nullptr; + QAction *m_originalPath = nullptr; + QActionGroup *m_sortOrderGroup = nullptr; + QAction *m_descending = nullptr; + QAction *m_ascending = nullptr; + QAction *m_useGlobalSortAction = nullptr; + +public: + void setupUi(QDialog *mKyFileDialog); + +private: + void initSortMenu(QDialog *mKyFileDialog); + void initModeMenu(QDialog *mKyFileDialog); + /** + * @brief 侧边栏界面 + * @return + */ + void initSiderBar(QDialog *mKyFileDialog); + /** + * @brief 最上面的路径输入框那一整条 + * @return + */ + void initHeaderBar(QDialog *mKyFileDialog); + /** + * @brief 下面文件名输入框那一条 + * @return + */ + void initLineEditLayout(QDialog *mKyFileDialog); + void intiBtnLayout(QDialog *mKyFileDialog); +}; +#endif // UI_KYFILEDIALOG_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,179 @@ +cmake_minimum_required(VERSION 3.16) + +project(qt5-ukui-platformtheme) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(QT_MIN_VERSION "5.12.0") +set(KF5_MIN_VERSION "5.66.0") + +# QtCreator supports the following variables for Android, which are identical to qmake Android variables. +# Check http://doc.qt.io/qt-5/deployment-android.html for more information. +# They need to be set before the find_package(Qt5 ...) call. + +#if(ANDROID) +# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android") +# if (ANDROID_ABI STREQUAL "armeabi-v7a") +# set(ANDROID_EXTRA_LIBS +# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libcrypto.so +# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libssl.so) +# endif() +#endif() + +find_package(Qt5Gui) +message(${imported_location}) +set(LIB_PATH ${imported_location}) +get_filename_component(PARENT_PATH "${LIB_PATH}" PATH) +get_filename_component(PARENT_PATH "${PARENT_PATH}" PATH) + +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + DBus + Widgets + X11Extras + Quick + QuickControls2 +) + +foreach(_dir ${Qt5Gui_PRIVATE_INCLUDE_DIRS}) + message(${_dir}) + + string(REGEX MATCHALL "QtGui" matches "${_dir}") + list(LENGTH matches match_count) +# message(STATUS "字符串中包含 ${match_count} 个 'QtGui'") + if(${match_count} EQUAL 2) + string(REPLACE "QtGui" "QtThemeSupport" ThemeSupport_string "${_dir}") + endif() +endforeach() +message(${ThemeSupport_string}) +include_directories(${ThemeSupport_string}) + +include_directories(${Qt5Widgets_PRIVATE_INCLUDE_DIRS}) +include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) + + +find_package(Qt5LinguistTools) + +find_package(KF5WindowSystem ${KF5_MIN_VERSION} CONFIG REQUIRED COMPONENTS) +find_package(KF5Wayland CONFIG REQUIRED COMPONENTS) + +find_package(X11) + +find_package(PkgConfig) +pkg_check_modules(QGSETTINGS REQUIRED gsettings-qt) +pkg_check_modules(REQUIRED kysdk-waylandhelper) +pkg_check_modules(FONTCONFIG REQUIRED fontconfig) +pkg_check_modules(FREETYPE2 REQUIRED freetype2) +pkg_check_modules(GLIB2 REQUIRED glib-2.0 gio-2.0 ) +pkg_check_modules(KYSDKWAYLANDHELPER REQUIRED kysdk-waylandhelper) +pkg_check_modules(KYSDKCONF2 REQUIRED kysdk-conf2) + +include_directories(${QGSETTINGS_INCLUDE_DIRS}) +include_directories(${GLIB2_INCLUDE_DIRS}) + +if (FONTCONFIG_FOUND) + include_directories(${FONTCONFIG_INCLUDE_DIRS}) + link_directories(${FONTCONFIG_LIBRARY_DIRS}) +endif() +if (FREETYPE2_FOUND) + include_directories(${FREETYPE2_INCLUDE_DIRS}) + link_directories(${FREETYPE2_LIBRARY_DIRS}) +endif() +if (KYSDKWAYLANDHELPER_FOUND) + include_directories(${KYSDKWAYLANDHELPER_INCLUDE_DIRS}) + link_directories(${KYSDKWAYLANDHELPER_LIBRARY_DIRS}) +endif() +if (QGSETTINGS_FOUND) + include_directories(${QGSETTINGS_INCLUDE_DIRS}) + link_directories(${QGSETTINGS_LIBRARY_DIRS}) +endif() +if (KYSDKCONF2_FOUND) + include_directories(${KYSDKCONF2_INCLUDE_DIRS}) + link_directories(${KYSDKCONF2_LIBRARY_DIRS}) +endif() + + +#message(${GLIB2_INCLUDE_DIRS}) +#message(${FREETYPE2_INCLUDE_DIRS}) + +include_directories(../libqt5-ukui-style/) + +file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") +file(GLOB_RECURSE Json "*.json") + +message("jsonfiles path:${Json}") + +# To create a new ts file: lupdate -recursive . -target-language en_US -ts translations/en_US.ts -no-ui-lines +file(GLOB TS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts") + +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources} ${Json} ${TS_FILES}) + +# i18n +set(UKUI_TRANSLATIONS_DIR "/usr/share/qt5-ukui-platformtheme") +add_definitions( + -DUKUI_TRANSLATIONS_DIR="${UKUI_TRANSLATIONS_DIR}" +) +if (NOT DEFINED UPDATE_TRANSLATIONS) + set(UPDATE_TRANSLATIONS "No") +endif() + +# cmake -DUPDATE_TRANSLATIONS=yes +if (UPDATE_TRANSLATIONS) + qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) +else() + qt5_add_translation(QM_FILES ${TS_FILES}) +endif() + +MESSAGE("QM_FILES PATH: ${QM_FILES}") + +add_custom_target(themetranslations ALL DEPENDS ${QM_FILES}) + +add_library(qt5-ukui-platformtheme MODULE ${sources} ${Json} ${TS_FILES}) + +get_filename_component(PARENT_PATH "${PARENT_PATH}" PATH) +get_filename_component(PARENT_PATH "${PARENT_PATH}" PATH) +set(themesupport_dir ${PARENT_PATH}) + +message("_qt5Widgets_install_prefix_path:${themesupport_dir}") +target_link_libraries(qt5-ukui-platformtheme + Qt5::Widgets + Qt5::DBus + Qt5::Gui + Qt5::X11Extras + Qt5::Quick + Qt5::QuickControls2 + KF5::WaylandClient + KF5::WindowSystem + ${QGSETTINGS_LIBRARIES} + ${KYSDKWAYLANDHELPER_LIBRARIES} + xcb + glib-2.0 + ${XCB_LIBS} + qt5-ukui-style + ${KYSDKCONF2_LIBRARIES} + ${FONTCONFIG_LIBRARIES} + ${FREETYPE2_LIBRARIES} + "${themesupport_dir}/libQt5ThemeSupport.a" #link Qt5ThemeSupport + ) + +add_definitions(-DQT5UKUIPLATFORMTHEME_LIBRARY) +add_definitions(-DQT_DEPRECATED_WARNINGS) +add_definitions(-DQT_MESSAGELOGCONTEXT) + +set(UKUIPLATFORMTHEME_DIR ${TARGET_PATH}) +target_compile_definitions(${PROJECT_NAME} PRIVATE UKUIPLATFORMTHEME_DIR="${UKUIPLATFORMTHEME_DIR}") + +message("DUKUIPLATFORMTHEME_DIR path: ${UKUIPLATFORMTHEME_DIR}") +if(UNIX) + set(TARGET_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/qt5/plugins") + + MESSAGE("libqt5-ukui-platformtheme TARGET_PATH: ${TARGET_PATH}") + + install(TARGETS ${PROJECT_NAME} DESTINATION ${TARGET_PATH}/platformthemes/) + + install(FILES ${QM_FILES} DESTINATION "${UKUI_TRANSLATIONS_DIR}") +endif() diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/main.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/main.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/main.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/main.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/platform-theme-fontdata.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/platform-theme-fontdata.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/platform-theme-fontdata.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/platform-theme-fontdata.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/platform-theme-fontdata.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/platform-theme-fontdata.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/platform-theme-fontdata.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/platform-theme-fontdata.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/qt5-ukui-platform-theme.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -23,8 +23,8 @@ #include <QVariant> #include <QStandardPaths> #include "qt5-ukui-platform-theme.h" -#include "ukui-style-settings.h" -#include "highlight-effect.h" +#include "settings/ukui-style-settings.h" +#include "effects/highlight-effect.h" #include <QFontDatabase> #include <QApplication> @@ -48,10 +48,9 @@ #include <QQuickStyle> #include "widget/messagebox/message-box.h" -#include "widget/filedialog/kyfiledialog.h" -#include "widget/filedialog/debug.h" +//#include "widget/filedialog/kyfiledialog.h" #include "platform-theme-fontdata.h" -using namespace UKUIFileDialog; +#include "../qt5-ukui-filedialog/filedialoginterface.h" #if !defined(QT_NO_DBUS) && !defined(QT_NO_SYSTEMTRAYICON) static bool isDBusTrayAvailable() { @@ -176,13 +175,31 @@ // if (QFile::exists(QString("%1/kf5/kirigami/org.kylin.style.so").arg(QT_PLUGIN_INSTALL_DIRS))) { // QQuickStyle::setStyle("org.kylin.style"); // } - if(qApp->inherits("QApplication") == true) { + if(qApp->inherits("QApplication") == true && qAppName() != "cura") { QQuickStyle::setStyle("org.ukui.style"); } + + QString systemLang = QLocale::system().name(); + if(systemLang == "ug_CN" || systemLang == "ky_KG" || systemLang == "kk_KZ"){ + QGuiApplication::setLayoutDirection(Qt::RightToLeft); + } else { + QGuiApplication::setLayoutDirection(Qt::LeftToRight); + } + const char* c = UKUIPLATFORMTHEME_DIR; + QString path = QString::fromUtf8(c); + if (QFile::exists(QString("%1/platformthemes/libqt5-ukui-filedialog.so").arg(path))) { + m_loader = new QPluginLoader(QString("%1/platformthemes/libqt5-ukui-filedialog.so").arg(path)); + qDebug() << "m_loader....." << m_loader; + } } Qt5UKUIPlatformTheme::~Qt5UKUIPlatformTheme() { + if(m_loader){ + m_loader->unload(); + delete m_loader; + m_loader = nullptr; + } } const QPalette *Qt5UKUIPlatformTheme::palette(Palette type) const @@ -212,6 +229,9 @@ QVariant Qt5UKUIPlatformTheme::themeHint(ThemeHint hint) const { + if(qAppName() == "cura") + return QPlatformTheme::themeHint(hint); + switch (hint) { case QPlatformTheme::StyleNames:{ // qDebug() << "Qt5UKUIPlatformTheme...."; @@ -239,8 +259,7 @@ case QPlatformTheme::SystemIconFallbackThemeName: return "hicolor"; case QPlatformTheme::IconThemeSearchPaths: - //FIXME: - return QStringList()<<".local/share/icons"<<"/usr/share/icons"<<"/usr/local/share/icons"; + return xdgIconThemePaths(); // case WheelScrollLines: // { // return QVariant(1); @@ -251,6 +270,19 @@ return QPlatformTheme::themeHint(hint); } +QStringList Qt5UKUIPlatformTheme::xdgIconThemePaths() const { + QStringList paths; + // Add home directory first in search path + const QFileInfo homeIconDir(QDir::homePath() + QLatin1String("/.icons")); + if (homeIconDir.isDir()) + paths.prepend(homeIconDir.absoluteFilePath()); + + paths.append(QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, + QStringLiteral("icons"), + QStandardPaths::LocateDirectory)); + return paths; +} + QIconEngine *Qt5UKUIPlatformTheme::createIconEngine(const QString &iconName) const { // QPluginLoader l(XDG_ICON_ENGINE_PATH); @@ -293,7 +325,12 @@ { switch (type) { case QPlatformTheme::FileDialog: - return new KyFileDialogHelper; + qDebug() << "QPlatformDialogHelper" << m_loader << m_loader->instance(); + + if (m_loader && m_loader->instance()) { + return qobject_cast<FileDialogInterface *>(m_loader->instance())->create(); + } + //return new KyFileDialogHelper; case QPlatformTheme::FontDialog: case QPlatformTheme::ColorDialog: return QPlatformTheme::createPlatformDialogHelper(type); diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/qt5-ukui-platform-theme.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,6 +27,7 @@ #include <QObject> #include <qpa/qplatformtheme.h> #include <QFont> +#include <QPluginLoader> #if !defined(QT_NO_DBUS) && defined(QT_DBUS_LIB) @@ -90,8 +91,12 @@ void slotChangeStyle(const QString& key); private: + QStringList xdgIconThemePaths() const; + +private: QFont m_system_font; QFont m_fixed_font; + QPluginLoader *m_loader = nullptr; }; #endif // QT5UKUIPLATFORMTHEME_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/qt5-ukui-platformtheme.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,78 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2019-12-31T14:19:01 -# -#------------------------------------------------- - -QT += widgets dbus gui-private widgets-private x11extras quick quickcontrols2 KWindowSystem - -greaterThan(QT_MAJOR_VERSION, 5)|greaterThan(QT_MINOR_VERSION, 7): \ - QT += theme_support-private -else: \ - QT += platformsupport-private - -TARGET = qt5-ukui-platformtheme -TEMPLATE = lib -CONFIG += plugin -CONFIG += c++11 link_pkgconfig lrelease -PKGCONFIG += gsettings-qt Qt5XdgIconLoader peony kysdk-waylandhelper fontconfig freetype2 -LIBS += -lX11 -lfontconfig -lfreetype - -include(../libqt5-ukui-style/libqt5-ukui-style.pri) - -DEFINES += QT5UKUIPLATFORMTHEME_LIBRARY - -XDG_ICON_ENGINE = $$[QT_INSTALL_PLUGINS]/iconengines/libQt5XdgIconPlugin.so -DEFINES += XDG_ICON_ENGINE_PATH='\\"$${XDG_ICON_ENGINE}\\"' - -QT_PLUGIN_INSTALL_DIRS = $$[QT_INSTALL_PLUGINS] -DEFINES += QT_PLUGIN_INSTALL_DIRS='\\"$${QT_PLUGIN_INSTALL_DIRS}\\"' - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which has been marked as deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS -#DEFINES += QT_NO_DEBUG_OUTPUT -DEFINES += QT_MESSAGELOGCONTEXT - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -include(widget/widget.pri) - -SOURCES += \ - qt5-ukui-platform-theme.cpp \ - platform-theme-fontdata.cpp \ - main.cpp - -HEADERS += \ - qt5-ukui-platform-theme.h \ - qt5-ukui-platformtheme_global.h \ - platform-theme-fontdata.h - -TRANSLATIONS += \ - $$PWD/translations/qt5-ukui-platformtheme_zh_CN.ts \ - $$PWD/translations/qt5-ukui-platformtheme_en_US.ts \ - $$PWD/translations/qt5-ukui-platformtheme_fa.ts \ - $$PWD/translations/qt5-ukui-platformtheme_fr.ts \ - $$PWD/translations/qt5-ukui-platformtheme_cs.ts \ - $$PWD/translations/qt5-ukui-platformtheme_bo_CN.ts \ - $$PWD/translations/qt5-ukui-platformtheme_tr.ts \ - $$PWD/translations/qt5-ukui-platformtheme_mn.ts \ - $$PWD/translations/qt5-ukui-platformtheme_kk.ts \ - $$PWD/translations/qt5-ukui-platformtheme_ky.ts \ - $$PWD/translations/qt5-ukui-platformtheme_ug.ts - - -unix { - target.path = $$[QT_INSTALL_PLUGINS]/platformthemes - INSTALLS += target - - QM_FILES_INSTALL_PATH=/usr/share/qt5-ukui-platformtheme -} - -DISTFILES += \ - ukui.json diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/qt5-ukui-platformtheme_global.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/qt5-ukui-platformtheme_global.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/qt5-ukui-platformtheme_global.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/qt5-ukui-platformtheme_global.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_bo_CN.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_bo_CN.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_bo_CN.ts 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_bo_CN.ts 2024-12-20 09:22:49.000000000 +0800 @@ -1,11 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="bo_CN"> - <context> <name>MessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="96"/> + <location filename="../widget/messagebox/message-box.cpp" line="97"/> <source>Close</source> <translation>ཁ་རྒྱག་པ།</translation> </message> @@ -26,8 +25,8 @@ <context> <name>QDialogButtonBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="361"/> - <location filename="../widget/messagebox/message-box.cpp" line="1089"/> + <location filename="../widget/messagebox/message-box.cpp" line="362"/> + <location filename="../widget/messagebox/message-box.cpp" line="1090"/> <source>OK</source> <translation>འགྲིགས།</translation> </message> @@ -35,15 +34,15 @@ <context> <name>QMessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="417"/> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="418"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Show Details...</source> <translation>ཞིབ་ཕྲའི་གནས་ཚུལ་གསལ་བཤད་བྱ་དགོས།</translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Hide Details...</source> <translation>གནས་ཚུལ་ཞིབ་ཕྲ་སྦས་སྐུང་བྱེད་</translation> </message> @@ -51,57 +50,47 @@ <context> <name>QObject</name> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> <source>File Name</source> - <translation>ཡིག་ཆའི་མིང་།</translation> + <translation type="vanished">ཡིག་ཆའི་མིང་།</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> <source>Modified Date</source> - <translation>བཟོ་བཅོས་བརྒྱབ་པའི་དུས་ཚོད།</translation> + <translation type="vanished">བཟོ་བཅོས་བརྒྱབ་པའི་དུས་ཚོད།</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> <source>File Type</source> - <translation>ཡིག་ཆའི་རིགས་གྲས།</translation> + <translation type="vanished">ཡིག་ཆའི་རིགས་གྲས།</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> <source>File Size</source> - <translation>ཡིག་ཆའི་ཆེ་ཆུང་།</translation> + <translation type="vanished">ཡིག་ཆའི་ཆེ་ཆུང་།</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> <source>Original Path</source> - <translation>ཐོག་མའི་འགྲོ་ལམ།</translation> + <translation type="vanished">ཐོག་མའི་འགྲོ་ལམ།</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> <source>Descending</source> - <translation>མར་འབབ་པ།</translation> + <translation type="vanished">མར་འབབ་པ།</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> <source>Ascending</source> - <translation>རིམ་པ་ཇེ་མང་དུ་འགྲོ་བཞིན།</translation> + <translation type="vanished">རིམ་པ་ཇེ་མང་དུ་འགྲོ་བཞིན།</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> <source>Use global sorting</source> - <translation>ཁྱོན་ཡོངས་ཀྱི་གོ་རིམ་བེད་སྤྱོད།</translation> + <translation type="vanished">ཁྱོན་ཡོངས་ཀྱི་གོ་རིམ་བེད་སྤྱོད།</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> <source>List View</source> - <translation>མཐོང་རིས་རེའུ་མིག</translation> + <translation type="vanished">མཐོང་རིས་རེའུ་མིག</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> <source>Icon View</source> - <translation>མཚོན་རྟགས་ལྟ་ཚུལ།</translation> + <translation type="vanished">མཚོན་རྟགས་ལྟ་ཚུལ།</translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="729"/> + <location filename="../widget/messagebox/message-box.cpp" line="730"/> <source>Close</source> <translation>ཁ་རྒྱག་པ།</translation> </message> @@ -122,143 +111,111 @@ <context> <name>UKUIFileDialog::KyFileDialogHelper</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> <source>Open File</source> - <translation>ཁ་ཕྱེ་བའི་ཡིག་ཆ།</translation> + <translation type="vanished">ཁ་ཕྱེ་བའི་ཡིག་ཆ།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> <source>Save File</source> - <translation>ཡིག་ཆ་ཉར་ཚགས་བྱེད་པ།</translation> + <translation type="vanished">ཡིག་ཆ་ཉར་ཚགས་བྱེད་པ།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> <source>All Files (*)</source> - <translation>ཡིག་ཆ་ཡོད་ཚད་(*)</translation> + <translation type="vanished">ཡིག་ཆ་ཡོད་ཚད་(*)</translation> </message> </context> <context> <name>UKUIFileDialog::KyNativeFileDialog</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> <source>Go Back</source> - <translation>ཕྱིར་ལོག</translation> + <translation type="vanished">ཕྱིར་ལོག</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> <source>Go Forward</source> - <translation>མདུན་སྐྱོད།</translation> + <translation type="vanished">མདུན་སྐྱོད།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> <source>Cd Up</source> - <translation>གོང་ཕྱོགས།</translation> + <translation type="vanished">གོང་ཕྱོགས།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> <source>Search</source> - <translation>འཚོལ་ཞིབ།</translation> + <translation type="vanished">འཚོལ་ཞིབ།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> <source>View Type</source> - <translation>མཐོང་རིས་ཀྱི་རིགས།</translation> + <translation type="vanished">མཐོང་རིས་ཀྱི་རིགས།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> <source>Sort Type</source> - <translation>གོ་རིམ་གྱི་རིགས།</translation> + <translation type="vanished">གོ་རིམ་གྱི་རིགས།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> <source>Maximize</source> - <translation>ཆེས་ཆེ་བསྒྱུར།</translation> + <translation type="vanished">ཆེས་ཆེ་བསྒྱུར།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> <source>Close</source> - <translation>ཁ་རྒྱག་པ།</translation> + <translation type="vanished">ཁ་རྒྱག་པ།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> <source>Restore</source> - <translation>སླར་གསོ་བྱེད་པ།</translation> + <translation type="vanished">སླར་གསོ་བྱེད་པ།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> <source>Name</source> - <translation>ཡིག་ཆའི་མིང་།</translation> + <translation type="vanished">ཡིག་ཆའི་མིང་།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> <source>Open</source> - <translation>སྒོ་ཕྱེ་བ།</translation> + <translation type="vanished">སྒོ་ཕྱེ་བ།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> <source>Cancel</source> - <translation>ཕྱིར་འཐེན།</translation> + <translation type="vanished">ཕྱིར་འཐེན།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> <source>Save as</source> - <translation>ཉར་ཚགས་གཞན།</translation> + <translation type="vanished">ཉར་ཚགས་གཞན།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> <source>New Folder</source> - <translation>ཡིག་ཁུག་གསར་འཛུགས།</translation> + <translation type="vanished">ཡིག་ཁུག་གསར་འཛུགས།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> <source>Save</source> - <translation>གྲོན་ཆུང་བྱེད་དགོས།</translation> + <translation type="vanished">གྲོན་ཆུང་བྱེད་དགོས།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> <source>Directories</source> - <translation>དཀར་ཆག</translation> + <translation type="vanished">དཀར་ཆག</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> <source>Warning</source> - <translation>ཐ་ཚིག་སྒྲོག་པ།</translation> + <translation type="vanished">ཐ་ཚིག་སྒྲོག་པ།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> <source>exist, are you sure replace?</source> - <translation>གནས་ཡོད་པས། ཁྱོད་ཀྱིས་དངོས་གནས་ཚབ་བྱེད་ཐུབ་བམ།</translation> + <translation type="vanished">གནས་ཡོད་པས། ཁྱོད་ཀྱིས་དངོས་གནས་ཚབ་བྱེད་ཐུབ་བམ།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> <source>NewFolder</source> - <translation>དཀར་ཆག་གསར་བ།</translation> + <translation type="vanished">དཀར་ཆག་གསར་བ།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> <source>Undo</source> - <translation>ཁ་ཕྱིར་འཐེན་བྱ་དགོས།</translation> + <translation type="vanished">ཁ་ཕྱིར་འཐེན་བྱ་དགོས།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> <source>Redo</source> - <translation>ཡང་བསྐྱར་ལས།</translation> + <translation type="vanished">ཡང་བསྐྱར་ལས།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> <source>warn</source> - <translation>ཉེན་བརྡ་བཏང་བ།</translation> + <translation type="vanished">ཉེན་བརྡ་བཏང་བ།</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> <source>This operation is not supported.</source> - <translation>བཀོལ་སྤྱོད་འདི་ལ་རྒྱབ་སྐྱོར་མི་བྱེད།</translation> + <translation type="vanished">བཀོལ་སྤྱོད་འདི་ལ་རྒྱབ་སྐྱོར་མི་བྱེད།</translation> </message> </context> </TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_cs.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_cs.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_cs.ts 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_cs.ts 2024-12-20 09:22:49.000000000 +0800 @@ -4,7 +4,7 @@ <context> <name>MessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="96"/> + <location filename="../widget/messagebox/message-box.cpp" line="97"/> <source>Close</source> <translation type="unfinished"></translation> </message> @@ -25,8 +25,8 @@ <context> <name>QDialogButtonBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="361"/> - <location filename="../widget/messagebox/message-box.cpp" line="1089"/> + <location filename="../widget/messagebox/message-box.cpp" line="362"/> + <location filename="../widget/messagebox/message-box.cpp" line="1090"/> <source>OK</source> <translation type="unfinished"></translation> </message> @@ -34,15 +34,15 @@ <context> <name>QMessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="417"/> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="418"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Show Details...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Hide Details...</source> <translation type="unfinished"></translation> </message> @@ -50,57 +50,7 @@ <context> <name>QObject</name> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> - <source>File Name</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> - <source>Modified Date</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> - <source>File Type</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> - <source>File Size</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> - <source>Original Path</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> - <source>Descending</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> - <source>Ascending</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> - <source>Use global sorting</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> - <source>List View</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> - <source>Icon View</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="729"/> + <location filename="../widget/messagebox/message-box.cpp" line="730"/> <source>Close</source> <translation type="unfinished"></translation> </message> @@ -118,146 +68,4 @@ <translation type="unfinished"></translation> </message> </context> -<context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> - <source>Open File</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> - <source>Save File</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> - <source>All Files (*)</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> - <source>Go Back</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> - <source>Go Forward</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> - <source>Cd Up</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> - <source>View Type</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> - <source>Sort Type</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> - <source>Maximize</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> - <source>Close</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> - <source>Restore</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> - <source>Name</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> - <source>Open</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> - <source>Cancel</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> - <source>Save as</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> - <source>New Folder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> - <source>Save</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> - <source>Directories</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> - <source>Warning</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> - <source>exist, are you sure replace?</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> - <source>NewFolder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> - <source>Undo</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> - <source>Redo</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> - <source>warn</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> - <source>This operation is not supported.</source> - <translation type="unfinished"></translation> - </message> -</context> </TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_de.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_de.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_de.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_de.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="de"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>Schließen</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>Die ausführbare Datei '%1' erfordert Qt %2, Qt %3 gefunden.</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation>Fehler in der inkompatiblen Qt-Bibliothek</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>OKAY</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation>Details anzeigen...</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation>Details ausblenden...</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation>Dateiname</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation>Änderungsdatum</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation>Dateityp</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation>Dateigröße</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation>Ursprünglicher Pfad</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation>Absteigend</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation>Aufsteigend</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation>Globale Sortierung verwenden</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation>Listenansicht</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation>Icon-Ansicht</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation>Schließen</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>Standard-Folie</translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>Lassen Sie das Tab-Widget mit einer Folienanimation wechseln.</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation>Offene Linie</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation>Datei speichern</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation>Alle Dateien (*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>Zurück</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>Vorwärts gehen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>Cd nach oben</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>Suchen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>Typ der Ansicht</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>Art der Sortierung</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>Maximieren</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>Schließen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>Wiederherstellen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>Name</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>Offen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>Abbrechen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>Speichern unter</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>Neuer Ordner</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>Retten</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>Verzeichnisse</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>Warnung</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>existieren, sind Sie sicher, ersetzen?</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation>Neuer Ordner</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation>Aufmachen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation>Noch einmal machen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation>warnen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation>Dieser Vorgang wird nicht unterstützt.</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_en_US.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_en_US.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_en_US.ts 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_en_US.ts 2024-12-20 09:22:49.000000000 +0800 @@ -4,7 +4,7 @@ <context> <name>MessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="96"/> + <location filename="../widget/messagebox/message-box.cpp" line="97"/> <source>Close</source> <translation>Close</translation> </message> @@ -14,93 +14,83 @@ <message> <location filename="../widget/messagebox/message-box.h" line="272"/> <source>Executable '%1' requires Qt %2, found Qt %3.</source> - <translation type="unfinished"></translation> + <translation>Executable '%1' requires Qt %2, found Qt %3.</translation> </message> <message> <location filename="../widget/messagebox/message-box.h" line="274"/> <source>Incompatible Qt Library Error</source> - <translation type="unfinished"></translation> + <translation>Incompatible Qt Library Error</translation> </message> </context> <context> <name>QDialogButtonBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="361"/> - <location filename="../widget/messagebox/message-box.cpp" line="1089"/> + <location filename="../widget/messagebox/message-box.cpp" line="362"/> + <location filename="../widget/messagebox/message-box.cpp" line="1090"/> <source>OK</source> - <translation type="unfinished"></translation> + <translation>OK</translation> </message> </context> <context> <name>QMessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="417"/> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="418"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Show Details...</source> - <translation type="unfinished"></translation> + <translation>Show Details...</translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Hide Details...</source> - <translation type="unfinished"></translation> + <translation>Hide Details...</translation> </message> </context> <context> <name>QObject</name> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> <source>File Name</source> - <translation>File Name</translation> + <translation type="vanished">File Name</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> <source>Modified Date</source> - <translation>Modified Date</translation> + <translation type="vanished">Modified Date</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> <source>File Type</source> - <translation>File Type</translation> + <translation type="vanished">File Type</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> <source>File Size</source> - <translation>File Size</translation> + <translation type="vanished">File Size</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> <source>Original Path</source> - <translation>Original Path</translation> + <translation type="vanished">Original Path</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> <source>Descending</source> - <translation>Descending</translation> + <translation type="vanished">Descending</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> <source>Ascending</source> - <translation>Ascending</translation> + <translation type="vanished">Ascending</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> <source>Use global sorting</source> - <translation>Use global sorting</translation> + <translation type="vanished">Use global sorting</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> <source>List View</source> - <translation>List View</translation> + <translation type="vanished">List View</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> <source>Icon View</source> - <translation>Icon View</translation> + <translation type="vanished">Icon View</translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="729"/> + <location filename="../widget/messagebox/message-box.cpp" line="730"/> <source>Close</source> <translation>Close</translation> </message> @@ -121,143 +111,111 @@ <context> <name>UKUIFileDialog::KyFileDialogHelper</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> <source>Open File</source> - <translation>Open File</translation> + <translation type="vanished">Open File</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> <source>Save File</source> - <translation>Save File</translation> + <translation type="vanished">Save File</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> <source>All Files (*)</source> - <translation>All Files (*)</translation> + <translation type="vanished">All Files (*)</translation> </message> </context> <context> <name>UKUIFileDialog::KyNativeFileDialog</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> <source>Go Back</source> - <translation>Go Back</translation> + <translation type="vanished">Go Back</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> <source>Go Forward</source> - <translation>Go Forward</translation> + <translation type="vanished">Go Forward</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> <source>Cd Up</source> - <translation>Cd Up</translation> + <translation type="vanished">Cd Up</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> <source>Search</source> - <translation>Search</translation> + <translation type="vanished">Search</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> <source>View Type</source> - <translation>View Type</translation> + <translation type="vanished">View Type</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> <source>Sort Type</source> - <translation>Sort Type</translation> + <translation type="vanished">Sort Type</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> <source>Maximize</source> - <translation>Maximize</translation> + <translation type="vanished">Maximize</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> <source>Close</source> - <translation>Close</translation> + <translation type="vanished">Close</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> <source>Restore</source> - <translation>Restore</translation> + <translation type="vanished">Restore</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> <source>Name</source> - <translation>Name</translation> + <translation type="vanished">Name</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> <source>Open</source> - <translation>Open</translation> + <translation type="vanished">Open</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> <source>Cancel</source> - <translation>Cancel</translation> + <translation type="vanished">Cancel</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> <source>Save as</source> - <translation>Save as</translation> + <translation type="vanished">Save as</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> <source>New Folder</source> - <translation>New Folder</translation> + <translation type="vanished">New Folder</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> <source>Save</source> - <translation>Save</translation> + <translation type="vanished">Save</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> <source>Directories</source> - <translation>Directories</translation> + <translation type="vanished">Directories</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> <source>Warning</source> - <translation>Warning</translation> + <translation type="vanished">Warning</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> <source>exist, are you sure replace?</source> - <translation>exist, are you sure replace?</translation> + <translation type="vanished">exist, are you sure replace?</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> <source>NewFolder</source> - <translation>NewFolder</translation> + <translation type="vanished">NewFolder</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> <source>Undo</source> - <translation>Undo</translation> + <translation type="vanished">Undo</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> <source>Redo</source> - <translation>Redo</translation> + <translation type="vanished">Redo</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> <source>warn</source> - <translation>warn</translation> + <translation type="vanished">warn</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> <source>This operation is not supported.</source> - <translation>This operation is not supported.</translation> + <translation type="vanished">This operation is not supported.</translation> </message> </context> </TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_es.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_es.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_es.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_es.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="es"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fa.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fa.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fa.ts 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fa.ts 2024-12-20 09:22:49.000000000 +0800 @@ -4,7 +4,7 @@ <context> <name>MessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="96"/> + <location filename="../widget/messagebox/message-box.cpp" line="97"/> <source>Close</source> <translation type="unfinished"></translation> </message> @@ -25,8 +25,8 @@ <context> <name>QDialogButtonBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="361"/> - <location filename="../widget/messagebox/message-box.cpp" line="1089"/> + <location filename="../widget/messagebox/message-box.cpp" line="362"/> + <location filename="../widget/messagebox/message-box.cpp" line="1090"/> <source>OK</source> <translation type="unfinished"></translation> </message> @@ -34,15 +34,15 @@ <context> <name>QMessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="417"/> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="418"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Show Details...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Hide Details...</source> <translation type="unfinished"></translation> </message> @@ -50,57 +50,7 @@ <context> <name>QObject</name> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> - <source>File Name</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> - <source>Modified Date</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> - <source>File Type</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> - <source>File Size</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> - <source>Original Path</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> - <source>Descending</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> - <source>Ascending</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> - <source>Use global sorting</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> - <source>List View</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> - <source>Icon View</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="729"/> + <location filename="../widget/messagebox/message-box.cpp" line="730"/> <source>Close</source> <translation type="unfinished"></translation> </message> @@ -118,146 +68,4 @@ <translation type="unfinished"></translation> </message> </context> -<context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> - <source>Open File</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> - <source>Save File</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> - <source>All Files (*)</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> - <source>Go Back</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> - <source>Go Forward</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> - <source>Cd Up</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> - <source>View Type</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> - <source>Sort Type</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> - <source>Maximize</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> - <source>Close</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> - <source>Restore</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> - <source>Name</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> - <source>Open</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> - <source>Cancel</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> - <source>Save as</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> - <source>New Folder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> - <source>Save</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> - <source>Directories</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> - <source>Warning</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> - <source>exist, are you sure replace?</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> - <source>NewFolder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> - <source>Undo</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> - <source>Redo</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> - <source>warn</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> - <source>This operation is not supported.</source> - <translation type="unfinished"></translation> - </message> -</context> </TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fr.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fr.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fr.ts 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_fr.ts 2024-12-20 09:22:49.000000000 +0800 @@ -4,9 +4,9 @@ <context> <name>MessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="96"/> + <location filename="../widget/messagebox/message-box.cpp" line="97"/> <source>Close</source> - <translation type="unfinished"></translation> + <translation>Fermer</translation> </message> </context> <context> @@ -14,95 +14,85 @@ <message> <location filename="../widget/messagebox/message-box.h" line="272"/> <source>Executable '%1' requires Qt %2, found Qt %3.</source> - <translation type="unfinished"></translation> + <translation>L’exécutable '%1' nécessite Qt %2, trouvé Qt %3.</translation> </message> <message> <location filename="../widget/messagebox/message-box.h" line="274"/> <source>Incompatible Qt Library Error</source> - <translation type="unfinished"></translation> + <translation>Erreur de bibliothèque Qt incompatible</translation> </message> </context> <context> <name>QDialogButtonBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="361"/> - <location filename="../widget/messagebox/message-box.cpp" line="1089"/> + <location filename="../widget/messagebox/message-box.cpp" line="362"/> + <location filename="../widget/messagebox/message-box.cpp" line="1090"/> <source>OK</source> - <translation type="unfinished"></translation> + <translation>D’ACCORD</translation> </message> </context> <context> <name>QMessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="417"/> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="418"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Show Details...</source> - <translation type="unfinished"></translation> + <translation>Afficher les détails...</translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Hide Details...</source> - <translation type="unfinished"></translation> + <translation>Masquer les détails...</translation> </message> </context> <context> <name>QObject</name> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> <source>File Name</source> - <translation type="unfinished"></translation> + <translation type="vanished">Nom du fichier</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> <source>Modified Date</source> - <translation type="unfinished"></translation> + <translation type="vanished">Date de modification</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> <source>File Type</source> - <translation type="unfinished"></translation> + <translation type="vanished">Type de fichier</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> <source>File Size</source> - <translation type="unfinished"></translation> + <translation type="vanished">Taille du fichier</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> <source>Original Path</source> - <translation type="unfinished"></translation> + <translation type="vanished">Chemin d’accès d’origine</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> <source>Descending</source> - <translation type="unfinished"></translation> + <translation type="vanished">Descendant</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> <source>Ascending</source> - <translation type="unfinished"></translation> + <translation type="vanished">Ascendant</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> <source>Use global sorting</source> - <translation type="unfinished"></translation> + <translation type="vanished">Utiliser le tri global</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> <source>List View</source> - <translation type="unfinished"></translation> + <translation type="vanished">Affichage en liste</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> <source>Icon View</source> - <translation type="unfinished"></translation> + <translation type="vanished">Affichage de l’icône</translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="729"/> + <location filename="../widget/messagebox/message-box.cpp" line="730"/> <source>Close</source> - <translation type="unfinished"></translation> + <translation type="unfinished">Fermer</translation> </message> </context> <context> @@ -110,154 +100,122 @@ <message> <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> <source>Default Slide</source> - <translation type="unfinished"></translation> + <translation>Diapositive par défaut</translation> </message> <message> <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> + <translation>Laissez le widget d’onglet basculer avec une animation de diapositive.</translation> </message> </context> <context> <name>UKUIFileDialog::KyFileDialogHelper</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> <source>Open File</source> - <translation type="unfinished"></translation> + <translation type="vanished">Ouvrir un fichier</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> <source>Save File</source> - <translation type="unfinished"></translation> + <translation type="vanished">Enregistrer le fichier</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> <source>All Files (*)</source> - <translation type="unfinished"></translation> + <translation type="vanished">Tous les fichiers (*)</translation> </message> </context> <context> <name>UKUIFileDialog::KyNativeFileDialog</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> <source>Go Back</source> - <translation type="unfinished"></translation> + <translation type="vanished">Retour</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> <source>Go Forward</source> - <translation type="unfinished"></translation> + <translation type="vanished">Avancer</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> <source>Cd Up</source> - <translation type="unfinished"></translation> + <translation type="vanished">Cd Up</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> <source>Search</source> - <translation type="unfinished"></translation> + <translation type="vanished">Rechercher</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> <source>View Type</source> - <translation type="unfinished"></translation> + <translation type="vanished">Type de vue</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> <source>Sort Type</source> - <translation type="unfinished"></translation> + <translation type="vanished">Type de tri</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> <source>Maximize</source> - <translation type="unfinished"></translation> + <translation type="vanished">Maximiser</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> <source>Close</source> - <translation type="unfinished"></translation> + <translation type="vanished">Fermer</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> <source>Restore</source> - <translation type="unfinished"></translation> + <translation type="vanished">Restaurer</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> <source>Name</source> - <translation type="unfinished"></translation> + <translation type="vanished">Nom</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> <source>Open</source> - <translation type="unfinished"></translation> + <translation type="vanished">Ouvrir</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> <source>Cancel</source> - <translation type="unfinished"></translation> + <translation type="vanished">Annuler</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> <source>Save as</source> - <translation type="unfinished"></translation> + <translation type="vanished">Enregistrer sous</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> <source>New Folder</source> - <translation type="unfinished"></translation> + <translation type="vanished">Nouveau dossier</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> <source>Save</source> - <translation type="unfinished"></translation> + <translation type="vanished">Sauvegarder</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> <source>Directories</source> - <translation type="unfinished"></translation> + <translation type="vanished">Téléphonique</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> <source>Warning</source> - <translation type="unfinished"></translation> + <translation type="vanished">Avertissement</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> <source>exist, are you sure replace?</source> - <translation type="unfinished"></translation> + <translation type="vanished">exister, êtes-vous sûr de remplacer ?</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> <source>NewFolder</source> - <translation type="unfinished"></translation> + <translation type="vanished">NouveauDossier</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> <source>Undo</source> - <translation type="unfinished"></translation> + <translation type="vanished">Défaire</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> <source>Redo</source> - <translation type="unfinished"></translation> + <translation type="vanished">Refaire</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> <source>warn</source> - <translation type="unfinished"></translation> + <translation type="vanished">avertir</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> <source>This operation is not supported.</source> - <translation type="unfinished"></translation> + <translation type="vanished">Cette opération n’est pas prise en charge.</translation> </message> </context> </TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_kk.ts 2024-12-20 09:22:49.000000000 +0800 @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.1" language="kk_KZ"> +<TS version="2.1" language="kk"> <context> <name>MessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="96"/> + <location filename="../widget/messagebox/message-box.cpp" line="97"/> <source>Close</source> - <translation type="unfinished"></translation> + <translation>تاقاۋ</translation> </message> </context> <context> @@ -14,95 +14,85 @@ <message> <location filename="../widget/messagebox/message-box.h" line="272"/> <source>Executable '%1' requires Qt %2, found Qt %3.</source> - <translation type="unfinished"></translation> + <translation>اتقار ىستەۋگە بولاتٸن حۇجات 1، مۇقتاجدىق ارگومەنتتٸ 2، ٸزدەپ تاپقان ارگومەنتتٸ 3</translation> </message> <message> <location filename="../widget/messagebox/message-box.h" line="274"/> <source>Incompatible Qt Library Error</source> - <translation type="unfinished"></translation> + <translation>سىغىشمىغانQT قامبادا قاتەلىك كورىلدى</translation> </message> </context> <context> <name>QDialogButtonBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="361"/> - <location filename="../widget/messagebox/message-box.cpp" line="1089"/> + <location filename="../widget/messagebox/message-box.cpp" line="362"/> + <location filename="../widget/messagebox/message-box.cpp" line="1090"/> <source>OK</source> - <translation type="unfinished"></translation> + <translation>ماقۇل</translation> </message> </context> <context> <name>QMessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="417"/> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="418"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Show Details...</source> - <translation type="unfinished"></translation> + <translation>ناقتى مازمۇنىن كورسەتۋ</translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Hide Details...</source> - <translation type="unfinished"></translation> + <translation>ناقتى مازمۇنىن جاسىرۋ</translation> </message> </context> <context> <name>QObject</name> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> <source>File Name</source> - <translation type="unfinished"></translation> + <translation type="vanished">文件名称</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> <source>Modified Date</source> - <translation type="unfinished"></translation> + <translation type="vanished">修改日期</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> <source>File Type</source> - <translation type="unfinished"></translation> + <translation type="vanished">文件类型</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> <source>File Size</source> - <translation type="unfinished"></translation> + <translation type="vanished">文件大小</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> <source>Original Path</source> - <translation type="unfinished"></translation> + <translation type="vanished">原始路径</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> <source>Descending</source> - <translation type="unfinished"></translation> + <translation type="vanished">降序</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> <source>Ascending</source> - <translation type="unfinished"></translation> + <translation type="vanished">升序</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> <source>Use global sorting</source> - <translation type="unfinished"></translation> + <translation type="vanished">使用全局排序</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> <source>List View</source> - <translation type="unfinished"></translation> + <translation type="vanished">列表视图</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> <source>Icon View</source> - <translation type="unfinished"></translation> + <translation type="vanished">图标视图</translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="729"/> + <location filename="../widget/messagebox/message-box.cpp" line="730"/> <source>Close</source> - <translation type="unfinished"></translation> + <translation>تاقاۋ</translation> </message> </context> <context> @@ -110,154 +100,122 @@ <message> <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> <source>Default Slide</source> - <translation type="unfinished"></translation> + <translation>الدىن بەكٸتٸلگەن slide</translation> </message> <message> <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> + <translation>تالدانبا كارتونىن كشكەنە زاپشاستارىن پٸروبيكسيا كارتون فىلىمىگە سايكەستىرۋ</translation> </message> </context> <context> <name>UKUIFileDialog::KyFileDialogHelper</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> <source>Open File</source> - <translation type="unfinished"></translation> + <translation type="vanished">打开</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> <source>Save File</source> - <translation type="unfinished"></translation> + <translation type="vanished">保存</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> <source>All Files (*)</source> - <translation type="unfinished"></translation> + <translation type="vanished">所有(*)</translation> </message> </context> <context> <name>UKUIFileDialog::KyNativeFileDialog</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> <source>Go Back</source> - <translation type="unfinished"></translation> + <translation type="vanished">后退</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> <source>Go Forward</source> - <translation type="unfinished"></translation> + <translation type="vanished">前进</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> <source>Cd Up</source> - <translation type="unfinished"></translation> + <translation type="vanished">向上</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> <source>Search</source> - <translation type="unfinished"></translation> + <translation type="vanished">搜索</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> <source>View Type</source> - <translation type="unfinished"></translation> + <translation type="vanished">视图类型</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> <source>Sort Type</source> - <translation type="unfinished"></translation> + <translation type="vanished">排序类型</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> <source>Maximize</source> - <translation type="unfinished"></translation> + <translation type="vanished">最大化</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> <source>Close</source> - <translation type="unfinished"></translation> + <translation type="vanished">关闭</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> <source>Restore</source> - <translation type="unfinished"></translation> + <translation type="vanished">还原</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> <source>Name</source> - <translation type="unfinished"></translation> + <translation type="vanished">文件名</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> <source>Open</source> - <translation type="unfinished"></translation> + <translation type="vanished">打开</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> <source>Cancel</source> - <translation type="unfinished"></translation> + <translation type="vanished">取消</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> <source>Save as</source> - <translation type="unfinished"></translation> + <translation type="vanished">另存为</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> <source>New Folder</source> - <translation type="unfinished"></translation> + <translation type="vanished">新建文件夹</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> <source>Save</source> - <translation type="unfinished"></translation> + <translation type="vanished">保存</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> <source>Directories</source> - <translation type="unfinished"></translation> + <translation type="vanished">目录</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> <source>Warning</source> - <translation type="unfinished"></translation> + <translation type="vanished">警告</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> <source>exist, are you sure replace?</source> - <translation type="unfinished"></translation> + <translation type="vanished">已存在,是否替换?</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> <source>NewFolder</source> - <translation type="unfinished"></translation> + <translation type="vanished">新建文件夹</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> <source>Undo</source> - <translation type="unfinished"></translation> + <translation type="vanished">撤销</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> <source>Redo</source> - <translation type="unfinished"></translation> + <translation type="vanished">重做</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> <source>warn</source> - <translation type="unfinished"></translation> + <translation type="vanished">警告</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> <source>This operation is not supported.</source> - <translation type="unfinished"></translation> + <translation type="vanished">不支持此操作。</translation> </message> </context> </TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ky.ts 2024-12-20 09:22:49.000000000 +0800 @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.1" language="ky_KG"> +<TS version="2.1" language="ky"> <context> <name>MessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="96"/> + <location filename="../widget/messagebox/message-box.cpp" line="97"/> <source>Close</source> - <translation type="unfinished"></translation> + <translation>بەكىتىش</translation> </message> </context> <context> @@ -14,95 +14,85 @@ <message> <location filename="../widget/messagebox/message-box.h" line="272"/> <source>Executable '%1' requires Qt %2, found Qt %3.</source> - <translation type="unfinished"></translation> + <translation>اتقارماق جاسووعو بولوتۇرعان ۅجۅت 1، كەرەكتۉۉ سان 2، ىزدەپ تاپقان سان 3</translation> </message> <message> <location filename="../widget/messagebox/message-box.h" line="274"/> <source>Incompatible Qt Library Error</source> - <translation type="unfinished"></translation> + <translation>سىغىشمىغانQT قامپادا قاتاالىق كۅرۉلدۉ</translation> </message> </context> <context> <name>QDialogButtonBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="361"/> - <location filename="../widget/messagebox/message-box.cpp" line="1089"/> + <location filename="../widget/messagebox/message-box.cpp" line="362"/> + <location filename="../widget/messagebox/message-box.cpp" line="1090"/> <source>OK</source> - <translation type="unfinished"></translation> + <translation>ماقۇل</translation> </message> </context> <context> <name>QMessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="417"/> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="418"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Show Details...</source> - <translation type="unfinished"></translation> + <translation>جۅن جايىن كۅرسۅتۉۉ</translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Hide Details...</source> - <translation type="unfinished"></translation> + <translation>جۅن جايىن جاشىرۇۇ</translation> </message> </context> <context> <name>QObject</name> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> <source>File Name</source> - <translation type="unfinished"></translation> + <translation type="vanished">文件名称</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> <source>Modified Date</source> - <translation type="unfinished"></translation> + <translation type="vanished">修改日期</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> <source>File Type</source> - <translation type="unfinished"></translation> + <translation type="vanished">文件类型</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> <source>File Size</source> - <translation type="unfinished"></translation> + <translation type="vanished">文件大小</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> <source>Original Path</source> - <translation type="unfinished"></translation> + <translation type="vanished">原始路径</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> <source>Descending</source> - <translation type="unfinished"></translation> + <translation type="vanished">降序</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> <source>Ascending</source> - <translation type="unfinished"></translation> + <translation type="vanished">升序</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> <source>Use global sorting</source> - <translation type="unfinished"></translation> + <translation type="vanished">使用全局排序</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> <source>List View</source> - <translation type="unfinished"></translation> + <translation type="vanished">列表视图</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> <source>Icon View</source> - <translation type="unfinished"></translation> + <translation type="vanished">图标视图</translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="729"/> + <location filename="../widget/messagebox/message-box.cpp" line="730"/> <source>Close</source> - <translation type="unfinished"></translation> + <translation>بەكىتىش</translation> </message> </context> <context> @@ -110,154 +100,122 @@ <message> <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> <source>Default Slide</source> - <translation type="unfinished"></translation> + <translation>الدىن بەكىتىلگەن slide</translation> </message> <message> <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> + <translation>تاندالما كارتاداقى كىچىك شايمانداردى پرويەكسىيە كارتون فىلىمىگە الماشتىرۇۇ</translation> </message> </context> <context> <name>UKUIFileDialog::KyFileDialogHelper</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> <source>Open File</source> - <translation type="unfinished"></translation> + <translation type="vanished">打开</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> <source>Save File</source> - <translation type="unfinished"></translation> + <translation type="vanished">保存</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> <source>All Files (*)</source> - <translation></translation> + <translation type="vanished">所有(*)</translation> </message> </context> <context> <name>UKUIFileDialog::KyNativeFileDialog</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> <source>Go Back</source> - <translation type="unfinished"></translation> + <translation type="vanished">后退</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> <source>Go Forward</source> - <translation type="unfinished"></translation> + <translation type="vanished">前进</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> <source>Cd Up</source> - <translation type="unfinished"></translation> + <translation type="vanished">向上</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> <source>Search</source> - <translation type="unfinished"></translation> + <translation type="vanished">搜索</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> <source>View Type</source> - <translation type="unfinished"></translation> + <translation type="vanished">视图类型</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> <source>Sort Type</source> - <translation type="unfinished"></translation> + <translation type="vanished">排序类型</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> <source>Maximize</source> - <translation type="unfinished"></translation> + <translation type="vanished">最大化</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> <source>Close</source> - <translation type="unfinished"></translation> + <translation type="vanished">关闭</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> <source>Restore</source> - <translation type="unfinished"></translation> + <translation type="vanished">还原</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> <source>Name</source> - <translation type="unfinished"></translation> + <translation type="vanished">文件名</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> <source>Open</source> - <translation type="unfinished"></translation> + <translation type="vanished">打开</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> <source>Cancel</source> - <translation type="unfinished"></translation> + <translation type="vanished">取消</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> <source>Save as</source> - <translation type="unfinished"></translation> + <translation type="vanished">另存为</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> <source>New Folder</source> - <translation type="unfinished"></translation> + <translation type="vanished">新建文件夹</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> <source>Save</source> - <translation type="unfinished"></translation> + <translation type="vanished">保存</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> <source>Directories</source> - <translation type="unfinished"></translation> + <translation type="vanished">目录</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> <source>Warning</source> - <translation type="unfinished"></translation> + <translation type="vanished">警告</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> <source>exist, are you sure replace?</source> - <translation type="unfinished"></translation> + <translation type="vanished">已存在,是否替换?</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> <source>NewFolder</source> - <translation type="unfinished"></translation> + <translation type="vanished">新建文件夹</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> <source>Undo</source> - <translation type="unfinished"></translation> + <translation type="vanished">撤销</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> <source>Redo</source> - <translation type="unfinished"></translation> + <translation type="vanished">重做</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> <source>warn</source> - <translation type="unfinished"></translation> + <translation type="vanished">警告</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> <source>This operation is not supported.</source> - <translation type="unfinished"></translation> + <translation type="vanished">不支持此操作。</translation> </message> </context> </TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_mn.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_mn.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_mn.ts 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_mn.ts 2024-12-20 09:22:49.000000000 +0800 @@ -2,257 +2,220 @@ <!DOCTYPE TS> <TS version="2.1" language="mn_MN"> <context> - <name>KyFileDialogHelper</name> + <name>MessageBox</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2524"/> - <source>Open File</source> - <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> + <location filename="../widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>ᠬᠠᠭᠠᠬᠤ</translation> </message> +</context> +<context> + <name>QApplication</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2525"/> - <source>Save File</source> - <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> + <location filename="../widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>ᠭᠦᠢᠴᠡᠳᠬᠡᠵᠦ ᠪᠣᠯᠬᠤ ᠹᠠᠢᠯ '%1' Qt% 2 ᠬᠡᠷᠡᠭᠰᠡᠵᠦ ᠂ Qt% 3 ᠢ᠋/ ᠵᠢ ᠡᠷᠢᠵᠦ ᠣᠯᠬᠤ ᠬᠡᠷᠡᠭᠲᠡᠶ .</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2538"/> - <source>All Files (*)</source> - <translation>ᠪᠦᠬᠦᠢᠯᠡ (*)</translation> + <location filename="../widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation type="unfinished"></translation> </message> </context> <context> - <name>KyNativeFileDialog</name> + <name>QDialogButtonBox</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="192"/> - <source>Go Back</source> - <translation>ᠤᠬᠤᠷᠢᠬᠤ</translation> + <location filename="../widget/messagebox/message-box.cpp" line="362"/> + <location filename="../widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>OK</translation> </message> +</context> +<context> + <name>QMessageBox</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="199"/> - <source>Go Forward</source> - <translation>ᠤᠷᠤᠭᠰᠢᠯᠠᠬᠤ</translation> + <location filename="../widget/messagebox/message-box.cpp" line="418"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation type="unfinished"></translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="205"/> - <source>Cd Up</source> - <translation>ᠳᠡᠭᠡᠭᠰᠢ</translation> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation type="unfinished"></translation> </message> +</context> +<context> + <name>QObject</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="212"/> - <source>Search</source> - <translation>ᠬᠠᠢᠯᠳᠠ</translation> + <source>File Name</source> + <translation type="vanished">ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡᠢᠳᠦᠯ</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="220"/> - <source>View Type</source> - <translation>ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> + <source>Modified Date</source> + <translation type="vanished">ᠵᠠᠰᠠᠭᠰᠠᠨ ᠡᠳᠦᠷ ᠰᠠᠷᠠ</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="231"/> - <source>Sort Type</source> - <translation>ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> + <source>File Type</source> + <translation type="vanished">ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="348"/> - <source>Maximize</source> - <translation>ᠬᠠᠮᠤᠭ ᠤ᠋ᠨ ᠶᠡᠬᠡᠴᠢᠯᠡᠯ</translation> + <source>File Size</source> + <translation type="vanished">ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠶᠡᠬᠡ ᠪᠠᠭᠠ</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="250"/> - <source>Close</source> - <translation>ᠬᠠᠭᠠᠬᠤ</translation> + <source>Original Path</source> + <translation type="vanished">ᠤᠭ ᠤ᠋ᠨ ᠵᠠᠮ ᠱᠤᠭᠤᠮ</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="345"/> - <source>Restore</source> - <translation>ᠡᠬᠡᠬᠦᠯᠬᠦ</translation> + <source>Descending</source> + <translation type="vanished">ᠪᠠᠭᠠᠰᠬᠠᠬᠤ</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="941"/> - <source>Name</source> - <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡ</translation> + <source>Ascending</source> + <translation type="vanished">ᠶᠡᠬᠡᠰᠬᠡᠬᠦ</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="944"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1532"/> - <source>Open</source> - <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> + <source>Use global sorting</source> + <translation type="vanished">ᠪᠦᠬᠦ ᠪᠠᠢᠳᠠᠯ ᠤ᠋ᠨ ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠢ᠋ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="945"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="954"/> - <source>Cancel</source> - <translation>ᠦᠬᠡᠢᠰᠭᠡᠬᠦ᠌</translation> + <source>List View</source> + <translation type="vanished">ᠵᠢᠭᠰᠠᠭᠠᠯᠳᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="949"/> - <source>Save as</source> - <translation>ᠦᠭᠡᠷᠡ ᠭᠠᠵᠠᠷ ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> + <source>Icon View</source> + <translation type="vanished">ᠰᠢᠪᠠᠭᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> - <source>New Folder</source> - <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> + <location filename="../widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation>ᠬᠠᠭᠠᠬᠤ</translation> </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="953"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1536"/> - <source>Save</source> - <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>Default Slide</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="989"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="992"/> - <source>Directories</source> - <translation>ᠭᠠᠷᠴᠠᠭ</translation> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation type="unfinished"></translation> </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> - <source>Warning</source> - <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠦᠯ</translation> + <source>Open File</source> + <translation type="vanished">ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1181"/> - <source>exist, are you sure replace?</source> - <translation>ᠪᠠᠢᠨᠠ᠂ ᠰᠤᠯᠢᠬᠤ ᠤᠤ?</translation> + <source>Save File</source> + <translation type="vanished">ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1858"/> - <source>NewFolder</source> - <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> + <source>All Files (*)</source> + <translation type="vanished">ᠪᠦᠬᠦᠢᠯᠡ (*)</translation> </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2146"/> - <source>Undo</source> - <translation>ᠬᠦᠴᠦᠨ ᠦᠬᠡᠢ ᠪᠤᠯᠭᠠᠬᠤ</translation> + <source>Go Back</source> + <translation type="vanished">ᠤᠬᠤᠷᠢᠬᠤ</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2153"/> - <source>Redo</source> - <translation>ᠳᠠᠬᠢᠵᠤ ᠬᠢᠬᠦ</translation> + <source>Go Forward</source> + <translation type="vanished">ᠤᠷᠤᠭᠰᠢᠯᠠᠬᠤ</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> - <source>warn</source> - <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠬᠦ</translation> + <source>Cd Up</source> + <translation type="vanished">ᠳᠡᠭᠡᠭᠰᠢ</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2350"/> - <source>This operation is not supported.</source> - <translation>ᠳᠤᠰ ᠠᠵᠢᠯᠯᠠᠬᠤᠢ ᠵᠢ ᠳᠡᠮᠵᠢᠬᠦ ᠦᠬᠡᠢ.</translation> + <source>Search</source> + <translation type="vanished">ᠬᠠᠢᠯᠳᠠ</translation> </message> -</context> -<context> - <name>MessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="166"/> - <source>Close</source> - <translation>ᠬᠠᠭᠠᠬᠤ</translation> + <source>View Type</source> + <translation type="vanished">ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> </message> -</context> -<context> - <name>QApplication</name> <message> - <location filename="../widget/messagebox/message-box.h" line="190"/> - <source>Executable '%1' requires Qt %2, found Qt %3.</source> - <translation>ᠭᠦᠢᠴᠡᠳᠬᠡᠵᠦ ᠪᠣᠯᠬᠤ ᠹᠠᠢᠯ '%1' Qt% 2 ᠬᠡᠷᠡᠭᠰᠡᠵᠦ ᠂ Qt% 3 ᠢ᠋/ ᠵᠢ ᠡᠷᠢᠵᠦ ᠣᠯᠬᠤ ᠬᠡᠷᠡᠭᠲᠡᠶ .</translation> + <source>Sort Type</source> + <translation type="vanished">ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> </message> <message> - <location filename="../widget/messagebox/message-box.h" line="192"/> - <source>Incompatible Qt Library Error</source> - <translation type="unfinished"></translation> + <source>Maximize</source> + <translation type="vanished">ᠬᠠᠮᠤᠭ ᠤ᠋ᠨ ᠶᠡᠬᠡᠴᠢᠯᠡᠯ</translation> </message> -</context> -<context> - <name>QDialogButtonBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="423"/> - <location filename="../widget/messagebox/message-box.cpp" line="1106"/> - <source>OK</source> - <translation>OK</translation> + <source>Close</source> + <translation type="vanished">ᠬᠠᠭᠠᠬᠤ</translation> </message> -</context> -<context> - <name>QMessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="479"/> - <location filename="../widget/messagebox/message-box.cpp" line="897"/> - <location filename="../widget/messagebox/message-box.cpp" line="1518"/> - <source>Show Details...</source> - <translation type="unfinished"></translation> + <source>Restore</source> + <translation type="vanished">ᠡᠬᠡᠬᠦᠯᠬᠦ</translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="897"/> - <location filename="../widget/messagebox/message-box.cpp" line="1518"/> - <source>Hide Details...</source> - <translation type="unfinished"></translation> + <source>Name</source> + <translation type="vanished">ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡ</translation> </message> -</context> -<context> - <name>QObject</name> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="19"/> - <source>File Name</source> - <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡᠢᠳᠦᠯ</translation> + <source>Open</source> + <translation type="vanished">ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="23"/> - <source>Modified Date</source> - <translation>ᠵᠠᠰᠠᠭᠰᠠᠨ ᠡᠳᠦᠷ ᠰᠠᠷᠠ</translation> + <source>Cancel</source> + <translation type="vanished">ᠦᠬᠡᠢᠰᠭᠡᠬᠦ᠌</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="27"/> - <source>File Type</source> - <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> + <source>Save as</source> + <translation type="vanished">ᠦᠭᠡᠷᠡ ᠭᠠᠵᠠᠷ ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="31"/> - <source>File Size</source> - <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠶᠡᠬᠡ ᠪᠠᠭᠠ</translation> + <source>New Folder</source> + <translation type="vanished">ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="35"/> - <source>Original Path</source> - <translation>ᠤᠭ ᠤ᠋ᠨ ᠵᠠᠮ ᠱᠤᠭᠤᠮ</translation> + <source>Save</source> + <translation type="vanished">ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="44"/> - <source>Descending</source> - <translation>ᠪᠠᠭᠠᠰᠬᠠᠬᠤ</translation> + <source>Directories</source> + <translation type="vanished">ᠭᠠᠷᠴᠠᠭ</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="49"/> - <source>Ascending</source> - <translation>ᠶᠡᠬᠡᠰᠬᠡᠬᠦ</translation> + <source>Warning</source> + <translation type="vanished">ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠦᠯ</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="55"/> - <source>Use global sorting</source> - <translation>ᠪᠦᠬᠦ ᠪᠠᠢᠳᠠᠯ ᠤ᠋ᠨ ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠢ᠋ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ</translation> + <source>exist, are you sure replace?</source> + <translation type="vanished">ᠪᠠᠢᠨᠠ᠂ ᠰᠤᠯᠢᠬᠤ ᠤᠤ?</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="75"/> - <source>List View</source> - <translation>ᠵᠢᠭᠰᠠᠭᠠᠯᠳᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> + <source>NewFolder</source> + <translation type="vanished">ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="76"/> - <source>Icon View</source> - <translation>ᠰᠢᠪᠠᠭᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> + <source>Undo</source> + <translation type="vanished">ᠬᠦᠴᠦᠨ ᠦᠬᠡᠢ ᠪᠤᠯᠭᠠᠬᠤ</translation> </message> -</context> -<context> - <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> - <source>Default Slide</source> - <translation>Default Slide</translation> + <source>Redo</source> + <translation type="vanished">ᠳᠠᠬᠢᠵᠤ ᠬᠢᠬᠦ</translation> </message> <message> - <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> - <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> + <source>warn</source> + <translation type="vanished">ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠬᠦ</translation> + </message> + <message> + <source>This operation is not supported.</source> + <translation type="vanished">ᠳᠤᠰ ᠠᠵᠢᠯᠯᠠᠬᠤᠢ ᠵᠢ ᠳᠡᠮᠵᠢᠬᠦ ᠦᠬᠡᠢ.</translation> </message> </context> </TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_tr.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_tr.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_tr.ts 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_tr.ts 2024-12-20 09:22:49.000000000 +0800 @@ -4,7 +4,7 @@ <context> <name>MessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="96"/> + <location filename="../widget/messagebox/message-box.cpp" line="97"/> <source>Close</source> <translation type="unfinished"></translation> </message> @@ -25,8 +25,8 @@ <context> <name>QDialogButtonBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="361"/> - <location filename="../widget/messagebox/message-box.cpp" line="1089"/> + <location filename="../widget/messagebox/message-box.cpp" line="362"/> + <location filename="../widget/messagebox/message-box.cpp" line="1090"/> <source>OK</source> <translation type="unfinished"></translation> </message> @@ -34,15 +34,15 @@ <context> <name>QMessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="417"/> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="418"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Show Details...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Hide Details...</source> <translation type="unfinished"></translation> </message> @@ -50,57 +50,7 @@ <context> <name>QObject</name> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> - <source>File Name</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> - <source>Modified Date</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> - <source>File Type</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> - <source>File Size</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> - <source>Original Path</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> - <source>Descending</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> - <source>Ascending</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> - <source>Use global sorting</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> - <source>List View</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> - <source>Icon View</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/messagebox/message-box.cpp" line="729"/> + <location filename="../widget/messagebox/message-box.cpp" line="730"/> <source>Close</source> <translation type="unfinished"></translation> </message> @@ -118,146 +68,4 @@ <translation type="unfinished"></translation> </message> </context> -<context> - <name>UKUIFileDialog::KyFileDialogHelper</name> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> - <source>Open File</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> - <source>Save File</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> - <source>All Files (*)</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> - <name>UKUIFileDialog::KyNativeFileDialog</name> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> - <source>Go Back</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> - <source>Go Forward</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> - <source>Cd Up</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> - <source>Search</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> - <source>View Type</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> - <source>Sort Type</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> - <source>Maximize</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> - <source>Close</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> - <source>Restore</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> - <source>Name</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> - <source>Open</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> - <source>Cancel</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> - <source>Save as</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> - <source>New Folder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> - <source>Save</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> - <source>Directories</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> - <source>Warning</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> - <source>exist, are you sure replace?</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> - <source>NewFolder</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> - <source>Undo</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> - <source>Redo</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> - <source>warn</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> - <source>This operation is not supported.</source> - <translation type="unfinished"></translation> - </message> -</context> </TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_ug.ts 2024-12-20 09:22:49.000000000 +0800 @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.1" language="ug_CN"> +<TS version="2.1" language="ug"> <context> <name>MessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="96"/> + <location filename="../widget/messagebox/message-box.cpp" line="97"/> <source>Close</source> - <translation type="unfinished"></translation> + <translation>تاقاش</translation> </message> </context> <context> @@ -14,95 +14,85 @@ <message> <location filename="../widget/messagebox/message-box.h" line="272"/> <source>Executable '%1' requires Qt %2, found Qt %3.</source> - <translation type="unfinished"></translation> + <translation>ئىجرا قىلىشقا بولىدىغان ھۆججەت 1، ئىھتىياجلىق سان 2، ئىزدەپ تاپقان سان 3</translation> </message> <message> <location filename="../widget/messagebox/message-box.h" line="274"/> <source>Incompatible Qt Library Error</source> - <translation type="unfinished"></translation> + <translation>سىغىشمىغانQT ئامبىرىدا خاتالىق كۆرۈلدى</translation> </message> </context> <context> <name>QDialogButtonBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="361"/> - <location filename="../widget/messagebox/message-box.cpp" line="1089"/> + <location filename="../widget/messagebox/message-box.cpp" line="362"/> + <location filename="../widget/messagebox/message-box.cpp" line="1090"/> <source>OK</source> - <translation type="unfinished"></translation> + <translation>ماقۇل</translation> </message> </context> <context> <name>QMessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="417"/> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="418"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Show Details...</source> - <translation type="unfinished"></translation> + <translation>تەپسىلاتىنى كۆرسىتىش</translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Hide Details...</source> - <translation type="unfinished"></translation> + <translation>تەپسىلاتىنى يوشۇرۇش</translation> </message> </context> <context> <name>QObject</name> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> <source>File Name</source> - <translation type="unfinished"></translation> + <translation type="vanished">文件名称</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> <source>Modified Date</source> - <translation type="unfinished"></translation> + <translation type="vanished">修改日期</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> <source>File Type</source> - <translation type="unfinished"></translation> + <translation type="vanished">文件类型</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> <source>File Size</source> - <translation type="unfinished"></translation> + <translation type="vanished">文件大小</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> <source>Original Path</source> - <translation type="unfinished"></translation> + <translation type="vanished">原始路径</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> <source>Descending</source> - <translation type="unfinished"></translation> + <translation type="vanished">降序</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> <source>Ascending</source> - <translation type="unfinished"></translation> + <translation type="vanished">升序</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> <source>Use global sorting</source> - <translation type="unfinished"></translation> + <translation type="vanished">使用全局排序</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> <source>List View</source> - <translation type="unfinished"></translation> + <translation type="vanished">列表视图</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> <source>Icon View</source> - <translation type="unfinished"></translation> + <translation type="vanished">图标视图</translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="729"/> + <location filename="../widget/messagebox/message-box.cpp" line="730"/> <source>Close</source> - <translation type="unfinished"></translation> + <translation>تاقاش</translation> </message> </context> <context> @@ -110,154 +100,122 @@ <message> <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> <source>Default Slide</source> - <translation type="unfinished"></translation> + <translation>ئالدىن بىكىتىلگەن slide</translation> </message> <message> <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> + <translation>تاللانما كارتىدىكى كىچىك زاپچاسلارنى پرويېكسىيە كارتون فىلىمىگە ئالماشتۇرۇش</translation> </message> </context> <context> <name>UKUIFileDialog::KyFileDialogHelper</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> <source>Open File</source> - <translation type="unfinished"></translation> + <translation type="vanished">打开</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> <source>Save File</source> - <translation type="unfinished"></translation> + <translation type="vanished">保存</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> <source>All Files (*)</source> - <translation type="unfinished"></translation> + <translation type="vanished">所有(*)</translation> </message> </context> <context> <name>UKUIFileDialog::KyNativeFileDialog</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> <source>Go Back</source> - <translation type="unfinished"></translation> + <translation type="vanished">后退</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> <source>Go Forward</source> - <translation type="unfinished"></translation> + <translation type="vanished">前进</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> <source>Cd Up</source> - <translation type="unfinished"></translation> + <translation type="vanished">向上</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> <source>Search</source> - <translation type="unfinished"></translation> + <translation type="vanished">搜索</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> <source>View Type</source> - <translation type="unfinished"></translation> + <translation type="vanished">视图类型</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> <source>Sort Type</source> - <translation type="unfinished"></translation> + <translation type="vanished">排序类型</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> <source>Maximize</source> - <translation type="unfinished"></translation> + <translation type="vanished">最大化</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> <source>Close</source> - <translation type="unfinished"></translation> + <translation type="vanished">关闭</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> <source>Restore</source> - <translation type="unfinished"></translation> + <translation type="vanished">还原</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> <source>Name</source> - <translation type="unfinished"></translation> + <translation type="vanished">文件名</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> <source>Open</source> - <translation type="unfinished"></translation> + <translation type="vanished">打开</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> <source>Cancel</source> - <translation type="unfinished"></translation> + <translation type="vanished">取消</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> <source>Save as</source> - <translation type="unfinished"></translation> + <translation type="vanished">另存为</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> <source>New Folder</source> - <translation type="unfinished"></translation> + <translation type="vanished">新建文件夹</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> <source>Save</source> - <translation type="unfinished"></translation> + <translation type="vanished">保存</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> <source>Directories</source> - <translation type="unfinished"></translation> + <translation type="vanished">目录</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> <source>Warning</source> - <translation type="unfinished"></translation> + <translation type="vanished">警告</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> <source>exist, are you sure replace?</source> - <translation type="unfinished"></translation> + <translation type="vanished">已存在,是否替换?</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> <source>NewFolder</source> - <translation type="unfinished"></translation> + <translation type="vanished">新建文件夹</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> <source>Undo</source> - <translation type="unfinished"></translation> + <translation type="vanished">撤销</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> <source>Redo</source> - <translation type="unfinished"></translation> + <translation type="vanished">重做</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> <source>warn</source> - <translation type="unfinished"></translation> + <translation type="vanished">警告</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> <source>This operation is not supported.</source> - <translation type="unfinished"></translation> + <translation type="vanished">不支持此操作。</translation> </message> </context> </TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_CN.ts 2024-12-20 09:22:49.000000000 +0800 @@ -4,7 +4,7 @@ <context> <name>MessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="96"/> + <location filename="../widget/messagebox/message-box.cpp" line="97"/> <source>Close</source> <translation>关闭</translation> </message> @@ -14,93 +14,83 @@ <message> <location filename="../widget/messagebox/message-box.h" line="272"/> <source>Executable '%1' requires Qt %2, found Qt %3.</source> - <translation type="unfinished"></translation> + <translation>可执行文件“%1”需要数量%2,找到数量%3。</translation> </message> <message> <location filename="../widget/messagebox/message-box.h" line="274"/> <source>Incompatible Qt Library Error</source> - <translation type="unfinished"></translation> + <translation>不兼容的Qt库错误</translation> </message> </context> <context> <name>QDialogButtonBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="361"/> - <location filename="../widget/messagebox/message-box.cpp" line="1089"/> + <location filename="../widget/messagebox/message-box.cpp" line="362"/> + <location filename="../widget/messagebox/message-box.cpp" line="1090"/> <source>OK</source> - <translation type="unfinished"></translation> + <translation>确认</translation> </message> </context> <context> <name>QMessageBox</name> <message> - <location filename="../widget/messagebox/message-box.cpp" line="417"/> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="418"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Show Details...</source> - <translation type="unfinished"></translation> + <translation>显示细节……</translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="880"/> - <location filename="../widget/messagebox/message-box.cpp" line="1515"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> <source>Hide Details...</source> - <translation type="unfinished"></translation> + <translation>隐藏细节……</translation> </message> </context> <context> <name>QObject</name> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="21"/> <source>File Name</source> - <translation>文件名称</translation> + <translation type="vanished">文件名称</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="25"/> <source>Modified Date</source> - <translation>修改日期</translation> + <translation type="vanished">修改日期</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="29"/> <source>File Type</source> - <translation>文件类型</translation> + <translation type="vanished">文件类型</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="33"/> <source>File Size</source> - <translation>文件大小</translation> + <translation type="vanished">文件大小</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="37"/> <source>Original Path</source> - <translation>原始路径</translation> + <translation type="vanished">原始路径</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="46"/> <source>Descending</source> - <translation>降序</translation> + <translation type="vanished">降序</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="51"/> <source>Ascending</source> - <translation>升序</translation> + <translation type="vanished">升序</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="57"/> <source>Use global sorting</source> - <translation>使用全局排序</translation> + <translation type="vanished">使用全局排序</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="77"/> <source>List View</source> - <translation>列表视图</translation> + <translation type="vanished">列表视图</translation> </message> <message> - <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="78"/> <source>Icon View</source> - <translation>图标视图</translation> + <translation type="vanished">图标视图</translation> </message> <message> - <location filename="../widget/messagebox/message-box.cpp" line="729"/> + <location filename="../widget/messagebox/message-box.cpp" line="730"/> <source>Close</source> <translation>关闭</translation> </message> @@ -110,154 +100,122 @@ <message> <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> <source>Default Slide</source> - <translation type="unfinished"></translation> + <translation>默认slide</translation> </message> <message> <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> <source>Let tab widget switch with a slide animation.</source> - <translation type="unfinished"></translation> + <translation>让选项卡小部件切换为幻灯片动画。</translation> </message> </context> <context> <name>UKUIFileDialog::KyFileDialogHelper</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2563"/> <source>Open File</source> - <translation>打开</translation> + <translation type="vanished">打开</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2564"/> <source>Save File</source> - <translation>保存</translation> + <translation type="vanished">保存</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2577"/> <source>All Files (*)</source> - <translation>所有(*)</translation> + <translation type="vanished">所有(*)</translation> </message> </context> <context> <name>UKUIFileDialog::KyNativeFileDialog</name> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="197"/> <source>Go Back</source> - <translation>后退</translation> + <translation type="vanished">后退</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="204"/> <source>Go Forward</source> - <translation>前进</translation> + <translation type="vanished">前进</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="210"/> <source>Cd Up</source> - <translation>向上</translation> + <translation type="vanished">向上</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="217"/> <source>Search</source> - <translation>搜索</translation> + <translation type="vanished">搜索</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="225"/> <source>View Type</source> - <translation>视图类型</translation> + <translation type="vanished">视图类型</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="236"/> <source>Sort Type</source> - <translation>排序类型</translation> + <translation type="vanished">排序类型</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="354"/> <source>Maximize</source> - <translation>最大化</translation> + <translation type="vanished">最大化</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="255"/> <source>Close</source> - <translation>关闭</translation> + <translation type="vanished">关闭</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="351"/> <source>Restore</source> - <translation>还原</translation> + <translation type="vanished">还原</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="947"/> <source>Name</source> - <translation>文件名</translation> + <translation type="vanished">文件名</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="950"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1538"/> <source>Open</source> - <translation>打开</translation> + <translation type="vanished">打开</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="951"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="960"/> <source>Cancel</source> - <translation>取消</translation> + <translation type="vanished">取消</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="955"/> <source>Save as</source> - <translation>另存为</translation> + <translation type="vanished">另存为</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="957"/> <source>New Folder</source> - <translation>新建文件夹</translation> + <translation type="vanished">新建文件夹</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="959"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1542"/> <source>Save</source> - <translation>保存</translation> + <translation type="vanished">保存</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="996"/> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="998"/> <source>Directories</source> - <translation>目录</translation> + <translation type="vanished">目录</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> <source>Warning</source> - <translation>警告</translation> + <translation type="vanished">警告</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1187"/> <source>exist, are you sure replace?</source> - <translation>已存在,是否替换?</translation> + <translation type="vanished">已存在,是否替换?</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="1864"/> <source>NewFolder</source> - <translation>新建文件夹</translation> + <translation type="vanished">新建文件夹</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2152"/> <source>Undo</source> - <translation>撤销</translation> + <translation type="vanished">撤销</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2159"/> <source>Redo</source> - <translation>重做</translation> + <translation type="vanished">重做</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> <source>warn</source> - <translation>警告</translation> + <translation type="vanished">警告</translation> </message> <message> - <location filename="../widget/filedialog/kyfiledialog.cpp" line="2358"/> <source>This operation is not supported.</source> - <translation>不支持此操作。</translation> + <translation type="vanished">不支持此操作。</translation> </message> </context> </TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_HK.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,221 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="zh_HK"> +<context> + <name>MessageBox</name> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>關閉</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>可執行檔「%1」 需要數量%2,找到數量%3。</translation> + </message> + <message> + <location filename="../widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation>不相容的Qt庫錯誤</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="362"/> + <location filename="../widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>確認</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="418"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation>顯示細節......</translation> + </message> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation>隱藏細節......</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <source>File Name</source> + <translation type="vanished">檔名稱</translation> + </message> + <message> + <source>Modified Date</source> + <translation type="vanished">修改日期</translation> + </message> + <message> + <source>File Type</source> + <translation type="vanished">檔案類型</translation> + </message> + <message> + <source>File Size</source> + <translation type="vanished">檔大小</translation> + </message> + <message> + <source>Original Path</source> + <translation type="vanished">原始路徑</translation> + </message> + <message> + <source>Descending</source> + <translation type="vanished">降序</translation> + </message> + <message> + <source>Ascending</source> + <translation type="vanished">升序</translation> + </message> + <message> + <source>Use global sorting</source> + <translation type="vanished">使用全域排序</translation> + </message> + <message> + <source>List View</source> + <translation type="vanished">清單檢視</translation> + </message> + <message> + <source>Icon View</source> + <translation type="vanished">圖示檢視</translation> + </message> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation type="unfinished">關閉</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>默認slide</translation> + </message> + <message> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>讓選項卡小部件切換為幻燈片動畫。</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <source>Open File</source> + <translation type="obsolete">打開</translation> + </message> + <message> + <source>Save File</source> + <translation type="obsolete">保存</translation> + </message> + <message> + <source>All Files (*)</source> + <translation type="obsolete">所有(*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <source>Go Back</source> + <translation type="obsolete">後退</translation> + </message> + <message> + <source>Go Forward</source> + <translation type="obsolete">前進</translation> + </message> + <message> + <source>Cd Up</source> + <translation type="obsolete">向上</translation> + </message> + <message> + <source>Search</source> + <translation type="obsolete">搜索</translation> + </message> + <message> + <source>View Type</source> + <translation type="obsolete">視圖類型</translation> + </message> + <message> + <source>Sort Type</source> + <translation type="obsolete">排序類型</translation> + </message> + <message> + <source>Maximize</source> + <translation type="obsolete">最大化</translation> + </message> + <message> + <source>Close</source> + <translation type="obsolete">關閉</translation> + </message> + <message> + <source>Restore</source> + <translation type="obsolete">還原</translation> + </message> + <message> + <source>Name</source> + <translation type="obsolete">檔名</translation> + </message> + <message> + <source>Open</source> + <translation type="obsolete">打開</translation> + </message> + <message> + <source>Cancel</source> + <translation type="obsolete">取消</translation> + </message> + <message> + <source>Save as</source> + <translation type="obsolete">另存為</translation> + </message> + <message> + <source>New Folder</source> + <translation type="obsolete">新建資料夾</translation> + </message> + <message> + <source>Save</source> + <translation type="obsolete">保存</translation> + </message> + <message> + <source>Directories</source> + <translation type="obsolete">目錄</translation> + </message> + <message> + <source>Warning</source> + <translation type="obsolete">警告</translation> + </message> + <message> + <source>exist, are you sure replace?</source> + <translation type="obsolete">已存在,是否替換?</translation> + </message> + <message> + <source>NewFolder</source> + <translation type="obsolete">新建資料夾</translation> + </message> + <message> + <source>Undo</source> + <translation type="obsolete">撤銷</translation> + </message> + <message> + <source>Redo</source> + <translation type="obsolete">重做</translation> + </message> + <message> + <source>warn</source> + <translation type="obsolete">警告</translation> + </message> + <message> + <source>This operation is not supported.</source> + <translation type="obsolete">不支援此操作。</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hant.ts qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hant.ts --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hant.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/translations/qt5-ukui-platformtheme_zh_Hant.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,386 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="zh"> +<context> + <name>MainWindow</name> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../../test/system-settings/mainwindow.ui" line="14"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> + <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> + <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="30"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="37"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="47"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="54"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="64"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="71"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="78"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> + <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> + <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> + <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/system-settings/mainwindow.ui" line="21"/> + <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/system-settings/mainwindow.ui" line="31"/> + <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/system-settings/mainwindow.ui" line="41"/> + <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/system-settings/mainwindow.ui" line="55"/> + <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>關閉</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>可執行檔「%1」 需要數量%2,找到數量%3。</translation> + </message> + <message> + <location filename="../widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation>不相容的Qt庫錯誤</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="362"/> + <location filename="../widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>確認</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="418"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation>顯示細節......</translation> + </message> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation>隱藏細節......</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation>檔名稱</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation>修改日期</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation>檔案類型</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation>檔大小</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation>原始路徑</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation>降序</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation>升序</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation>使用全域排序</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation>清單檢視</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation>圖示檢視</translation> + </message> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation type="unfinished">關閉</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>默認slide</translation> + </message> + <message> + <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>讓選項卡小部件切換為幻燈片動畫。</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> + <source>Open File</source> + <translation>打開</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> + <source>Save File</source> + <translation>保存</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> + <source>All Files (*)</source> + <translation>所有(*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>後退</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>前進</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>向上</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>搜索</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>視圖類型</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>排序類型</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>最大化</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>關閉</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>還原</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>檔名</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>打開</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>取消</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>另存為</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>新建資料夾</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>保存</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>目錄</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>警告</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>已存在,是否替換?</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> + <source>NewFolder</source> + <translation>新建資料夾</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> + <source>Undo</source> + <translation>撤銷</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> + <source>Redo</source> + <translation>重做</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> + <source>warn</source> + <translation>警告</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> + <source>This operation is not supported.</source> + <translation>不支援此操作。</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/debug.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/debug.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/debug.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/debug.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,41 +0,0 @@ -#ifndef PDEBUG_H -#define PDEBUG_H -#include <QDebug> -#include <QDateTime> - -#define SERVICE "com.kylin.statusmanager.interface" -#define PATH "/" -#define INTERFACE "com.kylin.statusmanager.interface" - -#define UKUI_SEARCH_SCHEMAS "org.ukui.search.settings" -#define SEARCH_METHOD_KEY "fileIndexEnable" - -namespace UKUIFileDialog { - -class NullDebug - -{ - -public: - -template<typename T> - -NullDebug & operator <<(const T&){return *this;} - -}; -inline NullDebug nullDebug(){return NullDebug();} -} - -//#define LOG_TIMI - -#ifdef LOG_TIMI - -# define pDebug qDebug() << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss:zzz") << " platformtheme input:" - -#else - -# define pDebug UKUIFileDialog::nullDebug() - -#endif - -#endif // KYFILEDIALOG_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,2913 +0,0 @@ -#include "debug.h" -#include "kyfiledialog.h" -#include <QDebug> -#include "ui_kyfiledialog.h" -#include "kyfiledialogprivate.h" -#include "sidebar.h" -#include "pathbar.h" -#include "ukuistylehelper/ukuistylehelper.h" -#include <peony-qt/controls/directory-view/directory-view-container.h> -#include <peony-qt/controls/menu/directory-view-menu/directory-view-menu.h> -#include <peony-qt/controls/directory-view/directory-view-widget.h> -#include <peony-qt/controls/directory-view/directory-view-factory/directory-view-factory-manager.h> -#include <peony-qt/file-operation-utils.h> -#include <QDesktopServices> -#include <QUrl> -#include <PeonyFileInfo> -#include <PeonyFileItemModel> -#include <QDebug> -#include <QMimeDatabase> -#include <QMimeType> -#include <KWindowEffects> -#include <QPainter> -#include <QRect> -#include <QVector4D> -#include <QRegExp> -#include <QMessageBox> -#include <QScrollBar> -#include <QCoreApplication> -#include <QTranslator> -#include <qwindow.h> -#include <QScreen> -#include <QDesktopWidget> -#include <QPainterPath> -#include <QDBusInterface> -#include <QDBusMessage> -#include <qpa/qplatformdialoghelper.h> -#include "xatom-helper.h" -#include <peony-qt/file-utils.h> -#include <peony-qt/create-template-operation.h> -#include <peony-qt/global-settings.h> -#include <peony-qt/search-vfs-uri-parser.h> -#include <peony-qt/file-meta-info.h> -#include <peony-qt/clipboard-utils.h> -#include "debug.h" -#include "ukui-style-settings.h" - -using namespace UKUIFileDialog; - -KyNativeFileDialog::KyNativeFileDialog(QWidget *parent) - : QDialog(parent), - d_ptr(new KyNativeFileDialogPrivate) -{ - const QString locale = QLocale::system().name(); - QTranslator *translator = new QTranslator(this); - pDebug << "local: " << locale; - if (translator->load("/usr/share/qt5-ukui-platformtheme/qt5-ukui-platformtheme_" + QLocale::system().name())) { - pDebug << "Load translations file success!"; - QApplication::installTranslator(translator); - } else { - pDebug << "Load translations file failed!"; - } - - QTranslator *t = new QTranslator(this); - pDebug << "QTranslator t load" << t->load("/usr/share/libpeony-qt/libpeony-qt_"+QLocale::system().name()); - QApplication::installTranslator(t); - QTranslator *t2 = new QTranslator(this); - pDebug << "QTranslator t2 load" << t2->load("/usr/share/peony-qt-desktop/peony-qt-desktop_"+QLocale::system().name()); - QApplication::installTranslator(t2); - QTranslator *t3 = new QTranslator(this); - pDebug << "QTranslator t3 load" << t3->load("/usr/share/qt5/translations/qt_"+QLocale::system().name()); - QApplication::installTranslator(t3); - - mKyFileDialogUi = new Ui_KyFileDialog(this); - -// setStyle(nullptr); - -// m_fileSystemModel = new QFileSystemModel(); - - connect(d_ptr.get()->m_timer, &QTimer::timeout, this, [&](){ -// pDebug << "timeout isActive:..........." << d_ptr.get()->m_timer->isActive(); - this->show(); - if(d_ptr.get()->m_timer->isActive()){ - pDebug << "timer stop...."; - d_ptr.get()->m_timer->stop(); - } - }); - - mKyFileDialogUi->setupUi(this); - d_ptr.get()->m_container = mKyFileDialogUi->m_container; - -// QString path = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); -// pDebug << "initialDirPath:" << path << selectedUrls(); -// goToUri(path, false); - getCurrentPage()->setContextMenuPolicy(Qt::CustomContextMenu); - - connect(mKyFileDialogUi->m_sider, &FileDialogSideBar::goToUriRequest, this, [this](const QString &uri, bool addToHistory, bool forceUpdate){ - pDebug << "goToUri0000"; - if (uri.startsWith("favorite://")) { - QString u = Peony::FileUtils::getTargetUri(uri); - goToUri(u, addToHistory, forceUpdate); - - } - else - goToUri(uri, addToHistory, forceUpdate); - }); - - connect(getCurrentPage(), &Peony::DirectoryViewContainer::directoryChanged, this, &KyNativeFileDialog::updateWindowState); - - connect(getCurrentPage(), &Peony::DirectoryViewContainer::directoryChanged, this, [=](){ - pDebug << "directoryChanged........" << getCurrentUri(); - - Q_EMIT directoryEntered(QUrl(getCurrentUri())); - pDebug << "locationChangeEnd...."; - QCursor c; - c.setShape(Qt::ArrowCursor); - this->setCursor(c); - mKyFileDialogUi->m_sider->setCursor(c); - - if(m_fileDialogHelper->isViewInitialFinished()) - intiContainerSort(); - -// mKyFileDialogUi->m_fileNameEdit->setText(""); - setShortCuts(); - }); - - connect(getCurrentPage(), &Peony::DirectoryViewContainer::directoryChanged, this, [=](){ - updateSearchProgressBar(); - }); - connect(getCurrentPage(), &Peony::DirectoryViewContainer::viewDoubleClicked, this, [=](const QString &uri){ - auto info = Peony::FileInfo::fromUri(uri); - pDebug << "viewDoubleClicked....." << uri << info->isDir() << info->isVolume(); - if (info->isDir() || info->isVolume()) { - pDebug << "goToUrixxxxxxx...."; - goToUri(uri); - } else { - onAcceptButtonClicked(); - } - }); - - connect(getCurrentPage(), &Peony::DirectoryViewContainer::selectionChanged, this, &KyNativeFileDialog::updateStatusBar); - - connect(getCurrentPage(), &Peony::DirectoryViewContainer::menuRequest, this, &KyNativeFileDialog::containerMenuRequest); - - connect(getCurrentPage(), &Peony::DirectoryViewContainer::signal_itemAdded, this, [=](const QString& uri){ - pDebug << "signal_itemAdded....." << m_uris_to_edit << uri; - if(m_uris_to_edit.isEmpty()) - return; - QString editUri = Peony::FileUtils::urlDecode(m_uris_to_edit.first()); - QString infoUri = Peony::FileUtils::urlDecode(uri); - if (editUri == infoUri ) { - getCurrentPage()->getView()->scrollToSelection(uri); - getCurrentPage()->getView()->editUri(uri); - } - m_uris_to_edit.clear(); - }); - - connect(getCurrentPage(), &Peony::DirectoryViewContainer::updateWindowLocationRequest, this, [=](const QString &uri, bool addToHistory, bool forceUpdate){ - pDebug << "page updateWindowLocationRequest.....uri:" << uri << getCurrentUri() << forceUpdate; - if(uri == "") - return; - QString s = uri; - QString s1 = s.endsWith("/") ? s.remove(s.length() - 1, 1) : s; - QString s2 = getCurrentUri(); - QString s3 = s2.endsWith("/") ? s2.remove(s2.length() - 1, 1) : s2; - if(s1 != s3 && m_fileDialogHelper->isViewInitialFinished()) - { - pDebug << "s1:" << s1 << "s3:" << s3; - goToUri(uri, addToHistory); - } - }); - - connect(mKyFileDialogUi->m_pathbar, &Peony::AdvancedLocationBar::updateWindowLocationRequest, - this, [this](const QString &uri, bool addHistory, bool forceUpdate){ - pDebug << "goToUrijjjjj...."; - goToUri(uri, addHistory, forceUpdate); - }); - - connect(mKyFileDialogUi->m_pathbar, &Peony::AdvancedLocationBar::refreshRequest, this, [](){ - - }); - connect(mKyFileDialogUi->m_pathbar, &Peony::AdvancedLocationBar::searchRequest, this, [=](const QString &path, const QString &key){ - pDebug << "path.....:" << path << "key:" << key << m_lastSearchPath; - if(key == "") - { - forceStopLoading(); - pDebug << "key is null m_lastSearchPath:" << m_lastSearchPath; - m_isClearSearchKey = true; - m_needSearch = false; - goToUri(m_lastSearchPath, true); - - QCursor c; - c.setShape(Qt::ArrowCursor); - this->setCursor(c); - getCurrentPage()->getView()->setCursor(c); - mKyFileDialogUi->m_sider->setCursor(c); - - } - else - { - bool isSearchEngine = true; - const QByteArray id(UKUI_SEARCH_SCHEMAS); - if (QGSettings::isSchemaInstalled(id)) { - QGSettings *searchSettings = new QGSettings(id, QByteArray(), this); - if (!searchSettings || !searchSettings->keys().contains(SEARCH_METHOD_KEY)) { - isSearchEngine = false; - } - } else { - isSearchEngine = false; - } - - auto targetUri = Peony::SearchVFSUriParser::parseSearchKey(path, key, true, false, "", true); - targetUri = Peony::SearchVFSUriParser::addSearchKey(targetUri, isSearchEngine); - pDebug << "updateSearch targetUri:" <<targetUri; - pDebug << "updateSearch path:" <<path; - m_needSearch = true; - goToUri(targetUri, true); - - QCursor c; - c.setShape(Qt::BusyCursor); - this->setCursor(c); - getCurrentPage()->getView()->setCursor(c); - mKyFileDialogUi->m_sider->setCursor(c); - - } - }); - - mKyFileDialogUi->m_backButton->setToolTip(tr("Go Back")); - mKyFileDialogUi->m_backButton->setIcon(QIcon::fromTheme("go-previous-symbolic")); - mKyFileDialogUi->m_backButton->setAutoRaise(true); - mKyFileDialogUi->m_backButton->setEnabled(false); - connect(mKyFileDialogUi->m_backButton, &QToolButton::clicked, this, &KyNativeFileDialog::goBack); - - - mKyFileDialogUi->m_forwardButton->setToolTip(tr("Go Forward")); - mKyFileDialogUi->m_forwardButton->setIcon(QIcon::fromTheme("go-next-symbolic")); - mKyFileDialogUi->m_forwardButton->setAutoRaise(true); - mKyFileDialogUi->m_forwardButton->setEnabled(false); - connect(mKyFileDialogUi->m_forwardButton, &QToolButton::clicked, this, &KyNativeFileDialog::goForward); - - mKyFileDialogUi->m_toParentButton->setToolTip(tr("Cd Up")); - mKyFileDialogUi->m_toParentButton->setIcon(QIcon::fromTheme("go-up-symbolic")); - mKyFileDialogUi->m_toParentButton->setAutoRaise(true); - mKyFileDialogUi->m_toParentButton->setEnabled(false); - connect(mKyFileDialogUi->m_toParentButton, &QToolButton::clicked, this, &KyNativeFileDialog::goToParent); - - mKyFileDialogUi->m_searchBtn->setIcon(QIcon::fromTheme("edit-find-symbolic")); - mKyFileDialogUi->m_searchBtn->setToolTip(tr("Search")); - mKyFileDialogUi->m_searchBtn->setIconSize(QSize(16, 16)); - mKyFileDialogUi->m_searchBtn->setAutoRaise(true); - - mKyFileDialogUi->m_searchBtn->setProperty("useIconHighlightEffect", true); - mKyFileDialogUi->m_searchBtn->setProperty("iconHighlightEffectMode", 1); - connect(mKyFileDialogUi->m_searchBtn, &QToolButton::clicked, this, &KyNativeFileDialog::searchButtonClicked); - - mKyFileDialogUi->m_modeButton->setToolTip(tr("View Type")); - mKyFileDialogUi->m_modeButton->setIcon(QIcon::fromTheme("view-grid-symbolic")); - mKyFileDialogUi->m_modeButton->setProperty("isWindowButton", 1); - mKyFileDialogUi->m_modeButton->setProperty("useIconHighlightEffect", 0x2); - mKyFileDialogUi->m_modeButton->setAutoRaise(true); - - mKyFileDialogUi->m_useGlobalSortAction->setChecked(Peony::GlobalSettings::getInstance()->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()); - connect(mKyFileDialogUi->m_useGlobalSortAction, &QAction::triggered, this, [=](bool checked){ - Peony::GlobalSettings::getInstance()->setValue(USE_GLOBAL_DEFAULT_SORTING, checked); - }); - - mKyFileDialogUi->m_sortButton->setToolTip(tr("Sort Type")); - mKyFileDialogUi->m_sortButton->setProperty("isWindowButton", 1); - mKyFileDialogUi->m_sortButton->setProperty("useIconHighlightEffect", 0x2); - mKyFileDialogUi->m_sortButton->setAutoRaise(true); - - mKyFileDialogUi->m_maximizeAndRestore->setToolTip(tr("Maximize")); - mKyFileDialogUi->m_maximizeAndRestore->setIcon(QIcon::fromTheme("window-close-symbolic")); - mKyFileDialogUi->m_maximizeAndRestore->setAutoRaise(true); - mKyFileDialogUi->m_maximizeAndRestore->setProperty("isWindowButton", 1); - mKyFileDialogUi->m_maximizeAndRestore->setProperty("useIconHighlightEffect", 0x2); - connect(mKyFileDialogUi->m_maximizeAndRestore, &QToolButton::clicked, this, [=]() { - if (!this->isMaximized()) { - this->showMaximized(); - } else { - this->showNormal(); - } - updateMaximizeState(); - }); - - mKyFileDialogUi->m_closeButton->setToolTip(tr("Close")); - mKyFileDialogUi->m_closeButton->setIcon(QIcon::fromTheme("window-close-symbolic")); - mKyFileDialogUi->m_closeButton->setAutoRaise(true); - mKyFileDialogUi->m_closeButton->setProperty("isWindowButton", 0x2); - - connect(mKyFileDialogUi->m_modeMenu, &QMenu::triggered, this, [=](QAction *action) { - if (action == mKyFileDialogUi->m_listModeAction) { - this->getCurrentPage()->switchViewType("List View"); - } else { - this->getCurrentPage()->switchViewType("Icon View"); - } - }); - - connect(mKyFileDialogUi->m_acceptButton, &QPushButton::clicked, this, &KyNativeFileDialog::onAcceptButtonClicked); - - connect(mKyFileDialogUi->m_rejectButton, &QPushButton::clicked, this, &KyNativeFileDialog::onRejectButtonClicked); - - connect(mKyFileDialogUi->m_fileTypeCombo, - static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated), - this, [this](const QString s){ - pDebug << "activated..." << s; - selectNameFilter(s);}); - - connect(mKyFileDialogUi->m_fileTypeCombo, - static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated), - this, &KyNativeFileDialog::selectedNameFilterChanged); - - connect(mKyFileDialogUi->m_fileTypeCombo, - static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged), - this, [this](const QString s){ - pDebug << "currentIndexChanged..." << s; - selectNameFilter(s);}); - - connect(mKyFileDialogUi->m_closeButton, &QToolButton::clicked, this, &KyNativeFileDialog::onRejectButtonClicked); - - connect(mKyFileDialogUi->m_fileNameEdit, &QLineEdit::textChanged, this, &KyNativeFileDialog::lineEditTextChange); - - connect(getCurrentPage(), &Peony::DirectoryViewContainer::viewTypeChanged, this, &KyNativeFileDialog::onSwitchView); - - connect(mKyFileDialogUi->m_sortOrderGroup, &QActionGroup::triggered, this, [=](QAction *action) { - int index = mKyFileDialogUi->m_sortOrderGroup->actions().indexOf(action); - getCurrentPage()->setSortOrder(Qt::SortOrder(index)); - setSortType(); - }); - - connect(mKyFileDialogUi->m_sortTypeGroup, &QActionGroup::triggered, this, [=](QAction *action) { - int index = mKyFileDialogUi->m_sortTypeGroup->actions().indexOf(action); - getCurrentPage()->setSortType(Peony::FileItemModel::ColumnType(index)); - }); - - connect(mKyFileDialogUi->m_sortMenu, &QMenu::aboutToShow, this, [=]() { - bool originPathVisible = getCurrentUri()== "trash:///"; - mKyFileDialogUi->m_originalPath->setVisible(originPathVisible); - mKyFileDialogUi->m_sortTypeGroup->actions().at(getCurrentSortColumn())->setChecked(true); - mKyFileDialogUi->m_sortOrderGroup->actions().at(getCurrentSortOrder())->setChecked(true); - }); - - foreach (QAction *action, mKyFileDialogUi->m_sortTypeGroup->actions()) - { - bool checked = (int(getCurrentPage()->getSortType()) == - mKyFileDialogUi->m_sortTypeGroup->actions().indexOf(action) ? true : false); - action->setChecked(checked); - } - - refreshContainerSort(); - updateMaximizeState(); - onSwitchView(); - isTableModel(); - - m_model = new QStringListModel(); - m_completer = new QCompleter(mKyFileDialogUi->m_fileNameEdit); - m_completer->setModel(m_model); - m_completer->setMaxVisibleItems(10); - m_completer->setModelSorting(QCompleter::CaseInsensitivelySortedModel); -// m_completer->setCompletionMode(QCompleter::UnfilteredPopupCompletion); - mKyFileDialogUi->m_fileNameEdit->setCompleter(m_completer); - - int number = QApplication::desktop()->screenNumber(QCursor::pos()); - if(number<0){ - number=0; - } - QSize size = QGuiApplication::screens().at(number)->geometry().size(); - pDebug << "setmaxsize:" << size; - this->setMaximumSize(size); -} - -KyNativeFileDialog::~KyNativeFileDialog() -{ - pDebug << "~~~~~~~~KyNativeFileDialog"; - -} - -void KyNativeFileDialog::updateMaximizeState() -{ - bool maximized = this->isMaximized(); - if (maximized) { - mKyFileDialogUi->m_maximizeAndRestore->setToolTip(tr("Restore")); - mKyFileDialogUi->m_maximizeAndRestore->setIcon(QIcon::fromTheme("window-restore-symbolic")); - } else { - mKyFileDialogUi->m_maximizeAndRestore->setToolTip(tr("Maximize")); - mKyFileDialogUi->m_maximizeAndRestore->setIcon(QIcon::fromTheme("window-maximize-symbolic")); - } -} - -Peony::FMWindowIface *KyNativeFileDialog::create(const QString &uri) -{ - auto dialog = new KyNativeFileDialog(); - - return dialog; -} - -Peony::FMWindowIface *KyNativeFileDialog::create(const QStringList &uris) -{ - auto dialog = new KyNativeFileDialog(); - - return dialog; -} - -const QStringList KyNativeFileDialog::getCurrentSelections() -{ - if(containerView()) - return containerView()->getSelections(); - else - return QStringList(); -} - -const QStringList KyNativeFileDialog::getCurrentSelectionsList() -{ - QStringList list; - foreach (QString str, getCurrentSelections()) { - list.append(Peony::FileUtils::urlDecode(str)); - } - return list; -} - -const QStringList KyNativeFileDialog::getCurrentAllFileUris() -{ - if(containerView()) - return containerView()->getAllFileUris(); - return QStringList(); -} -const QList<std::shared_ptr<Peony::FileInfo>> KyNativeFileDialog::getCurrentSelectionFileInfos() -{ - const QStringList uris = getCurrentSelections(); - QList<std::shared_ptr<Peony::FileInfo>> infos; - for(auto uri : uris) { - auto info = Peony::FileInfo::fromUri(uri); - infos<<info; - } - return infos; -} - -void KyNativeFileDialog::setCurrentSelections(QStringList selections) -{ - QStringList list; - foreach (QString str, selections) { - list.append(Peony::FileUtils::urlEncode(str)); - } - if(containerView()){ - containerView()->setSelections(list); - pDebug << "get setCurrentSelections....:" << containerView()->getSelections(); - } -} - -Qt::SortOrder KyNativeFileDialog::getCurrentSortOrder() -{ - return getCurrentPage()->getSortOrder(); -} - -int KyNativeFileDialog::getCurrentSortColumn() -{ - return getCurrentPage()->getSortType(); -} - -bool KyNativeFileDialog::getWindowShowHidden() -{ - auto settings = Peony::GlobalSettings::getInstance(); - if (settings->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()) { - return settings->getValue(SHOW_HIDDEN_PREFERENCE).toBool(); - } else { - auto uri = getCurrentUri(); - auto metaInfo = Peony::FileMetaInfo::fromUri(uri); - if (metaInfo) { - return metaInfo->getMetaInfoVariant(SHOW_HIDDEN_PREFERENCE).isValid()? metaInfo->getMetaInfoVariant(SHOW_HIDDEN_PREFERENCE).toBool(): (settings->getValue(SHOW_HIDDEN_PREFERENCE).toBool()); - } else { - pDebug<<"can not get file meta info"<<uri; - return settings->getValue(SHOW_HIDDEN_PREFERENCE).toBool(); - } - } -} -bool KyNativeFileDialog::getWindowUseDefaultNameSortOrder() -{ - auto settings = Peony::GlobalSettings::getInstance(); - if (settings->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()) { - return settings->getValue(SORT_CHINESE_FIRST).isValid()? settings->getValue(SORT_CHINESE_FIRST).toBool(): true; - } else { - auto uri = getCurrentUri(); - auto metaInfo = Peony::FileMetaInfo::fromUri(uri); - if (metaInfo) { - return metaInfo->getMetaInfoVariant(SORT_CHINESE_FIRST).isValid()? metaInfo->getMetaInfoVariant(SORT_CHINESE_FIRST).toBool(): (settings->getValue(SORT_CHINESE_FIRST).isValid()? settings->getValue(SORT_CHINESE_FIRST).toBool(): true); - } else { - pDebug<<"can not get file meta info"<<uri; - return settings->getValue(SORT_CHINESE_FIRST).isValid()? settings->getValue(SORT_CHINESE_FIRST).toBool(): true; - } - } -} -bool KyNativeFileDialog::getWindowSortFolderFirst() -{ - auto settings = Peony::GlobalSettings::getInstance(); - if (settings->getValue(USE_GLOBAL_DEFAULT_SORTING).toBool()) { - return settings->getValue(SORT_FOLDER_FIRST).isValid()? settings->getValue(SORT_FOLDER_FIRST).toBool(): true; - } else { - auto uri = getCurrentUri(); - auto metaInfo = Peony::FileMetaInfo::fromUri(uri); - if (metaInfo) { - return metaInfo->getMetaInfoVariant(SORT_FOLDER_FIRST).isValid()? metaInfo->getMetaInfoVariant(SORT_FOLDER_FIRST).toBool(): (settings->getValue(SORT_FOLDER_FIRST).isValid()? settings->getValue(SORT_FOLDER_FIRST).toBool(): true); - } else { - pDebug<<"can not get file meta info"<<uri; - return settings->getValue(SORT_FOLDER_FIRST).isValid()? settings->getValue(SORT_FOLDER_FIRST).toBool(): true; - } - } -} - -void KyNativeFileDialog::refresh() -{ - getCurrentPage()->refresh(); -} - -void KyNativeFileDialog::forceStopLoading() -{ - getCurrentPage()->stopLoading(); - - //Key_escape also use as cancel - if (Peony::ClipboardUtils::isClipboardHasFiles()) - { - Peony::ClipboardUtils::clearClipboard(); - if(containerView()) - containerView()->repaintView(); - } -} - -void KyNativeFileDialog::setShowHidden(bool showHidden) -{ - getCurrentPage()->setShowHidden(showHidden); -} - -void KyNativeFileDialog::setUseDefaultNameSortOrder(bool use) -{ - if (!getCurrentPage()) { - return; - } - getCurrentPage()->setUseDefaultNameSortOrder(use); -} - -void KyNativeFileDialog::setSortFolderFirst(bool set) -{ - if (!getCurrentPage()) { - return; - } - getCurrentPage()->setSortFolderFirst(set); -} - -void KyNativeFileDialog::setCurrentSelectionUris(const QStringList &uris) -{ - getCurrentPage()->stopLoading(); - - //Key_escape also use as cancel - if (Peony::ClipboardUtils::isClipboardHasFiles()) - { - Peony::ClipboardUtils::clearClipboard(); - if(containerView()) - containerView()->repaintView(); - } -} - -void KyNativeFileDialog::setCurrentSortOrder (Qt::SortOrder order) -{ - getCurrentPage()->setSortOrder(order); -} - -void KyNativeFileDialog::setCurrentSortColumn (int sortColumn) -{ - getCurrentPage()->setSortType(Peony::FileItemModel::ColumnType(sortColumn)); -} - -void KyNativeFileDialog::editUri(const QString &uri) -{ - if(containerView()) - containerView()->editUri(uri); -} - -void KyNativeFileDialog::editUris(const QStringList &uris) -{ - if(containerView()) - containerView()->editUris(uris); -} - -bool KyNativeFileDialog::getFilterWorking() -{ - return false; -} - -void KyNativeFileDialog::beginSwitchView(const QString &viewId) -{ - if (getCurrentUri() == "computer:///") - return; - auto selection = getCurrentSelections(); - if(!getCurrentPage()||!(getCurrentPage()->getView())) - return; - - if (getCurrentPage()->getView()->viewId() == viewId) - return; - - getCurrentPage()->switchViewType(viewId); - - // change default view id - auto factoryManager = Peony::DirectoryViewFactoryManager2::getInstance(); - auto internalViews = factoryManager->internalViews(); - if (internalViews.contains(viewId)) - Peony::GlobalSettings::getInstance()->setValue(DEFAULT_VIEW_ID, viewId); - - setCurrentSelections(selection); - if (selection.count() >0) - getCurrentPage()->getView()->scrollToSelection(selection.first()); - -} - - -/** - * @brief 当前目录 - */ -const QString KyNativeFileDialog::getCurrentUri() -{ - return Peony::FileUtils::urlDecode(getCurrentPage()->getCurrentUri()); -} - -/** - * @param directory 路径 - * @brief 设置路径为directory - */ -void KyNativeFileDialog::setDirectory(const QString &directory) -{ - pDebug << "setDirectoryoooo...:" << directory; - setDirectoryUrl(QUrl(directory)); -} - -void KyNativeFileDialog::setDirectory(const QDir &directory) -{ - setDirectoryUrl(QUrl::fromLocalFile(directory.absolutePath())); -} - -QDir KyNativeFileDialog::directory() const -{ - return QDir(directoryUrl().toLocalFile()); -} - -void KyNativeFileDialog::setDirectoryUrl(const QUrl &directory) -{ - pDebug << "setDirectoryUrl.....:" << directory; - if (!getCurrentPage()) { - return; - } - goToUri(directory.toString(), true); -} - -QUrl KyNativeFileDialog::directoryUrl() const -{ - if (!getCurrentPage()) { - return QUrl(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)); - } else { - return QUrl(Peony::FileUtils::urlDecode(getCurrentPage()->getCurrentUri())); - } -} - -void KyNativeFileDialog::goToUri(const QString &uri, bool addToHistory, bool forceUpdate) -{ - pDebug << "goToUri....,,,,:" << uri << getCurrentUri(); - - if(containerView() && m_fileDialogHelper){ - pDebug << "connect............"; - connect(containerView(), &Peony::DirectoryViewWidget::viewDirectoryChanged, - m_fileDialogHelper, &KyFileDialogHelper::viewInitialFinished, Qt::UniqueConnection); - } - - if(uri.isEmpty() || uri == getCurrentUri()) - return; - - pDebug << "getCurrentUri....,,,,:" << getCurrentUri(); - pDebug << "isShow......:" << (m_fileDialogHelper == nullptr) << m_fileDialogHelper->isShow() << isInitialGoToUriNum; - if(isInitialGoToUriNum || (m_fileDialogHelper != nullptr && m_fileDialogHelper->isShow())) - { - isInitialGoToUriNum = false; - getCurrentPage()->stopLoading(); - if(!m_fileDialogHelper->isShow()) - addToHistory = false; - pDebug << "getCurrentUri....,,,,:" << m_fileDialogHelper->isShow() << getCurrentUri(); - pDebug << "gotouri123123:" << uri << addToHistory << forceUpdate; - if(uri.startsWith("search:///search_uris=")) - getCurrentPage()->goToUri(uri, addToHistory, forceUpdate); - else - getCurrentPage()->goToUri(Peony::FileUtils::urlEncode(uri), addToHistory, forceUpdate); - } -} - -/** - * @param filename文件名 - * @brief 选择指定文件 - */ -void KyNativeFileDialog::selectFile(const QString &filename) -{ - QUrl url = getCurrentUri(); - pDebug << "selectFileoooo..........:" << filename; -// if(!QFile::exists(filename.remove(0,7))) -// { -// pDebug << "selectFile not exist:" << filename.remove(0,7); -// return; -// } - QString path = filename; - - if(url.toString() != path) - { - if(path.startsWith("/")) - path = ("file://" + path); - - pDebug << "select filename path:" << path; - - QUrl pathUrl(path); - pDebug << "select pathUrl:" << pathUrl.path(); - - QDir dir(pathUrl.path()); - - if(!path.endsWith("/")) - dir.cdUp(); - setDirectoryUrl(QUrl("file://" + dir.path())); - pDebug << "url2222:" << dir.path(); - } - pDebug << "select url...."; - QList<QUrl> urls; - if(path.startsWith("/")) - path = "file://" + path; - pDebug << "filename:...." << path; - urls.append(QUrl(path)); - pDebug << "setInitiallySelectedFiles......" << path; - m_fileDialogHelper->options()->setInitiallySelectedFiles(urls); -// QDir dir(url.path()); -// url.setPath(dir.absoluteFilePath(filename)); -// pDebug << "selectFile url:" << url << dir.absoluteFilePath(filename) << filename; - selectUrl(QUrl(path)); -} - -QStringList KyNativeFileDialog::selectedFiles() const -{ - QStringList list; - for (const QUrl &url : selectedUrls()) { - QUrl fileUrl(url); - pDebug << "selectedFiles fileUrl.....:" << fileUrl.toString() << fileUrl.path(); -// if(!fileUrl.toString().startsWith("recent://") && !fileUrl.toString().startsWith("trash://")) -// list << fileUrl.toLocalFile(); -// else{ -// list << Peony::FileUtils::getEncodedUri(fileUrl.toString()); -// } - list << Peony::FileUtils::getEncodedUri(fileUrl.toString()); - } - pDebug << "selectedFiles...." << list; - return list; -} - -void KyNativeFileDialog::selectUrl(const QUrl &url) -{ - return; - Q_D(KyNativeFileDialog); - pDebug << "selectUrlkkkkk........url.path:" << url.path() << isDir(url.path()); - if(d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory && isDir(url.path())) - setCurrentInputName(QFileInfo(url.path()).fileName()); -} - -QList<QUrl> KyNativeFileDialog::selectedUrls() const -{ - pDebug << "selectedUrls........:"; - if (!getCurrentPage()) { - return QList<QUrl>(); - } - pDebug << "selectedUrls........:" << getCurrentPage()->getCurrentSelections(); - QStringList urlStrList = getCurrentPage()->getCurrentSelections(); - QList<QUrl> urls; - for (auto uri : urlStrList) { - pDebug << "selectedUrls urlDecode....:" << Peony::FileUtils::urlDecode(uri) << QUrl(Peony::FileUtils::urlDecode(uri)) << Peony::FileUtils::getTargetUri(uri); - if (uri.startsWith("trash://") || uri.startsWith("recent://") - || uri.startsWith("computer://") || uri.startsWith("favorite://") - || uri.startsWith("filesafe://")) - urls << Peony::FileUtils::getTargetUri(uri); - else{ -// pDebug << "1123456789...." << Peony::FileUtils::getUriBaseName(uri) << Peony::FileUtils::getFileDisplayName(uri) << -// Peony::FileUtils::toDisplayUris(QStringList() << uri) << Peony::FileUtils::getParentUri(uri) << Peony::FileUtils::getOriginalUri(uri); -// pDebug << "4567545678...." << QUrl(Peony::FileUtils::urlDecode(uri)).path() << QUrl(Peony::FileUtils::urlDecode(uri)).toDisplayString() << -// QUrl(Peony::FileUtils::urlDecode(uri)).toLocalFile(); -// pDebug << "4567545678...." << QUrl(uri).path() << QUrl(uri).toDisplayString() << -// QUrl(uri).toLocalFile(); - uri = uri.remove(0, 7); - pDebug << "target uri...." << Peony::FileUtils::getTargetUri(uri) << Peony::FileUtils::urlDecode(uri); - urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(uri));//Peony::FileUtils::urlDecode(uri); - } - pDebug << "selectedUrls uri test......." << uri << urls; - } - pDebug << "selectedUrls..." << urls; - return urls; -} - -QStringList qt_strip_filters(const QStringList &filters) -{ - QStringList strippedFilters; - QRegExp r(QString::fromLatin1("^(.*)\\(([^()]*)\\)$")); - const int numFilters = filters.count(); - strippedFilters.reserve(numFilters); - for (int i = 0; i < numFilters; ++i) { - QString filterName; - int index = r.indexIn(filters[i]); - if (index >= 0) - filterName = r.cap(1); - strippedFilters.append(filterName.simplified()); - } - return strippedFilters; -} - -void KyNativeFileDialog::setComBoxItems(const QStringList &filters) -{ - mKyFileDialogUi->m_fileTypeCombo->clear(); - mKyFileDialogUi->m_fileTypeCombo->addItems(filters); -} - -void KyNativeFileDialog::setNameFilters(const QStringList &filters) -{ - Q_D(KyNativeFileDialog); - d->nameFilters = filters; - pDebug << "setNameFilters filters..... :" << filters; - m_nameFilterMap.clear(); - - QStringList l; - if (testOption(QFileDialog::HideNameFilterDetails) && (d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory)) { - l = qt_strip_filters(filters); - pDebug << "HideNameFilterDetails..." << l; - setComBoxItems(l); - } else { - l = filters; - setComBoxItems(filters); - } - for(int i = 0; i < filters.length(); i++) - m_nameFilterMap.insert(i, l[i]); - - int index = mKyFileDialogUi->m_fileTypeCombo->currentIndex(); - pDebug << "setNameFilters index.....:" << index; - selectNameFilterCurrentIndex(index); -} - -QStringList KyNativeFileDialog::nameFilters() const -{ - Q_D( const KyNativeFileDialog); - return d->nameFilters; -} - -void KyNativeFileDialog::selectNameFilter(const QString &filter) -{ - Q_D( const KyNativeFileDialog); - - pDebug << "selectNameFilter.,,,,,....." << filter; - QString key = filter; - int index = 0; - if(!mKyFileDialogUi->m_fileTypeCombo->findText(key)){ - if (testOption(QFileDialog::HideNameFilterDetails) && (d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory)) { - QStringList l = qt_strip_filters(QStringList(filter)); - pDebug << "llllllllllll" << l << l.length(); - if(l.length() > 0) - key = l.first(); - } else { - key = filter; - } - } - pDebug << "key:" << key; - if(!key.isEmpty()) - index = mKyFileDialogUi->m_fileTypeCombo->findText(key); - if(index < 0) - return; - pDebug << "index:" << index; - - selectNameFilterByIndex(index); - selectNameFilterCurrentIndex(index); - Q_EMIT filterSelected(filter); -} - - -QString KyNativeFileDialog::selectedNameFilter() const -{ - Q_D(const KyNativeFileDialog); - const QComboBox *box = mKyFileDialogUi->m_fileTypeCombo; - return box ? d->nameFilters.value(box->currentIndex()) : QString(); -} - -void KyNativeFileDialog::selectNameFilterByIndex(int index) -{ - Q_D(KyNativeFileDialog); - if (index < 0 || index >= d->nameFilters.length() || !getCurrentPage()) { - return; - } - mKyFileDialogUi->m_fileTypeCombo->setCurrentIndex(index); - QStringList nameFilters = d->nameFilters; - if (index == nameFilters.size()) { - nameFilters.append(d->nameFilters[d->nameFilters.length() - 1]); - setNameFilters(nameFilters); - } - QString nameFilter = nameFilters.at(index); - QStringList newNameFilters = QPlatformFileDialogHelper::cleanFilterList(nameFilter); - pDebug << "selectNameFilterByIndex00000000000"; - if (/*d->acceptMode == QFileDialog::AcceptSave &&*/ !newNameFilters.isEmpty() && (d->fileMode != QFileDialog::DirectoryOnly && d->fileMode != QFileDialog::Directory)) { - QMimeDatabase db; - QString text = copyEditText();//mKyFileDialogUi->m_fileNameEdit->text(); - pDebug << "selectNameFilterByIndex text...." << text; - pDebug << "selectNameFilterByIndex newNameFilters...." << newNameFilters; - QStringList list = text.split("."); - pDebug << "selectNameFilterByIndex11111111 list" << list; - if(list.length() > 1) - { - if("." + list[list.length() - 1] != newNameFilters[0]) - { - int m = list[list.length() - 1].length(); - int n = text.length() - m; - pDebug << "mmmmmmmmmm..." << m << " nnnnnnnn.... " << n; - QString s = text.remove(n, m); - pDebug << "s000000....." << s; - QStringList filters = newNameFilters[0].split("."); - s = s + filters[filters.length() - 1]; - pDebug << "s11111111....." << s; - mKyFileDialogUi->m_fileNameEdit->setText(s); - } - }else{ - - } - } - if ((d->fileMode == QFileDialog::DirectoryOnly || d->fileMode == QFileDialog::Directory) && QStringList("/") != newNameFilters) { - newNameFilters = QStringList("/"); - } -} - -void KyNativeFileDialog::selectNameFilterCurrentIndex(int index) -{ - Q_D(KyNativeFileDialog); - - if(index < 0 || index >= d->nameFilters.length()) - return; - QString nameFilter = d->nameFilters[index]; - pDebug << "selectNameFilterCurrentIndex nameFilter..." << nameFilter; - - if(nameFilter.isEmpty()) - return; - QStringList filterList = QPlatformFileDialogHelper::cleanFilterList(nameFilter); - - pDebug << "selectNameFilterCurrentIndex filterList:" << filterList; - QStringList mimeTypeFilterList; - - pDebug << "selectNameFilterCurrentIndex filemode.....:" << fileMode(); - if(fileMode() == QFileDialog::Directory || fileMode() == QFileDialog::DirectoryOnly) - { - getCurrentPage()->addFileDialogFiltersCondition(mimeTypeFilterList, filterList, QDir::Dirs, Qt::CaseInsensitive); - } - else - getCurrentPage()->addFileDialogFiltersCondition(mimeTypeFilterList, filterList, filter(), Qt::CaseInsensitive); - if(m_fileDialogHelper->isViewInitialFinished()){ - refreshContainerSort(); - refreshCompleter(); - } -} - -int KyNativeFileDialog::selectNameFilterIndex() const -{ - const QComboBox *box = mKyFileDialogUi->m_fileTypeCombo; - return box ? box->currentIndex() : -1; -} - -QDir::Filters KyNativeFileDialog::filter() -{ - Q_D(KyNativeFileDialog); - return d->filters; -} - -void KyNativeFileDialog::setFilter(QDir::Filters filters) -{ - Q_D(KyNativeFileDialog); - d->filters = filters; -} - -void KyNativeFileDialog::setAcceptMode(QFileDialog::AcceptMode mode) -{ - Q_D(KyNativeFileDialog); - d->acceptMode = mode; - updateAcceptButtonState(); - if (mode == QFileDialog::AcceptOpen) { - mKyFileDialogUi->m_fileNameLabel->setText(tr("Name"));//文件名 - mKyFileDialogUi->m_fileNameLabel->setAlignment(Qt::AlignCenter); - mKyFileDialogUi->m_newFolderButton->hide(); - mKyFileDialogUi->m_acceptButton->setText(tr("Open")); - mKyFileDialogUi->m_rejectButton->setText(tr("Cancel")); - connect(mKyFileDialogUi->m_fileNameEdit , &QLineEdit::textChanged, this, &KyNativeFileDialog::onCurrentInputNameChanged); - - } else { - mKyFileDialogUi->m_fileNameLabel->setText(tr("Save as")); - mKyFileDialogUi->m_fileNameLabel->setAlignment(Qt::AlignCenter); - mKyFileDialogUi->m_newFolderButton->setText(tr("New Folder")); - mKyFileDialogUi->m_newFolderButton->show(); - mKyFileDialogUi->m_acceptButton->setText(tr("Save")); - mKyFileDialogUi->m_rejectButton->setText(tr("Cancel")); - mKyFileDialogUi->m_acceptButton->setDefault(true); - connect(mKyFileDialogUi->m_fileNameEdit, &QLineEdit::textChanged, this, &KyNativeFileDialog::onCurrentInputNameChanged); - connect(mKyFileDialogUi->m_newFolderButton, &QPushButton::clicked, this, &KyNativeFileDialog::onNewFolder); - } -} - -QFileDialog::AcceptMode KyNativeFileDialog::acceptMode() const -{ - Q_D(const KyNativeFileDialog); - return d->acceptMode; -} - -void KyNativeFileDialog::setFileMode(QFileDialog::FileMode mode) -{ - Q_D(KyNativeFileDialog); -// if (d->fileMode == QFileDialog::DirectoryOnly || d->fileMode == QFileDialog::Directory) { -// mKyFileDialog->setNameFilters(QStringList()); -// } - if(mode == QFileDialog::ExistingFile || mode == QFileDialog::AnyFile || - mode == QFileDialog::DirectoryOnly) - { - pDebug << "setFileMode000................" << mode; - - getCurrentPage()->setSelectionMode(QAbstractItemView::SingleSelection); - } - else - { - pDebug << "setFileMode00011111................" << mode; - - getCurrentPage()->setSelectionMode(QAbstractItemView::ExtendedSelection); - } - - if (mode == QFileDialog::DirectoryOnly || mode == QFileDialog::Directory) { - pDebug << "m_fileDialogHelper options setNameFilters...."; - m_fileDialogHelper->options()->setNameFilters(QStringList() << tr("Directories")); - setNameFilters(QStringList() << tr("Directories")); - mKyFileDialogUi->m_fileTypeCombo->clear(); - mKyFileDialogUi->m_fileTypeCombo->addItem(tr("Directories")); - mKyFileDialogUi->m_fileTypeCombo->setEnabled(false); - } - - d->fileMode = mode; - updateAcceptButtonState(); -} - -QFileDialog::FileMode KyNativeFileDialog::fileMode() -{ - Q_D(KyNativeFileDialog); - return d->fileMode; -} - -void KyNativeFileDialog::setViewMode(ViewMode mode) -{ - if(containerView()){ - pDebug << "setViewMode...." << mode << containerView()->viewId(); - if(mode == ViewMode::List && containerView()->viewId() != "List View") - { - this->getCurrentPage()->switchViewType("List View"); - } - else if(mode == ViewMode::Icon && containerView()->viewId() != "Icon View") - this->getCurrentPage()->switchViewType("Icon View"); - onSwitchView(); - } -} - -KyNativeFileDialog::ViewMode KyNativeFileDialog::viewMode() const -{ -// this->getCurrentPage()->switchViewType("List View"); - - if(containerView() && containerView()->viewId() == "List View") - return ViewMode::List; - return ViewMode::Icon; -} - -void KyNativeFileDialog::setLabelText(QFileDialog::DialogLabel label, const QString &text) -{ - switch (static_cast<int>(label)) { - case QFileDialog::Accept: - mKyFileDialogUi->m_acceptButton->setText(text); - break; - case QFileDialog::Reject: - mKyFileDialogUi->m_rejectButton->setText(text); - default: - break; - } -} - -QString KyNativeFileDialog::labelText(QFileDialog::DialogLabel label) const -{ - switch (static_cast<int>(label)) { - case QFileDialog::Accept: - return mKyFileDialogUi->m_acceptButton->text(); - case QFileDialog::Reject: - return mKyFileDialogUi->m_rejectButton->text(); - default: - break; - } - - return QString(); -} - -void KyNativeFileDialog::setOptions(QFileDialog::Options options) -{ - Q_D(KyNativeFileDialog); - d->options = options; - if (options.testFlag(QFileDialog::ShowDirsOnly)) { - d->m_container->setFilterLabelConditions(selectedNameFilter()); - } -} - -void KyNativeFileDialog::setOption(QFileDialog::Option option, bool on) -{ - Q_D(KyNativeFileDialog); - QFileDialog::Options options = d->options; - if (on) { - options |= option; - } else { - options &= ~option; - } - setOptions(options); -} - -bool KyNativeFileDialog::testOption(QFileDialog::Option option) const -{ - Q_D(const KyNativeFileDialog); - return m_fileDialogHelper->options()->testOption(static_cast<QFileDialogOptions::FileDialogOption>(option)); -} - -QFileDialog::Options KyNativeFileDialog::options() const -{ - Q_D(const KyNativeFileDialog); - return d->options; -} - -void KyNativeFileDialog::setCurrentInputName(const QString &name) -{ - pDebug << "setCurrentInputName.........:" << name; - m_copyEditText = name; -// mKyFileDialogUi->m_fileNameEdit->setText(name); - QMimeDatabase db; - const QString &suffix = db.suffixForFileName(name); - if (suffix.isEmpty()) { - mKyFileDialogUi->m_fileNameEdit->selectAll(); - } else { - mKyFileDialogUi->m_fileNameEdit->setSelection(0, name.length() - suffix.length() - 1); - } -} - -void KyNativeFileDialog::onAcceptButtonClicked() -{ - Q_D(KyNativeFileDialog); - if (!getCurrentPage()) { - return; - } - pDebug << "onAcceptButtonClicked:" << d->acceptMode << d->fileMode; - pDebug << "onAcceptButtonClicked000 sfiles..........:" << getCurrentSelectionsList(); - pDebug << "onAcceptButtonClicked111 sfiles..........:" << selectedFiles(); - - if(d->fileMode == QFileDialog::ExistingFile || d->fileMode == QFileDialog::ExistingFiles || d->fileMode == QFileDialog::AnyFile) - { - QList<QString> sFiles = selectedFiles(); - for (int i = 0; i < sFiles.length(); ++i) { - if(isDir(sFiles[i])) - { - pDebug << "gotouri666666" << "file://" + sFiles[i]; - goToUri(sFiles[i], true); - return; - } - } - } - - if(copyEditText() != "") - { - lineEditTextChange(copyEditText()); - } - pDebug << "onAcceptButtonClicked directoryUrl:" << directoryUrl() << directory(); - QList<QString> sFiles = selectedFiles(); - pDebug << "onAcceptButtonClicked sfiles..........:" << sFiles; -// pDebug << "getSelections........:" << containerView()->getSelections(); -// pDebug << "uri:" << Peony::FileUtils::getTargetUri(getCurrentUri()); -// pDebug << "uri1111111111:" << Peony::FileUtils::getParentUri(getCurrentUri()); - if(!m_searchMode) - { - pDebug << "onAcceptButtonClicked getCurrentUri........:" << getCurrentUri(); - if(!Peony::FileUtils::isFileExsit(getCurrentUri())){ - pDebug << directory().path() << "getCurrentUri directory not exists" << getCurrentUri(); - return; - } - } - else - { - foreach (QString str, sFiles) { - if(!Peony::FileUtils::isFileExsit(str))// - { - pDebug << "FileUtils path,,,:" << str << "not exists!"; - return; - } - } - } - - if (d->acceptMode == QFileDialog::AcceptSave) - { - if(!doSave(sFiles)) - { - pDebug << "da save faile!"; - return; - } - else - pDebug << "da save success!"; - - } - else if(d->acceptMode == QFileDialog::AcceptOpen) - { - if(!doOpen(sFiles)) - { - pDebug << "da open faile!"; - return; - } - else - pDebug << "da open success!"; - } - Q_EMIT m_fileDialogHelper->accept(); -} - -bool KyNativeFileDialog::saveMessageBox(QString name) -{ - if(QMessageBox::warning(this, tr("Warning"), name + " " + tr("exist, are you sure replace?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) - { - return true; - } - return false; -} - -bool KyNativeFileDialog::checkSaveFileExsits(QString path) -{ - bool exists = false; - if(fileMode() == QFileDialog::Directory || fileMode() == QFileDialog::DirectoryOnly) - { - QDir dir(path); - exists = dir.exists(); - } - else{ - QFile file(path); - exists = file.exists(); - } - pDebug << "checkSaveFileExsits path...." << path << exists; - return exists; -} - -bool KyNativeFileDialog::doSave(QStringList sFiles) -{ - Q_D(KyNativeFileDialog); - - QString file_name = copyEditText(); - bool suffixCheck = false; - QStringList nameFilters = d->nameFilters; - for (QString nameFilterList : nameFilters) { - for (QString nameFilter : QPlatformFileDialogHelper::cleanFilterList(nameFilterList)) { - pDebug << "nameFilter:" << nameFilter << "nameFilterList:" << nameFilterList; - if(nameFilter == "*") - break; - QRegExp re(nameFilter, Qt::CaseInsensitive, QRegExp::Wildcard); - if (re.exactMatch(file_name)) { - pDebug << "file_name:" << file_name; - suffixCheck = true; - }; - } - if (suffixCheck) { - break; - } - } - pDebug << "suffixCheck:" << suffixCheck << "nameFilters:" << nameFilters; - if (!suffixCheck && !nameFilters.isEmpty()) { - QMimeDatabase mdb; - if(mKyFileDialogUi->m_fileTypeCombo->currentIndex() < 0 || - mKyFileDialogUi->m_fileTypeCombo->currentIndex() >= nameFilters.length()) - return false; - QString nameFilter = nameFilters[mKyFileDialogUi->m_fileTypeCombo->currentIndex()]; - QStringList newNameFilters = QPlatformFileDialogHelper::cleanFilterList(nameFilter); - if (!newNameFilters.isEmpty()) { - if(m_fileDialogHelper->options()->defaultSuffix() == ""){ - - for (const QString &filter : newNameFilters) { - QString suffix = mdb.suffixForFileName(filter); - pDebug << "suffix....." << suffix; - if (suffix.isEmpty()) { - QRegExp regExp(filter.mid(2), Qt::CaseInsensitive, QRegExp::Wildcard); - mdb.allMimeTypes().first().suffixes().first(); - for (QMimeType m : mdb.allMimeTypes()) { - for (QString suffixe : m.suffixes()) { - if (regExp.exactMatch(suffixe)) { - suffix = suffixe; - break; - } - } - if (!suffix.isEmpty()) { - break; - } - } - - } - - pDebug << "suffix:" << suffix; - if (!suffix.isEmpty()) { - QString oldName = file_name; - oldName.append('.' + suffix); - setCurrentInputName(oldName); - pDebug << "path///:" << directory().path() + "/" + oldName; - if(checkSaveFileExsits(directory().path() + "/" + oldName)){ - if(!saveMessageBox(oldName)) - return false; - break; - } - if(filter == newNameFilters[newNameFilters.length() - 1]) - { - QString oldName = file_name; - oldName.append('.' + mdb.suffixForFileName(newNameFilters[0])); - if(checkSaveFileExsits(directory().path() + "/" + oldName)){ - if(!saveMessageBox(oldName)) - return false; - break; - } - setCurrentInputName(oldName); - return true; - } - } - } - } - else{ - file_name.append('.' + m_fileDialogHelper->options()->defaultSuffix()); - if(checkSaveFileExsits(directory().path() + "/" + file_name)){ - if(!saveMessageBox(file_name)) - return false; - } - setCurrentInputName(file_name); - pDebug << "path///:" << directory().path() + "/" + file_name; - } - } - } - else if(suffixCheck) - { - pDebug << "suffixCheck.....:" << suffixCheck << "path///:" << directory().path() + "/" + file_name; - if(checkSaveFileExsits(directory().path() + "/" + file_name)){ - if(!saveMessageBox(file_name)) - return false; - } - } - return true; -} - -bool KyNativeFileDialog::doOpen(QStringList sFiles) -{ - Q_D(KyNativeFileDialog); - -// if(d->fileMode != QFileDialog::AnyFile && sFiles.length() == 0) -// return false; -// if(d->fileMode == QFileDialog::DirectoryOnly && sFiles.length() > 1) -// return false; - pDebug << "doOpen fileMode:" << d->fileMode; - if(d->fileMode == QFileDialog::ExistingFile || d->fileMode == QFileDialog::ExistingFiles) - { - int isfiles = 0; - int isDirctory = 0; - foreach (QString files, sFiles) - { - if(isDir(files)) - { - isDirctory++; - } - else - isfiles++; - } - pDebug << "isfiles:" << isfiles << "isDirctory:" << isDirctory; - if((isfiles > 0 && isDirctory > 0) || (isDirctory > 1) || (isfiles <= 0 && isDirctory <= 0)) - return false; - else{ - pDebug << "open setSelected..."; - Q_EMIT filesSelected(selectedUrls()); - } - } - else if(d->fileMode == QFileDialog::AnyFile) - { - if(sFiles.length() > 0) - { - Q_EMIT filesSelected(selectedUrls()); - } - else if(copyEditText() != "") - { - QList<QUrl> urlList; - pDebug << "directory path:" << directory().path() << directoryUrl().path(); - urlList.append(QUrl(directory().path() + "/" + copyEditText())); - Q_EMIT filesSelected(urlList); - } - else - return false; - } - else if(d->fileMode == QFileDialog::DirectoryOnly || d->fileMode == QFileDialog::Directory) - { - if(copyEditText() != "") - { - if(sFiles.isEmpty() || (!sFiles.isEmpty() && !isDir(sFiles[0]))) - { - return false; - } - else - Q_EMIT filesSelected(selectedUrls()); - } - else - { - if (!getCurrentPage()) { - return false; - } - QList<QUrl> urls; - QString uri = getCurrentPage()->getCurrentUri(); - pDebug << "current uri........:" << uri; - - if (uri.startsWith("trash://") || uri.startsWith("recent://") - || uri.startsWith("computer://") || uri.startsWith("favorite://") - || uri.startsWith("filesafe://")) - { - urls << Peony::FileUtils::getTargetUri(uri); - } - else - { - urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(uri)); - } - if(containerView()) - pDebug << "select uri....:" << containerView()->getSelections(); - - Q_EMIT filesSelected(urls); - } - } - pDebug << "onAcceptButtonClicked selectedfiles:" << sFiles; - - return true; -} - - -void KyNativeFileDialog::onRejectButtonClicked() -{ - Q_EMIT m_fileDialogHelper->reject(); -} - -bool KyNativeFileDialog::isDir(QString path) -{ - auto fileSymLinkInfo = Peony::FileInfo::fromUri(path); - if(fileSymLinkInfo->isSymbolLink()) { - path = fileSymLinkInfo->symlinkTarget(); - } - else - path = Peony::FileUtils::urlEncode(path); - - QFile file(path); - QFileInfo fileInfo(file); - pDebug << "isDir path1111:" << path << fileInfo.isDir() << Peony::FileUtils::isFileDirectory(path) << Peony::FileUtils::getFileIsFolder(path);; - if(fileInfo.isDir()) - return true; - - pDebug << "isDir path2222222..:" << path << Peony::FileUtils::isFileDirectory(path) << Peony::FileUtils::getFileIsFolder(path); - return Peony::FileUtils::isFileDirectory(path);; -} - -void KyNativeFileDialog::goBack() -{ - pDebug << "goback...." << getCurrentPage()->canGoBack(); - getCurrentPage()->goBack(); -} - -void KyNativeFileDialog::goForward() -{ - pDebug << "goForward...." << getCurrentPage()->canGoForward(); - getCurrentPage()->goForward(); -} - -void KyNativeFileDialog::goToParent() -{ - pDebug << "goToParent...." << getCurrentPage()->canCdUp(); - getCurrentPage()->cdUp(); - -} - -void KyNativeFileDialog::setHelper(KyFileDialogHelper* helepr) -{ - if(helepr != nullptr) - m_fileDialogHelper = helepr; -} - -void KyNativeFileDialog::onSwitchView() -{ - pDebug << "onSwitchView containerView:" << (containerView() == nullptr); - if(containerView() != nullptr) - { - QString viewId = containerView()->viewId(); - pDebug << "onSwitchView:" << viewId; - if (viewId == "List View") { - mKyFileDialogUi->m_modeButton->setIcon(QIcon::fromTheme("view-list-symbolic")); - this->mKyFileDialogUi->m_listModeAction->setChecked(true); - this->mKyFileDialogUi->m_iconModeAction->setChecked(false); - } else { - mKyFileDialogUi->m_modeButton->setIcon(QIcon::fromTheme("view-grid-symbolic")); - this->mKyFileDialogUi->m_listModeAction->setChecked(false); - this->mKyFileDialogUi->m_iconModeAction->setChecked(true); - } - } -} - -void KyNativeFileDialog::updateWindowState() -{ - Q_D(KyNativeFileDialog); - pDebug << "updateWindowState.............." << getCurrentUri() << directory() << directoryUrl() << mKyFileDialogUi->m_fileNameEdit->text() << copyEditText(); - //mKyFileDialogUi->m_fileNameEdit->setText(""); - pDebug << "updateWindowState m_searchMode.............." <<m_searchMode << getCurrentUri() << m_isClearSearchKey; - -// if(m_searchMode && !getCurrentUri().startsWith("search:///") && !m_isClearSearchKey) -// { -// m_isClearSearchKey = false; -// searchButtonClicked(); -// } - - refreshCompleter(); -// const QStringList list = getCurrentPage()->getAllFileUris(); -// pDebug << "getAllFileUris:" << list; -// pDebug << "getselectUris:" << getCurrentSelectionsList(); - -// m_CurrentPathAllFiles.clear(); - -// foreach (QString str, list) { -// str = Peony::FileUtils::urlDecode(str); -// m_CurrentPathAllFiles.append(str.split("/").last()); -// } - -// pDebug << "updateWindowState 1111111111111"; -// QStringListModel *model = (QStringListModel *)(m_completer->model()); -// model->setStringList(m_CurrentPathAllFiles); -// pDebug << "updateWindowState 2222222222222"; - - auto uri = getCurrentUri(); - pDebug << "updateWindowState uri updatePath....." << uri << getCurrentPage()->canGoBack(); - mKyFileDialogUi->m_pathbarWidget->updatePath(uri); - mKyFileDialogUi->m_backButton->setEnabled(getCurrentPage()->canGoBack()); - mKyFileDialogUi->m_forwardButton->setEnabled(getCurrentPage()->canGoForward()); - mKyFileDialogUi->m_toParentButton->setEnabled(getCurrentPage()->canCdUp()); - updateStatusBar(); - pDebug << "updateWindowState 44444"; - lineEditTextChange(copyEditText()); - pDebug << "updateWindowState 55555555555555555555" << uri; - -} - -QString KyNativeFileDialog::selectName() -{ - QStringList selectList = getCurrentPage()->getCurrentSelections(); - QString nameStr = ""; - for(int i = 0; i < selectList.length(); i++) - { - pDebug << "selectName ....i:" << i << Peony::FileUtils::getFileDisplayName(selectList[i]) << isDir(selectList[i]); - if(acceptMode() == QFileDialog::AcceptSave && isDir(selectList[i])){ - continue; - } - if(acceptMode() == QFileDialog::AcceptOpen && (fileMode() == QFileDialog::ExistingFile || - fileMode() == QFileDialog::ExistingFiles || fileMode() == QFileDialog::AnyFile) && isDir(selectList[i])){ - continue; - } - QString str = Peony::FileUtils::getFileDisplayName(selectList[i]);//Peony::FileUtils::urlDecode(selectList[i]); - QString name = ""; - if(selectList.length() == 1) - name += str.split("/").last(); - else if(i < (selectList.length() -1)) - name += "\"" + str.split("/").last() + "\" "; - else - name += "\"" + str.split("/").last() + "\""; - nameStr += name; - } - - if(acceptMode() == QFileDialog::AcceptSave){ - for(int i = 0; i < selectList.length(); i++) { - if(isDir(selectList[i])) { - mKyFileDialogUi->m_acceptButton->setText(tr("Open")); - return nameStr; - } - } - mKyFileDialogUi->m_acceptButton->setText(tr("Save")); - } - return nameStr; -} - -void KyNativeFileDialog::updateStatusBar() -{ - if(getCurrentSelectionsList().length() > 0) - { - foreach (QString str, getCurrentSelections()) { - pDebug << "updateStatusBar str" << str; - Q_EMIT currentChanged(QUrl(QUrl(str).path())); - } - } - updateAcceptButtonState(); - QString nameStr = selectName(); - if(nameStr != "" && !mKyFileDialogUi->m_fileNameEdit->hasFocus()) - mKyFileDialogUi->m_fileNameEdit->setText(nameStr); - pDebug << "updateStatusBar............" << mKyFileDialogUi->m_fileNameEdit->hasFocus() << getCurrentUri(); -} - -void KyNativeFileDialog::containerMenuRequest(const QPoint &pos) -{ - pDebug << "menuRequest....00000" << pos << QCursor::pos() << (this->getCurrentPage() == nullptr); - if(this->getCurrentPage()) - pDebug << "menuRequest....1111111" << (this->getCurrentPage()->getView() == nullptr); - Peony::DirectoryViewMenu menu(this); - QStringList hideActionsName; - hideActionsName.append(OPEN_IN_NEW_WINDOW_ACTION); - hideActionsName.append(OPEN_IN_NEW_TAB_ACTION); - pDebug << "hideActionsName...." << hideActionsName; - menu.setHiddenActionsByObjectName(hideActionsName); - pDebug << "menuRequest....11111"; - menu.exec(QCursor::pos()); - m_uris_to_edit = menu.urisToEdit(); -} - -void KyNativeFileDialog::delayShow() -{ - Q_D(const KyNativeFileDialog); - //QTBUG48248 借鉴kde plasma-integration里用的QTimer - pDebug << "delayShow start..........." << getCurrentUri(); - d->m_timer->start(); -} - -void KyNativeFileDialog::discardDelayedShow() -{ - Q_D(const KyNativeFileDialog); - pDebug << "discardDelayedShow stop..........."; - d->m_timer->stop(); -} - - -void KyNativeFileDialog::resizeEvent(QResizeEvent *e) -{ - pDebug << "resizeEvent....." << this->width() << mKyFileDialogUi->m_siderWidget->width() << mKyFileDialogUi->m_container->width(); - QDialog::resizeEvent(e); -} - -void KyNativeFileDialog::paintEvent(QPaintEvent *e) -{ - KWindowEffects::enableBlurBehind(this->winId(), true); - - QColor color = this->palette().base().color(); - QColor colorBase = QColor(this->palette().base().color()); - - int R1 = color.red(); - int G1 = color.green(); - int B1 = color.blue(); - qreal a1 = 0.3; - - int R2 = colorBase.red(); - int G2 = colorBase.green(); - int B2 = colorBase.blue(); - qreal a2 = 1; - - qreal a = 1 - (1 - a1)*(1 - a2); - - qreal R = (a1*R1 + (1 - a1)*a2*R2) / a; - qreal G = (a1*G1 + (1 - a1)*a2*G2) / a; - qreal B = (a1*B1 + (1 - a1)*a2*B2) / a; - - colorBase.setRed(R); - colorBase.setGreen(G); - colorBase.setBlue(B); - auto sidebarOpacity = Peony::GlobalSettings::getInstance()->getValue(SIDEBAR_BG_OPACITY).toInt(); - - if(sidebarOpacity != 100) - mKyFileDialogUi->m_sider->viewport()->setAttribute(Qt::WA_TranslucentBackground); - - colorBase.setAlphaF(sidebarOpacity/100.0); - - QPainterPath sidebarPath; - //sidebarPath.setFillRule(Qt::FillRule::WindingFill); - QRect sideBarRect = QRect(mKyFileDialogUi->m_sider->mapTo(this, QPoint()), mKyFileDialogUi->m_sider->size()); - auto adjustedRect = sideBarRect.adjusted(0, 0, 0, 0); - int radius = 6; - if(qApp->style()->property("normalRadius").isValid()) - radius = qApp->style()->property("normalRadius").toInt(); - sidebarPath.addRoundedRect(adjustedRect, radius, radius); - -// sidebarPath.addRect(adjustedRect.adjusted(0, 0, 0, -6)); -// sidebarPath.addRect(adjustedRect.adjusted(6, 0, 0, 0)); - QPainter p(this); - QPainterPath contentPath; - if(qApp->style()->property("maxRadius").isValid()) - radius = qApp->style()->property("maxRadius").toInt(); - qDebug() << "KyNativeFileDialog radius........" << radius; - contentPath.addRoundedRect(this->rect(), radius, radius); - auto bgPath = contentPath - sidebarPath; - p.fillPath(bgPath, color); - p.fillPath(sidebarPath, colorBase); - - QPalette palette = mKyFileDialogUi->m_sider->viewport()->palette(); - - palette.setColor(QPalette::Base, colorBase);//window AlternateBase Base NoRole -// pDebug << "viewport color:" << palette.color(QPalette::AlternateBase) << -// palette.color(QPalette::Window) << palette.color(QPalette::Base) -// << palette.color(QPalette::NoRole) << palette.color(QPalette::Shadow); - - mKyFileDialogUi->m_sider->viewport()->setPalette(palette); - - QPalette sPalette = mKyFileDialogUi->m_sider->verticalScrollBar()->palette(); - //sPalette.setColor(QPalette::Button, Qt::red);//window AlternateBase Base NoRole - sPalette.setColor(QPalette::Base, colorBase);//window AlternateBase Base NoRole - -// pDebug << "scrollbar color:" << sPalette.color(QPalette::AlternateBase) << -// sPalette.color(QPalette::Window) << sPalette.color(QPalette::Base) -// << sPalette.color(QPalette::NoRole) << sPalette.color(QPalette::Shadow); - - mKyFileDialogUi->m_sider->verticalScrollBar()->setPalette(sPalette); - - -// mKyFileDialogUi->m_sider->viewport()->setAttribute(Qt::WA_StyleSheet); -// mKyFileDialogUi->m_sider->viewport()->setObjectName("viewport"); -// mKyFileDialogUi->m_sider->viewport()->setStyleSheet("QWidget#viewport{background-color:red}"); -// mKyFileDialogUi->m_sider->viewport()->setAttribute(Qt::WA_TranslucentBackground); - - // mKyFileDialogUi->m_sider->verticalScrollBar()->setObjectName("scrollbar"); - // mKyFileDialogUi->m_sider->verticalScrollBar()->setAttribute(Qt::WA_StyleSheet); - // mKyFileDialogUi->m_sider->verticalScrollBar()->setStyleSheet("QWidget#scrollbar{background-color:red}"); -// m_effect->setTransParentPath(sidebarPath); -// m_effect->setTransParentAreaBg(colorBase); - -// //color.setAlphaF(0.5); -// m_effect->setWindowBackground(color); - -// m_effect->drawWindowShadowManually(&p, this->rect(), false); - QDialog::paintEvent(e); -} - -void KyNativeFileDialog::keyPressEvent(QKeyEvent *e) -{ - if (e->key() == Qt::Key_Backspace) - { - auto uri = Peony::FileUtils::getParentUri(getCurrentUri()); - //qDebug() << "goUp Action" << getCurrentUri() << uri; - if (uri.isNull()) - return; - goToUri(uri, true, true); - } - - return QDialog::keyPressEvent(e); -} - - -Peony::DirectoryViewContainer *KyNativeFileDialog::getCurrentPage() -{ - Q_D(const KyNativeFileDialog); - return d->m_container; -} - -Peony::DirectoryViewContainer *KyNativeFileDialog::getCurrentPage() const -{ - Q_D(const KyNativeFileDialog); - return d->m_container; -} - -Peony::DirectoryViewWidget *KyNativeFileDialog::containerView() const -{ - return getCurrentPage()->getView(); -} - -void KyNativeFileDialog::updateAcceptButtonState() -{ - Q_D(const KyNativeFileDialog); - - pDebug << "updateAcceptButtonState......" << getCurrentUri() << d->acceptMode << d->fileMode; - if(d->acceptMode == QFileDialog::AcceptOpen) - { - if(d->fileMode != QFileDialog::Directory && d->fileMode != QFileDialog::DirectoryOnly) - { - mKyFileDialogUi->m_acceptButton->setEnabled(!(getCurrentSelectionsList().length() == 0)); - return; - bool isSelectFile = false; - if(copyEditText() == "") - mKyFileDialogUi->m_acceptButton->setEnabled(!(getCurrentSelectionsList().length() == 0)); - - if(copyEditText() != "") - { - QString text = copyEditText(); - QStringList list = text.split("\""); - pDebug << "list234565432............" << list; - for (int i = list.length() - 1; i >= 0; i--) { - if(list[i] == "" || list[i] == " ") - list.removeAt(i); - } - pDebug << "list testtttttt..............:" << list; - - foreach (QString str, list) { - if(str.length() > 0 && str[0] == "\"") - str = str.remove(0, 1); - if(str.length() > 0 && str[str.length() - 1] == "\"") - str = str.remove(str.length() - 1, 1); - QString parentPath = getCurrentUri(); - - if(parentPath.endsWith("/")) - parentPath.remove(parentPath.length() - 1, 1); - pDebug << "updateAcceptButtonState str0000:" << (parentPath + "/" + str);//parentPath.startsWith("recent://") - - if ((parentPath.startsWith("trash://") || parentPath.startsWith("recent://") - || parentPath.startsWith("computer://") || parentPath.startsWith("favorite://") - || parentPath.startsWith("filesafe://")) && getCurrentSelections().length() > 0) - { - QString targetUri = Peony::FileUtils::getTargetUri(getCurrentSelections()[0]); - QString targetPath = Peony::FileUtils::urlDecode(targetUri); - pDebug << "getTargetUri uri....." << targetUri; - pDebug << "uriiiiii...." << targetPath; - if(Peony::FileUtils::isFileExsit(targetPath)) - { - isSelectFile = true; - pDebug << "isSelectFileeeeeeee11111...." << isSelectFile; - break; - } - } - else - { - QString targetPath = Peony::FileUtils::urlDecode(parentPath + "/" + str); - pDebug << "targetPath11111 uri....." << targetPath << Peony::FileUtils::isFileExsit(targetPath); - - QString targetPath1 = Peony::FileUtils::urlEncode(parentPath + "/" + str); - pDebug << "targetPath123432 uri....." << targetPath1 << Peony::FileUtils::isFileExsit(targetPath1); - - if(Peony::FileUtils::isFileExsit(parentPath + "/" + str)) - isSelectFile = true; - pDebug << "isSelectFileeeeeee22222...." << isSelectFile; - break; - } - } - mKyFileDialogUi->m_acceptButton->setEnabled(isSelectFile); - return; - } - } - else - { - bool isSelectFile = true; - if(copyEditText() != "") - { - QString text = copyEditText(); - QStringList list = text.split("\""); - pDebug << "list0000............" << list; - for (int i = list.length() - 1; i >= 0; i--) { - if(list[i] == "" || list[i] == " ") - list.removeAt(i); - } - pDebug << "list1111..............:" << list; - - foreach (QString str, list) { - pDebug << "strrrrrrrrr....." << str; - if(str.length() > 0 && str[0] == "\"") - str = str.remove(0, 1); - if(str.length() > 0 && str[str.length() - 1] == "\"") - str = str.remove(str.length() - 1, 1); - QString parentPath = getCurrentUri(); - - pDebug << "parentPath......" << parentPath; - if(parentPath.endsWith("/")) - parentPath.remove(parentPath.length() - 1, 1); - pDebug << "updateAcceptButtonState str,,,,,,:" << (parentPath + "/" + str) << Peony::FileUtils::isFileExsit(parentPath + "/" + str); - - if(isDir(parentPath + "/" + str)) - { - pDebug << "isSelectFile000000...:" << isSelectFile << (parentPath + "/" + str); - isSelectFile = true; - break; - } - else - { - isSelectFile = false; - } - } - } - pDebug << "isSelectFile...." << isSelectFile; - mKyFileDialogUi->m_acceptButton->setEnabled(isSelectFile); - } - } - else - { - if(getCurrentSelectionsList().length() != 0){ - mKyFileDialogUi->m_acceptButton->setEnabled(true); - return; - } - if(copyEditText() == "") - mKyFileDialogUi->m_acceptButton->setEnabled(false); - else - mKyFileDialogUi->m_acceptButton->setEnabled(true); - pDebug << "isenabled......:" << mKyFileDialogUi->m_acceptButton->isEnabled(); - } - pDebug << "acceptButton isEnabled:" << mKyFileDialogUi->m_acceptButton->isEnabled(); -} - -void KyNativeFileDialog::onCurrentInputNameChanged() -{ - Q_D(KyNativeFileDialog); - d->currentInputName = copyEditText(); - updateAcceptButtonState(); -} - -void KyNativeFileDialog::onNewFolder() -{ - Peony::CreateTemplateOperation op(getCurrentUri(), Peony::CreateTemplateOperation::EmptyFolder); - op.run(); - return; - QDir dir = directory(); - pDebug << "onNewFolder getCurrentUri:" << getCurrentUri() << directory() << directoryUrl(); - QString path = ""; - if(directory().path() != "/") - path = directory().path(); - path += "/" + tr("NewFolder"); - if(!dir.exists(path)) - { - bool newFolder = dir.mkdir(path); - pDebug << "newFolder:" << newFolder; - } -} - -void KyNativeFileDialog::setSortType() -{ - if(getCurrentPage()->getSortOrder() == Qt::AscendingOrder) - { - mKyFileDialogUi->m_sortButton->setIcon(QIcon::fromTheme("view-sort-descending-symbolic")); - mKyFileDialogUi->m_descending->setChecked(true); - mKyFileDialogUi->m_ascending->setChecked(false); - } - else - { - mKyFileDialogUi->m_sortButton->setIcon(QIcon::fromTheme("view-sort-ascending-symbolic")); - mKyFileDialogUi->m_ascending->setChecked(true); - mKyFileDialogUi->m_descending->setChecked(false); - } -} - -void KyNativeFileDialog::intiContainerSort() -{ - auto settings = Peony::GlobalSettings::getInstance(); - auto sortType = settings->isExist(SORT_COLUMN)? settings->getValue(SORT_COLUMN).toInt() : 0; - auto sortOrder = settings->isExist(SORT_ORDER)? settings->getValue(SORT_ORDER).toInt() : 0; - pDebug << "sortType:" << sortType << sortOrder; - getCurrentPage()->setSortType(Peony::FileItemModel::ColumnType(sortType)); - getCurrentPage()->setSortOrder(Qt::SortOrder(sortOrder)); - setSortType(); - setShowHidden(getWindowShowHidden()); -} - -void KyNativeFileDialog::refreshContainerSort() -{ - intiContainerSort(); - setUseDefaultNameSortOrder(getWindowUseDefaultNameSortOrder()); - setSortFolderFirst(getWindowSortFolderFirst()); -} - -void KyNativeFileDialog::refreshCompleter() -{ - const QStringList list = getCurrentPage()->getAllFileUris(); - pDebug << "getAllFileUris:" << list; - pDebug << "getselectUris:" << getCurrentSelectionsList(); - - m_CurrentPathAllFiles.clear(); - - foreach (QString str, list) { - str = Peony::FileUtils::urlDecode(str); - m_CurrentPathAllFiles.append(str.split("/").last()); - } - - pDebug << "updateWindowState 1111111111111"; - QStringListModel *model = (QStringListModel *)(m_completer->model()); - model->setStringList(m_CurrentPathAllFiles); - pDebug << "updateWindowState 2222222222222"; -} - -void KyNativeFileDialog::searchButtonClicked() -{ - m_searchMode = ! m_searchMode; - if(m_searchMode) - { - mKyFileDialogUi->m_fileNameEdit->setText(""); - mKyFileDialogUi->m_fileNameEdit->setReadOnly(true); - setCurrentSelections(QStringList()); - } - else - { - mKyFileDialogUi->m_fileNameEdit->setReadOnly(false); - } - pDebug << "searchButtonClicked searchButtonClicked" <<m_searchMode; - m_lastSearchPath = getCurrentUri(); - pDebug << "m_lastSearchPath....." << m_lastSearchPath << getCurrentUri() << getCurrentPage()->getCurrentUri(); - //Q_EMIT this->updateSearchRequest(m_search_mode); - setSearchMode(m_searchMode); -} - -void KyNativeFileDialog::setSearchMode(bool mode) -{ - mKyFileDialogUi->m_searchBtn->setCheckable(mode); - mKyFileDialogUi->m_searchBtn->setChecked(mode); - mKyFileDialogUi->m_searchBtn->setDown(mode); - mKyFileDialogUi->m_pathbar->switchEditMode(mode); -} - -void KyNativeFileDialog::lineEditTextChange(QString text) -{ - m_copyEditText = text; - if(m_searchMode) - return; - QString url; - if(directory().path() != "/") - url = QUrl(getCurrentUri()).path();//directoryUrl().toString();//getCurrentUri() - pDebug << "mKyFileDialogUi->m_fileNameEdit......:" << getCurrentUri() << url << text; - pDebug << "listview55555555555555.........." << m_CurrentPathAllFiles.length(); - QString parentPath = getCurrentUri(); - - if(parentPath.endsWith("/")) - parentPath.remove(parentPath.length() - 1, 1); - if(url.endsWith("/")) - url.remove(url.length() - 1, 1); - - pDebug << "parentPath:" << parentPath; - pDebug << "getCurrentSelections......:" << getCurrentSelectionsList() << text; - - if(!text.contains("\""))//输入框中只有1个文件 - { - if ((parentPath.startsWith("trash://") || parentPath.startsWith("recent://") - || parentPath.startsWith("computer://") || parentPath.startsWith("favorite://") - || parentPath.startsWith("filesafe://")) && getCurrentSelections().length() > 0) - { - for(int i = 0; i < getCurrentSelections().length(); i++) - { - QString targetUri = Peony::FileUtils::getTargetUri(getCurrentSelections()[i]); - Peony::FileInfo fileInfo(targetUri); - pDebug << "text:" << text << "displayName:" << fileInfo.displayName(); - if(fileInfo.displayName() == text){ - updateAcceptButtonState(); - return; - } - } - QString targetUri = Peony::FileUtils::getTargetUri(getCurrentSelections()[0]); - QString targetPath = Peony::FileUtils::urlDecode(targetUri); - pDebug << "getTargetUri uri....." << targetUri; - pDebug << "uriiiiii...." << targetPath; - if(Peony::FileUtils::isFileExsit(targetPath)) - { - QStringList selectList; - selectList.append(getCurrentSelections()[0]); - pDebug << "selectList...000000" << selectList; - setCurrentSelections(selectList); - updateAcceptButtonState(); - return; - } - } - else - { - pDebug << "Peony::FileUtils::isFileExsit123:" << (parentPath + "/" + text) << Peony::FileUtils::isFileExsit(parentPath + "/" + text); - // pDebug << "Peony::FileUtils::isFileExsit:" << (parentPath + "/" + text) << Peony::FileUtils::isFileExsit(parentPath + "/" + text); - for(int i = 0; i < getCurrentSelections().length(); i++) - { - if(Peony::FileUtils::getFileDisplayName(getCurrentSelections()[i]) == text){ - updateAcceptButtonState(); - return; - } - } - - if(Peony::FileUtils::isFileExsit(parentPath + "/" + text)){ - pDebug << "file exists...."; - //m_container选择指定文件 - QStringList selectList; - selectList.append(parentPath + "/" + text); - pDebug << "selectList...1111111" << selectList; - setCurrentSelections(selectList); - if(containerView()) - pDebug << "selectList...22222222222" << containerView()->getSelections(); - updateAcceptButtonState(); - return; - } - else - { - QString path = parentPath + "/" + text; - pDebug << path << "not exists!"; - setCurrentSelections(QStringList()); - updateAcceptButtonState(); - return; - } - } - } - else - { - if ((parentPath.startsWith("trash://") || parentPath.startsWith("recent://") - || parentPath.startsWith("computer://") || parentPath.startsWith("favorite://") - || parentPath.startsWith("filesafe://"))) - { - QStringList list = text.split("\""); - pDebug << "listttt1111............" << list; - for (int i = list.length() - 1; i >= 0; i--) { - if(list[i] == "" || list[i] == " ") - list.removeAt(i); - } - QStringList displayNameList; - for(int i = 0; i < getCurrentSelections().length(); i++) - { - QString targetUri = Peony::FileUtils::getTargetUri(getCurrentSelections()[i]); - Peony::FileInfo fileInfo(targetUri); - pDebug << "text:" << text << "displayName:" << fileInfo.displayName(); - displayNameList.append(fileInfo.displayName()); - } - pDebug << "list:" << list; - pDebug << "displayNameList:" << displayNameList; - for(int i = 0; i < list.length(); i++){ - if(!displayNameList.contains(list[i])) - break; - else if(i == list.length() - 1){ - updateAcceptButtonState(); - return; - } - } - - QStringList selectList; - foreach (QString str, getCurrentSelections()) - { - QString targetUri = Peony::FileUtils::getTargetUri(str); - QString targetPath = Peony::FileUtils::urlDecode(targetUri); - pDebug << "getTargetUri uri0000....." << targetUri; - pDebug << "uriiiiii00000...." << targetPath; - if(Peony::FileUtils::isFileExsit(targetPath)) - { - selectList.append(str); - } - } - pDebug << "selectList...222222222" << selectList; - setCurrentSelections(selectList); - updateAcceptButtonState(); - return; - } - else{ - QStringList selectList; - QStringList list = text.split("\""); - pDebug << "listttt1111............" << list; - for (int i = list.length() - 1; i >= 0; i--) { - if(list[i] == "" || list[i] == " ") - list.removeAt(i); - } - pDebug << "listtttt22222222..............:" << list; - - QStringList displayNameList; - for(int i = 0; i < getCurrentSelections().length(); i++) - { - QString displayName = Peony::FileUtils::getFileDisplayName(getCurrentSelections()[i]); - displayNameList.append(displayName); - } - pDebug << "list:" << list; - pDebug << "displayNameList:" << displayNameList; - for(int i = 0; i < list.length(); i++){ - if(!displayNameList.contains(list[i])) - break; - else if(i == list.length() - 1){ - updateAcceptButtonState(); - return; - } - } - - pDebug << "listtttttt3333333........................."; - foreach (QString str, list) { - if(str.length() > 0 && str[0] == "\"") - str = str.remove(0, 1); - if(str.length() > 0 && str[str.length() - 1] == "\"") - str = str.remove(str.length() - 1, 1); - pDebug << "str:" << str; - QFile file(url + "/" + str); - - if(Peony::FileUtils::isFileExsit(parentPath + "/" + str))//(file.exists()) - selectList.append(parentPath + "/" + str); - } - pDebug << "selectList...333333" << selectList; - setCurrentSelections(selectList); - updateAcceptButtonState(); - } - return; - } -} - -void KyNativeFileDialog::setShortCuts() -{ - if (!m_shortcutsSet) { - //stop loading action - QAction *stopLoadingAction = new QAction(this); - stopLoadingAction->setShortcut(QKeySequence(Qt::Key_Escape)); - addAction(stopLoadingAction); - connect(stopLoadingAction, &QAction::triggered, this, &KyNativeFileDialog::forceStopLoading); - - //show hidden action - QAction *showHiddenAction = new QAction(this); - showHiddenAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_H)); - showHiddenAction->setCheckable(true); - addAction(showHiddenAction); - connect(showHiddenAction, &QAction::triggered, this, [=]() { - //qDebug() << "show hidden"; - this->setShowHidden(!getWindowShowHidden()); - }); - - auto undoAction = new QAction(QIcon::fromTheme("edit-undo-symbolic"), tr("Undo"), this); - undoAction->setShortcut(QKeySequence::Undo); - addAction(undoAction); - connect(undoAction, &QAction::triggered, [=]() { - Peony::FileOperationManager::getInstance()->undo(); - }); - - auto redoAction = new QAction(QIcon::fromTheme("edit-redo-symbolic"), tr("Redo"), this); - redoAction->setShortcut(QKeySequence::Redo); - addAction(redoAction); - connect(redoAction, &QAction::triggered, [=]() { - Peony::FileOperationManager::getInstance()->redo(); - }); - - //add CTRL+D for delete operation - auto trashAction = new QAction(this); - trashAction->setShortcuts(QList<QKeySequence>()<<Qt::Key_Delete<<QKeySequence(Qt::CTRL + Qt::Key_D)); - connect(trashAction, &QAction::triggered, [=]() { - auto currentUri = getCurrentUri(); - if (currentUri.startsWith("search://") - || currentUri.startsWith("favorite://") || currentUri == "filesafe:///" - || currentUri.startsWith("kmre://") || currentUri.startsWith("kydroid://")) - return; - - auto uris = this->getCurrentSelections(); - - QString desktopPath = "file://" + QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); - QString desktopUri = Peony::FileUtils::getEncodedUri(desktopPath); - QString homeUri = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); - QString documentPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)); - QString musicPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MusicLocation)); - QString moviesPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MoviesLocation)); - QString picturespPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::PicturesLocation)); - QString downloadPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)); - if (!uris.isEmpty() && !uris.contains(desktopUri) && !uris.contains(homeUri) && !uris.contains(documentPath) && !uris.contains(musicPath) - && !uris.contains(moviesPath) && !uris.contains(picturespPath) && !uris.contains(downloadPath)) { - bool isTrash = this->getCurrentUri() == "trash:///"; - if (!isTrash) { - Peony::FileOperationUtils::trash(uris, true); - } else { - Peony::FileOperationUtils::executeRemoveActionWithDialog(uris); - } - } - }); - addAction(trashAction); - - auto deleteAction = new QAction(this); - deleteAction->setShortcuts(QList<QKeySequence>()<<QKeySequence(Qt::SHIFT + Qt::Key_Delete)); - addAction(deleteAction); - connect(deleteAction, &QAction::triggered, [=]() { - auto currentUri = getCurrentUri(); - if (currentUri.startsWith("search://") || currentUri == "filesafe:///" - || currentUri.startsWith("kmre://") || currentUri.startsWith("kydroid://")) - return; - - auto uris = this->getCurrentSelections(); - - QString desktopPath = "file://" + QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); - QString documentPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)); - QString musicPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MusicLocation)); - QString moviesPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::MoviesLocation)); - QString picturespPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::PicturesLocation)); - QString downloadPath = Peony::FileUtils::getEncodedUri("file://" + QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)); - QString desktopUri = Peony::FileUtils::getEncodedUri(desktopPath); - QString homeUri = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); - if (! uris.contains(desktopUri) && !uris.contains(homeUri) && !uris.contains(documentPath) && !uris.contains(musicPath) - && !uris.contains(moviesPath) && !uris.contains(picturespPath) && !uris.contains(downloadPath)) { - Peony::FileOperationUtils::executeRemoveActionWithDialog(uris); - } - }); - - auto searchAction = new QAction(this); - searchAction->setShortcuts(QList<QKeySequence>()<<QKeySequence(Qt::CTRL + Qt::Key_F)); - connect(searchAction, &QAction::triggered, this, [=]() { - searchButtonClicked(); - }); - addAction(searchAction); - - //F4 or Alt+D, change to address - auto locationAction = new QAction(this); - locationAction->setShortcuts(QList<QKeySequence>()<<Qt::Key_F4<<QKeySequence(Qt::ALT + Qt::Key_D)); - connect(locationAction, &QAction::triggered, this, [=]() { - mKyFileDialogUi->m_pathbar->startEdit(); - }); - addAction(locationAction); - - auto closeWindowAction = new QAction(this); - closeWindowAction->setShortcuts(QList<QKeySequence>()<<QKeySequence(Qt::ALT + Qt::Key_F4)); - connect(closeWindowAction, &QAction::triggered, this, [=]() { - this->close(); - }); - addAction(closeWindowAction); - - auto maxAction = new QAction(this); - maxAction->setShortcut(QKeySequence(Qt::Key_F11)); - connect(maxAction, &QAction::triggered, this, [=]() { - if(!m_istableModel){ - //showFullScreen has some issue, change to showMaximized, fix #20043 - mKyFileDialogUi->m_pathbar->cancelEdit(); - if (!this->isMaximized()) { - this->showMaximized(); - } else { - this->showNormal(); - } - updateMaximizeState(); - } - }); - addAction(maxAction); - - auto refreshWindowAction = new QAction(this); - refreshWindowAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_R)); - connect(refreshWindowAction, &QAction::triggered, this, [=]() { - this->refresh(); - }); - addAction(refreshWindowAction); - - auto listToIconViewAction = new QAction(this); - listToIconViewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_1)); - connect(listToIconViewAction, &QAction::triggered, this, [=]() { - this->beginSwitchView(QString("Icon View")); - }); - addAction(listToIconViewAction); - - auto iconToListViewAction = new QAction(this); - iconToListViewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_2)); - connect(iconToListViewAction, &QAction::triggered, this, [=]() { - this->beginSwitchView(QString("List View")); - }); - addAction(iconToListViewAction); - - auto reverseSelectAction = new QAction(this); - reverseSelectAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_L)); - connect(reverseSelectAction, &QAction::triggered, this, [=]() { - this->getCurrentPage()->getView()->invertSelections(); - }); - addAction(reverseSelectAction); - - auto refreshAction = new QAction(this); - refreshAction->setShortcut(Qt::Key_F5); - connect(refreshAction, &QAction::triggered, this, [=]() { - this->refresh(); - }); - addAction(refreshAction); - - //select all files in view, fix bug#115442 - auto *selectAllAction = new QAction(this); - selectAllAction->setShortcut(QKeySequence::SelectAll); - connect(selectAllAction, &QAction::triggered, this, [=]() { - if (this->getCurrentPage()->getView()) - { - /// note: 通过getAllFileUris设置的全选效率过低,如果增加接口则会导致二进制兼容性问题 - /// 所以这里使用现有的反选接口实现高效的全选,这个方法在mainwindow中也有用到 - //auto allFiles = this->getCurrentPage()->getView()->getAllFileUris(); - //this->getCurrentPage()->getView()->setSelections(allFiles); - setCurrentSelections(QStringList()); - this->getCurrentPage()->getView()->invertSelections(); - } - }); - addAction(selectAllAction); - - //file operations - auto *copyAction = new QAction(this); - copyAction->setShortcut(QKeySequence::Copy); - connect(copyAction, &QAction::triggered, [=]() { - bool is_recent = false; - if (!this->getCurrentSelections().isEmpty()) - { - // if (this->getCurrentSelections().first().startsWith("trash://", Qt::CaseInsensitive)) { - // return ; - // } - if (this->getCurrentSelections().first().startsWith("recent://", Qt::CaseInsensitive)) { - is_recent = true; - } - if (this->getCurrentSelections().first().startsWith("favorite://", Qt::CaseInsensitive)) { - return ; - } - } - else - return; - - QStringList selections; - if (is_recent) - { - for(auto uri:this->getCurrentSelections()) - { - uri = Peony::FileUtils::getTargetUri(uri); - selections << uri; - } - } - else{ - selections = this->getCurrentSelections(); - } - - Peony::ClipboardUtils::setClipboardFiles(selections, false); - }); - addAction(copyAction); - - auto *pasteAction = new QAction(this); - pasteAction->setShortcut(QKeySequence::Paste); - connect(pasteAction, &QAction::triggered, [=]() { - auto currentUri = getCurrentUri(); - if (currentUri.startsWith("trash://") || currentUri.startsWith("recent://") - || currentUri.startsWith("computer://") || currentUri.startsWith("favorite://") - || currentUri.startsWith("search://") || currentUri == "filesafe:///") - { - /* Add hint information,link to bug#107640. */ - QMessageBox::warning(this, tr("warn"), tr("This operation is not supported.")); - return; - } - if (Peony::ClipboardUtils::isClipboardHasFiles()) { - //FIXME: how about duplicated copy? - //FIXME: how to deal with a failed move? - auto op = Peony::ClipboardUtils::pasteClipboardFiles(this->getCurrentUri()); - if (op) { - connect(op, &Peony::FileOperation::operationFinished, this, [=](){ - auto opInfo = op->getOperationInfo(); - auto targetUirs = opInfo->dests(); - setCurrentSelectionUris(targetUirs); - }, Qt::BlockingQueuedConnection); - } - else{ - //fix paste file in old path not update issue, link to bug#71627 - this->getCurrentPage()->getView()->repaintView(); - } - } - }); - addAction(pasteAction); - - auto *cutAction = new QAction(this); - cutAction->setShortcut(QKeySequence::Cut); - connect(cutAction, &QAction::triggered, [=]() { - if (!this->getCurrentSelections().isEmpty()) { - // if (this->getCurrentSelections().first().startsWith("trash://", Qt::CaseInsensitive)) { - // return ; - // } - if (this->getCurrentSelections().first().startsWith("recent://", Qt::CaseInsensitive)) { - return ; - } - if (this->getCurrentSelections().first().startsWith("favorite://", Qt::CaseInsensitive)) { - return ; - } - - auto currentUri = getCurrentUri(); - if (currentUri.startsWith("search://")) - return; - - QString desktopPath = "file://" + QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); - QString desktopUri = Peony::FileUtils::getEncodedUri(desktopPath); - QString homeUri = "file://" + QStandardPaths::writableLocation(QStandardPaths::HomeLocation); - if (! this->getCurrentSelections().contains(desktopUri) && ! this->getCurrentSelections().contains(homeUri)) - { - Peony::ClipboardUtils::setClipboardFiles(this->getCurrentSelections(), true); - this->getCurrentPage()->getView()->repaintView(); - } - } - }); - addAction(cutAction); - - m_shortcutsSet = true; - } -} - -void KyNativeFileDialog::initialViewId() -{ - if(!containerView()) - return; - int zoomLevel = containerView()->currentZoomLevel(); - - auto viewId = Peony::DirectoryViewFactoryManager2::getInstance()->getDefaultViewId(zoomLevel, getCurrentUri()); - pDebug << "initialViewId viewId:" << viewId; - beginSwitchView(viewId); -} - -QString KyNativeFileDialog::copyEditText() -{ - return m_copyEditText; -} - -void KyNativeFileDialog::isTableModel() -{ - QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); - if(interFace->isValid()){ - connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(updateTableModel(bool))); - } - QDBusMessage message = QDBusMessage::createMethodCall(SERVICE, PATH, INTERFACE, "get_current_tabletmode"); - QDBusMessage ret = QDBusConnection::sessionBus().call(message); - if (ret.type() != QDBusMessage::ReplyMessage) - { - //从返回参数获取返回值 - pDebug << "complex type failed!"; - updateTableModel(false); - } - else - { - updateTableModel(ret.arguments()[0].value<bool>()); - } -} - -void KyNativeFileDialog::updateTableModel(bool tableModel) -{ - m_istableModel = tableModel; - mKyFileDialogUi->m_maximizeAndRestore->setVisible(!tableModel); -} - -void KyNativeFileDialog::updateSearchProgressBar() -{ - if(m_needSearch){ - pDebug << "updateSearchProgressBar...." << m_searchMode << m_needSearch; - Q_EMIT mKyFileDialogUi->m_pathbar->updateSearchProgress(false); - QCursor c; - c.setShape(Qt::ArrowCursor); - this->setCursor(c); - getCurrentPage()->getView()->setCursor(c); - mKyFileDialogUi->m_sider->setCursor(c); - } -} - -KyFileDialogHelper::KyFileDialogHelper() : QPlatformFileDialogHelper(), mKyFileDialog(new KyNativeFileDialog) -{ - mKyFileDialog->setHelper(this); - - pDebug << "KyFileDialogHelper........." << (options() == nullptr); - connect(mKyFileDialog, &KyNativeFileDialog::currentChanged, this, &KyFileDialogHelper::currentChanged); - connect(mKyFileDialog, &KyNativeFileDialog::directoryEntered, this, &KyFileDialogHelper::directoryEntered); - //QFileDialog::accept()里_q_emitUrlSelected会发送fileSelected信号 这里会导致发两次fileSelected的信号 - // connect(mKyFileDialog, &KyNativeFileDialog::fileSelected, this, &KyFileDialogHelper::fileSelected); - //QFileDialog::accept()里_q_emitUrlsSelected会发送filesSelected信号 这里会导致发两次filesSelected的信号 - // connect(mKyFileDialog, &KyNativeFileDialog::filesSelected, this, &KyFileDialogHelper::filesSelected); - connect(mKyFileDialog, &KyNativeFileDialog::filterSelected, this, &KyFileDialogHelper::filterSelected); - connect(mKyFileDialog, &QDialog::accepted, this, &KyFileDialogHelper::accept); - connect(mKyFileDialog, &QDialog::rejected, this, &KyFileDialogHelper::reject); - -} - -KyFileDialogHelper::~KyFileDialogHelper() -{ - pDebug << "~~~~~~~~KyFileDialogHelper"; - ///不可以析构 普通函数里QFileDialog::show不显示和QFiledialog->show()会显示 析构的话BT下载工具打开不显示界面 -// if(mKyFileDialog){ -// mKyFileDialog->deleteLater(); -// mKyFileDialog = nullptr; -// } - -} - -void KyFileDialogHelper::exec() -{ - mKyFileDialog->discardDelayedShow(); - pDebug << "KyFileDialogHelper::exec.............."; - mKyFileDialog->exec(); -} - -void KyFileDialogHelper::hide() -{ - mKyFileDialog->discardDelayedShow(); - mKyFileDialog->hide(); -} - -bool KyFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) -{ - pDebug << "show........." << (options() == nullptr); - if(parent != nullptr) - pDebug << "window....:" << parent->x() << parent->y() << parent->width() << parent->height(); - else - pDebug << "window is nullptr...."; - initDialog(); - - mKyFileDialog->setAttribute(Qt::WA_NativeWindow, true); - mKyFileDialog->setWindowFlags(windowFlags); - mKyFileDialog->setWindowModality(windowModality); - - if(parent){ - if(QWidget *p = mKyFileDialog->find(parent->winId())){ - for(QFileDialog *fd : p->findChildren<QFileDialog *>()){ - if(options()->windowTitle() == fd->windowTitle()){ - pDebug << "filedoalog set parent...." << fd->geometry(); - if(mKyFileDialog->parentWidget() != fd){ - ///设置parent是QFiledialog 之前设置的是p 会有问题 showevent里有时候会找不到对应name的 - mKyFileDialog->setParent(fd, windowFlags); - } - pDebug << "filediaog directory000...." << fd->directory(); - pDebug << "filedialog select000....." << fd->selectedFiles(); - pDebug << "filedialog selectUrls000....." << fd->selectedUrls(); - pDebug << "filedialog directoryUrl000....." << fd->directoryUrl(); - if(fd->directory().exists()) - mKyFileDialog->setDirectory(fd->directory()); - -// if(fd->directoryUrl().) - - // for(QPushButton *btn : mKyFileDialog->findChildren<QPushButton*>()) - // { - // if(btn->objectName() == "acceptButton") - // { - // pDebug << "mydialog find object acceptButton"; - // } - // } - break; - } - } - } - } - else{ - for(QWidget *widget : qApp->allWidgets()){ - if(QFileDialog *fd = qobject_cast<QFileDialog *>(widget)){ - if(options()->windowTitle() == fd->windowTitle()){ - pDebug << "parent us null filedoalog set parent...." << fd->geometry(); - if(mKyFileDialog->parentWidget() != fd){ - mKyFileDialog->setParent(fd, windowFlags); - } - if(fd->directory().exists()){ - mKyFileDialog->setDirectory(fd->directory()); - } - break; - } - } - } - } - - QString platform = QGuiApplication::platformName(); - if(platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) - { - kdk::UkuiStyleHelper::self()->removeHeader(mKyFileDialog); - } else { - MotifWmHints hints; - hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; - hints.functions = MWM_FUNC_ALL; - hints.decorations = MWM_DECOR_BORDER; - XAtomHelper::getInstance()->setWindowMotifHint(mKyFileDialog->winId(), hints); - } - - mKyFileDialog->delayShow(); - m_isShow = true; - return true; -} - -void KyFileDialogHelper::initDialog() -{ - - pDebug << "initDialog filter...." << options()->filter() << options()->nameFilters() << options()->mimeTypeFilters() << options()->viewMode(); - if (options()->windowTitle().isEmpty()) { - mKyFileDialog->setWindowTitle(options()->acceptMode() == QFileDialogOptions::AcceptOpen ? tr("Open File") - : tr("Save File")); - } else { - mKyFileDialog->setWindowTitle(options()->windowTitle()); - } - QStringList nameFilters; - foreach (QString nameFilter, options()->nameFilters()) { - nameFilters.append(QPlatformFileDialogHelper::cleanFilterList(nameFilter)); - } - pDebug << "nameFilters....:" << nameFilters; - if(nameFilters.length() < 1) - { - pDebug << "contains *...."; - QStringList list = options()->nameFilters(); - list.append(tr("All Files (*)")); - options()->setNameFilters(list); - } - pDebug << "option NameFilters:" << options()->nameFilters(); - pDebug << "option mode:" << options()->acceptMode() << options()->fileMode() << options()->viewMode(); - mKyFileDialog->setFilter(options()->filter()); - mKyFileDialog->setFileMode(QFileDialog::FileMode(options()->fileMode())); - mKyFileDialog->setAcceptMode(QFileDialog::AcceptMode(options()->acceptMode())); - pDebug << "initDialog filters:" << options()->nameFilters(); - mKyFileDialog->setNameFilters(options()->nameFilters()); - pDebug << "view mode:" << options()->viewMode() << mKyFileDialog->viewMode(); - if(options()->viewMode() == QFileDialog::List && mKyFileDialog->viewMode() != KyNativeFileDialog::Icon) - mKyFileDialog->setViewMode(KyNativeFileDialog::Icon); - else if(options()->viewMode() == QFileDialog::Detail && mKyFileDialog->viewMode() != KyNativeFileDialog::List) - mKyFileDialog->setViewMode(KyNativeFileDialog::List); - - for(int i = 0; i < QFileDialogOptions::DialogLabelCount; ++i) { - auto label = static_cast<QFileDialogOptions::DialogLabel>(i); - if(options()->isLabelExplicitlySet(label)) { - mKyFileDialog->setLabelText(static_cast<QFileDialog::DialogLabel>(label), options()->labelText(label)); - } - } -// pDebug << "initiallySelectedMimeTypeFilter,,,,:" << options()->initiallySelectedMimeTypeFilter() << options()->initiallySelectedNameFilter(); - auto filter = options()->initiallySelectedMimeTypeFilter(); - pDebug << "filter.........." << filter; - if(!filter.isEmpty()) { - selectMimeTypeFilter(filter); - } - else { - filter = options()->initiallySelectedNameFilter(); - if(!filter.isEmpty()) { - pDebug << "initiallySelectedNameFilter...." << filter; - selectNameFilter(filter); - } - } - - connect(mKyFileDialog->containerView(), &Peony::DirectoryViewWidget::viewDirectoryChanged, - this, &KyFileDialogHelper::viewInitialFinished, Qt::UniqueConnection); -} - -void KyFileDialogHelper::viewInitialFinished() -{ - if(m_viewInitialFinished) - return; - pDebug << "viewInitialFinished...."; - QTimer::singleShot(100, this, [this](){ - pDebug << "viewport update1111111......."; - mKyFileDialog->mKyFileDialogUi->m_sider->viewport()->update(); - }); - - QTimer::singleShot(500, this, [this](){ - - auto selectirectory = options()->initialDirectory(); - auto selectedFiles = options()->initiallySelectedFiles(); - QStringList strList; - - pDebug << "m_viewInitialFinished:" << m_viewInitialFinished; - pDebug << "viewInitialFinished selectirectory:" << selectirectory; - pDebug << "viewInitialFinished selectedFiles:" << selectedFiles; - - if(selectedFiles.length() > 0 && !m_viewInitialFinished) - { - pDebug << "initiallySelectedFiles:" << selectedFiles; - - for(const auto& selectedFile: selectedFiles) { - auto info = Peony::FileInfo::fromUri(selectedFile.path()); -// if (!info->isDir() && !info->isVolume()) -// { - selectFile(selectedFile); - strList.append(selectedFile.toString()); -// } - } - pDebug << "strList.......:" << strList; - pDebug << "getCurrentUri,,.......:" << mKyFileDialog->getCurrentUri(); - - if(strList.length() > 0){ - QString path; - QUrl url(strList[0]); - if(mKyFileDialog->isDir(url.path())) - path = url.path(); - else{ - QDir dir(url.path()); - dir.cdUp(); - path = dir.path(); - } - pDebug << "initial path:" << path << url; - if(mKyFileDialog->getCurrentUri() != ("file://" + path)) - { - pDebug << "initial change directory..." << ("file://" + path); - mKyFileDialog->setDirectoryUrl(QUrl("file://" + path)); - } - - pDebug << "setSelections...." << strList << (mKyFileDialog->containerView() == nullptr); - - mKyFileDialog->setCurrentSelections(strList); - pDebug << "initial getselections:" << mKyFileDialog->getCurrentSelectionsList(); - //mKyFileDialog->containerView()->scrollToSelection(strList[0]); - QString selectName = mKyFileDialog->selectName(); - if(selectName == "" && strList.length() > 0) - { - QString str0 = strList[0]; - selectName = str0.split("/").last(); - } - pDebug << "initial selectName:" << selectName; - mKyFileDialog->mKyFileDialogUi->m_fileNameEdit->setText(selectName); - } - } - - pDebug << "initially selectirectory:" << selectirectory.toString() << selectirectory.path() << QFile::exists(selectirectory.path()) << Peony::FileUtils::isFileExsit(selectirectory.toString()); - pDebug << "current path....." << mKyFileDialog->getCurrentUri(); - if(strList.length() <= 0 && Peony::FileUtils::isFileExsit(selectirectory.toString()))//QFile::exists(selectirectory.path())) - { - QString cStr = mKyFileDialog->getCurrentUri(); - QString sStr = selectirectory.toString(); - - if(cStr.endsWith("/")) - cStr = cStr.remove(cStr.length() - 1, 1); - if(sStr.endsWith("/")) - sStr = sStr.remove(sStr.length() - 1, 1); - pDebug << "cStr...." << cStr << "sStr...." << sStr; - if(cStr != sStr) - mKyFileDialog->setDirectoryUrl(selectirectory); - } - - mKyFileDialog->intiContainerSort(); - mKyFileDialog->initialViewId(); - pDebug << "viewport update222222......."; - mKyFileDialog->mKyFileDialogUi->m_sider->viewport()->update(); -// mKyFileDialog->refresh(); - m_viewInitialFinished = true; - }); -} - -bool KyFileDialogHelper::isViewInitialFinished() -{ - return m_viewInitialFinished; -} - -bool KyFileDialogHelper::isShow() -{ - return m_isShow; -} - -bool KyFileDialogHelper::defaultNameFilterDisables() const -{ - return false; -} - -void KyFileDialogHelper::setDirectory(const QUrl &directory) -{ - QString path = directory.path(); - if(path.startsWith("/")) - path = "file://" + path; - pDebug << "helper setDirectory...." << directory.toString() << directory.path() << path; - mKyFileDialog->setDirectory(path); -// pDebug << "setInitialDirectory....."; -// options()->setInitialDirectory(directory); -} - -QUrl KyFileDialogHelper::directory() const -{ - return QUrl(mKyFileDialog->directory().absolutePath()); -} - -void KyFileDialogHelper::selectFile(const QUrl &filename) -{ - pDebug << "KyFileDialogHelper selectFile.............:" << filename; - m_selectedFiles = filename; - mKyFileDialog->selectFile(filename.toString()); -} - -QList<QUrl> KyFileDialogHelper::selectedFiles() const -{ - pDebug << "selectedFiles0000..........:" << mKyFileDialog->directoryUrl() << mKyFileDialog->directory() << mKyFileDialog->getCurrentUri() << mKyFileDialog->acceptMode(); - if(options()->acceptMode() == QFileDialogOptions::AcceptOpen) - { - QList<QUrl> urlList = mKyFileDialog->selectedUrls(); - if((options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly) && - mKyFileDialog->copyEditText() == "" && m_viewInitialFinished) - { - if (!mKyFileDialog->getCurrentPage()) { - return QList<QUrl>(); - } - QList<QUrl> urls; - QString uri = mKyFileDialog->getCurrentPage()->getCurrentUri(); - pDebug << "KyFileDialogHelper selectedFiles current uri........:" << uri; - - if (uri.startsWith("trash://") || uri.startsWith("recent://") - || uri.startsWith("computer://") || uri.startsWith("favorite://") - || uri.startsWith("filesafe://")) - { - urls << Peony::FileUtils::getTargetUri(uri); - } - else - { - if(uri.startsWith("file:///")) - uri = uri.remove(0,7); - pDebug << "open selectedFiles00000..........:" << uri; - urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(uri)); - } - - return urls; - } - if(options()->fileMode() != QFileDialogOptions::AnyFile || urlList.length() > 0) - return urlList; - else if(urlList.length() == 0) - { - QString path = mKyFileDialog->getCurrentUri(); - if(!path.endsWith("/")) - path += "/"; - pDebug << "selected filesss...:" << path + mKyFileDialog->copyEditText(); - urlList.append(QUrl(path + mKyFileDialog->copyEditText())); - return urlList; - } - } - else - { - QList<QUrl> urls; - QString path = mKyFileDialog->getCurrentUri(); - if(!path.endsWith("/")) - path += "/"; - path += mKyFileDialog->copyEditText(); - if(path.startsWith("file:///")) - path = path.remove(0,7); - pDebug << "save selectedFiles00000..........:" << path; - urls << QUrl::fromLocalFile(Peony::FileUtils::urlDecode(path)); - pDebug << "save selectedFiles2222..........:" << urls; - return urls; - } -} - -void KyFileDialogHelper::setFilter() -{ -} - -void KyFileDialogHelper::selectNameFilter(const QString &filter) -{ - pDebug << "helper selectNameFilter......" << filter; - mKyFileDialog->selectNameFilter(filter); -} - -void KyFileDialogHelper::selectMimeTypeFilter(const QString &filter) -{ - pDebug << "selectMimeTypeFilter0000001111....." << filter; - QMimeDatabase db; - QMimeType mimetype = db.mimeTypeForName(filter); - if(!mimetype.isValid()) - return; - mKyFileDialog->selectNameFilter(mimetype.filterString()); -} - -QString KyFileDialogHelper::selectedNameFilter() const -{ - return mKyFileDialog->selectedNameFilter(); -} - -QString KyFileDialogHelper::selectedMimeTypeFilter() const -{ - pDebug << "selectMimeTypeFilter0000002222222......"; - return QString(); -} - -bool KyFileDialogHelper::isSupportedUrl(const QUrl &url) const -{ - pDebug << "isSupportedUrl..." << url << url.isLocalFile(); -// return false; - return url.isLocalFile(); - -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/kyfiledialog.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,279 +0,0 @@ -#include "debug.h" -#ifndef KYNATIVEFILEDIALOG_H -#define KYNATIVEFILEDIALOG_H -#include <QDialog> -#include <QDir> -#include <QFileDialog> -#include <QFileSystemModel> -#include <QCompleter> -#include <QListView> -#include <QStringListModel> -#include "qpa/qplatformdialoghelper.h" -#include <peony-qt/FMWindowIface.h> - -QT_BEGIN_NAMESPACE -namespace Ui { class KyNativeFileDialog; } -QT_END_NAMESPACE - -namespace Peony { -class DirectoryViewContainer; -class DirectoryViewWidget; -class FMWindowIface; -} - -namespace UKUIFileDialog { - -class Ui_KyFileDialog; -class FileDialogSideBar; -class FileDialogPathBar; -class KyNativeFileDialogPrivate; -class KyFileDialogHelper; - -class KyNativeFileDialog : public QDialog, public Peony::FMWindowIface -{ - Q_OBJECT - friend class KyFileDialogHelper; - -public: - enum ViewMode { List, Icon }; - KyNativeFileDialog(QWidget *parent = nullptr); - ~KyNativeFileDialog(); - - Peony::FMWindowIface *create(const QString &uri); - Peony::FMWindowIface *create(const QStringList &uris); - - - const QString getCurrentUri(); - const QStringList getCurrentSelections(); - const QStringList getCurrentAllFileUris(); - const QStringList getCurrentSelectionsList(); - const QList<std::shared_ptr<Peony::FileInfo>> getCurrentSelectionFileInfos(); - - void setCurrentSelections(QStringList selections); - - Qt::SortOrder getCurrentSortOrder(); - int getCurrentSortColumn(); - - bool getWindowShowHidden(); - bool getWindowUseDefaultNameSortOrder(); - bool getWindowSortFolderFirst(); - - void refresh(); - void forceStopLoading(); - - void setShowHidden(bool showHidden); - void setUseDefaultNameSortOrder(bool use); - void setSortFolderFirst(bool set); - - void setCurrentSelectionUris(const QStringList &uris); - void setCurrentSortOrder (Qt::SortOrder order); - void setCurrentSortColumn (int sortColumn); - - void editUri(const QString &uri); - void editUris(const QStringList &uris); - - bool getFilterWorking(); - - void beginSwitchView(const QString &viewId); - - - void setDirectory(const QString &directory); - void setDirectory(const QDir &directory); - QDir directory() const; - - void selectFile(const QString &filename); - QStringList selectedFiles() const; - - void setDirectoryUrl(const QUrl &directory); - QUrl directoryUrl() const; - - void selectUrl(const QUrl &url); - QList<QUrl> selectedUrls() const; - - void setNameFilterDetailsVisible(bool enabled); - bool isNameFilterDetailsVisible() const; - - void setNameFilter(const QString &filter); - void setNameFilters(const QStringList &filters); - QStringList nameFilters() const; - void selectNameFilter(const QString &filter); - QString selectedMimeTypeFilter() const; - QString selectedNameFilter() const; - void selectNameFilterByIndex(int index); - void selectNameFilterCurrentIndex(int index); - int selectNameFilterIndex() const; - - QDir::Filters filter(); - void setFilter(QDir::Filters filters); - - void setViewMode(ViewMode mode); - ViewMode viewMode() const; - - void setFileMode(QFileDialog::FileMode mode); - QFileDialog::FileMode fileMode(); - - void setAcceptMode(QFileDialog::AcceptMode mode); - QFileDialog::AcceptMode acceptMode() const; - - void setLabelText(QFileDialog::DialogLabel label, const QString &text); - QString labelText(QFileDialog::DialogLabel label) const; - - void setOptions(QFileDialog::Options options); - void setOption(QFileDialog::Option option, bool on = true); - bool testOption(QFileDialog::Option option) const; - QFileDialog::Options options() const; - void setCurrentInputName(const QString &name); - Peony::DirectoryViewContainer *getCurrentPage(); - Peony::DirectoryViewContainer *getCurrentPage() const; - - Peony::DirectoryViewWidget *containerView() const; - - void setComBoxItems(const QStringList &filters); - - bool isDir(QString path); - - void updateMaximizeState(); - - void intiContainerSort(); - - void refreshContainerSort(); - - void refreshCompleter(); - - bool doSave(QStringList sFiles); - - bool doOpen(QStringList sFiles); - - bool saveMessageBox(QString name); - - void setHelper(KyFileDialogHelper* helepr); - - void setShortCuts(); - - void initialViewId(); - - void delayShow(); - - void discardDelayedShow(); - - QString copyEditText(); - -Q_SIGNALS: - void switchViewRequest(const QString &viewId); - - void fileSelected(const QUrl &file); - void filesSelected(const QList<QUrl> &files); - void currentChanged(const QUrl &path); - void directoryEntered(const QUrl &directory); - void selectedNameFilterChanged(); - void filterSelected(const QString &filter); - void locationChangeEnd(); - -public Q_SLOTS: - void goToUri(const QString &uri, bool addToHistory = true, bool forceUpdate = false); - void goBack(); - void goForward(); - void goToParent(); - void onSwitchView(); - void updateWindowState(); - QString selectName(); - void updateStatusBar(); - void onNewFolder(); - void setSortType(); - void searchButtonClicked(); - void setSearchMode(bool mode); - void lineEditTextChange(QString text); - void containerMenuRequest(const QPoint &pos); - void updateTableModel(bool tableMode); - void updateSearchProgressBar(); - -protected: - void resizeEvent(QResizeEvent *e); - void paintEvent(QPaintEvent *e); - void keyPressEvent(QKeyEvent *e); - -private: - Ui_KyFileDialog *mKyFileDialogUi = nullptr; - KyNativeFileDialog *mKyFileDialog = nullptr; - QScopedPointer<KyNativeFileDialogPrivate> d_ptr; - Q_DECLARE_PRIVATE_D(qGetPtrHelper(d_ptr), KyNativeFileDialog) - void onAcceptButtonClicked(); - void onRejectButtonClicked(); - void onCurrentInputNameChanged(); - void handleEnterPressed(); - void updateAcceptButtonState(); - bool checkSaveFileExsits(QString path); - void isTableModel(); - -private: - bool m_searchMode = false; -// QFileSystemModel *m_fileSystemModel = nullptr; - QCompleter * m_completer = nullptr; - QListView *m_listView = nullptr; - QStringList m_CurrentPathAllFiles; - KyFileDialogHelper *m_fileDialogHelper = nullptr; - bool isInitialGoToUriNum = true; - bool m_shortcutsSet = false; - QString m_lastSearchPath; - bool m_isClearSearchKey = false; - QStringListModel *m_model = nullptr; - QString m_copyEditText; - bool m_istableModel = false; - QMap<int, QString> m_nameFilterMap; - QStringList m_uris_to_edit; - bool m_needSearch = false; -}; - -class KyFileDialogHelper : public QPlatformFileDialogHelper -{ - Q_OBJECT -public: - explicit KyFileDialogHelper(); - - ~KyFileDialogHelper() override; - - - virtual void exec() override; - virtual bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) override; - virtual void hide() override; - - virtual bool defaultNameFilterDisables() const override; - virtual void setDirectory(const QUrl &directory) override; - virtual QUrl directory() const override; - virtual void selectFile(const QUrl &filename) override; - virtual QList<QUrl> selectedFiles() const override; - virtual void setFilter() override; - virtual void selectNameFilter(const QString &filter) override; - - virtual void selectMimeTypeFilter(const QString &filter) override; - virtual QString selectedNameFilter() const override; - virtual QString selectedMimeTypeFilter() const override; - - virtual bool isSupportedUrl(const QUrl &url) const override; - - bool isViewInitialFinished(); - - bool isShow(); - -public Q_SLOTS: - void viewInitialFinished(); -Q_SIGNALS: - void fileSelected(const QUrl &file); - void filesSelected(const QList<QUrl> &files); - void currentChanged(const QUrl &path); - void directoryEntered(const QUrl &directory); - void filterSelected(const QString &filter); - - -private: - KyNativeFileDialog* mKyFileDialog = nullptr; - QUrl m_selectedFiles; - bool m_viewInitialFinished = false; - bool m_isShow = false; - -private: - void initDialog(); -}; -} - -#endif // KYNATIVEFILEDIALOG_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,58 +0,0 @@ -#include "debug.h" - -#include "kyfiledialogprivate.h" -#include <QFileDialog> -#include <QTimer> -#include <QLineEdit> -#include "kyfiledialog.h" -#include "ui_kyfiledialog.h" -using namespace UKUIFileDialog; -KyNativeFileDialogPrivate::KyNativeFileDialogPrivate() -{ -// Q_Q(KyNativeFileDialog); - - m_timer = new QTimer; -// m_container = q->m_container; -} - -QStringList KyNativeFileDialogPrivate::typedFiles() -{ - /* - Q_Q(KyNativeFileDialog); - QStringList files; - QString editText = q->mKyFileDialogUi->m_fileNameEdit->text(); - if (!editText.contains(QLatin1Char('"'))) { -#ifdef Q_OS_UNIX - const QString prefix = q->directory().absolutePath() + QDir::separator(); - if (QFile::exists(prefix + editText)) - files << editText; - else - files << qt_tildeExpansion(editText); -#else - files << editText; - Q_UNUSED(q) -#endif - } else { - // " is used to separate files like so: "file1" "file2" "file3" ... - // ### need escape character for filenames with quotes (") - QStringList tokens = editText.split(QLatin1Char('\"')); - for (int i=0; i<tokens.size(); ++i) { - if ((i % 2) == 0) - continue; // Every even token is a separator -#ifdef Q_OS_UNIX - const QString token = tokens.at(i); - const QString prefix = q->directory().absolutePath() + QDir::separator(); - if (QFile::exists(prefix + token)) - files << token; - else - files << qt_tildeExpansion(token); -#else - files << toInternal(tokens.at(i)); -#endif - } - } - return addDefaultSuffixToFiles(files); - - */ - return QStringList(); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/kyfiledialogprivate.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,82 +0,0 @@ -#include "debug.h" -#ifndef KYNATIVEFILEDIALOGPRIVATE_H -#define KYNATIVEFILEDIALOGPRIVATE_H - -#include <QFileDialog> -#include <QTimer> - -namespace Peony { -class DirectoryViewContainer; -} -namespace UKUIFileDialog { - -class KyFileDialogHelper; -class KyNativeFileDialogPrivate -{ - friend class KyNativeFileDialog; -private: - KyNativeFileDialogPrivate(); - - QStringList typedFiles(); - - QStringList nameFilters; - QFileDialog::AcceptMode acceptMode; - QFileDialog::FileMode fileMode; - QFileDialog::Options options; - Peony::DirectoryViewContainer *m_container = nullptr; - QString currentInputName; - QTimer *m_timer = nullptr; - QDir::Filters filters = QDir::AllEntries; -}; -} - -#endif // KYNATIVEFILEDIALOGPRIVATE_H -/* -KyNativeFileDialogPrivate::KyNativeFileDialogPrivate() -{ -// Q_Q(KyNativeFileDialog); - - m_timer = new QTimer; -// m_container = q->m_container; -} - -QStringList KyNativeFileDialogPrivate::typedFiles() const -{ - Q_Q(KyNativeFileDialog); - QStringList files; - QString editText = q->mk ->text(); - if (!editText.contains(QLatin1Char('"'))) { -#ifdef Q_OS_UNIX - const QString prefix = q->directory().absolutePath() + QDir::separator(); - if (QFile::exists(prefix + editText)) - files << editText; - else - files << qt_tildeExpansion(editText); -#else - files << editText; - Q_UNUSED(q) -#endif - } else { - // " is used to separate files like so: "file1" "file2" "file3" ... - // ### need escape character for filenames with quotes (") - QStringList tokens = editText.split(QLatin1Char('\"')); - for (int i=0; i<tokens.size(); ++i) { - if ((i % 2) == 0) - continue; // Every even token is a separator -#ifdef Q_OS_UNIX - const QString token = tokens.at(i); - const QString prefix = q->directory().absolutePath() + QDir::separator(); - if (QFile::exists(prefix + token)) - files << token; - else - files << qt_tildeExpansion(token); -#else - files << toInternal(tokens.at(i)); -#endif - } - } - return addDefaultSuffixToFiles(files); - - return QStringList(); -} -*/ diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,77 +0,0 @@ -#include "debug.h" -#include "menutoolbutoon.h" -#include <QApplication> -#include <QDBusInterface> -using namespace UKUIFileDialog; - -static ToolButtonStyle *global_instance = nullptr; - -MenuToolButton::MenuToolButton(QWidget *parent) : QToolButton(parent) -{ - setStyle(ToolButtonStyle::getStyle()); - - QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); - if(interFace->isValid()){ - connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(tableModeChanged(bool))); - } -} - -void MenuToolButton::tableModeChanged(bool isTableMode) -{ - qDebug() << "tableModeChanged......" << isTableMode; - setStyle(ToolButtonStyle::getStyle()); -} - -ToolButtonStyle *ToolButtonStyle::getStyle() -{ - if (!global_instance) { - global_instance = new ToolButtonStyle; - } - return global_instance; -} - -int ToolButtonStyle::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, const QWidget *widget) const -{ - if (qobject_cast<const QToolButton *>(widget)) - return 0; - - switch (metric) { - case PM_ToolBarIconSize: - return 16; - case PM_ToolBarSeparatorExtent: - return 1; - case PM_ToolBarItemSpacing: { - return 1; - } - default: - return QProxyStyle::pixelMetric(metric, option, widget); - } -} - -void ToolButtonStyle::drawComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const -{ - //This is a "lie". We want to use instant popup menu for tool button, and we aslo - //want use popup menu style with this tool button, so we change the related flags - //to draw in our expected. - if (control == CC_ToolButton) { - QStyleOptionToolButton button = *qstyleoption_cast<const QStyleOptionToolButton *>(option); - if (button.features.testFlag(QStyleOptionToolButton::HasMenu)) { - button.features = QStyleOptionToolButton::None; - if (!widget->property("isOptionButton").toBool()) { - button.features |= QStyleOptionToolButton::HasMenu; - button.features |= QStyleOptionToolButton::MenuButtonPopup; - button.subControls |= QStyle::SC_ToolButtonMenu; - } - return qApp->style()->drawComplexControl(control, &button, painter, widget); - } - } - return qApp->style()->drawComplexControl(control, option, painter, widget); -} - -void ToolButtonStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const -{ - if (element == PE_IndicatorToolBarSeparator) { - return; - } - return qApp->style()->drawPrimitive(element, option, painter, widget); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/menutoolbutoon.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,40 +0,0 @@ -#include "debug.h" - -#ifndef MENUTOOLBUTTON_H -#define MENUTOOLBUTTON_H -#include <QToolButton> -#include <QProxyStyle> -#include <QStyleOption> -#include <QPainter> -namespace UKUIFileDialog { -class MenuToolButton : public QToolButton -{ - Q_OBJECT -public: - explicit MenuToolButton(QWidget *parent = nullptr); - ~MenuToolButton(){} - -Q_SIGNALS: - - -public Q_SLOTS: - void tableModeChanged(bool isTableMode); - -}; - -class ToolButtonStyle : public QProxyStyle -{ - friend class MenuToolButton; - friend class HeaderBarContainer; - static ToolButtonStyle *getStyle(); - - ToolButtonStyle() {} - ~ToolButtonStyle() {} - - int pixelMetric(PixelMetric metric, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override; - - void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget = nullptr) const override; - void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = nullptr) const override; -}; -} -#endif // MENUTOOLBUTTON_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/pathbar.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/pathbar.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/pathbar.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/pathbar.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,82 +0,0 @@ -#include "debug.h" - -#include "pathbar.h" -#include <PeonyPathCompleter> -#include <PeonyPathBarModel> -#include <QDebug> -#include <QObject> -#include <QDBusInterface> -#include <QDBusMessage> -#include <peony-qt/file-utils.h> -#include "debug.h" -#include "ukui-style-settings.h" -using namespace UKUIFileDialog; - -FileDialogPathBar::FileDialogPathBar(QWidget *parent) : QWidget(parent)//Peony::AdvancedLocationBar(parent)//QLineEdit(parent)// -{ - setAttribute(Qt::WA_TranslucentBackground); - setContentsMargins(0,0,0,0); - m_pathBar = new Peony::AdvancedLocationBar(this); - - QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); - if(interFace->isValid()){ - connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(updateTableModel(bool))); - } - - - QDBusMessage message = QDBusMessage::createMethodCall("com.kylin.statusmanager.interface", - "/", - "com.kylin.statusmanager.interface", - "get_current_tabletmode"); - QDBusMessage ret = QDBusConnection::sessionBus().call(message); - if (ret.type() != QDBusMessage::ReplyMessage) - { - //从返回参数获取返回值 - pDebug << "complex type failed!"; - updateTableModel(false); - } - else - { - updateTableModel(ret.arguments()[0].value<bool>()); - } -} - -FileDialogPathBar::~FileDialogPathBar() -{ - m_pathBar->deleteLater(); - m_pathBar = nullptr; -} - -void FileDialogPathBar::updatePath(const QString &uri) -{ - pDebug << "m_pathBar........ updatePath:" << uri << Peony::FileUtils::getEncodedUri(uri); - m_pathBar->updateLocation(Peony::FileUtils::urlEncode(uri)); -// setText(uri); -// clearFocus(); -} - -void FileDialogPathBar::resizeEvent(QResizeEvent *e) -{ - m_pathBar->setFixedWidth(this->width()); - m_pathBar->setGeometry(0, (this->height() - m_pathBar->height()) / 2, this->width(), m_pathBar->height()); -} - -Peony::AdvancedLocationBar *FileDialogPathBar::getPathBar() -{ - return m_pathBar; -} - -void FileDialogPathBar::updateTableModel(bool isTable) -{ - pDebug << "updateTableModel...." << isTable; -// m_pathBar->updateTabletModeValue(isTable); - if(isTable){ - m_pathBar->setFixedHeight(48); - this->setFixedHeight(48); - } - else{ - m_pathBar->setFixedHeight(36); - this->setFixedHeight(36); - } - pDebug << "m_pathBar height1111:" << m_pathBar->height() << this->height(); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/pathbar.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/pathbar.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/pathbar.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/pathbar.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,32 +0,0 @@ -#include "debug.h" - -#ifndef PATHBAR_H -#define PATHBAR_H -#include <QLineEdit> -#include <QResizeEvent> -#include <peony-qt/controls/navigation-bar/advanced-location-bar.h> - -namespace UKUIFileDialog { -class FileDialogPathBar : public QWidget//public QLineEdit// -{ - Q_OBJECT -public: - explicit FileDialogPathBar(QWidget *parent = nullptr); - ~FileDialogPathBar(); - void resizeEvent(QResizeEvent *e); - Peony::AdvancedLocationBar *getPathBar(); - -Q_SIGNALS: - void goToUriRequest(const QString &uri, bool addToHistory = true); - void updateWindowLocationRequest(const QString &uri, bool addHistory, bool forceUpdate = false); - void refreshRequest(); - void searchRequest(const QString &path, const QString &key); - -public Q_SLOTS: - void updateTableModel(bool isTable); - void updatePath(const QString &uri); -private: - Peony::AdvancedLocationBar *m_pathBar = nullptr; -}; -} -#endif // PATHBAR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/sidebar.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,473 +0,0 @@ -#include "debug.h" -#include "sidebar.h" -#include <QTimer> -#include <PeonySideBarModel> -#include <QScrollBar> -#include <QHeaderView> -#include <QPainterPath> -#include <QPainter> -#include <QDebug> -#include <QApplication> -#include <QTreeWidget> -#include <QMessageBox> -#include <QToolTip> -#include <QScreen> -#include <QDBusInterface> -#include "kyfiledialog.h" -#include "peony-qt/controls/menu/side-bar-menu/side-bar-menu.h" -#include "peony-qt/side-bar-abstract-item.h" -#include "peony-qt/volume-manager.h" -#include "peony-qt/file-enumerator.h" -#include "peony-qt/file-utils.h" -#include "peony-qt/file-info.h" -#include "ukui-style-settings.h" -#include "debug.h" -using namespace UKUIFileDialog; - -FileDialogComboBox::FileDialogComboBox(QWidget *parent):QComboBox(parent) -{ - if (QGSettings::isSchemaInstalled("org.ukui.style")) { - auto settings = UKUIStyleSettings::globalInstance(); - connect(settings, &QGSettings::changed, this, [=](const QString &key){ - pDebug << "key changed:" << key << this->size(); - m_styleChanged = true; - }); - } - - connect(this, &FileDialogComboBox::setStyleChanged, this, [=](bool change){ - pDebug << "setStyleChanged m_styleChanged:" << change; - m_styleChanged = change; - }); - QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); - if(interFace->isValid()){ - connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(tableModeChanged(bool))); - } - m_minSize = this->minimumSize(); - pDebug << "combobox minsize...." << m_minSize; -} - -void FileDialogComboBox::tableModeChanged(bool isTableMode) -{ - m_styleChanged = true; -} - -QSize FileDialogComboBox::minimumSizeHint() const -{ - pDebug << "minimumSizeHint...." << m_styleChanged << this->size() << m_minSize; - if(m_styleChanged || (qApp->screenAt(QCursor::pos())->availableSize().width() - 300) < QComboBox::minimumSizeHint().width()) - { - Q_EMIT setStyleChanged(false); - return m_minSize;//this->size(); - } - QSize size = QComboBox::minimumSizeHint(); - - - return size; -} - - -FileDialogSideBar::FileDialogSideBar(QWidget *parent) : QTreeView(parent) -{ -// setStyle(SideBarStyle::getStyle()); - - setIconSize(QSize(16, 16)); - -// header()->setSectionResizeMode(QHeaderView::Stretch ); - header()->setStretchLastSection(false); - header()->hide(); - - this->verticalScrollBar()->setProperty("drawScrollBarGroove", false); - setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - this->setFrameStyle(QFrame::NoFrame); - setSortingEnabled(true); - - setProperty("useIconHighlightEffect", true); - setDragDropMode(QTreeView::NoDragDrop); - setProperty("doNotBlur", true); - viewport()->setProperty("doNotBlur", true); - setContextMenuPolicy(Qt::CustomContextMenu); - - setExpandsOnDoubleClick(false); - setMouseTracking(true);//追踪鼠标 - setAutoScrollMargin(0); - - - auto delegate = new SideBarItemDelegate(this); - setItemDelegate(delegate); - - m_model = new Peony::SideBarModel(this); - m_proxyModel = new Peony::SideBarProxyFilterSortModel(this); - m_proxyModel->setSourceModel(m_model); - setModel(m_proxyModel); - - Peony::VolumeManager *volumeManager = Peony::VolumeManager::getInstance(); - connect(volumeManager,&Peony::VolumeManager::volumeAdded,this,[=](const std::shared_ptr<Peony::Volume> &volume){ - m_proxyModel->invalidate();//display DVD device in real time. - }); - connect(volumeManager,&Peony::VolumeManager::volumeRemoved,this,[=](const std::shared_ptr<Peony::Volume> &volume){ - m_proxyModel->invalidate();//The drive does not display when the DVD device is removed. - //pDebug << "volumeRemoved:" <<QToolTip::text(); - //fix abnormal pull out usb device tips not hide issue, link to bug#81190 - if (QToolTip::isVisible()) { - QToolTip::hideText(); - } - }); - connect(volumeManager,&Peony::VolumeManager::driveDisconnected,this,[=](const std::shared_ptr<Peony::Drive> &drive){ - m_proxyModel->invalidate();//Multiple udisk eject display problem - }); - connect(volumeManager,&Peony::VolumeManager::mountAdded,this,[=](const std::shared_ptr<Peony::Mount> &mount){ - m_proxyModel->invalidate();//display udisk in real time after format it. - }); - - - connect(this, &FileDialogSideBar::clicked, this, [=](const QModelIndex &index){ - switch (index.column()) { - case 0: { - auto item = m_proxyModel->itemFromIndex(index); - - if (! item) - break; - //continue to fix crash issue, related to bug#116201,116589 - if(item->isMountable()&&!item->isMounted()) - item->mount(); - else{ - auto uri = item->uri(); - - if (!item->uri().isEmpty()){ - if (uri == "computer:///ukui-data-volume") { - uri = "file:///data"; - } - Q_EMIT goToUriRequest(uri); - } - } - break; - } - case 1: { - auto item = m_proxyModel->itemFromIndex(index); - if (item->isMounted() || item->isEjectable()||item->isStopable()) { - auto leftIndex = m_proxyModel->index(index.row(), 0, index.parent()); - this->collapse(leftIndex); - item->ejectOrUnmount(); - } else { - // if item is not unmountable, just be same with first column. - // fix #39716 - auto uri = item->uri(); - - if (!item->uri().isNull()){ - if (uri == "computer:///ukui-data-volume") { - uri = "file:///data"; - } - Q_EMIT goToUriRequest(uri); - } - } - break; - } - default: - break; - } - }); - - connect(this, &FileDialogSideBar::expanded, this, [=](const QModelIndex &index){ - auto item = m_proxyModel->itemFromIndex(index); - item->findChildrenAsync(); - }); - - connect(this, &FileDialogSideBar::collapsed, this, [=](const QModelIndex &index){ - auto item = m_proxyModel->itemFromIndex(index); - item->clearChildren(); - }); - - connect(this, &QTreeView::customContextMenuRequested, this, [=](const QPoint &pos){ - auto index = indexAt(pos); - auto item = m_proxyModel->itemFromIndex(index); - if (item) { - if (item->type() != Peony::SideBarAbstractItem::SeparatorItem) { - Peony::SideBarMenu menu(item, nullptr); - QList<QAction *> actionList; - if (item->type() == Peony::SideBarAbstractItem::FileSystemItem) { - if ((0 != QString::compare(item->uri(), "computer:///")) && - (0 != QString::compare(item->uri(), "filesafe:///"))) { - for (const auto &actionItem : actionList) { - if(item->isVolume())/* 分区才去需要判断是否已挂载 */ - actionItem->setEnabled(item->isMounted()); - } - } - } - - menu.exec(QCursor::pos()); - } - } - }); - - QDBusInterface *interFace = new QDBusInterface(SERVICE, PATH, INTERFACE, QDBusConnection::sessionBus()); - if(interFace->isValid()){ - connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(tableModeChanged(bool))); - } - -// if (QGSettings::isSchemaInstalled("org.ukui.style")) { -// auto settings = UKUIStyleSettings::globalInstance(); -// connect(settings, &QGSettings::changed, this, [=](const QString &key){ -// pDebug << "key changed:" << key << width(); -// if (key == "styleName") { -// m_siderWidth = this->width(); -// } -// }); -// } - expandToDepth(1); - setViewportMargins(4, 4, 0, 0); - - pDebug << "columndffffffffffffffff"; -// setColumnHidden(1, true); -} - -FileDialogSideBar::~FileDialogSideBar() -{ - m_proxyModel->deleteLater(); - m_proxyModel = nullptr; - m_model->deleteLater(); - m_model = nullptr; -} - -void FileDialogSideBar::tableModeChanged(bool isTableMode) -{ - pDebug << "tableModeChanged........"; -// setStyle(SideBarStyle::getStyle()); -} - -void FileDialogSideBar::resizeEvent(QResizeEvent *e) -{ - setViewportMargins(4, 4, 0, 0); - -// this->setGeometry(this->x(), this->y(), m_siderWidth, this->height()); - QTreeView::resizeEvent(e); - pDebug << "FileDialogSideBar resizeEvent header count......:" << header()->count() << this->viewport()->width() << this->columnWidth(0) << this->columnWidth(1); - if (header()->count() > 0) { - this->setColumnWidth(1, 20); - header()->resizeSection(0, this->viewport()->width() - this->columnWidth(1)); - } -} - -void FileDialogSideBar::menuRequest(const QPoint &pos) -{ -// auto index = indexAt(pos); -// auto item = proxyModel->itemFromIndex(index); -// if (item) { -// pDebug << "sider bar menu00000" << item->type() << index; -// if (item->type() != Peony::SideBarAbstractItem::SeparatorItem) { -// pDebug << "sider bar menu11111"; -//// Peony::SideBarMenu *menu = new Peony::SideBarMenu(item, this); -// pDebug << "sider bar menu22222222"; -//// menu->exec(QCursor::pos()); -// pDebug << "sider bar menu3333333"; -// } -// } -} - -void FileDialogSideBar::paintEvent(QPaintEvent *event) -{ -// pDebug << "sidebar paintEvent.......:" << this->size(); - QTreeView::paintEvent(event); -} - -//void FileDialogSideBar::paintEvent(QPaintEvent *e) -//{ -// QColor color = this->palette().window().color(); -// QColor colorBase = QColor(Qt::red); //this->palette().base().color(); - -// int R1 = color.red(); -// int G1 = color.green(); -// int B1 = color.blue(); -// qreal a1 = 0.3; - -// int R2 = colorBase.red(); -// int G2 = colorBase.green(); -// int B2 = colorBase.blue(); -// qreal a2 = 1; - -// qreal a = 1 - (1 - a1)*(1 - a2); - -// qreal R = (a1*R1 + (1 - a1)*a2*R2) / a; -// qreal G = (a1*G1 + (1 - a1)*a2*G2) / a; -// qreal B = (a1*B1 + (1 - a1)*a2*B2) / a; - -// colorBase.setRed(R); -// colorBase.setGreen(G); -// colorBase.setBlue(B); -// colorBase.setAlphaF(1); - -//// QPainter p(this); -//// QPainterPath sidebarPath; -//// sidebarPath.addRoundedRect(this->geometry(), 6, 6); -//// p.fillPath(sidebarPath, colorBase); -//// viewport()->setObjectName("viewport"); -//// viewport()->setStyleSheet("QWidget#viewport{background-color:rgba(255,255,255,0.5)");////" + QString::number(colorBase.red()) + "," + QString::number(colorBase.green()) + "," + QString::number(colorBase.blue()) + "," + QString::number(colorBase.alpha()) + "}"); -// QTreeView::paintEvent(e); -//} - - -SideBarItemDelegate::SideBarItemDelegate(QObject *parent) -{ -// if (QGSettings::isSchemaInstalled("org.ukui.style")) { -// auto settings = UKUIStyleSettings::globalInstance(); -// connect(settings, &QGSettings::changed, this, [=](const QString &key){ -// pDebug << "key changed:" << key; -// if (key == "styleName") { -// pDebug << "key changed...."; -// this->paint(); -// this->update(); -// } -// }); -// } -} - -//QSize SideBarItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const -//{ -// auto size = QStyledItemDelegate::sizeHint(option, index); -// size.setHeight(36); -// return size; -//} - - -void SideBarItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const -{ - painter->save(); - if (index.column() == 1) { - QPainterPath rightRoundedRegion; - rightRoundedRegion.setFillRule(Qt::WindingFill); - auto rect = option.rect; - auto view = qobject_cast<const QAbstractItemView *>(option.widget); - if (view) { - rect.setRight(view->viewport()->rect().right()); - } - int radius = 4; - if(qApp->style()->property("minRadius").isValid()) - radius = qApp->style()->property("minRadius").toInt(); - - rightRoundedRegion.addRoundedRect(rect, radius, radius); - rightRoundedRegion.addRect(rect.adjusted(0, 0, -1 * radius, 0)); - painter->setClipPath(rightRoundedRegion); - } - - painter->setRenderHint(QPainter::Antialiasing); - QStyledItemDelegate::paint(painter, option, index); - painter->restore(); -} - -static SideBarStyle *global_instance = nullptr; -SideBarStyle::SideBarStyle() -{ - -} - -SideBarStyle* SideBarStyle::getStyle() -{ - if (!global_instance) { - global_instance = new SideBarStyle; - } - return global_instance; -} - -void SideBarStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const -{ - painter->save(); - switch (element) { - case QStyle::PE_IndicatorItemViewItemDrop: { - painter->setRenderHint(QPainter::Antialiasing, true);/* 反锯齿 */ - /* 按设计要求,边框颜色为调色板highlight值,圆角为6px */ - QColor color = option->palette.color(QPalette::Highlight); - painter->setPen(color); - int radius = 6; - if(qApp->style()->property("normalRadius").isValid()) - radius = qApp->style()->property("normalRadius").toInt(); - - painter->drawRoundedRect(option->rect, radius, radius); - painter->restore(); - return; - } - - case QStyle::PE_IndicatorBranch: { - painter->setRenderHint(QPainter::Antialiasing, true); - if (option->rect.x() == 0) { - QPainterPath leftRoundedRegion; - leftRoundedRegion.setFillRule(Qt::WindingFill); - int radius = 4; - if(qApp->style()->property("minRadius").isValid()) - radius = qApp->style()->property("minRadius").toInt(); - - leftRoundedRegion.addRoundedRect(option->rect, radius, radius); - leftRoundedRegion.addRect(option->rect.adjusted(radius, 0, 0, 0)); - painter->setClipPath(leftRoundedRegion); - } - const QStyleOptionViewItem *tmp = qstyleoption_cast<const QStyleOptionViewItem *>(option); - QStyleOptionViewItem opt = *tmp; - if (!opt.state.testFlag(QStyle::State_Selected)) { - if (opt.state & QStyle::State_Sunken) { - opt.palette.setColor(QPalette::Highlight, opt.palette.button().color()); -// opt.palette.setColor(QPalette::Highlight, Qt::red); - } - if (opt.state & QStyle::State_MouseOver) { - opt.palette.setColor(QPalette::Highlight, opt.palette.mid().color()); -// opt.palette.setColor(QPalette::Highlight, Qt::green); - } - } - qApp->style()->drawPrimitive(element, &opt, painter, widget); - painter->restore(); - return; - } - case QStyle::PE_PanelItemViewRow: { - painter->restore(); - return; - break; - } - case QStyle::PE_PanelItemViewItem: { - /* - const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option); - QStyleOptionViewItem opt = *vi; - painter->save(); - painter->setPen(Qt::NoPen); - QPainterPath path; - if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) { - path.addRoundedRect(vi->rect, 6, 6); - } - else { - path.addRect(vi->rect); - } -// pDebug << "vi->rect:" << vi->rect; - - if (!opt.state.testFlag(QStyle::State_Selected)) { - if (opt.state & QStyle::State_Sunken) { - opt.palette.setColor(QPalette::Highlight, opt.palette.button().color()); - } - if (opt.state & QStyle::State_MouseOver) { - opt.palette.setColor(QPalette::Highlight, opt.palette.mid().color()); - } - } - painter->drawPath(path); - */ - break; - } - - default: - break; - } - - qApp->style()->drawPrimitive(element, option, painter, widget); - painter->restore(); -} - -void SideBarStyle::drawControl(QStyle::ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const -{ - if (element == QStyle::CE_ItemViewItem) { - const QStyleOptionViewItem *tmp = qstyleoption_cast<const QStyleOptionViewItem *>(option); - QStyleOptionViewItem opt = *tmp; - if (!opt.state.testFlag(QStyle::State_Selected)) { - if (opt.state & QStyle::State_Sunken) { - opt.palette.setColor(QPalette::Highlight, opt.palette.button().color()); - } - if (opt.state & QStyle::State_MouseOver) { - opt.palette.setColor(QPalette::Highlight, opt.palette.mid().color()); - } - } - return qApp->style()->drawControl(element, &opt, painter, widget); - } -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/sidebar.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/sidebar.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/sidebar.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/sidebar.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,83 +0,0 @@ -#include "debug.h" -#ifndef SIDEBAR_H -#define SIDEBAR_H -#include <QTreeView> -#include <QPaintEvent> -#include <QStyledItemDelegate> -#include <QStyleOptionViewItem> -#include <QModelIndex> -#include <QPainter> -#include <QProxyStyle> -#include <QStyleOption> -#include <PeonySideBarProxyModel> -#include <QComboBox> -#include <QSize> -#include <PeonySideBarModel> - -namespace UKUIFileDialog { -class FileDialogComboBox : public QComboBox -{ - Q_OBJECT -public: - explicit FileDialogComboBox(QWidget *parent = nullptr); - ~FileDialogComboBox(){} - QSize minimumSizeHint() const; - -public Q_SLOTS: - void tableModeChanged(bool isTableMode); - -Q_SIGNALS: - void setStyleChanged(bool change) const; - -private: - bool m_styleChanged = false; - QSize m_minSize; -}; - - -class FileDialogSideBar : public QTreeView -{ - - Q_OBJECT -public: - explicit FileDialogSideBar(QWidget *parent = nullptr); - ~FileDialogSideBar(); - void resizeEvent(QResizeEvent *e); - void paintEvent(QPaintEvent *event); - -public Q_SLOTS: - void menuRequest(const QPoint &pos); - void tableModeChanged(bool isTableMode); - -private: - Peony::SideBarProxyFilterSortModel *m_proxyModel = nullptr; - Peony::SideBarModel *m_model = nullptr; - -Q_SIGNALS: - void goToUriRequest(const QString &uri, bool addToHistory = true, bool forceUpdate = false); - -}; - - -class SideBarItemDelegate : public QStyledItemDelegate -{ - friend class FileDialogSideBar; - explicit SideBarItemDelegate(QObject *parent = nullptr); - ~SideBarItemDelegate(){} - -// QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; - void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; -}; - - -class SideBarStyle : public QProxyStyle -{ -public: - explicit SideBarStyle(); - static SideBarStyle* getStyle(); - ~SideBarStyle(){} - void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override; - void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override; -}; -} -#endif // SIDEBAR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,483 +0,0 @@ -#include "debug.h" -#include "ui_kyfiledialog.h" -#include <QFileDialog> -#include "kyfiledialog.h" -#include "debug.h" -using namespace UKUIFileDialog; -//Ui_KyFileDialog::Ui_KyFileDialog(QDialog *parent) -//{ -// setupUi(parent); -//} - -Ui_KyFileDialog::Ui_KyFileDialog(QWidget *parent) : QWidget(parent) -{ - -} - -Ui_KyFileDialog::~Ui_KyFileDialog() -{ - pDebug << "Ui_KyFileDialog destory111.........."; -/* - if(m_pathbarWidget){ - m_pathbarWidget->deleteLater(); - m_pathbarWidget = nullptr; - } - qDebug() << "Ui_KyFileDialog destory122222.........."; - - if(m_pathbar){ - m_pathbar->deleteLater(); - m_pathbar = nullptr; - } - if(m_searchBtn){ - m_searchBtn->deleteLater(); - m_searchBtn = nullptr; - } - if(m_backButton){ - m_backButton->deleteLater(); - m_backButton = nullptr; - } - qDebug() << "Ui_KyFileDialog destory3223.........."; - - if(m_forwardButton){ - m_forwardButton->deleteLater(); - m_forwardButton = nullptr; - } - if(m_toParentButton){ - m_toParentButton->deleteLater(); - m_toParentButton = nullptr; - } - if(m_modeButton){ - m_modeButton->deleteLater(); - m_modeButton = nullptr; - } - if(m_sortButton){ - m_sortButton->deleteLater(); - m_sortButton = nullptr; - } - if(m_maximizeAndRestore){ - m_maximizeAndRestore->deleteLater(); - m_maximizeAndRestore = nullptr; - } - if(m_closeButton){ - m_closeButton->deleteLater(); - m_closeButton = nullptr; - } - if(m_modeMenu){ - m_modeMenu->deleteLater(); - m_modeMenu = nullptr; - } - qDebug() << "Ui_KyFileDialog destory3555423.........."; - - if(m_sortMenu){ - m_sortMenu->deleteLater(); - m_sortMenu = nullptr; - } - if(m_listModeAction){ - m_listModeAction->deleteLater(); - m_listModeAction = nullptr; - } - if(m_iconModeAction){ - m_iconModeAction->deleteLater(); - m_iconModeAction = nullptr; - } - if(m_sider){ - m_sider->deleteLater(); - m_sider = nullptr; - } - qDebug() << "Ui_KyFileDialog destory223322.........."; - - if(m_frame){ - m_frame->deleteLater(); - m_frame = nullptr; - } - if(m_splitter){ - m_splitter->deleteLater(); - m_splitter = nullptr; - } - if(vboxLayout){ - vboxLayout->deleteLater(); - vboxLayout = nullptr; - } - if(m_treeView){ - m_treeView->deleteLater(); - m_treeView = nullptr; - } - if(m_fileNameLabel){ - m_fileNameLabel->deleteLater(); - m_fileNameLabel = nullptr; - } - if(m_fileNameEdit){ - m_fileNameEdit->deleteLater(); - m_fileNameEdit = nullptr; - } - qDebug() << "Ui_KyFileDialog destory1245677.........."; - - if(m_fileTypeCombo){ - m_fileTypeCombo->deleteLater(); - m_fileTypeCombo = nullptr; - } - if(m_newFolderButton){ - m_newFolderButton->deleteLater(); - m_newFolderButton = nullptr; - } - if(m_acceptButton){ - m_acceptButton->deleteLater(); - m_acceptButton = nullptr; - } - if(m_rejectButton){ - m_rejectButton->deleteLater(); - m_rejectButton = nullptr; - } - qDebug() << "Ui_KyFileDialog destory23467899.........."; - - if(m_upSeperate){ - m_upSeperate->deleteLater(); - m_upSeperate = nullptr; - } - if(m_downSeperate){ - m_downSeperate->deleteLater(); - m_downSeperate = nullptr; - } - if(m_widget){ - m_widget->deleteLater(); - m_widget = nullptr; - } - qDebug() << "destory345.........."; - - if(m_container){ - qDebug() << "destory555.........."; - - m_container->deleteLater(); - m_container = nullptr; - qDebug() << "destory666.........."; - - } - qDebug() << "destory777.........."; - - if(m_siderWidget){ - m_siderWidget->deleteLater(); - m_siderWidget = nullptr; - } - - if(m_sortTypeGroup){ - m_sortTypeGroup->deleteLater(); - m_sortTypeGroup = nullptr; - } - if(m_fileName){ - m_fileName->deleteLater(); - m_fileName = nullptr; - } - if(m_modifiedDate){ - m_modifiedDate->deleteLater(); - m_modifiedDate = nullptr; - } - if(m_fileType){ - m_fileType->deleteLater(); - m_fileType = nullptr; - } - if(m_fileSize){ - m_fileSize->deleteLater(); - m_fileSize = nullptr; - } - if(m_originalPath){ - m_originalPath->deleteLater(); - m_originalPath = nullptr; - } - if(m_sortOrderGroup){ - m_sortOrderGroup->deleteLater(); - m_sortOrderGroup = nullptr; - } - if(m_descending){ - m_descending->deleteLater(); - m_descending = nullptr; - } - if(m_ascending){ - m_ascending->deleteLater(); - m_ascending = nullptr; - } - if(m_useGlobalSortAction){ - m_useGlobalSortAction->deleteLater(); - m_useGlobalSortAction = nullptr; - } - qDebug() << "Ui_KyFileDialog destory8888.........."; - - if(m_siderLayout){ - m_siderLayout->deleteLater(); - m_siderLayout = nullptr; - } -// if(m_gridLayout){ -// m_gridLayout->deleteLater(); -// m_gridLayout= nullptr; -// } - - if(m_hHeaderLayout){ - m_hHeaderLayout->deleteLater(); - m_hHeaderLayout = nullptr; - } - if(m_hLineEditLayout){ - m_hLineEditLayout->deleteLater(); - m_hLineEditLayout = nullptr; - } - if(m_hBtnLayout){ - m_hBtnLayout->deleteLater(); - m_hBtnLayout = nullptr; - } - qDebug() << "Ui_KyFileDialog destory123.........."; -*/ -} - -void Ui_KyFileDialog::initSortMenu(QDialog *mKyFileDialog) -{ - m_sortButton = new MenuToolButton(this); - m_sortMenu = new QMenu(m_sortButton); - - m_sortTypeGroup = new QActionGroup(m_sortMenu); - m_sortTypeGroup->setExclusive(true); - - m_fileName = m_sortMenu->addAction(QObject::tr("File Name")); - m_fileName->setCheckable(true); - m_sortTypeGroup->addAction(m_fileName); - - m_modifiedDate = m_sortMenu->addAction(QObject::tr("Modified Date")); - m_modifiedDate->setCheckable(true); - m_sortTypeGroup->addAction(m_modifiedDate); - - m_fileType = m_sortMenu->addAction(QObject::tr("File Type")); - m_fileType->setCheckable(true); - m_sortTypeGroup->addAction(m_fileType); - - m_fileSize = m_sortMenu->addAction(QObject::tr("File Size")); - m_fileSize->setCheckable(true); - m_sortTypeGroup->addAction(m_fileSize); - - m_originalPath = m_sortMenu->addAction(QObject::tr("Original Path")); - m_originalPath->setCheckable(true); - m_sortTypeGroup->addAction(m_originalPath); - - m_sortMenu->addSeparator(); - - m_sortOrderGroup = new QActionGroup(m_sortMenu); - m_sortOrderGroup->setExclusive(true); - - m_descending = m_sortMenu->addAction(QObject::tr("Descending")); - m_descending->setCheckable(true); - m_sortOrderGroup->addAction(m_descending); - - //switch defautl Descending Ascending order, fix bug#99924 - m_ascending = m_sortMenu->addAction(QObject::tr("Ascending")); - m_ascending->setCheckable(true); - m_sortOrderGroup->addAction(m_ascending); - - m_sortMenu->addSeparator(); - - m_useGlobalSortAction = m_sortMenu->addAction(QObject::tr("Use global sorting")); - m_useGlobalSortAction->setCheckable(true); - - m_sortButton->setMenu(m_sortMenu); - m_sortButton->setPopupMode(QToolButton::InstantPopup); - m_sortButton->setAutoRaise(true); - m_sortButton->setFixedSize(QSize(57, 40)); - m_sortButton->setIconSize(QSize(16, 16)); - -} - -void Ui_KyFileDialog::initModeMenu(QDialog *mKyFileDialog) -{ - m_modeButton = new MenuToolButton(this); - m_modeButton->setPopupMode(QToolButton::InstantPopup); - m_modeButton->setAutoRaise(true); - m_modeButton->setFixedSize(QSize(57, 40)); - m_modeButton->setIconSize(QSize(16, 16)); - - m_modeMenu = new QMenu(m_modeButton); - m_listModeAction = m_modeMenu->addAction(QIcon::fromTheme("view-list-symbolic"), QObject::tr("List View")); - m_iconModeAction = m_modeMenu->addAction(QIcon::fromTheme("view-grid-symbolic"), QObject::tr("Icon View")); - m_listModeAction->setCheckable(true); - m_iconModeAction->setCheckable(true); - m_modeButton->setMenu(m_modeMenu); -} - -void Ui_KyFileDialog::initSiderBar(QDialog *mKyFileDialog) -{ - m_siderWidget = new QWidget(this); - m_siderLayout = new QVBoxLayout(); - m_siderLayout->setContentsMargins(0,0,0,0); - - m_sider = new FileDialogSideBar(this); - m_sider->setAttribute(Qt::WA_TranslucentBackground); -} - -void Ui_KyFileDialog::initHeaderBar(QDialog *mKyFileDialog) -{ - m_hHeaderLayout = new QHBoxLayout(this); - initModeMenu(mKyFileDialog); - initSortMenu(mKyFileDialog); - - m_hHeaderLayout->setContentsMargins(0,0,8,0); - m_hHeaderLayout->setObjectName(QString::fromUtf8("hboxLayout")); - m_backButton = new QToolButton(this); - m_forwardButton = new QToolButton(this); - m_toParentButton = new QToolButton(this); - - m_pathbarWidget = new FileDialogPathBar(this);//new Peony::AdvancedLocationBar(mKyFileDialog);// - m_pathbar = m_pathbarWidget->getPathBar(); - m_pathbar->setMinimumWidth(250); - m_pathbar->setFocusPolicy(Qt::FocusPolicy(m_pathbar->focusPolicy() & ~Qt::TabFocus)); - - m_searchBtn = new QToolButton(this); - - m_maximizeAndRestore = new QToolButton(this); - - m_closeButton = new QToolButton(this); - m_hHeaderLayout->setAlignment(Qt::AlignVCenter); - - m_hHeaderLayout->addWidget(m_backButton); - m_hHeaderLayout->addWidget(m_forwardButton); - m_hHeaderLayout->addWidget(m_toParentButton); - m_hHeaderLayout->addWidget(m_pathbarWidget); - m_hHeaderLayout->addWidget(m_searchBtn); - m_hHeaderLayout->addWidget(m_modeButton); - m_hHeaderLayout->addWidget(m_sortButton); - m_hHeaderLayout->addWidget(m_maximizeAndRestore); - m_hHeaderLayout->addWidget(m_closeButton); - -} - -void Ui_KyFileDialog::initLineEditLayout(QDialog *mKyFileDialog) -{ - m_hLineEditLayout = new QHBoxLayout(this); - m_hLineEditLayout->setContentsMargins(4,0,24,0); - m_fileNameLabel = new QLabel(this); - m_fileNameLabel->setObjectName(QString::fromUtf8("fileNameLabel")); - QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred); - sizePolicy2.setHorizontalStretch(0); - sizePolicy2.setVerticalStretch(0); - sizePolicy2.setHeightForWidth(m_fileNameLabel->sizePolicy().hasHeightForWidth()); - m_fileNameLabel->setSizePolicy(sizePolicy2); - m_fileNameLabel->setMinimumSize(QSize(0, 0)); - pDebug << "3333333333333333333"; - - m_fileNameEdit = new QLineEdit(mKyFileDialog); - m_fileNameEdit->setObjectName("fileNameEdit"); - QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Fixed); - sizePolicy3.setHorizontalStretch(1); - sizePolicy3.setVerticalStretch(0); - sizePolicy3.setHeightForWidth(m_fileNameEdit->sizePolicy().hasHeightForWidth()); - m_fileNameEdit->setSizePolicy(sizePolicy3); - pDebug << "44444444444444444"; - - m_fileTypeCombo = new FileDialogComboBox(this); - QSizePolicy sizePolicy4(QSizePolicy::Expanding, QSizePolicy::Fixed); - sizePolicy4.setHorizontalStretch(0); - sizePolicy4.setVerticalStretch(0); - sizePolicy4.setHeightForWidth(m_fileTypeCombo->sizePolicy().hasHeightForWidth()); - m_fileTypeCombo->setSizePolicy(sizePolicy4); -// m_fileTypeCombo->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength); - //m_fileTypeCombo->setVisible(false); - - m_hLineEditLayout->addWidget(m_fileNameLabel); - m_hLineEditLayout->addWidget(m_fileNameEdit); - m_hLineEditLayout->addWidget(m_fileTypeCombo); - m_hLineEditLayout->setSpacing(15); -} - -void Ui_KyFileDialog::intiBtnLayout(QDialog *mKyFileDialog) -{ - m_hBtnLayout = new QHBoxLayout(this); - m_hBtnLayout->addSpacing(20); - m_hBtnLayout->setContentsMargins(0,0,24,0); - m_newFolderButton =new QPushButton(mKyFileDialog); - m_newFolderButton->setObjectName(QString::fromUtf8("newFolderButton")); - m_hBtnLayout->addWidget(m_newFolderButton); - - - m_acceptButton = new QPushButton(mKyFileDialog); - m_rejectButton = new QPushButton(mKyFileDialog); - m_acceptButton->setEnabled(false); - m_hBtnLayout->addStretch(); - m_hBtnLayout->addWidget(m_rejectButton, 0, Qt::AlignRight | Qt::AlignVCenter); - m_hBtnLayout->addSpacing(15); - m_hBtnLayout->addWidget(m_acceptButton, 0, Qt::AlignRight | Qt::AlignVCenter); - - m_acceptButton->setObjectName(QString::fromUtf8("acceptButton")); - m_rejectButton->setObjectName(QString::fromUtf8("rejectButton")); - - pDebug << "6666666666666666"; -} - -void Ui_KyFileDialog::setupUi(QDialog *mKyFileDialog) -{ - if(mKyFileDialog->objectName().isEmpty()) { - mKyFileDialog->setObjectName(QString::fromUtf8("KyNativeFileDialog")); - } - mKyFileDialog->resize(1160, 635); - - mKyFileDialog->setSizeGripEnabled(true); - mKyFileDialog->setAttribute(Qt::WA_TranslucentBackground); - mKyFileDialog->setContentsMargins(0,0,0,0); - - m_gridLayout = new QGridLayout(mKyFileDialog); - m_gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - - m_container = new Peony::DirectoryViewContainer(this); - m_frame = new QFrame(this); - vboxLayout = new QVBoxLayout(this); - - initSiderBar(mKyFileDialog); - - initHeaderBar(mKyFileDialog); - initLineEditLayout(mKyFileDialog); - intiBtnLayout(mKyFileDialog); - - vboxLayout->addSpacing(8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); - vboxLayout->setContentsMargins(0, 0, 0, 0); - - vboxLayout->addLayout(m_hHeaderLayout); - vboxLayout->addSpacing(6); - m_upSeperate = new QFrame(mKyFileDialog); - m_upSeperate->setFrameShape(QFrame::HLine); - m_upSeperate->setFrameShadow(QFrame::Plain); - vboxLayout->addWidget(m_upSeperate); - vboxLayout->addSpacing(6); - vboxLayout->addWidget(m_container); - vboxLayout->addSpacing(15); - - vboxLayout->addLayout(m_hLineEditLayout); - vboxLayout->addSpacing(16); - - m_downSeperate = new QFrame(mKyFileDialog); - m_downSeperate->setFrameShape(QFrame::HLine); - m_downSeperate->setFrameShadow(QFrame::Plain); - vboxLayout->addWidget(m_downSeperate); - vboxLayout->addSpacing(16); - - vboxLayout->addLayout(m_hBtnLayout); - vboxLayout->addSpacing(25); - - m_frame->setFrameShadow(QFrame::Raised); - m_frame->setFrameShape(QFrame::NoFrame); - m_frame->setLayout(vboxLayout); - - m_splitter = new QSplitter(this); - m_splitter->setAttribute(Qt::WA_TranslucentBackground); - QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(m_splitter->sizePolicy().hasHeightForWidth()); - m_splitter->setSizePolicy(sizePolicy1); - m_splitter->setOrientation(Qt::Horizontal); - m_splitter->setHandleWidth(0); - m_siderLayout->addWidget(m_sider); - m_siderWidget->setLayout(m_siderLayout); - m_splitter->addWidget(m_siderWidget); - m_splitter->setStretchFactor(0, 20); - m_splitter->addWidget(m_frame); - m_splitter->setStretchFactor(1, 40); - int siderWidIndex = m_splitter->indexOf(m_siderWidget); - int frameIndex = m_splitter->indexOf(m_frame); - m_splitter->setCollapsible(siderWidIndex, false); - m_splitter->setCollapsible(frameIndex, false); - m_gridLayout->addWidget(m_splitter); - m_gridLayout->setContentsMargins(0,0,0,0); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/filedialog/ui_kyfiledialog.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,104 +0,0 @@ -#include "debug.h" -#ifndef UI_KYFILEDIALOG_H -#define UI_KYFILEDIALOG_H -#include <QApplication> -#include <QComboBox> -#include <QTreeView> -#include <QToolButton> -#include <QLineEdit> -#include <QFrame> -#include <QSplitter> -#include <QLabel> -#include <QMenu> -#include <QAction> -#include <QGridLayout> -#include <QHBoxLayout> -#include <QVBoxLayout> -#include <QDialogButtonBox> -#include <QDebug> -#include "sidebar.h" -#include <QSizePolicy> -#include "kyfiledialog.h" -#include <peony-qt/controls/directory-view/directory-view-container.h> -#include <peony-qt/controls/navigation-bar/advanced-location-bar.h> -#include "pathbar.h" -#include <QPushButton> -#include <QToolBar> -#include <QObject> -#include <QDialog> -#include "menutoolbutoon.h" - -namespace Peony { -class DirectoryViewContainer; -} -namespace UKUIFileDialog { -class Ui_KyFileDialog: public QWidget -{ - QOBJECT_H - public: - explicit Ui_KyFileDialog(QWidget *parent = nullptr); - ~Ui_KyFileDialog(); - - QGridLayout *m_gridLayout = nullptr; - QHBoxLayout *m_hHeaderLayout = nullptr; - QHBoxLayout *m_hLineEditLayout = nullptr; - QHBoxLayout *m_hBtnLayout = nullptr; - FileDialogPathBar *m_pathbarWidget = nullptr; - Peony::AdvancedLocationBar *m_pathbar = nullptr; - QToolButton *m_searchBtn = nullptr; - //QWidget *m_pathbar = nullptr; - QToolButton *m_backButton = nullptr; - QToolButton *m_forwardButton = nullptr; - QToolButton *m_toParentButton = nullptr; - MenuToolButton *m_modeButton = nullptr; - MenuToolButton *m_sortButton = nullptr; - QToolButton *m_maximizeAndRestore = nullptr; - QToolButton *m_closeButton = nullptr; - QMenu *m_modeMenu = nullptr; - QMenu *m_sortMenu = nullptr; - QAction *m_listModeAction = nullptr; - QAction *m_iconModeAction = nullptr; - FileDialogSideBar *m_sider = nullptr; - QFrame *m_frame = nullptr; - QSplitter *m_splitter = nullptr; - QVBoxLayout *vboxLayout = nullptr; - QTreeView *m_treeView = nullptr; - QLabel *m_fileNameLabel = nullptr; - QLineEdit *m_fileNameEdit = nullptr; - FileDialogComboBox *m_fileTypeCombo = nullptr; - QPushButton *m_newFolderButton = nullptr; - QPushButton *m_acceptButton = nullptr; - QPushButton *m_rejectButton = nullptr; - QFrame *m_upSeperate = nullptr; - QFrame *m_downSeperate = nullptr; - - QWidget *m_widget = nullptr; - Peony::DirectoryViewContainer *m_container = nullptr; - - QWidget *m_siderWidget = nullptr; - QVBoxLayout *m_siderLayout = nullptr; - - QActionGroup *m_sortTypeGroup = nullptr; - QAction *m_fileName = nullptr; - QAction *m_modifiedDate = nullptr; - QAction *m_fileType = nullptr; - QAction *m_fileSize = nullptr; - QAction *m_originalPath = nullptr; - QActionGroup *m_sortOrderGroup = nullptr; - QAction *m_descending = nullptr; - QAction *m_ascending = nullptr; - QAction *m_useGlobalSortAction = nullptr; - -public: - void setupUi(QDialog *mKyFileDialog); - -private: - void initSortMenu(QDialog *mKyFileDialog); - void initModeMenu(QDialog *mKyFileDialog); - void initSiderBar(QDialog *mKyFileDialog); - void initHeaderBar(QDialog *mKyFileDialog); - void initLineEditLayout(QDialog *mKyFileDialog); - void intiBtnLayout(QDialog *mKyFileDialog); -}; -} -#endif // UI_KYFILEDIALOG_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/messagebox/message-box.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * KWin Style UKUI * - * Copyright (C) 2020, KylinSoft Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,12 +16,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Ding Jing <dingjing@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ #include "message-box.h" -#include "xatom-helper.h" +#include "../../xatom-helper.h" #include <QPainter> #include <QVariant> @@ -78,7 +78,7 @@ Q_D(MessageBox); const QString locale = QLocale::system().name(); - QTranslator *translator = new QTranslator(); + QTranslator *translator = new QTranslator(this); if (translator->load("/usr/share/qt5-ukui-platformtheme/qt5-ukui-platformtheme_" + locale)) { //Fix:BUG176598,block QMessagebox translation for xca before commit patch to upstream @@ -90,7 +90,7 @@ else qWarning() << "Load translations file failed!" << locale; - setProperty("useStyleWindowManager", false); + setProperty("useStyleWindowManager", true); setBackgroundRole(QPalette::Base); setAutoFillBackground(true); d->init(); @@ -721,7 +721,7 @@ } - mCloseButtton = new QPushButton(/*q*/); + mCloseButtton = new QPushButton(); mCloseButtton->setFlat(true); mCloseButtton->setFocusPolicy(Qt::NoFocus); mCloseButtton->setProperty("isWindowButton", 0x2); @@ -737,10 +737,10 @@ q->close(); }); - mTitleText = new QLabel(/*q*/); + mTitleText = new QLabel(); mTitleText->setText(title); mTitleIcon = new QLabel(); - mTitleIcon->setPixmap(QIcon(qApp->windowIcon()).pixmap(QSize(22, 22))); +// mTitleIcon->setPixmap(QIcon(qApp->windowIcon()).pixmap(QSize(22, 22))); mTitleIcon->setFixedSize(22, 22); q->setModal(true); @@ -795,10 +795,11 @@ QHBoxLayout *titleLayout = new QHBoxLayout; titleLayout->setContentsMargins(6,0,0,0); - if(!mTitleIcon->pixmap()->isNull()){ - titleLayout->addWidget(mTitleIcon, Qt::AlignLeft | Qt::AlignVCenter); - titleLayout->addSpacing(5); - } +// //ukui should remove title icon +// if (mTitleIcon->pixmap() && !mTitleIcon->pixmap()->isNull()) { +// titleLayout->addWidget(mTitleIcon, Qt::AlignLeft | Qt::AlignVCenter); +// titleLayout->addSpacing(5); +// } titleLayout->addWidget(mTitleText, Qt::AlignLeft | Qt::AlignVCenter); titleLayout->addWidget(mCloseButtton, Qt::AlignRight | Qt::AlignVCenter); @@ -807,8 +808,8 @@ layout->setContentsMargins(4, 4, 4, 4); layout->setSpacing(4); // layout->addWidget(mCloseButtton, 0, Qt::AlignRight); -// layout->addLayout(titleLayout); - layout->addSpacing(16); + layout->addLayout(titleLayout); + layout->addSpacing(0); layout->addLayout(contentLayout); q->setLayout(layout); @@ -1292,7 +1293,10 @@ MessageBoxHelper::~MessageBoxHelper() { - + if(mMessageBox){ + mMessageBox->deleteLater(); + mMessageBox = nullptr; + } } void MessageBoxHelper::exec() @@ -1314,7 +1318,7 @@ { initDialog(windowFlags, windowModality, parent); - if (parent) { + if (parent && mMessageBox->find(parent->winId())) { if (QWidget *p = mMessageBox->find(parent->winId())) { for(QMessageBox *mb : p->findChildren<QMessageBox *>()) { @@ -1356,6 +1360,9 @@ for (QMessageBox *mb : p->findChildren<QMessageBox *>()) { if (mb->icon() == options()->icon() && mb->windowTitle() == options()->windowTitle() && mb->text() == options()->text() && mb->informativeText() == options()->informativeText() && mb->detailedText() == options()->detailedText()) { + if(mb->escapeButton() && mMessageBox->escapeButton() != mb->escapeButton()) + mMessageBox->setEscapeButton(mb->escapeButton()); + if(mb->defaultButton()){ QString btnText = mb->defaultButton()->text(); foreach (QAbstractButton* btn, mMessageBox->buttons()) { @@ -1385,13 +1392,16 @@ mMessageBox->setWindowFlag(Qt::Dialog); } - if(parent == nullptr) + if(parent == nullptr || mMessageBox->find(parent->winId()) == nullptr) { QList<QWidget *> widgets = QApplication::allWidgets(); foreach (QWidget *w, widgets) { if(QMessageBox *mb = qobject_cast<QMessageBox *>(w)) { if (mb->icon() == options()->icon() && mb->windowTitle() == options()->windowTitle() && mb->text() == options()->text() && mb->informativeText() == options()->informativeText() && mb->detailedText() == options()->detailedText()) { + if(mb->escapeButton() && mMessageBox->escapeButton() != mb->escapeButton()) + mMessageBox->setEscapeButton(mb->escapeButton()); + if(mb->defaultButton() == nullptr) break; QString btnText = mb->defaultButton()->text(); @@ -1461,6 +1471,7 @@ } */ + //remove windows header // QString platform = QGuiApplication::platformName(); // if(platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) // { @@ -1472,6 +1483,8 @@ // hints.decorations = MWM_DECOR_BORDER; // XAtomHelper::getInstance()->setWindowMotifHint(mMessageBox->winId(), hints); // } + kdk::UkuiStyleHelper::self()->removeHeader(mMessageBox); + foreach (QAbstractButton *ab, mMessageBox->buttons()) { if (QPushButton *pb = qobject_cast<QPushButton *>(ab)) { diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/messagebox/message-box.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/messagebox/message-box.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/messagebox/message-box.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/messagebox/message-box.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * KWin Style UKUI * - * Copyright (C) 2020, KylinSoft Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Ding Jing <dingjing@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/widget.pri qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/widget.pri --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/widget.pri 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/widget.pri 1970-01-01 08:00:00.000000000 +0800 @@ -1,55 +0,0 @@ -HEADERS += \ - $$PWD/filedialog/kyfiledialog.h \ - $$PWD/filedialog/kyfiledialogprivate.h \ - $$PWD/messagebox/message-box.h \ - $$PWD/filedialog/pathbar.h \ - $$PWD/filedialog/sidebar.h \ - $$PWD/filedialog/ui_kyfiledialog.h \ - $$PWD/xatom-helper.h \ - $$PWD/filedialog/menutoolbutoon.h \ - $$PWD/filedialog/debug.h \ - -SOURCES += \ - $$PWD/filedialog/kyfiledialog.cpp \ - $$PWD/messagebox/message-box.cpp \ - $$PWD/filedialog/pathbar.cpp \ - $$PWD/filedialog/sidebar.cpp \ - $$PWD/xatom-helper.cpp \ - $$PWD/filedialog/menutoolbutoon.cpp \ - $$PWD/filedialog/kyfiledialogprivate.cpp \ - $$PWD/filedialog/ui_kyfiledialog.cpp \ - -DEFINES += OPEN_ACTIONS_SEPARATOR='\\"open-actions-seperator\\"' -DEFINES += CREATE_ACTIONS_SEPARATOR='\\"create-actions-seperator\\"' -DEFINES += VIEW_ACTIONS_SEPARATOR='\\"view-actions-seperator\\"' -DEFINES += FILE_OPERATION_ACTIONS_SEPARATOR='\\"file-operation-actions-seperator\\"' -DEFINES += PLUGIN_ACTIONS_SEPARATOR='\\"plugin-actions-seperator\\"' -DEFINES += PROPERTIES_ACTIONS_SEPARATOR='\\"properties-actions-seperator\\"' -DEFINES += COMPUTER_ACTIONS_SEPARATOR='\\"computer-actions-seperator\\"' -DEFINES += TRASH_ACTIONS_SEPARATOR='\\"trash-actions-seperator\\"' - -DEFINES += OPEN_IN_NEW_WINDOW_ACTION='\\"open-in-new-window-action\\"' -DEFINES += OPEN_IN_NEW_TAB_ACTION='\\"open-in-new-tab-action\\"' -DEFINES += ADD_TO_BOOKMARK_ACTION='\\"add-to-bookmark-action\\"' -DEFINES += OPEN_ACTION='\\"open-action\\"' -DEFINES += OPEN_WITH_ACTION='\\"open-with-action\\"' -DEFINES += OPEN_SELECTED_FILES_ACTION='\\"open-selected-files-action\\"' -DEFINES += CREATE_ACTION='\\"create-action\\"' -DEFINES += VIEW_TYPE_ACTION='\\"view-type-action\\"' -DEFINES += SORT_TYPE_ACTION='\\"sort-type-action\\"' -DEFINES += SORT_ORDER_ACTION='\\"sort-order-action\\"' -DEFINES += SORT_PREFERENCES_ACTION='\\"sort-preferences-action\\"' -DEFINES += COPY_ACTION='\\"copy-action\\"' -DEFINES += CUT_ACTION='\\"cut-action\\"' -DEFINES += TRASH_ACTION='\\"trash-action\\"' -DEFINES += DELETE_ACTION='\\"delete-action\\"' -DEFINES += RENAME_ACTION='\\"rename-action\\"' -DEFINES += PASTE_ACTION='\\"paste-action\\"' -DEFINES += REFRESH_ACTION='\\"refresh-action\\"' -DEFINES += SELECT_ALL_ACTION='\\"select-all-action\\"' -DEFINES += REVERSE_SELECT_ACTION='\\"reverse-select-action\\"' -DEFINES += PROPERTIES_ACTION='\\"properties-action\\"' -DEFINES += FORMAT_ACTION='\\"format-action\\"' -DEFINES += CLEAN_THE_TRASH_ACTION='\\"clean-the-trash-action\\"' -DEFINES += RESTORE_ACTION='\\"restore-action\\"' -DEFINES += CLEAN_THE_RECENT_ACTION='\\"clean-the-recent-action\\"' diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/xatom-helper.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/xatom-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/xatom-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/xatom-helper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,215 +0,0 @@ -/* - * KWin Style UKUI - * - * Copyright (C) 2020, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "xatom-helper.h" - -#include <limits.h> - -#include <QX11Info> - -#include <X11/X.h> -#include <X11/Xlib.h> -#include <X11/Xatom.h> - -static XAtomHelper *global_instance = nullptr; - -XAtomHelper *XAtomHelper::getInstance() -{ - if (!global_instance) - global_instance = new XAtomHelper; - return global_instance; -} - -bool XAtomHelper::isFrameLessWindow(int winId) -{ - auto hints = getInstance()->getWindowMotifHint(winId); - if (hints.flags == MWM_HINTS_DECORATIONS && hints.functions == 1) { - return true; - } - return false; -} - -bool XAtomHelper::isWindowDecorateBorderOnly(int winId) -{ - return isWindowMotifHintDecorateBorderOnly(getInstance()->getWindowMotifHint(winId)); -} - -bool XAtomHelper::isWindowMotifHintDecorateBorderOnly(const MotifWmHints &hint) -{ - bool isDeco = false; - if (hint.flags & MWM_HINTS_DECORATIONS && hint.flags != MWM_HINTS_DECORATIONS) { - if (hint.decorations == MWM_DECOR_BORDER) - isDeco = true; - } - return isDeco; -} - -bool XAtomHelper::isUKUICsdSupported() -{ - // fixme: - return false; -} - -bool XAtomHelper::isUKUIDecorationWindow(int winId) -{ - if (m_ukuiDecorationAtion == None) - return false; - - Atom type; - int format; - ulong nitems; - ulong bytes_after; - uchar *data; - - bool isUKUIDecoration = false; - - XGetWindowProperty(QX11Info::display(), winId, m_ukuiDecorationAtion, - 0, LONG_MAX, false, - m_ukuiDecorationAtion, &type, - &format, &nitems, - &bytes_after, &data); - - if (type == m_ukuiDecorationAtion) { - if (nitems == 1) { - isUKUIDecoration = data[0]; - } - } - - return isUKUIDecoration; -} - -UnityCorners XAtomHelper::getWindowBorderRadius(int winId) -{ - UnityCorners corners; - - Atom type; - int format; - ulong nitems; - ulong bytes_after; - uchar *data; - - if (m_unityBorderRadiusAtom != None) { - XGetWindowProperty(QX11Info::display(), winId, m_unityBorderRadiusAtom, - 0, LONG_MAX, false, - XA_CARDINAL, &type, - &format, &nitems, - &bytes_after, &data); - - if (type == XA_CARDINAL) { - if (nitems == 4) { - corners.topLeft = static_cast<ulong>(data[0]); - corners.topRight = static_cast<ulong>(data[1*sizeof (ulong)]); - corners.bottomLeft = static_cast<ulong>(data[2*sizeof (ulong)]); - corners.bottomRight = static_cast<ulong>(data[3*sizeof (ulong)]); - } - XFree(data); - } - } - - return corners; -} - -void XAtomHelper::setWindowBorderRadius(int winId, const UnityCorners &data) -{ - if (m_unityBorderRadiusAtom == None) - return; - - ulong corners[4] = {data.topLeft, data.topRight, data.bottomLeft, data.bottomRight}; - - XChangeProperty(QX11Info::display(), winId, m_unityBorderRadiusAtom, XA_CARDINAL, - 32, XCB_PROP_MODE_REPLACE, (const unsigned char *) &corners, sizeof (corners)/sizeof (corners[0])); -} - -void XAtomHelper::setWindowBorderRadius(int winId, int topLeft, int topRight, int bottomLeft, int bottomRight) -{ - if (m_unityBorderRadiusAtom == None) - return; - - ulong corners[4] = {(ulong)topLeft, (ulong)topRight, (ulong)bottomLeft, (ulong)bottomRight}; - - XChangeProperty(QX11Info::display(), winId, m_unityBorderRadiusAtom, XA_CARDINAL, - 32, XCB_PROP_MODE_REPLACE, (const unsigned char *) &corners, sizeof (corners)/sizeof (corners[0])); -} - -void XAtomHelper::setUKUIDecoraiontHint(int winId, bool set) -{ - if (m_ukuiDecorationAtion == None) - return; - - XChangeProperty(QX11Info::display(), winId, m_ukuiDecorationAtion, m_ukuiDecorationAtion, 32, XCB_PROP_MODE_REPLACE, (const unsigned char *) &set, 1); -} - -void XAtomHelper::setWindowMotifHint(int winId, const MotifWmHints &hints) -{ - if (m_unityBorderRadiusAtom == None) - return; - - XChangeProperty(QX11Info::display(), winId, m_motifWMHintsAtom, m_motifWMHintsAtom, - 32, XCB_PROP_MODE_REPLACE, (const unsigned char *)&hints, sizeof (MotifWmHints)/ sizeof (ulong)); -} - -MotifWmHints XAtomHelper::getWindowMotifHint(int winId) -{ - MotifWmHints hints; - - if (m_unityBorderRadiusAtom == None) - return hints; - - uchar *data; - Atom type; - int format; - ulong nitems; - ulong bytes_after; - - XGetWindowProperty(QX11Info::display(), winId, m_motifWMHintsAtom, - 0, sizeof (MotifWmHints)/sizeof (long), false, AnyPropertyType, &type, - &format, &nitems, &bytes_after, &data); - - if (type == None) { - return hints; - } else { - hints = *(MotifWmHints *)data; - XFree(data); - } - return hints; -} - -XAtomHelper::XAtomHelper(QObject *parent) : QObject(parent) -{ - if (!QX11Info::isPlatformX11()) - return; - - m_motifWMHintsAtom = XInternAtom(QX11Info::display(), "_MOTIF_WM_HINTS", true); - m_unityBorderRadiusAtom = XInternAtom(QX11Info::display(), "_UNITY_GTK_BORDER_RADIUS", false); - m_ukuiDecorationAtion = XInternAtom(QX11Info::display(), "_KWIN_UKUI_DECORAION", false); -} - -Atom XAtomHelper::registerUKUICsdNetWmSupportAtom() -{ - // fixme: - return None; -} - -void XAtomHelper::unregisterUKUICsdNetWmSupportAtom() -{ - // fixme: -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/xatom-helper.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/xatom-helper.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/widget/xatom-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/widget/xatom-helper.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,108 +0,0 @@ -/* - * KWin Style UKUI - * - * Copyright (C) 2020, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef XATOMHELPER_H -#define XATOMHELPER_H - -#include <QObject> - -struct UnityCorners { - ulong topLeft = 0; - ulong topRight = 0; - ulong bottomLeft = 0; - ulong bottomRight = 0; -}; - -typedef struct { - ulong flags = 0; - ulong functions = 0; - ulong decorations = 0; - long input_mode = 0; - ulong status = 0; -} MotifWmHints, MwmHints; - -#define MWM_HINTS_FUNCTIONS (1L << 0) -#define MWM_HINTS_DECORATIONS (1L << 1) -#define MWM_HINTS_INPUT_MODE (1L << 2) -#define MWM_HINTS_STATUS (1L << 3) - -#define MWM_FUNC_ALL (1L << 0) -#define MWM_FUNC_RESIZE (1L << 1) -#define MWM_FUNC_MOVE (1L << 2) -#define MWM_FUNC_MINIMIZE (1L << 3) -#define MWM_FUNC_MAXIMIZE (1L << 4) -#define MWM_FUNC_CLOSE (1L << 5) - -#define MWM_DECOR_ALL (1L << 0) -#define MWM_DECOR_BORDER (1L << 1) -#define MWM_DECOR_RESIZEH (1L << 2) -#define MWM_DECOR_TITLE (1L << 3) -#define MWM_DECOR_MENU (1L << 4) -#define MWM_DECOR_MINIMIZE (1L << 5) -#define MWM_DECOR_MAXIMIZE (1L << 6) - -#define MWM_INPUT_MODELESS 0 -#define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1 -#define MWM_INPUT_SYSTEM_MODAL 2 -#define MWM_INPUT_FULL_APPLICATION_MODAL 3 -#define MWM_INPUT_APPLICATION_MODAL MWM_INPUT_PRIMARY_APPLICATION_MODAL - -#define MWM_TEAROFF_WINDOW (1L<<0) - -namespace UKUI { -class Decoration; -} - -class XAtomHelper : public QObject -{ - friend class UKUI::Decoration; - Q_OBJECT -public: - static XAtomHelper *getInstance(); - - static bool isFrameLessWindow(int winId); - - bool isWindowDecorateBorderOnly(int winId); - bool isWindowMotifHintDecorateBorderOnly(const MotifWmHints &hint); - bool isUKUICsdSupported(); - bool isUKUIDecorationWindow(int winId); - - UnityCorners getWindowBorderRadius(int winId); - void setWindowBorderRadius(int winId, const UnityCorners &data); - void setWindowBorderRadius(int winId, int topLeft, int topRight, int bottomLeft, int bottomRight); - void setUKUIDecoraiontHint(int winId, bool set = true); - - void setWindowMotifHint(int winId, const MotifWmHints &hints); - MotifWmHints getWindowMotifHint(int winId); - -private: - explicit XAtomHelper(QObject *parent = nullptr); - - ulong registerUKUICsdNetWmSupportAtom(); - void unregisterUKUICsdNetWmSupportAtom(); - - ulong m_motifWMHintsAtom = 0l; - ulong m_unityBorderRadiusAtom = 0l; - ulong m_ukuiDecorationAtion = 0l; -}; - -#endif // XATOMHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/xatom-helper.cpp qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/xatom-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/xatom-helper.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/xatom-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,215 @@ +/* + * KWin Style UKUI + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yue Lan <lanyue@kylinos.cn> + * + */ + +#include "xatom-helper.h" + +#include <limits.h> + +#include <QX11Info> + +#include <X11/X.h> +#include <X11/Xlib.h> +#include <X11/Xatom.h> + +static XAtomHelper *global_instance = nullptr; + +XAtomHelper *XAtomHelper::getInstance() +{ + if (!global_instance) + global_instance = new XAtomHelper; + return global_instance; +} + +bool XAtomHelper::isFrameLessWindow(int winId) +{ + auto hints = getInstance()->getWindowMotifHint(winId); + if (hints.flags == MWM_HINTS_DECORATIONS && hints.functions == 1) { + return true; + } + return false; +} + +bool XAtomHelper::isWindowDecorateBorderOnly(int winId) +{ + return isWindowMotifHintDecorateBorderOnly(getInstance()->getWindowMotifHint(winId)); +} + +bool XAtomHelper::isWindowMotifHintDecorateBorderOnly(const MotifWmHints &hint) +{ + bool isDeco = false; + if (hint.flags & MWM_HINTS_DECORATIONS && hint.flags != MWM_HINTS_DECORATIONS) { + if (hint.decorations == MWM_DECOR_BORDER) + isDeco = true; + } + return isDeco; +} + +bool XAtomHelper::isUKUICsdSupported() +{ + // fixme: + return false; +} + +bool XAtomHelper::isUKUIDecorationWindow(int winId) +{ + if (m_ukuiDecorationAtion == None) + return false; + + Atom type; + int format; + ulong nitems; + ulong bytes_after; + uchar *data; + + bool isUKUIDecoration = false; + + XGetWindowProperty(QX11Info::display(), winId, m_ukuiDecorationAtion, + 0, LONG_MAX, false, + m_ukuiDecorationAtion, &type, + &format, &nitems, + &bytes_after, &data); + + if (type == m_ukuiDecorationAtion) { + if (nitems == 1) { + isUKUIDecoration = data[0]; + } + } + + return isUKUIDecoration; +} + +UnityCorners XAtomHelper::getWindowBorderRadius(int winId) +{ + UnityCorners corners; + + Atom type; + int format; + ulong nitems; + ulong bytes_after; + uchar *data; + + if (m_unityBorderRadiusAtom != None) { + XGetWindowProperty(QX11Info::display(), winId, m_unityBorderRadiusAtom, + 0, LONG_MAX, false, + XA_CARDINAL, &type, + &format, &nitems, + &bytes_after, &data); + + if (type == XA_CARDINAL) { + if (nitems == 4) { + corners.topLeft = static_cast<ulong>(data[0]); + corners.topRight = static_cast<ulong>(data[1*sizeof (ulong)]); + corners.bottomLeft = static_cast<ulong>(data[2*sizeof (ulong)]); + corners.bottomRight = static_cast<ulong>(data[3*sizeof (ulong)]); + } + XFree(data); + } + } + + return corners; +} + +void XAtomHelper::setWindowBorderRadius(int winId, const UnityCorners &data) +{ + if (m_unityBorderRadiusAtom == None) + return; + + ulong corners[4] = {data.topLeft, data.topRight, data.bottomLeft, data.bottomRight}; + + XChangeProperty(QX11Info::display(), winId, m_unityBorderRadiusAtom, XA_CARDINAL, + 32, XCB_PROP_MODE_REPLACE, (const unsigned char *) &corners, sizeof (corners)/sizeof (corners[0])); +} + +void XAtomHelper::setWindowBorderRadius(int winId, int topLeft, int topRight, int bottomLeft, int bottomRight) +{ + if (m_unityBorderRadiusAtom == None) + return; + + ulong corners[4] = {(ulong)topLeft, (ulong)topRight, (ulong)bottomLeft, (ulong)bottomRight}; + + XChangeProperty(QX11Info::display(), winId, m_unityBorderRadiusAtom, XA_CARDINAL, + 32, XCB_PROP_MODE_REPLACE, (const unsigned char *) &corners, sizeof (corners)/sizeof (corners[0])); +} + +void XAtomHelper::setUKUIDecoraiontHint(int winId, bool set) +{ + if (m_ukuiDecorationAtion == None) + return; + + XChangeProperty(QX11Info::display(), winId, m_ukuiDecorationAtion, m_ukuiDecorationAtion, 32, XCB_PROP_MODE_REPLACE, (const unsigned char *) &set, 1); +} + +void XAtomHelper::setWindowMotifHint(int winId, const MotifWmHints &hints) +{ + if (m_unityBorderRadiusAtom == None) + return; + + XChangeProperty(QX11Info::display(), winId, m_motifWMHintsAtom, m_motifWMHintsAtom, + 32, XCB_PROP_MODE_REPLACE, (const unsigned char *)&hints, sizeof (MotifWmHints)/ sizeof (ulong)); +} + +MotifWmHints XAtomHelper::getWindowMotifHint(int winId) +{ + MotifWmHints hints; + + if (m_unityBorderRadiusAtom == None) + return hints; + + uchar *data; + Atom type; + int format; + ulong nitems; + ulong bytes_after; + + XGetWindowProperty(QX11Info::display(), winId, m_motifWMHintsAtom, + 0, sizeof (MotifWmHints)/sizeof (long), false, AnyPropertyType, &type, + &format, &nitems, &bytes_after, &data); + + if (type == None) { + return hints; + } else { + hints = *(MotifWmHints *)data; + XFree(data); + } + return hints; +} + +XAtomHelper::XAtomHelper(QObject *parent) : QObject(parent) +{ + if (!QX11Info::isPlatformX11()) + return; + + m_motifWMHintsAtom = XInternAtom(QX11Info::display(), "_MOTIF_WM_HINTS", true); + m_unityBorderRadiusAtom = XInternAtom(QX11Info::display(), "_UNITY_GTK_BORDER_RADIUS", false); + m_ukuiDecorationAtion = XInternAtom(QX11Info::display(), "_KWIN_UKUI_DECORAION", false); +} + +Atom XAtomHelper::registerUKUICsdNetWmSupportAtom() +{ + // fixme: + return None; +} + +void XAtomHelper::unregisterUKUICsdNetWmSupportAtom() +{ + // fixme: +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/xatom-helper.h qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/xatom-helper.h --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui-platformtheme/xatom-helper.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui-platformtheme/xatom-helper.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,108 @@ +/* + * KWin Style UKUI + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yue Lan <lanyue@kylinos.cn> + * + */ + +#ifndef XATOMHELPER_H +#define XATOMHELPER_H + +#include <QObject> + +struct UnityCorners { + ulong topLeft = 0; + ulong topRight = 0; + ulong bottomLeft = 0; + ulong bottomRight = 0; +}; + +typedef struct { + ulong flags = 0; + ulong functions = 0; + ulong decorations = 0; + long input_mode = 0; + ulong status = 0; +} MotifWmHints, MwmHints; + +#define MWM_HINTS_FUNCTIONS (1L << 0) +#define MWM_HINTS_DECORATIONS (1L << 1) +#define MWM_HINTS_INPUT_MODE (1L << 2) +#define MWM_HINTS_STATUS (1L << 3) + +#define MWM_FUNC_ALL (1L << 0) +#define MWM_FUNC_RESIZE (1L << 1) +#define MWM_FUNC_MOVE (1L << 2) +#define MWM_FUNC_MINIMIZE (1L << 3) +#define MWM_FUNC_MAXIMIZE (1L << 4) +#define MWM_FUNC_CLOSE (1L << 5) + +#define MWM_DECOR_ALL (1L << 0) +#define MWM_DECOR_BORDER (1L << 1) +#define MWM_DECOR_RESIZEH (1L << 2) +#define MWM_DECOR_TITLE (1L << 3) +#define MWM_DECOR_MENU (1L << 4) +#define MWM_DECOR_MINIMIZE (1L << 5) +#define MWM_DECOR_MAXIMIZE (1L << 6) + +#define MWM_INPUT_MODELESS 0 +#define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1 +#define MWM_INPUT_SYSTEM_MODAL 2 +#define MWM_INPUT_FULL_APPLICATION_MODAL 3 +#define MWM_INPUT_APPLICATION_MODAL MWM_INPUT_PRIMARY_APPLICATION_MODAL + +#define MWM_TEAROFF_WINDOW (1L<<0) + +namespace UKUI { +class Decoration; +} + +class XAtomHelper : public QObject +{ + friend class UKUI::Decoration; + Q_OBJECT +public: + static XAtomHelper *getInstance(); + + static bool isFrameLessWindow(int winId); + + bool isWindowDecorateBorderOnly(int winId); + bool isWindowMotifHintDecorateBorderOnly(const MotifWmHints &hint); + bool isUKUICsdSupported(); + bool isUKUIDecorationWindow(int winId); + + UnityCorners getWindowBorderRadius(int winId); + void setWindowBorderRadius(int winId, const UnityCorners &data); + void setWindowBorderRadius(int winId, int topLeft, int topRight, int bottomLeft, int bottomRight); + void setUKUIDecoraiontHint(int winId, bool set = true); + + void setWindowMotifHint(int winId, const MotifWmHints &hints); + MotifWmHints getWindowMotifHint(int winId); + +private: + explicit XAtomHelper(QObject *parent = nullptr); + + ulong registerUKUICsdNetWmSupportAtom(); + void unregisterUKUICsdNetWmSupportAtom(); + + ulong m_motifWMHintsAtom = 0l; + ulong m_unityBorderRadiusAtom = 0l; + ulong m_ukuiDecorationAtion = 0l; +}; + +#endif // XATOMHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/qt5-ukui.pro qt5-ukui-platformtheme-4.10.0.1/qt5-ukui.pro --- qt5-ukui-platformtheme-4.1.0.0/qt5-ukui.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/qt5-ukui.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,9 +0,0 @@ -TEMPLATE = subdirs - -SUBDIRS += \ - ukui-qqc2-style \ - ukui-qml-style-helper \ - qt5-ukui-platformtheme \ - ukui-styles \ - libqt5-ukui-style \ - test diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/test/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/test/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,9 @@ +project(test) +add_subdirectory(custom-shadow) +add_subdirectory(filedialog) +add_subdirectory(highlighted-icon-button) +add_subdirectory(messagebox) +add_subdirectory(region-blur) +add_subdirectory(system-settings) +add_subdirectory(tabwidget) +add_subdirectory(mps-style-application) diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/custom-shadow/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/test/custom-shadow/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/test/custom-shadow/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/custom-shadow/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.16) + +project(custom-shadow) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(QT_MIN_VERSION "5.12.0") + +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + Core + Widgets + Gui +) + +file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") + +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) + +add_executable(${PROJECT_NAME} ${sources}) + +target_link_libraries(${PROJECT_NAME} PRIVATE + Qt5::Widgets + Qt5::Core + Qt5::Gui +) + diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/custom-shadow/custom-shadow.pro qt5-ukui-platformtheme-4.10.0.1/test/custom-shadow/custom-shadow.pro --- qt5-ukui-platformtheme-4.1.0.0/test/custom-shadow/custom-shadow.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/custom-shadow/custom-shadow.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,28 +0,0 @@ -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - -CONFIG += c++11 - -# The following define makes your compiler emit warnings if you use -# any Qt feature that has been marked deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if it uses deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -SOURCES += \ - main.cpp \ - mainwindow.cpp - -HEADERS += \ - mainwindow.h - -# Default rules for deployment. -#qnx: target.path = /tmp/$${TARGET}/bin -#else: unix:!android: target.path = /opt/$${TARGET}/bin -#!isEmpty(target.path): INSTALLS += target diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/custom-shadow/main.cpp qt5-ukui-platformtheme-4.10.0.1/test/custom-shadow/main.cpp --- qt5-ukui-platformtheme-4.1.0.0/test/custom-shadow/main.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/custom-shadow/main.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/custom-shadow/mainwindow.cpp qt5-ukui-platformtheme-4.10.0.1/test/custom-shadow/mainwindow.cpp --- qt5-ukui-platformtheme-4.1.0.0/test/custom-shadow/mainwindow.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/custom-shadow/mainwindow.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/custom-shadow/mainwindow.h qt5-ukui-platformtheme-4.10.0.1/test/custom-shadow/mainwindow.h --- qt5-ukui-platformtheme-4.1.0.0/test/custom-shadow/mainwindow.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/custom-shadow/mainwindow.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/filedialog/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/test/filedialog/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/test/filedialog/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/filedialog/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.16) + +project(filedialog) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(QT_MIN_VERSION "5.12.0") + +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + Core + Widgets + Gui +) + +file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") + +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) + +add_executable(${PROJECT_NAME} ${sources}) + +target_link_libraries(${PROJECT_NAME} PRIVATE + Qt5::Widgets + Qt5::Core + Qt5::Gui +) + diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/filedialog/filedialog.pro qt5-ukui-platformtheme-4.10.0.1/test/filedialog/filedialog.pro --- qt5-ukui-platformtheme-4.1.0.0/test/filedialog/filedialog.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/filedialog/filedialog.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,31 +0,0 @@ -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - -CONFIG += c++11 - -# The following define makes your compiler emit warnings if you use -# any Qt feature that has been marked deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if it uses deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -SOURCES += \ - main.cpp \ - mainwindow.cpp - -HEADERS += \ - mainwindow.h - -FORMS += \ - mainwindow.ui - -# Default rules for deployment. -qnx: target.path = /tmp/$${TARGET}/bin -else: unix:!android: target.path = /opt/$${TARGET}/bin -!isEmpty(target.path): INSTALLS += target diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/filedialog/main.cpp qt5-ukui-platformtheme-4.10.0.1/test/filedialog/main.cpp --- qt5-ukui-platformtheme-4.1.0.0/test/filedialog/main.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/filedialog/main.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,3 +1,25 @@ +/* + * Qt5-UKUI + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Jing Tan <tanjing@kylinos.cn> + * + */ + #include "mainwindow.h" #include <QApplication> diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/filedialog/mainwindow.cpp qt5-ukui-platformtheme-4.10.0.1/test/filedialog/mainwindow.cpp --- qt5-ukui-platformtheme-4.1.0.0/test/filedialog/mainwindow.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/filedialog/mainwindow.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,3 +1,25 @@ +/* + * Qt5-UKUI + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Jing Tan <tanjing@kylinos.cn> + * + */ + #include "mainwindow.h" #include "ui_mainwindow.h" diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/filedialog/mainwindow.h qt5-ukui-platformtheme-4.10.0.1/test/filedialog/mainwindow.h --- qt5-ukui-platformtheme-4.1.0.0/test/filedialog/mainwindow.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/filedialog/mainwindow.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,3 +1,25 @@ +/* + * Qt5-UKUI + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Jing Tan <tanjing@kylinos.cn> + * + */ + #ifndef MAINWINDOW_H #define MAINWINDOW_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/highlighted-icon-button/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/test/highlighted-icon-button/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/test/highlighted-icon-button/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/highlighted-icon-button/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.16) + +project(highlighted-icon-button) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(QT_MIN_VERSION "5.12.0") + +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + Core + Widgets + Gui +) + +file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") + +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) + +add_executable(${PROJECT_NAME} ${sources}) + +target_link_libraries(${PROJECT_NAME} PRIVATE + Qt5::Widgets + Qt5::Core + Qt5::Gui +) + diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/highlighted-icon-button/highlighted-icon-button.pro qt5-ukui-platformtheme-4.10.0.1/test/highlighted-icon-button/highlighted-icon-button.pro --- qt5-ukui-platformtheme-4.1.0.0/test/highlighted-icon-button/highlighted-icon-button.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/highlighted-icon-button/highlighted-icon-button.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,31 +0,0 @@ -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - -CONFIG += c++11 - -# The following define makes your compiler emit warnings if you use -# any Qt feature that has been marked deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if it uses deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -SOURCES += \ - main.cpp \ - mainwindow.cpp - -HEADERS += \ - mainwindow.h - -FORMS += \ - mainwindow.ui - -# Default rules for deployment. -#qnx: target.path = /tmp/$${TARGET}/bin -#else: unix:!android: target.path = /opt/$${TARGET}/bin -#!isEmpty(target.path): INSTALLS += target diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/highlighted-icon-button/main.cpp qt5-ukui-platformtheme-4.10.0.1/test/highlighted-icon-button/main.cpp --- qt5-ukui-platformtheme-4.1.0.0/test/highlighted-icon-button/main.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/highlighted-icon-button/main.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/highlighted-icon-button/mainwindow.cpp qt5-ukui-platformtheme-4.10.0.1/test/highlighted-icon-button/mainwindow.cpp --- qt5-ukui-platformtheme-4.1.0.0/test/highlighted-icon-button/mainwindow.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/highlighted-icon-button/mainwindow.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/highlighted-icon-button/mainwindow.h qt5-ukui-platformtheme-4.10.0.1/test/highlighted-icon-button/mainwindow.h --- qt5-ukui-platformtheme-4.1.0.0/test/highlighted-icon-button/mainwindow.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/highlighted-icon-button/mainwindow.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/messagebox/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/test/messagebox/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/test/messagebox/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/messagebox/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.16) + +project(messagebox) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(QT_MIN_VERSION "5.12.0") + +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + Core + Widgets + Gui +) + +file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") + +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) + +add_executable(${PROJECT_NAME} ${sources}) + +target_link_libraries(${PROJECT_NAME} PRIVATE + Qt5::Widgets + Qt5::Core + Qt5::Gui +) + diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/messagebox/main.cpp qt5-ukui-platformtheme-4.10.0.1/test/messagebox/main.cpp --- qt5-ukui-platformtheme-4.1.0.0/test/messagebox/main.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/messagebox/main.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,3 +1,25 @@ +/* + * Qt5-UKUI + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: xibowen <xibowen@kylinos.cn> + * + */ + #include <QApplication> #include <QCheckBox> #include <QMessageBox> diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/messagebox/messagebox.pro qt5-ukui-platformtheme-4.10.0.1/test/messagebox/messagebox.pro --- qt5-ukui-platformtheme-4.1.0.0/test/messagebox/messagebox.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/messagebox/messagebox.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,19 +0,0 @@ -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - -CONFIG += c++11 - -# You can make your code fail to compile if it uses deprecated APIs. -# In order to do so, uncomment the following line. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -SOURCES += \ - main.cpp - -HEADERS += - -# Default rules for deployment. -qnx: target.path = /tmp/$${TARGET}/bin -else: unix:!android: target.path = /opt/$${TARGET}/bin -!isEmpty(target.path): INSTALLS += target diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/mps-style-application/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/test/mps-style-application/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/test/mps-style-application/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/mps-style-application/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.16) + +project(mps-style-application) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(QT_MIN_VERSION "5.12.0") + +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + Core + Widgets + Gui +) + +find_package(PkgConfig) +pkg_check_modules(Qsettings REQUIRED gsettings-qt) +pkg_check_modules(KYSDKCONF2 REQUIRED kysdk-conf2) + +include_directories(${Qsettings_INCLUDE_DIRS}) +include_directories(../../libqt5-ukui-style/internal-styles) +if (KYSDKCONF2_FOUND) + include_directories(${KYSDKCONF2_INCLUDE_DIRS}) + link_directories(${KYSDKCONF2_LIBRARY_DIRS}) +endif() + +file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") + +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) + +add_executable(${PROJECT_NAME} ${sources}) + +target_link_libraries(${PROJECT_NAME} PRIVATE + Qt5::Widgets + Qt5::Core + Qt5::Gui + gsettings-qt + qt5-ukui-style + ${KYSDKCONF2_LIBRARIES} +) + diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/mps-style-application/main.cpp qt5-ukui-platformtheme-4.10.0.1/test/mps-style-application/main.cpp --- qt5-ukui-platformtheme-4.1.0.0/test/mps-style-application/main.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/mps-style-application/main.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ #include "mainwindow.h" #include <QApplication> -#include "internal-styles/mps-style.h" +#include "mps-style.h" int main(int argc, char *argv[]) { diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/mps-style-application/mainwindow.cpp qt5-ukui-platformtheme-4.10.0.1/test/mps-style-application/mainwindow.cpp --- qt5-ukui-platformtheme-4.1.0.0/test/mps-style-application/mainwindow.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/mps-style-application/mainwindow.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/mps-style-application/mainwindow.h qt5-ukui-platformtheme-4.10.0.1/test/mps-style-application/mainwindow.h --- qt5-ukui-platformtheme-4.1.0.0/test/mps-style-application/mainwindow.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/mps-style-application/mainwindow.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/mps-style-application/mps-style-application.pro qt5-ukui-platformtheme-4.10.0.1/test/mps-style-application/mps-style-application.pro --- qt5-ukui-platformtheme-4.1.0.0/test/mps-style-application/mps-style-application.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/mps-style-application/mps-style-application.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,43 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2020-02-11T15:20:45 -# -#------------------------------------------------- - -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - -TARGET = mps-style-application -TEMPLATE = app - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which has been marked as deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -CONFIG += plugin c++11 link_pkgconfig -PKGCONFIG += gsettings-qt - -include(../../libqt5-ukui-style/libqt5-ukui-style.pri) - -SOURCES += \ - main.cpp \ - mainwindow.cpp - -HEADERS += \ - mainwindow.h - -FORMS += \ - mainwindow.ui - -# Default rules for deployment. -#qnx: target.path = /tmp/$${TARGET}/bin -#else: unix:!android: target.path = /opt/$${TARGET}/bin -#!isEmpty(target.path): INSTALLS += target diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/region-blur/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/test/region-blur/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/test/region-blur/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/region-blur/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.16) + +project(region-blur) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(QT_MIN_VERSION "5.12.0") + +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + Core + Widgets + Gui +) + +file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") + +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) + +add_executable(${PROJECT_NAME} ${sources}) + +target_link_libraries(${PROJECT_NAME} PRIVATE + Qt5::Widgets + Qt5::Core + Qt5::Gui +) + diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/region-blur/main.cpp qt5-ukui-platformtheme-4.10.0.1/test/region-blur/main.cpp --- qt5-ukui-platformtheme-4.1.0.0/test/region-blur/main.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/region-blur/main.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/region-blur/mainwindow.cpp qt5-ukui-platformtheme-4.10.0.1/test/region-blur/mainwindow.cpp --- qt5-ukui-platformtheme-4.1.0.0/test/region-blur/mainwindow.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/region-blur/mainwindow.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/region-blur/mainwindow.h qt5-ukui-platformtheme-4.10.0.1/test/region-blur/mainwindow.h --- qt5-ukui-platformtheme-4.1.0.0/test/region-blur/mainwindow.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/region-blur/mainwindow.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/region-blur/region-blur.pro qt5-ukui-platformtheme-4.10.0.1/test/region-blur/region-blur.pro --- qt5-ukui-platformtheme-4.1.0.0/test/region-blur/region-blur.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/region-blur/region-blur.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,37 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2020-01-03T10:58:54 -# -#------------------------------------------------- - -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - -TARGET = region-blur -TEMPLATE = app - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which has been marked as deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -CONFIG += c++11 - -SOURCES += \ - main.cpp \ - mainwindow.cpp - -HEADERS += \ - mainwindow.h - -# Default rules for deployment. -#qnx: target.path = /tmp/$${TARGET}/bin -#else: unix:!android: target.path = /opt/$${TARGET}/bin -#!isEmpty(target.path): INSTALLS += target diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/system-settings/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/test/system-settings/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/test/system-settings/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/system-settings/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.16) + +project(system-settings) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(QT_MIN_VERSION "5.12.0") + +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + Core + Widgets + Gui +) + +find_package(PkgConfig) +pkg_check_modules(Qsettings REQUIRED gsettings-qt) +include_directories(${Qsettings_INCLUDE_DIRS}) + +file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") + +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) + +add_executable(${PROJECT_NAME} ${sources}) + +target_link_libraries(${PROJECT_NAME} PRIVATE + Qt5::Widgets + Qt5::Core + Qt5::Gui + gsettings-qt +) + diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/system-settings/main.cpp qt5-ukui-platformtheme-4.10.0.1/test/system-settings/main.cpp --- qt5-ukui-platformtheme-4.1.0.0/test/system-settings/main.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/system-settings/main.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/system-settings/mainwindow.cpp qt5-ukui-platformtheme-4.10.0.1/test/system-settings/mainwindow.cpp --- qt5-ukui-platformtheme-4.1.0.0/test/system-settings/mainwindow.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/system-settings/mainwindow.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/system-settings/mainwindow.h qt5-ukui-platformtheme-4.10.0.1/test/system-settings/mainwindow.h --- qt5-ukui-platformtheme-4.1.0.0/test/system-settings/mainwindow.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/system-settings/mainwindow.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/system-settings/system-settings.pro qt5-ukui-platformtheme-4.10.0.1/test/system-settings/system-settings.pro --- qt5-ukui-platformtheme-4.1.0.0/test/system-settings/system-settings.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/system-settings/system-settings.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,41 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2020-01-03T20:37:30 -# -#------------------------------------------------- - -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - -TARGET = system-settings -TEMPLATE = app - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which has been marked as deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -CONFIG += c++11 link_pkgconfig -PKGCONFIG += gsettings-qt - -SOURCES += \ - main.cpp \ - mainwindow.cpp - -HEADERS += \ - mainwindow.h - -FORMS += \ - mainwindow.ui - -# Default rules for deployment. -#qnx: target.path = /tmp/$${TARGET}/bin -#else: unix:!android: target.path = /opt/$${TARGET}/bin -#!isEmpty(target.path): INSTALLS += target diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/tabwidget/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/test/tabwidget/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/test/tabwidget/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/tabwidget/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.16) + +project(tabwidget) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(QT_MIN_VERSION "5.12.0") + +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + Core + Widgets + Gui +) + +file(GLOB_RECURSE sources "*.h" "*.hpp" "*.cpp" "*.c" "*.ui") + +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources}) + +add_executable(${PROJECT_NAME} ${sources}) + +target_link_libraries(${PROJECT_NAME} PRIVATE + Qt5::Widgets + Qt5::Core + Qt5::Gui +) + diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/tabwidget/main.cpp qt5-ukui-platformtheme-4.10.0.1/test/tabwidget/main.cpp --- qt5-ukui-platformtheme-4.1.0.0/test/tabwidget/main.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/tabwidget/main.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/tabwidget/tabwidget.pro qt5-ukui-platformtheme-4.10.0.1/test/tabwidget/tabwidget.pro --- qt5-ukui-platformtheme-4.1.0.0/test/tabwidget/tabwidget.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/tabwidget/tabwidget.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,37 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2020-01-09T11:25:46 -# -#------------------------------------------------- - -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - -TARGET = tabwidget -TEMPLATE = app - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which has been marked as deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -CONFIG += c++11 - -SOURCES += \ - main.cpp \ - widget.cpp - -HEADERS += \ - widget.h - -# Default rules for deployment. -#qnx: target.path = /tmp/$${TARGET}/bin -#else: unix:!android: target.path = /opt/$${TARGET}/bin -#!isEmpty(target.path): INSTALLS += target diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/tabwidget/widget.cpp qt5-ukui-platformtheme-4.10.0.1/test/tabwidget/widget.cpp --- qt5-ukui-platformtheme-4.1.0.0/test/tabwidget/widget.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/tabwidget/widget.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/tabwidget/widget.h qt5-ukui-platformtheme-4.10.0.1/test/tabwidget/widget.h --- qt5-ukui-platformtheme-4.1.0.0/test/tabwidget/widget.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/tabwidget/widget.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -Nru qt5-ukui-platformtheme-4.1.0.0/test/test.pro qt5-ukui-platformtheme-4.10.0.1/test/test.pro --- qt5-ukui-platformtheme-4.1.0.0/test/test.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/test/test.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,11 +0,0 @@ -TEMPLATE = subdirs - -SUBDIRS += \ - custom-shadow \ - filedialog \ - highlighted-icon-button \ - messagebox \ - region-blur \ - system-settings \ - tabwidget \ - mps-style-application diff -Nru qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_bo_CN.ts qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_bo_CN.ts --- qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_bo_CN.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_bo_CN.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="bo_CN"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>ཁ་རྒྱག་པ།</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>ལག་བསྟར་བྱེད་ཆོག་པའི་'%1'ལ་Qt %2,Qt%3རྙེད་པ་རེད།</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation>ཕན་ཚུན་མཐུན་ཐབས་མེད་པའི་Qt དཔེ་མཛོད་ཁང་གི་ནོར་འཁྲུལ།</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>འགྲིགས།</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation>ཞིབ་ཕྲའི་གནས་ཚུལ་གསལ་བཤད་བྱ་དགོས།</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation>གནས་ཚུལ་ཞིབ་ཕྲ་སྦས་སྐུང་བྱེད་</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation>ཡིག་ཆའི་མིང་།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation>བཟོ་བཅོས་བརྒྱབ་པའི་དུས་ཚོད།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation>ཡིག་ཆའི་རིགས་གྲས།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation>ཡིག་ཆའི་ཆེ་ཆུང་།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation>ཐོག་མའི་འགྲོ་ལམ།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation>མར་འབབ་པ།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation>རིམ་པ་ཇེ་མང་དུ་འགྲོ་བཞིན།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation>ཁྱོན་ཡོངས་ཀྱི་གོ་རིམ་བེད་སྤྱོད།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation>མཐོང་རིས་རེའུ་མིག</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation>མཚོན་རྟགས་ལྟ་ཚུལ།</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation>ཁ་རྒྱག་པ།</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>ཁ་ཆད་བཞག་པའི་སྒྲོན་བརྙན</translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>སྒྲོན་བརྙན་གྱི་འགུལ་རིས་ལ་བརྟེན་ནས་ཤོག་བྱང་ཆུང་ཆུང་བརྗེ་རེས་བྱེད་དུ་འཇུག་དགོས།</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation>ཁ་ཕྱེ་བའི་ཡིག་ཆ།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation>ཡིག་ཆ་ཉར་ཚགས་བྱེད་པ།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation>ཡིག་ཆ་ཡོད་ཚད་(*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>ཕྱིར་ལོག</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>མདུན་སྐྱོད།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>གོང་ཕྱོགས།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>འཚོལ་ཞིབ།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>མཐོང་རིས་ཀྱི་རིགས།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>གོ་རིམ་གྱི་རིགས།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>ཆེས་ཆེ་བསྒྱུར།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>ཁ་རྒྱག་པ།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>སླར་གསོ་བྱེད་པ།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>ཡིག་ཆའི་མིང་།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>སྒོ་ཕྱེ་བ།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>ཕྱིར་འཐེན།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>ཉར་ཚགས་གཞན།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>ཡིག་ཁུག་གསར་འཛུགས།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>གྲོན་ཆུང་བྱེད་དགོས།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>དཀར་ཆག</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>ཐ་ཚིག་སྒྲོག་པ།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>གནས་ཡོད་པས། ཁྱོད་ཀྱིས་དངོས་གནས་ཚབ་བྱེད་ཐུབ་བམ།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation>དཀར་ཆག་གསར་བ།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation>ཁ་ཕྱིར་འཐེན་བྱ་དགོས།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation>ཡང་བསྐྱར་ལས།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation>ཉེན་བརྡ་བཏང་བ།</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation>བཀོལ་སྤྱོད་འདི་ལ་རྒྱབ་སྐྱོར་མི་བྱེད།</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_cs.ts qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_cs.ts --- qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_cs.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_cs.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="cs_CZ"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_de.ts qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_de.ts --- qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_de.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_de.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="de"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>Schließen</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>Die ausführbare Datei '%1' erfordert Qt %2, Qt %3 gefunden.</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation>Fehler in der inkompatiblen Qt-Bibliothek</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>OKAY</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation>Details anzeigen...</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation>Details ausblenden...</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation>Dateiname</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation>Änderungsdatum</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation>Dateityp</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation>Dateigröße</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation>Ursprünglicher Pfad</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation>Absteigend</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation>Aufsteigend</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation>Globale Sortierung verwenden</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation>Listenansicht</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation>Icon-Ansicht</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation>Schließen</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>Standard-Folie</translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>Lassen Sie das Tab-Widget mit einer Folienanimation wechseln.</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation>Offene Linie</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation>Datei speichern</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation>Alle Dateien (*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>Zurück</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>Vorwärts gehen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>Cd nach oben</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>Suchen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>Typ der Ansicht</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>Art der Sortierung</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>Maximieren</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>Schließen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>Wiederherstellen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>Name</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>Offen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>Abbrechen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>Speichern unter</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>Neuer Ordner</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>Retten</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>Verzeichnisse</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>Warnung</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>existieren, sind Sie sicher, ersetzen?</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation>Neuer Ordner</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation>Aufmachen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation>Noch einmal machen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation>warnen</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation>Dieser Vorgang wird nicht unterstützt.</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_en_US.ts qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_en_US.ts --- qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_en_US.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_en_US.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="en_US"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>Close</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>Executable '%1' requires Qt %2, found Qt %3.</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation>Incompatible Qt Library Error</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>OK</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation>Show Details...</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation>Hide Details...</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation>File Name</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation>Modified Date</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation>File Type</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation>File Size</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation>Original Path</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation>Descending</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation>Ascending</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation>Use global sorting</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation>List View</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation>Icon View</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation>Close</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation>Open File</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation>Save File</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation>All Files (*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>Go Back</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>Go Forward</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>Cd Up</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>Search</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>View Type</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>Sort Type</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>Maximize</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>Close</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>Restore</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>Name</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>Open</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>Cancel</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>Save as</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>New Folder</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>Save</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>Directories</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>Warning</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>exist, are you sure replace?</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation>NewFolder</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation>Undo</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation>Redo</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation>warn</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation>This operation is not supported.</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_es.ts qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_es.ts --- qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_es.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_es.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="es"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_fa.ts qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_fa.ts --- qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_fa.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_fa.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="fa_IR"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_fr.ts qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_fr.ts --- qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_fr.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_fr.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="fr_FR"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>Fermer</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>L’exécutable '%1' nécessite Qt %2, trouvé Qt %3.</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation>Erreur de bibliothèque Qt incompatible</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>D’ACCORD</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation>Afficher les détails...</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation>Masquer les détails...</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation>Nom du fichier</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation>Date de modification</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation>Type de fichier</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation>Taille du fichier</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation>Chemin d’accès d’origine</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation>Descendant</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation>Ascendant</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation>Utiliser le tri global</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation>Affichage en liste</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation>Affichage de l’icône</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation type="unfinished">Fermer</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>Diapositive par défaut</translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>Laissez le widget d’onglet basculer avec une animation de diapositive.</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation>Ouvrir un fichier</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation>Enregistrer le fichier</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation>Tous les fichiers (*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>Retour</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>Avancer</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>Cd Up</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>Rechercher</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>Type de vue</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>Type de tri</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>Maximiser</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>Fermer</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>Restaurer</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>Nom</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>Ouvrir</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>Annuler</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>Enregistrer sous</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>Nouveau dossier</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>Sauvegarder</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>Téléphonique</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>Avertissement</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>exister, êtes-vous sûr de remplacer ?</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation>NouveauDossier</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation>Défaire</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation>Refaire</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation>avertir</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation>Cette opération n’est pas prise en charge.</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_kk.ts qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_kk.ts --- qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_kk.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_kk.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="kk"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation>نەگٸزگٸ كوز بەك</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation>سېناقنى ٸشٸۋ</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation>باس مازمۇن</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation>تالدانعان uri</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation>سىناقتى كورسەتۋ</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation>اتقار ورىنداۋدى ولشەۋ</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation>سىناقتى ساقتاۋ</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation>تىنىش كۇيدە اشۋدٸ سىناۋ</translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation>تالداۋ كىنوپكاسى</translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation>اۆتوماتتى جارقىن كورسەتۋ سىن بەلگىسىن ٸستەتڭٸز</translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation>...</translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation>تەك جوعارعى جارقتا كورسەتىلدى.</translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation>كوڭىلدەگى ۋا ەرەكشە كورسەتۋ</translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation>تاق تالداۋ كىنوپكاسى</translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation>سلوب</translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation>ئايكون</translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation>تاماق تىزىمدىگنىڭ تۇنىقتىق دارەجەسى جوق</translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation>ٴارىپ نۇسقاسى</translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>تاقاۋ</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>اتقار ىستەۋگە بولاتٸن حۇجات 1، مۇقتاجدىق ارگومەنتتٸ 2، ٸزدەپ تاپقان ارگومەنتتٸ 3</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation>سىغىشمىغانQT قامبادا قاتەلىك كورىلدى</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>ماقۇل</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation>ناقتى مازمۇنىن كورسەتۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation>ناقتى مازمۇنىن جاسىرۋ</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation>حۇجات مى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation>وزگەرتىلگەن ۋاقىتى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation>حۇجات تۇرى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation>حۇجات ۇلكەندىگى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation>وڭ جول</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation>چوڭدىن كىچىككە قاراتىپ تىزۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation>كىشىدەن ۇلكەنگە قاراتىپ تىزۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation>ئومومىيلىق مەنەن تىزۋدى ٸستەتۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation>تٸزٸمدٸك كورىنۋى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation>پىشىن كورىنۋى</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation>تاقاۋ</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>الدىن بەكٸتٸلگەن slide</translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>تالدانبا كارتونىن كشكەنە زاپشاستارىن پٸروبيكسيا كارتون فىلىمىگە سايكەستىرۋ</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation>حۇجاتتى ٸشٸۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation>حۇجاتتى ساقتاۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation>بارلٸق حۇجاتتار (*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>قايتۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>ىلگەرلەۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>Cd نىڭ ٷستٸن</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>ٸزدەۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>كورىنۋ تيپى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>رەتتەلگەن تيپ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>ۇلكەيتۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>تاقاۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>قالپىنا كەلتىرىلگەن</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>ەسىمى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>ٸشٸۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>كۇشىنەن قالدىرۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>تەجەۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>جاڭا حۇجات قىسقىش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>ساقتاۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>مازمۇندار</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>ەسكەرتۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>ساقتالعان، الماستٸرۋدٸ تۇراقتاستىراسىزبا؟</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation>جاڭا قاتتاعىش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation>ٸشٸۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation>قاتە-قاتە سىناۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation>ەسكەرتۋ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation>نۇ جوبالاۋدى قولدامايدى.</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_ky.ts qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_ky.ts --- qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_ky.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_ky.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ky"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation>نەگىزگى كۅزۅنۅك</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation>سېناقنى اچۇۇ</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation>تىزىمدىك</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation>تاندالعان uri</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation>سىناقتى كۅرسۅتۉۉ</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation>اتقارماق قىلۇۇچۇنۇ ۅلچۅ</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation>سىناقتى ساقتوو</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation>تىنچ ، تىم تىرس ابالدا اچۇۇنۇ سىنوو</translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation>تانداش كونۇپكاسى</translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation>اپتوماتتىك يارقىن كۅرسۅتۉۉ سىن بەلگىسىن ىشتەتىڭ</translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation>...</translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation>جالاڭ عانا جوعورۇ يورۇقلۇقتا كۅرسۅتۉلۅت .</translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation>ويۇنداقى جانا ورقويۇپ چىعۇۇ كۅرسۅتۉۉ</translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation>تاق تانداش كونۇپكاسى</translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation>ۇسلۇپ</translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation>ايكون</translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation>تاماق ، اش تىزىمدىگىنىن تۇنۇقتۇق داراجاسى جوق</translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation>قات ۉلگۉسۉ</translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>بەكىتىش</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>اتقارماق جاسووعو بولوتۇرعان ۅجۅت 1، كەرەكتۉۉ سان 2، ىزدەپ تاپقان سان 3</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation>سىغىشمىغانQT قامپادا قاتاالىق كۅرۉلدۉ</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>ماقۇل</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation>جۅن جايىن كۅرسۅتۉۉ</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation>جۅن جايىن جاشىرۇۇ</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation>ۅجۅت ناامى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation>ۅزگۅرتۉلگۅن ۇباقتى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation>ۅجۅت تۉرۉ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation>ۅجۅت چوڭدۇعۇ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation>العاچى جول</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation>چوڭدىن كىچىككە قاراتىپ تىزۉۉ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation>كىچىكتەن چوڭعو قاراتىپ تىزۉۉ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation>ئومومىيلىق مەنەن تىزۉۉنۉ ىشتەتىش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation>تىزىمدىك گۅرۉنۉشۉ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation>تۉر گۅرۉنۉشۉ</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation>بەكىتىش</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>الدىن بەكىتىلگەن slide</translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>تاندالما كارتاداقى كىچىك شايمانداردى پرويەكسىيە كارتون فىلىمىگە الماشتىرۇۇ</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation>ۅجۅتۉن اچۇۇ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation>ۅجۅتۉن ساقتوو</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation>باردىق ۅجۅتتۅر (*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>قايتۇۇ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>ىلگەرلۅۅ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>Cd نىڭ ۉستۉ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>ىزدۅۅ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>كۅرۉنۉش تۉرۉ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>ىرەتتەلگەن تىپ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>چوڭويتۇش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>بەكىتىش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>العاچىنا كەلتىرۉۉ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>اتى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>اچۇۇ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>ارعادان قالتىرىش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>تەجۅۅ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>جاڭى ۅجۅت قىپچىعىچ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>ساقتوو</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>مازمۇۇندار</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>ەسكەرتۉۉ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>باربولۇۇسۇ ، الماشتىرۇۇنۇ تۇراقتاندىرا الاسىزبى؟</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation>جاڭى قاتتاعىچ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation>اچۇۇ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation>قايرا-قايرا سىنوو</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation>ەسكەرتۉۉ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation>بۇل ماشقۇلدانۇۇنۇ قولدوبويت.</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_mn.ts qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_mn.ts --- qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_mn.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_mn.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="mn_MN"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>ᠬᠠᠭᠠᠬᠤ</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>ᠭᠦᠢᠴᠡᠳᠬᠡᠵᠦ ᠪᠣᠯᠬᠤ ᠹᠠᠢᠯ '%1' Qt% 2 ᠬᠡᠷᠡᠭᠰᠡᠵᠦ ᠂ Qt% 3 ᠢ᠋/ ᠵᠢ ᠡᠷᠢᠵᠦ ᠣᠯᠬᠤ ᠬᠡᠷᠡᠭᠲᠡᠶ .</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>OK</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡᠢᠳᠦᠯ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation>ᠵᠠᠰᠠᠭᠰᠠᠨ ᠡᠳᠦᠷ ᠰᠠᠷᠠ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠶᠡᠬᠡ ᠪᠠᠭᠠ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation>ᠤᠭ ᠤ᠋ᠨ ᠵᠠᠮ ᠱᠤᠭᠤᠮ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation>ᠪᠠᠭᠠᠰᠬᠠᠬᠤ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation>ᠶᠡᠬᠡᠰᠬᠡᠬᠦ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation>ᠪᠦᠬᠦ ᠪᠠᠢᠳᠠᠯ ᠤ᠋ᠨ ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠢ᠋ ᠬᠡᠷᠡᠭᠯᠡᠬᠦ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation>ᠵᠢᠭᠰᠠᠭᠠᠯᠳᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation>ᠰᠢᠪᠠᠭᠠ ᠵᠢᠨ ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation>ᠬᠠᠭᠠᠬᠤ</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>Default Slide</translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation>ᠪᠦᠬᠦᠢᠯᠡ (*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>ᠤᠬᠤᠷᠢᠬᠤ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>ᠤᠷᠤᠭᠰᠢᠯᠠᠬᠤ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>ᠳᠡᠭᠡᠭᠰᠢ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>ᠬᠠᠢᠯᠳᠠ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>ᠬᠠᠷᠠᠭᠠᠨ ᠵᠢᠷᠤᠭ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>ᠳᠠᠷᠠᠭᠠᠯᠠᠯ ᠤ᠋ᠨ ᠳᠦᠷᠦᠯ ᠵᠦᠢᠯ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>ᠬᠠᠮᠤᠭ ᠤ᠋ᠨ ᠶᠡᠬᠡᠴᠢᠯᠡᠯ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>ᠬᠠᠭᠠᠬᠤ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>ᠡᠬᠡᠬᠦᠯᠬᠦ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠨᠡᠷᠡ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>ᠨᠡᠬᠡᠬᠡᠬᠦ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>ᠦᠬᠡᠢᠰᠭᠡᠬᠦ᠌</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>ᠦᠭᠡᠷᠡ ᠭᠠᠵᠠᠷ ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>ᠬᠠᠳᠠᠭᠠᠯᠠᠬᠤ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>ᠭᠠᠷᠴᠠᠭ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠦᠯ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>ᠪᠠᠢᠨᠠ᠂ ᠰᠤᠯᠢᠬᠤ ᠤᠤ?</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation>ᠰᠢᠨᠡ ᠪᠡᠷ ᠪᠠᠢᠭᠤᠯᠤᠭᠰᠠᠨ ᠹᠠᠢᠯ ᠤ᠋ᠨ ᠬᠠᠪᠳᠠᠰᠤ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation>ᠬᠦᠴᠦᠨ ᠦᠬᠡᠢ ᠪᠤᠯᠭᠠᠬᠤ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation>ᠳᠠᠬᠢᠵᠤ ᠬᠢᠬᠦ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation>ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠬᠦ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation>ᠳᠤᠰ ᠠᠵᠢᠯᠯᠠᠬᠤᠢ ᠵᠢ ᠳᠡᠮᠵᠢᠬᠦ ᠦᠬᠡᠢ.</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_tr.ts qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_tr.ts --- qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_tr.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_tr.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="tr_TR"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_ug.ts qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_ug.ts --- qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_ug.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_ug.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ug"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation>MainWindow</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation>سېناقنى ئېچىش</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation>مۇندەرىجە</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation>تاللانغان uri</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation>سىناقنى كۆرسىتىش</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation>ئىجرا قىلغۇچنى ئۆلچەش</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation>سىناقنى ساقلاش</translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation>تىنچ ھالەتتە ئېچىشنى سىناش</translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation>PushButton</translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation>ئاپتوماتىك يارقىن كۆرسىتىش سىنبەلگىسىنى ئىشلىتىڭ</translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation>...</translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation>پەقەت يۇقىرى يورۇقلۇقتا كۆرسىتىلىدۇ.</translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation>كۆڭۈلدىكى ۋە گەۋدىلىك كۆرسىتىش</translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation>تاق تاللاش كۇنۇپكىسى</translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation>ئۇسلۇب</translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation>ئايكون</translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation>تاماق تىزىملىكىنىڭ سۈزۈكلۈك دەرىجىسى يوق</translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation>خەت نۇسخىسى</translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>تاقاش</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>ئىجرا قىلىشقا بولىدىغان ھۆججەت 1، ئىھتىياجلىق سان 2، ئىزدەپ تاپقان سان 3</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation>سىغىشمىغانQT ئامبىرىدا خاتالىق كۆرۈلدى</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>ماقۇل</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation>تەپسىلاتىنى كۆرسىتىش</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation>تەپسىلاتىنى يوشۇرۇش</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation>ھۆججەت نامى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation>ئۆزگەرتىلگەن ۋاقتى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation>ھۆججەت تۈرى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation>ھۆججەت چوڭلۇقى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation>ئەسلى يول</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation>چوڭدىن كىچىككە قارىتىپ تىزىش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation>كىچىكتىن چوڭغا قارىتىپ تىزىش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation>ئومومىيلىق بىلەن تىزىشنى ئىشلىتىش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation>تىزىملىك كۆرۈنۈشى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation>شەكىل كۆرۈنۈشى</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation>تاقاش</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>ئالدىن بىكىتىلگەن slide</translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>تاللانما كارتىدىكى كىچىك زاپچاسلارنى پرويېكسىيە كارتون فىلىمىگە ئالماشتۇرۇش</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation>ھۆججەتنى ئېچىش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation>ھۆججەتنى ساقلاش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation>بارلىق ھۆججەتلەر (*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>قايت</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>ئالدىغا ماڭ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>Cd نىڭ ئۈستى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>ئىزدە</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>كۆرۈنۈش تىپى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>رەتلەنگەن تىپ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>چوڭايتىش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>تاقاش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>ئەسلىگە كەلتۈرۈش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>ئىسىم-فامىلىسى</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>ئېچىش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>ئەمەلدىن قالدۇرۇش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>تېجەش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>يېڭى ھۆججەت قىسقۇچ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>ساقلاش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>مۇندەرىجىلەر</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>ئاگاھلاندۇرۇش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>مەۋجۇت، ئالماشتۇرۇشنى جەزىملەشتۈرەلەمسىز؟</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation>يېڭى قاتلىغۇچ</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation>Undo</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation>قايتا-قايتا</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation>ئاگاھلاندۇرۇش</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation>بۇ مەشغۇلاتنى قوللىمايدۇ.</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_zh_CN.ts qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_zh_CN.ts --- qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_zh_CN.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_zh_CN.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="zh_CN"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>关闭</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>可执行文件“%1”需要数量%2,找到数量%3。</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation>不兼容的Qt库错误</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>确认</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation>显示细节……</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation>隐藏细节……</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation>文件名称</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation>修改日期</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation>文件类型</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation>文件大小</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation>原始路径</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation>降序</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation>升序</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation>使用全局排序</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation>列表视图</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation>图标视图</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation>关闭</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>默认slide</translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>让选项卡小部件切换为幻灯片动画。</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation>打开</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation>保存</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation>所有(*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>后退</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>前进</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>向上</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>搜索</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>视图类型</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>排序类型</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>最大化</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>关闭</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>还原</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>文件名</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>打开</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>取消</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>另存为</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>新建文件夹</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>保存</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>目录</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>警告</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>已存在,是否替换?</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation>新建文件夹</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation>撤销</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation>重做</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation>警告</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation>不支持此操作。</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_zh_HK.ts qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_zh_HK.ts --- qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_zh_HK.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_zh_HK.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="zh_HK"> +<context> + <name>MainWindow</name> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../test/system-settings/mainwindow.ui" line="14"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="30"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="37"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="47"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="54"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="64"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="71"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/filedialog/mainwindow.ui" line="78"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="36"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../test/mps-style-application/mainwindow.ui" line="43"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/mps-style-application/mainwindow.ui" line="50"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="21"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="31"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="41"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../test/system-settings/mainwindow.ui" line="55"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>關閉</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>可執行檔「%1」 需要數量%2,找到數量%3。</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation>不相容的Qt庫錯誤</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="362"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>確認</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="418"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation>顯示細節......</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="881"/> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation>隱藏細節......</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation>檔名稱</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation>修改日期</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation>檔案類型</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation>檔大小</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation>原始路徑</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation>降序</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation>升序</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation>使用全域排序</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation>清單檢視</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation>圖示檢視</translation> + </message> + <message> + <location filename="../qt5-ukui-platformtheme/widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation type="unfinished">關閉</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>默認slide</translation> + </message> + <message> + <location filename="../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>讓選項卡小部件切換為幻燈片動畫。</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2706"/> + <source>Open File</source> + <translation type="unfinished">打開</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2707"/> + <source>Save File</source> + <translation type="unfinished">保存</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2720"/> + <source>All Files (*)</source> + <translation type="unfinished">所有(*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation type="unfinished">後退</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation type="unfinished">前進</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation type="unfinished">向上</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation type="unfinished">搜索</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation type="unfinished">視圖類型</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation type="unfinished">排序類型</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation type="unfinished">最大化</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation type="unfinished">關閉</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation type="unfinished">還原</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation type="unfinished">檔名</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation type="unfinished">打開</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation type="unfinished">取消</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation type="unfinished">另存為</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation type="unfinished">新建資料夾</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation type="unfinished">保存</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation type="unfinished">目錄</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation type="unfinished">警告</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation type="unfinished">已存在,是否替換?</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="1920"/> + <source>NewFolder</source> + <translation type="unfinished">新建資料夾</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2208"/> + <source>Undo</source> + <translation type="unfinished">撤銷</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2215"/> + <source>Redo</source> + <translation type="unfinished">重做</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>warn</source> + <translation type="unfinished">警告</translation> + </message> + <message> + <location filename="../qt5-ukui-filedialog/kyfiledialog.cpp" line="2414"/> + <source>This operation is not supported.</source> + <translation type="unfinished">不支援此操作。</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_zh_Hant.ts qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_zh_Hant.ts --- qt5-ukui-platformtheme-4.1.0.0/translations/qt5-ukui-platformtheme_zh_Hant.ts 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/translations/qt5-ukui-platformtheme_zh_Hant.ts 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,386 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="zh"> +<context> + <name>MainWindow</name> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="14"/> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="14"/> + <location filename="../../test/mps-style-application/mainwindow.ui" line="14"/> + <location filename="../../test/system-settings/mainwindow.ui" line="14"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="117"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="102"/> + <location filename="../../test/mps-style-application/ui_mainwindow.h" line="126"/> + <location filename="../../test/system-settings/ui_mainwindow.h" line="122"/> + <source>MainWindow</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="30"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="118"/> + <source>test open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="37"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="119"/> + <source>directory</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="47"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="120"/> + <source>selected uri</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="54"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="121"/> + <source>test show</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="64"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="122"/> + <source>test exec</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="71"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="123"/> + <source>test save</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/filedialog/mainwindow.ui" line="78"/> + <location filename="../../test/filedialog/ui_mainwindow.h" line="124"/> + <source>test static open</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="30"/> + <location filename="../../test/mps-style-application/mainwindow.ui" line="36"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="103"/> + <location filename="../../test/mps-style-application/ui_mainwindow.h" line="127"/> + <source>PushButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="47"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="104"/> + <source>use auto highlight icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="54"/> + <location filename="../../test/mps-style-application/mainwindow.ui" line="43"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="105"/> + <location filename="../../test/mps-style-application/ui_mainwindow.h" line="128"/> + <source>...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="72"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="106"/> + <source>highlightOnly</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/highlighted-icon-button/mainwindow.ui" line="77"/> + <location filename="../../test/highlighted-icon-button/ui_mainwindow.h" line="107"/> + <source>bothDefaultAndHighlight</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/mps-style-application/mainwindow.ui" line="50"/> + <location filename="../../test/mps-style-application/ui_mainwindow.h" line="129"/> + <source>RadioButton</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/system-settings/mainwindow.ui" line="21"/> + <location filename="../../test/system-settings/ui_mainwindow.h" line="123"/> + <source>style</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/system-settings/mainwindow.ui" line="31"/> + <location filename="../../test/system-settings/ui_mainwindow.h" line="124"/> + <source>icon</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/system-settings/mainwindow.ui" line="41"/> + <location filename="../../test/system-settings/ui_mainwindow.h" line="125"/> + <source>menu opacity</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../../test/system-settings/mainwindow.ui" line="55"/> + <location filename="../../test/system-settings/ui_mainwindow.h" line="126"/> + <source>font</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MessageBox</name> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="97"/> + <source>Close</source> + <translation>關閉</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <location filename="../widget/messagebox/message-box.h" line="272"/> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>可執行檔「%1」 需要數量%2,找到數量%3。</translation> + </message> + <message> + <location filename="../widget/messagebox/message-box.h" line="274"/> + <source>Incompatible Qt Library Error</source> + <translation>不相容的Qt庫錯誤</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="362"/> + <location filename="../widget/messagebox/message-box.cpp" line="1090"/> + <source>OK</source> + <translation>確認</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="418"/> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> + <source>Show Details...</source> + <translation>顯示細節......</translation> + </message> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="881"/> + <location filename="../widget/messagebox/message-box.cpp" line="1517"/> + <source>Hide Details...</source> + <translation>隱藏細節......</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="259"/> + <source>File Name</source> + <translation>檔名稱</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="263"/> + <source>Modified Date</source> + <translation>修改日期</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="267"/> + <source>File Type</source> + <translation>檔案類型</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="271"/> + <source>File Size</source> + <translation>檔大小</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="275"/> + <source>Original Path</source> + <translation>原始路徑</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="284"/> + <source>Descending</source> + <translation>降序</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="289"/> + <source>Ascending</source> + <translation>升序</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="295"/> + <source>Use global sorting</source> + <translation>使用全域排序</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="315"/> + <source>List View</source> + <translation>清單檢視</translation> + </message> + <message> + <location filename="../widget/filedialog/ui_kyfiledialog.cpp" line="316"/> + <source>Icon View</source> + <translation>圖示檢視</translation> + </message> + <message> + <location filename="../widget/messagebox/message-box.cpp" line="730"/> + <source>Close</source> + <translation type="unfinished">關閉</translation> + </message> +</context> +<context> + <name>UKUI::TabWidget::DefaultSlideAnimatorFactory</name> + <message> + <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="50"/> + <source>Default Slide</source> + <translation>默認slide</translation> + </message> + <message> + <location filename="../../debian/libqt5-ukui-style-dev/usr/include/qt5-ukui/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <location filename="../../libqt5-ukui-style/animations/tabwidget/ukui-tabwidget-default-slide-animator-factory.h" line="51"/> + <source>Let tab widget switch with a slide animation.</source> + <translation>讓選項卡小部件切換為幻燈片動畫。</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyFileDialogHelper</name> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2696"/> + <source>Open File</source> + <translation>打開</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2697"/> + <source>Save File</source> + <translation>保存</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2710"/> + <source>All Files (*)</source> + <translation>所有(*)</translation> + </message> +</context> +<context> + <name>UKUIFileDialog::KyNativeFileDialog</name> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="221"/> + <source>Go Back</source> + <translation>後退</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="228"/> + <source>Go Forward</source> + <translation>前進</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="234"/> + <source>Cd Up</source> + <translation>向上</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="241"/> + <source>Search</source> + <translation>搜索</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="249"/> + <source>View Type</source> + <translation>視圖類型</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="260"/> + <source>Sort Type</source> + <translation>排序類型</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="265"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="378"/> + <source>Maximize</source> + <translation>最大化</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="279"/> + <source>Close</source> + <translation>關閉</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="375"/> + <source>Restore</source> + <translation>還原</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="987"/> + <source>Name</source> + <translation>檔名</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="990"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1578"/> + <source>Open</source> + <translation>打開</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="991"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1000"/> + <source>Cancel</source> + <translation>取消</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="995"/> + <source>Save as</source> + <translation>另存為</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="997"/> + <source>New Folder</source> + <translation>新建資料夾</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="999"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1582"/> + <source>Save</source> + <translation>保存</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1035"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1036"/> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1038"/> + <source>Directories</source> + <translation>目錄</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> + <source>Warning</source> + <translation>警告</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1227"/> + <source>exist, are you sure replace?</source> + <translation>已存在,是否替換?</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="1910"/> + <source>NewFolder</source> + <translation>新建資料夾</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2198"/> + <source>Undo</source> + <translation>撤銷</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2205"/> + <source>Redo</source> + <translation>重做</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> + <source>warn</source> + <translation>警告</translation> + </message> + <message> + <location filename="../widget/filedialog/kyfiledialog.cpp" line="2404"/> + <source>This operation is not supported.</source> + <translation>不支援此操作。</translation> + </message> +</context> +</TS> diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,87 @@ +cmake_minimum_required(VERSION 3.16) + +project(ukui-qml-style-helper) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(QT_MIN_VERSION "5.12.0") +set(KF5_MIN_VERSION "5.66.0") + +find_package(Qt5Quick) + +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + Widgets + DBus +) +find_package(KF5Kirigami2 CONFIG REQUIRED COMPONENTS) +find_package(KF5Config CONFIG REQUIRED COMPONENTS) + +find_package(PkgConfig REQUIRED) +pkg_check_modules(Qsettings REQUIRED gsettings-qt) +pkg_check_modules(FONTCONFIG REQUIRED fontconfig) +pkg_check_modules(GLIB2 REQUIRED glib-2.0 gio-2.0 ) + +set(EXTERNAL_LIBS "") + +include_directories(${GLIB2_INCLUDE_DIRS}) +include_directories(${Qsettings_INCLUDE_DIRS}) +if (FONTCONFIG_FOUND) + include_directories(${FONTCONFIG_INCLUDE_DIRS}) + link_directories(${FONTCONFIG_LIBRARY_DIRS}) +endif() + +file(GLOB_RECURSE HEADER_FILES +# "kyquickpadding_p.h" +# "KyIcon.h" +# "kyquickstyleitem.h" +# "kystylehelper.h" + "qqc2styleplugin.h" + "styleparameter/*.h" + "../qt5-ukui-platformtheme/platform-theme-fontdata.h" + "../ukui-styles/readconfig.h" + ) +file(GLOB_RECURSE SRC_FILES +# "KyIcon.cpp" +# "kyquickstyleitem.cpp" +# "kystylehelper.cpp" + "qqc2styleplugin.cpp" + "styleparameter/*.cpp" + "../qt5-ukui-platformtheme/platform-theme-fontdata.cpp" + "../ukui-styles/readconfig.cpp" + ) +file(GLOB_RECURSE OTHER_FILES qmldir) + +SOURCE_GROUP("Header Files" FILES ${HEADER_FILES}) +SOURCE_GROUP("Source Files" FILES ${SRC_FILES}) +SOURCE_GROUP("other files" FILES ${OTHER_FILES}) + +include_directories(../libqt5-ukui-style/) + +add_library(ukui-qml-style-helper MODULE ${HEADER_FILES} ${SRC_FILES} ${OTHER_FILES}) + +target_link_libraries(ukui-qml-style-helper PRIVATE + KF5::ConfigCore + KF5::Kirigami2 + Qt5::Quick + Qt5::Widgets + Qt5::DBus + gsettings-qt + qt5-ukui-style + glib-2.0 + ${FONTCONFIG_LIBRARIES} + ${EXTERNAL_LIBS} + ) + +if(UNIX) + set(TARGET_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/qt5/qml/org/ukui/qqc2style/private/") + + MESSAGE("libukui-qml-style-helper TARGET_PATH: ${TARGET_PATH}") + + install(TARGETS ${PROJECT_NAME} DESTINATION ${TARGET_PATH}) + install(FILES ${OTHER_FILES} DESTINATION "${TARGET_PATH}") +endif() diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/KyIcon.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/KyIcon.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/KyIcon.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/KyIcon.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,110 +0,0 @@ -#include "KyIcon.h" -#include <QStyleOption> -#include <QStyle> -#include <QPainter> -#include <QApplication> -#include "highlight-effect.h" -#include <QGSettings/QGSettings> - -QStyle *KyIcon::style() -{ - return qApp->style(); -} - -KyIcon::KyIcon(QQuickPaintedItem *parent) - : QQuickPaintedItem(parent), - m_hover(false), - m_selected(false), - m_focus(false), - m_active(true), - m_sunken(false), - m_on(false), - m_icontype("default") -{ - if (QGSettings::isSchemaInstalled("org.ukui.style")) { - QGSettings* styleSettings = new QGSettings("org.ukui.style", QByteArray(), this); - connect(styleSettings, &QGSettings::changed, this, [&](){ - emit hoverChanged(); - emit selectedChanged(); - emit hasFocusChanged(); - emit activeChanged(); - emit sunkenChanged(); - emit onChanged(); - emit icontypeChanged(); - emit iconNameChanged(); - update(); - }); - } - connect(this, &KyIcon::iconNameChanged, this, &KyIcon::updateItem); - connect(this, &KyIcon::hoverChanged, this, &KyIcon::updateItem); - connect(this, &KyIcon::selectedChanged, this, &KyIcon::updateItem); - connect(this, &KyIcon::hasFocusChanged, this, &KyIcon::updateItem); - connect(this, &KyIcon::activeChanged, this, &KyIcon::updateItem); - connect(this, &KyIcon::sunkenChanged, this, &KyIcon::updateItem); - connect(this, &KyIcon::onChanged, this, &KyIcon::updateItem); - connect(this, &KyIcon::icontypeChanged, this, &KyIcon::updateItem); - - -} - - -void KyIcon::setIcon(const QIcon &icon) -{ - m_icon = icon; -} - -void KyIcon::setIconName(const QString &iconName) -{ - m_iconName = iconName; - if(!QIcon::hasThemeIcon(m_iconName)) - { - m_icon = QIcon(); - qWarning() << "未找到名为 " << m_iconName << " 的图标!"; - return; - } - m_icon = QIcon::fromTheme(m_iconName); - emit iconNameChanged(); -} - -void KyIcon::paint(QPainter *painter) -{ - - if(m_icon.isNull()) - return; - QWidget wid; - QStyleOption opt; - opt.state = {}; - if (isEnabled()) { - opt.state |= QStyle::State_Enabled; - } - if (m_hover) - opt.state |= QStyle::State_MouseOver; - if (m_selected) - opt.state |= QStyle::State_Selected; - if (m_focus) - opt.state |= QStyle::State_HasFocus; - if (m_active) - opt.state |= QStyle::State_Active; - if (m_sunken) - opt.state |= QStyle::State_Sunken; - if (m_on) - opt.state |= QStyle::State_On; - - QPixmap pixmap = m_icon.pixmap(QSize(width(), height())); - - if (m_icontype == "ordinary") { - pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, &opt, &wid); /* 主题切换做处理*/ - } - if (m_icontype == "hover") { - pixmap = HighLightEffect::hoverGeneratePixmap(pixmap, &opt, &wid); /* 选中点击做处理*/ - } - if (m_icontype == "filledSymbolicColor") { - pixmap = HighLightEffect::filledSymbolicColoredGeneratePixmap(pixmap, &opt, &wid); /* 非纯色图标主题切换且选中点击做处理*/ - } - else if (m_icontype == "default") { - pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, &opt, &wid); /* 主题切换且选中点击做处理*/ - } - - KyIcon::style()->drawItemPixmap(painter, boundingRect().toRect(), Qt::AlignCenter,pixmap); - -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/KyIcon.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/KyIcon.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/KyIcon.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/KyIcon.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,92 +0,0 @@ -#ifndef KYICON_H -#define KYICON_H -#include <QQuickPaintedItem> -#include <QIcon> -#include <QStyle> -#include <QPointer> - -class QStyle; -class KyIcon : public QQuickPaintedItem -{ - Q_OBJECT - Q_PROPERTY(QString iconName READ iconName WRITE setIconName NOTIFY iconNameChanged) - Q_PROPERTY(QIcon icon READ icon WRITE setIcon) - Q_PROPERTY( bool hover READ hover WRITE setHover NOTIFY hoverChanged) - Q_PROPERTY( bool selected READ selected WRITE setSelected NOTIFY selectedChanged) - Q_PROPERTY( bool hasFocus READ hasFocus WRITE sethasFocus NOTIFY hasFocusChanged) - Q_PROPERTY( bool active READ active WRITE setActive NOTIFY activeChanged) - Q_PROPERTY( bool sunken READ sunken WRITE setSunken NOTIFY sunkenChanged) - Q_PROPERTY( bool on READ on WRITE setOn NOTIFY onChanged) - Q_PROPERTY( QString icontype READ icontype WRITE seticontype NOTIFY icontypeChanged) - - -public: - KyIcon(QQuickPaintedItem *parent = nullptr); - - QIcon icon() { return m_icon; } - void setIcon(const QIcon &icon); - QString iconName(){ return m_iconName; } - void setIconName(const QString &iconName); - - bool hover() const { return m_hover; } - void setHover(bool hover) { if (m_hover != hover) {m_hover = hover ; emit hoverChanged();}} - - bool selected() const { return m_selected; } - void setSelected(bool selected) { - if (m_selected!= selected) { - m_selected = selected; - emit selectedChanged(); - } - } - - bool hasFocus() const { return m_focus; } - void sethasFocus(bool focus) { if (m_focus != focus) {m_focus = focus; emit hasFocusChanged();}} - - bool active() const { return m_active; } - void setActive(bool active) { if (m_active!= active) {m_active = active; emit activeChanged();}} - - bool sunken() const { return m_sunken; } - void setSunken(bool sunken) { if (m_sunken != sunken) {m_sunken = sunken; emit sunkenChanged();}} - - bool on() const { return m_on; } - void setOn(bool on) { if (m_on != on) {m_on = on ; emit onChanged();}} - - QString icontype() const { return m_icontype;} - void seticontype(QString icontype) { - m_icontype = icontype ; - emit icontypeChanged(); - } - - void paint(QPainter *painter); - - static QStyle *style(); - -public Q_SLOTS: - void updateItem(){update();} - -Q_SIGNALS: - void hoverChanged(); - void selectedChanged(); - void hasFocusChanged(); - void activeChanged(); - void sunkenChanged(); - void onChanged(); - void icontypeChanged(); - void iconNameChanged(); - -protected: - bool m_hover; - bool m_selected; - bool m_focus; - bool m_active; - bool m_sunken; - bool m_on; - QString m_icontype; - -private: - QIcon m_icon; - QString m_iconName; - -}; - -#endif // KYICON_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/kyquickpadding_p.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/kyquickpadding_p.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/kyquickpadding_p.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/kyquickpadding_p.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,47 +0,0 @@ -#ifndef KYQUICKPADDING_P_H -#define KYQUICKPADDING_P_H - -#include <qobject.h> - -class KyQuickPadding : public QObject -{ - Q_OBJECT - - Q_PROPERTY(int left READ left WRITE setLeft NOTIFY leftChanged) - Q_PROPERTY(int top READ top WRITE setTop NOTIFY topChanged) - Q_PROPERTY(int right READ right WRITE setRight NOTIFY rightChanged) - Q_PROPERTY(int bottom READ bottom WRITE setBottom NOTIFY bottomChanged) - - int m_left; - int m_top; - int m_right; - int m_bottom; - -public: - KyQuickPadding(QObject *parent = nullptr) : - QObject(parent), - m_left(0), - m_top(0), - m_right(0), - m_bottom(0) {} - - int left() const { return m_left; } - int top() const { return m_top; } - int right() const { return m_right; } - int bottom() const { return m_bottom; } - -public Q_SLOTS: - void setLeft(int arg) { if (m_left != arg) {m_left = arg; emit leftChanged();}} - void setTop(int arg) { if (m_top != arg) {m_top = arg; emit topChanged();}} - void setRight(int arg) { if (m_right != arg) {m_right = arg; emit rightChanged();}} - void setBottom(int arg) {if (m_bottom != arg) {m_bottom = arg; emit bottomChanged();}} - -Q_SIGNALS: - void leftChanged(); - void topChanged(); - void rightChanged(); - void bottomChanged(); -}; - - -#endif // KYQUICKPADDING_P_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/kyquickstyleitem.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/kyquickstyleitem.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/kyquickstyleitem.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/kyquickstyleitem.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,1885 +0,0 @@ -#include "kyquickstyleitem.h" - -#include <QStyle> -#include <QStyleFactory> -#include <QStyleOption> -#include <QApplication> -#include <QSGNinePatchNode> -#include <QPainter> -#include <QPixmapCache> -#include <QStringBuilder> -#include <QQuickWindow> - -#include <KSharedConfig> -#include <KConfigGroup> -#include <QGSettings/QGSettings> -#include <QApplication> - - -QStyle *KyQuickStyleItem::s_style = nullptr; - -QStyle *KyQuickStyleItem::style() -{ - auto style = qApp->style(); - return style ? style : s_style; -} - -KyQuickStyleItem::KyQuickStyleItem(QQuickItem *parent) - : QQuickItem(parent), - m_styleoption(nullptr), - m_itemType(Undefined), - m_sunken(false), - m_raised(false), - m_active(true), - m_selected(false), - m_focus(false), - m_hover(false), - m_on(false), - m_horizontal(true), - m_transient(false), - m_sharedWidget(false), - m_minimum(0), - m_maximum(100), - m_value(0), - m_step(0), - m_paintMargins(0), - m_contentWidth(0), - m_contentHeight(0), - m_textureWidth(0), - m_textureHeight(0), - m_lastFocusReason(Qt::NoFocusReason) -{ - // There is no styleChanged signal and QApplication sends QEvent::StyleChange only to all QWidgets - if (qApp->style()) { - connect(qApp->style(), &QObject::destroyed, this, &KyQuickStyleItem::styleChanged); - } else { - KSharedConfig::Ptr kdeglobals = KSharedConfig::openConfig(); - KConfigGroup cg(kdeglobals, "KDE"); - auto style = s_style; - s_style = QStyleFactory::create(cg.readEntry("widgetStyle", QStringLiteral("Fusion"))); - if (style) { - delete style; - } - } - - if (QGSettings::isSchemaInstalled("org.ukui.style")) { - QGSettings* styleSettings = new QGSettings("org.ukui.style", QByteArray(), this); - connect(styleSettings, &QGSettings::changed, this, [&](const QString &key){ - if (key == "systemFontSize" || key == "systemFont") { - emit fontChanged(); - updatePolish(); - } - if (key == "iconThemeName"){ - polish(); - } - }); - } - - m_font = qApp->font(); - setFlag(QQuickItem::ItemHasContents, true); - setSmooth(false); - - connect(this, &KyQuickStyleItem::visibleChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::widthChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::heightChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::enabledChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::infoChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::onChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::selectedChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::activeChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::textChanged, this, &KyQuickStyleItem::updateSizeHint); - connect(this, &KyQuickStyleItem::textChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::activeChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::raisedChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::sunkenChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::hoverChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::maximumChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::minimumChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::valueChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::horizontalChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::transientChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::activeControlChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::hasFocusChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::activeControlChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::hintChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::propertiesChanged, this, &KyQuickStyleItem::updateSizeHint); - connect(this, &KyQuickStyleItem::propertiesChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::elementTypeChanged, this, &KyQuickStyleItem::updateItem); - connect(this, &KyQuickStyleItem::contentWidthChanged, this, &KyQuickStyleItem::updateSizeHint); - connect(this, &KyQuickStyleItem::contentHeightChanged, this, &KyQuickStyleItem::updateSizeHint); - connect(this, &KyQuickStyleItem::widthChanged, this, &KyQuickStyleItem::updateRect); - connect(this, &KyQuickStyleItem::heightChanged, this, &KyQuickStyleItem::updateRect); - - connect(this, &KyQuickStyleItem::heightChanged, this, &KyQuickStyleItem::updateBaselineOffset); - connect(this, &KyQuickStyleItem::contentHeightChanged, this, &KyQuickStyleItem::updateBaselineOffset); - - connect(qApp, &QApplication::fontChanged, this, &KyQuickStyleItem::updateSizeHint, Qt::QueuedConnection); -} - -KyQuickStyleItem::~KyQuickStyleItem() -{ - if (const QStyleOptionButton *aux = qstyleoption_cast<const QStyleOptionButton*>(m_styleoption)) - delete aux; - else if (const QStyleOptionViewItem *aux = qstyleoption_cast<const QStyleOptionViewItem*>(m_styleoption)) - delete aux; - else if (const QStyleOptionHeader *aux = qstyleoption_cast<const QStyleOptionHeader*>(m_styleoption)) - delete aux; - else if (const QStyleOptionToolButton *aux = qstyleoption_cast<const QStyleOptionToolButton*>(m_styleoption)) - delete aux; - else if (const QStyleOptionToolBar *aux = qstyleoption_cast<const QStyleOptionToolBar*>(m_styleoption)) - delete aux; - else if (const QStyleOptionTab *aux = qstyleoption_cast<const QStyleOptionTab*>(m_styleoption)) - delete aux; - else if (const QStyleOptionFrame *aux = qstyleoption_cast<const QStyleOptionFrame*>(m_styleoption)) - delete aux; - else if (const QStyleOptionFocusRect *aux = qstyleoption_cast<const QStyleOptionFocusRect*>(m_styleoption)) - delete aux; - else if (const QStyleOptionTabWidgetFrame *aux = qstyleoption_cast<const QStyleOptionTabWidgetFrame*>(m_styleoption)) - delete aux; - else if (const QStyleOptionMenuItem *aux = qstyleoption_cast<const QStyleOptionMenuItem*>(m_styleoption)) - delete aux; - else if (const QStyleOptionComboBox *aux = qstyleoption_cast<const QStyleOptionComboBox*>(m_styleoption)) - delete aux; - else if (const QStyleOptionSpinBox *aux = qstyleoption_cast<const QStyleOptionSpinBox*>(m_styleoption)) - delete aux; - else if (const QStyleOptionSlider *aux = qstyleoption_cast<const QStyleOptionSlider*>(m_styleoption)) - delete aux; - else if (const QStyleOptionProgressBar *aux = qstyleoption_cast<const QStyleOptionProgressBar*>(m_styleoption)) - delete aux; - else if (const QStyleOptionGroupBox *aux = qstyleoption_cast<const QStyleOptionGroupBox*>(m_styleoption)) - delete aux; - else - delete m_styleoption; - - m_styleoption = nullptr; -} - -void KyQuickStyleItem::initStyleOption() -{ - if (m_styleoption) - m_styleoption->state = {}; - - QString sizeHint = m_hints.value(QStringLiteral("size")).toString(); - - bool needsResolvePalette = true; - update(); - - switch (m_itemType) { - case Button: { - if (!m_styleoption) - m_styleoption = new QStyleOptionButton(); - - QStyleOptionButton *opt = qstyleoption_cast<QStyleOptionButton*>(m_styleoption); - opt->text = text(); - - const QVariant icon = m_properties[QStringLiteral("icon")]; - if (icon.canConvert<QIcon>()) { - opt->icon = icon.value<QIcon>(); - } else if (icon.canConvert<QUrl>() && icon.value<QUrl>().isLocalFile()) { - opt->icon = QIcon(icon.value<QUrl>().toLocalFile()); - } else if (icon.canConvert<QString>()) { - opt->icon = QIcon::fromTheme(icon.value<QString>()); - } - auto iconSize = QSize(m_properties[QStringLiteral("iconWidth")].toInt(), - m_properties[QStringLiteral("iconHeight")].toInt()); - if (iconSize.isEmpty()) { - int e = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_ButtonIconSize, m_styleoption, nullptr); - if (iconSize.width() <= 0) { - iconSize.setWidth(e); - } - if (iconSize.height() <= 0) { - iconSize.setHeight(e); - } - } - opt->iconSize = iconSize; - opt->features = activeControl() == QLatin1String("default") ? - QStyleOptionButton::DefaultButton : - QStyleOptionButton::None; - if (m_properties[QStringLiteral("flat")].toBool()) { - opt->features |= QStyleOptionButton::Flat; - } - const QFont font = qApp->font("QPushButton"); - opt->fontMetrics = QFontMetrics(font); - QObject * menu = m_properties[QStringLiteral("menu")].value<QObject *>(); - if (menu) { - opt->features |= QStyleOptionButton::HasMenu; - } - } - break; - case ItemRow: { - if (!m_styleoption) - m_styleoption = new QStyleOptionViewItem(); - - QStyleOptionViewItem *opt = qstyleoption_cast<QStyleOptionViewItem*>(m_styleoption); - opt->features = {}; - if (activeControl() == QLatin1String("alternate")) - opt->features |= QStyleOptionViewItem::Alternate; - } - break; - - case Splitter: { - if (!m_styleoption) { - m_styleoption = new QStyleOption; - } - } - break; - - case Item: { - if (!m_styleoption) { - m_styleoption = new QStyleOptionViewItem(); - } - QStyleOptionViewItem *opt = qstyleoption_cast<QStyleOptionViewItem*>(m_styleoption); - opt->features = QStyleOptionViewItem::HasDisplay; - opt->text = text(); - opt->textElideMode = Qt::ElideRight; - opt->displayAlignment = Qt::AlignLeft | Qt::AlignVCenter; - opt->decorationAlignment = Qt::AlignCenter; - resolvePalette(); - needsResolvePalette = false; - QPalette pal = m_styleoption->palette; - pal.setBrush(QPalette::Base, Qt::NoBrush); - m_styleoption->palette = pal; - const QFont font = qApp->font("QAbstractItemView"); - opt->font = font; - opt->fontMetrics = QFontMetrics(font); - break; - } - case ItemBranchIndicator: { - if (!m_styleoption) - m_styleoption = new QStyleOption; - - m_styleoption->state = QStyle::State_Item; // We don't want to fully support Win 95 - if (m_properties.value(QStringLiteral("hasChildren")).toBool()) - m_styleoption->state |= QStyle::State_Children; - if (m_properties.value(QStringLiteral("hasSibling")).toBool()) // Even this one could go away - m_styleoption->state |= QStyle::State_Sibling; - if (m_on) - m_styleoption->state |= QStyle::State_Open; - } - break; - case Header: { - if (!m_styleoption) - m_styleoption = new QStyleOptionHeader(); - - QStyleOptionHeader *opt = qstyleoption_cast<QStyleOptionHeader*>(m_styleoption); - opt->text = text(); - opt->textAlignment = static_cast<Qt::AlignmentFlag>(m_properties.value(QStringLiteral("textalignment")).toInt()); - opt->sortIndicator = activeControl() == QLatin1String("down") ? - QStyleOptionHeader::SortDown - : activeControl() == QLatin1String("up") ? - QStyleOptionHeader::SortUp : QStyleOptionHeader::None; - QString headerpos = m_properties.value(QStringLiteral("headerpos")).toString(); - if (headerpos == QLatin1String("beginning")) - opt->position = QStyleOptionHeader::Beginning; - else if (headerpos == QLatin1String("end")) - opt->position = QStyleOptionHeader::End; - else if (headerpos == QLatin1String("only")) - opt->position = QStyleOptionHeader::OnlyOneSection; - else - opt->position = QStyleOptionHeader::Middle; - - const QFont font = qApp->font("QHeaderView"); - opt->fontMetrics = QFontMetrics(font); - } - break; - case ToolButton: { - if (!m_styleoption) - m_styleoption = new QStyleOptionToolButton(); - - QStyleOptionToolButton *opt = - qstyleoption_cast<QStyleOptionToolButton*>(m_styleoption); - opt->subControls = QStyle::SC_ToolButton; - opt->state |= QStyle::State_AutoRaise; - opt->activeSubControls = QStyle::SC_ToolButton; - opt->text = text(); - - const QVariant icon = m_properties[QStringLiteral("icon")]; - if (icon.canConvert<QIcon>()) { - opt->icon = icon.value<QIcon>(); - } else if (icon.canConvert<QUrl>() && icon.value<QUrl>().isLocalFile()) { - opt->icon = QIcon(icon.value<QUrl>().toLocalFile()); - } else if (icon.canConvert<QString>()) { - opt->icon = QIcon::fromTheme(icon.value<QString>()); - } - auto iconSize = QSize(m_properties[QStringLiteral("iconWidth")].toInt(), - m_properties[QStringLiteral("iconHeight")].toInt()); - if (iconSize.isEmpty()) { - int e = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_ToolBarIconSize, m_styleoption, nullptr); - if (iconSize.width() <= 0) { - iconSize.setWidth(e); - } - if (iconSize.height() <= 0) { - iconSize.setHeight(e); - } - } - opt->iconSize = iconSize; - - if (m_properties.value(QStringLiteral("menu")).toBool()) { - opt->subControls |= QStyle::SC_ToolButtonMenu; - opt->features = QStyleOptionToolButton::HasMenu; - } - - const int toolButtonStyle = m_properties.value(QStringLiteral("toolButtonStyle")).toInt(); - - switch (toolButtonStyle) { - case Qt::ToolButtonIconOnly: - case Qt::ToolButtonTextOnly: - case Qt::ToolButtonTextBesideIcon: - case Qt::ToolButtonTextUnderIcon: - case Qt::ToolButtonFollowStyle: - opt->toolButtonStyle = (Qt::ToolButtonStyle)toolButtonStyle; - break; - default: - opt->toolButtonStyle = Qt::ToolButtonFollowStyle; - } - - const QFont font = qApp->font("QToolButton"); - opt->font = font; - opt->fontMetrics = QFontMetrics(font); - } - break; - case ToolBar: { - if (!m_styleoption) - m_styleoption = new QStyleOptionToolBar(); - } - break; - case Tab: { - if (!m_styleoption) - m_styleoption = new QStyleOptionTab(); - - QStyleOptionTab *opt = qstyleoption_cast<QStyleOptionTab*>(m_styleoption); - opt->text = text(); - - const QVariant icon = m_properties[QStringLiteral("icon")]; - if (icon.canConvert<QIcon>()) { - opt->icon = icon.value<QIcon>(); - } else if (icon.canConvert<QUrl>() && icon.value<QUrl>().isLocalFile()) { - opt->icon = QIcon(icon.value<QUrl>().toLocalFile()); - } else if (icon.canConvert<QString>()) { - opt->icon = QIcon::fromTheme(icon.value<QString>()); - } - auto iconSize = QSize(m_properties[QStringLiteral("iconWidth")].toInt(), - m_properties[QStringLiteral("iconHeight")].toInt()); - if (iconSize.isEmpty()) { - int e = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_ButtonIconSize, m_styleoption, nullptr); - if (iconSize.width() <= 0) { - iconSize.setWidth(e); - } - if (iconSize.height() <= 0) { - iconSize.setHeight(e); - } - } - opt->iconSize = iconSize; - - if (m_properties.value(QStringLiteral("hasFrame")).toBool()) - opt->features |= QStyleOptionTab::HasFrame; - - QString orientation = m_properties.value(QStringLiteral("orientation")).toString(); - QString position = m_properties.value(QStringLiteral("tabpos")).toString(); - QString selectedPosition = m_properties.value(QStringLiteral("selectedpos")).toString(); - - opt->shape = orientation == QLatin1String("Bottom") ? QTabBar::RoundedSouth : QTabBar::RoundedNorth; - if (position == QLatin1String("beginning")) - opt->position = QStyleOptionTab::Beginning; - else if (position == QLatin1String("end")) - opt->position = QStyleOptionTab::End; - else if (position == QLatin1String("only")) - opt->position = QStyleOptionTab::OnlyOneTab; - else - opt->position = QStyleOptionTab::Middle; - - if (selectedPosition == QLatin1String("next")) - opt->selectedPosition = QStyleOptionTab::NextIsSelected; - else if (selectedPosition == QLatin1String("previous")) - opt->selectedPosition = QStyleOptionTab::PreviousIsSelected; - else - opt->selectedPosition = QStyleOptionTab::NotAdjacent; - - - } break; - - case Frame: { - if (!m_styleoption) - m_styleoption = new QStyleOptionFrame(); - - QStyleOptionFrame *opt = qstyleoption_cast<QStyleOptionFrame*>(m_styleoption); - opt->frameShape = QFrame::StyledPanel; - opt->lineWidth = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption, nullptr); - opt->midLineWidth = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption, nullptr); - } - break; - case FocusRect: { - if (!m_styleoption) - m_styleoption = new QStyleOptionFocusRect(); - // Needed on windows - m_styleoption->state |= QStyle::State_KeyboardFocusChange; - } - break; - case TabFrame: { - if (!m_styleoption) - m_styleoption = new QStyleOptionTabWidgetFrame(); - QStyleOptionTabWidgetFrame *opt = qstyleoption_cast<QStyleOptionTabWidgetFrame*>(m_styleoption); - - opt->selectedTabRect = m_properties[QStringLiteral("selectedTabRect")].toRect(); - opt->shape = m_properties[QStringLiteral("orientation")] == Qt::BottomEdge ? QTabBar::RoundedSouth : QTabBar::RoundedNorth; - if (minimum()) - opt->selectedTabRect = QRect(value(), 0, minimum(), height()); - opt->tabBarSize = QSize(minimum() , height()); - // oxygen style needs this hack - opt->leftCornerWidgetSize = QSize(value(), 0); - } - break; - case MenuBar: - if (!m_styleoption) { - QStyleOptionMenuItem *menuOpt = new QStyleOptionMenuItem(); - menuOpt->menuItemType = QStyleOptionMenuItem::EmptyArea; - m_styleoption = menuOpt; - } - - break; - case MenuBarItem: - { - if (!m_styleoption) - m_styleoption = new QStyleOptionMenuItem(); - - QStyleOptionMenuItem *opt = qstyleoption_cast<QStyleOptionMenuItem*>(m_styleoption); - opt->text = text(); - opt->menuItemType = QStyleOptionMenuItem::Normal; - setProperty("_q_showUnderlined", m_hints[QStringLiteral("showUnderlined")].toBool()); - - const QFont font = qApp->font("QMenuBar"); - opt->font = font; - opt->fontMetrics = QFontMetrics(font); - m_font = opt->font; - } - break; - case Menu: { - if (!m_styleoption) - m_styleoption = new QStyleOptionMenuItem(); - } - break; - case MenuItem: - case ComboBoxItem: - { - if (!m_styleoption) - m_styleoption = new QStyleOptionMenuItem(); - - QStyleOptionMenuItem *opt = qstyleoption_cast<QStyleOptionMenuItem*>(m_styleoption); - // For GTK style. See below, in setElementType() - setProperty("_q_isComboBoxPopupItem", m_itemType == ComboBoxItem); - - KyQuickStyleItem::MenuItemType type = - static_cast<KyQuickStyleItem::MenuItemType>(m_properties[QStringLiteral("type")].toInt()); - if (type == KyQuickStyleItem::ScrollIndicatorType) { - int scrollerDirection = m_properties[QStringLiteral("scrollerDirection")].toInt(); - opt->menuItemType = QStyleOptionMenuItem::Scroller; - opt->state |= scrollerDirection == Qt::UpArrow ? - QStyle::State_UpArrow : QStyle::State_DownArrow; - } else if (type == KyQuickStyleItem::SeparatorType) { - opt->menuItemType = QStyleOptionMenuItem::Separator; - } else { - opt->text = text(); - - if (type == KyQuickStyleItem::MenuType) { - opt->menuItemType = QStyleOptionMenuItem::SubMenu; - } else { - opt->menuItemType = QStyleOptionMenuItem::Normal; - - QString shortcut = m_properties[QStringLiteral("shortcut")].toString(); - if (!shortcut.isEmpty()) { - opt->text += QLatin1Char('\t') + shortcut; - opt->tabWidth = qMax(opt->tabWidth, qRound(textWidth(shortcut))); - } - - if (m_properties[QStringLiteral("checkable")].toBool()) { - opt->checked = on(); - QVariant exclusive = m_properties[QStringLiteral("exclusive")]; - opt->checkType = exclusive.toBool() ? QStyleOptionMenuItem::Exclusive : - QStyleOptionMenuItem::NonExclusive; - } - } - if (m_properties[QStringLiteral("icon")].canConvert<QIcon>()) - opt->icon = m_properties[QStringLiteral("icon")].value<QIcon>(); - setProperty("_q_showUnderlined", m_hints[QStringLiteral("showUnderlined")].toBool()); - - const QFont font = qApp->font(m_itemType == ComboBoxItem ?"QComboMenuItem" : "QMenu"); - opt->font = font; - opt->fontMetrics = QFontMetrics(font); - m_font = opt->font; - } - } - break; - case CheckBox: - case RadioButton: - { - if (!m_styleoption) - m_styleoption = new QStyleOptionButton(); - - QStyleOptionButton *opt = qstyleoption_cast<QStyleOptionButton*>(m_styleoption); - if (!on()) - opt->state |= QStyle::State_Off; - if (m_properties.value(QStringLiteral("partiallyChecked")).toBool()) - opt->state |= QStyle::State_NoChange; - opt->text = text(); - } - break; - case Edit: { - if (!m_styleoption) - m_styleoption = new QStyleOptionFrame(); - - QStyleOptionFrame *opt = qstyleoption_cast<QStyleOptionFrame*>(m_styleoption); - opt->lineWidth = qMax(1, KyQuickStyleItem::style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption, nullptr)); //this must be non zero - } - break; - case ComboBox :{ - if (!m_styleoption) - m_styleoption = new QStyleOptionComboBox(); - - QStyleOptionComboBox *opt = qstyleoption_cast<QStyleOptionComboBox*>(m_styleoption); - - const QFont font = qApp->font("QPushButton"); //DAVE - QQC1 code does this, but if you look at QComboBox this doesn't make sense - opt->fontMetrics = QFontMetrics(font); - opt->currentText = text(); - opt->editable = m_properties[QStringLiteral("editable")].toBool(); - - const QVariant icon = m_properties[QStringLiteral("currentIcon")]; - if (icon.canConvert<QIcon>()) { - opt->currentIcon = icon.value<QIcon>(); - } else if (icon.canConvert<QString>()) { - opt->currentIcon = QIcon::fromTheme(icon.value<QString>()); - } - auto iconSize = QSize(m_properties[QStringLiteral("iconWidth")].toInt(), - m_properties[QStringLiteral("iconHeight")].toInt()); - if (iconSize.isEmpty()) { - int e = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_ButtonIconSize, m_styleoption, nullptr); - if (iconSize.width() <= 0) { - iconSize.setWidth(e); - } - if (iconSize.height() <= 0) { - iconSize.setHeight(e); - } - } - opt->iconSize = iconSize; - } - break; - case SpinBox: { - if (!m_styleoption) - m_styleoption = new QStyleOptionSpinBox(); - - QStyleOptionSpinBox *opt = qstyleoption_cast<QStyleOptionSpinBox*>(m_styleoption); - opt->frame = true; - opt->subControls = QStyle::SC_SpinBoxFrame | QStyle::SC_SpinBoxEditField; - if (value() & 0x1) - opt->activeSubControls = QStyle::SC_SpinBoxUp; - else if (value() & (1<<1)) - opt->activeSubControls = QStyle::SC_SpinBoxDown; - opt->subControls = QStyle::SC_All; - opt->stepEnabled = {}; - if (value() & (1<<2)) - opt->stepEnabled |= QAbstractSpinBox::StepUpEnabled; - if (value() & (1<<3)) - opt->stepEnabled |= QAbstractSpinBox::StepDownEnabled; - } - break; - case Slider: - case Dial: - { - if (!m_styleoption) - m_styleoption = new QStyleOptionSlider(); - - QStyleOptionSlider *opt = qstyleoption_cast<QStyleOptionSlider*>(m_styleoption); - opt->orientation = horizontal() ? Qt::Horizontal : Qt::Vertical; - opt->upsideDown = !horizontal(); - - int min = minimum(); - int max = std::max(min, maximum()); - - opt->minimum = min; - opt->maximum = max; - opt->sliderPosition = value(); - opt->singleStep = step(); - - if (opt->singleStep) { - qreal numOfSteps = (opt->maximum - opt->minimum) / opt->singleStep; - // at least 5 pixels between tick marks - qreal extent = horizontal() ? width() : height(); - if (numOfSteps && (extent / numOfSteps < 5)) - opt->tickInterval = qRound((5 * numOfSteps / extent) + 0.5) * step(); - else - opt->tickInterval = opt->singleStep; - - } else // default Qt-components implementation - opt->tickInterval = opt->maximum != opt->minimum ? 1200 / (opt->maximum - opt->minimum) : 0; - - opt->sliderValue = value(); - opt->subControls = QStyle::SC_SliderGroove | QStyle::SC_SliderHandle; - opt->tickPosition = activeControl() == QLatin1String("ticks") ? - QSlider::TicksBelow : QSlider::NoTicks; - if (opt->tickPosition != QSlider::NoTicks) - opt->subControls |= QStyle::SC_SliderTickmarks; - - opt->activeSubControls = QStyle::SC_SliderHandle; - } - break; - case ProgressBar: { - if (!m_styleoption) - m_styleoption = new QStyleOptionProgressBar(); - - QStyleOptionProgressBar *opt = qstyleoption_cast<QStyleOptionProgressBar*>(m_styleoption); - opt->orientation = horizontal() ? Qt::Horizontal : Qt::Vertical; - opt->minimum = qMax(0, minimum()); - opt->maximum = qMax(0, maximum()); - opt->progress = value(); - } - break; - case GroupBox: { - if (!m_styleoption) - m_styleoption = new QStyleOptionGroupBox(); - - QStyleOptionGroupBox *opt = qstyleoption_cast<QStyleOptionGroupBox*>(m_styleoption); - opt->text = text(); - opt->lineWidth = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption, nullptr); - opt->subControls = QStyle::SC_GroupBoxLabel; - opt->features = {}; - if (m_properties[QStringLiteral("sunken")].toBool()) { // Qt draws an ugly line here so I ignore it - opt->subControls |= QStyle::SC_GroupBoxFrame; - } else { - opt->features |= QStyleOptionFrame::Flat; - } - if (m_properties[QStringLiteral("checkable")].toBool()) - opt->subControls |= QStyle::SC_GroupBoxCheckBox; - - } - break; - case ScrollBar: { - if (!m_styleoption) - m_styleoption = new QStyleOptionSlider(); - - QStyleOptionSlider *opt = qstyleoption_cast<QStyleOptionSlider*>(m_styleoption); - opt->minimum = qMax(0, minimum()); - opt->maximum = qMax(0, maximum()); - opt->pageStep = qMax(0, int(horizontal() ? width() : height())); - opt->orientation = horizontal() ? Qt::Horizontal : Qt::Vertical; - opt->sliderPosition = value(); - opt->sliderValue = value(); - opt->activeSubControls = (activeControl() == QLatin1String("up")) - ? QStyle::SC_ScrollBarSubLine : (activeControl() == QLatin1String("down")) ? - QStyle::SC_ScrollBarAddLine : - (activeControl() == QLatin1String("handle")) ? - QStyle::SC_ScrollBarSlider : hover() ? QStyle::SC_ScrollBarGroove : QStyle::SC_None; - if (raised()) - opt->state |= QStyle::State_On; - - opt->sliderValue = value(); - opt->subControls = QStyle::SC_All; - - setTransient(KyQuickStyleItem::style()->styleHint(QStyle::SH_ScrollBar_Transient, m_styleoption)); - break; - } - default: - break; - } - - if (!m_styleoption) - m_styleoption = new QStyleOption(); - - if (needsResolvePalette) - resolvePalette(); - - m_styleoption->styleObject = this; - m_styleoption->direction = qApp->layoutDirection(); - - int w = m_textureWidth > 0 ? m_textureWidth : width(); - int h = m_textureHeight > 0 ? m_textureHeight : height(); - - m_styleoption->rect = QRect(m_paintMargins, 0, w - 2* m_paintMargins, h); - - if (isEnabled()) { - m_styleoption->state |= QStyle::State_Enabled; - m_styleoption->palette.setCurrentColorGroup(QPalette::Active); - } else { - m_styleoption->palette.setCurrentColorGroup(QPalette::Disabled); - } - if (m_active) - m_styleoption->state |= QStyle::State_Active; - else - m_styleoption->palette.setCurrentColorGroup(QPalette::Inactive); - if (m_sunken) - m_styleoption->state |= QStyle::State_Sunken; - if (m_raised) - m_styleoption->state |= QStyle::State_Raised; - if (m_selected) - m_styleoption->state |= QStyle::State_Selected; - if (m_focus) - m_styleoption->state |= QStyle::State_HasFocus; - if (m_on) - m_styleoption->state |= QStyle::State_On; - if (m_hover) - m_styleoption->state |= QStyle::State_MouseOver; - if (m_horizontal) - m_styleoption->state |= QStyle::State_Horizontal; - - // some styles don't draw a focus rectangle if - // QStyle::State_KeyboardFocusChange is not set - if (window()) { - if (m_lastFocusReason == Qt::TabFocusReason || m_lastFocusReason == Qt::BacktabFocusReason) { - m_styleoption->state |= QStyle::State_KeyboardFocusChange; - } - } - - if (sizeHint == QLatin1String("mini")) { - m_styleoption->state |= QStyle::State_Mini; - } else if (sizeHint == QLatin1String("small")) { - m_styleoption->state |= QStyle::State_Small; - } - -} - -const char* KyQuickStyleItem::classNameForItem() const -{ - switch(m_itemType) { - case Button: - return "QPushButton"; - case RadioButton: - return "QRadioButton"; - case CheckBox: - return "QCheckBox"; - case ComboBox: - return "QComboBox"; - case ComboBoxItem: - return "QComboMenuItem"; - case ToolBar: - return ""; - case ToolButton: - return "QToolButton"; - case Tab: - return "QTabButton"; - case TabFrame: - return "QTabBar"; - case Edit: - return "QTextEdit"; - case GroupBox: - return "QGroupBox"; - case Header: - return "QHeaderView"; - case Item: - case ItemRow: - return "QAbstractItemView"; - case Menu: - case MenuItem: - return "QMenu"; - case MenuBar: - case MenuBarItem: - return "QMenuBar"; - default: - return ""; - } - Q_UNREACHABLE(); -} - -void KyQuickStyleItem::resolvePalette() -{ - if (QCoreApplication::testAttribute(Qt::AA_SetPalette)) - return; - - const QVariant controlPalette = m_control ? m_control->property("palette") : QVariant(); - if (controlPalette.isValid()) { - m_styleoption->palette = controlPalette.value<QPalette>(); - } else { -// m_styleoption->palette = m_theme->palette(); - } -} - -int KyQuickStyleItem::leftPadding() const -{ - switch (m_itemType) { - case Frame: { - const QRect cr = KyQuickStyleItem::style()->subElementRect(QStyle::SE_ShapedFrameContents, m_styleoption); - return cr.left() - m_styleoption->rect.left(); - } - default: - return 0; - } -} - -int KyQuickStyleItem::topPadding() const -{ - switch (m_itemType) { - case Frame: { - const QRect cr = KyQuickStyleItem::style()->subElementRect(QStyle::SE_ShapedFrameContents, m_styleoption); - return cr.top() - m_styleoption->rect.top(); - } - default: - return 0; - } -} - -int KyQuickStyleItem::rightPadding() const -{ - switch (m_itemType) { - case Frame: { - const QRect cr = KyQuickStyleItem::style()->subElementRect(QStyle::SE_ShapedFrameContents, m_styleoption); - return m_styleoption->rect.right() - cr.right(); - } - default: - return 0; - } -} - -int KyQuickStyleItem::bottomPadding() const -{ - switch (m_itemType) { - case Frame: { - const QRect cr = KyQuickStyleItem::style()->subElementRect(QStyle::SE_ShapedFrameContents, m_styleoption); - return m_styleoption->rect.bottom() - cr.bottom(); - } - default: - return 0; - } -} - -/* - * Property style - * - * Returns a simplified style name. - * - * QMacStyle = "mac" - * QWindowsXPStyle = "windowsxp" - * QFusionStyle = "fusion" - */ - -QString KyQuickStyleItem::styleName() const -{ - QString style = QString::fromLatin1(KyQuickStyleItem::style()->metaObject()->className()); - style = style.toLower(); - if (style.startsWith(QLatin1Char('q'))) - style = style.right(style.length() - 1); - if (style.endsWith(QLatin1String("style"))) - style = style.left(style.length() - 5); - return style; -} - -QString KyQuickStyleItem::hitTest(int px, int py) -{ - QStyle::SubControl subcontrol = QStyle::SC_All; - switch (m_itemType) { - case SpinBox :{ - subcontrol = KyQuickStyleItem::style()->hitTestComplexControl(QStyle::CC_SpinBox, - qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), - QPoint(px,py), nullptr); - if (subcontrol == QStyle::SC_SpinBoxUp) - return QStringLiteral("up"); - else if (subcontrol == QStyle::SC_SpinBoxDown) - return QStringLiteral("down"); - } - break; - - case Slider: { - subcontrol = KyQuickStyleItem::style()->hitTestComplexControl(QStyle::CC_Slider, - qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), - QPoint(px,py), nullptr); - if (subcontrol == QStyle::SC_SliderHandle) - return QStringLiteral("handle"); - } - break; - - case ScrollBar: { - subcontrol = KyQuickStyleItem::style()->hitTestComplexControl(QStyle::CC_ScrollBar, - qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), - QPoint(px,py), nullptr); - switch (subcontrol) { - case QStyle::SC_ScrollBarSlider: - return QStringLiteral("handle"); - - case QStyle::SC_ScrollBarSubLine: - return QStringLiteral("up"); - - case QStyle::SC_ScrollBarSubPage: - return QStringLiteral("upPage"); - - case QStyle::SC_ScrollBarAddLine: - return QStringLiteral("down"); - - case QStyle::SC_ScrollBarAddPage: - return QStringLiteral("downPage"); - - default: - break; - } - } - break; - - default: - break; - } - return QStringLiteral("none"); -} - -QSize KyQuickStyleItem::sizeFromContents(int width, int height) -{ - initStyleOption(); - - QSize size; - switch (m_itemType) { - case RadioButton: - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_RadioButton, m_styleoption, QSize(width,height)); - break; - case CheckBox: - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_CheckBox, m_styleoption, QSize(width,height)); - break; - case ToolBar: - size = QSize(200, styleName().contains(QLatin1String("windows")) ? 30 : 42); - break; - case ToolButton: { - QStyleOptionToolButton *btn = qstyleoption_cast<QStyleOptionToolButton*>(m_styleoption); - int w = 0; - int h = 0; - if (btn->toolButtonStyle != Qt::ToolButtonTextOnly) { - QSize icon = btn->iconSize; - w = icon.width(); - h = icon.height(); - } - if (btn->toolButtonStyle != Qt::ToolButtonIconOnly) { - QSize textSize = btn->fontMetrics.size(Qt::TextShowMnemonic, btn->text); - textSize.setWidth(textSize.width() + btn->fontMetrics.horizontalAdvance(QLatin1Char(' '))*2); - if (btn->toolButtonStyle == Qt::ToolButtonTextUnderIcon) { - h += 4 + textSize.height(); - if (textSize.width() > w) - w = textSize.width(); - } else if (btn->toolButtonStyle == Qt::ToolButtonTextBesideIcon) { - w += 4 + textSize.width(); - if (textSize.height() > h) - h = textSize.height(); - } else { // TextOnly - w = textSize.width(); - h = textSize.height(); - } - } - btn->rect.setSize(QSize(w, h)); - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_ToolButton, m_styleoption, QSize(w, h)); } - break; - case Button: { - QStyleOptionButton *btn = qstyleoption_cast<QStyleOptionButton*>(m_styleoption); - - int contentWidth = btn->fontMetrics.boundingRect(btn->text).width(); - int contentHeight = btn->fontMetrics.height(); - - if (!btn->icon.isNull()) { - //+4 matches a hardcoded value in QStyle and acts as a margin between the icon and the text. - contentWidth += btn->iconSize.width() + 4; - contentHeight = qMax(btn->fontMetrics.height(), btn->iconSize.height()); - } - - int newWidth = qMax(width, contentWidth); - int newHeight = qMax(height, contentHeight); - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_PushButton, m_styleoption, QSize(newWidth, newHeight)); } - break; - case ComboBox: { - QStyleOptionComboBox *btn = qstyleoption_cast<QStyleOptionComboBox*>(m_styleoption); - int newWidth = qMax(width, btn->fontMetrics.boundingRect(btn->currentText).width()); - int newHeight = qMax(height, btn->fontMetrics.height()); - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_ComboBox, m_styleoption, QSize(newWidth, newHeight)); } - break; - case Tab: { - QStyleOptionTab *tab = qstyleoption_cast<QStyleOptionTab*>(m_styleoption); - - int contentWidth = tab->fontMetrics.boundingRect(tab->text).width(); - int contentHeight = tab->fontMetrics.height(); - - if (!tab->icon.isNull()) { - //+4 matches a hardcoded value in QStyle and acts as a margin between the icon and the text. - contentWidth += tab->iconSize.width() + 4; - contentHeight = qMax(contentHeight, tab->iconSize.height()); - } - - contentWidth += KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarTabHSpace, tab); - contentHeight += KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarTabVSpace, tab); - - const int newWidth = qMax(width, contentWidth); - const int newHeight = qMax(height, contentHeight); - - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_TabBarTab, m_styleoption, QSize(newWidth, newHeight)); - - break; - } - case Slider: - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_Slider, m_styleoption, QSize(width,height)); - break; - case ProgressBar: - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_ProgressBar, m_styleoption, QSize(width,height)); - break; - case SpinBox: - case Edit: - { - // We have to create a new style option since we might be calling with a QStyleOptionSpinBox - QStyleOptionFrame frame; - //+2 to be consistent with the hardcoded verticalmargin in QLineEdit - int contentHeight = frame.fontMetrics.height() + 2; - - frame.state = m_styleoption->state | QStyle::State_Sunken; - frame.lineWidth = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption, nullptr); - frame.rect = m_styleoption->rect; - frame.styleObject = this; - - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_LineEdit, - &frame, QSize(width, qMax(height, contentHeight)).expandedTo(QApplication::globalStrut())); - if (m_itemType == SpinBox) { - size.setWidth(KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_SpinBox, - m_styleoption, QSize(width + 2, height)).width()); - } - } - break; - case GroupBox: { - QStyleOptionGroupBox *box = qstyleoption_cast<QStyleOptionGroupBox*>(m_styleoption); - QFontMetrics metrics(box->fontMetrics); - int baseWidth = metrics.boundingRect(box->text + QLatin1Char(' ')).width(); - int baseHeight = metrics.height() + m_contentHeight; - if (box->subControls & QStyle::SC_GroupBoxCheckBox) { - baseWidth += KyQuickStyleItem::style()->pixelMetric(QStyle::PM_IndicatorWidth); - baseWidth += KyQuickStyleItem::style()->pixelMetric(QStyle::PM_CheckBoxLabelSpacing); - baseHeight = qMax(baseHeight, KyQuickStyleItem::style()->pixelMetric(QStyle::PM_IndicatorHeight)); - } - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_GroupBox, m_styleoption, QSize(qMax(baseWidth, m_contentWidth), baseHeight)); - } - break; - case Header: - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_HeaderSection, m_styleoption, QSize(width,height)); - break; - case ItemRow: - case Item: //fall through - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_ItemViewItem, m_styleoption, QSize(width,height)); - break; - case MenuBarItem: - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_MenuBarItem, m_styleoption, QSize(width,height)); - break; - case MenuBar: - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_MenuBar, m_styleoption, QSize(width,height)); - break; - case Menu: - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_Menu, m_styleoption, QSize(width,height)); - break; - case MenuItem: - case ComboBoxItem: - if (static_cast<QStyleOptionMenuItem *>(m_styleoption)->menuItemType == QStyleOptionMenuItem::Scroller) { - size.setHeight(qMax(QApplication::globalStrut().height(), - KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuScrollerHeight, nullptr, nullptr))); - } else { - size = KyQuickStyleItem::style()->sizeFromContents(QStyle::CT_MenuItem, m_styleoption, QSize(width,height)); - } - break; - default: - break; - } - return size.expandedTo(QSize(m_contentWidth, m_contentHeight)); -} - -qreal KyQuickStyleItem::baselineOffset() -{ - QRect r; - bool ceilResult = true; // By default baseline offset rounding is done upwards - switch (m_itemType) { - case RadioButton: - r = KyQuickStyleItem::style()->subElementRect(QStyle::SE_RadioButtonContents, m_styleoption); - break; - case Button: - r = KyQuickStyleItem::style()->subElementRect(QStyle::SE_PushButtonContents, m_styleoption); - break; - case CheckBox: - r = KyQuickStyleItem::style()->subElementRect(QStyle::SE_CheckBoxContents, m_styleoption); - break; - case Edit: - r = KyQuickStyleItem::style()->subElementRect(QStyle::SE_LineEditContents, m_styleoption); - break; - case ComboBox: - if (const QStyleOptionComboBox *combo = qstyleoption_cast<const QStyleOptionComboBox *>(m_styleoption)) { - r = KyQuickStyleItem::style()->subControlRect(QStyle::CC_ComboBox, combo, QStyle::SC_ComboBoxEditField); - if (styleName() != QLatin1String("mac")) - r.adjust(0,0,0,1); - } - break; - case SpinBox: - if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(m_styleoption)) { - r = KyQuickStyleItem::style()->subControlRect(QStyle::CC_SpinBox, spinbox, QStyle::SC_SpinBoxEditField); - ceilResult = false; - } - break; - default: - break; - } - if (r.height() > 0) { - const QFontMetrics &fm = m_styleoption->fontMetrics; - int surplus = r.height() - fm.height(); - if ((surplus & 1) && ceilResult) - surplus++; - int result = r.top() + surplus/2 + fm.ascent(); - return result; - } - - return 0.; -} - -void KyQuickStyleItem::updateBaselineOffset() -{ - const qreal baseline = baselineOffset(); - if (baseline > 0) - setBaselineOffset(baseline); -} - -void KyQuickStyleItem::setContentWidth(int arg) -{ - if (m_contentWidth != arg) { - m_contentWidth = arg; - emit contentWidthChanged(arg); - } -} - -void KyQuickStyleItem::setContentHeight(int arg) -{ - if (m_contentHeight != arg) { - m_contentHeight = arg; - emit contentHeightChanged(arg); - } -} - -void KyQuickStyleItem::updateSizeHint() -{ - QSize implicitSize = sizeFromContents(m_contentWidth, m_contentHeight); - setImplicitSize(implicitSize.width(), implicitSize.height()); -} - -void KyQuickStyleItem::updateRect() -{ - initStyleOption(); - m_styleoption->rect.setWidth(width()); - m_styleoption->rect.setHeight(height()); -} - -int KyQuickStyleItem::pixelMetric(const QString &metric) -{ - if (metric == QLatin1String("scrollbarExtent")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_ScrollBarExtent, nullptr); - else if (metric == QLatin1String("defaultframewidth")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_DefaultFrameWidth, m_styleoption); - else if (metric == QLatin1String("taboverlap")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarTabOverlap, nullptr); - else if (metric == QLatin1String("tabbaseoverlap")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarBaseOverlap, m_styleoption); - else if (metric == QLatin1String("tabhspace")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarTabHSpace, nullptr); - else if (metric == QLatin1String("indicatorwidth")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_IndicatorWidth, nullptr); - else if (metric == QLatin1String("exclusiveindicatorwidth")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_ExclusiveIndicatorWidth, nullptr); - else if (metric == QLatin1String("checkboxlabelspacing")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_CheckBoxLabelSpacing, nullptr); - else if (metric == QLatin1String("ratiobuttonlabelspacing")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_RadioButtonLabelSpacing, nullptr); - else if (metric == QLatin1String("tabvspace")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarTabVSpace, nullptr); - else if (metric == QLatin1String("tabbaseheight")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarBaseHeight, nullptr); - else if (metric == QLatin1String("tabvshift")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TabBarTabShiftVertical, nullptr); - else if (metric == QLatin1String("menubarhmargin")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuBarHMargin, nullptr); - else if (metric == QLatin1String("menubarvmargin")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuBarVMargin, nullptr); - else if (metric == QLatin1String("menubarpanelwidth")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuBarPanelWidth, nullptr); - else if (metric == QLatin1String("menubaritemspacing")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuBarItemSpacing, nullptr); - else if (metric == QLatin1String("spacebelowmenubar")) - return KyQuickStyleItem::style()->styleHint(QStyle::SH_MainWindow_SpaceBelowMenuBar, m_styleoption); - else if (metric == QLatin1String("menuhmargin")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuHMargin, nullptr); - else if (metric == QLatin1String("menuvmargin")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuVMargin, nullptr); - else if (metric == QLatin1String("menupanelwidth")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuPanelWidth, nullptr); - else if (metric == QLatin1String("submenuoverlap")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_SubMenuOverlap, nullptr); - else if (metric == QLatin1String("splitterwidth")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_SplitterWidth, nullptr); - else if (metric == QLatin1String("scrollbarspacing")) - return abs(KyQuickStyleItem::style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarSpacing, nullptr)); - else if (metric == QLatin1String("treeviewindentation")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_TreeViewIndentation, nullptr); - else if (metric == QLatin1String("layouthorizontalspacing")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing, nullptr); - else if (metric == QLatin1String("layoutverticalspacing")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing, nullptr); - else if (metric == QLatin1String("layoutleftmargin")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_LayoutLeftMargin, nullptr); - else if (metric == QLatin1String("layouttopmargin")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_LayoutTopMargin, nullptr); - else if (metric == QLatin1String("layoutrightmargin")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_LayoutRightMargin, nullptr); - else if (metric == QLatin1String("layoutbottommargin")) - return KyQuickStyleItem::style()->pixelMetric(QStyle::PM_LayoutBottomMargin, nullptr); - return 0; -} - -QVariant KyQuickStyleItem::styleHint(const QString &metric) -{ - initStyleOption(); - if (metric == QLatin1String("comboboxpopup")) { - return KyQuickStyleItem::style()->styleHint(QStyle::SH_ComboBox_Popup, m_styleoption); - } else if (metric == QLatin1String("highlightedTextColor")) { - return m_styleoption->palette.highlightedText().color().name(); - } else if (metric == QLatin1String("textColor")) { - QPalette pal = m_styleoption->palette; - pal.setCurrentColorGroup(active()? QPalette::Active : QPalette::Inactive); - return pal.text().color().name(); - } else if (metric == QLatin1String("focuswidget")) { - return KyQuickStyleItem::style()->styleHint(QStyle::SH_FocusFrame_AboveWidget); - } else if (metric == QLatin1String("tabbaralignment")) { - int result = KyQuickStyleItem::style()->styleHint(QStyle::SH_TabBar_Alignment); - if (result == Qt::AlignCenter) - return QStringLiteral("center"); - return QStringLiteral("left"); - } else if (metric == QLatin1String("externalScrollBars")) { - return KyQuickStyleItem::style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents); - } else if (metric == QLatin1String("scrollToClickPosition")) - return KyQuickStyleItem::style()->styleHint(QStyle::SH_ScrollBar_LeftClickAbsolutePosition); - else if (metric == QLatin1String("activateItemOnSingleClick")) - return KyQuickStyleItem::style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick); - else if (metric == QLatin1String("submenupopupdelay")) - return KyQuickStyleItem::style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, m_styleoption); - else if (metric == QLatin1String("wheelScrollLines")) - return qApp->wheelScrollLines(); - return 0; - - // Add SH_Menu_SpaceActivatesItem -} - -void KyQuickStyleItem::setHints(const QVariantMap &str) -{ - if (m_hints != str) { - m_hints = str; - initStyleOption(); - updateSizeHint(); - if (m_styleoption->state & QStyle::State_Mini) { - m_font.setPointSize(9.); - emit fontChanged(); - } else if (m_styleoption->state & QStyle::State_Small) { - m_font.setPointSize(11.); - emit fontChanged(); - } else { - emit hintChanged(); - } - } -} - -void KyQuickStyleItem::resetHints() -{ - m_hints.clear(); -} - - -void KyQuickStyleItem::setElementType(const QString &str) -{ - if (m_type == str) - return; - - m_type = str; - - emit elementTypeChanged(); - if (m_styleoption) { - delete m_styleoption; - m_styleoption = nullptr; - } - - // Only enable visible if the widget can animate - if (str == QLatin1String("menu")) { - m_itemType = Menu; - } else if (str == QLatin1String("menuitem")) { - m_itemType = MenuItem; - } else if (str == QLatin1String("item") || str == QLatin1String("itemrow") || str == QLatin1String("header")) { - if (str == QLatin1String("header")) { - m_itemType = Header; - } else { - m_itemType = str == QLatin1String("item") ? Item : ItemRow; - } - } else if (str == QLatin1String("itembranchindicator")) { - m_itemType = ItemBranchIndicator; - } else if (str == QLatin1String("groupbox")) { - m_itemType = GroupBox; - } else if (str == QLatin1String("tab")) { - m_itemType = Tab; - } else if (str == QLatin1String("tabframe")) { - m_itemType = TabFrame; - } else if (str == QLatin1String("comboboxitem")) { - // Gtk uses qobject cast, hence we need to separate this from menuitem - // On mac, we temporarily use the menu item because it has more accurate - // palette. - m_itemType = ComboBoxItem; - } else if (str == QLatin1String("toolbar")) { - m_itemType = ToolBar; - } else if (str == QLatin1String("toolbutton")) { - m_itemType = ToolButton; - } else if (str == QLatin1String("slider")) { - m_itemType = Slider; - } else if (str == QLatin1String("frame")) { - m_itemType = Frame; - } else if (str == QLatin1String("combobox")) { - m_itemType = ComboBox; - } else if (str == QLatin1String("splitter")) { - m_itemType = Splitter; - } else if (str == QLatin1String("progressbar")) { - m_itemType = ProgressBar; - } else if (str == QLatin1String("button")) { - m_itemType = Button; - } else if (str == QLatin1String("checkbox")) { - m_itemType = CheckBox; - } else if (str == QLatin1String("radiobutton")) { - m_itemType = RadioButton; - } else if (str == QLatin1String("edit")) { - m_itemType = Edit; - } else if (str == QLatin1String("spinbox")) { - m_itemType = SpinBox; - } else if (str == QLatin1String("scrollbar")) { - m_itemType = ScrollBar; - } else if (str == QLatin1String("widget")) { - m_itemType = Widget; - } else if (str == QLatin1String("focusframe")) { - m_itemType = FocusFrame; - } else if (str == QLatin1String("focusrect")) { - m_itemType = FocusRect; - } else if (str == QLatin1String("dial")) { - m_itemType = Dial; - } else if (str == QLatin1String("statusbar")) { - m_itemType = StatusBar; - } else if (str == QLatin1String("machelpbutton")) { - m_itemType = MacHelpButton; - } else if (str == QLatin1String("scrollareacorner")) { - m_itemType = ScrollAreaCorner; - } else if (str == QLatin1String("menubar")) { - m_itemType = MenuBar; - } else if (str == QLatin1String("menubaritem")) { - m_itemType = MenuBarItem; - } else { - m_itemType = Undefined; - } - emit leftPaddingChanged(); - emit rightPaddingChanged(); - emit topPaddingChanged(); - emit bottomPaddingChanged(); - updateSizeHint(); -} - -QRectF KyQuickStyleItem::subControlRect(const QString &subcontrolString) -{ - QStyle::SubControl subcontrol = QStyle::SC_None; - initStyleOption(); - switch (m_itemType) { - case SpinBox: - { - QStyle::ComplexControl control = QStyle::CC_SpinBox; - if (subcontrolString == QLatin1String("down")) - subcontrol = QStyle::SC_SpinBoxDown; - else if (subcontrolString == QLatin1String("up")) - subcontrol = QStyle::SC_SpinBoxUp; - else if (subcontrolString == QLatin1String("edit")){ - subcontrol = QStyle::SC_SpinBoxEditField; - } - return KyQuickStyleItem::style()->subControlRect(control, - qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), - subcontrol); - - } - break; - case Slider: - { - QStyle::ComplexControl control = QStyle::CC_Slider; - if (subcontrolString == QLatin1String("handle")) - subcontrol = QStyle::SC_SliderHandle; - else if (subcontrolString == QLatin1String("groove")) - subcontrol = QStyle::SC_SliderGroove; - return KyQuickStyleItem::style()->subControlRect(control, - qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), - subcontrol); - - } - break; - case ScrollBar: - { - QStyle::ComplexControl control = QStyle::CC_ScrollBar; - if (subcontrolString == QLatin1String("slider")) - subcontrol = QStyle::SC_ScrollBarSlider; - if (subcontrolString == QLatin1String("groove")) - subcontrol = QStyle::SC_ScrollBarGroove; - else if (subcontrolString == QLatin1String("handle")) - subcontrol = QStyle::SC_ScrollBarSlider; - else if (subcontrolString == QLatin1String("add")) - subcontrol = QStyle::SC_ScrollBarAddPage; - else if (subcontrolString == QLatin1String("sub")) - subcontrol = QStyle::SC_ScrollBarSubPage; - return KyQuickStyleItem::style()->subControlRect(control, - qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), - subcontrol); - } - break; - case ItemBranchIndicator: { - QStyleOption opt; - opt.rect = QRect(0, 0, implicitWidth(), implicitHeight()); - return KyQuickStyleItem::style()->subElementRect(QStyle::SE_TreeViewDisclosureItem, &opt, nullptr); - } - default: - break; - } - return QRectF(); -} - -namespace { -class QHighDpiPixmapsEnabler1 { -public: - QHighDpiPixmapsEnabler1() - :wasEnabled(false) - { - if (!qApp->testAttribute(Qt::AA_UseHighDpiPixmaps)) { - qApp->setAttribute(Qt::AA_UseHighDpiPixmaps); - wasEnabled = true; - } - } - - ~QHighDpiPixmapsEnabler1() - { - if (wasEnabled) - qApp->setAttribute(Qt::AA_UseHighDpiPixmaps, false); - } -private: - bool wasEnabled; -}; -} - -void KyQuickStyleItem::paint(QPainter *painter) -{ - initStyleOption(); - if (QStyleOptionMenuItem *opt = qstyleoption_cast<QStyleOptionMenuItem*>(m_styleoption)) - painter->setFont(opt->font); - else { - QFont font; - if (m_styleoption->state & QStyle::State_Mini) { - font = qApp->font("QMiniFont"); - } else if (m_styleoption->state & QStyle::State_Small) { - font = qApp->font("QSmallFont"); - } - painter->setFont(font); - } - - // Set AA_UseHighDpiPixmaps when calling style code to make QIcon return - // "retina" pixmaps. The flag is controlled by the application so we can't - // set it unconditinally. - QHighDpiPixmapsEnabler1 enabler; - - switch (m_itemType) { - case Button:{ - QWidget wid; - if(m_buttonType == "MaxButton" || m_buttonType == "MinButton") { - wid.setProperty("isWindowButton", QVariant(0x01)); - } - if(m_buttonType == "CloseButton") { - wid.setProperty("isWindowButton", QVariant(0x02)); - } - if(m_buttonType == "blueButton") { - wid.setProperty("isImportant", true); - } - if(m_roundButton == "RoundButton") { - wid.setProperty("isRoundButton", true); - } - KyQuickStyleItem::style()->drawControl(QStyle::CE_PushButton, m_styleoption, painter,&wid); -} - break; - case ItemRow :{ - QPixmap pixmap; - // Only draw through style once - const QString pmKey = QLatin1String("itemrow") % QString::number(m_styleoption->state,16) % activeControl(); - if (!QPixmapCache::find(pmKey, &pixmap) || pixmap.width() < width() || height() != pixmap.height()) { - int newSize = width(); - pixmap = QPixmap(newSize, height()); - pixmap.fill(Qt::transparent); - QPainter pixpainter(&pixmap); - KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_PanelItemViewRow, m_styleoption, &pixpainter); - if ((styleName() == QLatin1String("mac") || !KyQuickStyleItem::style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected)) && selected()) { - QPalette pal = QApplication::palette("QAbstractItemView"); - pal.setCurrentColorGroup(m_styleoption->palette.currentColorGroup()); - pixpainter.fillRect(m_styleoption->rect, pal.highlight()); - } - QPixmapCache::insert(pmKey, pixmap); - } - painter->drawPixmap(0, 0, pixmap); - } - break; - case Item: - KyQuickStyleItem::style()->drawControl(QStyle::CE_ItemViewItem, m_styleoption, painter); - break; - case ItemBranchIndicator: - KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_IndicatorBranch, m_styleoption, painter); - break; - case Header: - KyQuickStyleItem::style()->drawControl(QStyle::CE_Header, m_styleoption, painter); - break; - case ToolButton: - KyQuickStyleItem::style()->drawComplexControl(QStyle::CC_ToolButton, qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), painter); - break; - case Tab: - { - if (m_lastFocusReason != Qt::TabFocusReason && m_lastFocusReason != Qt::BacktabFocusReason) { - m_styleoption->state &= ~QStyle::State_HasFocus; - } - KyQuickStyleItem::style()->drawControl(QStyle::CE_TabBarTab, m_styleoption, painter); - } - break; - case Frame: - m_styleoption->state |= QStyle::State_Sunken; - m_styleoption->state &= ~QStyle::State_Raised; - KyQuickStyleItem::style()->drawControl(QStyle::CE_ShapedFrame, m_styleoption, painter); - break; - case FocusFrame: - KyQuickStyleItem::style()->drawControl(QStyle::CE_FocusFrame, m_styleoption, painter); - break; - case FocusRect: - KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_FrameFocusRect, m_styleoption, painter); - break; - case TabFrame: - KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_FrameTabWidget, m_styleoption, painter); - break; - case MenuBar: - KyQuickStyleItem::style()->drawControl(QStyle::CE_MenuBarEmptyArea, m_styleoption, painter); - break; - case MenuBarItem: - KyQuickStyleItem::style()->drawControl(QStyle::CE_MenuBarItem, m_styleoption, painter); - break; - case MenuItem: - case ComboBoxItem: { // fall through - QStyle::ControlElement menuElement = - static_cast<QStyleOptionMenuItem *>(m_styleoption)->menuItemType == QStyleOptionMenuItem::Scroller ? - QStyle::CE_MenuScroller : QStyle::CE_MenuItem; - KyQuickStyleItem::style()->drawControl(menuElement, m_styleoption, painter); - } - break; - case CheckBox: - KyQuickStyleItem::style()->drawControl(QStyle::CE_CheckBox, m_styleoption, painter); - break; - case RadioButton: - KyQuickStyleItem::style()->drawControl(QStyle::CE_RadioButton, m_styleoption, painter); - break; - case Edit: - KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_PanelLineEdit, m_styleoption, painter); - break; - case MacHelpButton: - //Not managed as mac is not supported - break; - case Widget: - KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_Widget, m_styleoption, painter); - break; - case ScrollAreaCorner: - KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_PanelScrollAreaCorner, m_styleoption, painter); - break; - case Splitter: - if (m_styleoption->rect.width() == 1) - painter->fillRect(0, 0, width(), height(), m_styleoption->palette.dark().color()); - else - KyQuickStyleItem::style()->drawControl(QStyle::CE_Splitter, m_styleoption, painter); - break; - case ComboBox: - { - KyQuickStyleItem::style()->drawComplexControl(QStyle::CC_ComboBox, - qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), - painter); - // This is needed on mac as it will use the painter color and ignore the palette - QPen pen = painter->pen(); - painter->setPen(m_styleoption->palette.text().color()); - KyQuickStyleItem::style()->drawControl(QStyle::CE_ComboBoxLabel, m_styleoption, painter); - painter->setPen(pen); - } break; - case SpinBox: -#ifdef Q_OS_MAC - // macstyle depends on the embedded qlineedit to fill the editfield background - if (styleName() == QLatin1String("mac")) { - QRect editRect = KyQuickStyleItem::style()->subControlRect(QStyle::CC_SpinBox, - qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), - QStyle::SC_SpinBoxEditField); - painter->fillRect(editRect.adjusted(-1, -1, 1, 1), m_styleoption->palette.base()); - } -#endif - KyQuickStyleItem::style()->drawComplexControl(QStyle::CC_SpinBox, - qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), - painter); - break; - case Slider: - KyQuickStyleItem::style()->drawComplexControl(QStyle::CC_Slider, - qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), - painter); - break; - case Dial: - KyQuickStyleItem::style()->drawComplexControl(QStyle::CC_Dial, - qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), - painter); - break; - case ProgressBar: - KyQuickStyleItem::style()->drawControl(QStyle::CE_ProgressBar, m_styleoption, painter); - break; - case ToolBar: - painter->fillRect(m_styleoption->rect, m_styleoption->palette.window().color()); - KyQuickStyleItem::style()->drawControl(QStyle::CE_ToolBar, m_styleoption, painter); - painter->save(); - painter->setPen(styleName() != QLatin1String("fusion") ? m_styleoption->palette.dark().color().darker(120) : - m_styleoption->palette.window().color().lighter(107)); - painter->drawLine(m_styleoption->rect.bottomLeft(), m_styleoption->rect.bottomRight()); - painter->restore(); - break; - case StatusBar: - { - painter->fillRect(m_styleoption->rect, m_styleoption->palette.window().color()); - painter->setPen(m_styleoption->palette.dark().color().darker(120)); - painter->drawLine(m_styleoption->rect.topLeft(), m_styleoption->rect.topRight()); - KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_PanelStatusBar, m_styleoption, painter); - } - break; - case GroupBox: - KyQuickStyleItem::style()->drawComplexControl(QStyle::CC_GroupBox, qstyleoption_cast<QStyleOptionComplex*>(m_styleoption), painter); - break; - case ScrollBar: - KyQuickStyleItem::style()->drawComplexControl(QStyle::CC_ScrollBar, qstyleoption_cast<QStyleOptionSlider *>(m_styleoption), painter); - break; - case Menu: { - QStyleHintReturnMask val; - KyQuickStyleItem::style()->styleHint(QStyle::SH_Menu_Mask, m_styleoption, nullptr, &val); - painter->save(); - painter->setClipRegion(val.region); - painter->fillRect(m_styleoption->rect, m_styleoption->palette.window()); - painter->restore(); - KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_PanelMenu, m_styleoption, painter); - - if (int fw = KyQuickStyleItem::style()->pixelMetric(QStyle::PM_MenuPanelWidth)) { - QStyleOptionFrame frame; - frame.state = QStyle::State_None; - frame.lineWidth = fw; - frame.midLineWidth = 0; - frame.rect = m_styleoption->rect; - frame.styleObject = this; - frame.palette = m_styleoption->palette; - KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_FrameMenu, &frame, painter); - } - } - break; - default: - break; - } -} - -qreal KyQuickStyleItem::textWidth(const QString &text) -{ - QFontMetricsF fm = QFontMetricsF(m_styleoption->fontMetrics); - return fm.boundingRect(text).width(); -} - -qreal KyQuickStyleItem::textHeight(const QString &text) -{ - QFontMetricsF fm = QFontMetricsF(m_styleoption->fontMetrics); - return text.isEmpty() ? fm.height() : - fm.boundingRect(text).height(); -} - -QString KyQuickStyleItem::elidedText(const QString &text, int elideMode, int width) -{ - return m_styleoption->fontMetrics.elidedText(text, Qt::TextElideMode(elideMode), width); -} - -bool KyQuickStyleItem::hasThemeIcon(const QString &icon) const -{ - return QIcon::hasThemeIcon(icon); -} - -bool KyQuickStyleItem::event(QEvent *ev) -{ - if (ev->type() == QEvent::StyleAnimationUpdate) { - if (isVisible()) { - ev->accept(); - polish(); - } - return true; - } - return QQuickItem::event(ev); -} - -void KyQuickStyleItem::setTextureWidth(int w) -{ - if (m_textureWidth == w) - return; - m_textureWidth = w; - emit textureWidthChanged(m_textureWidth); - update(); -} - -void KyQuickStyleItem::setTextureHeight(int h) -{ - if (m_textureHeight == h) - return; - m_textureHeight = h; - emit textureHeightChanged(m_textureHeight); - update(); -} - -QQuickItem *KyQuickStyleItem::control() const -{ - return m_control; -} - -void KyQuickStyleItem::setControl(QQuickItem *control) -{ - if (control == m_control) { - return; - } - - if (m_control) { - m_control->removeEventFilter(this); - disconnect(m_control, nullptr, this, nullptr); - } - - m_control = control; - - if (m_control) { - m_control->installEventFilter(this); - - if (m_control->window()) { - m_window = m_control->window(); - m_window->installEventFilter(this); - } - connect(m_control, &QQuickItem::windowChanged, this, - [this](QQuickWindow *window) { - if (m_window) { - m_window->removeEventFilter(this); - } - m_window = window; - if (m_window) { - m_window->installEventFilter(this); - } - }); - } - - emit controlChanged(); -} - -QSGNode *KyQuickStyleItem::updatePaintNode(QSGNode *node, UpdatePaintNodeData *) -{ - if (m_image.isNull()) { - delete node; - return nullptr; - } - - QSGNinePatchNode *styleNode = static_cast<QSGNinePatchNode *>(node); - if (!styleNode) - styleNode = window()->createNinePatchNode(); - -#ifdef QSG_RUNTIME_DESCRIPTION - qsgnode_set_description(styleNode, - QString::fromLatin1("%1:%2, '%3'") - .arg(styleName()) - .arg(elementType()) - .arg(text())); -#endif - - styleNode->setTexture(window()->createTextureFromImage(m_image, QQuickWindow::TextureCanUseAtlas)); - styleNode->setBounds(boundingRect()); - styleNode->setDevicePixelRatio(window()->devicePixelRatio()); - styleNode->setPadding(m_border.left(), m_border.top(), m_border.right(), m_border.bottom()); - styleNode->update(); - - return styleNode; -} - -void KyQuickStyleItem::updatePolish() -{ - if (width() >= 1 && height() >= 1) { // Note these are reals so 1 pixel is minimum - float devicePixelRatio = window() ? window()->devicePixelRatio() : qApp->devicePixelRatio(); - int w = m_textureWidth > 0 ? m_textureWidth : width(); - int h = m_textureHeight > 0 ? m_textureHeight : height(); - m_image = QImage(w * devicePixelRatio, h * devicePixelRatio, QImage::Format_ARGB32_Premultiplied); - m_image.setDevicePixelRatio(devicePixelRatio); - m_image.fill(Qt::transparent); - QPainter painter(&m_image); - painter.setLayoutDirection(qApp->layoutDirection()); - paint(&painter); - QQuickItem::update(); - } else if (!m_image.isNull()) { - m_image = QImage(); - QQuickItem::update(); - } -} - -bool KyQuickStyleItem::eventFilter(QObject *watched, QEvent *event) -{ - if (watched == m_control) { - if (event->type() == QEvent::FocusIn || event->type() == QEvent::FocusOut) { - QFocusEvent *fe = static_cast<QFocusEvent *>(event); - m_lastFocusReason = fe->reason(); - } - } else if (watched == m_window.data()) { - if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) { - QKeyEvent *ke = static_cast<QKeyEvent *>(event); - if (ke->key() == Qt::Key_Alt) { - updateItem(); - } - - } - } - - return QQuickItem::eventFilter(watched, event); -} - -void KyQuickStyleItem::styleChanged() -{ - if (!qApp->style() || QApplication::closingDown()) { - return; - } - - Q_ASSERT(qApp->style() != sender()); - - connect(qApp->style(), &QObject::destroyed, this, &KyQuickStyleItem::styleChanged); - - updateSizeHint(); - updateItem(); -} - -QPixmap QQuickTableRowImageProvider1::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) -{ - Q_UNUSED (requestedSize); - int width = 16; - int height = 16; - if (size) - *size = QSize(width, height); - - QPixmap pixmap(width, height); - - QStyleOptionViewItem opt; - opt.state |= QStyle::State_Enabled; - opt.rect = QRect(0, 0, width, height); - QString style = QString::fromLatin1(KyQuickStyleItem::style()->metaObject()->className()); - opt.features = {}; - - if (id.contains(QLatin1String("selected"))) - opt.state |= QStyle::State_Selected; - - if (id.contains(QLatin1String("active"))) { - opt.state |= QStyle::State_Active; - opt.palette.setCurrentColorGroup(QPalette::Active); - } else - opt.palette.setCurrentColorGroup(QPalette::Inactive); - - if (id.contains(QLatin1String("alternate"))) - opt.features |= QStyleOptionViewItem::Alternate; - - QPalette pal = QApplication::palette("QAbstractItemView"); - if (opt.state & QStyle::State_Selected && (style.contains(QLatin1String("Mac")) || - !KyQuickStyleItem::style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected))) { - pal.setCurrentColorGroup(opt.palette.currentColorGroup()); - pixmap.fill(pal.highlight().color()); - } else { - pixmap.fill(pal.base().color()); - QPainter pixpainter(&pixmap); - KyQuickStyleItem::style()->drawPrimitive(QStyle::PE_PanelItemViewRow, &opt, &pixpainter); - } - return pixmap; -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/kyquickstyleitem.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/kyquickstyleitem.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/kyquickstyleitem.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/kyquickstyleitem.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,319 +0,0 @@ -#ifndef KYQUICKSTYLEITEM_H -#define KYQUICKSTYLEITEM_H - -#include "kyquickpadding_p.h" -#include <PlatformTheme> - -#include <QQuickItem> -#include <QQuickImageProvider> - -#include <QPixmap> -#include <QPointer> -#include <QImage> - - -class QStyle; -class QStyleOption; - -class QQuickTableRowImageProvider1 : public QQuickImageProvider -{ -public: - QQuickTableRowImageProvider1() - : QQuickImageProvider(QQuickImageProvider::Pixmap) {} - QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override; -}; - -class KyQuickStyleItem: public QQuickItem -{ - Q_OBJECT - - Q_PROPERTY(KyQuickPadding* border READ border CONSTANT) - - Q_PROPERTY( bool sunken READ sunken WRITE setSunken NOTIFY sunkenChanged) - Q_PROPERTY( bool raised READ raised WRITE setRaised NOTIFY raisedChanged) - Q_PROPERTY( bool active READ active WRITE setActive NOTIFY activeChanged) - Q_PROPERTY( bool selected READ selected WRITE setSelected NOTIFY selectedChanged) - Q_PROPERTY( bool hasFocus READ hasFocus WRITE sethasFocus NOTIFY hasFocusChanged) - Q_PROPERTY( bool on READ on WRITE setOn NOTIFY onChanged) - Q_PROPERTY( bool hover READ hover WRITE setHover NOTIFY hoverChanged) - Q_PROPERTY( bool horizontal READ horizontal WRITE setHorizontal NOTIFY horizontalChanged) - Q_PROPERTY( bool isTransient READ isTransient WRITE setTransient NOTIFY transientChanged) - - Q_PROPERTY( QString elementType READ elementType WRITE setElementType NOTIFY elementTypeChanged) - Q_PROPERTY( QString text READ text WRITE setText NOTIFY textChanged) - Q_PROPERTY( QString activeControl READ activeControl WRITE setActiveControl NOTIFY activeControlChanged) - Q_PROPERTY( QString styleName READ styleName NOTIFY styleNameChanged) - Q_PROPERTY( QVariantMap hints READ hints WRITE setHints NOTIFY hintChanged RESET resetHints) - Q_PROPERTY( QVariantMap properties READ properties WRITE setProperties NOTIFY propertiesChanged) - Q_PROPERTY( QFont font READ font NOTIFY fontChanged) - - // For range controls - Q_PROPERTY( int minimum READ minimum WRITE setMinimum NOTIFY minimumChanged) - Q_PROPERTY( int maximum READ maximum WRITE setMaximum NOTIFY maximumChanged) - Q_PROPERTY( int value READ value WRITE setValue NOTIFY valueChanged) - Q_PROPERTY( int step READ step WRITE setStep NOTIFY stepChanged) - Q_PROPERTY( int paintMargins READ paintMargins WRITE setPaintMargins NOTIFY paintMarginsChanged) - - Q_PROPERTY( int contentWidth READ contentWidth WRITE setContentWidth NOTIFY contentWidthChanged) - Q_PROPERTY( int contentHeight READ contentHeight WRITE setContentHeight NOTIFY contentHeightChanged) - - Q_PROPERTY( int textureWidth READ textureWidth WRITE setTextureWidth NOTIFY textureWidthChanged) - Q_PROPERTY( int textureHeight READ textureHeight WRITE setTextureHeight NOTIFY textureHeightChanged) - - Q_PROPERTY( int leftPadding READ leftPadding NOTIFY leftPaddingChanged) - Q_PROPERTY( int topPadding READ topPadding NOTIFY topPaddingChanged) - Q_PROPERTY( int rightPadding READ rightPadding NOTIFY rightPaddingChanged) - Q_PROPERTY( int bottomPadding READ bottomPadding NOTIFY bottomPaddingChanged) - - Q_PROPERTY( QString buttonType READ buttonType WRITE setbuttonType NOTIFY buttonTypeChanged) - Q_PROPERTY( QString roundButton READ roundButton WRITE setroundButton NOTIFY roundButtonChanged) - - Q_PROPERTY( QQuickItem *control READ control WRITE setControl NOTIFY controlChanged) - - KyQuickPadding* border() { return &m_border; } - -public: - KyQuickStyleItem(QQuickItem *parent = nullptr); - ~KyQuickStyleItem() override; - - enum MenuItemType { - SeparatorType = 0, - ItemType, - MenuType, - ScrollIndicatorType - }; - - enum Type { - Undefined, - Button, - RadioButton, - CheckBox, - ComboBox, - ComboBoxItem, - Dial, - ToolBar, - ToolButton, - Tab, - TabFrame, - Frame, - FocusFrame, - FocusRect, - SpinBox, - Slider, - ScrollBar, - ProgressBar, - Edit, - GroupBox, - Header, - Item, - ItemRow, - ItemBranchIndicator, - Splitter, - Menu, - MenuItem, - Widget, - StatusBar, - ScrollAreaCorner, - MacHelpButton, - MenuBar, - MenuBarItem - }; - - void paint(QPainter *); - - bool sunken() const { return m_sunken; } - bool raised() const { return m_raised; } - bool active() const { return m_active; } - bool selected() const { return m_selected; } - bool hasFocus() const { return m_focus; } - bool on() const { return m_on; } - bool hover() const { return m_hover; } - bool horizontal() const { return m_horizontal; } - bool isTransient() const { return m_transient; } - - int minimum() const { return m_minimum; } - int maximum() const { return m_maximum; } - int step() const { return m_step; } - int value() const { return m_value; } - int paintMargins() const { return m_paintMargins; } - - QString elementType() const { return m_type; } - QString text() const { return m_text; } - QString activeControl() const { return m_activeControl; } - QVariantMap hints() const { return m_hints; } - QVariantMap properties() const { return m_properties; } - QFont font() const { return m_font;} - QString styleName() const; - - void setSunken(bool sunken) { if (m_sunken != sunken) {m_sunken = sunken; emit sunkenChanged();}} - void setRaised(bool raised) { if (m_raised!= raised) {m_raised = raised; emit raisedChanged();}} - void setActive(bool active) { if (m_active!= active) {m_active = active; emit activeChanged();}} - void setSelected(bool selected) { if (m_selected!= selected) {m_selected = selected; emit selectedChanged();}} - void sethasFocus(bool focus) { if (m_focus != focus) {m_focus = focus; emit hasFocusChanged();}} - void setOn(bool on) { if (m_on != on) {m_on = on ; emit onChanged();}} - void setHover(bool hover) { if (m_hover != hover) {m_hover = hover ; emit hoverChanged();}} - void setHorizontal(bool horizontal) { if (m_horizontal != horizontal) {m_horizontal = horizontal; emit horizontalChanged();}} - void setTransient(bool transient) { if (m_transient != transient) {m_transient = transient; emit transientChanged();}} - void setMinimum(int minimum) { if (m_minimum!= minimum) {m_minimum = minimum; emit minimumChanged();}} - void setMaximum(int maximum) { if (m_maximum != maximum) {m_maximum = maximum; emit maximumChanged();}} - void setValue(int value) { if (m_value!= value) {m_value = value; emit valueChanged();}} - void setStep(int step) { if (m_step != step) { m_step = step; emit stepChanged(); }} - void setPaintMargins(int value) { if (m_paintMargins!= value) {m_paintMargins = value; emit paintMarginsChanged(); } } - void setElementType(const QString &str); - void setText(const QString &str) { if (m_text != str) {m_text = str; emit textChanged();}} - void setActiveControl(const QString &str) { if (m_activeControl != str) {m_activeControl = str; emit activeControlChanged();}} - void setHints(const QVariantMap &str); - void setProperties(const QVariantMap &props) { if (m_properties != props) { m_properties = props; emit propertiesChanged(); } } - void resetHints(); - - int contentWidth() const { return m_contentWidth; } - void setContentWidth(int arg); - - int contentHeight() const { return m_contentHeight; } - void setContentHeight(int arg); - - virtual void initStyleOption (); - void resolvePalette(); - - int leftPadding() const; - int topPadding() const; - int rightPadding() const; - int bottomPadding() const; - - Q_INVOKABLE qreal textWidth(const QString &); - Q_INVOKABLE qreal textHeight(const QString &); - - int textureWidth() const { return m_textureWidth; } - void setTextureWidth(int w); - - int textureHeight() const { return m_textureHeight; } - void setTextureHeight(int h); - - QQuickItem *control() const; - void setControl(QQuickItem *control); - - static QStyle *style(); - - QString buttonType() const { return m_buttonType;} - void setbuttonType(QString buttonType) { - m_buttonType = buttonType ; - emit buttonTypeChanged(); - } - - QString roundButton() const { return m_roundButton;} - void setroundButton(QString roundButton) { - m_roundButton = roundButton ; - emit roundButtonChanged(); - } - -public Q_SLOTS: - int pixelMetric(const QString&); - QVariant styleHint(const QString&); - void updateSizeHint(); - void updateRect(); - void updateBaselineOffset(); - void updateItem(){polish();} - QString hitTest(int x, int y); - QRectF subControlRect(const QString &subcontrolString); - QString elidedText(const QString &text, int elideMode, int width); - bool hasThemeIcon(const QString &) const; - -Q_SIGNALS: - void elementTypeChanged(); - void textChanged(); - void sunkenChanged(); - void raisedChanged(); - void activeChanged(); - void selectedChanged(); - void hasFocusChanged(); - void onChanged(); - void hoverChanged(); - void horizontalChanged(); - void transientChanged(); - void minimumChanged(); - void maximumChanged(); - void stepChanged(); - void valueChanged(); - void activeControlChanged(); - void infoChanged(); - void styleNameChanged(); - void paintMarginsChanged(); - void hintChanged(); - void propertiesChanged(); - void fontChanged(); - void controlChanged(); - - void contentWidthChanged(int arg); - void contentHeightChanged(int arg); - - void textureWidthChanged(int w); - void textureHeightChanged(int h); - - void leftPaddingChanged(); - void topPaddingChanged(); - void rightPaddingChanged(); - void bottomPaddingChanged(); - - void buttonTypeChanged(); - void roundButtonChanged(); - -protected: - bool event(QEvent *) override; - QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; - void updatePolish() override; - bool eventFilter(QObject *watched, QEvent *event) override; - -private: - const char* classNameForItem() const; - QSize sizeFromContents(int width, int height); - qreal baselineOffset(); - void styleChanged(); - -protected: - QStyleOption *m_styleoption; - QPointer<QQuickItem> m_control; - QPointer<QWindow> m_window; - Type m_itemType; - - QString m_type; - QString m_text; - QString m_activeControl; - QVariantMap m_hints; - QVariantMap m_properties; - QFont m_font; - - bool m_sunken; - bool m_raised; - bool m_active; - bool m_selected; - bool m_focus; - bool m_hover; - bool m_on; - bool m_horizontal; - bool m_transient; - bool m_sharedWidget; - - int m_minimum; - int m_maximum; - int m_value; - int m_step; - int m_paintMargins; - - int m_contentWidth; - int m_contentHeight; - - int m_textureWidth; - int m_textureHeight; - - Qt::FocusReason m_lastFocusReason; - - QImage m_image; - KyQuickPadding m_border; - - static QStyle *s_style; - - QString m_buttonType; - QString m_roundButton; -}; - -#endif // KYQUICKSTYLEITEM_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/kystylehelper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/kystylehelper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/kystylehelper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/kystylehelper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,31 +0,0 @@ -#include "kystylehelper.h" - -#include <QQuickWindow> -#include <QGSettings/QGSettings> - -#include <QWidget> - -KyStyleHelper::KyStyleHelper(QQuickItem *parent) - : QQuickItem(parent) -{ - if (QGSettings::isSchemaInstalled("org.ukui.style")) { - QGSettings* styleSettings = new QGSettings("org.ukui.style", QByteArray(), this); - connect(styleSettings, &QGSettings::changed, this, [&](const QString &key){ - if (key == "styleName" || key == "themeColor") { - emit paletteChanged(); - emit qcolorChanged(); - } - if (key == "systemFontSize" || key == "systemFont") { - emit fontChanged(); - } - }); - } -} - -KyStyleHelper::~KyStyleHelper() {} - -KyStyleHelper* KyStyleHelper::qmlAttachedProperties(QObject *parent) -{ - auto p = qobject_cast<QQuickItem*>(parent); - return new KyStyleHelper(p); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/kystylehelper.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/kystylehelper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/kystylehelper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/kystylehelper.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,128 +0,0 @@ -#ifndef KYSTYLEHELPER_H -#define KYSTYLEHELPER_H - -#include <QApplication> -#include <QQuickItem> -#include <QPalette> -#include <QColor> - -class KyStyleHelper : public QQuickItem -{ - Q_OBJECT - Q_DISABLE_COPY(KyStyleHelper) - - Q_PROPERTY(QPalette palette READ palette NOTIFY paletteChanged) - Q_PROPERTY(QFont font READ font NOTIFY fontChanged) - - Q_PROPERTY(QColor buttoncolorrole READ buttoncolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor windowcolorrole READ windowcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor darkcolorrole READ darkcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor windowtextcolorrole READ windowtextcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor basecolorrole READ basecolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor textcolorrole READ textcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor buttontextcolorrole READ buttontextcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor highlightcolorrole READ highlightcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor highlightedtextcolorrole READ highlightedtextcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor tooltipbasecolorrole READ tooltipbasecolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor tooltiptextcolorrole READ tooltiptextcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor lightcolorrole READ lightcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor midlightcolorrole READ midlightcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor midcolorrole READ midcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor shadowcolorrole READ shadowcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor alternatebasecolorrole READ alternatebasecolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor linkcolorrole READ linkcolor NOTIFY qcolorChanged) - Q_PROPERTY(QColor linkvisitedcolorrole READ linkvisitedcolor NOTIFY qcolorChanged) - - Q_PROPERTY( QString buttonType READ buttonType WRITE setbuttonType NOTIFY buttonTypeChanged) - -public: - explicit KyStyleHelper(QQuickItem *parent = nullptr); - ~KyStyleHelper() override; - - static KyStyleHelper* qmlAttachedProperties(QObject* parent); - - QString buttonType() const { return m_buttonType;} - void setbuttonType(QString buttonType) { - m_buttonType = buttonType ; - emit buttonTypeChanged(); - } - - /* Get palette */ - QPalette palette() { - return qApp->palette(); - } - - /* Get font */ - QFont font() { - return qApp->font(); - } - - /* Get different type of color */ - QColor buttoncolor() { - return qApp->palette().button().color(); - } - QColor windowcolor() { - return qApp->palette().window().color(); - } - QColor darkcolor() { - return qApp->palette().dark().color(); - } - QColor windowtextcolor() { - return qApp->palette().windowText().color(); - } - QColor basecolor() { - return qApp->palette().base().color(); - } - QColor textcolor() { - return qApp->palette().text().color(); - } - QColor buttontextcolor() { - return qApp->palette().buttonText().color(); - } - QColor highlightcolor() { - return qApp->palette().highlight().color(); - } - QColor highlightedtextcolor() { - return qApp->palette().highlightedText().color(); - } - QColor tooltipbasecolor() { - return qApp->palette().toolTipBase().color(); - } - QColor tooltiptextcolor() { - return qApp->palette().toolTipText().color(); - } - QColor lightcolor() { - return qApp->palette().light().color(); - } - QColor midlightcolor() { - return qApp->palette().midlight().color(); - } - QColor midcolor() { - return qApp->palette().mid().color(); - } - QColor shadowcolor() { - return qApp->palette().shadow().color(); - } - QColor alternatebasecolor() { - return qApp->palette().alternateBase().color(); - } - QColor linkcolor() { - return qApp->palette().link().color(); - } - QColor linkvisitedcolor() { - return qApp->palette().linkVisited().color(); - } - - -signals: - void paletteChanged(); - void fontChanged(); - void qcolorChanged(); - void buttonTypeChanged(); - - protected: - QString m_buttonType; -}; - -QML_DECLARE_TYPEINFO(KyStyleHelper, QML_HAS_ATTACHED_PROPERTIES) -#endif // KYSTYLEHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/qqc2styleplugin.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/qqc2styleplugin.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/qqc2styleplugin.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/qqc2styleplugin.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,13 +1,83 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + #include "qqc2styleplugin.h" -#include "kyquickstyleitem.h" -#include "kystylehelper.h" -#include "KyIcon.h" +#include "qdebug.h" +#include <QQmlApplicationEngine> +#include "styleparameter/ukuibutton.h" +#include "styleparameter/appparameter.h" +#include "styleparameter/imageprovider.h" +#include "styleparameter/ukuilabel.h" +#include "styleparameter/ukuimenuitem.h" +#include "styleparameter/ukuimenu.h" +#include "styleparameter/ukuipopup.h" +#include "styleparameter/ukuiscrollbar.h" +#include "styleparameter/ukuitabbutton.h" +#include "styleparameter/ukuitooltip.h" +#include "styleparameter/tokenparameter.h" +#include "styleparameter/ukuiradiobutton.h" +#include "styleparameter/ukuicheckbox.h" +#include "styleparameter/ukuicombobox.h" +#include "styleparameter/ukuiitemdelegate.h" +#include "styleparameter/ukuitextfiled.h" +#include "styleparameter/ukuiprogressbar.h" +#include "styleparameter/ukuislider.h" +#include "styleparameter/ukuispinbox.h" +#include "styleparameter/ukuitabbar.h" +#include "styleparameter/parsedtcolor.h" +using namespace UKUIQQC2Style; + +void Qqc2StylePlugin::initializeEngine(QQmlEngine *engine, const char *uri) +{ + engine->addImageProvider("imageProvider", new ImageProvider()); +} void Qqc2StylePlugin::registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("org.ukui.qqc2style.private")); // @uri org.ukui.qqc2style.private - qmlRegisterType<KyQuickStyleItem>(uri, 1, 0, "StyleItem"); - qmlRegisterType<KyStyleHelper>(uri, 1, 0, "StyleHelper"); - qmlRegisterType<KyIcon>(uri, 1, 0, "KyIcon"); + qmlRegisterType<UKUIButton>(uri, 1, 0, "UKUIButton"); + qmlRegisterType<APPParameter>(uri, 1, 0, "APPParameter"); + qmlRegisterType<UKUILabel>(uri, 1, 0, "UKUILabel"); + qmlRegisterType<UKUIMenuItem>(uri, 1, 0, "UKUIMenuItem"); + qmlRegisterType<UKUIMenu>(uri, 1, 0, "UKUIMenu"); + qmlRegisterType<UKUIPopup>(uri, 1, 0, "UKUIPopup"); + qmlRegisterType<UKUIScrollBar>(uri, 1, 0, "UKUIScrollBar"); + qmlRegisterType<UKUITabButton>(uri, 1, 0, "UKUITabButton"); + qmlRegisterType<UKUIToolTip>(uri, 1, 0, "UKUIToolTip"); + qmlRegisterType<UKUIRadioButton>(uri, 1, 0, "UKUIRadioButton"); + qmlRegisterType<UKUICheckBox>(uri, 1, 0, "UKUICheckBox"); + qmlRegisterType<UKUIComboBox>(uri, 1, 0, "UKUIComboBox"); + qmlRegisterType<UKUIItemDelegate>(uri, 1, 0, "UKUIItemDelegate"); + qmlRegisterType<UKUITextFiled>(uri, 1, 0, "UKUITextFiled"); + qmlRegisterType<UKUIProgressBar>(uri, 1, 0, "UKUIProgressBar"); + qmlRegisterType<UKUISlider>(uri, 1, 0, "UKUISlider"); + qmlRegisterType<UKUISpinBox>(uri, 1, 0, "UKUISpinBox"); + qmlRegisterType<UKUITabBar>(uri, 1, 0, "UKUITabBar"); + qmlRegisterType<ParseDTColor>(uri, 1, 0, "ParseDTColor"); + + + qRegisterMetaType<TokenParameter>("TokenParameter"); + + TokenParameter *token = new TokenParameter(); + qApp->setProperty("qqc2-globaltoken", QVariant::fromValue(token)); } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/qqc2styleplugin.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/qqc2styleplugin.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/qqc2styleplugin.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/qqc2styleplugin.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,3 +1,25 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + #ifndef QQC2STYLEPLUGIN_H #define QQC2STYLEPLUGIN_H @@ -9,7 +31,10 @@ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: + void initializeEngine(QQmlEngine *engine, const char *uri) override; void registerTypes(const char *uri) override; + +private: }; #endif // QQC2STYLEPLUGIN_H diff -Nru "/tmp/tmp51gntsas/F3mG__TWmv/qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ appparameter.cpp" "/tmp/tmp51gntsas/BLkLJXN8hI/qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ appparameter.cpp" --- "/tmp/tmp51gntsas/F3mG__TWmv/qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ appparameter.cpp" 1970-01-01 08:00:00.000000000 +0800 +++ "/tmp/tmp51gntsas/BLkLJXN8hI/qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ appparameter.cpp" 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,149 @@ +#include "appparameter.h" +#include <QDebug> +#include <QApplication> +#include <QGSettings> +#include <QFontDatabase> +#include <QIcon> +#include <QDBusConnection> + +#include "settings/ukui-style-settings.h" +#include "../../qt5-ukui-platformtheme/platform-theme-fontdata.h" + +using namespace UKUIQQC2Style; +APPParameter::APPParameter(QQuickItem *parent) : QQuickItem(parent) +{ + if(!qApp) + return; + m_font = QApplication::font(); + m_palette = QApplication::palette(); + + if (QGSettings::isSchemaInstalled("org.ukui.style")) { + auto settings = UKUIStyleSettings::globalInstance(); + + //set font + auto fontName = settings->get("systemFont").toString(); + auto fontSize = settings->get("systemFontSize").toString().toDouble(); + if (qApp->property("noChangeSystemFontSize").isValid() && qApp->property("noChangeSystemFontSize").toBool()) + fontSize = 11; + QFont tempFont = m_font; + tempFont.setFamily(fontName); + tempFont.setPointSizeF(fontSize); + setFont(tempFont); + /*! + * \bug + * if we set app font, qwizard title's font will + * become very small. I handle the wizard title + * in ProxyStyle::polish(). + */ + //Skip QGuiApplication avoid it crash when we setfont + if (qApp->applicationName().toLower().contains(QLatin1String("kwin"))) { + QDBusConnection::sessionBus().connect(QString(), + QStringLiteral("/UKUIPlatformTheme"), + QStringLiteral("org.ukui.UKUIPlatformTheme"), + QStringLiteral("refreshFonts"), + this, + SLOT(slotChangeStyle(QString))); + } + + connect(settings, &QGSettings::changed, this, &APPParameter::slotChangeStyle); + } + +} + +APPParameter::~APPParameter() +{ + +} + +APPParameter* APPParameter::qmlAttachedProperties(QObject* parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new APPParameter(p); +} + +const QFont &APPParameter::font() const +{ + return m_font; +} + +void APPParameter::setFont(const QFont &newFont) +{ + if (m_font == newFont) + return; + m_font = newFont; + emit fontChanged(); +} + +void APPParameter::slotChangeStyle(const QString& key) +{ + auto settings = UKUIStyleSettings::globalInstance(); +// if (key == "iconThemeName" || key == "icon-theme-name") { +// QString icontheme = settings->get("icon-theme-name").toString(); + +// QIcon::setThemeName(icontheme); + +// QIcon icon = qApp->windowIcon(); +// qApp->setWindowIcon(QIcon::fromTheme(icon.name())); +// // update all widgets for repaint new themed icons. +// for (auto widget : QApplication::allWidgets()) { +// widget->update(); +// } +// } + + if (key == "systemFont" || key == "system-font") { + //Skip QGuiApplication avoid it crash when we setfont + auto *app = qobject_cast<QApplication *>(qApp); + if(app == nullptr) + return; + + QString font = settings->get("system-font").toString(); + + QFontDatabase db; + int id = 0; + if (!db.families().contains(font)) { + PlatformThemeFontData fontData; + QMap<QString, QString> fontMap = fontData.getAllFontInformation(); + if(fontMap.contains(font)){ + auto iter = fontMap.find(font); + id = QFontDatabase::addApplicationFont(iter.value()); + } + } + + QFontDatabase newDb; + if (newDb.families().contains(font)) { + QFont tempFont = font; + setFont(tempFont); + } + } + if (key == "systemFontSize" || key == "system-font-size") { + //Skip QGuiApplication avoid it crash when we setfont + auto *app = qobject_cast<QApplication *>(qApp); + if(app == nullptr) + return; + + if (qApp->property("noChangeSystemFontSize").isValid() && qApp->property("noChangeSystemFontSize").toBool()) + return; + double fontSize = settings->get("system-font-size").toString().toDouble(); + if (fontSize > 0) { + QFont oldFont = QApplication::font(); + + QFont tempFont = m_font; + tempFont.setPointSize(fontSize); + setFont(tempFont); + } + } +} + +const QPalette &APPParameter::palette() const +{ + return m_palette; +} + + +void APPParameter::setPalette(const QPalette &newPalette) +{ + if (m_palette == newPalette) + return; + m_palette = newPalette; + emit paletteChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/appparameter.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/appparameter.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/appparameter.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/appparameter.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,112 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef APPPARAMETER_H +#define APPPARAMETER_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QPalette> +#include <QQuickItem> + +namespace UKUIQQC2Style { + +class APPParameter : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) + Q_PROPERTY(QPalette palette READ palette WRITE setPalette NOTIFY paletteChanged) + Q_PROPERTY(int iconWidth READ iconWidth WRITE setIconWidth NOTIFY iconWidthChanged) + Q_PROPERTY(int space READ space WRITE setSpace NOTIFY spaceChanged) + +public: + explicit APPParameter(QQuickItem *parent = nullptr); + ~APPParameter(); + + static APPParameter* qmlAttachedProperties(QObject* parent); + + const QFont &font() const; + void setFont(const QFont &newFont); + + const QPalette &palette() const; + void setPalette(const QPalette &newPalette); + + int iconWidth() const; + void setIconWidth(int newIconWidth); + + int space() const; + void setSpace(int newSpace); + +public slots: + + void slotChangeStyle(const QString& key); + +signals: + void fontChanged(); + + + void paletteChanged(); + + void iconWidthChanged(); + + void spaceChanged(); + +private: + QFont m_font; + QPalette m_palette; + int m_iconWidth = 16; + int m_space = 8; +}; + +inline int APPParameter::iconWidth() const +{ + return m_iconWidth; +} + + +inline void APPParameter::setIconWidth(int newIconWidth) +{ + if (m_iconWidth == newIconWidth) + return; + m_iconWidth = newIconWidth; + emit iconWidthChanged(); +} + +inline int APPParameter::space() const +{ + return m_space; +} + +inline void APPParameter::setSpace(int newSpace) +{ + if (m_space == newSpace) + return; + m_space = newSpace; + emit spaceChanged(); +} + +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::APPParameter, QML_HAS_ATTACHED_PROPERTIES) + +#endif // APPPARAMETER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/icon.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/icon.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/icon.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/icon.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,19 @@ +#include "icon.h" +#include "qdebug.h" +#include "qpixmap.h" +#include "qimage.h" +#include <QFile> +#include <QSize> +#include <QApplication> +#include <QPalette> +#include <QColor> +#include <qmath.h> + +using namespace UKUIQQC2Style; + + +Icon::Icon(QObject *parent) : QObject(parent) +{ + +} + diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/icon.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/icon.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/icon.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/icon.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,46 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef ICON_H +#define ICON_H + +#include <QObject> +#include <QQuickImageProvider> +#include <QIcon> +#include <QUrl> +#include <QPixmap> +#include <QString> + +namespace UKUIQQC2Style { + +class Icon : public QObject +{ + Q_OBJECT + +public: + explicit Icon(QObject *parent = nullptr); + + enum Mode { Normal, Disabled, Hovered, Selected }; + +}; +} +#endif // IMAGEPROVIDER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/imageprovider.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/imageprovider.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/imageprovider.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/imageprovider.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,273 @@ +#include "imageprovider.h" +#include "qdebug.h" +#include "qpixmap.h" +#include "qimage.h" +#include <QFile> +#include <QApplication> +#include <QPalette> +#include <QSize> +#include <QColor> +#include <QPainter> +#include <qmath.h> + +#include "effects/highlight-effect.h" +#include "icon.h" + +using namespace UKUIQQC2Style; + +static QSize defaultSize = QSize(16, 16); + +QIcon IconHelper::getDefaultIcon() +{ + QIcon icon; + loadDefaultIcon(icon); + return icon; +} + +QIcon IconHelper::loadIcon(const QString &id) +{ + QIcon icon; + if (id.isEmpty()) { + loadDefaultIcon(icon); + return icon; + } + + bool isOk = false; + QString path = toLocalPath(id); + qDebug() << "path......" << id << path; + if (!path.isEmpty()) { + QPixmap pixmap; + isOk = loadPixmap(path, pixmap); + if (isOk) { + icon.addPixmap(pixmap); + } + + } + if (!isOk) { + loadDefaultIcon(icon); + } + + return icon; +} + +bool IconHelper::loadPixmap(const QString &path, QPixmap &pixmap) +{ + if (!QFile::exists(path)) { + qWarning() << "Error: loadPixmap, File dose not exists." << path; + return false; + } + + return pixmap.load(path); +} + +bool IconHelper::loadThemeIcon(const QString &name, QIcon &icon) +{ + if (!QIcon::hasThemeIcon(name)) { + return false; + } + + icon = QIcon::fromTheme(name); + return true; +} + +void IconHelper::loadDefaultIcon(QIcon &icon) +{ + if (!loadThemeIcon("application-x-desktop", icon)) { + QPixmap pixmap; + if (loadPixmap(":/res/icon/application-x-desktop.png", pixmap)) { + icon.addPixmap(pixmap); + } + } +} + +// see: https://doc.qt.io/archives/qt-5.12/qurl.html#details +QString IconHelper::toLocalPath(const QUrl &url) +{ + if (url.isEmpty()) { + return {}; + } + + // file: + if (url.isLocalFile()) { + return url.path(); + } + + QString schema = url.scheme(); + if (schema.isEmpty()) { + QString path = url.path(); + if (path.startsWith("/") || path.startsWith(":")) { + return path; + } + + } else { + // qrc example: the Path ":/images/cut.png" or the URL "qrc:///images/cut.png" + // see: https://doc.qt.io/archives/qt-5.12/resources.html + if (schema == "qrc") { + //qrc path: :/xxx/xxx.png + return ":" + url.path(); + } + } + + return {}; +} + +bool IconHelper::isRemoteServerFile(const QUrl &url) +{ + if (url.isEmpty() || url.scheme().isEmpty()) { + return false; + } + + return url.scheme() == "http" || url.scheme() == "https"; +} + +bool IconHelper::isThemeIcon(const QString &name) +{ + return QIcon::hasThemeIcon(name); +} + +bool IconHelper::isLocalFile(const QUrl &url) +{ + return !toLocalPath(url).isEmpty(); +} + +QPixmap IconHelper::generatePixMap(const QString &id, Icon::Mode mode, const QSize &requestedSize, QSize defaultSize) +{ + QIcon icon = IconHelper::loadIcon(id); + QPixmap pixmap = icon.pixmap(requestedSize.isEmpty() ? defaultSize : requestedSize); + if(mode == Icon::Disabled){ +// Icon *icon = new Icon(); + qDebug() << "disable 000000000..............."; + pixmap = generatedDisablePixmap(pixmap); + qDebug() << "disable 111111111111111..............."; + } + else if(mode == Icon::Selected){ + pixmap = generatedHightlightPixmap(pixmap); + + } + return pixmap; +} + +QPixmap IconHelper::generatedDisablePixmap(QPixmap pixmap) +{ + QPixmap target = pixmap; + +// //Fix me:QT original code + QImage im = target.toImage().convertToFormat(QImage::Format_ARGB32); + + // Create a colortable based on the background (black -> bg -> white) + QColor bg = qApp->palette().color(QPalette::Disabled, QPalette::ButtonText); + int red = bg.red(); + int green = bg.green(); + int blue = bg.blue(); + uchar reds[256], greens[256], blues[256]; + for (int i=0; i<128; ++i) { + reds[i] = uchar((red * (i<<1)) >> 8); + greens[i] = uchar((green * (i<<1)) >> 8); + blues[i] = uchar((blue * (i<<1)) >> 8); + } + for (int i=0; i<128; ++i) { + reds[i+128] = uchar(qMin(red + (i << 1), 255)); + greens[i+128] = uchar(qMin(green + (i << 1), 255)); + blues[i+128] = uchar(qMin(blue + (i << 1), 255)); + } + + int intensity = (77 * red + 150 * green + 28 * blue) / 255; + //qt_intensity(red, green, blue); + const int factor = 191; + + // High intensity colors needs dark shifting in the color table, while + // low intensity colors needs light shifting. This is to increase the + // perceived contrast. + if ((red - factor > green && red - factor > blue) + || (green - factor > red && green - factor > blue) + || (blue - factor > red && blue - factor > green)) + intensity = qMin(255, intensity + 91); +// else if (intensity <= 128) +// intensity -= 51; + bool isPureColor= HighLightEffect::isPixmapPureColor(pixmap); + + for (int y=0; y<im.height(); ++y) { + QRgb *scanLine = (QRgb*)im.scanLine(y); + for (int x=0; x<im.width(); ++x) { + QRgb pixel = *scanLine; + // Calculate color table index, taking intensity adjustment + // and a magic offset into account. + uint ci = uint(qGray(pixel)/3 + (130 - intensity / 3)); + + int r = int(reds[ci]); + int g = int(greens[ci]); + int b = int(blues[ci]); + int a = qAlpha(pixel)/255.0 > 0.7 ? 0.7 * 255 : qAlpha(pixel); + if(isPureColor){ + r = qMax(int(reds[ci]), bg.red()); + g = qMax(int(greens[ci]), bg.green()); + b = qMax(int(blues[ci]), bg.blue()); + a = qAlpha(pixel); + } + *scanLine = qRgba(r, g, b, a); + ++scanLine; + } + } + + return QPixmap::fromImage(im); + + + //Fix me:set same color to text when set icon mode disable.But it has error in color icons. + +// QColor bg = option->palette.color(QPalette::Disabled, QPalette::WindowText); +// bg.setAlphaF(0.5); +// QPainter p(&target); +// p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); +// p.setCompositionMode(QPainter::CompositionMode_SourceIn); +// p.fillRect(target.rect(), bg); +// p.end(); + +// return target; + +} + +QPixmap IconHelper::generatedHightlightPixmap(QPixmap pixmap) +{ + QPixmap target = pixmap; + QPainter p(&target); + p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); + p.setCompositionMode(QPainter::CompositionMode_SourceIn); + p.fillRect(target.rect(), Qt::white); + return target; +} + +ImageProvider::ImageProvider() : QQuickImageProvider(QQuickImageProvider::Pixmap) +{ + qDebug() << "ImageProvider............."; +} + +//requestPixmap函数的重写,在qml中使用source加载图片时会自动调用requestPixmap或requestImage函数(根据图片类型不同),返回QPixmap或QImage对象 +QPixmap ImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) +{ + int lastIndex = id.lastIndexOf("/"); + QString model, iconID = id; + if(lastIndex != -1){ + iconID = id.left(lastIndex); + model = id.right(id.length() - lastIndex - 1); + } + qDebug() << "requestPixmap............model:" << model << "...iconID......." << iconID; + + Icon::Mode im = Icon::Mode::Normal; + if(model == "disenable") + im = Icon::Disabled; + else if(model == "clicked") + im = Icon::Selected; + else if(model == "hover") + im = Icon::Hovered; + + QPixmap pixmap = IconHelper::generatePixMap(iconID, im, requestedSize, defaultSize); + + if (size) { + QSize pixmapSize = pixmap.size(); + size->setWidth(pixmapSize.width()); + size->setHeight(pixmapSize.height()); + } + + return pixmap; +} + diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/imageprovider.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/imageprovider.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/imageprovider.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/imageprovider.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,86 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef IMAGEPROVIDER_H +#define IMAGEPROVIDER_H + +#include <QObject> +#include <QQuickImageProvider> +#include <QIcon> +#include <QUrl> +#include <QPixmap> +#include <QString> +#include "icon.h" + +namespace UKUIQQC2Style { + +class IconHelper +{ +public: + // 判断函数 + // 是否存在主题图标 + static bool isThemeIcon(const QString &name); + // 是否本地文件 + static bool isLocalFile(const QUrl &url); + // 远程文件: http or https + static bool isRemoteServerFile(const QUrl &url); + + // 功能函数 + /** + * Url转换为本地文件 + * 判断一个url是否本地文件。包括qrc + * @param url + * @return 返回可用于load的path,如果不是本地文件,返回空 + */ + static QString toLocalPath(const QUrl &url); + + // 图标相关 + // 从某个路径加载图标,并存入引用中,返回加载是否成功 + static bool loadPixmap(const QString &path, QPixmap &pixmap); + + // 从路径或者主题加载图标 + static QIcon loadIcon(const QString &id); + + // 默认图标 + static QIcon getDefaultIcon(); + + static QPixmap generatePixMap(const QString &id, Icon::Mode mode, const QSize &requestSize, QSize defaultSize); + + +private: + static bool loadThemeIcon(const QString &name, QIcon &icon); + static void loadDefaultIcon(QIcon &icon); + static QPixmap generatedDisablePixmap(QPixmap pixmap); + static QPixmap generatedHightlightPixmap(QPixmap pixmap); + +}; + + +class ImageProvider : public QQuickImageProvider +{ +public: + explicit ImageProvider(); + + QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize); //重写requestPixmap函数 +}; +} +#endif // IMAGEPROVIDER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/parsedtcolor.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/parsedtcolor.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/parsedtcolor.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/parsedtcolor.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,53 @@ +#include "parsedtcolor.h" +#include "qdebug.h" +#include "qpixmap.h" +#include "qimage.h" +#include <QFile> +#include <QSize> +#include <QApplication> +#include <QPalette> +#include <QColor> +#include <qmath.h> + +using namespace UKUIQQC2Style; + + +ParseDTColor::ParseDTColor(QObject *parent):QObject(parent) +{ + +} + +ParseDTColor* ParseDTColor::qmlAttachedProperties(QObject* parent) +{ + auto p = qobject_cast<QObject*>(parent); + return new ParseDTColor(p); +} + + +bool ParseDTColor::isSolidPattern(QVariant dtColor) +{ + if(dtColor.canConvert<DTColor>()){ + DTColor c = dtColor.value<DTColor>(); + return (c.colorType() == Qt::SolidPattern); + } + return false; +} + +QColor ParseDTColor::startColor(QVariant dtColor) +{ + if(dtColor.canConvert<DTColor>()){ + DTColor c = dtColor.value<DTColor>(); + return c.mixStartColor(); + } + return QColor(); +} + +QColor ParseDTColor::endColor(QVariant dtColor) +{ + if(dtColor.canConvert<DTColor>()){ + DTColor c = dtColor.value<DTColor>(); + return c.mixEndColor(); + } + return QColor(); +} + diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/parsedtcolor.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/parsedtcolor.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/parsedtcolor.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/parsedtcolor.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,61 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef PARSEDTCOLOR_H +#define PARSEDTCOLOR_H + +#include <QObject> +#include "../../ukui-styles/dt-tmp-readconfig.h" +#include <QColor> +#include <QPen> + +using namespace UKUIGlobalDTConfig; +namespace UKUIQQC2Style { + +struct DTColorStruct{ + bool isSolidPattern = true; + QColor startColor; + QColor endColor; +}; + +class ParseDTColor : public QObject +{ + Q_OBJECT + +public: + explicit ParseDTColor(QObject *parent = nullptr); + + static ParseDTColor* qmlAttachedProperties(QObject* parent); + + Q_INVOKABLE bool isSolidPattern(QVariant dtColor); + + Q_INVOKABLE QColor startColor(QVariant dtColor); + + Q_INVOKABLE QColor endColor(QVariant dtColor); + + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::ParseDTColor, QML_HAS_ATTACHED_PROPERTIES) +QML_DECLARE_TYPEINFO(UKUIQQC2Style::DTColorStruct, QML_HAS_ATTACHED_PROPERTIES) + +#endif // PARSEDTCOLOR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/tokenparameter.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/tokenparameter.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/tokenparameter.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/tokenparameter.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,47 @@ +#include "tokenparameter.h" +#include <QDebug> +#include <QApplication> +#include <QGSettings> +#include <QFontDatabase> +#include <QIcon> +#include <QColor> + +using namespace UKUIQQC2Style; +TokenParameter::TokenParameter() +{ + //UKUIGlobalDTConfig::GlobalDTConfig dtConfig; + +} + +TokenParameter::~TokenParameter() +{ + deleteInstance(); +} + +UKUIGlobalDTConfig::GlobalDTConfig* TokenParameter:: getInstance() +{ + if(dt == nullptr) + dt = new UKUIGlobalDTConfig::GlobalDTConfig(); + return dt; +} + +void TokenParameter::deleteInstance() +{ + if(dt){ + delete dt; + dt = nullptr; + } +} + +//const std::shared_ptr<UKUIQQC2Style::UKUIButton> &TokenParameter::button() const +//{ +// return m_button; +//} + +//void TokenParameter::setButton(std::shared_ptr<UKUIQQC2Style::UKUIButton> &newButton) +//{ +// if (m_button == newButton) +// return; +// m_button = newButton; +// emit buttonChanged(); +//} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/tokenparameter.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/tokenparameter.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/tokenparameter.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/tokenparameter.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,60 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef TOKENPARAMETER_H +#define TOKENPARAMETER_H + +#include <QObject> +#include <QMetaType> +#include "../../ukui-styles/readconfig.h" +#include "ukuibutton.h" + +namespace UKUIQQC2Style { + +class TokenParameter +{ + //Q_PROPERTY(std::shared_ptr<UKUIQQC2Style::UKUIButton> button READ button WRITE setButton NOTIFY buttonChanged) + +public: + explicit TokenParameter(); + ~TokenParameter(); + + UKUIGlobalDTConfig::GlobalDTConfig* getInstance(); + void deleteInstance(); + + +// const std::shared_ptr<UKUIQQC2Style::UKUIButton> &button() const; +// void setButton(std::shared_ptr<UKUIQQC2Style::UKUIButton> &newButton); + +public slots: + + + +private: + + UKUIGlobalDTConfig::GlobalDTConfig* dt; +// UKUIButton m_button; +}; +} +Q_DECLARE_METATYPE(UKUIQQC2Style::TokenParameter*) + +#endif // TOKENPARAMETER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuibutton.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuibutton.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuibutton.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuibutton.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,425 @@ +#include <QApplication> +#include "ukuibutton.h" +#include "qdebug.h" +using namespace UKUIQQC2Style; + +UKUIButton::UKUIButton(QQuickItem *parent) : QQuickItem(parent) +{ + { + m_normalBC = DTColor(QColor("#E6E6E6")); + m_clickedBC = DTColor(QColor("#B9B9B9")); + m_hoveredBC = DTColor(QColor("#DCDCDC")); + m_disableBC = DTColor(QColor("#EEEEEE")); + m_disableTextColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.35)); + m_normalTextColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.85)); + m_normalHBC = DTColor(QColor("#3790FA")); + m_clickedHBC = DTColor(QColor("#3790FA")); + m_hoveredHBC = DTColor(QColor("#3790FA")); + m_disableHBC = DTColor(QColor("#EEEEEE")); + } + qDebug() << "UKUIButton.............."; + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUIButton::~UKUIButton() +{ + +} + +UKUIButton* UKUIButton::qmlAttachedProperties(QObject* parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUIButton(p); +} + +void UKUIButton::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setNormalBC(instance->buttonActive()); + setClickedBC(instance->kComponentClick()); + //setHoveredBC(instance->kComponentHover()); + setDisableBC(instance->buttonDisable()); + + setNormalHBC(instance->highLightActive()); + //setHoveredHBC(instance->kBrandHover()); + setClickedHBC(instance->kBrandClick()); + setDisableHBC(instance->highLightDisable()); + + setNormalTextColor(instance->buttonTextActive()); + setDisableTextColor(instance->buttonTextDisable()); + + setBorderWidth(1); + setFocusBorderWidth(instance->focusline()); + setNormalBorderColor(instance->kLineComponentNormal()); + setClickBorderColor(instance->kLineComponentClick()); + setHoverBorderColor(instance->kLineComponentHover()); + setDisableBorderColor(instance->kLineComponentDisable()); + + setNormalBorderHColor(instance->kLineBrandNormal()); + setClickBorderHColor(instance->kLineBrandClick()); + setHoverBorderHColor(instance->kLineBrandHover()); + setDisableBorderHColor(instance->kLineBrandDisable()); + setFocusBorderColor(instance->kBrandFocus()); + +// qDebug() << "instance->highLightActive()..." << m_normalHBC.red() << m_normalHBC.green() << m_normalHBC.blue(); +// qDebug() << "instance->setHoveredHBC()..." << m_hoveredHBC.red() << m_hoveredHBC.green() << m_hoveredHBC.blue(); +} + + +double UKUIButton::radius() const +{ + return m_radius; +} + +void UKUIButton::setRadius(double newRadius) +{ + if (m_radius == newRadius) + return; + m_radius = newRadius; + emit radiusChanged(); +} + +double UKUIButton::leftRightMargin() const +{ + return m_leftRightMargin; +} + +void UKUIButton::setLeftRightMargin(double newMargin) +{ + if (m_leftRightMargin == newMargin) + return; + m_leftRightMargin = newMargin; + emit leftRightMarginChanged(); +} + +double UKUIButton::upDownMargin() const +{ + return m_upDownMargin; +} + +void UKUIButton::setUpDownMargin(double newUpDownMargin) +{ + if (m_upDownMargin == newUpDownMargin) + return; + m_upDownMargin = newUpDownMargin; + emit upDownMarginChanged(); +} + +double UKUIButton::space() const +{ + return m_space; +} + +void UKUIButton::setSpace(double newSpace) +{ + if (qFuzzyCompare(m_space, newSpace)) + return; + m_space = newSpace; + emit spaceChanged(); +} + +int UKUIButton::normalWidth() const +{ + return m_normalWidth; +} + +void UKUIButton::setNormalWidth(int newNormalWidth) +{ + if (m_normalWidth == newNormalWidth) + return; + m_normalWidth = newNormalWidth; + emit normalWidthChanged(); +} + +int UKUIButton::normalHeight() const +{ + return m_normalHeight; +} + +void UKUIButton::setNormalHeight(int newNormalHeight) +{ + if (m_normalHeight == newNormalHeight) + return; + m_normalHeight = newNormalHeight; + emit normalHeightChanged(); +} + +DTColor UKUIButton::normalBC() const +{ + return m_normalBC; +} + +void UKUIButton::setNormalBC(DTColor newNormalBC) +{ + if (m_normalBC != newNormalBC) + { + m_normalBC = newNormalBC; + emit normalBCChanged(); + } +} + +DTColor UKUIButton::clickedBC() const +{ + return m_clickedBC; +} + +void UKUIButton::setClickedBC(DTColor newClickedBC) +{ + if (m_clickedBC != newClickedBC){ + m_clickedBC = newClickedBC; + emit clickedBCChanged(); + } +} + +DTColor UKUIButton::hoveredBC() const +{ + return m_hoveredBC; +} + +void UKUIButton::setHoveredBC(DTColor newHoveredBC) +{ + if (m_hoveredBC != newHoveredBC){ + m_hoveredBC = newHoveredBC; + emit hoveredBCChanged(); + } +} + +DTColor UKUIButton::disableBC() const +{ + return m_disableBC; +} + +void UKUIButton::setDisableBC(DTColor newDisableBC) +{ + if (m_disableBC != newDisableBC){ + m_disableBC = newDisableBC; + emit disableBCChanged(); + } +} + +DTColor UKUIButton::disableTextColor() const +{ + return m_disableTextColor; +} + +void UKUIButton::setDisableTextColor(DTColor newDisableTextColor) +{ + if (m_disableTextColor != newDisableTextColor){ + m_disableTextColor = newDisableTextColor; + emit disableTextColorChanged(); + } +} + +DTColor UKUIButton::normalTextColor() const +{ + return m_normalTextColor; +} + +void UKUIButton::setNormalTextColor(DTColor newNormalTextColor) +{ + if (m_normalTextColor != newNormalTextColor){ + m_normalTextColor = newNormalTextColor; + emit normalTextColorChanged(); + } +} + +DTColor UKUIButton::normalHBC() const +{ + return m_normalHBC; +} + +void UKUIButton::setNormalHBC(DTColor newNormalHBC) +{ + if (m_normalHBC != newNormalHBC){ + m_normalHBC = newNormalHBC; + emit normalHBCChanged(); + } +} + +DTColor UKUIButton::clickedHBC() const +{ + return m_clickedHBC; +} + +void UKUIButton::setClickedHBC(DTColor newClickedHBC) +{ + if (m_clickedHBC != newClickedHBC){ + m_clickedHBC = newClickedHBC; + emit clickedHBCChanged(); + } +} + +DTColor UKUIButton::hoveredHBC() +{ + return m_hoveredHBC; +} + +void UKUIButton::setHoveredHBC(DTColor newHoveredHBC) +{ + if (m_hoveredHBC != newHoveredHBC){ + m_hoveredHBC = newHoveredHBC; + emit hoveredHBCChanged(); + } +} + +DTColor UKUIButton::disableHBC() const +{ + return m_disableHBC; +} + +void UKUIButton::setDisableHBC(DTColor newDisableHBC) +{ + if (m_disableHBC != newDisableHBC){ + m_disableHBC = newDisableHBC; + emit disableHBCChanged(); + } +} + +int UKUIButton::borderWidth() const +{ + return m_borderWidth; +} + +void UKUIButton::setBorderWidth(int newBorderWidth) +{ + if (m_borderWidth == newBorderWidth) + return; + m_borderWidth = newBorderWidth; + emit borderWidthChanged(); +} + +DTColor UKUIButton::normalBorderColor() const +{ + return m_normalBorderColor; +} + +void UKUIButton::setNormalBorderColor(DTColor newNormalBorderColor) +{ + if (m_normalBorderColor != newNormalBorderColor){ + m_normalBorderColor = newNormalBorderColor; + emit normalBorderColorChanged(); + } +} + +DTColor UKUIButton::hoverBorderColor() const +{ + return m_hoverBorderColor; +} + +void UKUIButton::setHoverBorderColor(DTColor newHoverBorderColor) +{ + if (m_hoverBorderColor != newHoverBorderColor){ + m_hoverBorderColor = newHoverBorderColor; + emit hoverBorderColorChanged(); + } +} + +DTColor UKUIButton::clickBorderColor() const +{ + return m_clickBorderColor; +} + +void UKUIButton::setClickBorderColor(DTColor newClickBorderColor) +{ + if (m_clickBorderColor!= newClickBorderColor){ + m_clickBorderColor = newClickBorderColor; + emit clickBorderColorChanged(); + } +} + +DTColor UKUIButton::disableBorderColor() const +{ + return m_disableBorderColor; +} + +void UKUIButton::setDisableBorderColor(DTColor newDisableBorderColor) +{ + if (m_disableBorderColor != newDisableBorderColor){ + m_disableBorderColor = newDisableBorderColor; + emit disableBorderColorChanged(); + } +} + +DTColor UKUIButton::normalBorderHColor() const +{ + return m_normalBorderHColor; +} + +void UKUIButton::setNormalBorderHColor(DTColor newNormalBorderHColor) +{ + if (m_normalBorderHColor != newNormalBorderHColor){ + m_normalBorderHColor = newNormalBorderHColor; + emit normalBorderHColorChanged(); + } +} + +DTColor UKUIButton::hoverBorderHColor() const +{ + return m_hoverBorderHColor; +} + +void UKUIButton::setHoverBorderHColor(DTColor newHoverBorderHColor) +{ + if (m_hoverBorderHColor != newHoverBorderHColor){ + m_hoverBorderHColor = newHoverBorderHColor; + emit hoverBorderHColorChanged(); + } +} + +DTColor UKUIButton::clickBorderHColor() const +{ + return m_clickBorderHColor; +} + +void UKUIButton::setClickBorderHColor(DTColor newClickBorderHColor) +{ + if (m_clickBorderHColor != newClickBorderHColor){ + m_clickBorderHColor = newClickBorderHColor; + emit clickBorderHColorChanged(); + } +} + +DTColor UKUIButton::disableBorderHColor() const +{ + return m_disableBorderHColor; +} + +void UKUIButton::setDisableBorderHColor(DTColor newDisableBorderHColor) +{ + if (m_disableBorderHColor != newDisableBorderHColor){ + m_disableBorderHColor = newDisableBorderHColor; + emit disableBorderHColorChanged(); + } +} + +DTColor UKUIButton::focusBorderColor() const +{ + return m_focusBorderColor; +} + +void UKUIButton::setFocusBorderColor(DTColor newFocusBorderColor) +{ + if (m_focusBorderColor != newFocusBorderColor){ + m_focusBorderColor = newFocusBorderColor; + emit focusBorderColorChanged(); + } +} + +int UKUIButton::focusBorderWidth() const +{ + return m_focusBorderWidth; +} + +void UKUIButton::setFocusBorderWidth(int newFocusBorderWidth) +{ + if (m_focusBorderWidth == newFocusBorderWidth) + return; + m_focusBorderWidth = newFocusBorderWidth; + emit focusBorderWidthChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuibutton.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuibutton.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuibutton.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuibutton.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,253 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUIBUTTON_H +#define UKUIBUTTON_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QQuickItem> +#include "tokenparameter.h" +#include "parsedtcolor.h" + +using namespace UKUIGlobalDTConfig; +namespace UKUIQQC2Style { + +class UKUIButton : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(double radius READ radius WRITE setRadius NOTIFY radiusChanged) + Q_PROPERTY(double leftRightMargin READ leftRightMargin WRITE setLeftRightMargin NOTIFY leftRightMarginChanged) + Q_PROPERTY(double upDownMargin READ upDownMargin WRITE setUpDownMargin NOTIFY upDownMarginChanged) + Q_PROPERTY(double space READ space WRITE setSpace NOTIFY spaceChanged) + Q_PROPERTY(int normalWidth READ normalWidth WRITE setNormalWidth NOTIFY normalWidthChanged) + Q_PROPERTY(int normalHeight READ normalHeight WRITE setNormalHeight NOTIFY normalHeightChanged) + Q_PROPERTY(DTColor normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) + Q_PROPERTY(DTColor clickedBC READ clickedBC WRITE setClickedBC NOTIFY clickedBCChanged) + Q_PROPERTY(DTColor hoveredBC READ hoveredBC WRITE setHoveredBC NOTIFY hoveredBCChanged) + Q_PROPERTY(DTColor disableBC READ disableBC WRITE setDisableBC NOTIFY disableBCChanged) + Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) + Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) + + + Q_PROPERTY(DTColor normalHBC READ normalHBC WRITE setNormalHBC NOTIFY normalHBCChanged) + Q_PROPERTY(DTColor clickedHBC READ clickedHBC WRITE setClickedHBC NOTIFY clickedHBCChanged) + Q_PROPERTY(DTColor hoveredHBC READ hoveredHBC WRITE setHoveredHBC NOTIFY hoveredHBCChanged) + Q_PROPERTY(DTColor disableHBC READ disableHBC WRITE setDisableHBC NOTIFY disableHBCChanged) + + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) + Q_PROPERTY(int focusBorderWidth READ focusBorderWidth WRITE setFocusBorderWidth NOTIFY focusBorderWidthChanged) + Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) + Q_PROPERTY(DTColor hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) + Q_PROPERTY(DTColor clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) + Q_PROPERTY(DTColor disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) + Q_PROPERTY(DTColor focusBorderColor READ focusBorderColor WRITE setFocusBorderColor NOTIFY focusBorderColorChanged) + + Q_PROPERTY(DTColor normalBorderHColor READ normalBorderHColor WRITE setNormalBorderHColor NOTIFY normalBorderHColorChanged) + Q_PROPERTY(DTColor hoverBorderHColor READ hoverBorderHColor WRITE setHoverBorderHColor NOTIFY hoverBorderHColorChanged) + Q_PROPERTY(DTColor clickBorderHColor READ clickBorderHColor WRITE setClickBorderHColor NOTIFY clickBorderHColorChanged) + Q_PROPERTY(DTColor disableBorderHColor READ disableBorderHColor WRITE setDisableBorderHColor NOTIFY disableBorderHColorChanged) + +public: + explicit UKUIButton(QQuickItem *parent = nullptr); + ~UKUIButton(); + + static UKUIButton* qmlAttachedProperties(QObject* parent); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + double radius() const; + void setRadius(double newRadius); + + double leftRightMargin() const; + void setLeftRightMargin(double newMargin); + + double upDownMargin() const; + void setUpDownMargin(double newUpDownMargin); + + double space() const; + void setSpace(double newSpace); + + int normalWidth() const; + void setNormalWidth(int newNormalWidth); + + int normalHeight() const; + void setNormalHeight(int newNormalHeight); + + Q_INVOKABLE DTColor normalBC() const; + void setNormalBC(DTColor newNormalBC); + + Q_INVOKABLE DTColor clickedBC() const; + void setClickedBC(DTColor newClickedBC); + + Q_INVOKABLE DTColor hoveredBC() const; + void setHoveredBC(DTColor newHoveredBC); + + Q_INVOKABLE DTColor disableBC() const; + void setDisableBC(DTColor newDisableBC); + + Q_INVOKABLE DTColor disableTextColor() const; + void setDisableTextColor(DTColor newDisableTextColor); + + Q_INVOKABLE DTColor normalTextColor() const; + void setNormalTextColor(DTColor newNormalTextColor); + + Q_INVOKABLE DTColor normalHBC() const; + void setNormalHBC(DTColor newNormalHBC); + + Q_INVOKABLE DTColor clickedHBC() const; + void setClickedHBC(DTColor newClickedHBC); + + Q_INVOKABLE DTColor hoveredHBC(); + void setHoveredHBC(DTColor newHoveredHBC); + + Q_INVOKABLE DTColor disableHBC() const; + void setDisableHBC(DTColor newDisableHBC); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); + + Q_INVOKABLE DTColor normalBorderColor() const; + void setNormalBorderColor(DTColor newNormalBorderColor); + + Q_INVOKABLE DTColor hoverBorderColor() const; + void setHoverBorderColor(DTColor newHoverBorderColor); + + Q_INVOKABLE DTColor clickBorderColor() const; + void setClickBorderColor(DTColor newClickBorderColor); + + Q_INVOKABLE DTColor disableBorderColor() const; + void setDisableBorderColor(DTColor newDisableBorderColor); + + Q_INVOKABLE DTColor normalBorderHColor() const; + void setNormalBorderHColor(DTColor newNormalBorderHColor); + + Q_INVOKABLE DTColor hoverBorderHColor() const; + void setHoverBorderHColor(DTColor newHoverBorderHColor); + + Q_INVOKABLE DTColor clickBorderHColor() const; + void setClickBorderHColor(DTColor newClickBorderHColor); + + Q_INVOKABLE DTColor disableBorderHColor() const; + void setDisableBorderHColor(DTColor newDisableBorderHColor); + + Q_INVOKABLE DTColor focusBorderColor() const; + void setFocusBorderColor(DTColor newFocusBorderColor); + + int focusBorderWidth() const; + void setFocusBorderWidth(int newFocusBorderWidth); + +signals: + void radiusChanged(); + + void leftRightMarginChanged(); + + void upDownMarginChanged(); + + void spaceChanged(); + + void normalWidthChanged(); + + void normalHeightChanged(); + + void normalBCChanged(); + + void clickedBCChanged(); + + void hoveredBCChanged(); + + void disableBCChanged(); + + void disableTextColorChanged(); + + void normalHBCChanged(); + + void clickedHBCChanged(); + + void hoveredHBCChanged(); + + void disableHBCChanged(); + + void borderWidthChanged(); + + void normalBorderColorChanged(); + + void hoverBorderColorChanged(); + + void clickBorderColorChanged(); + + void disableBorderColorChanged(); + + void normalBorderHColorChanged(); + + void hoverBorderHColorChanged(); + + void clickBorderHColorChanged(); + + void disableBorderHColorChanged(); + + void focusBorderColorChanged(); + + void focusBorderWidthChanged(); + + void normalTextColorChanged(); + +private: + double m_radius = 6.0; + double m_leftRightMargin = 10.0; + double m_upDownMargin = 10.0; + double m_space = 4.0; + int m_normalWidth = 96; + int m_normalHeight = 36; + int m_borderWidth; + int m_focusBorderWidth; + + DTColor m_normalBC ; + DTColor m_clickedBC ; + DTColor m_hoveredBC ; + DTColor m_disableBC ; + DTColor m_disableTextColor ; + DTColor m_normalTextColor ; + DTColor m_normalHBC ; + DTColor m_clickedHBC ; + DTColor m_hoveredHBC ; + DTColor m_disableHBC ; + DTColor m_normalBorderColor ; + DTColor m_hoverBorderColor ; + DTColor m_clickBorderColor ; + DTColor m_disableBorderColor ; + DTColor m_normalBorderHColor ; + DTColor m_hoverBorderHColor ; + DTColor m_clickBorderHColor ; + DTColor m_disableBorderHColor ; + DTColor m_focusBorderColor ; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance ; +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUIButton, QML_HAS_ATTACHED_PROPERTIES) + +//Q_DECLARE_METATYPE(UKUIQQC2Style::UKUIButton); +//Q_DECLARE_METATYPE(std::shared_ptr<UKUIQQC2Style::UKUIButton>) + +#endif // UKUIBUTTON_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuicheckbox.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuicheckbox.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuicheckbox.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuicheckbox.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,496 @@ +#include <QApplication> +#include "ukuicheckbox.h" +#include "qdebug.h" +using namespace UKUIQQC2Style; + +UKUICheckBox::UKUICheckBox(QQuickItem *parent) : QQuickItem(parent) +{ + qDebug() << "UKUICheckBox.............."; + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUICheckBox::~UKUICheckBox() +{ + +} + +UKUICheckBox* UKUICheckBox::qmlAttachedProperties(QObject* parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUICheckBox(p); +} + +void UKUICheckBox::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setNormalTextColor(instance->kFontPrimary()); + setDisableTextColor(instance->kFontPrimaryDisable()); + setNormalIndicatorColor(instance->buttonActive()); + setHoverIndicatorColor(instance->kComponentHover()); + setClickIndicatorColor(instance->kComponentClick()); + setDisableIndicatorColor(instance->buttonDisable()); + setNormalIndicatorBorderColor(instance->kLineNormal()); + setHoverIndicatorBorderColor(instance->kLineNormal()); + setClickIndicatorBorderColor(instance->kLineNormal()); + setDisableIndicatorBorderColor(instance->kLineDisable()); + + setChecked_NormalIndicatorColor(instance->highLightActive()); + setChecked_HoverIndicatorColor(instance->kBrandHover()); + setChecked_ClickIndicatorColor(instance->kBrandClick()); + setChecked_DisableIndicatorColor(instance->buttonDisable()); + setChecked_NormalIndicatorBorderColor(instance->kLineNormal()); + setChecked_HoverIndicatorBorderColor(instance->kLineNormal()); + setChecked_ClickIndicatorBorderColor(instance->kLineNormal()); + setChecked_DisableIndicatorBorderColor(instance->kLineDisable()); + + setChecked_NormalChildrenColor(instance->highLightedTextActive()); + setChecked_HoverChildrenColor(instance->highLightedTextActive()); + setChecked_ClickChildrenColor(instance->highLightedTextActive()); + setChecked_DisableChildrenColor(instance->highLightedTextDisable()); + + setBorderWidth(instance->normalline()); + setSpace(8); + setIndicatorWidth(16); + setChildrenWidth(8); + setRadius(instance->kradiusMin()); +} + + + +double UKUICheckBox::leftRightMargin() const +{ + return m_leftRightMargin; +} + +void UKUICheckBox::setLeftRightMargin(double newLeftRightMargin) +{ + if (qFuzzyCompare(m_leftRightMargin, newLeftRightMargin)) + return; + m_leftRightMargin = newLeftRightMargin; + emit leftRightMarginChanged(); +} + +double UKUICheckBox::upDownMargin() const +{ + return m_upDownMargin; +} + +void UKUICheckBox::setUpDownMargin(double newUpDownMargin) +{ + if (qFuzzyCompare(m_upDownMargin, newUpDownMargin)) + return; + m_upDownMargin = newUpDownMargin; + emit upDownMarginChanged(); +} + +double UKUICheckBox::space() const +{ + return m_space; +} + +void UKUICheckBox::setSpace(double newSpace) +{ + if (qFuzzyCompare(m_space, newSpace)) + return; + m_space = newSpace; + emit spaceChanged(); +} + +DTColor UKUICheckBox::disableTextColor() const +{ + return m_disableTextColor; +} + +void UKUICheckBox::setDisableTextColor(DTColor newDisableTextColor) +{ + if (m_disableTextColor != newDisableTextColor){ + m_disableTextColor = newDisableTextColor; + emit disableTextColorChanged(); + } +} + +DTColor UKUICheckBox::normalTextColor() const +{ + return m_normalTextColor; +} + +void UKUICheckBox::setNormalTextColor(DTColor newNormalTextColor) +{ + if (m_normalTextColor != newNormalTextColor){ + m_normalTextColor = newNormalTextColor; + emit normalTextColorChanged(); + } +} + +DTColor UKUICheckBox::normalIndicatorColor() const +{ + return m_normalIndicatorColor; +} + +void UKUICheckBox::setNormalIndicatorColor(DTColor newNormalIndicatorColor) +{ + if (m_normalIndicatorColor != newNormalIndicatorColor){ + m_normalIndicatorColor = newNormalIndicatorColor; + emit normalIndicatorColorChanged(); + } +} + +DTColor UKUICheckBox::hoverIndicatorColor() const +{ + return m_hoverIndicatorColor; +} + +void UKUICheckBox::setHoverIndicatorColor(DTColor newHoverIndicatorColor) +{ + if (m_hoverIndicatorColor != newHoverIndicatorColor){ + m_hoverIndicatorColor = newHoverIndicatorColor; + emit hoverIndicatorColorChanged(); + } +} + +DTColor UKUICheckBox::clickIndicatorColor() const +{ + return m_clickIndicatorColor; +} + +void UKUICheckBox::setClickIndicatorColor(DTColor newClickIndicatorColor) +{ + if (m_clickIndicatorColor != newClickIndicatorColor){ + m_clickIndicatorColor = newClickIndicatorColor; + emit clickIndicatorColorChanged(); + } +} + +DTColor UKUICheckBox::disableIndicatorColor() const +{ + return m_disableIndicatorColor; +} + +void UKUICheckBox::setDisableIndicatorColor(DTColor newDisableIndicatorColor) +{ + if (m_disableIndicatorColor != newDisableIndicatorColor){ + m_disableIndicatorColor = newDisableIndicatorColor; + emit disableIndicatorColorChanged(); + } +} + +DTColor UKUICheckBox::normalIndicatorBorderColor() const +{ + return m_normalIndicatorBorderColor; +} + +void UKUICheckBox::setNormalIndicatorBorderColor(DTColor newNormalIndicatorBorderColor) +{ + if (m_normalIndicatorBorderColor != newNormalIndicatorBorderColor){ + m_normalIndicatorBorderColor = newNormalIndicatorBorderColor; + emit normalIndicatorBorderColorChanged(); + } +} + +DTColor UKUICheckBox::hoverIndicatorBorderColor() const +{ + return m_hoverIndicatorBorderColor; +} + +void UKUICheckBox::setHoverIndicatorBorderColor(DTColor newHoverIndicatorBorderColor) +{ + if (m_hoverIndicatorBorderColor != newHoverIndicatorBorderColor){ + m_hoverIndicatorBorderColor = newHoverIndicatorBorderColor; + emit hoverIndicatorBorderColorChanged(); + } +} + +DTColor UKUICheckBox::clickIndicatorBorderColor() const +{ + return m_clickIndicatorBorderColor; +} + +void UKUICheckBox::setClickIndicatorBorderColor(DTColor newClickIndicatorBorderColor) +{ + if (m_clickIndicatorBorderColor != newClickIndicatorBorderColor){ + m_clickIndicatorBorderColor = newClickIndicatorBorderColor; + emit clickIndicatorBorderColorChanged(); + } +} + +DTColor UKUICheckBox::disableIndicatorBorderColor() const +{ + return m_disableIndicatorBorderColor; +} + +void UKUICheckBox::setDisableIndicatorBorderColor(DTColor newDisableIndicatorBorderColor) +{ + if (m_disableIndicatorBorderColor != newDisableIndicatorBorderColor){ + m_disableIndicatorBorderColor = newDisableIndicatorBorderColor; + emit disableIndicatorBorderColorChanged(); + } +} + +DTColor UKUICheckBox::checked_normalIndicatorColor() const +{ + return m_checked_normalIndicatorColor; +} + +DTColor UKUICheckBox::checked_hoverIndicatorColor() const +{ + return m_checked_hoverIndicatorColor; +} + +DTColor UKUICheckBox::checked_clickIndicatorColor() const +{ + return m_checked_clickIndicatorColor; +} + +DTColor UKUICheckBox::checked_disableIndicatorColor() const +{ + return m_checked_disableIndicatorColor; +} + +DTColor UKUICheckBox::checked_normalIndicatorBorderColor() const +{ + return m_checked_normalIndicatorBorderColor; +} + +DTColor UKUICheckBox::checked_hoverIndicatorBorderColor() const +{ + return m_checked_hoverIndicatorBorderColor; +} + +DTColor UKUICheckBox::checked_clickIndicatorBorderColor() const +{ + return m_checked_clickIndicatorBorderColor; +} + +DTColor UKUICheckBox::checked_disableIndicatorBorderColor() const +{ + return m_checked_disableIndicatorBorderColor; +} + +DTColor UKUICheckBox::checked_normalChildrenColor() const +{ + return m_checked_normalChildrenColor; +} + +DTColor UKUICheckBox::checked_hoverChildrenColor() const +{ + return m_checked_hoverChildrenColor; +} + +DTColor UKUICheckBox::checked_clickChildrenColor() const +{ + return m_checked_clickChildrenColor; +} + + +DTColor UKUICheckBox::checked_disableChildrenColor() const +{ + return m_checked_disableChildrenColor; +} + +DTColor UKUICheckBox::checked_normalChildrenBorderColor() const +{ + return m_checked_normalChildrenBorderColor; +} + +DTColor UKUICheckBox::checked_hoverChildrenBorderColor() const +{ + return m_checked_hoverChildrenBorderColor; +} + +DTColor UKUICheckBox::checked_clickChildrenBorderColor() const +{ + return m_checked_clickChildrenBorderColor; +} + + +DTColor UKUICheckBox::checked_disableChildrenBorderColor() const +{ + return m_checked_disableChildrenBorderColor; +} + + +void UKUICheckBox::setChecked_NormalIndicatorColor(DTColor newChecked_normalIndicatorColor) +{ + if (m_checked_normalIndicatorColor != newChecked_normalIndicatorColor){ + m_checked_normalIndicatorColor = newChecked_normalIndicatorColor; + emit checked_normalIndicatorColorChanged(); + } +} + +void UKUICheckBox::setChecked_HoverIndicatorColor(DTColor newChecked_hoverIndicatorColor) +{ + if (m_checked_hoverIndicatorColor != newChecked_hoverIndicatorColor){ + m_checked_hoverIndicatorColor = newChecked_hoverIndicatorColor; + emit checked_hoverIndicatorColorChanged(); + } +} + +void UKUICheckBox::setChecked_ClickIndicatorColor(DTColor newChecked_clickIndicatorColor) +{ + if (m_checked_clickIndicatorColor != newChecked_clickIndicatorColor){ + m_checked_clickIndicatorColor = newChecked_clickIndicatorColor; + emit checked_clickIndicatorColorChanged(); + } +} + +void UKUICheckBox::setChecked_DisableIndicatorColor(DTColor newChecked_disableIndicatorColor) +{ + if (m_checked_disableIndicatorColor != newChecked_disableIndicatorColor){ + m_checked_disableIndicatorColor = newChecked_disableIndicatorColor; + emit checked_disableIndicatorColorChanged(); + } +} + +void UKUICheckBox::setChecked_NormalIndicatorBorderColor(DTColor newChecked_normalIndicatorBorderColor) +{ + if (m_checked_normalIndicatorBorderColor != newChecked_normalIndicatorBorderColor){ + m_checked_normalIndicatorBorderColor = newChecked_normalIndicatorBorderColor; + emit checked_normalIndicatorBorderColorChanged(); + } +} + +void UKUICheckBox::setChecked_HoverIndicatorBorderColor(DTColor newChecked_hoverIndicatorBorderColor) +{ + if (m_checked_hoverIndicatorBorderColor != newChecked_hoverIndicatorBorderColor){ + m_checked_hoverIndicatorBorderColor = newChecked_hoverIndicatorBorderColor; + emit checked_hoverIndicatorBorderColorChanged(); + } +} + +void UKUICheckBox::setChecked_ClickIndicatorBorderColor(DTColor newChecked_clickIndicatorBorderColor) +{ + if (m_checked_clickIndicatorBorderColor != newChecked_clickIndicatorBorderColor){ + m_checked_clickIndicatorBorderColor = newChecked_clickIndicatorBorderColor; + emit checked_clickIndicatorBorderColorChanged(); + } +} + +void UKUICheckBox::setChecked_DisableIndicatorBorderColor(DTColor newChecked_disableIndicatorBorderColor) +{ + if (m_checked_disableIndicatorBorderColor != newChecked_disableIndicatorBorderColor){ + m_checked_disableIndicatorBorderColor = newChecked_disableIndicatorBorderColor; + emit checked_disableIndicatorBorderColorChanged(); + } +} + +void UKUICheckBox::setChecked_NormalChildrenColor(DTColor newChecked_normalChildrenColor) +{ + if (m_checked_normalChildrenColor != newChecked_normalChildrenColor){ + m_checked_normalChildrenColor = newChecked_normalChildrenColor; + emit checked_normalChildrenColorChanged(); + } +} + +void UKUICheckBox::setChecked_HoverChildrenColor(DTColor newChecked_hoverChildrenColor) +{ + if (m_checked_hoverChildrenColor != newChecked_hoverChildrenColor){ + m_checked_hoverChildrenColor = newChecked_hoverChildrenColor; + emit checked_hoverChildrenColorChanged(); + } +} + +void UKUICheckBox::setChecked_ClickChildrenColor(DTColor newChecked_clickChildrenColor) +{ + if (m_checked_clickChildrenColor != newChecked_clickChildrenColor){ + m_checked_clickChildrenColor = newChecked_clickChildrenColor; + emit checked_clickChildrenColorChanged(); + } +} + +void UKUICheckBox::setChecked_DisableChildrenColor(DTColor newChecked_disableChildrenColor) +{ + if (m_checked_disableChildrenColor != newChecked_disableChildrenColor){ + m_checked_disableChildrenColor = newChecked_disableChildrenColor; + emit checked_disableChildrenColorChanged(); + } +} + +void UKUICheckBox::setChecked_NormalChildrenBorderColor(DTColor newChecked_normalChildrenBorderColor) +{ + if (m_checked_normalChildrenBorderColor != newChecked_normalChildrenBorderColor){ + m_checked_normalChildrenBorderColor = newChecked_normalChildrenBorderColor; + emit checked_normalChildrenBorderColorChanged(); + } +} + +void UKUICheckBox::setChecked_HoverChildrenBorderColor(DTColor newChecked_hoverChildrenBorderColor) +{ + if (m_checked_hoverChildrenBorderColor != newChecked_hoverChildrenBorderColor){ + m_checked_hoverChildrenBorderColor = newChecked_hoverChildrenBorderColor; + emit checked_hoverChildrenBorderColorChanged(); + } +} + +void UKUICheckBox::setChecked_ClickChildrenBorderColor(DTColor newChecked_clickChildrenBorderColor) +{ + if (m_checked_clickChildrenBorderColor != newChecked_clickChildrenBorderColor){ + m_checked_clickChildrenBorderColor = newChecked_clickChildrenBorderColor; + emit checked_clickChildrenBorderColorChanged(); + } +} + +void UKUICheckBox::setChecked_DisableChildrenBorderColor(DTColor newChecked_disableChildrenBorderColor) +{ + if (m_checked_disableChildrenBorderColor != newChecked_disableChildrenBorderColor){ + m_checked_disableChildrenBorderColor = newChecked_disableChildrenBorderColor; + emit checked_disableChildrenBorderColorChanged(); + } +} + +int UKUICheckBox::borderWidth() const +{ + return m_borderWidth; +} + +void UKUICheckBox::setBorderWidth(int newBorderWidth) +{ + if (m_borderWidth == newBorderWidth) + return; + m_borderWidth = newBorderWidth; + emit borderWidthChanged(); +} + +int UKUICheckBox::indicatorWidth() const +{ + return m_indicatorWidth; +} + +void UKUICheckBox::setIndicatorWidth(int newIndicatorWidth) +{ + if (m_indicatorWidth == newIndicatorWidth) + return; + m_indicatorWidth = newIndicatorWidth; + emit indicatorWidthChanged(); +} + +int UKUICheckBox::childrenWidth() const +{ + return m_childrenWidth; +} + +void UKUICheckBox::setChildrenWidth(int newChildrenWidth) +{ + if (m_childrenWidth == newChildrenWidth) + return; + m_childrenWidth = newChildrenWidth; + emit childrenWidthChanged(); +} + +int UKUICheckBox::radius() const +{ + return m_radius; +} + +void UKUICheckBox::setRadius(int newRadius) +{ + if (m_radius == newRadius) + return; + m_radius = newRadius; + emit radiusChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuicheckbox.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuicheckbox.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuicheckbox.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuicheckbox.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,295 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUICHECKBOX_H +#define UKUICHECKBOX_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUICheckBox : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(double leftRightMargin READ leftRightMargin WRITE setLeftRightMargin NOTIFY leftRightMarginChanged) + Q_PROPERTY(double upDownMargin READ upDownMargin WRITE setUpDownMargin NOTIFY upDownMarginChanged) + Q_PROPERTY(double space READ space WRITE setSpace NOTIFY spaceChanged) + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) + + + Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) + Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) + + Q_PROPERTY(DTColor normalIndicatorColor READ normalIndicatorColor WRITE setNormalIndicatorColor NOTIFY normalIndicatorColorChanged) + Q_PROPERTY(DTColor hoverIndicatorColor READ hoverIndicatorColor WRITE setHoverIndicatorColor NOTIFY hoverIndicatorColorChanged) + Q_PROPERTY(DTColor clickIndicatorColor READ clickIndicatorColor WRITE setClickIndicatorColor NOTIFY clickIndicatorColorChanged) + Q_PROPERTY(DTColor disableIndicatorColor READ disableIndicatorColor WRITE setDisableIndicatorColor NOTIFY disableIndicatorColorChanged) + Q_PROPERTY(DTColor normalIndicatorBorderColor READ normalIndicatorBorderColor WRITE setNormalIndicatorBorderColor NOTIFY normalIndicatorBorderColorChanged) + Q_PROPERTY(DTColor hoverIndicatorBorderColor READ hoverIndicatorBorderColor WRITE setHoverIndicatorBorderColor NOTIFY hoverIndicatorBorderColorChanged) + Q_PROPERTY(DTColor clickIndicatorBorderColor READ clickIndicatorBorderColor WRITE setClickIndicatorBorderColor NOTIFY clickIndicatorBorderColorChanged) + Q_PROPERTY(DTColor disableIndicatorBorderColor READ disableIndicatorBorderColor WRITE setDisableIndicatorBorderColor NOTIFY disableIndicatorBorderColorChanged) + + Q_PROPERTY(DTColor checked_normalIndicatorColor READ checked_normalIndicatorColor WRITE setChecked_NormalIndicatorColor NOTIFY checked_normalIndicatorColorChanged) + Q_PROPERTY(DTColor checked_hoverIndicatorColor READ checked_hoverIndicatorColor WRITE setChecked_HoverIndicatorColor NOTIFY checked_hoverIndicatorColorChanged) + Q_PROPERTY(DTColor checked_clickIndicatorColor READ checked_clickIndicatorColor WRITE setChecked_ClickIndicatorColor NOTIFY checked_clickIndicatorColorChanged) + Q_PROPERTY(DTColor checked_disableIndicatorColor READ checked_disableIndicatorColor WRITE setChecked_DisableIndicatorColor NOTIFY checked_disableIndicatorColorChanged) + Q_PROPERTY(DTColor checked_normalIndicatorBorderColor READ checked_normalIndicatorBorderColor WRITE setChecked_NormalIndicatorBorderColor NOTIFY checked_normalIndicatorBorderColorChanged) + Q_PROPERTY(DTColor checked_hoverIndicatorBorderColor READ checked_hoverIndicatorBorderColor WRITE setChecked_HoverIndicatorBorderColor NOTIFY checked_hoverIndicatorBorderColorChanged) + Q_PROPERTY(DTColor checked_clickIndicatorBorderColor READ checked_clickIndicatorBorderColor WRITE setChecked_ClickIndicatorBorderColor NOTIFY checked_clickIndicatorBorderColorChanged) + Q_PROPERTY(DTColor checked_disableIndicatorBorderColor READ checked_disableIndicatorBorderColor WRITE setChecked_DisableIndicatorBorderColor NOTIFY checked_disableIndicatorBorderColorChanged) + + Q_PROPERTY(DTColor checked_normalChildrenColor READ checked_normalChildrenColor WRITE setChecked_NormalChildrenColor NOTIFY checked_normalChildrenColorChanged) + Q_PROPERTY(DTColor checked_hoverChildrenColor READ checked_hoverChildrenColor WRITE setChecked_HoverChildrenColor NOTIFY checked_hoverChildrenColorChanged) + Q_PROPERTY(DTColor checked_clickChildrenColor READ checked_clickChildrenColor WRITE setChecked_ClickChildrenColor NOTIFY checked_clickChildrenColorChanged) + Q_PROPERTY(DTColor checked_disableChildrenColor READ checked_disableChildrenColor WRITE setChecked_DisableChildrenColor NOTIFY checked_disableChildrenColorChanged) + Q_PROPERTY(DTColor checked_normalChildrenBorderColor READ checked_normalChildrenBorderColor WRITE setChecked_NormalChildrenBorderColor NOTIFY checked_normalChildrenBorderColorChanged) + Q_PROPERTY(DTColor checked_hoverChildrenBorderColor READ checked_hoverChildrenBorderColor WRITE setChecked_HoverChildrenBorderColor NOTIFY checked_hoverChildrenBorderColorChanged) + Q_PROPERTY(DTColor checked_clickChildrenBorderColor READ checked_clickChildrenBorderColor WRITE setChecked_ClickChildrenBorderColor NOTIFY checked_clickChildrenBorderColorChanged) + Q_PROPERTY(DTColor checked_disableChildrenBorderColor READ checked_disableChildrenBorderColor WRITE setChecked_DisableChildrenBorderColor NOTIFY checked_disableChildrenBorderColorChanged) + + Q_PROPERTY(int indicatorWidth READ indicatorWidth WRITE setIndicatorWidth NOTIFY indicatorWidthChanged) + Q_PROPERTY(int childrenWidth READ childrenWidth WRITE setChildrenWidth NOTIFY childrenWidthChanged) + Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY radiusChanged) + + +public: + explicit UKUICheckBox(QQuickItem *parent = nullptr); + ~UKUICheckBox(); + + static UKUICheckBox* qmlAttachedProperties(QObject* parent); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + double leftRightMargin() const; + void setLeftRightMargin(double newLeftRightMargin); + + double upDownMargin() const; + void setUpDownMargin(double newUpDownMargin); + + double space() const; + void setSpace(double newSpace); + + Q_INVOKABLE DTColor disableTextColor() const; + void setDisableTextColor(DTColor newDisableTextColor); + + Q_INVOKABLE DTColor normalTextColor() const; + void setNormalTextColor(DTColor newNormalTextColor); + + Q_INVOKABLE DTColor normalIndicatorColor() const; + void setNormalIndicatorColor(DTColor newNormalIndicatorColor); + + Q_INVOKABLE DTColor hoverIndicatorColor() const; + void setHoverIndicatorColor(DTColor newHoverIndicatorColor); + + Q_INVOKABLE DTColor clickIndicatorColor() const; + void setClickIndicatorColor(DTColor newClickIndicatorColor); + + Q_INVOKABLE DTColor disableIndicatorColor() const; + void setDisableIndicatorColor(DTColor newDisableIndicatorColor); + + Q_INVOKABLE DTColor normalIndicatorBorderColor() const; + void setNormalIndicatorBorderColor(DTColor newNormalIndicatorBorderColor); + + Q_INVOKABLE DTColor hoverIndicatorBorderColor() const; + void setHoverIndicatorBorderColor(DTColor newHoverIndicatorBorderColor); + + Q_INVOKABLE DTColor clickIndicatorBorderColor() const; + void setClickIndicatorBorderColor(DTColor newClickIndicatorBorderColor); + + Q_INVOKABLE DTColor disableIndicatorBorderColor() const; + void setDisableIndicatorBorderColor(DTColor newDisableIndicatorBorderColor); + + Q_INVOKABLE DTColor checked_normalIndicatorColor() const; + void setChecked_NormalIndicatorColor(DTColor newChecked_normalIndicatorColor); + + Q_INVOKABLE DTColor checked_hoverIndicatorColor() const; + void setChecked_HoverIndicatorColor(DTColor newChecked_hoverIndicatorColor); + + Q_INVOKABLE DTColor checked_clickIndicatorColor() const; + void setChecked_ClickIndicatorColor(DTColor newChecked_clickIndicatorColor); + + Q_INVOKABLE DTColor checked_disableIndicatorColor() const; + void setChecked_DisableIndicatorColor(DTColor newChecked_disableIndicatorColor); + + Q_INVOKABLE DTColor checked_normalIndicatorBorderColor() const; + void setChecked_NormalIndicatorBorderColor(DTColor newChecked_normalIndicatorBorderColor); + + Q_INVOKABLE DTColor checked_hoverIndicatorBorderColor() const; + void setChecked_HoverIndicatorBorderColor(DTColor newChecked_hoverIndicatorBorderColor); + + Q_INVOKABLE DTColor checked_clickIndicatorBorderColor() const; + void setChecked_ClickIndicatorBorderColor(DTColor newChecked_clickIndicatorBorderColor); + + Q_INVOKABLE DTColor checked_disableIndicatorBorderColor() const; + void setChecked_DisableIndicatorBorderColor(DTColor newChecked_disableIndicatorBorderColor); + + Q_INVOKABLE DTColor checked_normalChildrenColor() const; + void setChecked_NormalChildrenColor(DTColor newChecked_normalChildrenColor); + + Q_INVOKABLE DTColor checked_hoverChildrenColor() const; + void setChecked_HoverChildrenColor(DTColor newChecked_hoverChildrenColor); + + Q_INVOKABLE DTColor checked_clickChildrenColor() const; + void setChecked_ClickChildrenColor(DTColor newChecked_clickChildrenColor); + + Q_INVOKABLE DTColor checked_disableChildrenColor() const; + void setChecked_DisableChildrenColor(DTColor newChecked_disableChildrenColor); + + Q_INVOKABLE DTColor checked_normalChildrenBorderColor() const; + void setChecked_NormalChildrenBorderColor(DTColor newChecked_normalChildrenBorderColor); + + Q_INVOKABLE DTColor checked_hoverChildrenBorderColor() const; + void setChecked_HoverChildrenBorderColor(DTColor newChecked_hoverChildrenBorderColor); + + Q_INVOKABLE DTColor checked_clickChildrenBorderColor() const; + void setChecked_ClickChildrenBorderColor(DTColor newChecked_clickChildrenBorderColor); + + Q_INVOKABLE DTColor checked_disableChildrenBorderColor() const; + void setChecked_DisableChildrenBorderColor(DTColor newChecked_disableChildrenBorderColor); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); + + int indicatorWidth() const; + void setIndicatorWidth(int newIndicatorWidth); + + int childrenWidth() const; + void setChildrenWidth(int newChildrenWidth); + + int radius() const; + void setRadius(int newRadius); + +signals: + + void leftRightMarginChanged(); + + void upDownMarginChanged(); + + void spaceChanged(); + + void disableTextColorChanged(); + + void normalTextColorChanged(); + + void normalIndicatorColorChanged(); + + void hoverIndicatorColorChanged(); + + void clickIndicatorColorChanged(); + + void disableIndicatorColorChanged(); + + void normalIndicatorBorderColorChanged(); + + void hoverIndicatorBorderColorChanged(); + + void clickIndicatorBorderColorChanged(); + + void disableIndicatorBorderColorChanged(); + + void checked_normalIndicatorColorChanged(); + + void checked_hoverIndicatorColorChanged(); + + void checked_clickIndicatorColorChanged(); + + void checked_disableIndicatorColorChanged(); + + void checked_normalIndicatorBorderColorChanged(); + + void checked_hoverIndicatorBorderColorChanged(); + + void checked_clickIndicatorBorderColorChanged(); + + void checked_disableIndicatorBorderColorChanged(); + + void checked_normalChildrenColorChanged(); + + void checked_hoverChildrenColorChanged(); + + void checked_clickChildrenColorChanged(); + + void checked_disableChildrenColorChanged(); + + void checked_normalChildrenBorderColorChanged(); + + void checked_hoverChildrenBorderColorChanged(); + + void checked_clickChildrenBorderColorChanged(); + + void checked_disableChildrenBorderColorChanged(); + + void borderWidthChanged(); + + void indicatorWidthChanged(); + + void childrenWidthChanged(); + + void radiusChanged(); + +private: + double m_leftRightMargin; + double m_upDownMargin; + double m_space; + Q_INVOKABLE DTColor m_disableTextColor ; + Q_INVOKABLE DTColor m_normalTextColor ; + Q_INVOKABLE DTColor m_normalIndicatorColor ; + Q_INVOKABLE DTColor m_hoverIndicatorColor ; + Q_INVOKABLE DTColor m_clickIndicatorColor ; + Q_INVOKABLE DTColor m_disableIndicatorColor ; + Q_INVOKABLE DTColor m_normalIndicatorBorderColor ; + Q_INVOKABLE DTColor m_hoverIndicatorBorderColor ; + Q_INVOKABLE DTColor m_clickIndicatorBorderColor ; + Q_INVOKABLE DTColor m_disableIndicatorBorderColor ; + Q_INVOKABLE DTColor m_checked_normalIndicatorColor ; + Q_INVOKABLE DTColor m_checked_hoverIndicatorColor ; + Q_INVOKABLE DTColor m_checked_clickIndicatorColor ; + Q_INVOKABLE DTColor m_checked_disableIndicatorColor ; + Q_INVOKABLE DTColor m_checked_normalIndicatorBorderColor ; + Q_INVOKABLE DTColor m_checked_hoverIndicatorBorderColor ; + Q_INVOKABLE DTColor m_checked_clickIndicatorBorderColor ; + Q_INVOKABLE DTColor m_checked_disableIndicatorBorderColor ; + Q_INVOKABLE DTColor m_checked_normalChildrenColor ; + Q_INVOKABLE DTColor m_checked_hoverChildrenColor ; + Q_INVOKABLE DTColor m_checked_clickChildrenColor ; + Q_INVOKABLE DTColor m_checked_disableChildrenColor ; + Q_INVOKABLE DTColor m_checked_normalChildrenBorderColor ; + Q_INVOKABLE DTColor m_checked_hoverChildrenBorderColor ; + Q_INVOKABLE DTColor m_checked_clickChildrenBorderColor ; + Q_INVOKABLE DTColor m_checked_disableChildrenBorderColor ; + int m_borderWidth; + int m_indicatorWidth; + int m_childrenWidth; + int m_radius; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance ; + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUICheckBox, QML_HAS_ATTACHED_PROPERTIES) + + +#endif // UKUICHECKBOX_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuicombobox.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuicombobox.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuicombobox.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuicombobox.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,278 @@ +#include <QApplication> +#include "ukuicombobox.h" +#include "qdebug.h" +using namespace UKUIQQC2Style; + +UKUIComboBox::UKUIComboBox(QQuickItem *parent) : QQuickItem(parent) +{ + qDebug() << "UKUIComboBox.............."; + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUIComboBox::~UKUIComboBox() +{ + +} + +UKUIComboBox* UKUIComboBox::qmlAttachedProperties(QObject* parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUIComboBox(p); +} + +void UKUIComboBox::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setLeftRightPadding(instance->kmarginNormal()); + setRadius(instance->kradiusNormal()); + setBorderWidth(instance->normalline()); + setFocusBorderWidth(instance->focusline()); + setNormalWidth(240); + setNormalHeight(36); + setNormalBC(instance->buttonActive()); + setNormalBorderColor(instance->kLineComponentNormal()); + setDisableBorderColor(instance->kLineComponentDisable()); + setFocusBorderColor(instance->kBrandFocus()); + setNormalTextColor(instance->buttonTextActive()); + setDisableTextColor(instance->buttonTextDisable()); +} + +double UKUIComboBox::radius() const +{ + return m_radius; +} + +void UKUIComboBox::setRadius(double newRadius) +{ + if (qFuzzyCompare(m_radius, newRadius)) + return; + m_radius = newRadius; + emit radiusChanged(); +} + +double UKUIComboBox::leftRightPadding() const +{ + return m_leftRightPadding; +} + +void UKUIComboBox::setLeftRightPadding(double newLeftRightPadding) +{ + if (qFuzzyCompare(m_leftRightPadding, newLeftRightPadding)) + return; + m_leftRightPadding = newLeftRightPadding; + emit leftRightPaddingChanged(); +} + +double UKUIComboBox::upDownMargin() const +{ + return m_upDownMargin; +} + +void UKUIComboBox::setUpDownMargin(double newUpDownMargin) +{ + if (qFuzzyCompare(m_upDownMargin, newUpDownMargin)) + return; + m_upDownMargin = newUpDownMargin; + emit upDownMarginChanged(); +} + +double UKUIComboBox::space() const +{ + return m_space; +} + +void UKUIComboBox::setSpace(double newSpace) +{ + if (qFuzzyCompare(m_space, newSpace)) + return; + m_space = newSpace; + emit spaceChange(); +} + +int UKUIComboBox::normalWidth() const +{ + return m_normalWidth; +} + +void UKUIComboBox::setNormalWidth(int newNormalWidth) +{ + if (m_normalWidth == newNormalWidth) + return; + m_normalWidth = newNormalWidth; + emit normalWidthChanged(); +} + +int UKUIComboBox::normalHeight() const +{ + return m_normalHeight; +} + +void UKUIComboBox::setNormalHeight(int newNormalHeight) +{ + if (m_normalHeight == newNormalHeight) + return; + m_normalHeight = newNormalHeight; + emit normalHeightChanged(); +} + +DTColor UKUIComboBox::normalBC() const +{ + return m_normalBC; +} + +void UKUIComboBox::setNormalBC(DTColor newNormalBC) +{ + if (m_normalBC !=newNormalBC){ + m_normalBC = newNormalBC; + emit normalBCChanged(); + } +} + +DTColor UKUIComboBox::clickedBC() const +{ + return m_clickedBC; +} + +void UKUIComboBox::setClickedBC(DTColor newClickedBC) +{ + if (m_clickedBC != newClickedBC){ + m_clickedBC = newClickedBC; + emit clickedBCChanged(); + } +} + +DTColor UKUIComboBox::hoveredBC() const +{ + return m_hoveredBC; +} + +void UKUIComboBox::setHoveredBC(DTColor newHoveredBC) +{ + if (m_hoveredBC != newHoveredBC){ + m_hoveredBC = newHoveredBC; + emit hoveredBCChanged(); + } +} + +DTColor UKUIComboBox::disableBC() const +{ + return m_disableBC; +} + +void UKUIComboBox::setDisableBC(DTColor newDisableBC) +{ + if (m_disableBC != newDisableBC){ + m_disableBC = newDisableBC; + emit disableBCChanged(); + } +} + +DTColor UKUIComboBox::disableTextColor() const +{ + return m_disableTextColor; +} + +void UKUIComboBox::setDisableTextColor(DTColor newDisableTextColor) +{ + if (m_disableTextColor != newDisableTextColor){ + m_disableTextColor = newDisableTextColor; + emit disableTextColorChanged(); + } +} + +DTColor UKUIComboBox::normalTextColor() const +{ + return m_normalTextColor; +} + +void UKUIComboBox::setNormalTextColor(DTColor newNormalTextColor) +{ + if (m_normalTextColor != newNormalTextColor){ + m_normalTextColor = newNormalTextColor; + emit normalTextColorChanged(); + } +} + +int UKUIComboBox::borderWidth() const +{ + return m_borderWidth; +} + +void UKUIComboBox::setBorderWidth(int newBorderWidth) +{ + if (m_borderWidth == newBorderWidth) + return; + m_borderWidth = newBorderWidth; + emit borderWidthChanged(); +} + +int UKUIComboBox::focusBorderWidth() const +{ + return m_focusBorderWidth; +} + +void UKUIComboBox::setFocusBorderWidth(int newFocusBorderWidth) +{ + if (m_focusBorderWidth == newFocusBorderWidth) + return; + m_focusBorderWidth = newFocusBorderWidth; + emit focusBorderWidthChanged(); +} + +DTColor UKUIComboBox::normalBorderColor() const +{ + return m_normalBorderColor; +} + +void UKUIComboBox::setNormalBorderColor(DTColor newNormalBorderColor) +{ + if (m_normalBorderColor != newNormalBorderColor){ + m_normalBorderColor = newNormalBorderColor; + emit normalBorderColorChanged(); + } +} + +DTColor UKUIComboBox::clickBorderColor() const +{ + return m_clickBorderColor; +} + +void UKUIComboBox::setClickBorderColor(DTColor newClickBorderColor) +{ + if (m_clickBorderColor != newClickBorderColor){ + m_clickBorderColor = newClickBorderColor; + emit clickBorderColorChanged(); + } +} + +DTColor UKUIComboBox::disableBorderColor() const +{ + return m_disableBorderColor; +} + +void UKUIComboBox::setDisableBorderColor(DTColor newDisableBorderColor) +{ + if (m_disableBorderColor != newDisableBorderColor){ + m_disableBorderColor = newDisableBorderColor; + emit disableBorderColorChanged(); + } +} + +DTColor UKUIComboBox::focusBorderColor() const +{ + return m_focusBorderColor; +} + +void UKUIComboBox::setFocusBorderColor(DTColor newFocusBorderColor) +{ + if (m_focusBorderColor != newFocusBorderColor){ + m_focusBorderColor = newFocusBorderColor; + emit focusBorderColorChanged(); + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuicombobox.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuicombobox.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuicombobox.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuicombobox.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,189 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUICOMBOBOX_H +#define UKUICOMBOBOX_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUIComboBox : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(double radius READ radius WRITE setRadius NOTIFY radiusChanged) + Q_PROPERTY(double leftRightPadding READ leftRightPadding WRITE setLeftRightPadding NOTIFY leftRightPaddingChanged) + Q_PROPERTY(double upDownMargin READ upDownMargin WRITE setUpDownMargin NOTIFY upDownMarginChanged) + Q_PROPERTY(double space READ space WRITE setSpace NOTIFY spaceChange) + + Q_PROPERTY(int normalWidth READ normalWidth WRITE setNormalWidth NOTIFY normalWidthChanged) + Q_PROPERTY(int normalHeight READ normalHeight WRITE setNormalHeight NOTIFY normalHeightChanged) + Q_PROPERTY(DTColor normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) + Q_PROPERTY(DTColor clickedBC READ clickedBC WRITE setClickedBC NOTIFY clickedBCChanged) + Q_PROPERTY(DTColor hoveredBC READ hoveredBC WRITE setHoveredBC NOTIFY hoveredBCChanged) + Q_PROPERTY(DTColor disableBC READ disableBC WRITE setDisableBC NOTIFY disableBCChanged) + Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) + Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) + + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) + Q_PROPERTY(int focusBorderWidth READ focusBorderWidth WRITE setFocusBorderWidth NOTIFY focusBorderWidthChanged) + Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) + Q_PROPERTY(DTColor clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) + Q_PROPERTY(DTColor disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) + Q_PROPERTY(DTColor focusBorderColor READ focusBorderColor WRITE setFocusBorderColor NOTIFY focusBorderColorChanged) + + +public: + explicit UKUIComboBox(QQuickItem *parent = nullptr); + ~UKUIComboBox(); + + static UKUIComboBox* qmlAttachedProperties(QObject* parent); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + + + double radius() const; + void setRadius(double newRadius); + + double leftRightPadding() const; + void setLeftRightPadding(double newLeftRightPadding); + + double upDownMargin() const; + void setUpDownMargin(double newUpDownMargin); + + double space() const; + void setSpace(double newSpace); + + int normalWidth() const; + void setNormalWidth(int newNormalWidth); + + int normalHeight() const; + void setNormalHeight(int newNormalHeight); + + Q_INVOKABLE DTColor normalBC() const; + void setNormalBC(DTColor newNormalBC); + + Q_INVOKABLE DTColor clickedBC() const; + void setClickedBC(DTColor newClickedBC); + + Q_INVOKABLE DTColor hoveredBC() const; + void setHoveredBC(DTColor newHoveredBC); + + Q_INVOKABLE DTColor disableBC() const; + void setDisableBC(DTColor newDisableBC); + + Q_INVOKABLE DTColor disableTextColor() const; + void setDisableTextColor(DTColor newDisableTextColor); + + Q_INVOKABLE DTColor normalTextColor() const; + void setNormalTextColor(DTColor newNormalTextColor); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); + + int focusBorderWidth() const; + void setFocusBorderWidth(int newFocusBorderWidth); + + Q_INVOKABLE DTColor normalBorderColor() const; + void setNormalBorderColor(DTColor newNormalBorderColor); + + Q_INVOKABLE DTColor clickBorderColor() const; + void setClickBorderColor(DTColor newClickBorderColor); + + Q_INVOKABLE DTColor disableBorderColor() const; + void setDisableBorderColor(DTColor newDisableBorderColor); + + Q_INVOKABLE DTColor focusBorderColor() const; + void setFocusBorderColor(DTColor newFocusBorderColor); + +signals: + + void radiusChanged(); + + void leftRightPaddingChanged(); + + void upDownMarginChanged(); + + void spaceChange(); + + void normalWidthChanged(); + + void normalHeightChanged(); + + void normalBCChanged(); + + void clickedBCChanged(); + + void hoveredBCChanged(); + + void disableBCChanged(); + + void disableTextColorChanged(); + + void normalTextColorChanged(); + + void borderWidthChanged(); + + void focusBorderWidthChanged(); + + void normalBorderColorChanged(); + + void clickBorderColorChanged(); + + void disableBorderColorChanged(); + + void focusBorderColorChanged(); + +private: + + double m_radius; + double m_leftRightPadding; + double m_upDownMargin; + double m_space; + int m_normalWidth; + int m_normalHeight; + int m_borderWidth; + int m_focusBorderWidth; + + Q_INVOKABLE DTColor m_normalBC ; + Q_INVOKABLE DTColor m_clickedBC ; + Q_INVOKABLE DTColor m_hoveredBC ; + Q_INVOKABLE DTColor m_disableBC ; + Q_INVOKABLE DTColor m_disableTextColor ; + Q_INVOKABLE DTColor m_normalTextColor ; + Q_INVOKABLE DTColor m_normalBorderColor ; + Q_INVOKABLE DTColor m_clickBorderColor ; + Q_INVOKABLE DTColor m_disableBorderColor ; + Q_INVOKABLE DTColor m_focusBorderColor ; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance ; + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUIComboBox, QML_HAS_ATTACHED_PROPERTIES) + +#endif // UKUICOMBOBOX_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,203 @@ +#include "ukuiitemdelegate.h" +#include "qdebug.h" + +using namespace UKUIQQC2Style; + +UKUIItemDelegate::UKUIItemDelegate(QQuickItem *parent) : QQuickItem(parent) +{ + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUIItemDelegate::~UKUIItemDelegate() +{ + +} + +void UKUIItemDelegate::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setRadius(instance->kradiusNormal()); + setNormalTextColor(instance->textActive()); + setDisableTextColor(instance->textDisable()); + + setNormalBC(DTColor(QColor(0,0,0,0))); + setClickedBC(instance->kContainClick()); + setHoveredBC(instance->kContainHover()); + setDisableBC(DTColor(QColor(0,0,0,0))); + + setBorderWidth(1); + setNormalBorderColor(instance->kLineComponentNormal()); + setClickBorderColor(instance->kLineComponentClick()); + setHoverBorderColor(instance->kLineComponentHover()); + setDisableBorderColor(instance->kLineComponentDisable()); + +} + + +UKUIItemDelegate* UKUIItemDelegate::qmlAttachedProperties(QObject *parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUIItemDelegate(p); +} + +DTColor UKUIItemDelegate::normalTextColor() const +{ + return m_normalTextColor; +} + +void UKUIItemDelegate::setNormalTextColor(DTColor newNormalTextColor) +{ + if (m_normalTextColor == newNormalTextColor) + return; + m_normalTextColor = newNormalTextColor; + emit normalTextColorChanged(); +} + +DTColor UKUIItemDelegate::disableTextColor() const +{ + return m_disableTextColor; +} + +void UKUIItemDelegate::setDisableTextColor(DTColor newDisableTextColor) +{ + if (m_disableTextColor == newDisableTextColor) + return; + m_disableTextColor = newDisableTextColor; + emit disableTextColorChanged(); +} + +DTColor UKUIItemDelegate::normalBC() const +{ + return m_normalBC; +} + +void UKUIItemDelegate::setNormalBC(DTColor newNormalBC) +{ + if (m_normalBC == newNormalBC) + return; + m_normalBC = newNormalBC; + emit normalBCChanged(); +} + +DTColor UKUIItemDelegate::clickedBC() const +{ + return m_clickedBC; +} + +void UKUIItemDelegate::setClickedBC(DTColor newClickedBC) +{ + if (m_clickedBC == newClickedBC) + return; + m_clickedBC = newClickedBC; + emit clickedBCChanged(); +} + +DTColor UKUIItemDelegate::hoveredBC() const +{ + return m_hoveredBC; +} + +void UKUIItemDelegate::setHoveredBC(DTColor newHoveredBC) +{ + if (m_hoveredBC == newHoveredBC) + return; + m_hoveredBC = newHoveredBC; + emit hoveredBCChanged(); +} + +DTColor UKUIItemDelegate::disableBC() const +{ + return m_disableBC; +} + +void UKUIItemDelegate::setDisableBC(DTColor newDisableBC) +{ + if (m_disableBC == newDisableBC) + return; + m_disableBC = newDisableBC; + emit disableBCChanged(); +} + +int UKUIItemDelegate::radius() const +{ + return m_radius; +} + +void UKUIItemDelegate::setRadius(int newRadius) +{ + if (m_radius == newRadius) + return; + m_radius = newRadius; + emit radiusChanged(); +} + +int UKUIItemDelegate::borderWidth() const +{ + return m_borderWidth; +} + +void UKUIItemDelegate::setBorderWidth(int newBorderWidth) +{ + if (m_borderWidth == newBorderWidth) + return; + m_borderWidth = newBorderWidth; + emit borderWidthChanged(); +} + +DTColor UKUIItemDelegate::normalBorderColor() const +{ + return m_normalBorderColor; +} + +void UKUIItemDelegate::setNormalBorderColor(DTColor newNormalBorderColor) +{ + if (m_normalBorderColor == newNormalBorderColor) + return; + m_normalBorderColor = newNormalBorderColor; + emit normalBorderColorChanged(); +} + +DTColor UKUIItemDelegate::hoverBorderColor() const +{ + return m_hoverBorderColor; +} + +void UKUIItemDelegate::setHoverBorderColor(DTColor newHoverBorderColor) +{ + if (m_hoverBorderColor == newHoverBorderColor) + return; + m_hoverBorderColor = newHoverBorderColor; + emit hoverBorderColorChanged(); +} + +DTColor UKUIItemDelegate::clickBorderColor() const +{ + return m_clickBorderColor; +} + +void UKUIItemDelegate::setClickBorderColor(DTColor newClickBorderColor) +{ + if (m_clickBorderColor == newClickBorderColor) + return; + m_clickBorderColor = newClickBorderColor; + emit clickBorderColorChanged(); +} + +DTColor UKUIItemDelegate::disableBorderColor() const +{ + return m_disableBorderColor; +} + +void UKUIItemDelegate::setDisableBorderColor(DTColor newDisableBorderColor) +{ + if (m_disableBorderColor == newDisableBorderColor) + return; + m_disableBorderColor = newDisableBorderColor; + emit disableBorderColorChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiitemdelegate.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,147 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUIITEMDELEGATE_H +#define UKUIITEMDELEGATE_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QApplication> +#include <QPalette> +#include <QtQml/qqml.h> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUIItemDelegate : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY radiusChanged) + + Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) + Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) + Q_PROPERTY(DTColor normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) + Q_PROPERTY(DTColor clickedBC READ clickedBC WRITE setClickedBC NOTIFY clickedBCChanged) + Q_PROPERTY(DTColor hoveredBC READ hoveredBC WRITE setHoveredBC NOTIFY hoveredBCChanged) + Q_PROPERTY(DTColor disableBC READ disableBC WRITE setDisableBC NOTIFY disableBCChanged) + + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) + Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) + Q_PROPERTY(DTColor hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) + Q_PROPERTY(DTColor clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) + Q_PROPERTY(DTColor disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) + +public: + explicit UKUIItemDelegate(QQuickItem *parent = nullptr); + ~UKUIItemDelegate(); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + + static UKUIItemDelegate* qmlAttachedProperties(QObject* parent); + + + Q_INVOKABLE DTColor normalTextColor() const; + void setNormalTextColor(DTColor newNormalTextColor); + + Q_INVOKABLE DTColor disableTextColor() const; + void setDisableTextColor(DTColor newDisableTextColor); + + Q_INVOKABLE DTColor normalBC() const; + void setNormalBC(DTColor newNormalBC); + + Q_INVOKABLE DTColor clickedBC() const; + void setClickedBC(DTColor newClickedBC); + + Q_INVOKABLE DTColor hoveredBC() const; + void setHoveredBC(DTColor newHoveredBC); + + Q_INVOKABLE DTColor disableBC() const; + void setDisableBC(DTColor newDisableBC); + + int radius() const; + void setRadius(int newRadius); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); + + Q_INVOKABLE DTColor normalBorderColor() const; + void setNormalBorderColor(DTColor newNormalBorderColor); + + Q_INVOKABLE DTColor hoverBorderColor() const; + void setHoverBorderColor(DTColor newHoverBorderColor); + + Q_INVOKABLE DTColor clickBorderColor() const; + void setClickBorderColor(DTColor newClickBorderColor); + + Q_INVOKABLE DTColor disableBorderColor() const; + void setDisableBorderColor(DTColor newDisableBorderColor); + +signals: + + void normalTextColorChanged(); + + void disableTextColorChanged(); + + void normalBCChanged(); + + void clickedBCChanged(); + + void hoveredBCChanged(); + + void disableBCChanged(); + + void radiusChanged(); + + void borderWidthChanged(); + + void normalBorderColorChanged(); + + void hoverBorderColorChanged(); + + void clickBorderColorChanged(); + + void disableBorderColorChanged(); + +private: + Q_INVOKABLE DTColor m_normalTextColor ; + Q_INVOKABLE DTColor m_disableTextColor ; + Q_INVOKABLE DTColor m_normalBC ; + Q_INVOKABLE DTColor m_clickedBC ; + Q_INVOKABLE DTColor m_hoveredBC ; + Q_INVOKABLE DTColor m_disableBC ; + Q_INVOKABLE DTColor m_normalBorderColor ; + Q_INVOKABLE DTColor m_hoverBorderColor ; + Q_INVOKABLE DTColor m_clickBorderColor ; + Q_INVOKABLE DTColor m_disableBorderColor ; + int m_radius; + int m_borderWidth; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUIItemDelegate, QML_HAS_ATTACHED_PROPERTIES) + +#endif // UKUIITEMDELEGATE_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuilabel.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuilabel.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuilabel.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuilabel.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,73 @@ +#include "ukuilabel.h" +#include "qdebug.h" + +using namespace UKUIQQC2Style; + +UKUILabel::UKUILabel(QQuickItem *parent) : QQuickItem(parent) +{ + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUILabel::~UKUILabel() +{ + +} + +void UKUILabel::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setNormalColor(instance->textActive()); + setDisableColor(instance->textDisable()); +} + +UKUILabel* UKUILabel::qmlAttachedProperties(QObject *parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUILabel(p); +} + +const DTColor &UKUILabel::normalColor() const +{ + return m_normalColor; +} + +void UKUILabel::setNormalColor(const DTColor &newNormalColor) +{ + if (m_normalColor == newNormalColor) + return; + m_normalColor = newNormalColor; + emit normalColorChanged(); +} + +const DTColor &UKUILabel::linkColor() const +{ + return m_linkColor; +} + +void UKUILabel::setLinkColor(const DTColor &newLinkColor) +{ + if (m_linkColor == newLinkColor) + return; + m_linkColor = newLinkColor; + emit linkColorChanged(); +} + + +const DTColor &UKUILabel::disableColor() const +{ + return m_disableColor; +} + +void UKUILabel::setDisableColor(const DTColor &newDisableColor) +{ + if (m_disableColor == newDisableColor) + return; + m_disableColor = newDisableColor; + emit disableColorChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuilabel.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuilabel.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuilabel.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuilabel.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,81 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUILABEL_H +#define UKUILABEL_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QApplication> +#include <QPalette> +#include <QtQml/qqml.h> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUILabel : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(DTColor normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) + Q_PROPERTY(DTColor disableColor READ disableColor WRITE setDisableColor NOTIFY disableColorChanged) + Q_PROPERTY(DTColor linkColor READ linkColor WRITE setLinkColor NOTIFY linkColorChanged) + +public: + explicit UKUILabel(QQuickItem *parent = nullptr); + ~UKUILabel(); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + + static UKUILabel* qmlAttachedProperties(QObject* parent); + + const DTColor &normalColor() const; + void setNormalColor(const DTColor &newNormalColor); + const DTColor &linkColor() const; + void setLinkColor(const DTColor &newLinkColor); + + + const DTColor &disableColor() const; + void setDisableColor(const DTColor &newDisableColor); + +signals: + void normalColorChanged(); + + void linkColorChanged(); + + void disableColorChanged(); + +private: + Q_INVOKABLE DTColor m_normalColor = DTColor(QColor ::fromRgbF(0, 0, 0, 0.85)); + + Q_INVOKABLE DTColor m_linkColor = DTColor(Qt::blue); + Q_INVOKABLE DTColor m_disableColor; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUILabel, QML_HAS_ATTACHED_PROPERTIES) + +#endif // UKUILABEL_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuimenu.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuimenu.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuimenu.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuimenu.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,143 @@ +#include "ukuimenu.h" +#include "qdebug.h" + +using namespace UKUIQQC2Style; + +UKUIMenu::UKUIMenu(QQuickItem *parent) : QQuickItem(parent) +{ + qDebug() << "UKUIMenu.............."; + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUIMenu::~UKUIMenu() +{ + +} + +void UKUIMenu::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setshadowNormalColor(instance->shadowActive()); + setshadowDisableColor(instance->shadowDisable()); + setNormalBC(instance->baseActive()); + setNormalBorderColor(instance->kLineWindowAcitive()); + setBorder(1); +} + +UKUIMenu* UKUIMenu::qmlAttachedProperties(QObject* parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUIMenu(p); +} + +int UKUIMenu::leftRightPadding() const +{ + return m_leftRightPadding; +} + +void UKUIMenu::setLeftRightPadding(int newLeftRightPadding) +{ + if (m_leftRightPadding == newLeftRightPadding) + return; + m_leftRightPadding = newLeftRightPadding; + emit leftRightPaddingChanged(); +} + +int UKUIMenu::topBottomPadding() const +{ + return m_topBottomPadding; +} + +void UKUIMenu::setTopBottomPadding(int newTopBottomPadding) +{ + if (m_topBottomPadding == newTopBottomPadding) + return; + m_topBottomPadding = newTopBottomPadding; + emit topBottomPaddingChanged(); +} + + +int UKUIMenu::radius() const +{ + return m_radius; +} + +void UKUIMenu::setRadius(int newRadius) +{ + if (m_radius == newRadius) + return; + m_radius = newRadius; + emit radiusChanged(); +} + + +const DTColor &UKUIMenu::shadowNormalColor() const +{ + return m_shadowNormalColor; +} + +void UKUIMenu::setshadowNormalColor(const DTColor &newshadowNormalColor) +{ + if (m_shadowNormalColor == newshadowNormalColor) + return; + m_shadowNormalColor = newshadowNormalColor; + emit shadowNormalColorChanged(); +} + +const DTColor &UKUIMenu::shadowDisableColor() const +{ + return m_shadowDisableColor; +} + +void UKUIMenu::setshadowDisableColor(const DTColor &newShadowDisableColor) +{ + if (m_shadowDisableColor == newShadowDisableColor) + return; + m_shadowDisableColor = newShadowDisableColor; + emit shadowDisableColorChanged(); +} + +const DTColor &UKUIMenu::normalBC() const +{ + return m_normalBC; +} + +void UKUIMenu::setNormalBC(const DTColor &newNormalBC) +{ + if (m_normalBC == newNormalBC) + return; + m_normalBC = newNormalBC; + emit normalBCChanged(); +} + +const DTColor &UKUIMenu::normalBorderColor() const +{ + return m_normalBorderColor; +} + +void UKUIMenu::setNormalBorderColor(const DTColor &newNormalBorderColor) +{ + if (m_normalBorderColor == newNormalBorderColor) + return; + m_normalBorderColor = newNormalBorderColor; + emit normalBorderColorChanged(); +} + +int UKUIMenu::border() const +{ + return m_border; +} + +void UKUIMenu::setBorder(int newBorder) +{ + if (m_border == newBorder) + return; + m_border = newBorder; + emit borderChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuimenu.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuimenu.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuimenu.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuimenu.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,113 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUIMENU_H +#define UKUIMENU_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QApplication> +#include <QPalette> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUIMenu : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(int leftRightPadding READ leftRightPadding WRITE setLeftRightPadding NOTIFY leftRightPaddingChanged) + Q_PROPERTY(int topBottomPadding READ topBottomPadding WRITE setTopBottomPadding NOTIFY topBottomPaddingChanged) + Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY radiusChanged) + Q_PROPERTY(int border READ border WRITE setBorder NOTIFY borderChanged) + Q_PROPERTY(DTColor shadowNormalColor READ shadowNormalColor WRITE setshadowNormalColor NOTIFY shadowNormalColorChanged) + Q_PROPERTY(DTColor shadowDisableColor READ shadowDisableColor WRITE setshadowDisableColor NOTIFY shadowDisableColorChanged) + Q_PROPERTY(DTColor normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) + Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) + +public: + explicit UKUIMenu(QQuickItem *parent = nullptr); + ~UKUIMenu(); + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + + static UKUIMenu* qmlAttachedProperties(QObject* parent); + + int leftRightPadding() const; + void setLeftRightPadding(int newLeftRightPadding); + + int topBottomPadding() const; + void setTopBottomPadding(int newTopBottomPadding); + + int radius() const; + void setRadius(int newRadius); + + const DTColor &shadowNormalColor() const; + void setshadowNormalColor(const DTColor &newshadowNormalColor); + + const DTColor &shadowDisableColor() const; + void setshadowDisableColor(const DTColor &newShadowDisableColor); + + const DTColor &normalBC() const; + void setNormalBC(const DTColor &newNormalBC); + + const DTColor &normalBorderColor() const; + void setNormalBorderColor(const DTColor &newNormalBorderColor); + + int border() const; + void setBorder(int newBorder); + +signals: + void leftRightPaddingChanged(); + + void topBottomPaddingChanged(); + + void radiusChanged(); + + void shadowNormalColorChanged(); + + void shadowDisableColorChanged(); + + void normalBCChanged(); + + void normalBorderColorChanged(); + + void borderChanged(); + +private: + int m_leftRightPadding = 8; + int m_topBottomPadding = 6; + int m_radius = 8; + Q_INVOKABLE DTColor m_shadowNormalColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.3)); + Q_INVOKABLE DTColor m_shadowDisableColor; + Q_INVOKABLE DTColor m_normalBC; + Q_INVOKABLE DTColor m_normalBorderColor; + int m_border; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUIMenu, QML_HAS_ATTACHED_PROPERTIES) + +#endif // UKUIMENU_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuimenuitem.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuimenuitem.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuimenuitem.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuimenuitem.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,264 @@ +#include "ukuimenuitem.h" +#include "qdebug.h" + +using namespace UKUIQQC2Style; + +UKUIMenuItem::UKUIMenuItem(QQuickItem *parent) : QQuickItem(parent) +{ + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUIMenuItem::~UKUIMenuItem() +{ + +} + +void UKUIMenuItem::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setBorderWidth(1); + setNormalBC(DTColor(QColor(0,0,0,0))); + setHoveredBC(instance->kComponentHover()); + setClickedBC(instance->kComponentClick()); + setDisableBC(DTColor(QColor(0,0,0,0))); + setNormalBorderColor(DTColor(QColor(0,0,0,0))); + setHoverBorderColor(instance->kLineComponentHover()); + setClickBorderColor(instance->kLineComponentClick()); + setDisableBorderColor(DTColor(QColor(0,0,0,0))); + setNormalTextColor(instance->kFontPrimary()); + setDisableTextColor(instance->kFontPrimaryDisable()); +} + +UKUIMenuItem* UKUIMenuItem::qmlAttachedProperties(QObject* parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUIMenuItem(p); +} + +int UKUIMenuItem::leftRightPadding() const +{ + return m_leftRightPadding; +} + +void UKUIMenuItem::setLeftRightPadding(int newLeftRightPadding) +{ + if (m_leftRightPadding == newLeftRightPadding) + return; + m_leftRightPadding = newLeftRightPadding; + emit leftRightPaddingChanged(); +} + +int UKUIMenuItem::topBottomPadding() const +{ + return m_topBottomPadding; +} + +void UKUIMenuItem::setTopBottomPadding(int newTopBottomPadding) +{ + if (m_topBottomPadding == newTopBottomPadding) + return; + m_topBottomPadding = newTopBottomPadding; + emit topBottomPaddingChanged(); +} + +int UKUIMenuItem::imageWidth() const +{ + return m_imageWidth; +} + +void UKUIMenuItem::setImageWidth(int newImageWidth) +{ + if (m_imageWidth == newImageWidth) + return; + m_imageWidth = newImageWidth; + emit imageWidthChanged(); +} + +int UKUIMenuItem::imageSpace() const +{ + return m_imageSpace; +} + +void UKUIMenuItem::setImageSpace(int newImageSpace) +{ + if (m_imageSpace == newImageSpace) + return; + m_imageSpace = newImageSpace; + emit imageSpaceChanged(); +} + +int UKUIMenuItem::normalHeight() const +{ + return m_normalHeight; +} + +void UKUIMenuItem::setNormalHeight(int newNormalHeight) +{ + if (m_normalHeight == newNormalHeight) + return; + m_normalHeight = newNormalHeight; + emit normalHeightChanged(); +} + +int UKUIMenuItem::radius() const +{ + return m_radius; +} + +void UKUIMenuItem::setRadius(int newRadius) +{ + if (m_radius == newRadius) + return; + m_radius = newRadius; + emit RadiusChanged(); +} + + +const DTColor &UKUIMenuItem::normalBC() const +{ + return m_normalBC; +} + +void UKUIMenuItem::setNormalBC(const DTColor &newNormalBC) +{ + if (m_normalBC == newNormalBC) + return; + m_normalBC = newNormalBC; + emit normalBCChanged(); +} + +const DTColor &UKUIMenuItem::clickedBC() const +{ + return m_clickedBC; +} + +void UKUIMenuItem::setClickedBC(const DTColor &newClickedBC) +{ + if (m_clickedBC == newClickedBC) + return; + m_clickedBC = newClickedBC; + emit clickedBCChanged(); +} + +const DTColor &UKUIMenuItem::hoveredBC() const +{ + return m_hoveredBC; +} + +void UKUIMenuItem::setHoveredBC(const DTColor &newHoveredBC) +{ + if (m_hoveredBC == newHoveredBC) + return; + m_hoveredBC = newHoveredBC; + emit hoveredBCChanged(); +} + +const DTColor &UKUIMenuItem::disableBC() const +{ + return m_disableBC; +} + +void UKUIMenuItem::setDisableBC(const DTColor &newDisableBC) +{ + if (m_disableBC == newDisableBC) + return; + m_disableBC = newDisableBC; + emit disableBCChanged(); +} + +const DTColor &UKUIMenuItem::disableTextColor() const +{ + return m_disableTextColor; +} + +void UKUIMenuItem::setDisableTextColor(const DTColor &newDisableTextColor) +{ + if (m_disableTextColor == newDisableTextColor) + return; + m_disableTextColor = newDisableTextColor; + emit disableTextColorChanged(); +} + +const DTColor &UKUIMenuItem::normalTextColor() const +{ + return m_normalTextColor; +} + +void UKUIMenuItem::setNormalTextColor(const DTColor &newNormalTextColor) +{ + if (m_normalTextColor == newNormalTextColor) + return; + m_normalTextColor = newNormalTextColor; + emit disableTextColorChanged(); +} + +int UKUIMenuItem::borderWidth() const +{ + return m_borderWidth; +} + +void UKUIMenuItem::setBorderWidth(int newBorderWidth) +{ + if (m_borderWidth == newBorderWidth) + return; + m_borderWidth = newBorderWidth; + emit borderWidthChanged(); +} + +const DTColor &UKUIMenuItem::normalBorderColor() const +{ + return m_normalBorderColor; +} + +void UKUIMenuItem::setNormalBorderColor(const DTColor &newNormalBorderColor) +{ + if (m_normalBorderColor == newNormalBorderColor) + return; + m_normalBorderColor = newNormalBorderColor; + emit normalBorderColorChanged(); +} + +const DTColor &UKUIMenuItem::hoverBorderColor() const +{ + return m_hoverBorderColor; +} + +void UKUIMenuItem::setHoverBorderColor(const DTColor &newHoverBorderColor) +{ + if (m_hoverBorderColor == newHoverBorderColor) + return; + m_hoverBorderColor = newHoverBorderColor; + emit hoverBorderColorChanged(); +} + +const DTColor &UKUIMenuItem::clickBorderColor() const +{ + return m_clickBorderColor; +} + +void UKUIMenuItem::setClickBorderColor(const DTColor &newClickBorderColor) +{ + if (m_clickBorderColor == newClickBorderColor) + return; + m_clickBorderColor = newClickBorderColor; + emit clickBorderColorChanged(); +} + +const DTColor &UKUIMenuItem::disableBorderColor() const +{ + return m_disableBorderColor; +} + +void UKUIMenuItem::setDisableBorderColor(const DTColor &newDisableBorderColor) +{ + if (m_disableBorderColor == newDisableBorderColor) + return; + m_disableBorderColor = newDisableBorderColor; + emit disableBorderColorChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuimenuitem.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuimenuitem.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuimenuitem.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuimenuitem.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,177 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUIMENUITEM_H +#define UKUIMENUITEM_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QApplication> +#include <QPalette> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUIMenuItem : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(int leftRightPadding READ leftRightPadding WRITE setLeftRightPadding NOTIFY leftRightPaddingChanged) + Q_PROPERTY(int topBottomPadding READ topBottomPadding WRITE setTopBottomPadding NOTIFY topBottomPaddingChanged) + Q_PROPERTY(int imageWidth READ imageWidth WRITE setImageWidth NOTIFY imageWidthChanged) + Q_PROPERTY(int imageSpace READ imageSpace WRITE setImageSpace NOTIFY imageSpaceChanged) + Q_PROPERTY(int normalHeight READ normalHeight WRITE setNormalHeight NOTIFY normalHeightChanged) + Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY RadiusChanged) + + Q_PROPERTY(DTColor normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) + Q_PROPERTY(DTColor clickedBC READ clickedBC WRITE setClickedBC NOTIFY clickedBCChanged) + Q_PROPERTY(DTColor hoveredBC READ hoveredBC WRITE setHoveredBC NOTIFY hoveredBCChanged) + Q_PROPERTY(DTColor disableBC READ disableBC WRITE setDisableBC NOTIFY disableBCChanged) + Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) + Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY disableTextColorChanged) + + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) + Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) + Q_PROPERTY(DTColor hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) + Q_PROPERTY(DTColor clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) + Q_PROPERTY(DTColor disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) + +public: + explicit UKUIMenuItem(QQuickItem *parent = nullptr); + ~UKUIMenuItem(); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + + static UKUIMenuItem* qmlAttachedProperties(QObject* parent); + + int leftRightPadding() const; + void setLeftRightPadding(int newLeftRightPadding); + + int topBottomPadding() const; + void setTopBottomPadding(int newTopBottomPadding); + + int imageWidth() const; + void setImageWidth(int newImageWidth); + + int imageSpace() const; + void setImageSpace(int newImageSpace); + + int normalHeight() const; + void setNormalHeight(int newNormalHeight); + + int radius() const; + void setRadius(int newRadius); + + const DTColor &normalBC() const; + void setNormalBC(const DTColor &newNormalBC); + + const DTColor &clickedBC() const; + void setClickedBC(const DTColor &newClickedBC); + + const DTColor &hoveredBC() const; + void setHoveredBC(const DTColor &newHoveredBC); + + const DTColor &disableBC() const; + void setDisableBC(const DTColor &newDisableBC); + + const DTColor &disableTextColor() const; + void setDisableTextColor(const DTColor &newDisableTextColor); + + const DTColor &normalTextColor() const; + void setNormalTextColor(const DTColor &newNormalTextColor); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); + + const DTColor &normalBorderColor() const; + void setNormalBorderColor(const DTColor &newNormalBorderColor); + + const DTColor &hoverBorderColor() const; + void setHoverBorderColor(const DTColor &newHoverBorderColor); + + const DTColor &clickBorderColor() const; + void setClickBorderColor(const DTColor &newClickBorderColor); + + const DTColor &disableBorderColor() const; + void setDisableBorderColor(const DTColor &newDisableBorderColor); + +signals: + void leftRightPaddingChanged(); + + void topBottomPaddingChanged(); + + void imageWidthChanged(); + + void imageSpaceChanged(); + + void normalHeightChanged(); + + void RadiusChanged(); + + void normalBCChanged(); + + void clickedBCChanged(); + + void hoveredBCChanged(); + + void disableBCChanged(); + + void disableTextColorChanged(); + + void borderWidthChanged(); + + void normalBorderColorChanged(); + + void hoverBorderColorChanged(); + + void clickBorderColorChanged(); + + void disableBorderColorChanged(); + +private: + int m_leftRightPadding = 8; + int m_topBottomPadding = 6; + int m_imageWidth = 16; + int m_imageSpace = 4; + int m_normalHeight = 36; + int m_radius = 8; + Q_INVOKABLE DTColor m_normalBC; + Q_INVOKABLE DTColor m_clickedBC; + Q_INVOKABLE DTColor m_hoveredBC; + Q_INVOKABLE DTColor m_disableBC; + Q_INVOKABLE DTColor m_disableTextColor; + Q_INVOKABLE DTColor m_normalTextColor; + int m_borderWidth; + Q_INVOKABLE DTColor m_normalBorderColor; + Q_INVOKABLE DTColor m_hoverBorderColor; + Q_INVOKABLE DTColor m_clickBorderColor; + Q_INVOKABLE DTColor m_disableBorderColor; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUIMenuItem, QML_HAS_ATTACHED_PROPERTIES) + +#endif // UKUIMENUITEM_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuipopup.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuipopup.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuipopup.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuipopup.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,114 @@ +#include "ukuipopup.h" +#include "qdebug.h" + +using namespace UKUIQQC2Style; + +UKUIPopup::UKUIPopup(QQuickItem *parent) : QQuickItem(parent) +{ + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUIPopup::~UKUIPopup() +{ + +} + +void UKUIPopup::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setBackColor(instance->baseActive()); + setBackBorderColor(instance->kLineWindowAcitive()); + setRadius(instance->kradiusMenu()); + //setShadowColor(instance->kShadowMenu()); +} + +UKUIPopup* UKUIPopup::qmlAttachedProperties(QObject* parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUIPopup(p); +} + +const DTColor &UKUIPopup::normalColor() const +{ + return m_normalColor; +} + +void UKUIPopup::setNormalColor(const DTColor &newNormalColor) +{ + if (m_normalColor == newNormalColor) + return; + m_normalColor = newNormalColor; + emit normalColorChanged(); +} + + +int UKUIPopup::padding() const +{ + return m_padding; +} + +void UKUIPopup::setPadding(int newPadding) +{ + if (m_padding == newPadding) + return; + m_padding = newPadding; + emit paddingChanged(); +} + +const DTColor &UKUIPopup::backColor() const +{ + return m_backColor; +} + +void UKUIPopup::setBackColor(const DTColor &newBackColor) +{ + if (m_backColor == newBackColor) + return; + m_backColor = newBackColor; + emit backColorChanged(); +} + +const DTColor &UKUIPopup::backBorderColor() const +{ + return m_backBorderColor; +} + +void UKUIPopup::setBackBorderColor(const DTColor &newBackBorderColor) +{ + if (m_backBorderColor == newBackBorderColor) + return; + m_backBorderColor = newBackBorderColor; + emit backBorderColorChanged(); +} + +const DTColor &UKUIPopup::shadowColor() const +{ + return m_shadowColor; +} + +void UKUIPopup::setShadowColor(const DTColor &newShadowColor) +{ + if (m_shadowColor == newShadowColor) + return; + m_shadowColor = newShadowColor; + emit shadowColorChanged(); +} + +int UKUIPopup::radius() const +{ + return m_radius; +} + +void UKUIPopup::setRadius(int newRadius) +{ + if (m_radius == newRadius) + return; + m_radius = newRadius; + emit radiusChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuipopup.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuipopup.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuipopup.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuipopup.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,103 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUIPOPUP_H +#define UKUIPOPUP_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QApplication> +#include <QPalette> +#include <QtQml/qqml.h> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUIPopup : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY radiusChanged) + + Q_PROPERTY(DTColor normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) + Q_PROPERTY(int padding READ padding WRITE setPadding NOTIFY paddingChanged) + Q_PROPERTY(DTColor backColor READ backColor WRITE setBackColor NOTIFY backColorChanged) + Q_PROPERTY(DTColor backBorderColor READ backBorderColor WRITE setBackBorderColor NOTIFY backBorderColorChanged) + Q_PROPERTY(DTColor shadowColor READ shadowColor WRITE setShadowColor NOTIFY shadowColorChanged) + +public: + explicit UKUIPopup(QQuickItem *parent = nullptr); + ~UKUIPopup(); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + + static UKUIPopup* qmlAttachedProperties(QObject* parent); + + const DTColor &normalColor() const; + void setNormalColor(const DTColor &newNormalColor); + + int padding() const; + void setPadding(int newPadding); + + const DTColor &backColor() const; + void setBackColor(const DTColor &newBackColor); + + const DTColor &backBorderColor() const; + void setBackBorderColor(const DTColor &newBackBorderColor); + + const DTColor &shadowColor() const; + void setShadowColor(const DTColor &newShadowColor); + + int radius() const; + void setRadius(int newRadius); + +signals: + void normalColorChanged(); + + void paddingChanged(); + + void backColorChanged(); + + void backBorderColorChanged(); + + void shadowColorChanged(); + + void radiusChanged(); + +private: + Q_INVOKABLE DTColor m_normalColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.85)); + + int m_padding = 12; + Q_INVOKABLE DTColor m_backColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.85)); + Q_INVOKABLE DTColor m_backBorderColor = DTColor(QColor::fromRgbF(1, 1, 1)); + Q_INVOKABLE DTColor m_shadowColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.3)); + int m_radius; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUIPopup, QML_HAS_ATTACHED_PROPERTIES) + +#endif // UKUIPOPUP_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiprogressbar.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiprogressbar.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiprogressbar.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiprogressbar.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,170 @@ +#include "ukuiprogressbar.h" +#include "qdebug.h" + +using namespace UKUIQQC2Style; + +UKUIProgressBar::UKUIProgressBar(QQuickItem *parent) : QQuickItem(parent) +{ + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUIProgressBar::~UKUIProgressBar() +{ + +} + +void UKUIProgressBar::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setRadius(instance->kradiusNormal()); + setNormalColor(instance->kComponentNormal()); + setChildrenColor(instance->highLightActive()); + setNormalWidth(243); + setNormalHeight(30); + setIndeterminateChildrenWidth(56); + setBorderWidth(1); + setBorderColor(instance->kLineComponentNormal()); + +} + +UKUIProgressBar* UKUIProgressBar::qmlAttachedProperties(QObject *parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUIProgressBar(p); +} + +const DTColor &UKUIProgressBar::normalColor() const +{ + return m_normalColor; +} + +void UKUIProgressBar::setNormalColor(const DTColor &newNormalColor) +{ + if (m_normalColor == newNormalColor) + return; + m_normalColor = newNormalColor; + emit normalColorChanged(); +} + +int UKUIProgressBar::radius() const +{ + return m_radius; +} + +void UKUIProgressBar::setRadius(int newRadius) +{ + if (m_radius == newRadius) + return; + m_radius = newRadius; + emit radiusChanged(); +} + +const DTColor &UKUIProgressBar::childrenColor() const +{ + return m_childrenColor; +} + +void UKUIProgressBar::setChildrenColor(const DTColor &newChildrenColor) +{ + if (m_childrenColor == newChildrenColor) + return; + m_childrenColor = newChildrenColor; + emit childrenColorChanged(); +} + +int UKUIProgressBar::normalWidth() const +{ + return m_normalWidth; +} + +void UKUIProgressBar::setNormalWidth(int newNormalWidth) +{ + if (m_normalWidth == newNormalWidth) + return; + m_normalWidth = newNormalWidth; + emit normalWidthChanged(); +} + +int UKUIProgressBar::normalHeight() const +{ + return m_normalHeight; +} + +void UKUIProgressBar::setNormalHeight(int newNormalHeight) +{ + if (m_normalHeight == newNormalHeight) + return; + m_normalHeight = newNormalHeight; + emit normalHeightChanged(); +} + +int UKUIProgressBar::indeterminateChildrenWidth() const +{ + return m_indeterminateChildrenWidth; +} + +void UKUIProgressBar::setIndeterminateChildrenWidth(int newIndeterminateChildrenWidth) +{ + if (m_indeterminateChildrenWidth == newIndeterminateChildrenWidth) + return; + m_indeterminateChildrenWidth = newIndeterminateChildrenWidth; + emit indeterminateChildrenWidthChanged(); +} + +const DTColor &UKUIProgressBar::indeterminateChildrenStartColor() const +{ + return m_indeterminateChildrenStartColor; +} + +void UKUIProgressBar::setIndeterminateChildrenStartColor(const DTColor &newIndeterminateChildrenStartColor) +{ + if (m_indeterminateChildrenStartColor == newIndeterminateChildrenStartColor) + return; + m_indeterminateChildrenStartColor = newIndeterminateChildrenStartColor; + emit indeterminateChildrenStartColorChanged(); +} + +const DTColor &UKUIProgressBar::indeterminateChildrenEndColor() const +{ + return m_indeterminateChildrenEndColor; +} + +void UKUIProgressBar::setIndeterminateChildrenEndColor(const DTColor &newIndeterminateChildrenEndColor) +{ + if (m_indeterminateChildrenEndColor == newIndeterminateChildrenEndColor) + return; + m_indeterminateChildrenEndColor = newIndeterminateChildrenEndColor; + emit indeterminateChildrenEndColorChanged(); +} + +int UKUIProgressBar::borderWidth() const +{ + return m_borderWidth; +} + +void UKUIProgressBar::setBorderWidth(int newBorderWidth) +{ + if (m_borderWidth == newBorderWidth) + return; + m_borderWidth = newBorderWidth; + emit borderWidthChanged(); +} + +const DTColor &UKUIProgressBar::borderColor() const +{ + return m_borderColor; +} + +void UKUIProgressBar::setBorderColor(const DTColor &newBorderColor) +{ + if (m_borderColor == newBorderColor) + return; + m_borderColor = newBorderColor; + emit borderColorChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiprogressbar.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiprogressbar.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiprogressbar.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiprogressbar.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,130 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUIPROGRESSBAR_H +#define UKUIPROGRESSBAR_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QApplication> +#include <QPalette> +#include <QtQml/qqml.h> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUIProgressBar : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY radiusChanged) + Q_PROPERTY(DTColor normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) + Q_PROPERTY(DTColor childrenColor READ childrenColor WRITE setChildrenColor NOTIFY childrenColorChanged) + Q_PROPERTY(int normalWidth READ normalWidth WRITE setNormalWidth NOTIFY normalWidthChanged) + Q_PROPERTY(int normalHeight READ normalHeight WRITE setNormalHeight NOTIFY normalHeightChanged) + Q_PROPERTY(int indeterminateChildrenWidth READ indeterminateChildrenWidth WRITE setIndeterminateChildrenWidth NOTIFY indeterminateChildrenWidthChanged) + Q_PROPERTY(DTColor indeterminateChildrenStartColor READ indeterminateChildrenStartColor WRITE setIndeterminateChildrenStartColor NOTIFY indeterminateChildrenStartColorChanged) + Q_PROPERTY(DTColor indeterminateChildrenEndColor READ indeterminateChildrenEndColor WRITE setIndeterminateChildrenEndColor NOTIFY indeterminateChildrenEndColorChanged) + + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) + Q_PROPERTY(DTColor borderColor READ borderColor WRITE setBorderColor NOTIFY borderColorChanged) +public: + explicit UKUIProgressBar(QQuickItem *parent = nullptr); + ~UKUIProgressBar(); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + + static UKUIProgressBar* qmlAttachedProperties(QObject* parent); + + const DTColor &normalColor() const; + void setNormalColor(const DTColor &newNormalColor); + + int radius() const; + void setRadius(int newRadius); + + const DTColor &childrenColor() const; + void setChildrenColor(const DTColor &newChildrenColor); + + int normalWidth() const; + void setNormalWidth(int newNormalWidth); + + int normalHeight() const; + void setNormalHeight(int newNormalHeight); + + int indeterminateChildrenWidth() const; + void setIndeterminateChildrenWidth(int newIndeterminateChildrenWidth); + + const DTColor &indeterminateChildrenStartColor() const; + void setIndeterminateChildrenStartColor(const DTColor &newIndeterminateChildrenStartColor); + + const DTColor &indeterminateChildrenEndColor() const; + void setIndeterminateChildrenEndColor(const DTColor &newIndeterminateChildrenEndColor); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); + + const DTColor &borderColor() const; + void setBorderColor(const DTColor &newBorderColor); + +signals: + void normalColorChanged(); + + void radiusChanged(); + + void childrenColorChanged(); + + void normalWidthChanged(); + + void normalHeightChanged(); + + void indeterminateChildrenWidthChanged(); + + void indeterminateChildrenStartColorChanged(); + + void indeterminateChildrenEndColorChanged(); + + void borderWidthChanged(); + + void borderColorChanged(); + +private: + Q_INVOKABLE DTColor m_normalColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.85)); + + int m_radius; + Q_INVOKABLE DTColor m_childrenColor; + int m_normalWidth; + int m_normalHeight; + int m_indeterminateChildrenWidth; + Q_INVOKABLE DTColor m_indeterminateChildrenStartColor; + Q_INVOKABLE DTColor m_indeterminateChildrenEndColor; + int m_borderWidth; + Q_INVOKABLE DTColor m_borderColor; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUIProgressBar, QML_HAS_ATTACHED_PROPERTIES) + +#endif // UKUIPROGRESSBAR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiradiobutton.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiradiobutton.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiradiobutton.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiradiobutton.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,482 @@ +#include <QApplication> +#include "ukuiradiobutton.h" +#include "qdebug.h" +using namespace UKUIQQC2Style; + +UKUIRadioButton::UKUIRadioButton(QQuickItem *parent) : QQuickItem(parent) +{ + qDebug() << "UKUIRadioButton.............."; + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUIRadioButton::~UKUIRadioButton() +{ + +} + +UKUIRadioButton* UKUIRadioButton::qmlAttachedProperties(QObject* parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUIRadioButton(p); +} + +void UKUIRadioButton::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setNormalTextColor(instance->kFontPrimary()); + setDisableTextColor(instance->kFontPrimaryDisable()); + setNormalIndicatorColor(instance->buttonActive()); + setHoverIndicatorColor(instance->kComponentHover()); + setClickIndicatorColor(instance->kComponentClick()); + setDisableIndicatorColor(instance->buttonDisable()); + setNormalIndicatorBorderColor(instance->kLineNormal()); + setHoverIndicatorBorderColor(instance->kLineNormal()); + setClickIndicatorBorderColor(instance->kLineNormal()); + setDisableIndicatorBorderColor(instance->kLineDisable()); + + setChecked_NormalIndicatorColor(instance->highLightActive()); + setChecked_HoverIndicatorColor(instance->kBrandHover()); + setChecked_ClickIndicatorColor(instance->kBrandClick()); + setChecked_DisableIndicatorColor(instance->buttonDisable()); + setChecked_NormalIndicatorBorderColor(instance->kLineNormal()); + setChecked_HoverIndicatorBorderColor(instance->kLineNormal()); + setChecked_ClickIndicatorBorderColor(instance->kLineNormal()); + setChecked_DisableIndicatorBorderColor(instance->kLineDisable()); + + setChecked_NormalChildrenColor(instance->highLightedTextActive()); + setChecked_HoverChildrenColor(instance->highLightedTextActive()); + setChecked_ClickChildrenColor(instance->highLightedTextActive()); + setChecked_DisableChildrenColor(instance->highLightedTextDisable()); + + setBorderWidth(instance->normalline()); + setSpace(8); + setIndicatorWidth(16); + setChildrenWidth(8); +} + + + +double UKUIRadioButton::leftRightMargin() const +{ + return m_leftRightMargin; +} + +void UKUIRadioButton::setLeftRightMargin(double newLeftRightMargin) +{ + if (qFuzzyCompare(m_leftRightMargin, newLeftRightMargin)) + return; + m_leftRightMargin = newLeftRightMargin; + emit leftRightMarginChanged(); +} + +double UKUIRadioButton::upDownMargin() const +{ + return m_upDownMargin; +} + +void UKUIRadioButton::setUpDownMargin(double newUpDownMargin) +{ + if (qFuzzyCompare(m_upDownMargin, newUpDownMargin)) + return; + m_upDownMargin = newUpDownMargin; + emit upDownMarginChanged(); +} + +double UKUIRadioButton::space() const +{ + return m_space; +} + +void UKUIRadioButton::setSpace(double newSpace) +{ + if (qFuzzyCompare(m_space, newSpace)) + return; + m_space = newSpace; + emit spaceChanged(); +} + +const DTColor &UKUIRadioButton::disableTextColor() const +{ + return m_disableTextColor; +} + +void UKUIRadioButton::setDisableTextColor(const DTColor &newDisableTextColor) +{ + if (m_disableTextColor == newDisableTextColor) + return; + m_disableTextColor = newDisableTextColor; + emit disableTextColorChanged(); +} + +const DTColor &UKUIRadioButton::normalTextColor() const +{ + return m_normalTextColor; +} + +void UKUIRadioButton::setNormalTextColor(const DTColor &newNormalTextColor) +{ + if (m_normalTextColor == newNormalTextColor) + return; + m_normalTextColor = newNormalTextColor; + emit normalTextColorChanged(); +} + +const DTColor &UKUIRadioButton::normalIndicatorColor() const +{ + return m_normalIndicatorColor; +} + +void UKUIRadioButton::setNormalIndicatorColor(const DTColor &newNormalIndicatorColor) +{ + if (m_normalIndicatorColor == newNormalIndicatorColor) + return; + m_normalIndicatorColor = newNormalIndicatorColor; + emit normalIndicatorColorChanged(); +} + +const DTColor &UKUIRadioButton::hoverIndicatorColor() const +{ + return m_hoverIndicatorColor; +} + +void UKUIRadioButton::setHoverIndicatorColor(const DTColor &newHoverIndicatorColor) +{ + if (m_hoverIndicatorColor == newHoverIndicatorColor) + return; + m_hoverIndicatorColor = newHoverIndicatorColor; + emit hoverIndicatorColorChanged(); +} + +const DTColor &UKUIRadioButton::clickIndicatorColor() const +{ + return m_clickIndicatorColor; +} + +void UKUIRadioButton::setClickIndicatorColor(const DTColor &newClickIndicatorColor) +{ + if (m_clickIndicatorColor == newClickIndicatorColor) + return; + m_clickIndicatorColor = newClickIndicatorColor; + emit clickIndicatorColorChanged(); +} + +const DTColor &UKUIRadioButton::disableIndicatorColor() const +{ + return m_disableIndicatorColor; +} + +void UKUIRadioButton::setDisableIndicatorColor(const DTColor &newDisableIndicatorColor) +{ + if (m_disableIndicatorColor == newDisableIndicatorColor) + return; + m_disableIndicatorColor = newDisableIndicatorColor; + emit disableIndicatorColorChanged(); +} + +const DTColor &UKUIRadioButton::normalIndicatorBorderColor() const +{ + return m_normalIndicatorBorderColor; +} + +void UKUIRadioButton::setNormalIndicatorBorderColor(const DTColor &newNormalIndicatorBorderColor) +{ + if (m_normalIndicatorBorderColor == newNormalIndicatorBorderColor) + return; + m_normalIndicatorBorderColor = newNormalIndicatorBorderColor; + emit normalIndicatorBorderColorChanged(); +} + +const DTColor &UKUIRadioButton::hoverIndicatorBorderColor() const +{ + return m_hoverIndicatorBorderColor; +} + +void UKUIRadioButton::setHoverIndicatorBorderColor(const DTColor &newHoverIndicatorBorderColor) +{ + if (m_hoverIndicatorBorderColor == newHoverIndicatorBorderColor) + return; + m_hoverIndicatorBorderColor = newHoverIndicatorBorderColor; + emit hoverIndicatorBorderColorChanged(); +} + +const DTColor &UKUIRadioButton::clickIndicatorBorderColor() const +{ + return m_clickIndicatorBorderColor; +} + +void UKUIRadioButton::setClickIndicatorBorderColor(const DTColor &newClickIndicatorBorderColor) +{ + if (m_clickIndicatorBorderColor == newClickIndicatorBorderColor) + return; + m_clickIndicatorBorderColor = newClickIndicatorBorderColor; + emit clickIndicatorBorderColorChanged(); +} + +const DTColor &UKUIRadioButton::disableIndicatorBorderColor() const +{ + return m_disableIndicatorBorderColor; +} + +void UKUIRadioButton::setDisableIndicatorBorderColor(const DTColor &newDisableIndicatorBorderColor) +{ + if (m_disableIndicatorBorderColor == newDisableIndicatorBorderColor) + return; + m_disableIndicatorBorderColor = newDisableIndicatorBorderColor; + emit disableIndicatorBorderColorChanged(); +} + +const DTColor &UKUIRadioButton::checked_normalIndicatorColor() const +{ + return m_checked_normalIndicatorColor; +} + +const DTColor &UKUIRadioButton::checked_hoverIndicatorColor() const +{ + return m_checked_hoverIndicatorColor; +} + +const DTColor &UKUIRadioButton::checked_clickIndicatorColor() const +{ + return m_checked_clickIndicatorColor; +} + +const DTColor &UKUIRadioButton::checked_disableIndicatorColor() const +{ + return m_checked_disableIndicatorColor; +} + +const DTColor &UKUIRadioButton::checked_normalIndicatorBorderColor() const +{ + return m_checked_normalIndicatorBorderColor; +} + +const DTColor &UKUIRadioButton::checked_hoverIndicatorBorderColor() const +{ + return m_checked_hoverIndicatorBorderColor; +} + +const DTColor &UKUIRadioButton::checked_clickIndicatorBorderColor() const +{ + return m_checked_clickIndicatorBorderColor; +} + +const DTColor &UKUIRadioButton::checked_disableIndicatorBorderColor() const +{ + return m_checked_disableIndicatorBorderColor; +} + +const DTColor &UKUIRadioButton::checked_normalChildrenColor() const +{ + return m_checked_normalChildrenColor; +} + +const DTColor &UKUIRadioButton::checked_hoverChildrenColor() const +{ + return m_checked_hoverChildrenColor; +} + +const DTColor &UKUIRadioButton::checked_clickChildrenColor() const +{ + return m_checked_clickChildrenColor; +} + + +const DTColor &UKUIRadioButton::checked_disableChildrenColor() const +{ + return m_checked_disableChildrenColor; +} + +const DTColor &UKUIRadioButton::checked_normalChildrenBorderColor() const +{ + return m_checked_normalChildrenBorderColor; +} + +const DTColor &UKUIRadioButton::checked_hoverChildrenBorderColor() const +{ + return m_checked_hoverChildrenBorderColor; +} + +const DTColor &UKUIRadioButton::checked_clickChildrenBorderColor() const +{ + return m_checked_clickChildrenBorderColor; +} + + +const DTColor &UKUIRadioButton::checked_disableChildrenBorderColor() const +{ + return m_checked_disableChildrenBorderColor; +} + + +void UKUIRadioButton::setChecked_NormalIndicatorColor(const DTColor &newChecked_normalIndicatorColor) +{ + if (m_checked_normalIndicatorColor == newChecked_normalIndicatorColor) + return; + m_checked_normalIndicatorColor = newChecked_normalIndicatorColor; + emit checked_normalIndicatorColorChanged(); +} + +void UKUIRadioButton::setChecked_HoverIndicatorColor(const DTColor &newChecked_hoverIndicatorColor) +{ + if (m_checked_hoverIndicatorColor == newChecked_hoverIndicatorColor) + return; + m_checked_hoverIndicatorColor = newChecked_hoverIndicatorColor; + emit checked_hoverIndicatorColorChanged(); +} + +void UKUIRadioButton::setChecked_ClickIndicatorColor(const DTColor &newChecked_clickIndicatorColor) +{ + if (m_checked_clickIndicatorColor == newChecked_clickIndicatorColor) + return; + m_checked_clickIndicatorColor = newChecked_clickIndicatorColor; + emit checked_clickIndicatorColorChanged(); +} + +void UKUIRadioButton::setChecked_DisableIndicatorColor(const DTColor &newChecked_disableIndicatorColor) +{ + if (m_checked_disableIndicatorColor == newChecked_disableIndicatorColor) + return; + m_checked_disableIndicatorColor = newChecked_disableIndicatorColor; + emit checked_disableIndicatorColorChanged(); +} + +void UKUIRadioButton::setChecked_NormalIndicatorBorderColor(const DTColor &newChecked_normalIndicatorBorderColor) +{ + if (m_checked_normalIndicatorBorderColor == newChecked_normalIndicatorBorderColor) + return; + m_checked_normalIndicatorBorderColor = newChecked_normalIndicatorBorderColor; + emit checked_normalIndicatorBorderColorChanged(); +} + +void UKUIRadioButton::setChecked_HoverIndicatorBorderColor(const DTColor &newChecked_hoverIndicatorBorderColor) +{ + if (m_checked_hoverIndicatorBorderColor == newChecked_hoverIndicatorBorderColor) + return; + m_checked_hoverIndicatorBorderColor = newChecked_hoverIndicatorBorderColor; + emit checked_hoverIndicatorBorderColorChanged(); +} + +void UKUIRadioButton::setChecked_ClickIndicatorBorderColor(const DTColor &newChecked_clickIndicatorBorderColor) +{ + if (m_checked_clickIndicatorBorderColor == newChecked_clickIndicatorBorderColor) + return; + m_checked_clickIndicatorBorderColor = newChecked_clickIndicatorBorderColor; + emit checked_clickIndicatorBorderColorChanged(); +} + +void UKUIRadioButton::setChecked_DisableIndicatorBorderColor(const DTColor &newChecked_disableIndicatorBorderColor) +{ + if (m_checked_disableIndicatorBorderColor == newChecked_disableIndicatorBorderColor) + return; + m_checked_disableIndicatorBorderColor = newChecked_disableIndicatorBorderColor; + emit checked_disableIndicatorBorderColorChanged(); +} + +void UKUIRadioButton::setChecked_NormalChildrenColor(const DTColor &newChecked_normalChildrenColor) +{ + if (m_checked_normalChildrenColor == newChecked_normalChildrenColor) + return; + m_checked_normalChildrenColor = newChecked_normalChildrenColor; + emit checked_normalChildrenColorChanged(); +} + +void UKUIRadioButton::setChecked_HoverChildrenColor(const DTColor &newChecked_hoverChildrenColor) +{ + if (m_checked_hoverChildrenColor == newChecked_hoverChildrenColor) + return; + m_checked_hoverChildrenColor = newChecked_hoverChildrenColor; + emit checked_hoverChildrenColorChanged(); +} + +void UKUIRadioButton::setChecked_ClickChildrenColor(const DTColor &newChecked_clickChildrenColor) +{ + if (m_checked_clickChildrenColor == newChecked_clickChildrenColor) + return; + m_checked_clickChildrenColor = newChecked_clickChildrenColor; + emit checked_clickChildrenColorChanged(); +} + +void UKUIRadioButton::setChecked_DisableChildrenColor(const DTColor &newChecked_disableChildrenColor) +{ + if (m_checked_disableChildrenColor == newChecked_disableChildrenColor) + return; + m_checked_disableChildrenColor = newChecked_disableChildrenColor; + emit checked_disableChildrenColorChanged(); +} + +void UKUIRadioButton::setChecked_NormalChildrenBorderColor(const DTColor &newChecked_normalChildrenBorderColor) +{ + if (m_checked_normalChildrenBorderColor == newChecked_normalChildrenBorderColor) + return; + m_checked_normalChildrenBorderColor = newChecked_normalChildrenBorderColor; + emit checked_normalChildrenBorderColorChanged(); +} + +void UKUIRadioButton::setChecked_HoverChildrenBorderColor(const DTColor &newChecked_hoverChildrenBorderColor) +{ + if (m_checked_hoverChildrenBorderColor == newChecked_hoverChildrenBorderColor) + return; + m_checked_hoverChildrenBorderColor = newChecked_hoverChildrenBorderColor; + emit checked_hoverChildrenBorderColorChanged(); +} + +void UKUIRadioButton::setChecked_ClickChildrenBorderColor(const DTColor &newChecked_clickChildrenBorderColor) +{ + if (m_checked_clickChildrenBorderColor == newChecked_clickChildrenBorderColor) + return; + m_checked_clickChildrenBorderColor = newChecked_clickChildrenBorderColor; + emit checked_clickChildrenBorderColorChanged(); +} + +void UKUIRadioButton::setChecked_DisableChildrenBorderColor(const DTColor &newChecked_disableChildrenBorderColor) +{ + if (m_checked_disableChildrenBorderColor == newChecked_disableChildrenBorderColor) + return; + m_checked_disableChildrenBorderColor = newChecked_disableChildrenBorderColor; + emit checked_disableChildrenBorderColorChanged(); +} + +int UKUIRadioButton::borderWidth() const +{ + return m_borderWidth; +} + +void UKUIRadioButton::setBorderWidth(int newBorderWidth) +{ + if (m_borderWidth == newBorderWidth) + return; + m_borderWidth = newBorderWidth; + emit borderWidthChanged(); +} + +int UKUIRadioButton::indicatorWidth() const +{ + return m_indicatorWidth; +} + +void UKUIRadioButton::setIndicatorWidth(int newIndicatorWidth) +{ + if (m_indicatorWidth == newIndicatorWidth) + return; + m_indicatorWidth = newIndicatorWidth; + emit indicatorWidthChanged(); +} + +int UKUIRadioButton::childrenWidth() const +{ + return m_childrenWidth; +} + +void UKUIRadioButton::setChildrenWidth(int newChildrenWidth) +{ + if (m_childrenWidth == newChildrenWidth) + return; + m_childrenWidth = newChildrenWidth; + emit childrenWidthChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiradiobutton.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiradiobutton.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiradiobutton.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiradiobutton.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,290 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUIRADIOBUTTON_H +#define UKUIRADIOBUTTON_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUIRadioButton : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(double leftRightMargin READ leftRightMargin WRITE setLeftRightMargin NOTIFY leftRightMarginChanged) + Q_PROPERTY(double upDownMargin READ upDownMargin WRITE setUpDownMargin NOTIFY upDownMarginChanged) + Q_PROPERTY(double space READ space WRITE setSpace NOTIFY spaceChanged) + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) + + + Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) + Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) + + Q_PROPERTY(DTColor normalIndicatorColor READ normalIndicatorColor WRITE setNormalIndicatorColor NOTIFY normalIndicatorColorChanged) + Q_PROPERTY(DTColor hoverIndicatorColor READ hoverIndicatorColor WRITE setHoverIndicatorColor NOTIFY hoverIndicatorColorChanged) + Q_PROPERTY(DTColor clickIndicatorColor READ clickIndicatorColor WRITE setClickIndicatorColor NOTIFY clickIndicatorColorChanged) + Q_PROPERTY(DTColor disableIndicatorColor READ disableIndicatorColor WRITE setDisableIndicatorColor NOTIFY disableIndicatorColorChanged) + Q_PROPERTY(DTColor normalIndicatorBorderColor READ normalIndicatorBorderColor WRITE setNormalIndicatorBorderColor NOTIFY normalIndicatorBorderColorChanged) + Q_PROPERTY(DTColor hoverIndicatorBorderColor READ hoverIndicatorBorderColor WRITE setHoverIndicatorBorderColor NOTIFY hoverIndicatorBorderColorChanged) + Q_PROPERTY(DTColor clickIndicatorBorderColor READ clickIndicatorBorderColor WRITE setClickIndicatorBorderColor NOTIFY clickIndicatorBorderColorChanged) + Q_PROPERTY(DTColor disableIndicatorBorderColor READ disableIndicatorBorderColor WRITE setDisableIndicatorBorderColor NOTIFY disableIndicatorBorderColorChanged) + + Q_PROPERTY(DTColor checked_normalIndicatorColor READ checked_normalIndicatorColor WRITE setChecked_NormalIndicatorColor NOTIFY checked_normalIndicatorColorChanged) + Q_PROPERTY(DTColor checked_hoverIndicatorColor READ checked_hoverIndicatorColor WRITE setChecked_HoverIndicatorColor NOTIFY checked_hoverIndicatorColorChanged) + Q_PROPERTY(DTColor checked_clickIndicatorColor READ checked_clickIndicatorColor WRITE setChecked_ClickIndicatorColor NOTIFY checked_clickIndicatorColorChanged) + Q_PROPERTY(DTColor checked_disableIndicatorColor READ checked_disableIndicatorColor WRITE setChecked_DisableIndicatorColor NOTIFY checked_disableIndicatorColorChanged) + Q_PROPERTY(DTColor checked_normalIndicatorBorderColor READ checked_normalIndicatorBorderColor WRITE setChecked_NormalIndicatorBorderColor NOTIFY checked_normalIndicatorBorderColorChanged) + Q_PROPERTY(DTColor checked_hoverIndicatorBorderColor READ checked_hoverIndicatorBorderColor WRITE setChecked_HoverIndicatorBorderColor NOTIFY checked_hoverIndicatorBorderColorChanged) + Q_PROPERTY(DTColor checked_clickIndicatorBorderColor READ checked_clickIndicatorBorderColor WRITE setChecked_ClickIndicatorBorderColor NOTIFY checked_clickIndicatorBorderColorChanged) + Q_PROPERTY(DTColor checked_disableIndicatorBorderColor READ checked_disableIndicatorBorderColor WRITE setChecked_DisableIndicatorBorderColor NOTIFY checked_disableIndicatorBorderColorChanged) + + Q_PROPERTY(DTColor checked_normalChildrenColor READ checked_normalChildrenColor WRITE setChecked_NormalChildrenColor NOTIFY checked_normalChildrenColorChanged) + Q_PROPERTY(DTColor checked_hoverChildrenColor READ checked_hoverChildrenColor WRITE setChecked_HoverChildrenColor NOTIFY checked_hoverChildrenColorChanged) + Q_PROPERTY(DTColor checked_clickChildrenColor READ checked_clickChildrenColor WRITE setChecked_ClickChildrenColor NOTIFY checked_clickChildrenColorChanged) + Q_PROPERTY(DTColor checked_disableChildrenColor READ checked_disableChildrenColor WRITE setChecked_DisableChildrenColor NOTIFY checked_disableChildrenColorChanged) + Q_PROPERTY(DTColor checked_normalChildrenBorderColor READ checked_normalChildrenBorderColor WRITE setChecked_NormalChildrenBorderColor NOTIFY checked_normalChildrenBorderColorChanged) + Q_PROPERTY(DTColor checked_hoverChildrenBorderColor READ checked_hoverChildrenBorderColor WRITE setChecked_HoverChildrenBorderColor NOTIFY checked_hoverChildrenBorderColorChanged) + Q_PROPERTY(DTColor checked_clickChildrenBorderColor READ checked_clickChildrenBorderColor WRITE setChecked_ClickChildrenBorderColor NOTIFY checked_clickChildrenBorderColorChanged) + Q_PROPERTY(DTColor checked_disableChildrenBorderColor READ checked_disableChildrenBorderColor WRITE setChecked_DisableChildrenBorderColor NOTIFY checked_disableChildrenBorderColorChanged) + + Q_PROPERTY(int indicatorWidth READ indicatorWidth WRITE setIndicatorWidth NOTIFY indicatorWidthChanged) + Q_PROPERTY(int childrenWidth READ childrenWidth WRITE setChildrenWidth NOTIFY childrenWidthChanged) + + +public: + explicit UKUIRadioButton(QQuickItem *parent = nullptr); + ~UKUIRadioButton(); + + static UKUIRadioButton* qmlAttachedProperties(QObject* parent); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + double leftRightMargin() const; + void setLeftRightMargin(double newLeftRightMargin); + + double upDownMargin() const; + void setUpDownMargin(double newUpDownMargin); + + double space() const; + void setSpace(double newSpace); + + const DTColor &disableTextColor() const; + void setDisableTextColor(const DTColor &newDisableTextColor); + + const DTColor &normalTextColor() const; + void setNormalTextColor(const DTColor &newNormalTextColor); + + const DTColor &normalIndicatorColor() const; + void setNormalIndicatorColor(const DTColor &newNormalIndicatorColor); + + const DTColor &hoverIndicatorColor() const; + void setHoverIndicatorColor(const DTColor &newHoverIndicatorColor); + + const DTColor &clickIndicatorColor() const; + void setClickIndicatorColor(const DTColor &newClickIndicatorColor); + + const DTColor &disableIndicatorColor() const; + void setDisableIndicatorColor(const DTColor &newDisableIndicatorColor); + + const DTColor &normalIndicatorBorderColor() const; + void setNormalIndicatorBorderColor(const DTColor &newNormalIndicatorBorderColor); + + const DTColor &hoverIndicatorBorderColor() const; + void setHoverIndicatorBorderColor(const DTColor &newHoverIndicatorBorderColor); + + const DTColor &clickIndicatorBorderColor() const; + void setClickIndicatorBorderColor(const DTColor &newClickIndicatorBorderColor); + + const DTColor &disableIndicatorBorderColor() const; + void setDisableIndicatorBorderColor(const DTColor &newDisableIndicatorBorderColor); + + const DTColor &checked_normalIndicatorColor() const; + void setChecked_NormalIndicatorColor(const DTColor &newChecked_normalIndicatorColor); + + const DTColor &checked_hoverIndicatorColor() const; + void setChecked_HoverIndicatorColor(const DTColor &newChecked_hoverIndicatorColor); + + const DTColor &checked_clickIndicatorColor() const; + void setChecked_ClickIndicatorColor(const DTColor &newChecked_clickIndicatorColor); + + const DTColor &checked_disableIndicatorColor() const; + void setChecked_DisableIndicatorColor(const DTColor &newChecked_disableIndicatorColor); + + const DTColor &checked_normalIndicatorBorderColor() const; + void setChecked_NormalIndicatorBorderColor(const DTColor &newChecked_normalIndicatorBorderColor); + + const DTColor &checked_hoverIndicatorBorderColor() const; + void setChecked_HoverIndicatorBorderColor(const DTColor &newChecked_hoverIndicatorBorderColor); + + const DTColor &checked_clickIndicatorBorderColor() const; + void setChecked_ClickIndicatorBorderColor(const DTColor &newChecked_clickIndicatorBorderColor); + + const DTColor &checked_disableIndicatorBorderColor() const; + void setChecked_DisableIndicatorBorderColor(const DTColor &newChecked_disableIndicatorBorderColor); + + const DTColor &checked_normalChildrenColor() const; + void setChecked_NormalChildrenColor(const DTColor &newChecked_normalChildrenColor); + + const DTColor &checked_hoverChildrenColor() const; + void setChecked_HoverChildrenColor(const DTColor &newChecked_hoverChildrenColor); + + const DTColor &checked_clickChildrenColor() const; + void setChecked_ClickChildrenColor(const DTColor &newChecked_clickChildrenColor); + + const DTColor &checked_disableChildrenColor() const; + void setChecked_DisableChildrenColor(const DTColor &newChecked_disableChildrenColor); + + const DTColor &checked_normalChildrenBorderColor() const; + void setChecked_NormalChildrenBorderColor(const DTColor &newChecked_normalChildrenBorderColor); + + const DTColor &checked_hoverChildrenBorderColor() const; + void setChecked_HoverChildrenBorderColor(const DTColor &newChecked_hoverChildrenBorderColor); + + const DTColor &checked_clickChildrenBorderColor() const; + void setChecked_ClickChildrenBorderColor(const DTColor &newChecked_clickChildrenBorderColor); + + const DTColor &checked_disableChildrenBorderColor() const; + void setChecked_DisableChildrenBorderColor(const DTColor &newChecked_disableChildrenBorderColor); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); + + int indicatorWidth() const; + void setIndicatorWidth(int newIndicatorWidth); + + int childrenWidth() const; + void setChildrenWidth(int newChildrenWidth); + +signals: + + void leftRightMarginChanged(); + + void upDownMarginChanged(); + + void spaceChanged(); + + void disableTextColorChanged(); + + void normalTextColorChanged(); + + void normalIndicatorColorChanged(); + + void hoverIndicatorColorChanged(); + + void clickIndicatorColorChanged(); + + void disableIndicatorColorChanged(); + + void normalIndicatorBorderColorChanged(); + + void hoverIndicatorBorderColorChanged(); + + void clickIndicatorBorderColorChanged(); + + void disableIndicatorBorderColorChanged(); + + void checked_normalIndicatorColorChanged(); + + void checked_hoverIndicatorColorChanged(); + + void checked_clickIndicatorColorChanged(); + + void checked_disableIndicatorColorChanged(); + + void checked_normalIndicatorBorderColorChanged(); + + void checked_hoverIndicatorBorderColorChanged(); + + void checked_clickIndicatorBorderColorChanged(); + + void checked_disableIndicatorBorderColorChanged(); + + void checked_normalChildrenColorChanged(); + + void checked_hoverChildrenColorChanged(); + + void checked_clickChildrenColorChanged(); + + void checked_disableChildrenColorChanged(); + + void checked_normalChildrenBorderColorChanged(); + + void checked_hoverChildrenBorderColorChanged(); + + void checked_clickChildrenBorderColorChanged(); + + void checked_disableChildrenBorderColorChanged(); + + void borderWidthChanged(); + + void indicatorWidthChanged(); + + void childrenWidthChanged(); + +private: + double m_leftRightMargin; + double m_upDownMargin; + double m_space; + Q_INVOKABLE DTColor m_disableTextColor; + Q_INVOKABLE DTColor m_normalTextColor; + Q_INVOKABLE DTColor m_normalIndicatorColor; + Q_INVOKABLE DTColor m_hoverIndicatorColor; + Q_INVOKABLE DTColor m_clickIndicatorColor; + Q_INVOKABLE DTColor m_disableIndicatorColor; + Q_INVOKABLE DTColor m_normalIndicatorBorderColor; + Q_INVOKABLE DTColor m_hoverIndicatorBorderColor; + Q_INVOKABLE DTColor m_clickIndicatorBorderColor; + Q_INVOKABLE DTColor m_disableIndicatorBorderColor; + Q_INVOKABLE DTColor m_checked_normalIndicatorColor; + Q_INVOKABLE DTColor m_checked_hoverIndicatorColor; + Q_INVOKABLE DTColor m_checked_clickIndicatorColor; + Q_INVOKABLE DTColor m_checked_disableIndicatorColor; + Q_INVOKABLE DTColor m_checked_normalIndicatorBorderColor; + Q_INVOKABLE DTColor m_checked_hoverIndicatorBorderColor; + Q_INVOKABLE DTColor m_checked_clickIndicatorBorderColor; + Q_INVOKABLE DTColor m_checked_disableIndicatorBorderColor; + Q_INVOKABLE DTColor m_checked_normalChildrenColor; + Q_INVOKABLE DTColor m_checked_hoverChildrenColor; + Q_INVOKABLE DTColor m_checked_clickChildrenColor; + Q_INVOKABLE DTColor m_checked_disableChildrenColor; + Q_INVOKABLE DTColor m_checked_normalChildrenBorderColor; + Q_INVOKABLE DTColor m_checked_hoverChildrenBorderColor; + Q_INVOKABLE DTColor m_checked_clickChildrenBorderColor; + Q_INVOKABLE DTColor m_checked_disableChildrenBorderColor; + int m_borderWidth; + int m_indicatorWidth; + int m_childrenWidth; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUIRadioButton, QML_HAS_ATTACHED_PROPERTIES) + +//Q_DECLARE_METATYPE(UKUIQQC2Style::UKUIButton); +//Q_DECLARE_METATYPE(std::shared_ptr<UKUIQQC2Style::UKUIButton>) + +#endif // UKUIRADIOBUTTON_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiscrollbar.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiscrollbar.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiscrollbar.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiscrollbar.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,102 @@ +#include "ukuiscrollbar.h" +#include "qdebug.h" + +using namespace UKUIQQC2Style; + +UKUIScrollBar::UKUIScrollBar(QQuickItem *parent) : QQuickItem(parent) +{ + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); + +} + +UKUIScrollBar::~UKUIScrollBar() +{ + +} + +void UKUIScrollBar::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setNormalColor(instance->kGray6()); + setHoverColor(instance->kComponentHover()); + setClickColor(instance->kComponentClick()); + setDisableColor(instance->kGray3()); +} + +UKUIScrollBar* UKUIScrollBar::qmlAttachedProperties(QObject* parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUIScrollBar(p); +} + +const DTColor &UKUIScrollBar::normalColor() const +{ + return m_normalColor; +} + +void UKUIScrollBar::setNormalColor(const DTColor &newNormalColor) +{ + if (m_normalColor == newNormalColor) + return; + m_normalColor = newNormalColor; + emit normalColorChanged(); +} + + +int UKUIScrollBar::padding() const +{ + return m_padding; +} + +void UKUIScrollBar::setPadding(int newPadding) +{ + if (m_padding == newPadding) + return; + m_padding = newPadding; + emit paddingChanged(); +} + +const DTColor &UKUIScrollBar::hoverColor() const +{ + return m_hoverColor; +} + +void UKUIScrollBar::setHoverColor(const DTColor &newHoverColor) +{ + if (m_hoverColor == newHoverColor) + return; + m_hoverColor = newHoverColor; + emit hoverColorChanged(); +} + +const DTColor &UKUIScrollBar::clickColor() const +{ + return m_clickColor; +} + +void UKUIScrollBar::setClickColor(const DTColor &newClickColor) +{ + if (m_clickColor == newClickColor) + return; + m_clickColor = newClickColor; + emit clickColorChanged(); +} + +const DTColor &UKUIScrollBar::disableColor() const +{ + return m_disableColor; +} + +void UKUIScrollBar::setDisableColor(const DTColor &newDisableColor) +{ + if (m_disableColor == newDisableColor) + return; + m_disableColor = newDisableColor; + emit disableColorChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiscrollbar.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiscrollbar.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuiscrollbar.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuiscrollbar.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,96 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUISCROLLBAR_H +#define UKUISCROLLBAR_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QApplication> +#include <QPalette> +#include <QtQml/qqml.h> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUIScrollBar : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(DTColor normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) + Q_PROPERTY(DTColor hoverColor READ hoverColor WRITE setHoverColor NOTIFY hoverColorChanged) + Q_PROPERTY(DTColor clickColor READ clickColor WRITE setClickColor NOTIFY clickColorChanged) + Q_PROPERTY(DTColor disableColor READ disableColor WRITE setDisableColor NOTIFY disableColorChanged) + + Q_PROPERTY(int padding READ padding WRITE setPadding NOTIFY paddingChanged) + +public: + explicit UKUIScrollBar(QQuickItem *parent = nullptr); + ~UKUIScrollBar(); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + + static UKUIScrollBar* qmlAttachedProperties(QObject* parent); + + const DTColor &normalColor() const; + void setNormalColor(const DTColor &newNormalColor); + + int padding() const; + void setPadding(int newPadding); + + const DTColor &hoverColor() const; + void setHoverColor(const DTColor &newHoverColor); + + const DTColor &clickColor() const; + void setClickColor(const DTColor &newClickColor); + + const DTColor &disableColor() const; + void setDisableColor(const DTColor &newDisableColor); + +signals: + void normalColorChanged(); + + void paddingChanged(); + + void hoverColorChanged(); + + void clickColorChanged(); + + void disableColorChanged(); + +private: + Q_INVOKABLE DTColor m_normalColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.85)); + + int m_padding = 2; + Q_INVOKABLE DTColor m_hoverColor; + Q_INVOKABLE DTColor m_clickColor; + Q_INVOKABLE DTColor m_disableColor; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUIScrollBar, QML_HAS_ATTACHED_PROPERTIES) + +#endif // UKUISCROLLBAR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuislider.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuislider.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuislider.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuislider.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,389 @@ +#include "ukuislider.h" +#include "qdebug.h" + +using namespace UKUIQQC2Style; + +UKUISlider::UKUISlider(QQuickItem *parent) : QQuickItem(parent) +{ + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUISlider::~UKUISlider() +{ + +} + +void UKUISlider::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + if(!instance && qApp->property("qqc2-globaltoken").isValid()){ + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + if(token){ + instance = token->getInstance(); + } + } + setNormalWidth(243); + setNormalHeight(24); + setGrooveHeight(4); + setHandleHeight(20); + setFocusBorderWidth(instance->focusline()); + qDebug() << "newFocusBorderColor11111....." << m_focusBorderColor.mixStartColor().red() << + m_focusBorderColor.mixStartColor().green() <<m_focusBorderColor.mixStartColor().blue(); + + setFocusBorderColor(instance->kBrandFocus()); + qDebug() << "newFocusBorderColor22222....." << instance->kBrandFocus().mixStartColor().red() << + instance->kBrandFocus().mixStartColor().green() <<instance->kBrandFocus().mixStartColor().blue(); + + + setNormalGrooveColor(instance->kBrandClick()); + setDisableGrooveColor(instance->kGray12()); + setNormalGrooveBorderColor(instance->kLineBrandClick()); + setDisableGrooveBorderColor(instance->kLineBrandDisable()); + setGrooveBorderWidth(1); + + setNormalUnGrooveColor(instance->buttonActive()); + setDisableUnGrooveColor(instance->buttonDisable()); + setNormalUnGrooveBorderColor(instance->kLineComponentNormal()); + setDisableUnGrooveColor(instance->kLineComponentDisable()); + + + qDebug() << "handlehover....." << instance->kBrandHover().mixStartColor().red() << instance->kBrandHover().mixStartColor().green() << instance->kBrandHover().mixStartColor().blue(); + setNormalHandleColor(instance->highLightActive()); + setHoverHandleColor(instance->kBrandHover()); + setClickHandleColor(instance->kBrandClick()); + setDisableHandleColor(instance->kGray11()); + setNormalHandleBorderColor(instance->kLineBrandNormal()); + setHoverHandleBorderColor(instance->kLineBrandNormal()); + setClickHandleBorderColor(instance->kLineBrandNormal()); + setDisableHandleBorderColor(instance->kLineBrandDisable()); + setHandleBorderWidth(1); +} + +UKUISlider* UKUISlider::qmlAttachedProperties(QObject *parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUISlider(p); +} + + +int UKUISlider::normalWidth() const +{ + return m_normalWidth; +} + +void UKUISlider::setNormalWidth(int newNormalWidth) +{ + if (m_normalWidth == newNormalWidth) + return; + m_normalWidth = newNormalWidth; + emit normalWidthChanged(); +} + +int UKUISlider::normalHeight() const +{ + return m_normalHeight; +} + +void UKUISlider::setNormalHeight(int newNormalHeight) +{ + if (m_normalHeight == newNormalHeight) + return; + m_normalHeight = newNormalHeight; + emit normalHeightChanged(); +} + +int UKUISlider::grooveHeight() const +{ + return m_grooveHeight; +} + +void UKUISlider::setGrooveHeight(int newGrooveHeight) +{ + if (m_grooveHeight == newGrooveHeight) + return; + m_grooveHeight = newGrooveHeight; + emit grooveHeightChanged(); +} + +int UKUISlider::handleHeight() const +{ + return m_handleHeight; +} + +void UKUISlider::setHandleHeight(int newHandleHeight) +{ + if (m_handleHeight == newHandleHeight) + return; + m_handleHeight = newHandleHeight; + emit handleHeightChanged(); +} + +int UKUISlider::focusBorderWidth() const +{ + return m_focusBorderWidth; +} + +void UKUISlider::setFocusBorderWidth(int newFocusBorderWidth) +{ + if (m_focusBorderWidth == newFocusBorderWidth) + return; + m_focusBorderWidth = newFocusBorderWidth; + emit focusBorderWidthChanged(); +} + +const DTColor &UKUISlider::focusBorderColor() const +{ + return m_focusBorderColor; +} + +void UKUISlider::setFocusBorderColor(const DTColor &newFocusBorderColor) +{ + qDebug() << "newFocusBorderColor00000....." << m_focusBorderColor.mixStartColor().red() << + m_focusBorderColor.mixStartColor().green() <<m_focusBorderColor.mixStartColor().blue(); + + if (m_focusBorderColor == newFocusBorderColor) + return; + m_focusBorderColor = newFocusBorderColor; + emit focusBorderColorChanged(); + +} + +const DTColor &UKUISlider::normalGrooveColor() const +{ + return m_normalGrooveColor; +} + +void UKUISlider::setNormalGrooveColor(const DTColor &newNormalGrooveColor) +{ + if (m_normalGrooveColor == newNormalGrooveColor) + return; + m_normalGrooveColor = newNormalGrooveColor; + emit normalGrooveColorChanged(); +} + +const DTColor &UKUISlider::disableGrooveColor() const +{ + return m_disableGrooveColor; +} + +void UKUISlider::setDisableGrooveColor(const DTColor &newDisableGrooveColor) +{ + if (m_disableGrooveColor == newDisableGrooveColor) + return; + m_disableGrooveColor = newDisableGrooveColor; + emit disableGrooveColorChanged(); +} + +const DTColor &UKUISlider::normalHandleColor() const +{ + return m_normalHandleColor; +} + +void UKUISlider::setNormalHandleColor(const DTColor &newNormalHandleColor) +{ + if (m_normalHandleColor == newNormalHandleColor) + return; + m_normalHandleColor = newNormalHandleColor; + emit normalHandleColorChanged(); +} + +const DTColor &UKUISlider::disableHandleColor() const +{ + return m_disableHandleColor; +} + +void UKUISlider::setDisableHandleColor(const DTColor &newDisableHandleColor) +{ + if (m_disableHandleColor == newDisableHandleColor) + return; + m_disableHandleColor = newDisableHandleColor; + emit DisableHandleColorChanged(); +} + +const DTColor &UKUISlider::normalGrooveBorderColor() const +{ + return m_normalGrooveBorderColor; +} + +void UKUISlider::setNormalGrooveBorderColor(const DTColor &newNormalGrooveBorderColor) +{ + if (m_normalGrooveBorderColor == newNormalGrooveBorderColor) + return; + m_normalGrooveBorderColor = newNormalGrooveBorderColor; + emit normalGrooveBorderColorChanged(); +} + +const DTColor &UKUISlider::disableGrooveBorderColor() const +{ + return m_disableGrooveBorderColor; +} + +void UKUISlider::setDisableGrooveBorderColor(const DTColor &newDisableGrooveBorderColor) +{ + if (m_disableGrooveBorderColor == newDisableGrooveBorderColor) + return; + m_disableGrooveBorderColor = newDisableGrooveBorderColor; + emit disableGrooveBorderColorChanged(); +} + +int UKUISlider::grooveBorderWidth() const +{ + return m_grooveBorderWidth; +} + +void UKUISlider::setGrooveBorderWidth(int newGrooveBorderWidth) +{ + if (m_grooveBorderWidth == newGrooveBorderWidth) + return; + m_grooveBorderWidth = newGrooveBorderWidth; + emit grooveBorderWidthChanged(); +} + +const DTColor &UKUISlider::normalHandleBorderColor() const +{ + return m_normalHandleBorderColor; +} + +void UKUISlider::setNormalHandleBorderColor(const DTColor &newNormalHandleBorderColor) +{ + if (m_normalHandleBorderColor == newNormalHandleBorderColor) + return; + m_normalHandleBorderColor = newNormalHandleBorderColor; + emit normalHandleBorderColorChanged(); +} + +const DTColor &UKUISlider::disableHandleBorderColor() const +{ + return m_disableHandleBorderColor; +} + +void UKUISlider::setDisableHandleBorderColor(const DTColor &newDisableHandleBorderColor) +{ + if (m_disableHandleBorderColor == newDisableHandleBorderColor) + return; + m_disableHandleBorderColor = newDisableHandleBorderColor; + emit disableHandleBorderColorChanged(); +} + +int UKUISlider::handleBorderWidth() const +{ + return m_handleBorderWidth; +} + +void UKUISlider::setHandleBorderWidth(int newHandleBorderWidth) +{ + if (m_handleBorderWidth == newHandleBorderWidth) + return; + m_handleBorderWidth = newHandleBorderWidth; + emit handleBorderWidthChanged(); +} + +const DTColor &UKUISlider::normalUnGrooveColor() const +{ + return m_normalUnGrooveColor; +} + +void UKUISlider::setNormalUnGrooveColor(const DTColor &newNormalUnGrooveColor) +{ + if (m_normalUnGrooveColor == newNormalUnGrooveColor) + return; + m_normalUnGrooveColor = newNormalUnGrooveColor; + emit normalUnGrooveColorChanged(); +} + +const DTColor &UKUISlider::disableUnGrooveColor() const +{ + return m_disableUnGrooveColor; +} + +void UKUISlider::setDisableUnGrooveColor(const DTColor &newDisableUnGrooveColor) +{ + if (m_disableUnGrooveColor == newDisableUnGrooveColor) + return; + m_disableUnGrooveColor = newDisableUnGrooveColor; + emit disableUnGrooveColorChanged(); +} + +const DTColor &UKUISlider::normalUnGrooveBorderColor() const +{ + return m_normalUnGrooveBorderColor; +} + +void UKUISlider::setNormalUnGrooveBorderColor(const DTColor &newNormalUnGrooveBorderColor) +{ + if (m_normalUnGrooveBorderColor == newNormalUnGrooveBorderColor) + return; + m_normalUnGrooveBorderColor = newNormalUnGrooveBorderColor; + emit normalUnGrooveBorderColorChanged(); +} + +const DTColor &UKUISlider::disableUnGrooveBorderColor() const +{ + return m_disableUnGrooveBorderColor; +} + +void UKUISlider::setDisableUnGrooveBorderColor(const DTColor &newDisableUnGrooveBorderColor) +{ + if (m_disableUnGrooveBorderColor == newDisableUnGrooveBorderColor) + return; + m_disableUnGrooveBorderColor = newDisableUnGrooveBorderColor; + emit disableUnGrooveBorderColorChanged(); +} + +const DTColor &UKUISlider::hoverHandleColor() const +{ + return m_hoverHandleColor; +} + +void UKUISlider::setHoverHandleColor(const DTColor &newHoverHandleColor) +{ + if (m_hoverHandleColor == newHoverHandleColor) + return; + m_hoverHandleColor = newHoverHandleColor; + emit hoverHandleColorChanged(); +} + +const DTColor &UKUISlider::clickHandleColor() const +{ + return m_clickHandleColor; +} + +void UKUISlider::setClickHandleColor(const DTColor &newClickHandleColor) +{ + if (m_clickHandleColor == newClickHandleColor) + return; + m_clickHandleColor = newClickHandleColor; + emit clickHandleColorChanged(); +} + +const DTColor &UKUISlider::hoverHandleBorderColor() const +{ + return m_hoverHandleBorderColor; +} + +void UKUISlider::setHoverHandleBorderColor(const DTColor &newHoverHandleBorderColor) +{ + if (m_hoverHandleBorderColor == newHoverHandleBorderColor) + return; + m_hoverHandleBorderColor = newHoverHandleBorderColor; + emit hoverHandleBorderColorChanged(); +} + +const DTColor &UKUISlider::clickHandleBorderColor() const +{ + return m_clickHandleBorderColor; +} + +void UKUISlider::setClickHandleBorderColor(const DTColor &newClickHandleBorderColor) +{ + if (m_clickHandleBorderColor == newClickHandleBorderColor) + return; + m_clickHandleBorderColor = newClickHandleBorderColor; + emit clickHandleBorderColorChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuislider.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuislider.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuislider.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuislider.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,231 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUISLIDER_H +#define UKUISLIDER_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QApplication> +#include <QPalette> +#include <QtQml/qqml.h> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUISlider : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(int normalWidth READ normalWidth WRITE setNormalWidth NOTIFY normalWidthChanged) + Q_PROPERTY(int normalHeight READ normalHeight WRITE setNormalHeight NOTIFY normalHeightChanged) + Q_PROPERTY(int grooveHeight READ grooveHeight WRITE setGrooveHeight NOTIFY grooveHeightChanged) + Q_PROPERTY(int handleHeight READ handleHeight WRITE setHandleHeight NOTIFY handleHeightChanged) + Q_PROPERTY(int focusBorderWidth READ focusBorderWidth WRITE setFocusBorderWidth NOTIFY focusBorderWidthChanged) + Q_PROPERTY(DTColor focusBorderColor READ focusBorderColor WRITE setFocusBorderColor NOTIFY focusBorderColorChanged) + + Q_PROPERTY(DTColor normalGrooveColor READ normalGrooveColor WRITE setNormalGrooveColor NOTIFY normalGrooveColorChanged) + Q_PROPERTY(DTColor disableGrooveColor READ disableGrooveColor WRITE setDisableGrooveColor NOTIFY disableGrooveColorChanged) + Q_PROPERTY(DTColor normalGrooveBorderColor READ normalGrooveBorderColor WRITE setNormalGrooveBorderColor NOTIFY normalGrooveBorderColorChanged) + Q_PROPERTY(DTColor disableGrooveBorderColor READ disableGrooveBorderColor WRITE setDisableGrooveBorderColor NOTIFY disableGrooveBorderColorChanged) + Q_PROPERTY(int grooveBorderWidth READ grooveBorderWidth WRITE setGrooveBorderWidth NOTIFY grooveBorderWidthChanged) + + Q_PROPERTY(DTColor normalUnGrooveColor READ normalUnGrooveColor WRITE setNormalUnGrooveColor NOTIFY normalUnGrooveColorChanged) + Q_PROPERTY(DTColor disableUnGrooveColor READ disableUnGrooveColor WRITE setDisableUnGrooveColor NOTIFY disableUnGrooveColorChanged) + Q_PROPERTY(DTColor normalUnGrooveBorderColor READ normalUnGrooveBorderColor WRITE setNormalUnGrooveBorderColor NOTIFY normalUnGrooveBorderColorChanged) + Q_PROPERTY(DTColor disableUnGrooveBorderColor READ disableUnGrooveBorderColor WRITE setDisableUnGrooveBorderColor NOTIFY disableUnGrooveBorderColorChanged) + + + Q_PROPERTY(DTColor normalHandleColor READ normalHandleColor WRITE setNormalHandleColor NOTIFY normalHandleColorChanged) + Q_PROPERTY(DTColor hoverHandleColor READ hoverHandleColor WRITE setHoverHandleColor NOTIFY hoverHandleColorChanged) + Q_PROPERTY(DTColor clickHandleColor READ clickHandleColor WRITE setClickHandleColor NOTIFY clickHandleColorChanged) + Q_PROPERTY(DTColor disableHandleColor READ disableHandleColor WRITE setDisableHandleColor NOTIFY DisableHandleColorChanged) + Q_PROPERTY(DTColor normalHandleBorderColor READ normalHandleBorderColor WRITE setNormalHandleBorderColor NOTIFY normalHandleBorderColorChanged) + Q_PROPERTY(DTColor hoverHandleBorderColor READ hoverHandleBorderColor WRITE setHoverHandleBorderColor NOTIFY hoverHandleBorderColorChanged) + Q_PROPERTY(DTColor clickHandleBorderColor READ clickHandleBorderColor WRITE setClickHandleBorderColor NOTIFY clickHandleBorderColorChanged) + Q_PROPERTY(DTColor disableHandleBorderColor READ disableHandleBorderColor WRITE setDisableHandleBorderColor NOTIFY disableHandleBorderColorChanged) + Q_PROPERTY(int handleBorderWidth READ handleBorderWidth WRITE setHandleBorderWidth NOTIFY handleBorderWidthChanged) + +public: + explicit UKUISlider(QQuickItem *parent = nullptr); + ~UKUISlider(); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + + static UKUISlider* qmlAttachedProperties(QObject* parent); + + int normalWidth() const; + void setNormalWidth(int newNormalWidth); + + int normalHeight() const; + void setNormalHeight(int newNormalHeight); + + int grooveHeight() const; + void setGrooveHeight(int newGrooveHeight); + + int handleHeight() const; + void setHandleHeight(int newHandleHeight); + + int focusBorderWidth() const; + void setFocusBorderWidth(int newFocusBorderWidth); + + const DTColor &focusBorderColor() const; + void setFocusBorderColor(const DTColor &newFocusBorderColor); + + const DTColor &normalGrooveColor() const; + void setNormalGrooveColor(const DTColor &newNormalGrooveColor); + + const DTColor &disableGrooveColor() const; + void setDisableGrooveColor(const DTColor &newDisableGrooveColor); + + const DTColor &normalHandleColor() const; + void setNormalHandleColor(const DTColor &newNormalHandleColor); + + const DTColor &disableHandleColor() const; + void setDisableHandleColor(const DTColor &newDisableHandleColor); + + const DTColor &normalGrooveBorderColor() const; + void setNormalGrooveBorderColor(const DTColor &newNormalGrooveBorderColor); + + const DTColor &disableGrooveBorderColor() const; + void setDisableGrooveBorderColor(const DTColor &newDisableGrooveBorderColor); + + int grooveBorderWidth() const; + void setGrooveBorderWidth(int newGrooveBorderWidth); + + const DTColor &normalHandleBorderColor() const; + void setNormalHandleBorderColor(const DTColor &newNormalHandleBorderColor); + + const DTColor &disableHandleBorderColor() const; + void setDisableHandleBorderColor(const DTColor &newDisableHandleBorderColor); + + int handleBorderWidth() const; + void setHandleBorderWidth(int newHandleBorderWidth); + + const DTColor &normalUnGrooveColor() const; + void setNormalUnGrooveColor(const DTColor &newNormalUnGrooveColor); + + const DTColor &disableUnGrooveColor() const; + void setDisableUnGrooveColor(const DTColor &newDisableUnGrooveColor); + + const DTColor &normalUnGrooveBorderColor() const; + void setNormalUnGrooveBorderColor(const DTColor &newNormalUnGrooveBorderColor); + + const DTColor &disableUnGrooveBorderColor() const; + void setDisableUnGrooveBorderColor(const DTColor &newDisableUnGrooveBorderColor); + + const DTColor &hoverHandleColor() const; + void setHoverHandleColor(const DTColor &newHoverHandleColor); + + const DTColor &clickHandleColor() const; + void setClickHandleColor(const DTColor &newClickHandleColor); + + const DTColor &hoverHandleBorderColor() const; + void setHoverHandleBorderColor(const DTColor &newHoverHandleBorderColor); + + const DTColor &clickHandleBorderColor() const; + void setClickHandleBorderColor(const DTColor &newClickHandleBorderColor); + +signals: + void normalWidthChanged(); + + void normalHeightChanged(); + + void grooveHeightChanged(); + + void handleHeightChanged(); + + void focusBorderWidthChanged(); + + void focusBorderColorChanged(); + + void normalGrooveColorChanged(); + + void disableGrooveColorChanged(); + + void normalHandleColorChanged(); + + void DisableHandleColorChanged(); + + void normalGrooveBorderColorChanged(); + + void disableGrooveBorderColorChanged(); + + void grooveBorderWidthChanged(); + + void normalHandleBorderColorChanged(); + + void disableHandleBorderColorChanged(); + + void handleBorderWidthChanged(); + + void normalUnGrooveColorChanged(); + + void disableUnGrooveColorChanged(); + + void normalUnGrooveBorderColorChanged(); + + void disableUnGrooveBorderColorChanged(); + + void hoverHandleColorChanged(); + + void clickHandleColorChanged(); + + void hoverHandleBorderColorChanged(); + + void clickHandleBorderColorChanged(); + +private: + int m_normalWidth; + int m_normalHeight; + int m_grooveHeight; + int m_handleHeight; + int m_focusBorderWidth; + Q_INVOKABLE DTColor m_focusBorderColor; + Q_INVOKABLE DTColor m_normalGrooveColor; + Q_INVOKABLE DTColor m_disableGrooveColor; + Q_INVOKABLE DTColor m_normalHandleColor; + Q_INVOKABLE DTColor m_disableHandleColor; + Q_INVOKABLE DTColor m_normalGrooveBorderColor; + Q_INVOKABLE DTColor m_disableGrooveBorderColor; + int m_grooveBorderWidth; + Q_INVOKABLE DTColor m_normalHandleBorderColor; + Q_INVOKABLE DTColor m_disableHandleBorderColor; + int m_handleBorderWidth; + Q_INVOKABLE DTColor m_normalUnGrooveColor; + Q_INVOKABLE DTColor m_disableUnGrooveColor; + Q_INVOKABLE DTColor m_normalUnGrooveBorderColor; + Q_INVOKABLE DTColor m_disableUnGrooveBorderColor; + Q_INVOKABLE DTColor m_hoverHandleColor; + Q_INVOKABLE DTColor m_clickHandleColor; + Q_INVOKABLE DTColor m_hoverHandleBorderColor; + Q_INVOKABLE DTColor m_clickHandleBorderColor; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUISlider, QML_HAS_ATTACHED_PROPERTIES) + +#endif // UKUISLIDER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuispinbox.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuispinbox.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuispinbox.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuispinbox.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,465 @@ +#include "ukuispinbox.h" +#include "qdebug.h" + +using namespace UKUIQQC2Style; + +UKUISpinBox::UKUISpinBox(QQuickItem *parent) : QQuickItem(parent) +{ + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUISpinBox::~UKUISpinBox() +{ + +} + +void UKUISpinBox::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setNormalColor(instance->buttonActive()); + setHoverColor(instance->kComponentHover()); + setClickColor(instance->kComponentClick()); + setDisableColor(instance->buttonDisable()); + setNormalTextColor(instance->buttonTextActive()); + setDisableTextColor(instance->buttonTextDisable()); + setNormalBorderColor(instance->kLineComponentNormal()); + setHoverBorderColor(instance->kLineComponentHover()); + setClickBorderColor(instance->kLineComponentClick()); + setDisableBorderColor(instance->kLineComponentDisable()); + setFocusBorderColor(instance->highLightActive()); + setFocusColor(instance->kContainGeneralNormal()); + + setBtnNormalColor(instance->buttonActive()); + setBtnHoverColor(instance->kComponentHover()); + setBtnClickColor(instance->kComponentClick()); + setBtnDisableColor(instance->kComponentDisable()); + setBtnNormalBorderColor(instance->kLineComponentNormal()); + setBtnHoverBorderColor(instance->kLineComponentHover()); + setBtnClickBorderColor(instance->kLineComponentClick()); + setBtnDisableBorderColor(instance->kLineComponentDisable()); + + setNormalWidth(160); + setNormalHeight(36); + setBtnNormalWidth(36); + setBtnNormalHeight(18); + setRadius(instance->kradiusNormal()); + setNormalBorderWidth(instance->normalline()); + setFocusBorderWidth(instance->focusline()); + setPadding(instance->kmarginNormal()); + setBtnBorderWidth(instance->normalline()); +} + +UKUISpinBox* UKUISpinBox::qmlAttachedProperties(QObject *parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUISpinBox(p); +} + +const DTColor &UKUISpinBox::normalColor() const +{ + return m_normalColor; +} + +void UKUISpinBox::setNormalColor(const DTColor &newNormalColor) +{ + if (m_normalColor == newNormalColor) + return; + m_normalColor = newNormalColor; + emit normalColorChanged(); +} + +const DTColor &UKUISpinBox::disableColor() const +{ + return m_disableColor; +} + +void UKUISpinBox::setDisableColor(const DTColor &newDisableColor) +{ + if (m_disableColor == newDisableColor) + return; + m_disableColor = newDisableColor; + emit disableColorChanged(); +} + +const DTColor &UKUISpinBox::hoverColor() const +{ + return m_hoverColor; +} + +void UKUISpinBox::setHoverColor(const DTColor &newHoverColor) +{ + if (m_hoverColor == newHoverColor) + return; + m_hoverColor = newHoverColor; + emit hoverColorChanged(); +} + +const DTColor &UKUISpinBox::clickColor() const +{ + return m_clickColor; +} + +void UKUISpinBox::setClickColor(const DTColor &newClickColor) +{ + if (m_clickColor == newClickColor) + return; + m_clickColor = newClickColor; + emit clickColorChanged(); +} + +const DTColor &UKUISpinBox::normalTextColor() const +{ + return m_normalTextColor; +} + +void UKUISpinBox::setNormalTextColor(const DTColor &newNormalTextColor) +{ + if (m_normalTextColor == newNormalTextColor) + return; + m_normalTextColor = newNormalTextColor; + emit normalTextColorChanged(); +} + +const DTColor &UKUISpinBox::disableTextColor() const +{ + return m_disableTextColor; +} + +void UKUISpinBox::setDisableTextColor(const DTColor &newDisableTextColor) +{ + if (m_disableTextColor == newDisableTextColor) + return; + m_disableTextColor = newDisableTextColor; + emit disableTextColorChanged(); +} + +int UKUISpinBox::normalWidth() const +{ + return m_normalWidth; +} + +void UKUISpinBox::setNormalWidth(int newNormalWidth) +{ + if (m_normalWidth == newNormalWidth) + return; + m_normalWidth = newNormalWidth; + emit normalWidthChanged(); +} + +int UKUISpinBox::normalHeight() const +{ + return m_normalHeight; +} + +void UKUISpinBox::setNormalHeight(int newNormalHeight) +{ + if (m_normalHeight == newNormalHeight) + return; + m_normalHeight = newNormalHeight; + emit normalHeightChanged(); +} + +int UKUISpinBox::radius() const +{ + return m_radius; +} + +void UKUISpinBox::setRadius(int newRadius) +{ + if (m_radius == newRadius) + return; + m_radius = newRadius; + emit radiusChanged(); +} + +int UKUISpinBox::btnNormalWidth() const +{ + return m_btnNormalWidth; +} + +void UKUISpinBox::setBtnNormalWidth(int newBtnNormalWidth) +{ + if (m_btnNormalWidth == newBtnNormalWidth) + return; + m_btnNormalWidth = newBtnNormalWidth; + emit btnNormalWidthChanged(); +} + +int UKUISpinBox::btnNormalHeight() const +{ + return m_btnNormalHeight; +} + +void UKUISpinBox::setBtnNormalHeight(int newBtnNormalHeight) +{ + if (m_btnNormalHeight == newBtnNormalHeight) + return; + m_btnNormalHeight = newBtnNormalHeight; + emit btnNormalHeightChanged(); +} + +const DTColor &UKUISpinBox::normalBorderColor() const +{ + return m_normalBorderColor; +} + +void UKUISpinBox::setNormalBorderColor(const DTColor &newNormalBorderColor) +{ + if (m_normalBorderColor == newNormalBorderColor) + return; + m_normalBorderColor = newNormalBorderColor; + emit normalBorderColorChanged(); +} + +const DTColor &UKUISpinBox::hoverBorderColor() const +{ + return m_hoverBorderColor; +} + +void UKUISpinBox::setHoverBorderColor(const DTColor &newHoverBorderColor) +{ + if (m_hoverBorderColor == newHoverBorderColor) + return; + m_hoverBorderColor = newHoverBorderColor; + emit hoverColorBorderChanged(); +} + +const DTColor &UKUISpinBox::clickBorderColor() const +{ + return m_clickBorderColor; +} + +void UKUISpinBox::setClickBorderColor(const DTColor &newClickBorderColor) +{ + if (m_clickBorderColor == newClickBorderColor) + return; + m_clickBorderColor = newClickBorderColor; + emit clickColorBorderChanged(); +} + +const DTColor &UKUISpinBox::disableBorderColor() const +{ + return m_disableBorderColor; +} + +void UKUISpinBox::setDisableBorderColor(const DTColor &newDisableBorderColor) +{ + if (m_disableBorderColor == newDisableBorderColor) + return; + m_disableBorderColor = newDisableBorderColor; + emit disableBorderColorChanged(); +} + +const DTColor &UKUISpinBox::focusBorderColor() const +{ + return m_focusBorderColor; +} + +void UKUISpinBox::setFocusBorderColor(const DTColor &newFocusBorderColor) +{ + if (m_focusBorderColor == newFocusBorderColor) + return; + m_focusBorderColor = newFocusBorderColor; + emit focusBorderColorChanged(); +} + +int UKUISpinBox::focusBorderWidth() const +{ + return m_focusBorderWidth; +} + +void UKUISpinBox::setFocusBorderWidth(int newFocusBorderWidth) +{ + if (m_focusBorderWidth == newFocusBorderWidth) + return; + m_focusBorderWidth = newFocusBorderWidth; + emit focusBorderWidthChanged(); +} + +int UKUISpinBox::normalBorderWidth() const +{ + return m_normalBorderWidth; +} + +void UKUISpinBox::setNormalBorderWidth(int newNormalBorderWidth) +{ + if (m_normalBorderWidth == newNormalBorderWidth) + return; + m_normalBorderWidth = newNormalBorderWidth; + emit normalBorderWidthChanged(); +} + +const DTColor &UKUISpinBox::focusColor() const +{ + return m_focusColor; +} + +void UKUISpinBox::setFocusColor(const DTColor &newFocusColor) +{ + if (m_focusColor == newFocusColor) + return; + m_focusColor = newFocusColor; + emit focusColorChanged(); +} + +int UKUISpinBox::padding() const +{ + return m_padding; +} + +void UKUISpinBox::setPadding(int newPadding) +{ + if (m_padding == newPadding) + return; + m_padding = newPadding; + emit paddingChanged(); +} + +const DTColor &UKUISpinBox::btnNormalColor() const +{ + return m_btnNormalColor; +} + +void UKUISpinBox::setBtnNormalColor(const DTColor &newBtnNormalColor) +{ + if (m_btnNormalColor == newBtnNormalColor) + return; + m_btnNormalColor = newBtnNormalColor; + emit btnNormalColorChanged(); +} + +const DTColor &UKUISpinBox::btnHoverColor() const +{ + return m_btnHoverColor; +} + +void UKUISpinBox::setBtnHoverColor(const DTColor &newBtnHoverColor) +{ + if (m_btnHoverColor == newBtnHoverColor) + return; + m_btnHoverColor = newBtnHoverColor; + emit btnHoverColorChanged(); +} + +const DTColor &UKUISpinBox::btnClickColor() const +{ + return m_btnClickColor; +} + +void UKUISpinBox::setBtnClickColor(const DTColor &newBtnClickColor) +{ + if (m_btnClickColor == newBtnClickColor) + return; + m_btnClickColor = newBtnClickColor; + emit btnClickColorChanged(); +} + +const DTColor &UKUISpinBox::btnDisableColor() const +{ + return m_btnDisableColor; +} + +void UKUISpinBox::setBtnDisableColor(const DTColor &newBtnDisableColor) +{ + if (m_btnDisableColor == newBtnDisableColor) + return; + m_btnDisableColor = newBtnDisableColor; + emit btnDisableColorChanged(); +} + +const DTColor &UKUISpinBox::btnFocusColor() const +{ + return m_btnFocusColor; +} + +void UKUISpinBox::setBtnFocusColor(const DTColor &newBtnFocusColor) +{ + if (m_btnFocusColor == newBtnFocusColor) + return; + m_btnFocusColor = newBtnFocusColor; + emit btnFocusColorChanged(); +} + +const DTColor &UKUISpinBox::btnNormalBorderColor() const +{ + return m_btnNormalBorderColor; +} + +void UKUISpinBox::setBtnNormalBorderColor(const DTColor &newBtnNormalBorderColor) +{ + if (m_btnNormalBorderColor == newBtnNormalBorderColor) + return; + m_btnNormalBorderColor = newBtnNormalBorderColor; + emit btnNormalBorderColorChanged(); +} + +const DTColor &UKUISpinBox::btnHoverBorderColor() const +{ + return m_btnHoverBorderColor; +} + +void UKUISpinBox::setBtnHoverBorderColor(const DTColor &newBtnHoverBorderColor) +{ + if (m_btnHoverBorderColor == newBtnHoverBorderColor) + return; + m_btnHoverBorderColor = newBtnHoverBorderColor; + emit btnHoverBorderColorChanged(); +} + +const DTColor &UKUISpinBox::btnClickBorderColor() const +{ + return m_btnClickBorderColor; +} + +void UKUISpinBox::setBtnClickBorderColor(const DTColor &newBtnClickBorderColor) +{ + if (m_btnClickBorderColor == newBtnClickBorderColor) + return; + m_btnClickBorderColor = newBtnClickBorderColor; + emit btnClickBorderColorChanged(); +} + +const DTColor &UKUISpinBox::btnDisableBorderColor() const +{ + return m_btnDisableBorderColor; +} + +void UKUISpinBox::setBtnDisableBorderColor(const DTColor &newBtnDisableBorderColor) +{ + if (m_btnDisableBorderColor == newBtnDisableBorderColor) + return; + m_btnDisableBorderColor = newBtnDisableBorderColor; + emit btnDisableBorderColorChanged(); +} + +const DTColor &UKUISpinBox::btnFocusBorderColor() const +{ + return m_btnFocusBorderColor; +} + +void UKUISpinBox::setBtnFocusBorderColor(const DTColor &newBtnFocusBorderColor) +{ + if (m_btnFocusBorderColor == newBtnFocusBorderColor) + return; + m_btnFocusBorderColor = newBtnFocusBorderColor; + emit btnFocusBorderColorChanged(); +} + +int UKUISpinBox::btnBorderWidth() const +{ + return m_btnBorderWidth; +} + +void UKUISpinBox::setBtnBorderWidth(int newBtnBorderWidth) +{ + if (m_btnBorderWidth == newBtnBorderWidth) + return; + m_btnBorderWidth = newBtnBorderWidth; + emit btnBorderWidthChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuispinbox.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuispinbox.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuispinbox.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuispinbox.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,286 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUISPINBOX_H +#define UKUISPINBOX_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QApplication> +#include <QPalette> +#include <QtQml/qqml.h> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUISpinBox : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(DTColor normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) + Q_PROPERTY(DTColor hoverColor READ hoverColor WRITE setHoverColor NOTIFY hoverColorChanged) + Q_PROPERTY(DTColor clickColor READ clickColor WRITE setClickColor NOTIFY clickColorChanged) + Q_PROPERTY(DTColor disableColor READ disableColor WRITE setDisableColor NOTIFY disableColorChanged) + Q_PROPERTY(DTColor focusColor READ focusColor WRITE setFocusColor NOTIFY focusColorChanged) + + Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) + Q_PROPERTY(DTColor hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverColorBorderChanged) + Q_PROPERTY(DTColor clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickColorBorderChanged) + Q_PROPERTY(DTColor disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) + Q_PROPERTY(DTColor focusBorderColor READ focusBorderColor WRITE setFocusBorderColor NOTIFY focusBorderColorChanged) + + Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) + Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) + + Q_PROPERTY(DTColor btnNormalColor READ btnNormalColor WRITE setBtnNormalColor NOTIFY btnNormalColorChanged) + Q_PROPERTY(DTColor btnHoverColor READ btnHoverColor WRITE setBtnHoverColor NOTIFY btnHoverColorChanged) + Q_PROPERTY(DTColor btnClickColor READ btnClickColor WRITE setBtnClickColor NOTIFY btnClickColorChanged) + Q_PROPERTY(DTColor btnDisableColor READ btnDisableColor WRITE setBtnDisableColor NOTIFY btnDisableColorChanged) + Q_PROPERTY(DTColor btnFocusColor READ btnFocusColor WRITE setBtnFocusColor NOTIFY btnFocusColorChanged) + + Q_PROPERTY(DTColor btnNormalBorderColor READ btnNormalBorderColor WRITE setBtnNormalBorderColor NOTIFY btnNormalBorderColorChanged) + Q_PROPERTY(DTColor btnHoverBorderColor READ btnHoverBorderColor WRITE setBtnHoverBorderColor NOTIFY btnHoverBorderColorChanged) + Q_PROPERTY(DTColor btnClickBorderColor READ btnClickBorderColor WRITE setBtnClickBorderColor NOTIFY btnClickBorderColorChanged) + Q_PROPERTY(DTColor btnDisableBorderColor READ btnDisableBorderColor WRITE setBtnDisableBorderColor NOTIFY btnDisableBorderColorChanged) + Q_PROPERTY(DTColor btnFocusBorderColor READ btnFocusBorderColor WRITE setBtnFocusBorderColor NOTIFY btnFocusBorderColorChanged) + + + Q_PROPERTY(int normalWidth READ normalWidth WRITE setNormalWidth NOTIFY normalWidthChanged) + Q_PROPERTY(int normalHeight READ normalHeight WRITE setNormalHeight NOTIFY normalHeightChanged) + Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY radiusChanged) + Q_PROPERTY(int btnNormalWidth READ btnNormalWidth WRITE setBtnNormalWidth NOTIFY btnNormalWidthChanged) + Q_PROPERTY(int btnNormalHeight READ btnNormalHeight WRITE setBtnNormalHeight NOTIFY btnNormalHeightChanged) + Q_PROPERTY(int focusBorderWidth READ focusBorderWidth WRITE setFocusBorderWidth NOTIFY focusBorderWidthChanged) + Q_PROPERTY(int normalBorderWidth READ normalBorderWidth WRITE setNormalBorderWidth NOTIFY normalBorderWidthChanged) + + Q_PROPERTY(int padding READ padding WRITE setPadding NOTIFY paddingChanged) + + Q_PROPERTY(int btnBorderWidth READ btnBorderWidth WRITE setBtnBorderWidth NOTIFY btnBorderWidthChanged) + +public: + explicit UKUISpinBox(QQuickItem *parent = nullptr); + ~UKUISpinBox(); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + + static UKUISpinBox* qmlAttachedProperties(QObject* parent); + + const DTColor &normalColor() const; + void setNormalColor(const DTColor &newNormalColor); + + const DTColor &disableColor() const; + void setDisableColor(const DTColor &newDisableColor); + + const DTColor &hoverColor() const; + void setHoverColor(const DTColor &newHoverColor); + + const DTColor &clickColor() const; + void setClickColor(const DTColor &newClickColor); + + const DTColor &normalTextColor() const; + void setNormalTextColor(const DTColor &newNormalTextColor); + + const DTColor &disableTextColor() const; + void setDisableTextColor(const DTColor &newDisableTextColor); + + int normalWidth() const; + void setNormalWidth(int newNormalWidth); + + int normalHeight() const; + void setNormalHeight(int newNormalHeight); + + int radius() const; + void setRadius(int newRadius); + + int btnNormalWidth() const; + void setBtnNormalWidth(int newBtnNormalWidth); + + int btnNormalHeight() const; + void setBtnNormalHeight(int newBtnNormalHeight); + + const DTColor &normalBorderColor() const; + void setNormalBorderColor(const DTColor &newNormalBorderColor); + + const DTColor &hoverBorderColor() const; + void setHoverBorderColor(const DTColor &newHoverBorderColor); + + const DTColor &clickBorderColor() const; + void setClickBorderColor(const DTColor &newClickBorderColor); + + const DTColor &disableBorderColor() const; + void setDisableBorderColor(const DTColor &newDisableBorderColor); + + const DTColor &focusBorderColor() const; + void setFocusBorderColor(const DTColor &newFocusBorderColor); + + int focusBorderWidth() const; + void setFocusBorderWidth(int newFocusBorderWidth); + + int normalBorderWidth() const; + void setNormalBorderWidth(int newNormalBorderWidth); + + const DTColor &focusColor() const; + void setFocusColor(const DTColor &newFocusColor); + + int padding() const; + void setPadding(int newPadding); + + const DTColor &btnNormalColor() const; + void setBtnNormalColor(const DTColor &newBtnNormalColor); + + const DTColor &btnHoverColor() const; + void setBtnHoverColor(const DTColor &newBtnHoverColor); + + const DTColor &btnClickColor() const; + void setBtnClickColor(const DTColor &newBtnClickColor); + + const DTColor &btnDisableColor() const; + void setBtnDisableColor(const DTColor &newBtnDisableColor); + + const DTColor &btnFocusColor() const; + void setBtnFocusColor(const DTColor &newBtnFocusColor); + + const DTColor &btnNormalBorderColor() const; + void setBtnNormalBorderColor(const DTColor &newBtnNormalBorderColor); + + const DTColor &btnHoverBorderColor() const; + void setBtnHoverBorderColor(const DTColor &newBtnHoverBorderColor); + + const DTColor &btnClickBorderColor() const; + void setBtnClickBorderColor(const DTColor &newBtnClickBorderColor); + + const DTColor &btnDisableBorderColor() const; + void setBtnDisableBorderColor(const DTColor &newBtnDisableBorderColor); + + const DTColor &btnFocusBorderColor() const; + void setBtnFocusBorderColor(const DTColor &newBtnFocusBorderColor); + + int btnBorderWidth() const; + void setBtnBorderWidth(int newBtnBorderWidth); + +signals: + void normalColorChanged(); + + void linkColorChanged(); + + void disableColorChanged(); + + void hoverColorChanged(); + + void clickColorChanged(); + + void normalTextColorChanged(); + + void disableTextColorChanged(); + + void normalWidthChanged(); + + void normalHeightChanged(); + + void radiusChanged(); + + void btnNormalWidthChanged(); + + void btnNormalHeightChanged(); + + void normalBorderColorChanged(); + + void hoverColorBorderChanged(); + + void clickColorBorderChanged(); + + void disableBorderColorChanged(); + + void focusBorderColorChanged(); + + void focusBorderWidthChanged(); + + void normalBorderWidthChanged(); + + void focusColorChanged(); + + void paddingChanged(); + + void btnNormalColorChanged(); + + void btnHoverColorChanged(); + + void btnClickColorChanged(); + + void btnDisableColorChanged(); + + void btnFocusColorChanged(); + + void btnNormalBorderColorChanged(); + + void btnHoverBorderColorChanged(); + + void btnClickBorderColorChanged(); + + void btnDisableBorderColorChanged(); + + void btnFocusBorderColorChanged(); + + void btnBorderWidthChanged(); + +private: + Q_INVOKABLE DTColor m_normalColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.85)); + Q_INVOKABLE DTColor m_disableColor; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + + Q_INVOKABLE DTColor m_hoverColor; + Q_INVOKABLE DTColor m_clickColor; + Q_INVOKABLE DTColor m_normalTextColor; + Q_INVOKABLE DTColor m_disableTextColor; + int m_normalWidth; + int m_normalHeight; + int m_radius; + int m_btnNormalWidth; + int m_btnNormalHeight; + Q_INVOKABLE DTColor m_normalBorderColor; + Q_INVOKABLE DTColor m_hoverBorderColor; + Q_INVOKABLE DTColor m_clickBorderColor; + Q_INVOKABLE DTColor m_disableBorderColor; + Q_INVOKABLE DTColor m_focusBorderColor; + int m_focusBorderWidth; + int m_normalBorderWidth; + Q_INVOKABLE DTColor m_focusColor; + int m_padding; + Q_INVOKABLE DTColor m_btnNormalColor; + Q_INVOKABLE DTColor m_btnHoverColor; + Q_INVOKABLE DTColor m_btnClickColor; + Q_INVOKABLE DTColor m_btnDisableColor; + Q_INVOKABLE DTColor m_btnFocusColor; + Q_INVOKABLE DTColor m_btnNormalBorderColor; + Q_INVOKABLE DTColor m_btnHoverBorderColor; + Q_INVOKABLE DTColor m_btnClickBorderColor; + Q_INVOKABLE DTColor m_btnDisableBorderColor; + Q_INVOKABLE DTColor m_btnFocusBorderColor; + int m_btnBorderWidth; +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUISpinBox, QML_HAS_ATTACHED_PROPERTIES) + +#endif // UKUISPINBOX_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitabbar.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitabbar.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitabbar.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitabbar.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,45 @@ +#include "ukuitabbar.h" +#include "qdebug.h" + +using namespace UKUIQQC2Style; + +UKUITabBar::UKUITabBar(QQuickItem *parent) : QQuickItem(parent) +{ + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUITabBar::~UKUITabBar() +{ + +} + +void UKUITabBar::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setNormalColor(instance->kContainSecondaryNormal()); +} + +UKUITabBar* UKUITabBar::qmlAttachedProperties(QObject* parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUITabBar(p); +} + +const DTColor &UKUITabBar::normalColor() const +{ + return m_normalColor; +} + +void UKUITabBar::setNormalColor(const DTColor &newNormalColor) +{ + if (m_normalColor == newNormalColor) + return; + m_normalColor = newNormalColor; + emit normalColorChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitabbar.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitabbar.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitabbar.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitabbar.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,66 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUITABBAR_H +#define UKUITABBAR_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QApplication> +#include <QPalette> +#include <QtQml/qqml.h> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUITabBar : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(DTColor normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) + +public: + explicit UKUITabBar(QQuickItem *parent = nullptr); + ~UKUITabBar(); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + + static UKUITabBar* qmlAttachedProperties(QObject* parent); + + const DTColor &normalColor() const; + void setNormalColor(const DTColor &newNormalColor); + +signals: + void normalColorChanged(); + +private: + Q_INVOKABLE DTColor m_normalColor = DTColor(QColor("#FFFFFF")); + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUITabBar, QML_HAS_ATTACHED_PROPERTIES) + +#endif // UKUITABBAR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitabbutton.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitabbutton.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitabbutton.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitabbutton.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,171 @@ +#include "ukuitabbutton.h" +#include "qdebug.h" + +using namespace UKUIQQC2Style; + +UKUITabButton::UKUITabButton(QQuickItem *parent) : QQuickItem(parent) +{ + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUITabButton::~UKUITabButton() +{ + +} + +void UKUITabButton::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setNormalColor(DTColor(QColor(0,0,0,0))); + setHoverColor(instance->kContainHover()); + setClickedColor(instance->kContainClick()); + setCheckedColor(instance->kContainGeneralNormal()); + setBorderWidth(1); + setNormalBorderColor(instance->kLineComponentNormal()); + setHoverBorderColor(instance->kLineComponentHover()); + setClickBorderColor(instance->kLineComponentClick()); + setCheckedBorderColor(instance->kLineComponentNormal()); + setNormalTextColor(instance->kFontPrimary()); +} + +UKUITabButton* UKUITabButton::qmlAttachedProperties(QObject* parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUITabButton(p); +} + +const DTColor &UKUITabButton::normalColor() const +{ + return m_normalColor; +} + +void UKUITabButton::setNormalColor(const DTColor &newNormalColor) +{ + if (m_normalColor == newNormalColor) + return; + m_normalColor = newNormalColor; + emit normalColorChanged(); +} + +const DTColor &UKUITabButton::hoverColor() const +{ + return m_hoverColor; +} + +void UKUITabButton::setHoverColor(const DTColor &newHoverColor) +{ + if (m_hoverColor == newHoverColor) + return; + m_hoverColor = newHoverColor; + emit hoverColorChanged(); +} + +const DTColor &UKUITabButton::checkedColor() const +{ + return m_checkedColor; +} + +void UKUITabButton::setCheckedColor(const DTColor &newCheckedColor) +{ + if (m_checkedColor == newCheckedColor) + return; + m_checkedColor = newCheckedColor; + emit checkedColorChanged(); +} + +const DTColor &UKUITabButton::clickedColor() const +{ + return m_clickedColor; +} + +void UKUITabButton::setClickedColor(const DTColor &newClickedColor) +{ + if (m_clickedColor == newClickedColor) + return; + m_clickedColor = newClickedColor; + emit clickedColorChanged(); +} + +int UKUITabButton::borderWidth() const +{ + return m_borderWidth; +} + +void UKUITabButton::setBorderWidth(int newBorderWidth) +{ + if (m_borderWidth == newBorderWidth) + return; + m_borderWidth = newBorderWidth; + emit borderWidthChanged(); +} + +const DTColor &UKUITabButton::normalBorderColor() const +{ + return m_normalBorderColor; +} + +void UKUITabButton::setNormalBorderColor(const DTColor &newNormalBorderColor) +{ + if (m_normalBorderColor == newNormalBorderColor) + return; + m_normalBorderColor = newNormalBorderColor; + emit normalBorderColorChanged(); +} + +const DTColor &UKUITabButton::hoverBorderColor() const +{ + return m_hoverBorderColor; +} + +void UKUITabButton::setHoverBorderColor(const DTColor &newHoverBorderColor) +{ + if (m_hoverBorderColor == newHoverBorderColor) + return; + m_hoverBorderColor = newHoverBorderColor; + emit hoverBorderColorChanged(); +} + +const DTColor &UKUITabButton::clickBorderColor() const +{ + return m_clickBorderColor; +} + +void UKUITabButton::setClickBorderColor(const DTColor &newClickBorderColor) +{ + if (m_clickBorderColor == newClickBorderColor) + return; + m_clickBorderColor = newClickBorderColor; + emit clickBorderColorChanged(); +} + +const DTColor &UKUITabButton::checkedBorderColor() const +{ + return m_checkedBorderColor; +} + +void UKUITabButton::setCheckedBorderColor(const DTColor &newCheckedBorderColor) +{ + if (m_checkedBorderColor == newCheckedBorderColor) + return; + m_checkedBorderColor = newCheckedBorderColor; + emit checkedBorderColorChanged(); +} + +const DTColor &UKUITabButton::normalTextColor() const +{ + return m_normalTextColor; +} + +void UKUITabButton::setNormalTextColor(const DTColor &newNormalTextColor) +{ + if (m_normalTextColor == newNormalTextColor) + return; + m_normalTextColor = newNormalTextColor; + emit disableTextColorChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitabbutton.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitabbutton.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitabbutton.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitabbutton.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,134 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUITABBUTTON_H +#define UKUITABBUTTON_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QApplication> +#include <QPalette> +#include <QtQml/qqml.h> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUITabButton : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(DTColor normalColor READ normalColor WRITE setNormalColor NOTIFY normalColorChanged) + Q_PROPERTY(DTColor hoverColor READ hoverColor WRITE setHoverColor NOTIFY hoverColorChanged) + Q_PROPERTY(DTColor checkedColor READ checkedColor WRITE setCheckedColor NOTIFY checkedColorChanged) + Q_PROPERTY(DTColor clickedColor READ clickedColor WRITE setClickedColor NOTIFY clickedColorChanged) + Q_PROPERTY(DTColor checkedColor READ checkedColor WRITE setCheckedColor NOTIFY checkedColorColorChanged) + + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) + Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) + Q_PROPERTY(DTColor hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) + Q_PROPERTY(DTColor clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) + Q_PROPERTY(DTColor checkedBorderColor READ checkedBorderColor WRITE setCheckedBorderColor NOTIFY checkedBorderColorChanged) + + Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY disableTextColorChanged) + +public: + explicit UKUITabButton(QQuickItem *parent = nullptr); + ~UKUITabButton(); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + + static UKUITabButton* qmlAttachedProperties(QObject* parent); + + const DTColor &normalColor() const; + void setNormalColor(const DTColor &newNormalColor); + + const DTColor &hoverColor() const; + void setHoverColor(const DTColor &newHoverColor); + + const DTColor &checkedColor() const; + void setCheckedColor(const DTColor &newCheckedColor); + + const DTColor &clickedColor() const; + void setClickedColor(const DTColor &newClickedColor); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); + + const DTColor &normalBorderColor() const; + void setNormalBorderColor(const DTColor &newNormalBorderColor); + + const DTColor &hoverBorderColor() const; + void setHoverBorderColor(const DTColor &newHoverBorderColor); + + const DTColor &clickBorderColor() const; + void setClickBorderColor(const DTColor &newClickBorderColor); + + const DTColor &checkedBorderColor() const; + void setCheckedBorderColor(const DTColor &newCheckedBorderColor); + + const DTColor &normalTextColor() const; + void setNormalTextColor(const DTColor &newNormalTextColor); + +signals: + void normalColorChanged(); + + void hoverColorChanged(); + + void checkedColorChanged(); + + void clickedColorChanged(); + + void checkedColorColorChanged(); + + void borderWidthChanged(); + + void normalBorderColorChanged(); + + void hoverBorderColorChanged(); + + void clickBorderColorChanged(); + + void checkedBorderColorChanged(); + + void disableTextColorChanged(); + +private: + Q_INVOKABLE DTColor m_normalColor = DTColor("#FFFFFF"); + Q_INVOKABLE DTColor m_hoverColor = DTColor("#F2F2F2"); + Q_INVOKABLE DTColor m_checkedColor = DTColor("#F2F2F2"); + Q_INVOKABLE DTColor m_clickedColor = DTColor("#EEEEEE"); + int m_borderWidth; + Q_INVOKABLE DTColor m_normalBorderColor; + Q_INVOKABLE DTColor m_hoverBorderColor; + Q_INVOKABLE DTColor m_clickBorderColor; + Q_INVOKABLE DTColor m_checkedBorderColor; + Q_INVOKABLE DTColor m_normalTextColor; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUITabButton, QML_HAS_ATTACHED_PROPERTIES) + +#endif // UKUITABBUTTON_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitextfiled.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitextfiled.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitextfiled.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitextfiled.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,392 @@ +#include <QApplication> +#include "ukuitextfiled.h" +#include "qdebug.h" +using namespace UKUIQQC2Style; + +UKUITextFiled::UKUITextFiled(QQuickItem *parent) : QQuickItem(parent) +{ + qDebug() << "UKUITextFiled.............."; + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUITextFiled::~UKUITextFiled() +{ + +} + +UKUITextFiled* UKUITextFiled::qmlAttachedProperties(QObject* parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUITextFiled(p); +} + +void UKUITextFiled::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setLeftRightPadding(instance->kmarginNormal()); + setRadius(instance->kradiusNormal()); + setBorderWidth(instance->normalline()); + setFocusBorderWidth(instance->focusline()); + setNormalWidth(180); + setNormalHeight(36); + + setNormalBC(instance->kComponentNormal()); + setInputNormalBC(instance->kContainGeneralNormal()); + setPlaceHolderNormalBC(instance->buttonActive()); + setPlaceHolderHoveredBC(instance->kComponentHover()); + setPlaceHolderClickedBC(instance->kComponentClick()); + setPlaceHolderDisableBC(instance->buttonDisable()); + setNormalBorderColor(instance->kLineComponentNormal()); + setHoverBorderColor(instance->kLineComponentHover()); + setDisableBorderColor(instance->kLineComponentDisable()); + setFocusBorderColor(instance->kBrandFocus()); + + setPlaceHolderNormalTextColor(instance->placeholderTextActive()); + setPlaceHolderDisableTextColor(instance->placeholderTextDisable()); + setNormalTextColor(instance->buttonTextActive()); + setDisableTextColor(instance->placeholderTextDisable()); +} + +double UKUITextFiled::radius() const +{ + return m_radius; +} + +void UKUITextFiled::setRadius(double newRadius) +{ + if (qFuzzyCompare(m_radius, newRadius)) + return; + m_radius = newRadius; + emit radiusChanged(); +} + +double UKUITextFiled::leftRightPadding() const +{ + return m_leftRightPadding; +} + +void UKUITextFiled::setLeftRightPadding(double newLeftRightPadding) +{ + if (qFuzzyCompare(m_leftRightPadding, newLeftRightPadding)) + return; + m_leftRightPadding = newLeftRightPadding; + emit leftRightPaddingChanged(); +} + +double UKUITextFiled::upDownMargin() const +{ + return m_upDownMargin; +} + +void UKUITextFiled::setUpDownMargin(double newUpDownMargin) +{ + if (qFuzzyCompare(m_upDownMargin, newUpDownMargin)) + return; + m_upDownMargin = newUpDownMargin; + emit upDownMarginChanged(); +} + +double UKUITextFiled::space() const +{ + return m_space; +} + +void UKUITextFiled::setSpace(double newSpace) +{ + if (qFuzzyCompare(m_space, newSpace)) + return; + m_space = newSpace; + emit spaceChange(); +} + +int UKUITextFiled::normalWidth() const +{ + return m_normalWidth; +} + +void UKUITextFiled::setNormalWidth(int newNormalWidth) +{ + if (m_normalWidth == newNormalWidth) + return; + m_normalWidth = newNormalWidth; + emit normalWidthChanged(); +} + +int UKUITextFiled::normalHeight() const +{ + return m_normalHeight; +} + +void UKUITextFiled::setNormalHeight(int newNormalHeight) +{ + if (m_normalHeight == newNormalHeight) + return; + m_normalHeight = newNormalHeight; + emit normalHeightChanged(); +} + +const DTColor &UKUITextFiled::normalBC() const +{ + return m_normalBC; +} + +void UKUITextFiled::setNormalBC(const DTColor &newNormalBC) +{ + if (m_normalBC == newNormalBC) + return; + m_normalBC = newNormalBC; + emit normalBCChanged(); +} + +const DTColor &UKUITextFiled::clickedBC() const +{ + return m_clickedBC; +} + +void UKUITextFiled::setClickedBC(const DTColor &newClickedBC) +{ + if (m_clickedBC == newClickedBC) + return; + m_clickedBC = newClickedBC; + emit clickedBCChanged(); +} + +const DTColor &UKUITextFiled::hoveredBC() const +{ + return m_hoveredBC; +} + +void UKUITextFiled::setHoveredBC(const DTColor &newHoveredBC) +{ + if (m_hoveredBC == newHoveredBC) + return; + m_hoveredBC = newHoveredBC; + emit hoveredBCChanged(); +} + +const DTColor &UKUITextFiled::disableBC() const +{ + return m_disableBC; +} + +void UKUITextFiled::setDisableBC(const DTColor &newDisableBC) +{ + if (m_disableBC == newDisableBC) + return; + m_disableBC = newDisableBC; + emit disableBCChanged(); +} + +const DTColor &UKUITextFiled::disableTextColor() const +{ + return m_disableTextColor; +} + +void UKUITextFiled::setDisableTextColor(const DTColor &newDisableTextColor) +{ + if (m_disableTextColor == newDisableTextColor) + return; + m_disableTextColor = newDisableTextColor; + emit disableTextColorChanged(); +} + +const DTColor &UKUITextFiled::normalTextColor() const +{ + return m_normalTextColor; +} + +void UKUITextFiled::setNormalTextColor(const DTColor &newNormalTextColor) +{ + if (m_normalTextColor == newNormalTextColor) + return; + m_normalTextColor = newNormalTextColor; + emit normalTextColorChanged(); +} + +int UKUITextFiled::borderWidth() const +{ + return m_borderWidth; +} + +void UKUITextFiled::setBorderWidth(int newBorderWidth) +{ + if (m_borderWidth == newBorderWidth) + return; + m_borderWidth = newBorderWidth; + emit borderWidthChanged(); +} + +int UKUITextFiled::focusBorderWidth() const +{ + return m_focusBorderWidth; +} + +void UKUITextFiled::setFocusBorderWidth(int newFocusBorderWidth) +{ + if (m_focusBorderWidth == newFocusBorderWidth) + return; + m_focusBorderWidth = newFocusBorderWidth; + emit focusBorderWidthChanged(); +} + +const DTColor &UKUITextFiled::normalBorderColor() const +{ + return m_normalBorderColor; +} + +void UKUITextFiled::setNormalBorderColor(const DTColor &newNormalBorderColor) +{ + if (m_normalBorderColor == newNormalBorderColor) + return; + m_normalBorderColor = newNormalBorderColor; + emit normalBorderColorChanged(); +} + +const DTColor &UKUITextFiled::clickBorderColor() const +{ + return m_clickBorderColor; +} + +void UKUITextFiled::setClickBorderColor(const DTColor &newClickBorderColor) +{ + if (m_clickBorderColor == newClickBorderColor) + return; + m_clickBorderColor = newClickBorderColor; + emit clickBorderColorChanged(); +} + +const DTColor &UKUITextFiled::disableBorderColor() const +{ + return m_disableBorderColor; +} + +void UKUITextFiled::setDisableBorderColor(const DTColor &newDisableBorderColor) +{ + if (m_disableBorderColor == newDisableBorderColor) + return; + m_disableBorderColor = newDisableBorderColor; + emit disableBorderColorChanged(); +} + +const DTColor &UKUITextFiled::focusBorderColor() const +{ + return m_focusBorderColor; +} + +void UKUITextFiled::setFocusBorderColor(const DTColor &newFocusBorderColor) +{ + if (m_focusBorderColor == newFocusBorderColor) + return; + m_focusBorderColor = newFocusBorderColor; + emit focusBorderColorChanged(); +} + +const DTColor &UKUITextFiled::hoverBorderColor() const +{ + return m_hoverBorderColor; +} + +void UKUITextFiled::setHoverBorderColor(const DTColor &newHoverBorderColor) +{ + if (m_hoverBorderColor == newHoverBorderColor) + return; + m_hoverBorderColor = newHoverBorderColor; + emit hoverBorderColorChanged(); +} + +const DTColor &UKUITextFiled::placeHolderNormalTextColor() const +{ + return m_placeHolderNormalTextColor; +} + +void UKUITextFiled::setPlaceHolderNormalTextColor(const DTColor &newPlaceHolderNormalTextColor) +{ + if (m_placeHolderNormalTextColor == newPlaceHolderNormalTextColor) + return; + m_placeHolderNormalTextColor = newPlaceHolderNormalTextColor; + emit placeHolderNormalTextColorChanged(); +} + +const DTColor &UKUITextFiled::placeHolderDisableTextColor() const +{ + return m_placeHolderDisableTextColor; +} + +void UKUITextFiled::setPlaceHolderDisableTextColor(const DTColor &newPlaceHolderDisableTextColor) +{ + if (m_placeHolderDisableTextColor == newPlaceHolderDisableTextColor) + return; + m_placeHolderDisableTextColor = newPlaceHolderDisableTextColor; + emit placeHolderDisableTextColorChanged(); +} + +const DTColor &UKUITextFiled::placeHolderNormalBC() const +{ + return m_placeHolderNormalBC; +} + +void UKUITextFiled::setPlaceHolderNormalBC(const DTColor &newPlaceHolderNormalBC) +{ + if (m_placeHolderNormalBC == newPlaceHolderNormalBC) + return; + m_placeHolderNormalBC = newPlaceHolderNormalBC; + emit placeHolderNormalBCChanged(); +} + +const DTColor &UKUITextFiled::placeHolderClickedBC() const +{ + return m_placeHolderClickedBC; +} + +void UKUITextFiled::setPlaceHolderClickedBC(const DTColor &newPlaceHolderClickedBC) +{ + if (m_placeHolderClickedBC == newPlaceHolderClickedBC) + return; + m_placeHolderClickedBC = newPlaceHolderClickedBC; + emit placeHolderClickedBCChanged(); +} + +const DTColor &UKUITextFiled::placeHolderHoveredBC() const +{ + return m_placeHolderHoveredBC; +} + +void UKUITextFiled::setPlaceHolderHoveredBC(const DTColor &newPlaceHolderHoveredBC) +{ + if (m_placeHolderHoveredBC == newPlaceHolderHoveredBC) + return; + m_placeHolderHoveredBC = newPlaceHolderHoveredBC; + emit placeHolderHoveredBCChanged(); +} + +const DTColor &UKUITextFiled::placeHolderDisableBC() const +{ + return m_placeHolderDisableBC; +} + +void UKUITextFiled::setPlaceHolderDisableBC(const DTColor &newPlaceHolderDisableBC) +{ + if (m_placeHolderDisableBC == newPlaceHolderDisableBC) + return; + m_placeHolderDisableBC = newPlaceHolderDisableBC; + emit placeHolderDisableBCChanged(); +} + +const DTColor &UKUITextFiled::inputNormalBC() const +{ + return m_inputNormalBC; +} + +void UKUITextFiled::setInputNormalBC(const DTColor &newInputNormalBC) +{ + if (m_inputNormalBC == newInputNormalBC) + return; + m_inputNormalBC = newInputNormalBC; + emit inputNormalBCChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitextfiled.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitextfiled.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitextfiled.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitextfiled.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,248 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUITEXTFILED_H +#define UKUITEXTFILED_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUITextFiled : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(double radius READ radius WRITE setRadius NOTIFY radiusChanged) + Q_PROPERTY(double leftRightPadding READ leftRightPadding WRITE setLeftRightPadding NOTIFY leftRightPaddingChanged) + Q_PROPERTY(double upDownMargin READ upDownMargin WRITE setUpDownMargin NOTIFY upDownMarginChanged) + Q_PROPERTY(double space READ space WRITE setSpace NOTIFY spaceChange) + + Q_PROPERTY(int normalWidth READ normalWidth WRITE setNormalWidth NOTIFY normalWidthChanged) + Q_PROPERTY(int normalHeight READ normalHeight WRITE setNormalHeight NOTIFY normalHeightChanged) + Q_PROPERTY(DTColor normalBC READ normalBC WRITE setNormalBC NOTIFY normalBCChanged) + Q_PROPERTY(DTColor inputNormalBC READ inputNormalBC WRITE setInputNormalBC NOTIFY inputNormalBCChanged) + + Q_PROPERTY(DTColor clickedBC READ clickedBC WRITE setClickedBC NOTIFY clickedBCChanged) + Q_PROPERTY(DTColor hoveredBC READ hoveredBC WRITE setHoveredBC NOTIFY hoveredBCChanged) + Q_PROPERTY(DTColor disableBC READ disableBC WRITE setDisableBC NOTIFY disableBCChanged) + + Q_PROPERTY(DTColor placeHolderNormalBC READ placeHolderNormalBC WRITE setPlaceHolderNormalBC NOTIFY placeHolderNormalBCChanged) + Q_PROPERTY(DTColor placeHolderClickedBC READ placeHolderClickedBC WRITE setPlaceHolderClickedBC NOTIFY placeHolderClickedBCChanged) + Q_PROPERTY(DTColor placeHolderHoveredBC READ placeHolderHoveredBC WRITE setPlaceHolderHoveredBC NOTIFY placeHolderHoveredBCChanged) + Q_PROPERTY(DTColor placeHolderDisableBC READ placeHolderDisableBC WRITE setPlaceHolderDisableBC NOTIFY placeHolderDisableBCChanged) + + Q_PROPERTY(DTColor placeHolderNormalTextColor READ placeHolderNormalTextColor WRITE setPlaceHolderNormalTextColor NOTIFY placeHolderNormalTextColorChanged) + Q_PROPERTY(DTColor placeHolderDisableTextColor READ placeHolderDisableTextColor WRITE setPlaceHolderDisableTextColor NOTIFY placeHolderDisableTextColorChanged) + Q_PROPERTY(DTColor disableTextColor READ disableTextColor WRITE setDisableTextColor NOTIFY disableTextColorChanged) + Q_PROPERTY(DTColor normalTextColor READ normalTextColor WRITE setNormalTextColor NOTIFY normalTextColorChanged) + + Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth NOTIFY borderWidthChanged) + Q_PROPERTY(int focusBorderWidth READ focusBorderWidth WRITE setFocusBorderWidth NOTIFY focusBorderWidthChanged) + Q_PROPERTY(DTColor normalBorderColor READ normalBorderColor WRITE setNormalBorderColor NOTIFY normalBorderColorChanged) + Q_PROPERTY(DTColor hoverBorderColor READ hoverBorderColor WRITE setHoverBorderColor NOTIFY hoverBorderColorChanged) + + Q_PROPERTY(DTColor clickBorderColor READ clickBorderColor WRITE setClickBorderColor NOTIFY clickBorderColorChanged) + Q_PROPERTY(DTColor disableBorderColor READ disableBorderColor WRITE setDisableBorderColor NOTIFY disableBorderColorChanged) + Q_PROPERTY(DTColor focusBorderColor READ focusBorderColor WRITE setFocusBorderColor NOTIFY focusBorderColorChanged) + + +public: + explicit UKUITextFiled(QQuickItem *parent = nullptr); + ~UKUITextFiled(); + + static UKUITextFiled* qmlAttachedProperties(QObject* parent); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + + + double radius() const; + void setRadius(double newRadius); + + double leftRightPadding() const; + void setLeftRightPadding(double newLeftRightPadding); + + double upDownMargin() const; + void setUpDownMargin(double newUpDownMargin); + + double space() const; + void setSpace(double newSpace); + + int normalWidth() const; + void setNormalWidth(int newNormalWidth); + + int normalHeight() const; + void setNormalHeight(int newNormalHeight); + + const DTColor &normalBC() const; + void setNormalBC(const DTColor &newNormalBC); + + const DTColor &clickedBC() const; + void setClickedBC(const DTColor &newClickedBC); + + const DTColor &hoveredBC() const; + void setHoveredBC(const DTColor &newHoveredBC); + + const DTColor &disableBC() const; + void setDisableBC(const DTColor &newDisableBC); + + const DTColor &disableTextColor() const; + void setDisableTextColor(const DTColor &newDisableTextColor); + + const DTColor &normalTextColor() const; + void setNormalTextColor(const DTColor &newNormalTextColor); + + int borderWidth() const; + void setBorderWidth(int newBorderWidth); + + int focusBorderWidth() const; + void setFocusBorderWidth(int newFocusBorderWidth); + + const DTColor &normalBorderColor() const; + void setNormalBorderColor(const DTColor &newNormalBorderColor); + + const DTColor &clickBorderColor() const; + void setClickBorderColor(const DTColor &newClickBorderColor); + + const DTColor &disableBorderColor() const; + void setDisableBorderColor(const DTColor &newDisableBorderColor); + + const DTColor &focusBorderColor() const; + void setFocusBorderColor(const DTColor &newFocusBorderColor); + + const DTColor &hoverBorderColor() const; + void setHoverBorderColor(const DTColor &newHoverBorderColor); + + const DTColor &placeHolderNormalTextColor() const; + void setPlaceHolderNormalTextColor(const DTColor &newPlaceHolderNormalTextColor); + + const DTColor &placeHolderDisableTextColor() const; + void setPlaceHolderDisableTextColor(const DTColor &newPlaceHolderDisableTextColor); + + const DTColor &placeHolderNormalBC() const; + void setPlaceHolderNormalBC(const DTColor &newPlaceHolderNormalBC); + + const DTColor &placeHolderClickedBC() const; + void setPlaceHolderClickedBC(const DTColor &newPlaceHolderClickedBC); + + const DTColor &placeHolderHoveredBC() const; + void setPlaceHolderHoveredBC(const DTColor &newPlaceHolderHoveredBC); + + const DTColor &placeHolderDisableBC() const; + void setPlaceHolderDisableBC(const DTColor &newPlaceHolderDisableBC); + + const DTColor &inputNormalBC() const; + void setInputNormalBC(const DTColor &newInputNormalBC); + +signals: + + void radiusChanged(); + + void leftRightPaddingChanged(); + + void upDownMarginChanged(); + + void spaceChange(); + + void normalWidthChanged(); + + void normalHeightChanged(); + + void normalBCChanged(); + + void clickedBCChanged(); + + void hoveredBCChanged(); + + void disableBCChanged(); + + void disableTextColorChanged(); + + void normalTextColorChanged(); + + void borderWidthChanged(); + + void focusBorderWidthChanged(); + + void normalBorderColorChanged(); + + void clickBorderColorChanged(); + + void disableBorderColorChanged(); + + void focusBorderColorChanged(); + + void hoverBorderColorChanged(); + + void placeHolderNormalTextColorChanged(); + + void placeHolderDisableTextColorChanged(); + + void placeHolderNormalBCChanged(); + + void placeHolderClickedBCChanged(); + + void placeHolderHoveredBCChanged(); + + void placeHolderDisableBCChanged(); + + void inputNormalBCChanged(); + +private: + + double m_radius; + double m_leftRightPadding; + double m_upDownMargin; + double m_space; + int m_normalWidth; + int m_normalHeight; + Q_INVOKABLE DTColor m_normalBC; + Q_INVOKABLE DTColor m_clickedBC; + Q_INVOKABLE DTColor m_hoveredBC; + Q_INVOKABLE DTColor m_disableBC; + Q_INVOKABLE DTColor m_disableTextColor; + Q_INVOKABLE DTColor m_normalTextColor; + int m_borderWidth; + int m_focusBorderWidth; + Q_INVOKABLE DTColor m_normalBorderColor; + Q_INVOKABLE DTColor m_clickBorderColor; + Q_INVOKABLE DTColor m_disableBorderColor; + Q_INVOKABLE DTColor m_focusBorderColor; + Q_INVOKABLE DTColor m_hoverBorderColor; + Q_INVOKABLE DTColor m_placeHolderNormalTextColor; + Q_INVOKABLE DTColor m_placeHolderDisableTextColor; + Q_INVOKABLE DTColor m_placeHolderNormalBC; + Q_INVOKABLE DTColor m_placeHolderClickedBC; + Q_INVOKABLE DTColor m_placeHolderHoveredBC; + Q_INVOKABLE DTColor m_placeHolderDisableBC; + Q_INVOKABLE DTColor m_inputNormalBC; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUITextFiled, QML_HAS_ATTACHED_PROPERTIES) + +#endif // UKUITEXTFILED_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitooltip.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitooltip.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitooltip.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitooltip.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,128 @@ +#include "ukuitooltip.h" +#include "qdebug.h" + +using namespace UKUIQQC2Style; + +UKUIToolTip::UKUIToolTip(QQuickItem *parent) : QQuickItem(parent) +{ + if(!qApp || !qApp->property("qqc2-globaltoken").isValid()) + return; + TokenParameter * token = qApp->property("qqc2-globaltoken").value<TokenParameter *>(); + m_instance = token->getInstance(); + initParam(m_instance); + connect(m_instance, &UKUIGlobalDTConfig::GlobalDTConfig::tokenChanged, [=](){ + initParam(m_instance); + }); +} + +UKUIToolTip::~UKUIToolTip() +{ + +} + +void UKUIToolTip::initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance) +{ + setPadding(12); + setBackColor(instance->baseActive()); + setBackBorderColor(instance->kLineWindowAcitive()); + //setShadowColor(instance->kShadowMin()); + setTextColor(instance->windowTextActive()); + setRadius(6); +} + +UKUIToolTip* UKUIToolTip::qmlAttachedProperties(QObject* parent) +{ + auto p = qobject_cast<QQuickItem*>(parent); + return new UKUIToolTip(p); +} + +int UKUIToolTip::padding() const +{ + return m_padding; +} + +void UKUIToolTip::setPadding(int newPadding) +{ + if (m_padding == newPadding) + return; + m_padding = newPadding; + emit paddingChanged(); +} + +const DTColor &UKUIToolTip::backColor() const +{ + return m_backColor; +} + +void UKUIToolTip::setBackColor(const DTColor &newBackColor) +{ + if (m_backColor == newBackColor) + return; + m_backColor = newBackColor; + emit backColorChanged(); +} + +const DTColor &UKUIToolTip::backBorderColor() const +{ + return m_backBorderColor; +} + +void UKUIToolTip::setBackBorderColor(const DTColor &newBackBorderColor) +{ + if (m_backBorderColor == newBackBorderColor) + return; + m_backBorderColor = newBackBorderColor; + emit backBorderColorChanged(); +} + +const DTColor &UKUIToolTip::shadowColor() const +{ + return m_shadowColor; +} + +void UKUIToolTip::setShadowColor(const DTColor &newShadowColor) +{ + if (m_shadowColor == newShadowColor) + return; + m_shadowColor = newShadowColor; + emit shadowColorChanged(); +} + +const DTColor &UKUIToolTip::textColor() const +{ + return m_textColor; +} + +void UKUIToolTip::setTextColor(const DTColor &newTextColor) +{ + if (m_textColor == newTextColor) + return; + m_textColor = newTextColor; + emit textColorChanged(); +} + +int UKUIToolTip::radius() const +{ + return m_radius; +} + +void UKUIToolTip::setRadius(int newRadius) +{ + if (m_radius == newRadius) + return; + m_radius = newRadius; + emit radiusChanged(); +} + +int UKUIToolTip::margins() const +{ + return m_margins; +} + +void UKUIToolTip::setMargins(int newMargins) +{ + if (m_margins == newMargins) + return; + m_margins = newMargins; + emit marginsChanged(); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitooltip.h qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitooltip.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/styleparameter/ukuitooltip.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/styleparameter/ukuitooltip.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,108 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Yan Wang <wangyan@kylinos.cn> + * + */ + +#ifndef UKUITOOLTIP_H +#define UKUITOOLTIP_H + +#include <QObject> +#include <QColor> +#include <QFont> +#include <QApplication> +#include <QPalette> +#include <QtQml/qqml.h> +#include <QQuickItem> +#include "tokenparameter.h" + +namespace UKUIQQC2Style { + +class UKUIToolTip : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(int padding READ padding WRITE setPadding NOTIFY paddingChanged) + Q_PROPERTY(DTColor backColor READ backColor WRITE setBackColor NOTIFY backColorChanged) + Q_PROPERTY(DTColor backBorderColor READ backBorderColor WRITE setBackBorderColor NOTIFY backBorderColorChanged) + Q_PROPERTY(DTColor shadowColor READ shadowColor WRITE setShadowColor NOTIFY shadowColorChanged) + Q_PROPERTY(DTColor textColor READ textColor WRITE setTextColor NOTIFY textColorChanged) + Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY radiusChanged) + Q_PROPERTY(int margins READ margins WRITE setMargins NOTIFY marginsChanged) + +public: + explicit UKUIToolTip(QQuickItem *parent = nullptr); + ~UKUIToolTip(); + + void initParam(UKUIGlobalDTConfig::GlobalDTConfig* instance); + + static UKUIToolTip* qmlAttachedProperties(QObject* parent); + + int padding() const; + void setPadding(int newPadding); + + const DTColor &backColor() const; + void setBackColor(const DTColor &newBackColor); + + const DTColor &backBorderColor() const; + void setBackBorderColor(const DTColor &newBackBorderColor); + + const DTColor &shadowColor() const; + void setShadowColor(const DTColor &newShadowColor); + + const DTColor &textColor() const; + void setTextColor(const DTColor &newTextColor); + + int radius() const; + void setRadius(int newRadius); + + int margins() const; + void setMargins(int newMargins); + +signals: + void paddingChanged(); + + void backColorChanged(); + + void backBorderColorChanged(); + + void shadowColorChanged(); + + void textColorChanged(); + + void radiusChanged(); + + void marginsChanged(); + +private: + int m_padding = 12; + Q_INVOKABLE DTColor m_backColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.85)); + Q_INVOKABLE DTColor m_backBorderColor = DTColor(QColor::fromRgbF(1, 1, 1)); + Q_INVOKABLE DTColor m_shadowColor = DTColor(QColor::fromRgbF(0, 0, 0, 0.3)); + Q_INVOKABLE DTColor m_textColor; + int m_radius = 6; + int m_margins = 6; + + UKUIGlobalDTConfig::GlobalDTConfig* m_instance = nullptr; + +}; +} +QML_DECLARE_TYPEINFO(UKUIQQC2Style::UKUIToolTip, QML_HAS_ATTACHED_PROPERTIES) + +#endif // UKUITOOLTIP_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/ukui-qml-style-helper.pro qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/ukui-qml-style-helper.pro --- qt5-ukui-platformtheme-4.1.0.0/ukui-qml-style-helper/ukui-qml-style-helper.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qml-style-helper/ukui-qml-style-helper.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,47 +0,0 @@ -TEMPLATE = lib -TARGET = ukui-qml-style-helper -QT += KConfigCore Kirigami2 quick widgets - -CONFIG += plugin c++11 link_pkgconfig - -TARGET = $$qtLibraryTarget($$TARGET) -uri = org.ukui.qqc2style.private - -PKGCONFIG += gsettings-qt -INCLUDEPATH += /usr/include/KF5/Kirigami2 -LIBS += -L/usr/lib -L$$[QT_INSTALL_LIBS] -lKF5Kirigami2 - -include(../libqt5-ukui-style/effects/effects.pri) - -# Input -SOURCES += \ - KyIcon.cpp \ - kyquickstyleitem.cpp \ - kystylehelper.cpp \ - qqc2styleplugin.cpp - -HEADERS += \ - KyIcon.h \ - kyquickpadding_p.h \ - kyquickstyleitem.h \ - kystylehelper.h \ - qqc2styleplugin.h - -DISTFILES = qmldir - -!equals(_PRO_FILE_PWD_, $$OUT_PWD) { - copy_qmldir.target = $$OUT_PWD/qmldir - copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir - copy_qmldir.commands = $(COPY_FILE) "$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)" "$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)" - QMAKE_EXTRA_TARGETS += copy_qmldir - PRE_TARGETDEPS += $$copy_qmldir.target -} - -qmldir.files = qmldir -unix { -# installPath = $$[QT_INSTALL_QML]/$$replace(uri, \., /) - installPath = $$[QT_INSTALL_LIBS]/qt5/qml/org/ukui/qqc2style/private/ - qmldir.path = $$installPath - target.path = $$installPath - INSTALLS += target qmldir -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,37 @@ +project(ukui-qqc2-style) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +find_package(Qt5 CONFIG REQUIRED COMPONENTS + Gui +) + +file(GLOB QML_UKUIFILES "org.ukui.style/*.qml") +file(GLOB QML_FILES "qml/*.qml") +file(GLOB PRIVATE_FILES "org.ukui.style/private/*") +file(GLOB_RECURSE OTHER_FILES qmldir qml.qrc) + +SOURCE_GROUP("QMLFiles" FILES ${QML_FILES} ${QML_UKUIFILES}) +SOURCE_GROUP("QMLPrivateFiles" FILES ${PRIVATE_FILES}) +SOURCE_GROUP("other files" FILES ${OTHER_FILES}) + +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${QMLFiles} ${QMLPrivateFiles} ${OTHER_FILES}) + +message("cmake_install_libdir..." , ${CMAKE_INSTALL_LIBDIR}) + +if(UNIX) +# file(GLOB_RECURSE sources ${CMAKE_CURRENT_SOURCE_DIR}/org.ukui.style/*.qml) + + set(TARGET_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/qt5/qml/QtQuick/Controls.2/org.ukui.style/") + message("qqc2 targetpath", ${TARGET_PATH}) + set(TARGET_FILES ${QML_FILES}) + set(TARGET_UKUIFILES ${QML_UKUIFILES}) + install(FILES ${TARGET_FILES} DESTINATION ${TARGET_PATH}) + install(FILES ${TARGET_UKUIFILES} DESTINATION ${TARGET_PATH}) + install(FILES ${PRIVATE_FILES} DESTINATION "${TARGET_PATH}/private") +endif() diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/Button.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/Button.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/Button.qml 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/Button.qml 2024-12-20 09:22:49.000000000 +0800 @@ -6,36 +6,49 @@ T.Button { id: controlRoot - palette: StylePrivate.StyleHelper.palette + implicitWidth: { + var contentwidth = implicitContentWidth + leftPadding + rightPadding + return Math.max(implicitBackgroundWidth + leftInset + rightInset, + contentwidth) + } + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding) - /* The value type of buttonType are "CloseButton","MaxButton","MinButton","blueButton","Default". */ - StylePrivate.StyleHelper.buttonType: "Default" + leftPadding: StylePrivate.UKUIButton.margin + rightPadding: StylePrivate.UKUIButton.margin + hoverEnabled: true //Qt.styleHints.useHoverEffects TODO: how to make this work in 5.7? - implicitWidth: background.implicitWidth - implicitHeight: background.implicitHeight - hoverEnabled: true //Qt.styleHints.useHoverEffects TODO: how to make this work in 5.7? + font: StylePrivate.APPParameter.font - contentItem: Item {} + NormalControlColor{ + id:ncColor +// onControlColorChanged:{ +// console.log("onControlColorChanged...........", controlRoot.text, ncColor.controlColor) +// } + } - background: StylePrivate.StyleItem { - id: styleitem - anchors.fill: parent - buttonType: controlRoot.StylePrivate.StyleHelper.buttonType - control: controlRoot - elementType: "button" - sunken: controlRoot.pressed || (controlRoot.checkable && controlRoot.checked) - raised: !(controlRoot.pressed || (controlRoot.checkable && controlRoot.checked)) - hover: controlRoot.hovered - text: controlRoot.text - hasFocus: controlRoot.activeFocus - activeControl: controlRoot.isDefault ? "default" : "f" - properties: { - "icon": controlRoot.icon && controlRoot.display !== T.AbstractButton.TextOnly ? (controlRoot.icon.name || controlRoot.icon.source) : "", - "iconWidth": controlRoot.icon && controlRoot.icon.width ? controlRoot.icon.width : 0, - "iconHeight": controlRoot.icon && controlRoot.icon.height ? controlRoot.icon.height : 0, - "flat": controlRoot.flat - } +// StylePrivate.UKUIButton{ +// id: btn +// Component.onCompleted: console.log("UKUIButton 1122333", btn.normalHBC) + +// } +// StylePrivate.APPParameter{ +// id: appP + +// Component.onCompleted: console.log("APPParameter 1122333") +// } + contentItem: IconLabelContent { + controlRoot: controlRoot + anchors.centerIn: controlRoot + //onWidthChanged: console.log(controlRoot.text, width) + } + background: BackGroundRectangle{ + controlRoot: controlRoot + _radius: 6;//StylePrivate.UKUIButton.radius + //Component.onCompleted: console.log("BackGroundRectangle radius", StylePrivate.UKUIButton.radius, StylePrivate.UKUIButton.normalBC) } + //Component.onCompleted: console.log("Button radius", StylePrivate.UKUIButton.radius, StylePrivate.UKUIButton.normalBC, StylePrivate.UKUIPopup.shadowColor) + } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/CheckBox.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/CheckBox.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/CheckBox.qml 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/CheckBox.qml 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,110 @@ + +import QtQuick 2.6 +import QtQuick.Templates 2.5 as T +import org.ukui.qqc2style.private 1.0 as StylePrivate + + +T.CheckBox { + id: control + + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + implicitContentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding, + implicitIndicatorHeight + topPadding + bottomPadding) + + padding: 6 + spacing: StylePrivate.UKUICheckBox.space + + property var borderColor: control.checked ? (!control.enabled ? StylePrivate.UKUICheckBox.checked_disableIndicatorBorderColor : + control.pressed ? StylePrivate.UKUICheckBox.checked_clickIndicatorBorderColor : control.hovered ? + StylePrivate.UKUICheckBox.checked_hoverIndicatorBorderColor : StylePrivate.UKUICheckBox.checked_normalIndicatorBorderColor) : + (!control.enabled ? StylePrivate.UKUICheckBox.disableIndicatorBorderColor : control.pressed ? + StylePrivate.UKUICheckBox.clickIndicatorBorderColor : control.hovered ? + StylePrivate.UKUICheckBox.hoverIndicatorBorderColor : StylePrivate.UKUICheckBox.normalIndicatorBorderColor) + + property var checkBoxColor: control.checked ? (!control.enabled ? StylePrivate.UKUICheckBox.checked_disableIndicatorColor : + control.pressed ? StylePrivate.UKUICheckBox.checked_clickIndicatorColor : control.hovered ? + StylePrivate.UKUICheckBox.checked_hoverIndicatorColor : StylePrivate.UKUICheckBox.checked_normalIndicatorColor) : + (!control.enabled ? StylePrivate.UKUICheckBox.disableIndicatorColor : control.pressed ? + StylePrivate.UKUICheckBox.clickIndicatorColor : control.hovered ? + StylePrivate.UKUICheckBox.hoverIndicatorColor : StylePrivate.UKUICheckBox.normalIndicatorColor) + ParseInterface{ + id: parseInterface + } + + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } + + // keep in sync with CheckDelegate.qml (shared CheckIndicator.qml was removed for performance reasons) + indicator: Rectangle { + implicitWidth: StylePrivate.UKUICheckBox.indicatorWidth + implicitHeight: StylePrivate.UKUICheckBox.indicatorWidth + + x: control.text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2 + y: control.topPadding + (control.availableHeight - height) / 2 + radius: StylePrivate.UKUICheckBox.radius + + border.width: StylePrivate.UKUICheckBox.borderWidth + border.color: getStartColor(borderColor) + color: gradientRec.visible ? "transparent" : getStartColor(checkBoxColor) + + Rectangle{ + id: gradientRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + id:gradient + GradientStop { position: 0.0; color: getStartColor(checkBoxColor) } + + GradientStop { position: 1.0; color: getEndColor(checkBoxColor)} + } + visible: !parseInterface.isSolidPattern(checkBoxColor) + } + + Image { + x: (parent.width - width) / 2 + y: (parent.height - height) / 2 + width: 14 + height: 12 +// defaultColor: "#353637" +// color: control.palette.text + source: { + var model = !control.enabled ? "disenable" : control.checked ? "clicked" : "normal" + return "image://imageProvider/" + "object-select-symbolic" + "/" + model; + } + visible: control.checkState === Qt.Checked + } + + Rectangle { + x: (parent.width - width) / 2 + y: (parent.height - height) / 2 + width: 9 + height: 1 + color: { + getStartColor(!control.enabled ? StylePrivate.UKUICheckBox.checked_disableChildrenColor : + control.pressed ? StylePrivate.UKUICheckBox.checked_clickChildrenColor: + control.hovered ? StylePrivate.UKUICheckBox.checked_hoverChildrenColor: + StylePrivate.UKUICheckBox.checked_normalChildrenColor) + } + visible: control.checkState === Qt.PartiallyChecked + } + } + + contentItem: Label { + leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0 + rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0 + + text: control.text + font: StylePrivate.APPParameter.font + color: getStartColor(control.enabled ? StylePrivate.UKUICheckBox.normalTextColor : StylePrivate.UKUICheckBox.disableTextColor) + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/ComboBox.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/ComboBox.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/ComboBox.qml 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/ComboBox.qml 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,137 @@ +import QtQuick 2.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Controls.impl 2.15 +import QtQuick.Templates 2.15 as T +import org.ukui.qqc2style.private 1.0 as StylePrivate + +T.ComboBox { + id: control + + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + implicitContentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding, + implicitIndicatorHeight + topPadding + bottomPadding) + padding: StylePrivate.UKUIComboBox.leftRightPadding + leftPadding: padding + (!control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing) + rightPadding: 0//padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing) + hoverEnabled: true + + ParseInterface{ + id: parseInterface + } + + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } + + delegate: ItemDelegate { + width: ListView.view.width - scrollbar.width + text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData + hoverEnabled: control.hoverEnabled + } + + indicator: Image { + x: control.mirrored ? control.padding : control.width - width - control.padding + y: control.topPadding + (control.availableHeight - height) / 2 + width: StylePrivate.APPParameter.iconWidth + height: width + source: { + var model = !control.enabled ? "disenable" : "normal" + + if(!popup.visible){ + return "image://imageProvider/" + "ukui-down-symbolic" + "/" + model; + } + else{ + return "image://imageProvider/" + "ukui-up-symbolic" + "/" + model; + } + } + } + + contentItem: T.TextField { + leftPadding: 0//!control.mirrored ? 12 : control.editable && activeFocus ? 3 : 1 + rightPadding:0// control.mirrored ? 12 : control.editable && activeFocus ? 3 : 1 + anchors.verticalCenter: control.verticalCenter + + text: control.editable ? control.editText : control.displayText + + enabled: control.editable + autoScroll: control.editable + readOnly: control.down + inputMethodHints: control.inputMethodHints + validator: control.validator + selectByMouse: control.selectTextByMouse + + font: StylePrivate.APPParameter.font + color: getStartColor(!control.enabled ? StylePrivate.UKUIComboBox.disableTextColor : StylePrivate.UKUIComboBox.normalTextColor) + selectionColor: control.palette.highlight + selectedTextColor: control.palette.highlightedText + verticalAlignment: Text.AlignVCenter + } + + background: Rectangle { + implicitWidth: StylePrivate.UKUIComboBox.normalWidth + implicitHeight: StylePrivate.UKUIComboBox.normalHeight + radius: StylePrivate.UKUIComboBox.radius + + color: gradientRec.visible ? "transparent" : getStartColor(StylePrivate.UKUIComboBox.normalBC) + border.color: getStartColor(!control.enabled ? StylePrivate.UKUIComboBox.disableBorderColor : + control.focus ? StylePrivate.UKUIComboBox.focusBorderColor : StylePrivate.UKUIComboBox.normalBorderColor) + border.width: control.focus ? StylePrivate.UKUIComboBox.focusBorderWidth : StylePrivate.UKUIComboBox.borderWidth; + + + Rectangle{ + id: gradientRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + id:gradient + GradientStop { position: 0.0; color: getStartColor(StylePrivate.UKUIComboBox.normalBC) } + + GradientStop { position: 1.0; color: getEndColor(StylePrivate.UKUIComboBox.normalBC)} + } + visible: !parseInterface.isSolidPattern(StylePrivate.UKUIComboBox.normalBC) + } + } + + + popup: Popup { + id: pop + y: control.height + width: control.width + height: Math.min(contentItem.implicitHeight, control.Window.height - topMargin - bottomMargin) + topMargin: 6 + bottomMargin: 6 + contentItem: ListView { + clip: true + implicitHeight: contentHeight + model: control.delegateModel + //delegate: control.delegate + currentIndex: control.highlightedIndex + highlightMoveDuration: 0 + interactive: true + + ScrollBar.vertical: ScrollBar { + anchors.right: parent.right + id: scrollbar + active: hovered || pressed + } +// onImplicitHeightChanged: { +// console.log("listview implicitHeight changedddd", pop.height, implicitHeight, control.Window.height - topMargin - bottomMargin, visible, pop.visible) +// pop.height = contentItem.implicitHeight >= (control.Window.height - topMargin - bottomMargin) ? +// (control.Window.height - topMargin - bottomMargin) : contentItem.implicitHeight; +// console.log("listview implicitHeight 111111111", pop.height, implicitHeight, control.Window.height - topMargin - bottomMargin, visible) + +// } +// onHeightChanged: console.log("listview height changed", height) + } + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/ItemDelegate.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/ItemDelegate.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/ItemDelegate.qml 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/ItemDelegate.qml 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,78 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import QtQuick.Controls.impl 2.12 +import QtQuick.Templates 2.12 as T +import org.ukui.qqc2style.private 1.0 as StylePrivate + +T.ItemDelegate { + id: control + + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + implicitContentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding, + implicitIndicatorHeight + topPadding + bottomPadding) + + padding: 12 + spacing: StylePrivate.APPParameter.space + + icon.width: StylePrivate.APPParameter.iconWidth + icon.height: StylePrivate.APPParameter.iconWidth +// icon.color: control.palette.text + + property var borderColor: !control.enabled ? StylePrivate.UKUIItemDelegate.disableBorderColor : control.pressed ? StylePrivate.UKUIItemDelegate.clickBorderColor : + control.hovered ? StylePrivate.UKUIItemDelegate.hoverBorderColor : StylePrivate.UKUIItemDelegate.normalBorderColor + property var backColor: !control.enabled ? StylePrivate.UKUIItemDelegate.disableBC : control.pressed ? StylePrivate.UKUIItemDelegate.clickedBC : + control.hovered ? StylePrivate.UKUIItemDelegate.hoveredBC : StylePrivate.UKUIItemDelegate.normalBC + + ParseInterface{ + id: parseInterface + } + + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } + + contentItem: IconLabel { + spacing: control.spacing + mirrored: control.mirrored + display: control.display + alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft + + icon: control.icon + text: control.text + font: StylePrivate.APPParameter.font + color: getStartColor(control.enabled ? StylePrivate.UKUIItemDelegate.normalTextColor : StylePrivate.UKUIItemDelegate.disableTextColor) + } + + background: Rectangle { + anchors.fill: control + radius: StylePrivate.UKUIItemDelegate.radius + border.width: StylePrivate.UKUIItemDelegate.borderWidth + border.color: getStartColor(borderColor) +// implicitWidth: 100 +// implicitHeight: 40 +// visible: control.down || control.highlighted || control.visualFocus + color: gradientRec.visible ? "transparent" : getStartColor(backColor) + + Rectangle{ + id: gradientRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + id:gradient + GradientStop { position: 0.0; color: getStartColor(backColor) } + + GradientStop { position: 1.0; color: getEndColor(backColor)} + } + visible: !parseInterface.isSolidPattern(backColor) + } + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/Label.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/Label.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/Label.qml 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/Label.qml 2024-12-20 09:22:49.000000000 +0800 @@ -9,9 +9,13 @@ T.Label { id:control - color:StylePrivate.StyleHelper.windowtextcolorrole - linkColor: control.palette.link + ParseInterface{ + id: parseInterface + } - font: StylePrivate.StyleHelper.font + color: parseInterface.pStartColor(enabled ? StylePrivate.UKUILabel.normalColor : StylePrivate.UKUILabel.disableColor)//StylePrivate.UKUILable.normalColor + linkColor: parseInterface.pStartColor(StylePrivate.UKUILabel.linkColor) + + font: StylePrivate.APPParameter.font//appP.font } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/Menu.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/Menu.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/Menu.qml 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/Menu.qml 2024-12-20 09:22:49.000000000 +0800 @@ -1,16 +1,19 @@ import QtQuick 2.7 +import QtQuick.Window 2.15 import QtQuick.Layouts 1.2 import QtGraphicalEffects 1.0 -import QtQuick.Controls 2.5 +import QtQuick.Controls 2.5 as Controls import QtQuick.Templates 2.5 as T import org.ukui.qqc2style.private 1.0 as StylePrivate T.Menu { id: control - - palette: StylePrivate.StyleHelper.palette - font: StylePrivate.StyleHelper.font +// StylePrivate.APPParameter{ +// id: appP +// } + palette: StylePrivate.APPParameter.palette + font: StylePrivate.APPParameter.font implicitWidth: Math.max(background ? background.implicitWidth : 0, contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0) @@ -19,8 +22,32 @@ margins: 0 - delegate: MenuItem { onImplicitWidthChanged: control.contentItem.contentItem.childrenChanged() } + leftPadding: StylePrivate.UKUIMenu.leftRightPadding + rightPadding: StylePrivate.UKUIMenu.leftRightPadding + topPadding: StylePrivate.UKUIMenu.topBottomPadding + bottomPadding: StylePrivate.UKUIMenu.topBottomPadding + +// StylePrivate.UKUIMenu{ +// id: uMenu +// } + + + ParseInterface{ + id: parseInterface + } + + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } + delegate: MenuItem { + id: item + } contentItem: ListView { implicitHeight: contentHeight property bool hasCheckables: false @@ -30,31 +57,68 @@ implicitWidth: { var maxWidth = 0; for (var i = 0; i < contentItem.children.length; ++i) { - maxWidth = Math.max(maxWidth, contentItem.children[i].implicitWidth); + if(!(contentItem.children[i] instanceof Controls.MenuSeparator)) + maxWidth = Math.max(maxWidth, contentItem.children[i].width); + //console.log("maxwidth..... iiiii,,,", contentItem.children[i].text, contentItem.children[i], contentItem.children[i].width, contentItem.children[i].implicitWidth) } - return maxWidth; + return maxWidth + scrollbar.width; } - interactive: ApplicationWindow.window ? contentHeight > ApplicationWindow.window.height : false - clip: true + + //todo why ApplicationWindow.window is null + interactive: true//ApplicationWindow.window ? contentHeight > ApplicationWindow.window.height : false + clip: true//interactive currentIndex: control.currentIndex || 0 keyNavigationEnabled: true keyNavigationWraps: true - ScrollBar.vertical: ScrollBar {} + //Component.onCompleted: console.log("listview......", ApplicationWindow.window.height) + + ScrollBar.vertical: ScrollBar { + id: scrollbar + active: hovered || pressed + } } Connections { target: control.contentItem.contentItem - onChildrenChanged: { + function onChildrenChanged() { + var checkable = false; + var needIcon = false; for (var i in control.contentItem.contentItem.children) { var child = control.contentItem.contentItem.children[i]; if (child.checkable) { control.contentItem.hasCheckables = true; + checkable = true; } - if (child.icon && child.icon.hasOwnProperty("name") && (child.icon.name.length > 0 || child.icon.source.length > 0)) { + if (child.icon && child.icon.hasOwnProperty("name") && (child.icon.name.length > 0 || child.icon.source.toString().length > 0)) { control.contentItem.hasIcons = true; + needIcon = true; } } + if(checkable){ + for (var k in control.contentItem.contentItem.children) { + var childk = control.contentItem.contentItem.children[k]; + if(childk.hasOwnProperty("itemLeftSpace")){ + childk.itemLeftSpace = 20 + childk.leftPadding; + console.log("itemLeftSpace........", childk.text, childk.itemLeftSpace) + } + } + } + if(needIcon){ + for (var j in control.contentItem.contentItem.children) { + var childj = control.contentItem.contentItem.children[j]; + var b = childj.icon && childj.icon.hasOwnProperty("name") && (childj.icon.name.length > 0 || childj.icon.source.toString().length > 0); + if(childj.hasOwnProperty("labelLeftSpace")) + childj.labelLeftSpace = b ? 4 : 20; + } + } + var maxWidth = 0; + for (var l in control.contentItem.contentItem.children) { + maxWidth = Math.max(maxWidth, control.contentItem.contentItem.children[l].width) + } + for (var m in control.contentItem.contentItem.children) { + control.contentItem.contentItem.children[m].width = maxWidth; + } } } @@ -79,19 +143,35 @@ } background: Rectangle { - radius: 2 - - color: control.palette.window + radius: StylePrivate.UKUIMenu.radius + color: gradientRec.visible ? "transparent" : getStartColor(StylePrivate.UKUIMenu.normalBC) + border.color: getStartColor(StylePrivate.UKUIMenu.normalBorderColor) + border.width: StylePrivate.UKUIMenu.border layer.enabled: true + Rectangle{ + id: gradientRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + id:gradient + GradientStop { position: 0.0; color: getStartColor(StylePrivate.UKUIMenu.normalBC) } + + GradientStop { position: 1.0; color: getEndColor(StylePrivate.UKUIMenu.normalBC)} + } + visible: !parseInterface.isSolidPattern(StylePrivate.UKUIMenu.normalBC) + } + layer.effect: DropShadow { transparentBorder: true - radius: 8 - samples: 8 + radius: StylePrivate.UKUIMenu.radius + samples: StylePrivate.UKUIMenu.radius horizontalOffset: 0 verticalOffset: 2 - color: Qt.rgba(0, 0, 0, 0.3) + color: getStartColor(enabled ? StylePrivate.UKUIMenu.shadowNormalColor : StylePrivate.UKUIMenu.shadowDisableColor) } } } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/MenuItem.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/MenuItem.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/MenuItem.qml 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/MenuItem.qml 2024-12-20 09:22:49.000000000 +0800 @@ -8,30 +8,61 @@ T.MenuItem { id: controlRoot - palette: StylePrivate.StyleHelper.palette - font: StylePrivate.StyleHelper.font + palette: StylePrivate.APPParameter.palette + font: StylePrivate.APPParameter.font - implicitWidth: Math.max(background ? background.implicitWidth : 0, - contentItem.implicitWidth + leftPadding + rightPadding + (arrow ? arrow.implicitWidth : 0)) - implicitHeight: visible ? Math.max(background ? background.implicitHeight : 0, - Math.max(contentItem.implicitHeight, - indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding) : 0 - baselineOffset: contentItem.y + contentItem.baselineOffset - width: parent ? parent.width : implicitWidth + width: Math.max(implicitBackgroundWidth + leftInset + rightInset, + image.width + label.width + labelLeftSpace + leftPadding + rightPadding + + (controlRoot.checkable ? /*arrow.implicitWidth*/StylePrivate.UKUIMenuItem.imageWidth + StylePrivate.UKUIMenuItem.imageSpace : 0) + + (controlRoot.subMenu ? /*indicator.implicitWidth*/StylePrivate.UKUIMenuItem.imageWidth + StylePrivate.UKUIMenuItem.imageSpace : 0) + itemLeftSpace) + implicitHeight: visible ? Math.max(implicitBackgroundHeight + topInset + bottomInset, + Math.max(contentItem.height, + controlRoot.subMenu ? indicator.implicitHeight : 0) + topPadding + bottomPadding, StylePrivate.UKUIMenuItem.normalHeight) : 0 - Layout.fillWidth: true - padding: 6 + baselineOffset: contentItem.y + contentItem.baselineOffset +// Layout.fillWidth: true + padding: StylePrivate.UKUIMenuItem.topBottomPadding property int gridUnit: fontMetrics.height - property string icontype: "default" + property int labelLeftSpace: 0 + property int itemLeftSpace: (!controlRoot.checkable/* && !controlRoot.subMenu*/) ? controlRoot.leftPadding : 20 + controlRoot.leftPadding + property alias backColor: backrect.color + + property var bacDtColor: !controlRoot.enabled ? StylePrivate.UKUIMenuItem.disableBC : + controlRoot.pressed ? StylePrivate.UKUIMenuItem.clickedBC : + controlRoot.hovered ? StylePrivate.UKUIMenuItem.hoveredBC : StylePrivate.UKUIMenuItem.normalBC - - leftPadding: Math.floor(gridUnit/4)*2 - rightPadding: Math.floor(gridUnit/4)*2 + leftPadding: StylePrivate.UKUIMenuItem.leftRightPadding/* : Math.floor(gridUnit/4)*2*/ + rightPadding: StylePrivate.UKUIMenuItem.leftRightPadding// Math.floor(gridUnit/4)*2 hoverEnabled: true + +// StylePrivate.APPParameter{ +// id: appP +// } +// StylePrivate.UKUIButton{ +// id: btn +// } +// StylePrivate.UKUIMenuItem{ +// id: mItem +// } + NormalControlColor{ + id:ncColor + } + ParseInterface{ + id: parseInterface + } + + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } Shortcut { //in case of explicit & the button manages it by itself enabled: !(RegExp(/\&[^\&]/).test(controlRoot.text)) @@ -45,60 +76,121 @@ } } - contentItem: RowLayout { - Item { - Layout.preferredWidth: (controlRoot.ListView.view && controlRoot.ListView.view.hasCheckables) || controlRoot.checkable ? controlRoot.indicator.width : Math.floor(gridUnit/4) - } + contentItem:Item{ + anchors.left: controlRoot.left + anchors.leftMargin: itemLeftSpace + anchors.right: parent.right + anchors.rightMargin: controlRoot.rightPadding + Image { + id: image + source: //controlRoot.icon.source + { + if((controlRoot.icon.source.toString() === "" && controlRoot.icon.name.toString() === "")) + return controlRoot.icon.source - StylePrivate.KyIcon { - iconName: controlRoot.icon.name - width: controlRoot.icon.width - height: controlRoot.icon.height - sunken: controlRoot.pressed || (controlRoot.checkable && controlRoot.checked) - hover: controlRoot.hovered - hasFocus: controlRoot.activeFocus - icontype: controlRoot.icontype + var model = !controlRoot.enabled ? "disenable" : controlRoot.pressed ? "clicked" : controlRoot.hovered ? "hover" : "normal" + + let s = controlRoot.icon.source.toString() + return "image://imageProvider/" + s + "/" + model; + } + anchors.verticalCenter: parent.verticalCenter + width: (controlRoot.display !== AbstractButton.TextOnly && source !== "" && status != Image.Null) ? StylePrivate.UKUIMenuItem.imageWidth : 0 + visible: controlRoot.display !== AbstractButton.TextOnly && source !== "" && status != Image.Null } Label { - id: label - Layout.alignment: Qt.AlignVCenter - Layout.fillWidth: true - + id:label text: controlRoot.text - font: controlRoot.font + font:controlRoot.font + color: getStartColor(controlRoot.enabled ? StylePrivate.UKUIMenuItem.normalTextColor : StylePrivate.UKUIMenuItem.disableTextColor) + visible: controlRoot.display !== AbstractButton.IconOnly && text !== "" - elide: Text.ElideRight - visible: controlRoot.text - horizontalAlignment: Text.AlignLeft - verticalAlignment: Text.AlignVCenter - } - Label { - id: shortcut - Layout.alignment: Qt.AlignVCenter + anchors.verticalCenter: parent.verticalCenter - visible: controlRoot.action && controlRoot.action.hasOwnProperty("shortcut") && controlRoot.action.shortcut !== undefined - text: visible ? controlRoot.action.shortcut : "" - font: controlRoot.font - color: label.color - horizontalAlignment: Text.AlignRight - verticalAlignment: Text.AlignVCenter - } - Item { - Layout.preferredWidth: Math.floor(gridUnit/4) + anchors.left: image.right + anchors.leftMargin: labelLeftSpace//(image.visible && image.status !== Image.Null) ? 4 : labelLeftSpace } + + } + + indicator: Image { + x: controlRoot.mirrored ? controlRoot.width - width - controlRoot.rightPadding : controlRoot.leftPadding + y: controlRoot.topPadding + (controlRoot.availableHeight - height) / 2 + + visible: controlRoot.checked + source: controlRoot.checkable ? "image://imageProvider/object-select-symbolic" : "" + + width: StylePrivate.UKUIMenuItem.imageWidth + height: StylePrivate.UKUIMenuItem.imageWidth } - background: Item { - anchors.fill: parent - implicitWidth: gridUnit * 8 + arrow: Image { + x: controlRoot.mirrored ? controlRoot.leftPadding : controlRoot.width - width - controlRoot.rightPadding + anchors.verticalCenter: parent.verticalCenter + width: StylePrivate.UKUIMenuItem.imageWidth + height: StylePrivate.UKUIMenuItem.imageWidth + + visible: controlRoot.subMenu + mirror: controlRoot.mirrored + source: controlRoot.subMenu ? "image://imageProvider/ukui-end-symbolic" : "" + } + background: Rectangle { + id: backrect + width: controlRoot.width + height: controlRoot.height + radius: StylePrivate.UKUIMenuItem.radius + //opacity: (controlRoot.highlighted || controlRoot.hovered || controlRoot.pressed || controlRoot.checked) ? 1 : 0 + border.width: 1 + + Rectangle{ + id: gradientRec anchors.fill: parent - opacity: (controlRoot.highlighted || controlRoot.hovered) ? 1 : 0 + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + id:gradient + GradientStop { position: 0.0; color: getStartColor(bacDtColor) } - color: controlRoot.palette.highlight + GradientStop { position: 1.0; color: getEndColor(bacDtColor)} + } + visible: !parseInterface.isSolidPattern(bacDtColor) } } + + onPressedChanged: { + stateChange() + } + onHoveredChanged: { + stateChange() + + } + Component.onCompleted: { + stateChange() + } + + function stateChange() + { + //controlColor = !enable ? StylePrivate.UKUIButton.disableHBC : click ? StylePrivate.UKUIButton.clickedHBC : hover ? StylePrivate.UKUIButton.hoveredHBC : StylePrivate.UKUIButton.normalHBC + + backColor = gradientRec.visible ? "transparent" : getStartColor(bacDtColor); + + backrect.border.color = getStartColor(!controlRoot.enabled ? StylePrivate.UKUIMenuItem.disableBorderColor : + controlRoot.pressed ? StylePrivate.UKUIMenuItem.clickBorderColor : + controlRoot.hovered ? StylePrivate.UKUIMenuItem.hoverBorderColor : StylePrivate.UKUIMenuItem.normalBorderColor); + } +// onVisibleChanged: { +// if(visible){ +// var backWidth = implicitBackgroundWidth + leftInset + rightInset; +// var itemWidth = iconLabel.width + leftPadding + rightPadding + +// (arrow.visible ? arrow.implicitWidth : 0) + +// (indicator.visible ? indicator.implicitWidth : 0) +// width = Math.max(backWidth, itemWidth) +// console.log("menuitem visible..........", controlRoot.text, width, backWidth, itemWidth, iconLabel.width, implicitBackgroundWidth) + +// } +// } property variant fontMetrics: TextMetrics { text: "M" function roundedIconSize(size) { diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/Popup.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/Popup.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/Popup.qml 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/Popup.qml 2024-12-20 09:22:49.000000000 +0800 @@ -7,8 +7,8 @@ T.Popup { id: control - palette: StylePrivate.StyleHelper.palette - font: StylePrivate.StyleHelper.font + palette: StylePrivate.APPParameter.palette + font: StylePrivate.APPParameter.font implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0) @@ -18,8 +18,27 @@ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) - padding: 12 - clip: true + padding: StylePrivate.UKUIPopup.padding + clip: false + +// StylePrivate.APPParameter{ +// id: appP +// } +// StylePrivate.UKUIPopup{ +// id: popup +// } +// ParseInterface{ +// id: parseInterface +// } + +// function getStartColor(dtcolor) +// { +// return parseInterface.pStartColor(dtcolor) +// } +// function getEndColor(dtcolor) +// { +// return parseInterface.pEndColor(dtcolor) +// } enter: Transition { NumberAnimation { @@ -44,18 +63,36 @@ contentItem: Item { } background: Rectangle { - radius: 2 - color: control.palette.window - border.color: control.palette.dark + radius: StylePrivate.UKUIPopup.radius + color: gradientRec.visible ? "transparent" : StylePrivate.ParseDTColor.startColor(StylePrivate.UKUIPopup.backColor) + border.color: StylePrivate.ParseDTColor.startColor(StylePrivate.UKUIPopup.backBorderColor) layer.enabled: true + Rectangle{ + id: gradientRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + id:gradient + GradientStop { position: 0.0; color: StylePrivate.ParseDTColor.startColor(StylePrivate.UKUIPopup.backColor) } + + GradientStop { position: 1.0; color: StylePrivate.ParseDTColor.endColor(StylePrivate.UKUIPopup.backColor)} + } + visible: !StylePrivate.ParseDTColor.isSolidPattern(StylePrivate.UKUIPopup.backColor) + } + + layer.effect: DropShadow { transparentBorder: true - radius: 8 + radius: StylePrivate.UKUIPopup.radius samples: 16 - horizontalOffset: 0 - verticalOffset: 4 - color: Qt.rgba(0, 0, 0, 0.3) + horizontalOffset: -4 + verticalOffset: -4 + width: background.width + 8 + height: background.height + 8 + color: StylePrivate.ParseDTColor.startColor(StylePrivate.UKUIPopup.shadowColor) } } } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/ProgressBar.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/ProgressBar.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/ProgressBar.qml 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/ProgressBar.qml 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,130 @@ +import QtQuick 2.12 +import QtQuick.Templates 2.12 as T +import QtQuick.Controls 2.12 +import QtQuick.Controls.impl 2.12 +import org.ukui.qqc2style.private 1.0 as StylePrivate + +T.ProgressBar { + id: control + + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + implicitContentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding) + + ParseInterface{ + id: parseInterface + } + + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } + + background: Rectangle { + radius: StylePrivate.UKUIProgressBar.radius + implicitWidth: StylePrivate.UKUIProgressBar.normalWidth + implicitHeight: StylePrivate.UKUIProgressBar.normalHeight + + height: StylePrivate.UKUIProgressBar.normalHeight + + color: gradientRec.visible ? "transparent" : getStartColor(StylePrivate.UKUIProgressBar.normalColor) + border.width: StylePrivate.UKUIProgressBar.borderWidth + border.color: getStartColor(StylePrivate.UKUIProgressBar.borderColor) + + Rectangle{ + id: gradientRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + GradientStop { position: 0.0; color: getStartColor(StylePrivate.UKUIProgressBar.normalColor) } + + GradientStop { position: 1.0; color: getEndColor(StylePrivate.UKUIProgressBar.normalColor)} + } + visible: !parseInterface.isSolidPattern(StylePrivate.UKUIProgressBar.normalColor) + } + + + } + + contentItem: Item{ + implicitHeight: background.height + implicitWidth: background.width + Rectangle { + x: !control.mirrored ? 0 : (control.width * (1.0 - control.position)) + implicitHeight: StylePrivate.UKUIProgressBar.normalHeight + implicitWidth: control.width * control.position + visible: !control.indeterminate + //indeterminate: control.visible && control.indeterminate + color: gradientItem.visible ? "transparent" : getStartColor(StylePrivate.UKUIProgressBar.childrenColor) + radius: StylePrivate.UKUIProgressBar.radius + + Rectangle{ + id: gradientItem + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + GradientStop { position: 0.0; color: getStartColor(StylePrivate.UKUIProgressBar.childrenColor) } + + GradientStop { position: 1.0; color: getEndColor(StylePrivate.UKUIProgressBar.childrenColor)} + } + visible: !parseInterface.isSolidPattern(StylePrivate.UKUIProgressBar.childrenColor) + } + } + Label{ + visible: !control.indeterminate + anchors.centerIn: parent + text: (control.position * 100).toString() + "%" + } + Rectangle { + id:rec + implicitHeight: StylePrivate.UKUIProgressBar.normalHeight + implicitWidth: StylePrivate.UKUIProgressBar.indeterminateChildrenWidth + visible: control.indeterminate + //indeterminate: control.visible && control.indeterminate + color: gradientInterminate.visible ? "transparent" : getStartColor(StylePrivate.UKUIProgressBar.childrenColor) + radius: StylePrivate.UKUIProgressBar.radius + + Rectangle{ + id: gradientInterminate + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + GradientStop { position: 0.0; color: getStartColor(StylePrivate.UKUIProgressBar.childrenColor) } + + GradientStop { position: 1.0; color: getEndColor(StylePrivate.UKUIProgressBar.childrenColor)} + } + visible: !parseInterface.isSolidPattern(StylePrivate.UKUIProgressBar.childrenColor) + } + } + + Timer { + id: slideTimer + interval: 1 + running: control.indeterminate + repeat: true + onTriggered: { + slideAnimation.start() + } + } + + PropertyAnimation { + id: slideAnimation + target: rec + property: "x" + to: rec.x + rec.width >= control.width ? 0 : control.width - rec.width + duration: 500 + control.width + easing.type: Easing.InOutQuad + } + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/RadioButton.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/RadioButton.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/RadioButton.qml 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/RadioButton.qml 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,114 @@ + +import QtQuick 2.6 +import QtQuick.Templates 2.5 as T +import org.ukui.qqc2style.private 1.0 as StylePrivate + + +T.RadioButton { + id: control + + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + implicitContentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding, + implicitIndicatorHeight + topPadding + bottomPadding) + + property alias indicatorColor: indicatorRec.color + property alias childrenColor: childrenRec.color + + property var borderColor: control.checked ? (!control.enabled ? StylePrivate.UKUIRadioButton.checked_disableIndicatorBorderColor : + control.pressed ? StylePrivate.UKUIRadioButton.checked_clickIndicatorBorderColor : control.hovered ? + StylePrivate.UKUIRadioButton.checked_hoverIndicatorBorderColor : StylePrivate.UKUIRadioButton.checked_normalIndicatorBorderColor) : + (!control.enabled ? StylePrivate.UKUIRadioButton.disableIndicatorBorderColor : control.pressed ? + StylePrivate.UKUIRadioButton.clickIndicatorBorderColor : control.hovered ? + StylePrivate.UKUIRadioButton.hoverIndicatorBorderColor : StylePrivate.UKUIRadioButton.normalIndicatorBorderColor) + + property var backColor: control.checked ? (!control.enabled ? StylePrivate.UKUIRadioButton.checked_disableIndicatorColor : + control.pressed ? StylePrivate.UKUIRadioButton.checked_clickIndicatorColor : control.hovered ? + StylePrivate.UKUIRadioButton.checked_hoverIndicatorColor : StylePrivate.UKUIRadioButton.checked_normalIndicatorColor) : + (!control.enabled ? StylePrivate.UKUIRadioButton.disableIndicatorColor : control.pressed ? + StylePrivate.UKUIRadioButton.clickIndicatorColor : control.hovered ? + StylePrivate.UKUIRadioButton.hoverIndicatorColor : StylePrivate.UKUIRadioButton.normalIndicatorColor) + + property var childrenDtColor: !control.enabled ? StylePrivate.UKUIRadioButton.checked_disableChildrenColor : + control.pressed ? StylePrivate.UKUIRadioButton.checked_clickChildrenColor: + control.hovered ? StylePrivate.UKUIRadioButton.checked_hoverChildrenColor: + StylePrivate.UKUIRadioButton.checked_normalChildrenColor + + ParseInterface{ + id: parseInterface + } + + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } + + padding: 6 + spacing: StylePrivate.UKUIRadioButton.space + + // keep in sync with RadioDelegate.qml (shared RadioIndicator.qml was removed for performance reasons) + indicator: Rectangle { + id: indicatorRec + implicitWidth: StylePrivate.UKUIRadioButton.indicatorWidth + implicitHeight: implicitWidth + + x: control.text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2 + y: control.topPadding + (control.availableHeight - height) / 2 + + radius: width / 2 + border.width: StylePrivate.UKUIRadioButton.borderWidth + border.color: getStartColor(borderColor) + color: gradientRec.visible ? "transparent" : getStartColor(backColor) + Rectangle{ + id: gradientRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + GradientStop { position: 0.0; color: getStartColor(backColor) } + + GradientStop { position: 1.0; color: getEndColor(backColor)} + } + visible: !parseInterface.isSolidPattern(backColor) + } + + Rectangle { + id:childrenRec + width: StylePrivate.UKUIRadioButton.childrenWidth + height: width + anchors.centerIn: parent + radius: width / 2 + color: gradientChildrenRec.visible ? "transparent" : getStartColor(childrenDtColor) + visible: control.checked + + Rectangle{ + id: gradientChildrenRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + GradientStop { position: 0.0; color: getStartColor(childrenDtColor) } + + GradientStop { position: 1.0; color: getEndColor(childrenDtColor)} + } + visible: !parseInterface.isSolidPattern(childrenDtColor) + } + } + } + + contentItem: Label { + leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0 + rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0 + + text: control.text + font: StylePrivate.APPParameter.font + color: getStartColor(control.enabled ? StylePrivate.UKUIRadioButton.normalTextColor : StylePrivate.UKUIRadioButton.disableTextColor) + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/RoundButton.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/RoundButton.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/RoundButton.qml 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/RoundButton.qml 2024-12-20 09:22:49.000000000 +0800 @@ -3,41 +3,42 @@ import QtQuick.Templates 2.5 as T import org.ukui.qqc2style.private 1.0 as StylePrivate + T.RoundButton { id: controlRoot - palette: StylePrivate.StyleHelper.palette + implicitWidth: { + var contentwidth = implicitContentWidth + leftPadding + rightPadding + return Math.max(implicitBackgroundWidth + leftInset + rightInset, + contentwidth) + } + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding) - /* The value type of buttonType are "CloseButton","MaxButton","MinButton","blueButton","Default". */ - StylePrivate.StyleHelper.buttonType: "Default" + leftPadding: StylePrivate.UKUIButton.margin + rightPadding: StylePrivate.UKUIButton.margin + hoverEnabled: true //Qt.styleHints.useHoverEffects TODO: how to make this work in 5.7? - implicitWidth: background.implicitWidth - implicitHeight: background.implicitHeight - hoverEnabled: true //Qt.styleHints.useHoverEffects TODO: how to make this work in 5.7? + font: StylePrivate.APPParameter.font - contentItem: Item {} + NormalControlColor{ + id:ncColor + } - background: StylePrivate.StyleItem { - id: styleitem - anchors.fill: parent - buttonType: controlRoot.StylePrivate.StyleHelper.buttonType - control: controlRoot - elementType: "button" - roundButton:"RoundButton" - sunken: controlRoot.pressed || (controlRoot.checkable && controlRoot.checked) - raised: !(controlRoot.pressed || (controlRoot.checkable && controlRoot.checked)) - hover: controlRoot.hovered - text: controlRoot.text - hasFocus: controlRoot.activeFocus - activeControl: controlRoot.isDefault ? "default" : "f" - properties: { - "icon": controlRoot.icon && controlRoot.display !== T.AbstractButton.TextOnly ? (controlRoot.icon.name || controlRoot.icon.source) : "", - "iconWidth": controlRoot.icon && controlRoot.icon.width ? controlRoot.icon.width : 0, - "iconHeight": controlRoot.icon && controlRoot.icon.height ? controlRoot.icon.height : 0, - "flat": controlRoot.flat - } +// StylePrivate.UKUIButton{ +// id: btn +// } +// StylePrivate.APPParameter{ +// id: appP +// } + contentItem: IconLabelContent { + controlRoot: controlRoot + anchors.centerIn: controlRoot + onWidthChanged: console.log(controlRoot.text, width) + } + background: BackGroundRectangle{ + controlRoot: controlRoot + _radius: controlRoot.height/2 } } - - diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/ScrollBar.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/ScrollBar.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/ScrollBar.qml 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/ScrollBar.qml 2024-12-20 09:22:49.000000000 +0800 @@ -8,8 +8,8 @@ T.ScrollBar { id: control - palette: StylePrivate.StyleHelper.palette - font: StylePrivate.StyleHelper.font + palette: StylePrivate.APPParameter.palette + font: StylePrivate.APPParameter.font implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, @@ -19,36 +19,66 @@ hoverEnabled: true + padding: StylePrivate.UKUIScrollBar.padding + visible: control.policy !== ScrollBar.AlwaysOff +// StylePrivate.APPParameter{ +// id: appP +// } + +// StylePrivate.UKUIScrollBar{ +// id: scrollbar +// } + + property var itemColor: !control.enabled ? StylePrivate.UKUIScrollBar.disableColor : control.pressed ? StylePrivate.UKUIScrollBar.clickColor : + control.hovered ? StylePrivate.UKUIScrollBar.hoverColor : StylePrivate.UKUIScrollBar.normalColor + ParseInterface{ + id: parseInterface + } - padding: 2 - visible: control.policy !== T.ScrollBar.AlwaysOff - - + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } contentItem: Rectangle { - implicitWidth: control.interactive ? 6 : 2 - implicitHeight: control.interactive ? 6 : 2 + implicitWidth: control.interactive ? 4 : 2 + implicitHeight: control.interactive ? 4 : 2 radius: width / 2 - color: control.palette.shadow + color: gradientRec.visible ? "transparent" : getStartColor(itemColor) - opacity: 0.3 + Rectangle{ + id: gradientRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + GradientStop { position: 0.0; color: getStartColor(itemColor) } + GradientStop { position: 1.0; color: getEndColor(itemColor)} + } + visible: !parseInterface.isSolidPattern(itemColor) + } states: State { name: "active" - when: control.policy === T.ScrollBar.AlwaysOn || (control.active && control.size < 1.0) - PropertyChanges { target: control.contentItem; implicitWidth:8.5; implicitHeight:8.5; opacity:0.5} + when: control.policy === ScrollBar.AlwaysOn || (control.active && control.size < 1.0) + PropertyChanges { target: control.contentItem; implicitWidth:8; implicitHeight:8} } - transitions: Transition { - from: "active" - SequentialAnimation { - PauseAnimation { duration: 200 } - NumberAnimation { target: control.contentItem; duration: 80; property: "opacity"; to: 0.3} - } - } +// transitions: Transition { +// from: "active" +// SequentialAnimation { +// PauseAnimation { duration: 200 } +// NumberAnimation { target: control.contentItem; duration: 80; property: "opacity"; to: 0.3} +// } +// } } } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/ScrollView.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/ScrollView.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/ScrollView.qml 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/ScrollView.qml 2024-12-20 09:22:49.000000000 +0800 @@ -8,14 +8,16 @@ T.ScrollView { id: controlRoot - palette: StylePrivate.StyleHelper.palette - font: StylePrivate.StyleHelper.font + palette: appP.palette + font: appP.font implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, contentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, contentHeight + topPadding + bottomPadding) - + StylePrivate.APPParameter{ + id: appP + } ScrollBar.vertical: ScrollBar { parent: controlRoot diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/Slider.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/Slider.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/Slider.qml 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/Slider.qml 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,158 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import QtQuick.Controls.impl 2.12 +import QtQuick.Templates 2.12 as T +import org.ukui.qqc2style.private 1.0 as StylePrivate + +T.Slider { + id: control + + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + implicitHandleWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitHandleHeight + topPadding + bottomPadding) + + padding: 6 + + hoverEnabled: true + + property var handleColor: !control.enabled ? StylePrivate.UKUISlider.disableHandleColor : handleClick ? StylePrivate.UKUISlider.clickHandleColor : + handleHover ?StylePrivate.UKUISlider.hoverHandleColor : StylePrivate.UKUISlider.normalHandleColor + property var handleBorderColor: !control.enabled ? StylePrivate.UKUISlider.disableHandleBorderColor : handleClick ? StylePrivate.UKUISlider.clickHandleBorderColor : + handleHover ? StylePrivate.UKUISlider.hoverHandleBorderColor : StylePrivate.UKUISlider.normalHandleBorderColor + + property bool handleClick: false + property bool handleHover: false + ParseInterface{ + id: parseInterface + } + + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } + + handle: Rectangle { + id: handleRec + x: control.leftPadding + (control.horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2) + y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height)) + implicitWidth: StylePrivate.UKUISlider.handleHeight + implicitHeight: StylePrivate.UKUISlider.handleHeight + radius: width / 2 + color: gradientHandleRec.visible ? "transparent" : getStartColor(handleColor) + border.width: StylePrivate.UKUISlider.handleBorderWidth + border.color: getStartColor(handleBorderColor) + + + + Rectangle{ + id: gradientHandleRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + GradientStop { position: 0.0; color: getStartColor(handleBorderColor) } + + GradientStop { position: 1.0; color: getEndColor(handleBorderColor)} + } + visible: !parseInterface.isSolidPattern(handleBorderColor) + } + + MouseArea{ + id: mouseArea + anchors.fill: parent + hoverEnabled: true + onPressed: handleClick = true + onReleased: handleClick = false + onEntered: handleHover = true + onExited: handleHover = false + + } + } + + background: Item{ + id: item + +// x: control.leftPadding + (control.horizontal ? 0 : (control.availableWidth - width) / 2) +// y: control.topPadding + (control.horizontal ? (control.availableHeight - height) / 2 : 0) + implicitWidth: control.horizontal ? (StylePrivate.UKUISlider.normalWidth + handle.width) : StylePrivate.UKUISlider.normalHeight + implicitHeight: control.horizontal ? StylePrivate.UKUISlider.normalHeight : (StylePrivate.UKUISlider.normalWidth + handle.height) + + Rectangle { + width: item.width + height: item.height + border.color: getStartColor(StylePrivate.UKUISlider.focusBorderColor) + border.width: control.activeFocus ? StylePrivate.UKUISlider.focusBorderWidth : 0 + scale: control.horizontal && control.mirrored ? -1 : 1 + + Rectangle{ + id: unGroove + x: (control.horizontal ? handle.width / 2 : ((item.width - width) / 2)) + y:(control.horizontal ? ((item.height - height) / 2) : handle.height / 2) + width: control.horizontal ? (item.width - handle.width) : StylePrivate.UKUISlider.grooveHeight + height: control.horizontal ? StylePrivate.UKUISlider.grooveHeight : (item.height - handle.height) + radius: control.horizontal ? height/2 : width/2 + border.width: StylePrivate.UKUISlider.grooveBorderWidth + border.color: getStartColor(!control.enabled ? StylePrivate.UKUISlider.disableUnGrooveBorderColor : StylePrivate.UKUISlider.normalUnGrooveBorderColor) + color: gradientUNGrooveRec.visible ? "transparent" : getStartColor(!control.enabled ? StylePrivate.UKUISlider.disableUnGrooveColor : StylePrivate.UKUISlider.normalUnGrooveColor) + + Rectangle{ + id: gradientUNGrooveRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + GradientStop { position: 0.0; color: getStartColor(!control.enabled ? StylePrivate.UKUISlider.disableUnGrooveColor : StylePrivate.UKUISlider.normalUnGrooveColor) } + + GradientStop { position: 1.0; color: getEndColor(!control.enabled ? StylePrivate.UKUISlider.disableUnGrooveColor : StylePrivate.UKUISlider.normalUnGrooveColor)} + } + visible: !parseInterface.isSolidPattern(!control.enabled ? StylePrivate.UKUISlider.disableUnGrooveColor : StylePrivate.UKUISlider.normalUnGrooveColor) + } + } + + Rectangle{ + id:groove + x: (control.horizontal ? handle.width / 2 : ((item.width - width) / 2)) + y: (control.horizontal ? ((item.height - height) / 2) : handle.height / 2) + width: control.horizontal ? control.position * unGroove.width : StylePrivate.UKUISlider.grooveHeight + height: control.horizontal ? StylePrivate.UKUISlider.grooveHeight : control.position * unGroove.height + radius: StylePrivate.UKUISlider.grooveHeight / 2 + border.width: StylePrivate.UKUISlider.grooveBorderWidth + border.color: getStartColor(!control.enabled ? StylePrivate.UKUISlider.disableGrooveBorderColor : StylePrivate.UKUISlider.normalGrooveBorderColor) + color: gradientGrooveRec.visible ? "transparent" : getStartColor(!control.enabled ? StylePrivate.UKUISlider.disableGrooveColor : StylePrivate.UKUISlider.normalGrooveColor) + Rectangle{ + id: gradientGrooveRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + GradientStop { position: 0.0; color: getStartColor(!control.enabled ? StylePrivate.UKUISlider.disableGrooveColor : StylePrivate.UKUISlider.normalGrooveColor) } + + GradientStop { position: 1.0; color: getEndColor(!control.enabled ? StylePrivate.UKUISlider.disableGrooveColor : StylePrivate.UKUISlider.normalGrooveColor)} + } + visible: !parseInterface.isSolidPattern(!control.enabled ? StylePrivate.UKUISlider.disableGrooveColor : StylePrivate.UKUISlider.normalGrooveColor) + } + } + +// Rectangle { +// id: handle +// x: control.horizontal ? (control.position * control.width - width/2) : ((item.width - width) / 2) +// y: control.horizontal ? ((item.height - height) / 2) : (control.position * parent.height - height/2) +// width: StylePrivate.UKUISlider.grooveHeight +// height: StylePrivate.UKUISlider.grooveHeight + +// radius: StylePrivate.UKUISlider.grooveHeight / 2 +// color: !control.enabled ? StylePrivate.UKUISlider.disableHandleColor : StylePrivate.UKUISlider.normalHandleColor +// border.width: StylePrivate.UKUISlider.handleBorderWidth +// border.color: !control.enabled ? StylePrivate.UKUISlider.disableHandleBorderColor : StylePrivate.UKUISlider.normalHandleBorderColor +// } + } + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/SpinBox.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/SpinBox.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/SpinBox.qml 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/SpinBox.qml 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,157 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import QtQuick.Controls.impl 2.12 +import QtQuick.Templates 2.12 as T +import org.ukui.qqc2style.private 1.0 as StylePrivate + +T.SpinBox { + id: control + hoverEnabled: true + + implicitWidth: implicitBackgroundWidth + leftInset + rightInset//Math.max(implicitBackgroundWidth + leftInset + rightInset, + // contentItem.implicitWidth + 2 * padding + + // up.implicitIndicatorWidth) + implicitHeight: Math.max(implicitContentHeight + topPadding + bottomPadding, + implicitBackgroundHeight, + up.implicitIndicatorHeight + down.implicitIndicatorHeight) + + padding: StylePrivate.UKUISpinBox.padding +// leftPadding: padding + (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0)) + rightPadding: padding + (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0)) + + font: StylePrivate.APPParameter.font + + property bool upHover: control.up.hovered + property bool upClick: control.up.pressed + property bool downHover: control.down.hovered + property bool downClick: control.down.pressed + property var backColor: !control.enabled ? StylePrivate.UKUISpinBox.disableColor : control.activeFocus ? StylePrivate.UKUISpinBox.focusColor : + control.hovered ? StylePrivate.UKUISpinBox.hoverColor : StylePrivate.UKUISpinBox.normalColor + + property var backBorderColor: !control.enabled ? StylePrivate.UKUISpinBox.disableBorderColor : control.activeFocus ? StylePrivate.UKUISpinBox.focusBorderColor : + control.hovered ? StylePrivate.UKUISpinBox.hoverBorderColor : StylePrivate.UKUISpinBox.normalBorderColor + + ParseInterface{ + id: parseInterface + } + + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } + onUpHoverChanged:{ + upRadiusRec.canvas.requestPaint(); + } + onUpClickChanged:{ + upRadiusRec.canvas.requestPaint(); + } + onDownHoverChanged:{ + downRadiusRec.canvas.requestPaint(); + } + onDownClickChanged:{ + downRadiusRec.canvas.requestPaint(); + } + + validator: IntValidator { + locale: control.locale.name + bottom: Math.min(control.from, control.to) + top: Math.max(control.from, control.to) + } + + contentItem: TextInput { + id:textInput + z: 2 + text: control.displayText + font: control.font + color: getStartColor(!control.enabled ? StylePrivate.UKUISpinBox.disableTextColor : StylePrivate.UKUISpinBox.normalTextColor) + selectionColor: control.palette.highlight + selectedTextColor: control.palette.highlightedText + horizontalAlignment: Qt.AlignLeft + verticalAlignment: Qt.AlignVCenter + + readOnly: !control.editable + validator: control.validator + inputMethodHints: control.inputMethodHints + } + + up.indicator: RadiusRectangle { + id:upRadiusRec + z:3 + implicitWidth: StylePrivate.UKUISpinBox.btnNormalWidth + implicitHeight: StylePrivate.UKUISpinBox.btnNormalHeight + anchors.right: control.right + anchors.top: parent.top + + leftTopRadius: StylePrivate.UKUISpinBox.radius + rightTopRadius: StylePrivate.UKUISpinBox.radius + leftBottomRadius: 0 + rightBottomRadius: 0 + backColor: !control.enabled ? StylePrivate.UKUISpinBox.btnDisableColor : control.up.pressed ? StylePrivate.UKUISpinBox.btnClickColor : + control.up.hovered ? StylePrivate.UKUISpinBox.btnHoverColor : StylePrivate.UKUISpinBox.btnNormalColor + borderColor: !control.enabled ? StylePrivate.UKUISpinBox.btnDisableBorderColor : upClick ? StylePrivate.UKUISpinBox.btnClickBorderColor : + upHover ? StylePrivate.UKUISpinBox.btnHoverBorderColor : StylePrivate.UKUISpinBox.btnNormalBorderColor + borderWidth: StylePrivate.UKUISpinBox.btnBorderWidth + Image { + anchors.centerIn: parent + source: { + var model = !control.enabled ? "disenable" : control.checked ? "clicked" : "normal" + return "image://imageProvider/" + "ukui-up-symbolic" + "/" + model; + } + } + } + + down.indicator: RadiusRectangle { + id: downRadiusRec + z:3 + implicitWidth: StylePrivate.UKUISpinBox.btnNormalWidth + implicitHeight: StylePrivate.UKUISpinBox.btnNormalHeight + + anchors.right: control.right + anchors.bottom: parent.bottom + leftTopRadius: 0 + rightTopRadius: 0 + leftBottomRadius: StylePrivate.UKUISpinBox.radius + rightBottomRadius: StylePrivate.UKUISpinBox.radius + + backColor: !control.enabled ? StylePrivate.UKUISpinBox.btnDisableColor : control.down.pressed ? StylePrivate.UKUISpinBox.btnClickColor : + control.down.hovered ? StylePrivate.UKUISpinBox.btnHoverColor : StylePrivate.UKUISpinBox.btnNormalColor + borderColor: !control.enabled ? StylePrivate.UKUISpinBox.btnDisableBorderColor : downClick ? StylePrivate.UKUISpinBox.btnClickBorderColor : + downHover ? StylePrivate.UKUISpinBox.btnHoverBorderColor : StylePrivate.UKUISpinBox.btnNormalBorderColor + borderWidth: StylePrivate.UKUISpinBox.btnBorderWidth + + + Image { + anchors.centerIn: parent + source: { + var model = !control.enabled ? "disenable" : control.checked ? "clicked" : "normal" + return "image://imageProvider/" + "ukui-down-symbolic" + "/" + model; + } + } + } + + background: Rectangle { + implicitWidth: StylePrivate.UKUISpinBox.normalWidth + implicitHeight: StylePrivate.UKUISpinBox.normalHeight + radius: StylePrivate.UKUISpinBox.radius + border.width: control.activeFocus ? StylePrivate.UKUISpinBox.focusBorderWidth : StylePrivate.UKUISpinBox.normalBorderWidth + color: gradientRec.visible ? "transparent" : getStartColor(backColor) + border.color: getStartColor(backBorderColor) + Rectangle{ + id: gradientRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + GradientStop { position: 0.0; color: getStartColor(backColor) } + + GradientStop { position: 1.0; color: getEndColor(backColor)} + } + visible: !parseInterface.isSolidPattern(backColor) + } + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/TabBar.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/TabBar.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/TabBar.qml 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/TabBar.qml 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,62 @@ +import QtQuick 2.12 +import QtQuick.Templates 2.12 as T +import org.ukui.qqc2style.private 1.0 as StylePrivate + +T.TabBar { + id: control + + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + contentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + contentHeight + topPadding + bottomPadding) + + spacing: 1 + ParseInterface{ + id: parseInterface + } + + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } + contentItem: ListView { + model: control.contentModel + currentIndex: control.currentIndex + + spacing: control.spacing + orientation: ListView.Horizontal + boundsBehavior: Flickable.StopAtBounds + flickableDirection: Flickable.AutoFlickIfNeeded + snapMode: ListView.SnapToItem + +// highlightMoveDuration: 0 +// highlightRangeMode: ListView.ApplyRange +// preferredHighlightBegin: 40 +// preferredHighlightEnd: width - 40 + } + + background: Rectangle { + id: back + implicitHeight: contentHeight + implicitWidth: contentWidth + //anchors.fill: control + color: gradientRec.visible ? "transparent" : getStartColor(StylePrivate.UKUITabBar.normalColor) + Rectangle{ + id: gradientRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + GradientStop { position: 0.0; color: getStartColor(StylePrivate.UKUITabBar.normalColor)} + + GradientStop { position: 1.0; color: getEndColor(StylePrivate.UKUITabBar.normalColor)} + } + visible: !parseInterface.isSolidPattern(StylePrivate.UKUITabBar.normalColor) + } + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/TabButton.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/TabButton.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/TabButton.qml 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/TabButton.qml 2024-12-20 09:22:49.000000000 +0800 @@ -7,52 +7,120 @@ T.TabButton { id: controlRoot - palette: StylePrivate.StyleHelper.palette - font: StylePrivate.StyleHelper.font - - //Some qstyles like fusion don't have correct pixel metrics here and just return 0 - implicitWidth: Math.max(styleitem.implicitWidth, textMetrics.width + textMetrics.height * 2) - implicitHeight: styleitem.implicitHeight || textMetrics.height * 2 - baselineOffset: contentItem.y + contentItem.baselineOffset + implicitWidth: { + var contentwidth = implicitContentWidth + leftPadding + rightPadding + return Math.max(implicitBackgroundWidth + leftInset + rightInset, + contentwidth) + } + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding) - //This width: is important to make the tabbar internals not assume - //all tabs have the same width - width: implicitWidth - padding: 0 +// leftPadding: btn.margin +// rightPadding: btn.margin - hoverEnabled: true + hoverEnabled: true //Qt.styleHints.useHoverEffects TODO: how to make this work in 5.7? - contentItem: Item {} + font: StylePrivate.APPParameter.font - background: StylePrivate.StyleItem { - id: styleitem + property var borderColor: controlRoot.checked ? StylePrivate.UKUITabButton.checkedBorderColor : controlRoot.pressed ? + StylePrivate.UKUITabButton.clickBorderColor : controlRoot.hovered ? + StylePrivate.UKUITabButton.hoverBorderColor : StylePrivate.UKUITabButton.normalBorderColor - TextMetrics { - id: textMetrics + property var backColor: controlRoot.checked ? StylePrivate.UKUITabButton.checkedColor : controlRoot.pressed ? + StylePrivate.UKUITabButton.clickedColor : controlRoot.hovered ? + StylePrivate.UKUITabButton.hoverColor : StylePrivate.UKUITabButton.normalColor + // property var backcolor: checked ? "blue" : pressed ? "green" : hovered ? "red" : "yellow" - text: controlRoot.text - } + ParseInterface{ + id: parseInterface + } - control: controlRoot - anchors.fill: parent - elementType: "tab" - paintMargins: 0 - - properties: { - "hasFrame" : true, - "icon": control.icon ? (control.icon.name || control.icon.source) : "", - "iconWidth": controlRoot.icon && controlRoot.icon.width ? controlRoot.icon.width : 0, - "iconHeight": controlRoot.icon && controlRoot.icon.height ? controlRoot.icon.height : 0, - "flat": controlRoot.flat + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } + contentItem: IconLabelContent { + controlRoot: controlRoot + anchors.centerIn: controlRoot + layout: "left" + leftSpace: 10 + labelColor: StylePrivate.UKUITabButton.normalTextColor +// onWidthChanged: console.log(controlRoot.text, width) + } + background: Canvas{ + id: canvas + width: controlRoot.width + height: controlRoot.height + onPaint: { + var radius = controlRoot.checked ? 8 : 0; + var ctx = getContext("2d"); + ctx.reset(); // 重置画布状态 + var gradient = ctx.createLinearGradient(canvas.x, canvas.y, canvas.width, canvas.height) + + gradient.addColorStop(0, getStartColor(backColor)); + gradient.addColorStop(1, getEndColor(backColor)); + ctx.fillStyle = gradient; + + ctx.beginPath(); + if(controlRoot.checked || controlRoot.pressed){ + // 绘制第一段圆弧路径 + ctx.arc(x + radius, y + radius, radius, Math.PI, Math.PI * 3 / 2); + // 绘制第一段直线路径 + ctx.lineTo(width - radius + x, y); + // 绘制第二段圆弧路径 + ctx.arc(width - radius + x, radius + y, radius, Math.PI * 3 / 2, Math.PI * 2); + // 绘制第二段直线路径 + ctx.lineTo(width + x, height + y); + // 绘制第三段直线路径 + ctx.lineTo(x, height + y); + // 绘制第四段直线路径 + ctx.lineTo(x, y + radius); + } + else{ +// // 绘制第一段圆弧路径 +// ctx.arc(x + radius, y + radius, radius, Math.PI, Math.PI * 3 / 2); + // 绘制第一段直线路径 + ctx.moveTo(x, y); + // 绘制第二段直线路径 + ctx.lineTo(x + width, y); + ctx.lineTo(x + width, y + height); + ctx.lineTo(x, y + height); + ctx.lineTo(x, y); + +// // 绘制第二段圆弧路径 +// ctx.arc(width - radius + x, radius + y, radius, Math.PI * 3 / 2, Math.PI * 2); +// // 绘制第三段直线路径 +// ctx.lineTo(width + x, y); +// // 绘制第四段直线路径 +// ctx.lineTo(width + x - radius, y); + + + } + ctx.closePath(); + + ctx.fill(); + + if(getStartColor(borderColor).alpha >= 0.0){ + ctx.lineWidth = StylePrivate.UKUITabButton.borderWidth; + ctx.strokenStyle = getStartColor(borderColor); + ctx.stroke(); + } } + } - - enabled: controlRoot.enabled - selected: controlRoot.checked - text: controlRoot.text - hover: controlRoot.hovered - hasFocus: controlRoot.activeFocus + onPressedChanged: { + canvas.requestPaint() + } + onHoveredChanged: { + canvas.requestPaint() + } + onCheckedChanged: { + canvas.requestPaint() } } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/TextField.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/TextField.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/TextField.qml 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/TextField.qml 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,92 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import QtQuick.Controls.impl 2.12 +import QtQuick.Templates 2.12 as T +import org.ukui.qqc2style.private 1.0 as StylePrivate + +T.TextField { + id: control + + implicitWidth: implicitBackgroundWidth + leftInset + rightInset + || Math.max(contentWidth, placeholder.implicitWidth) + leftPadding + rightPadding + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + contentHeight + topPadding + bottomPadding, + placeholder.implicitHeight + topPadding + bottomPadding) + + padding: StylePrivate.UKUITextFiled.leftRightPadding + leftPadding: padding + 4 + + color: getStartColor(!control.enabled ? StylePrivate.UKUITextFiled.disableTextColor : StylePrivate.UKUITextFiled.normalTextColor) + selectionColor: control.palette.highlight + selectedTextColor: control.palette.highlightedText + placeholderTextColor: getStartColor(!control.enabled ? StylePrivate.UKUITextFiled.placeHolderDisableTextColor : StylePrivate.UKUITextFiled.placeHolderNormalTextColor) + verticalAlignment: TextInput.AlignVCenter + font: StylePrivate.APPParameter.font + hoverEnabled: true + + property var backColor: !control.enabled ? StylePrivate.UKUITextFiled.placeHolderDisableBC : control.activeFocus ? StylePrivate.UKUITextFiled.inputNormalBC : + click ? StylePrivate.UKUITextFiled.placeHolderClickedBC : + control.hovered ? StylePrivate.UKUITextFiled.placeHolderHoveredBC : StylePrivate.UKUITextFiled.normalBC + property var backBorderColor: !control.enabled ? StylePrivate.UKUITextFiled.disableBorderColor : control.activeFocus ? StylePrivate.UKUITextFiled.focusBorderColor : + control.hovered ? StylePrivate.UKUITextFiled.hoverBorderColor : StylePrivate.UKUITextFiled.normalBorderColor + +// property bool hover: false + property bool click: false + + ParseInterface{ + id: parseInterface + } + + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } + PlaceholderText { + id: placeholder + x: control.leftPadding + y: control.topPadding + width: control.width - (control.leftPadding + control.rightPadding) + height: control.height - (control.topPadding + control.bottomPadding) + + text: control.placeholderText + font: control.font + color: getStartColor(!control.enabled ? StylePrivate.UKUITextFiled.placeHolderDisableTextColor : StylePrivate.UKUITextFiled.placeHolderNormalTextColor) + verticalAlignment: control.verticalAlignment + visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter) + elide: Text.ElideRight + renderType: control.renderType + } + + background: Rectangle { + id: backrec + radius: StylePrivate.UKUITextFiled.radius + implicitWidth: StylePrivate.UKUITextFiled.normalWidth + implicitHeight: StylePrivate.UKUITextFiled.normalHeight + border.width: control.activeFocus ? StylePrivate.UKUITextFiled.focusBorderWidth : StylePrivate.UKUITextFiled.normalWidth + color: gradientRec.visible ? "transparent" : getStartColor(backColor) + border.color: getStartColor(backBorderColor) + + Rectangle{ + id: gradientRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + GradientStop { position: 0.0; color: getStartColor(backColor) } + + GradientStop { position: 1.0; color: getEndColor(backColor)} + } + visible: !parseInterface.isSolidPattern(backColor) + } + } + + onPressed: { + click = true; + } + onReleased: click = false +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/ToolButton.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/ToolButton.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/ToolButton.qml 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/ToolButton.qml 2024-12-20 09:22:49.000000000 +0800 @@ -1,45 +1,44 @@ -import QtQuick.Controls 2.5 + import QtQuick 2.6 import QtQuick.Templates 2.5 as T import org.ukui.qqc2style.private 1.0 as StylePrivate + T.ToolButton { id: controlRoot + implicitWidth: { + var contentwidth = implicitContentWidth + leftPadding + rightPadding + return Math.max(implicitBackgroundWidth + leftInset + rightInset, + contentwidth) + } + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding) - palette: StylePrivate.StyleHelper.palette - font: StylePrivate.StyleHelper.font - - property string icontype: "default" - - implicitWidth: text.length > 0 ? background.implicitWidth : implicitHeight - implicitHeight: background.implicitHeight + leftPadding: btn.margin + rightPadding: btn.margin hoverEnabled: true //Qt.styleHints.useHoverEffects TODO: how to make this work in 5.7? - flat: true - contentItem: Item {} - StylePrivate.KyIcon { - id:icon - iconName: controlRoot.icon.name - anchors.verticalCenter: parent.verticalCenter - width: controlRoot.icon.width - height: controlRoot.icon.height - sunken: controlRoot.pressed || (controlRoot.checkable && controlRoot.checked) - hover: controlRoot.hovered - hasFocus: controlRoot.activeFocus - icontype: controlRoot.icontype + font.family: appP.font.family + font.pointSize: appP.font.pointSize + + NormalControlColor{ + id:ncColor } - background: StylePrivate.StyleItem { - id: styleitem - anchors.fill: parent - control: controlRoot - elementType: controlRoot.flat ? "toolbutton" : "button" - on: controlRoot.pressed || (controlRoot.checkable && controlRoot.checked) - hover: controlRoot.hovered - text: controlRoot.text - hasFocus: false - activeControl: controlRoot.isDefault ? "default" : "f" + StylePrivate.UKUIButton{ + id: btn + } + StylePrivate.APPParameter{ + id: appP + } + contentItem: IconLabelContent { + controlRoot: controlRoot + anchors.centerIn: controlRoot + onWidthChanged: console.log(controlRoot.text, width) } -} + background: BackGroundRectangle{ + controlRoot: controlRoot + _radius: btn.radius + }} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/ToolTip.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/ToolTip.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/org.ukui.style/ToolTip.qml 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/org.ukui.style/ToolTip.qml 2024-12-20 09:22:49.000000000 +0800 @@ -9,8 +9,8 @@ T.ToolTip { id: controlRoot - palette: StylePrivate.StyleHelper.palette - font: StylePrivate.StyleHelper.font + palette: StylePrivate.APPParameter.palette + font: StylePrivate.APPParameter.font x: parent ? Math.round((parent.width - implicitWidth) / 2) : 0 @@ -22,8 +22,8 @@ implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding - margins: 6 - padding: 6 + margins: StylePrivate.UKUIToolTip.margins + padding: StylePrivate.UKUIToolTip.padding // Timeout based on text length, from QTipLabel::restartExpireTimer @@ -31,30 +31,55 @@ closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent + ParseInterface{ + id: parseInterface + } + + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } contentItem: Controls.Label { text: controlRoot.text wrapMode: Text.WordWrap font: controlRoot.font - color: controlRoot.palette.windowText + color: getStartColor(StylePrivate.UKUIToolTip.textColor) } background: Rectangle { - radius: 3 + radius: StylePrivate.UKUIToolTip.radius //border.color: controlRoot.palette.dark - color: controlRoot.palette.toolTipBase + color: gradientRec.visible ? "transparent" : getStartColor(StylePrivate.UKUIToolTip.backColor) layer.enabled: true + + Rectangle{ + id: gradientRec + anchors.fill: parent + radius: parent.radius + border.width: parent.border.width + border.color: parent.border.color + gradient: Gradient { + GradientStop { position: 0.0; color: getStartColor(StylePrivate.UKUIToolTip.backColor) } + + GradientStop { position: 1.0; color: getEndColor(StylePrivate.UKUIToolTip.backColor)} + } + visible: !parseInterface.isSolidPattern(StylePrivate.UKUIToolTip.backColor) + } layer.effect: DropShadow { transparentBorder: true radius: 4 samples: 8 horizontalOffset: 0 verticalOffset: 0 - color: Qt.rgba(0, 0, 0, 0.3) + color: getStartColor(StylePrivate.UKUIToolTip.shadowColor) } } - } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/qml/BackGroundRectangle.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/qml/BackGroundRectangle.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/qml/BackGroundRectangle.qml 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/qml/BackGroundRectangle.qml 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,68 @@ +import QtQuick 2.0 +import QtQuick.Templates 2.5 as T +import QtQuick.Layouts 1.3 +import QtQuick.Controls 2.0 +import QtGraphicalEffects 1.0 +import org.ukui.qqc2style.private 1.0 as StylePrivate + + + +Rectangle { + id:rect1 + implicitWidth: controlRoot.width + + implicitHeight: controlRoot.height + property T.AbstractButton controlRoot: root.parent + property int _radius : 6 + property bool useGradient: (ncColor.controlStartColor !== ncColor.controlEndColor) + + color: gradientRec.visible ? "transparent" : ncColor.controlStartColor + opacity: (controlRoot.flat && !controlRoot.pressed && !controlRoot.hovered) ? 0 : 1 + radius: _radius // 可选:设置圆角半径 + border.width: controlRoot.focus ? StylePrivate.UKUIButton.focusBorderWidth : StylePrivate.UKUIButton.borderWidth + border.color: ncColor.borderColor + + + + Rectangle { + id: gradientRec + anchors.fill: parent + radius: _radius // 可选:设置圆角半径 + border.width: parent.border.width + border.color: parent.border.color + + gradient: Gradient { + id:gradient + GradientStop { position: 0.0; color: ncColor.controlStartColor } + + GradientStop { position: 1.0; color: ncColor.controlEndColor } + } + visible: useGradient + } + + NormalControlColor{ + id:ncColor + } + + Component.onCompleted: { + ncColor.changeColor(controlRoot.highlighted, controlRoot.enabled, false, false, false); + } + + Connections { + target: controlRoot + function onPressedChanged() { + ncColor.changeColor(controlRoot.highlighted, controlRoot.enabled, controlRoot.pressed, controlRoot.hovered, controlRoot.focus) + } + function onHoveredChanged() { + // if(controlRoot.hovered) + // grad.visible = true; + // else + // grad.visible = false; + ncColor.changeColor(controlRoot.highlighted, controlRoot.enabled, false, controlRoot.hovered, controlRoot.focus) + } + function onFocusChanged(){ + ncColor.changeColor(controlRoot.highlighted, controlRoot.enabled, controlRoot.pressed, controlRoot.hovered, controlRoot.focus) + } + } +} + diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/qml/IconLabelContent.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/qml/IconLabelContent.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/qml/IconLabelContent.qml 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/qml/IconLabelContent.qml 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,218 @@ +import QtQuick 2.6 +import QtQuick.Templates 2.5 as T +import QtQuick.Layouts 1.3 +import QtQuick.Controls 2.0 +import org.ukui.qqc2style.private 1.0 as StylePrivate + +Item{ + id:root + property T.AbstractButton controlRoot: root.parent + + property int normalWidth: btn.normalWidth + property int normalHeight: btn.normalHeight + + property string layout: "center" + property int leftSpace: 0 + property int labelSpace: 0 + + property var labelColor: controlRoot.enabled ? btn.normalTextColor : btn.disableTextColor + + property bool imageVisible : image.visible || image1.visible + property var space: { + if(controlRoot.display === AbstractButton.TextOnly || controlRoot.display === AbstractButton.IconOnly) + return 0 + return (label.text != "" && imageVisible) ? btn.space : 0 + } + + ParseInterface{ + id: parseInterface + } + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } + + function adjustWidth(margin){//margin表示边距 + if(controlRoot.display !== AbstractButton.TextUnderIcon){ + var textwidth = (label.text !== "" && controlRoot.display !== AbstractButton.IconOnly) ? label.width : 0 + var imagewidth = (!imageVisible) ? 0 : image.width + if(controlRoot.display === AbstractButton.IconOnly || label.text === "") + return imagewidth + margin; + if(controlRoot.display !== AbstractButton.TextBesideIcon) + return Math.max(textwidth + margin, imagewidth + margin, normalWidth) + return Math.max(normalWidth, textwidth + imagewidth + space + margin) + } + var textwidth1 = label1.text != "" ? label1.width : 0 + var imagewidth1 = imageVisible ? 0 : image1.width + + return Math.max(normalWidth, textwidth1 + imagewidth1 + space + margin) + + } + + function adjustHeight(margin){//margin表示边距 + if(controlRoot.display !== AbstractButton.TextUnderIcon) { + var textheight = label1.text != "" ? label1.height : 0 + var imageheight = !imageVisible ? 0 : image1.height + if(controlRoot.display !== AbstractButton.TextBesideIcon) + return Math.max(textheight + margin, imageheight + margin, normalHeight) + return Math.max(normalHeight, textheight + space + margin, imageheight + space + margin) + } + var textheight1 = label1.text != "" ? label1.height : 0 + var imageheight1 = !imageVisible ? 0 : image1.height + + var h = Math.max(normalHeight, textheight1 + imageheight1 + space + margin) +// console.log("heigh0000000000....", controlRoot.text, textheight1, imageheight1, h, space, margin) + + return h + } + + StylePrivate.UKUIButton{ + id: btn + + } + StylePrivate.APPParameter{ + id: appP + onFontChanged:{ + controlRoot.width = adjustWidth(2 * btn.leftRightMargin) + controlRoot.height = adjustHeight(2 * btn.upDownMargin) + } + } + anchors.centerIn: controlRoot + + Item{ + id:item + visible: controlRoot.display !== AbstractButton.TextUnderIcon + implicitWidth: { + var textwidth = (controlRoot.display !== AbstractButton.IconOnly && label.text !== "") ? label.width : 0 + var imagewidth = imageVisible ? image.width : 0 + if(controlRoot.display === AbstractButton.IconOnly || label.text === "") + return imagewidth; + + if(controlRoot.display !== AbstractButton.TextBesideIcon) + return Math.max(textwidth, imagewidth) + return Math.max( textwidth + imagewidth + space) + } + + implicitHeight: { + var textheight = label.visible ? (label.text != "" ? label.height : 0) : 0 + var imageheight = imageVisible ? image.height : 0 + if(controlRoot.display === AbstractButton.IconOnly || label.text === "") + return imageheight; + + if(controlRoot.display === AbstractButton.TextUnderIcon) + return Math.max(textheight + imageheight + space, normalHeight); + return Math.max(textheight, imageheight, normalHeight) + + } + anchors.left: parent.left + anchors.leftMargin: { + if(layout == "left"){ + space += leftSpace; + return leftSpace; + } + else + return (parent.width - width) / 2 + } + anchors.verticalCenter: parent.verticalCenter + + Image { + id: image + source: //controlRoot.icon.source + { + if((controlRoot.icon.source.toString() === "" && controlRoot.icon.name.toString() === "")) + return controlRoot.icon.source + + var model = !controlRoot.enabled ? "disenable" : controlRoot.pressed ? "clicked" : controlRoot.hovered ? "hover" : "normal" + + let s = controlRoot.icon.source.toString() + return "image://imageProvider/" + s + "/" + model; + } + anchors.verticalCenter: parent.verticalCenter + width: (controlRoot.display !== AbstractButton.TextOnly && source !== "" && status != Image.Null) ? 16 : 0 + visible: controlRoot.display !== AbstractButton.TextOnly && source !== "" && status != Image.Null + + } + Label { + id:label + text: controlRoot.text + font: controlRoot.font + color: getStartColor(labelColor) + visible: controlRoot.display !== AbstractButton.IconOnly && text !== "" + + anchors.verticalCenter: parent.verticalCenter + + anchors.left: image.right + anchors.leftMargin: (image.visible && image.status !== Image.Null) ? 0 : labelSpace + + } + + } + Item{ + id:item1 + visible: controlRoot.display === AbstractButton.TextUnderIcon + implicitWidth: { + var textwidth1 = label1.text != "" ? label1.width : 0 + var imagewidth1 = controlRoot.icon.source === "" ? 0 : image1.width + if(controlRoot.display === AbstractButton.TextUnderIcon) + return Math.max(textwidth1, imagewidth1, normalWidth); + if(controlRoot.display !== AbstractButton.TextBesideIcon) + return Math.max(textwidth1, imagewidth1, normalWidth) + return Math.max( textwidth1 + imagewidth1 + space, normalWidth) + } + implicitHeight: { + var textheight1 = label1.text != "" ? label1.height : 0 + var imageheight1 = controlRoot.icon.source === "" ? 0 : image1.height + if(display === AbstractButton.TextUnderIcon) + return Math.max(textheight1 + imageheight1 + space, normalHeight); + return Math.max(textheight1, imageheight1, normalHeight) + + } + anchors.centerIn: parent + Image { + id: image1 + source: //controlRoot.icon.source + { + if((controlRoot.icon.source.toString() === "" && controlRoot.icon.name.toString() === "")) + return controlRoot.icon.source + + var model = !controlRoot.enabled ? "disenable" : controlRoot.pressed ? "clicked" : controlRoot.hovered ? "hover" : "normal" + + let s = controlRoot.icon.source.toString() + return "image://imageProvider/" + s + "/" + model; + } + anchors.horizontalCenter: parent.horizontalCenter + width: visible ? 16 : 0 + height: visible ? 16 : 0 + visible: controlRoot.display !== AbstractButton.TextOnly && source !== "" /*&& status != Image.Null*/ + } + Label { + id:label1 + text: controlRoot.text + font: controlRoot.font + color: getStartColor(labelColor) + visible: controlRoot.display !== AbstractButton.IconOnly && text !== "" + + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: image1.bottom + anchors.topMargin: space + } + + } + Component.onCompleted: { + width = adjustWidth(0); + height = adjustHeight(0); + controlRoot.width = adjustWidth(2 * btn.leftRightMargin) + controlRoot.height = adjustHeight(2 * btn.upDownMargin) + } + + onVisibleChanged: { + width = adjustWidth(0); + height = adjustHeight(0); + controlRoot.width = adjustWidth(2 * btn.leftRightMargin) + controlRoot.height = adjustHeight(2 * btn.upDownMargin) + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/qml/NormalControlColor.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/qml/NormalControlColor.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/qml/NormalControlColor.qml 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/qml/NormalControlColor.qml 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,77 @@ +import QtQuick 2.0 +import org.ukui.qqc2style.private 1.0 as StylePrivate + +Item { + id: root +// StylePrivate.UKUIButton{ +// id: btn +// } +// StylePrivate.APPParameter{ +// id: appP +//// onFontChanged:{ +//// console.log("onFontChanged.......", StylePrivate.APPParameter.font) +//// } +// } +// StylePrivate.ParseDTColor{ +// id:pDTColor +// } +// StylePrivate.UKUIButton{ +// id:uBtn +// } + property color controlStartColor// : StylePrivate.UKUIButton.normalBC + property color controlEndColor: controlStartColor + property color borderColor + + ParseInterface{ + id: parseInterface + } + + function changeColor(highlighted, enable, click, hover, focus){ +// var test = uBtn.hoveredBC; +// console.log("ParseDTColor 00000000", test); +// console.log("ParseDTColor 00000000", test.colorType()); +// console.log("ParseDTColor 00000000", test.mixStartColor()); + +// var test1 = uBtn.normalBC +// console.log("ParseDTColor 111111", test1); +// console.log("ParseDTColor 111111", pDTColor.isSolidPattern(test1)); +// console.log("ParseDTColor 111111", pDTColor.startColor(test1)); +// console.log("ParseDTColor 111111", pDTColor.endColor(test1)); + +// console.log("ParseDTColor 222222", parseInterface.pEndColor(test1)); + + if(highlighted){ + controlStartColor = !enable ? parseInterface.pStartColor(StylePrivate.UKUIButton.disableHBC) : + click ? parseInterface.pStartColor(StylePrivate.UKUIButton.clickedHBC) : + hover ? parseInterface.pStartColor(StylePrivate.UKUIButton.hoveredHBC) : + parseInterface.pStartColor(StylePrivate.UKUIButton.normalHBC) + controlEndColor = !enable ? parseInterface.pEndColor(StylePrivate.UKUIButton.disableHBC) : + click ? parseInterface.pEndColor(StylePrivate.UKUIButton.clickedHBC) : + hover ? parseInterface.pEndColor(StylePrivate.UKUIButton.hoveredHBC) : + parseInterface.pEndColor(StylePrivate.UKUIButton.normalHBC) + + borderColor = !enable ? parseInterface.pStartColor(StylePrivate.UKUIButton.disableBorderHColor) : + focus ? parseInterface.pStartColor(StylePrivate.UKUIButton.focusBorderColor) : + click ? parseInterface.pStartColor(StylePrivate.UKUIButton.clickBorderHColor) : + hover ? parseInterface.pStartColor(StylePrivate.UKUIButton.hoverBorderHColor) : + parseInterface.pStartColor(StylePrivate.UKUIButton.normalBorderHColor) + } + else{ + controlStartColor = !enable ? parseInterface.pStartColor(StylePrivate.UKUIButton.disableBC) : + click ? parseInterface.pStartColor(StylePrivate.UKUIButton.clickedBC) : + hover ? parseInterface.pStartColor(StylePrivate.UKUIButton.hoveredBC) : + parseInterface.pStartColor(StylePrivate.UKUIButton.normalBC) + + controlEndColor = !enable ? parseInterface.pEndColor(StylePrivate.UKUIButton.disableBC) : + click ? parseInterface.pEndColor(StylePrivate.UKUIButton.clickedBC) : + hover ? parseInterface.pEndColor(StylePrivate.UKUIButton.hoveredBC) : + parseInterface.pEndColor(StylePrivate.UKUIButton.normalBC) + + borderColor = !enable ? parseInterface.pStartColor(StylePrivate.UKUIButton.disableBorderColor) : + focus ? parseInterface.pStartColor(StylePrivate.UKUIButton.focusBorderColor) : + click ? parseInterface.pStartColor(StylePrivate.UKUIButton.clickBorderColor) : + hover ? parseInterface.pStartColor(StylePrivate.UKUIButton.hoverBorderColor) : + parseInterface.pStartColor(StylePrivate.UKUIButton.normalBorderColor) + } + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/qml/ParseInterface.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/qml/ParseInterface.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/qml/ParseInterface.qml 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/qml/ParseInterface.qml 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,17 @@ +import QtQuick 2.0 +import org.ukui.qqc2style.private 1.0 as StylePrivate + +Item { + function pStartColor(dtColor) + { + return StylePrivate.ParseDTColor.startColor(dtColor) + } + function pEndColor(dtColor) + { + return StylePrivate.ParseDTColor.startColor(dtColor) + } + function isSolidPattern(dtColor) + { + return StylePrivate.ParseDTColor.isSolidPattern(dtColor) + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/qml/RadiusRectangle.qml qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/qml/RadiusRectangle.qml --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/qml/RadiusRectangle.qml 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/qml/RadiusRectangle.qml 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,92 @@ +import QtQuick 2.6 +import QtQuick.Templates 2.5 as T +import QtQuick.Controls 2.0 +import org.ukui.qqc2style.private 1.0 as StylePrivate + +Item{ + id:control +// property Rectangle controlRoot: control.parent + + property int leftTopRadius: 6 + property int rightTopRadius: 6 + property int leftBottomRadius: 6 + property int rightBottomRadius: 6 + + property var borderColor + property var backColor + property int borderWidth + + property alias canvas : customButtonCanvas + + ParseInterface{ + id: parseInterface + } + + function getStartColor(dtcolor) + { + return parseInterface.pStartColor(dtcolor) + } + function getEndColor(dtcolor) + { + return parseInterface.pEndColor(dtcolor) + } + Canvas { + id: customButtonCanvas + width: control.width + height: control.height + anchors.centerIn: parent + + onPaint: { + var ctx = getContext("2d"); + ctx.reset(); + var gradient = ctx.createLinearGradient(customButtonCanvas.x, customButtonCanvas.y, customButtonCanvas.width, customButtonCanvas.height) + + gradient.addColorStop(0, getStartColor(backColor)); + gradient.addColorStop(1, getEndColor(backColor)); + + // 填充颜色 + ctx.fillStyle = gradient; + + // 开始绘制路径 + ctx.beginPath(); + + // 绘制圆角矩形,只有左上角和右上角有圆角 + // 绘制第一段圆弧路径 + ctx.moveTo(0, leftTopRadius); + ctx.arc(leftTopRadius, leftTopRadius, leftTopRadius, Math.PI, Math.PI * 3 / 2); + // 绘制第一段直线路径 + ctx.lineTo(width - rightTopRadius, 0); + // 绘制第二段圆弧路径 + ctx.arc(width - rightTopRadius, rightTopRadius, rightTopRadius, Math.PI * 3 / 2, Math.PI * 2); + // 绘制第二段直线路径 + ctx.lineTo(width, height - rightBottomRadius); + // 绘制第三段圆弧路径 + ctx.arc(width - rightBottomRadius, height - rightBottomRadius, rightBottomRadius, 0, Math.PI * 1 / 2); + // 绘制第三段直线路径 + ctx.lineTo(leftBottomRadius, height); + // 绘制第四段圆弧路径 + ctx.arc(leftBottomRadius, height - leftBottomRadius, leftBottomRadius, Math.PI * 1 / 2, Math.PI); + // 绘制第四段直线路径 + ctx.lineTo(leftTopRadius); + + // 填充路径 + ctx.closePath(); + ctx.clip(); + ctx.fill(); + + // 绘制边框 + ctx.strokeStyle = getStartColor(borderColor); + ctx.lineWidth = borderWidth; + ctx.stroke(); + } + + // 鼠标点击事件(模拟按钮点击) +// MouseArea { +// anchors.fill: parent +// onClicked: { +// canvas.requestPaint() + +// } +// } + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/qml.qrc qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/qml.qrc --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/qml.qrc 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/qml.qrc 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,9 @@ +<RCC> + <qresource prefix="/"> + <file alias="NormalControlColor">qml/NormalControlColor.qml</file> + <file alias="IconLabelContent">qml/IconLabelContent.qml</file> + <file>qml/BackGroundRectangle.qml</file> + <file>qml/RadiusRectangle.qml</file> + <file>qml/ParseInterface.qml</file> + </qresource> +</RCC> diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/qmldir qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/qmldir --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/qmldir 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/qmldir 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,5 @@ +IconLabelContent 1.0 qml/IconLabelContent.qml +NormalControlColor 1.0 qml/NormalControlColor.qml +BackGroundRectangle 1.0 qml/BackGroundRectangle.qml +RadiusRectangle 1.0 qml/RadiusRectangle.qml +ParseInterface 1.0 qml/ParseInterface.qml diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/ukui-qqc2-style.pro qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/ukui-qqc2-style.pro --- qt5-ukui-platformtheme-4.1.0.0/ukui-qqc2-style/ukui-qqc2-style.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-qqc2-style/ukui-qqc2-style.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,10 +0,0 @@ -TEMPLATE = subdirs - -DISTFILES += org.ukui.style/* - -unix { - installPath = $$[QT_INSTALL_LIBS]/qt5/qml/QtQuick/Controls.2/org.ukui.style/ - template.files = org.ukui.style/* - template.path = $$installPath - INSTALLS += template -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/CMakeLists.txt qt5-ukui-platformtheme-4.10.0.1/ukui-styles/CMakeLists.txt --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/CMakeLists.txt 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,101 @@ +cmake_minimum_required(VERSION 3.16) + +project(qt5-style-ukui) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(QT_MIN_VERSION "5.12.0") +set(KF5_MIN_VERSION "5.66.0") + +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_CURRENT_SOURCE_DIR}/cmake/kde-modules ${CMAKE_MODULE_PATH}) + +# QtCreator supports the following variables for Android, which are identical to qmake Android variables. +# Check http://doc.qt.io/qt-5/deployment-android.html for more information. +# They need to be set before the find_package(Qt5 ...) call. + +#if(ANDROID) +# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android") +# if (ANDROID_ABI STREQUAL "armeabi-v7a") +# set(ANDROID_EXTRA_LIBS +# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libcrypto.so +# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libssl.so) +# endif() +#endif() + + +find_package(Qt5Gui) +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + DBus + Widgets + X11Extras +) +include_directories(${Qt5Widgets_PRIVATE_INCLUDE_DIRS}) +include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) + +find_package(KF5WindowSystem ${KF5_MIN_VERSION} CONFIG REQUIRED COMPONENTS) + +find_package(KF5Wayland CONFIG REQUIRED COMPONENTS) + +find_package(PkgConfig) +pkg_check_modules(Qsettings REQUIRED gsettings-qt) +pkg_check_modules(KYSDKCONF2 REQUIRED kysdk-conf2) + +include_directories(${Qsettings_INCLUDE_DIRS}) +#file(GLOB_RECURSE native_srcs /qt5-config-style-ukui/*.cpp) +if (KYSDKCONF2_FOUND) + include_directories(${KYSDKCONF2_INCLUDE_DIRS}) + link_directories(${KYSDKCONF2_LIBRARY_DIRS}) +endif() + +file(GLOB_RECURSE Header "*.h" "*.hpp" ) +file(GLOB_RECURSE Src "*.cpp" "*.c") +SOURCE_GROUP("header" FILES ${Header}) +SOURCE_GROUP("src" FILES ${Src}) + +file(GLOB_RECURSE Json "*.json") + +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${Header} ${Src} ${Json}) + + +include_directories(../libqt5-ukui-style) + add_library(${PROJECT_NAME} MODULE ${Header} ${Src} ${Json}) + + target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/libqt5-ukui-style/animations) + +target_link_libraries(${PROJECT_NAME} PRIVATE + Qt5::Widgets + Qt5::DBus + Qt5::Gui + Qt5::X11Extras + KF5::WaylandClient + KF5::WindowSystem + xcb + ${XCB_LIBS} + gsettings-qt + qt5-ukui-style + ${KYSDKCONF2_LIBRARIES} + ) + + +#add_subdirectory(qt5-config-style-ukui) + +add_definitions(-DQT5UKUIPLATFORMTHEME_LIBRARY) +add_definitions(-DQT_DEPRECATED_WARNINGS) +add_definitions(-DQT_MESSAGELOGCONTEXT) + +if(UNIX) + set(TARGET_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/qt5/plugins/styles") + + MESSAGE("libukui-styles TARGET_PATH: ${TARGET_PATH}") + + install(TARGETS ${PROJECT_NAME} DESTINATION ${TARGET_PATH}) + + set(CONFIG_PATH "/usr/share/qt5-ukui-platformtheme/themeconfig/") + file(GLOB_RECURSE CONFIG_FILES0 "qt5-config-style-ukui/themeconfig/*.json") + install(FILES ${CONFIG_FILES0} DESTINATION ${CONFIG_PATH}) +endif() diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/blur-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/blur-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/blur-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/blur-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,7 +21,7 @@ */ #include "blur-helper.h" -#include "ukui-style-settings.h" +#include "settings/ukui-style-settings.h" #include <QWidget> #include <KWindowEffects> #include <QGSettings> @@ -32,7 +32,7 @@ #include <QMenu> -#include "black-list.h" +#include "settings/black-list.h" #include <QApplication> #include <QX11Info> @@ -117,9 +117,9 @@ #if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) void BlurHelper::registerWidget(QWidget *widget) { - // FIXME: how to blur window on wayland? - if (!QX11Info::isPlatformX11()) - return; +// // FIXME: how to blur window on wayland? +// if (!QX11Info::isPlatformX11()) +// return; if (!widget) return; @@ -197,10 +197,10 @@ } bool skip = true; - if (w->inherits("QComboBoxPrivateContainer")) + if (w && w->inherits("QComboBoxPrivateContainer")) return true; - if (w->inherits("QMenu") || w->inherits("QTipLabel")) { + if (w && w->inherits("QMenu") || w->inherits("QTipLabel")) { return false; } @@ -281,7 +281,13 @@ break; } QPainterPath path; - path.addRoundedRect(widget->rect().adjusted(+2,+8,-2,-8), 8, 8); + int radius = 8; + if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { + auto settings = UKUIStyleSettings::globalInstance(); + if(settings->keys().contains("windowRadius")) + radius = settings->get("windowRadius").toInt(); + } + path.addRoundedRect(widget->rect(), radius, radius); KWindowEffects::enableBlurBehind(widget->winId(), true, path.toFillPolygon().toPolygon()); if (!updateBlurRegionOnly) widget->update(); @@ -290,7 +296,13 @@ if (widget->inherits("QTipLabel")) { QPainterPath path; - path.addRoundedRect(widget->rect().adjusted(+4,+4,-4,-4), 6, 6); + int radius = 8; + if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { + auto settings = UKUIStyleSettings::globalInstance(); + if(settings->keys().contains("windowRadius")) + radius = settings->get("windowRadius").toInt(); + } + path.addRoundedRect(widget->rect().adjusted(+4,+4,-4,-4), radius, radius); KWindowEffects::enableBlurBehind(widget->winId(), true, path.toFillPolygon().toPolygon()); if (!updateBlurRegionOnly) widget->update(); diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/blur-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/blur-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/blur-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/blur-helper.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/gesture-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/gesture-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/gesture-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/gesture-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,8 +21,8 @@ */ #include "gesture-helper.h" -#include "ukui-two-finger-slide-gesture.h" -#include "ukui-two-finger-zoom-gesture.h" +#include "gestures/ukui-two-finger-slide-gesture.h" +#include "gestures/ukui-two-finger-zoom-gesture.h" #include <QWidget> #include <QGestureEvent> diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/gesture-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/gesture-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/gesture-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/gesture-helper.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/platformthemedebug.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/platformthemedebug.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/platformthemedebug.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/platformthemedebug.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,102 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: Jing Tan <tanjing@kylinos.cn> + * + */ + +#ifndef PLATFORMTHEMEDEBUG_H +#define PLATFORMTHEMEDEBUG_H + +#include <QDebug> + + +//#define UKUIStyle_Debug +//#define AnimationSlider_Debug +//#define AnimationScrollbar_Debug + +//#define UKUIStyle_Warning + +class Debug + +{ + +public: + +template<typename T> + +Debug & operator <<(const T&){return *this;} + +}; +inline Debug debug(){return Debug();} + + +#ifdef UKUIStyle_Debug + +# define cDebug qDebug() << "UKUIStyle input:" + +#else + +# define cDebug Debug() + +#endif + +#ifdef AnimationSlider_Debug + +# define aSliderDebug qDebug() << "UKUIStyle input:" + +#else + +# define aSliderDebug Debug() + +#endif + +#ifdef AnimationScrollbar_Debug + +# define aScrollBarDebug qDebug() << "UKUIStyle input:" + +#else + +# define aScrollBarDebug Debug() + +#endif + +class Warning + +{ + +public: + +template<typename T> + +Warning & operator <<(const T&){return *this;} + +}; +inline Warning warning(){return Warning();} + +#ifdef UKUIStyle_Warning + +# define cWarning qWarning() << "UKUIStyle input:" + +#else + +# define cWarning Warning() + +#endif + +#endif // PLATFORMTHEMEDEBUG_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/blur-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/blur-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/blur-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/blur-helper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,346 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "blur-helper.h" -#include "ukui-style-settings.h" -#include <QWidget> -#include <KWindowEffects> -#include <QGSettings> -#include <QVariant> -#include <QEvent> -#include <QIcon> -#include <QPainterPath> - -#include <QMenu> - -#include "black-list.h" - -#include <QApplication> -#include <QX11Info> - -#include <QDebug> - -BlurHelper::BlurHelper(QObject *parent) : QObject(parent) -{ - if (QGSettings::isSchemaInstalled("org.ukui.control-center.personalise")) { - QGSettings *settings = new QGSettings("org.ukui.control-center.personalise", QByteArray(), this); - connect(settings, &QGSettings::changed, this, [=](const QString &key) { - if (key == "effect") { - bool enable = settings->get(key).toBool(); - this->onBlurEnableChanged(enable); - } - }); - bool enable = settings->get("effect").toBool(); - this->onBlurEnableChanged(enable); - - if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind)) - confirmBlurEnableDelay(); - } - m_timer.setSingleShot(true); - m_timer.setInterval(100); -} - -bool BlurHelper::eventFilter(QObject *obj, QEvent *e) -{ - if (!m_blur_enable) - return false; - - QWidget* widget = qobject_cast<QWidget*>(obj); - - if (!widget || !widget->isWindow()) - return false; - - //FIXME: - //qDebug()<<e->type()<<obj; - //qDebug()<<KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind); - switch (e->type()) { - case QEvent::UpdateRequest: { - //QWidget* widget = qobject_cast<QWidget*>(obj); - delayUpdate(widget, true); - break; - } - case QEvent::LayoutRequest: - { - //QWidget* widget = qobject_cast<QWidget*>(obj); - delayUpdate(widget); - break; - } - case QEvent::Hide: { - //QWidget* widget = qobject_cast<QWidget*>(obj); - KWindowEffects::enableBlurBehind(widget->winId(), false); - } - - default: - break; - } - return false; -} - -/*! - * \brief BlurHelper::registerWidget - * \param widget - * \note - * - * we can't blur a widget before it shown, because some times - * there might be problems about window painting. - * this usually happend on a widget which has graphics effect. - * - * to avoid them, never try get winid and do a blur for that case. - */ -#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) -void BlurHelper::registerWidget(QWidget *widget) -{ - // FIXME: how to blur window on wayland? - if (!QX11Info::isPlatformX11()) - return; - - if (!widget) - return; - - if (shouldSkip(widget)) - return; - if (isApplicationInBlackList()) - return; - if (widget->property("doNotBlur").toBool()) - return; - if (!m_blur_widgets.contains(widget)) { - m_blur_widgets<<widget; - //qDebug()<<KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind); - /*! - \note - never try enableBlurBehind when register widget. - it might cause serious problems about paint. - usually it happend with a widget which has graphics effect. - */ -// if (!widget->mask().isEmpty()) { -// KWindowEffects::enableBlurBehind(widget->winId(), true, widget->mask()); -// } else { -// KWindowEffects::enableBlurBehind(widget->winId(), true); -// } - - connect(widget, &QWidget::destroyed, this, [=]() { - this->onWidgetDestroyed(widget); - }); - } - widget->removeEventFilter(this); - widget->installEventFilter(this); - - if (!widget->mask().isEmpty()) { - widget->update(widget->mask()); - } else { - widget->update(); - } -} - -void BlurHelper::unregisterWidget(QWidget *widget) -{ - if (!QX11Info::isPlatformX11()) - return; - - if (!widget) - return; - - if (shouldSkip(widget)) - return; - if (isApplicationInBlackList()) - return; - if (widget->property("doNotBlur").toBool()) - return; - m_blur_widgets.removeOne(widget); - widget->removeEventFilter(this); - if (widget->winId() > 0) - KWindowEffects::enableBlurBehind(widget->winId(), false); -} -#endif - -bool BlurHelper::isApplicationInBlackList() -{ - return blackList().contains(qAppName()); -} - -const QStringList BlurHelper::blackList() -{ - return blackAppListWithBlurHelper(); -} - -bool BlurHelper::shouldSkip(QWidget *w) -{ - if (w->property("useSystemStyleBlur").isValid()) { - return !w->property("useSystemStyleBlur").toBool(); - } - - bool skip = true; - if (w->inherits("QComboBoxPrivateContainer")) - return true; - - if (w->inherits("QMenu") || w->inherits("QTipLabel")) { - return false; - } - -// if (w->inherits("QTipLabel")) -// return true; - - return skip; -} - -void BlurHelper::onBlurEnableChanged(bool enable) -{ - m_blur_enable = enable; - - if (enable) { - qApp->setProperty("blurEnable", true); - } else { - qApp->setProperty("blurEnable", false); - } - - if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind)) - return; - - for (auto widget : qApp->allWidgets()) { - widget->update(); - if (m_blur_widgets.contains(widget)) { - if (widget->winId() > 0) { - KWindowEffects::enableBlurBehind(widget->winId(), enable); - } - } - } -// QTimer::singleShot(100, this, [=](){ -// for (auto widget : m_blur_widgets) { -// if (!widget) -// continue; -// if (widget->winId() > 0) -// KWindowEffects::enableBlurBehind(widget->winId(), enable); -// } -// }); -} - -void BlurHelper::onWidgetDestroyed(QWidget *widget) -{ - widget->removeEventFilter(this); - m_blur_widgets.removeOne(widget); - //unregisterWidget(widget); -} - -void BlurHelper::delayUpdate(QWidget *w, bool updateBlurRegionOnly) -{ - if (w->winId() <= 0) - return; - - if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind)) - return; - - m_update_list.append(w); - if (!m_timer.isActive()) { - for (auto widget : m_update_list) { - // cast to widget and check - //KWindowEffects::enableBlurBehind(widget->winId(), false); - - if (!widget) - continue; - - if (widget->winId() <= 0) - continue; - - bool hasMask = false; - if (widget->mask().isNull()) - hasMask = true; - - QVariant regionValue = widget->property("blurRegion"); - QRegion region = qvariant_cast<QRegion>(regionValue); - - if (widget->inherits("QMenu")) { - //skip menu which has style sheet. - if (!widget->styleSheet().isEmpty() || qApp->styleSheet().contains("QMenu")) { - break; - } - QPainterPath path; - path.addRoundedRect(widget->rect().adjusted(+2,+8,-2,-8), 8, 8); - KWindowEffects::enableBlurBehind(widget->winId(), true, path.toFillPolygon().toPolygon()); - if (!updateBlurRegionOnly) - widget->update(); - break; - } - - if (widget->inherits("QTipLabel")) { - QPainterPath path; - path.addRoundedRect(widget->rect().adjusted(+3,+3,-3,-3), 6, 6); - KWindowEffects::enableBlurBehind(widget->winId(), true, path.toFillPolygon().toPolygon()); - if (!updateBlurRegionOnly) - widget->update(); - break; - } - - if (!hasMask && region.isEmpty()) - break; - - //qDebug()<<regionValue<<region; - //qDebug()<<widget->metaObject()->className()<<widget->geometry()<<widget->mask(); - if (!region.isEmpty()) { - //qDebug()<<"blur region"<<region; - KWindowEffects::enableBlurBehind(widget->winId(), true, region); - if (!updateBlurRegionOnly) - widget->update(); - } else { - //qDebug()<<widget->mask(); - KWindowEffects::enableBlurBehind(widget->winId(), true, widget->mask()); - if (!updateBlurRegionOnly) - widget->update(widget->mask()); - } - - //NOTE: we can not setAttribute Qt::WA_TranslucentBackground here, - //because the window is about to be shown. - //widget->setAttribute(Qt::WA_TranslucentBackground); - //KWindowEffects::enableBlurBehind(widget->winId(), true); - //widget->update(); - } - m_update_list.clear(); - } else { - m_timer.start(); - } -} - -void BlurHelper::confirmBlurEnableDelay() -{ - QTimer::singleShot(3000, this, [=]() { - bool enable = m_blur_enable; - if (enable) { - qApp->setProperty("blurEnable", true); - } else { - qApp->setProperty("blurEnable", false); - } - for (auto widget : qApp->allWidgets()) { - widget->update(); - if (m_blur_widgets.contains(widget)) { - if (widget->winId() > 0) - KWindowEffects::enableBlurBehind(widget->winId(), enable); - } - } -// QTimer::singleShot(100, this, [=](){ -// for (auto widget : m_blur_widgets) { -// if (!widget) -// continue; -// if (widget->winId() > 0) -// KWindowEffects::enableBlurBehind(widget->winId(), enable); -// } -// }); - }); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/blur-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/blur-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/blur-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/blur-helper.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,71 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef BLURHELPER_H -#define BLURHELPER_H - -#include <QObject> -#include <QTimer> - -class BlurHelper : public QObject -{ - Q_OBJECT -public: - explicit BlurHelper(QObject *parent = nullptr); - - bool eventFilter(QObject *obj, QEvent *e); - void registerWidget(QWidget *widget); - void unregisterWidget(QWidget *widget); - - bool isApplicationInBlackList(); - const QStringList blackList(); - - bool shouldSkip(QWidget *w); - -signals: - -public slots: - void onBlurEnableChanged(bool enable); - void onWidgetDestroyed(QWidget *widget); - void delayUpdate(QWidget *w, bool updateBlurRegionOnly = false); - -protected: - /*! - * \brief confirmBlurEnableDelay - * \note - * some application start before kwin, such as peony-qt-desktop. - * we have to ensure that the blurEnable protocol not effected by - * the case. Delay a while and check it again is a normally way to - * confirm. - */ - void confirmBlurEnableDelay(); - -private: - QList<QWidget *> m_blur_widgets; - - QList<QWidget *> m_update_list; - QTimer m_timer; - - bool m_blur_enable = true; -}; - -#endif // BLURHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/gesture-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/gesture-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/gesture-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/gesture-helper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,371 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "gesture-helper.h" -#include "ukui-two-finger-slide-gesture.h" -#include "ukui-two-finger-zoom-gesture.h" - -#include <QWidget> -#include <QGestureEvent> -#include <QTapAndHoldGesture> - -#include <QContextMenuEvent> - -#include <QApplication> -#include <QMenu> - -#include <QTouchEvent> - -#include <QScroller> -#include <QMouseEvent> - -#include <QAbstractItemView> -#include <QItemSelectionModel> - -#include <QScroller> - -#include <QWheelEvent> - -#include <QtMath> - -#include <QDebug> - -GestureHelper::GestureHelper(QObject *parent) : QObject(parent) -{ - // we translate event by ourselves - qApp->setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents, false); - //qApp->setAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents, false); - - m_menu_popped_timer.setInterval(500); - m_menu_popped_timer.setSingleShot(true); - - m_pinch_operation_delayer.setInterval(200); - m_pinch_operation_delayer.setSingleShot(true); - - m_slider = new UKUI::TwoFingerSlideGestureRecognizer; - m_zoomer = new UKUI::TwoFingerZoomGestureRecognizer; - - m_slide_type = QGestureRecognizer::registerRecognizer(m_slider); - m_zoom_type = QGestureRecognizer::registerRecognizer(m_zoomer); - -} - -GestureHelper::~GestureHelper() -{ - QGestureRecognizer::unregisterRecognizer(m_slide_type); - QGestureRecognizer::unregisterRecognizer(m_zoom_type); -} - -void GestureHelper::registerWidget(QWidget *widget) -{ - if (!widget) - return; - - if (widget->contextMenuPolicy() == Qt::NoContextMenu) - return; - - //widget->setAttribute(Qt::WA_AcceptTouchEvents, false); - - widget->removeEventFilter(this); - - //widget->grabGesture(Qt::TapGesture); - widget->grabGesture(Qt::TapAndHoldGesture); - //widget->grabGesture(Qt::PanGesture); - //widget->grabGesture(Qt::PinchGesture); - //widget->grabGesture(Qt::SwipeGesture); - //widget->grabGesture(m_slide_type); - //widget->grabGesture(m_zoom_type); - - widget->installEventFilter(this); -} - -void GestureHelper::unregisterWidget(QWidget *widget) -{ - if (!widget) - return; - - if (widget->contextMenuPolicy() == Qt::NoContextMenu) - return; - - //widget->setAttribute(Qt::WA_AcceptTouchEvents, true); - - widget->removeEventFilter(this); - - //widget->ungrabGesture(Qt::TapGesture); - widget->ungrabGesture(Qt::TapAndHoldGesture); - //widget->ungrabGesture(Qt::PanGesture); - //widget->ungrabGesture(Qt::PinchGesture); - //widget->ungrabGesture(Qt::SwipeGesture); - //widget->ungrabGesture(m_slide_type); - //widget->ungrabGesture(m_zoom_type); -} - -bool GestureHelper::eventFilter(QObject *watched, QEvent *event) -{ - switch (event->type()) { - case QEvent::ActivationChange: { - // do not grab inactive window's gesture. - auto widget = qobject_cast<QWidget *>(watched); - if (widget->isActiveWindow()) { - widget->grabGesture(Qt::TapAndHoldGesture); - } else { - widget->ungrabGesture(Qt::TapAndHoldGesture); - } - return false; - } - case QEvent::TouchBegin: { - m_is_touching = true; - auto te = static_cast<QTouchEvent *>(event); - m_touch_points = te->touchPoints(); - m_finger_count = te->touchPoints().count(); - if (m_finger_count == 1) - m_hold_and_tap_pos = te->touchPoints().first().pos(); - else - m_hold_and_tap_pos = QPointF(); - - if (m_touch_points.count() > 2) { - m_menu_popped_timer.stop(); - } - break; - } - - case QEvent::TouchUpdate: { - auto te = static_cast<QTouchEvent *>(event); - m_touch_points = te->touchPoints(); - m_finger_count = te->touchPoints().count(); - break; - } - - case QEvent::TouchCancel: - case QEvent::TouchEnd: { - m_touch_points.clear(); - m_is_touching = false; - m_finger_count = 0; - break; - } - - case QEvent::Gesture: { - auto e = static_cast<QGestureEvent *>(event); - auto widget = qobject_cast<QWidget *>(watched); - if (!widget->isActiveWindow()) - return false; - - if (auto twoFingerSlideGesture = static_cast<UKUI::TwoFingerSlideGesture *>(e->gesture(m_slide_type))) { - //qDebug()<<"has slide gesture"; - //qDebug()<<"slide"<<twoFingerSlideGesture->state()<<twoFingerSlideGesture->direction()<<twoFingerSlideGesture->totalDelta(); - if (twoFingerSlideGesture->state() == Qt::GestureUpdated) { - // some view doesn't have scroller but also can scroll, such as process list view in ukui-system-monitor. - // we send the wheel event to trigger the scroll when slide gesture updated. - if (!QScroller::hasScroller(widget)) { - bool isHorizal = twoFingerSlideGesture->direction() == UKUI::TwoFingerSlideGesture::Horizal; - bool isVertical = twoFingerSlideGesture->direction() == UKUI::TwoFingerSlideGesture::Vertical; - if (isVertical) { - QWheelEvent we(twoFingerSlideGesture->hotSpot(), twoFingerSlideGesture->delta() * 10, Qt::NoButton, Qt::NoModifier, Qt::Vertical); - qApp->sendEvent(widget, &we); - } else if (isHorizal) { - QWheelEvent we(twoFingerSlideGesture->hotSpot(), twoFingerSlideGesture->delta() * 10, Qt::NoButton, Qt::NoModifier, Qt::Horizontal); - qApp->sendEvent(widget, &we); - } - } - } - } - - if (auto twoFingerZoomGesture = static_cast<UKUI::TwoFingerZoomGesture *>(e->gesture(m_zoom_type))) { - //qDebug()<<"has zoom gesture"<<twoFingerZoomGesture->state()<<twoFingerZoomGesture->zoomDirection()<<twoFingerZoomGesture->startPoints()<<twoFingerZoomGesture->lastPoints()<<twoFingerZoomGesture->currentPoints(); - switch (twoFingerZoomGesture->zoomDirection()) { - case UKUI::TwoFingerZoomGesture::ZoomIn: { - QWheelEvent we(twoFingerZoomGesture->hotSpot(), 100, Qt::NoButton, Qt::ControlModifier); - qApp->sendEvent(watched, &we); - break; - } - case UKUI::TwoFingerZoomGesture::ZoomOut: { - QWheelEvent we(twoFingerZoomGesture->hotSpot(), -100, Qt::NoButton, Qt::ControlModifier); - qApp->sendEvent(watched, &we); - break; - } - default: - break; - } - } - - if (auto tapGesture = static_cast<QTapGesture *>(e->gesture(Qt::TapGesture))) { - //qDebug()<<tapGesture->gestureType()<<tapGesture->position()<<tapGesture->state(); - switch (tapGesture->state()) { - case Qt::GestureStarted: - //mouse press event - break; - case Qt::GestureCanceled: - case Qt::GestureFinished: { - //mouse release event - break; - } - default: - break; - } - } - - if (auto tapAndHoldGesture = static_cast<QTapAndHoldGesture*>(e->gesture(Qt::TapAndHoldGesture))) { - //qDebug()<<tapAndHoldGesture->gestureType()<<tapAndHoldGesture->position()<<tapAndHoldGesture->state(); - if (m_menu_popped_timer.isActive()) - return false; - - m_hold_and_tap_pos = QPoint(); - - // check if there is a menu popped. - // note that the right click in a widget which has context menu - // will trigger the tap and hold gesture. I have no idea to deal - // with this case, because i didn't find how to recognize if this - // event is translated from mouse event. - if (qobject_cast<QMenu *>(watched) || qobject_cast<QMenu *>(qApp->activePopupWidget())) { - qDebug()<<"menu popped, may be right click"; - m_menu_popped = true; - } - - switch (tapAndHoldGesture->state()) { - case Qt::GestureStarted: { - if (m_menu_popped || m_is_mouse_pressed) { - return false; - } else { - m_menu_popped = true; - m_menu_popped_timer.start(); - auto pos = widget->mapFromGlobal(tapAndHoldGesture->position().toPoint()); - auto gpos = tapAndHoldGesture->position().toPoint(); - - if (m_is_native_mouse_move) - return false; - - QMouseEvent me(QMouseEvent::MouseButtonRelease, pos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); - qApp->sendEvent(widget, &me); - QContextMenuEvent ce(QContextMenuEvent::Other, pos, gpos, Qt::NoModifier); - qApp->sendEvent(widget, &ce); - } - break; - } - case Qt::GestureCanceled: - case Qt::GestureFinished: { - m_menu_popped = false; - break; - } - default: - break; - } - } - - if (auto swipeGesture = static_cast<QSwipeGesture *>(e->gesture(Qt::SwipeGesture))) { - //qDebug()<<swipeGesture->gestureType()<<swipeGesture->state()<<swipeGesture->horizontalDirection()<<swipeGesture->verticalDirection()<<swipeGesture->swipeAngle(); - } - - if (auto panGesture = static_cast<QPanGesture*>(e->gesture(Qt::PanGesture))) { - //qDebug()<<panGesture->gestureType()<<panGesture->state()<<panGesture->delta()<<panGesture->hotSpot(); - switch (panGesture->state()) { - case Qt::GestureStarted: { - auto widget = qobject_cast<QWidget *>(watched); - auto pos = widget->mapFromGlobal(QCursor::pos()); - QMouseEvent me(QMouseEvent::MouseButtonRelease, pos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); - qApp->sendEvent(widget, &me); - if (m_is_paning) { - return false; - } else { - m_is_paning = true; - } - break; - } - case Qt::GestureCanceled: - case Qt::GestureFinished: { - m_is_paning = false; - break; - } - default: - break; - } - return false; - } - - break; - } - - case QEvent::MouseMove: { - if (m_finger_count > 1) - return true; - - QMouseEvent *me = static_cast<QMouseEvent *>(event); - auto widget = static_cast<QWidget *>(watched); - if (!widget) - return false; - - //qDebug()<<me->type()<<me->pos(); - - bool isTranslatedFromTouch = me->source() == Qt::MouseEventSynthesizedByQt; - if (!isTranslatedFromTouch) { - // do not trigger tap and hold gesture handler - m_is_native_mouse_move = true; - return false; - } - m_is_native_mouse_move = false; - - // if we do a hold and tap gesture, we should not trigger mouse move event. - // so we have to ignore the small offset of finger move. - auto lastTapPoint = m_hold_and_tap_pos.toPoint(); - auto currentPoint = widget->mapTo(widget->topLevelWidget(), me->pos()); - - if (!lastTapPoint.isNull()) { - //qDebug()<<lastTapPoint<<currentPoint<<lenthSquared; - if (QRect(-50, -50, 100, 100).contains(lastTapPoint - currentPoint)) { - if (qobject_cast<QAbstractScrollArea *>(widget) || qobject_cast<QAbstractScrollArea *>(widget->parent())) - return true; - } - } - - if (m_is_paning) { - return true; - } - - return false; - } - - case QEvent::DragEnter: - case QEvent::DragMove: { - if (m_is_paning) - return true; - } - - case QEvent::MouseButtonPress: { - auto me = static_cast<QMouseEvent *>(event); - if (me->source() == Qt::MouseEventNotSynthesized) - m_is_mouse_pressed = true; - else - m_is_mouse_pressed = false; - break; - } - case QEvent::MouseButtonRelease: { - auto me = static_cast<QMouseEvent *>(event); - if (me->source() == Qt::MouseEventNotSynthesized) - m_is_mouse_pressed = false; - break; - } - - default: - break; - } - - return false; -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/gesture-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/gesture-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/gesture-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/gesture-helper.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,83 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef GESTUREHELPER_H -#define GESTUREHELPER_H - -#include <QObject> -#include <QTimer> -#include <QPointF> -#include <QTouchEvent> - -namespace UKUI { -class TwoFingerSlideGestureRecognizer; -class TwoFingerZoomGestureRecognizer; -} - -/*! - * \brief The GestureHelper class - * \note - * this class only handle hold and tap gesture for now. - */ -class GestureHelper : public QObject -{ - Q_OBJECT -public: - - explicit GestureHelper(QObject *parent = nullptr); - ~GestureHelper(); - - void registerWidget(QWidget *widget); - void unregisterWidget(QWidget *widget); - - bool eventFilter(QObject *watched, QEvent *event) override; - -private: - bool m_is_touching = false; - int m_finger_count = 0; - - QList<QTouchEvent::TouchPoint> m_touch_points; - - // hold and tap gesture - bool m_menu_popped = false; - QTimer m_menu_popped_timer; - QPointF m_hold_and_tap_pos; - bool m_is_native_mouse_move = false; - - // pan gesture - bool m_is_paning = false; - QTimer m_disable_paning_flag_delayer; - - // pinch gesture - bool m_is_pinching = false; - QTimer m_pinch_operation_delayer; - - UKUI::TwoFingerSlideGestureRecognizer *m_slider; - UKUI::TwoFingerZoomGestureRecognizer *m_zoomer; - - Qt::GestureType m_slide_type; - Qt::GestureType m_zoom_type; - - bool m_is_mouse_pressed = false; -}; - -#endif // GESTUREHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/proxy-style-plugin.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/proxy-style-plugin.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/proxy-style-plugin.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/proxy-style-plugin.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,246 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "proxy-style-plugin.h" -#include "proxy-style.h" -#include "ukui-style-settings.h" - -#include "application-style-settings.h" - -#include "black-list.h" - -#include <QApplication> -#include <QStyleFactory> -#include <QWidget> - -#include <QDebug> -#include <QDBusConnection> -#include <QDBusInterface> -#include <QDBusConnection> -#include <QLayout> - -using namespace UKUI; - -#define blackStyleChangeApp "kylin-software-center" - -ProxyStylePlugin::ProxyStylePlugin() -{ - if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { - auto settings = UKUIStyleSettings::globalInstance(); - connect(settings, &UKUIStyleSettings::changed, this, [=](const QString &key) { - if (key == "styleName" || key == "widgetThemeName" || key == "themeColor" || - key == "style-name" || key == "widget-theme-name" || key == "theme-color") { - if (blackList().contains(qAppName()) || qAppName() == "kylin-software-center.py") - return; - - //We should not swich a application theme which use internal style. - if (QApplication::style()->inherits("InternalStyle")) - return; - - auto appStyleSettings = ApplicationStyleSettings::getInstance(); - if (appStyleSettings->currentStyleStretagy() != ApplicationStyleSettings::Default) - return; - - auto styleName = settings->get("styleName").toString(); - - if (styleName == "ukui-default" || styleName == "ukui-dark" || styleName == "ukui-white" - || styleName == "ukui-black" || styleName == "ukui-light" || styleName == "ukui") { - - if (styleName == "ukui") - styleName = "ukui-default"; - else if (styleName == "ukui-black") - styleName = "ukui-dark"; - else if (styleName == "ukui-white") - styleName = "ukui-light"; - - - if (qApp->property("customStyleName").isValid()) { - if (qApp->property("customStyleName").toString() == "ukui-light") { - styleName = "ukui-light"; - } else if (qApp->property("customStyleName").toString() == "ukui-dark") { - styleName = "ukui-dark"; - } - } - - if(qAppName() != blackStyleChangeApp) - qApp->setStyle(new ProxyStyle(styleName)); - return; - } - - //other style - for (auto keys : QStyleFactory::keys()) { - if (styleName.toLower() == keys.toLower()) { - qApp->setStyle(new QProxyStyle(styleName)); - return; - } - } - - //default style fusion - qApp->setStyle(new QProxyStyle("fusion")); - return; - } - - if (key == "systemPalette") { - onSystemPaletteChanged(); - } - - if (key == "useSystemPalette") { - onSystemPaletteChanged(); - } - }); - } - - QDBusInterface *interFace = new QDBusInterface("com.kylin.statusmanager.interface", - "/", - "com.kylin.statusmanager.interface", - QDBusConnection::sessionBus()); - if(interFace->isValid()){ - connect(interFace, SIGNAL(mode_change_signal(bool)), this, SLOT(tableModeChanged(bool))); - } -} - -QStyle *ProxyStylePlugin::create(const QString &key) -{ - if (blackList().contains(qAppName())) - return new QProxyStyle("fusion"); - if (key == "ukui") { - if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { - auto styleName = UKUIStyleSettings::globalInstance()->get("styleName").toString(); - - if (styleName == "ukui-default" || styleName == "ukui-dark" - || styleName == "ukui-white" || styleName == "ukui-black" - || styleName == "ukui-light" || styleName == "ukui") { - - if (styleName == "ukui") - styleName = "ukui-default"; - else if (styleName == "ukui-black") - styleName = "ukui-dark"; - else if (styleName == "ukui-white") - styleName = "ukui-light"; - - if (qApp->property("customStyleName").isValid()) { - if (qApp->property("customStyleName").toString() == "ukui-light") { - styleName = "ukui-light"; - } else if (qApp->property("customStyleName").toString() == "ukui-dark") { - styleName = "ukui-dark"; - } - } - - return new ProxyStyle(styleName); - } - - for (auto styleName : QStyleFactory::keys()) { - if (styleName.toLower() == styleName.toLower()) - return new QProxyStyle(styleName); - } - } - - return new QProxyStyle("fusion"); - } - return new QProxyStyle("fusion"); -} - -const QStringList ProxyStylePlugin::blackList() -{ - return blackAppList(); -} - -void ProxyStylePlugin::onSystemPaletteChanged() -{ - bool useSystemPalette = UKUIStyleSettings::globalInstance()->get("useSystemPalette").toBool(); - if (useSystemPalette) { - auto data = UKUIStyleSettings::globalInstance()->get("systemPalette"); - if (data.isNull()) - return; - auto palette = qvariant_cast<QPalette>(data); - QApplication::setPalette(palette); - } else { - auto palette = QApplication::style()->standardPalette(); - QApplication::setPalette(palette); - } -} - -void ProxyStylePlugin::tableModeChanged(bool isTableMode) -{ - if (blackList().contains(qAppName())) - return; - - //We should not swich a application theme which use internal style. - if (QApplication::style()->inherits("InternalStyle")) - return; - - auto appStyleSettings = ApplicationStyleSettings::getInstance(); - if (appStyleSettings->currentStyleStretagy() != ApplicationStyleSettings::Default) - return; - - auto settings = UKUIStyleSettings::globalInstance(); - auto styleName = settings->get("styleName").toString(); - - if (styleName == "ukui-default" || styleName == "ukui-dark" || styleName == "ukui-white" - || styleName == "ukui-black" || styleName == "ukui-light" || styleName == "ukui") - - { - if (qApp->property("customStyleName").isValid()) { - if (qApp->property("customStyleName").toString() == "ukui-light") { - styleName = "ukui-light"; - } else if (qApp->property("customStyleName").toString() == "ukui-dark") { - styleName = "ukui-dark"; - } - } - - foreach (QWidget *widget, qApp->allWidgets()) { - widget->updateGeometry(); - } - qApp->setProperty("isInitial", false); - if(qAppName() != blackStyleChangeApp) - qApp->setStyle(new ProxyStyle(styleName)); - } - /* - foreach (QObject *obj, qApp->children()) { - if(qobject_cast<const QVBoxLayout*>(obj))//obj->inherits("QVBoxLayout")) - { - auto *vlayout = qobject_cast<QVBoxLayout *>(obj); - qDebug() << "vlayout..." << vlayout->spacing(); - - //layout->update(); - } - else if(qobject_cast<QHBoxLayout *>(obj)) - { - auto *hlayout = qobject_cast<QHBoxLayout *>(obj); - qDebug() << "hlayout..." << hlayout->spacing(); - - //layout->update(); - } - } - foreach (QWidget *widget, qApp->topLevelWidgets()) { - qDebug() << "widget size...." << widget->size() << widget->minimumSizeHint() << widget->minimumSize(); - widget->adjustSize(); - if(widget->layout() != nullptr) - { - qDebug() << "layoutSpace...." << widget->layout()->spacing(); - } -// if(widget->size() != widget->minimumSizeHint()) -// widget->setGeometry(widget->x(), widget->y(), widget->minimumSizeHint().width(), widget->minimumSizeHint().height()); - } -*/ - return; -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/proxy-style-plugin.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/proxy-style-plugin.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/proxy-style-plugin.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/proxy-style-plugin.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,55 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef PROXYSTYLEPLUGIN_H -#define PROXYSTYLEPLUGIN_H - -#include <QStylePlugin> - -namespace UKUI { - -class ProxyStylePlugin : public QStylePlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID QStyleFactoryInterface_iid FILE "ukui-style.json") -public: - ProxyStylePlugin(); - - QStyle *create(const QString &key) override; - - const QStringList blackList(); - -protected: - void onSystemPaletteChanged(); - -signals: - -public slots: - void tableModeChanged(bool isTableMode); - -private: - -}; - -} - -#endif // PROXYSTYLEPLUGIN_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/proxy-style.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/proxy-style.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/proxy-style.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/proxy-style.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,285 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "proxy-style.h" -#include <QWidget> -#include "blur-helper.h" -#include "gesture-helper.h" -#include "window-manager.h" -#include "application-style-settings.h" - -#include "ukui-style-settings.h" - -#include <QApplication> -#include <QMenu> - -#include <QWindow> - -#include <QLabel> -#include <QWizardPage> - -#include <QStyleHints> - -#include <QDebug> - -#include <QLibrary> - -using namespace UKUI; - -ProxyStyle::ProxyStyle(const QString &key) : QProxyStyle(key == nullptr? "fusion": key) -{ - auto settings = UKUIStyleSettings::globalInstance(); - if (settings) { -// m_use_custom_highlight_color = settings->get("useCustomHighlightColor").toBool(); -// m_custom_highlight_color = QColor(settings->get("customHighlightColor").toString()); - m_blink_cursor = settings->get("cursorBlink").toBool(); - m_blink_cursor_time = settings->get("cursorBlinkTime").toInt(); - qApp->styleHints()->setCursorFlashTime(m_blink_cursor_time); - connect(settings, &QGSettings::changed, this, [=](const QString &key) { - if (key == "cursorBlink") { - m_blink_cursor = settings->get("cursorBlink").toBool(); - if (qApp->activeWindow()) { - qApp->activeWindow()->update(); - } - if (qApp->activeModalWidget()) { - qApp->activeModalWidget()->update(); - } - if (qApp->activePopupWidget()) { - qApp->activePopupWidget()->update(); - } - } - if (key == "cursorBlinkTime") { - m_blink_cursor_time = settings->get("cursorBlinkTime").toInt(); - qApp->styleHints()->setCursorFlashTime(m_blink_cursor_time); - } - }); - -// connect(settings, &QGSettings::changed, this, [=](const QString &key) { -// if (key == "useCustomHighlightColor") { -// m_use_custom_highlight_color = settings->get("useCustomHighlightColor").toBool(); -// } -// if (key == "customHighlightColor") { -// m_custom_highlight_color = QColor(settings->get("customHighlightColor").toString()); -// } -// if (m_use_custom_highlight_color) { -// //qApp->setStyle(new ProxyStyle(key)); -// auto pal = QApplication::palette(); -// pal.setColor(QPalette::Active, QPalette::Highlight, m_custom_highlight_color); -// pal.setColor(QPalette::Inactive, QPalette::Highlight, m_custom_highlight_color); -// pal.setColor(QPalette::Disabled, QPalette::Highlight, Qt::transparent); - -// qApp->setPalette(pal); -// qApp->paletteChanged(pal); -// } else { -// auto pal = qApp->style()->standardPalette(); -// qApp->setPalette(pal); -// qApp->paletteChanged(pal); -// } -// }); - - - } else { - qWarning("org.ukui.style is null!"); - } - - m_blur_helper = new BlurHelper(this); -// m_gesture_helper = new GestureHelper(this); - m_window_manager = new WindowManager(this); - - if (!baseStyle()->inherits("Qt5UKUIStyle")) { - m_blur_helper->onBlurEnableChanged(false); - } - - m_app_style_settings = ApplicationStyleSettings::getInstance(); - if (m_app_style_settings) { - connect(m_app_style_settings, &ApplicationStyleSettings::colorStretageChanged, [=](const ApplicationStyleSettings::ColorStretagy &stretagy) { - /*! - \todo implemet palette switch. - */ - switch (stretagy) { - case ApplicationStyleSettings::System: { - break; - } - case ApplicationStyleSettings::Bright: { - break; - } - case ApplicationStyleSettings::Dark: { - break; - } - default: - break; - } - }); - } else { - qWarning("org.ukui.style is null!"); - } - - if (QGSettings::isSchemaInstalled("org.ukui.peripherals-mouse")) { - QGSettings *settings = new QGSettings("org.ukui.peripherals-mouse"); - if (settings->keys().contains("doubleClick")) { - int mouse_double_click_time = settings->get("doubleClick").toInt(); - if (mouse_double_click_time != qApp->doubleClickInterval()) { - qApp->setDoubleClickInterval(mouse_double_click_time); - } - connect(settings, &QGSettings::changed, qApp, [=] (const QString &key) { - if (key == "doubleClick") { - int mouse_double_click_time = settings->get("doubleClick").toInt(); - if (mouse_double_click_time != qApp->doubleClickInterval()) { - qApp->setDoubleClickInterval(mouse_double_click_time); - } - } - }); - } else { - qWarning("org.ukui.peripherals-mouse no doubleClick keys!"); - } - } else { - qWarning("org.ukui.peripherals-mouse is null!"); - } -} - -bool ProxyStyle::eventFilter(QObject *obj, QEvent *e) -{ - return false; -} - -int ProxyStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const -{ - //FIXME: - switch (hint) { - case QStyle::SH_Menu_Scrollable: { - return 1; - } - case QStyle::SH_BlinkCursorWhenTextSelected: { - return m_blink_cursor; - } - default: - return QProxyStyle::styleHint(hint, option, widget, returnData); - } -} - -void ProxyStyle::polish(QWidget *widget) -{ - QLibrary gestureLib("libqt5-gesture-extensions"); - if (widget && gestureLib.load()) { - typedef void (*RegisterFun) (QWidget*, QObject*); - auto fun = (RegisterFun) gestureLib.resolve("registerWidget"); - fun(widget, widget); - } - - if (!baseStyle()->inherits("Qt5UKUIStyle")) - return QProxyStyle::polish(widget); - - QProxyStyle::polish(widget); - - if(!widget) - return; - if (qAppName() == "ukui-menu" && !widget->inherits("QMenu")) { - return; - } - -// m_gesture_helper->registerWidget(widget); - - /*! - \todo - register transparent widget to blurhelper with better way. - for now it will let some transparent widget show in error. - i have to avoid them by limitting widget's class name, - but that is no my expected. - */ - if (widget->testAttribute(Qt::WA_TranslucentBackground) && widget->isTopLevel()) { - //FIXME: -#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) - m_blur_helper->registerWidget(widget); -#endif - - /* - if (QString(widget->metaObject()->className())=="QMenu" || - widget->inherits("Peony::DirectoryViewMenu") || - widget->inherits("Peony::DesktopMenu")) { - m_blur_helper->registerWidget(widget); - } - */ - } - - if (widget->isWindow()) { - auto var = widget->property("useStyleWindowManager"); - - if (var.isNull()) { - m_window_manager->registerWidget(widget); - } else { - if (var.toBool()) { - m_window_manager->registerWidget(widget); - } - } - } - - widget->installEventFilter(this); -} - -void ProxyStyle::unpolish(QWidget *widget) -{ - QLibrary gestureLib("libqt5-gesture-extensions"); - if (widget && gestureLib.load()) { - typedef void (*UnRegisterFun) (QWidget*, QObject*); - auto fun = (UnRegisterFun) gestureLib.resolve("unregisterWidget"); - fun(widget, widget); - } - - if (!baseStyle()->inherits("Qt5UKUIStyle")) - return QProxyStyle::unpolish(widget); - - if (qAppName() == "ukui-menu" && !widget->inherits("QMenu")) { - return; - } - -// m_gesture_helper->unregisterWidget(widget); - - //return QProxyStyle::unpolish(widget); - widget->removeEventFilter(this); - - //FIXME: - if (widget->testAttribute(Qt::WA_TranslucentBackground) && widget->isTopLevel()) { -#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) - m_blur_helper->unregisterWidget(widget); -#endif - } - - if (widget->isWindow()) { - auto var = widget->property("useStyleWindowManager"); - - if (var.isNull()) { - m_window_manager->unregisterWidget(widget); - } else { - if (var.toBool()) { - m_window_manager->unregisterWidget(widget); - } - } - } - - QProxyStyle::unpolish(widget); -} - -void ProxyStyle::polish(QPalette &pal) -{ - QProxyStyle::polish(pal); -} - diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/proxy-style.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/proxy-style.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/proxy-style.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/proxy-style.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,84 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef PROXYSTYLE_H -#define PROXYSTYLE_H - -#include "proxy-style_global.h" -#include <QProxyStyle> - -class BlurHelper; -class GestureHelper; -class WindowManager; - -class ApplicationStyleSettings; - -namespace UKUI { - -/*! - * \brief The ProxyStyle class - * \details - * ProxyStyle is direct UKUI platform theme style for provide style-management - * in ukui platform. - * - * ProxyStyle is not a completed style, and it must be created completedly form another - * QStyle (exclude itself), such as fusion, oxygen, etc. - * - * UKUI style provide a global blur effect for qt windows, but it does not mean all window - * will be blurred. In fact, you should make your application window be transparent first. - * If you do not want your transparent window be blurred, you should add your class to exception, - * which cached in gsettings org.ukui.style blur-exception-classes. - */ -class PROXYSTYLESHARED_EXPORT ProxyStyle : public QProxyStyle -{ - Q_OBJECT -public: - explicit ProxyStyle(const QString &key); - virtual ~ProxyStyle() {} - - //debuger - bool eventFilter(QObject *obj, QEvent *e); - - int styleHint(StyleHint hint, - const QStyleOption *option, - const QWidget *widget, - QStyleHintReturn *returnData) const; - - void polish(QWidget *widget); - void unpolish(QWidget *widget); - - void polish(QPalette &pal); - -private: - BlurHelper *m_blur_helper; - GestureHelper *m_gesture_helper; - WindowManager *m_window_manager; - - ApplicationStyleSettings *m_app_style_settings; - - bool m_blink_cursor = true; - int m_blink_cursor_time = 1200; -}; - -} - -#endif // PROXYSTYLE_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/proxy-style.pro qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/proxy-style.pro --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/proxy-style.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/proxy-style.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,53 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2020-01-02T08:39:47 -# -#------------------------------------------------- - -QT += widgets KWindowSystem x11extras KWaylandClient dbus - -TARGET = ukui-proxy-style -TEMPLATE = lib -CONFIG += plugin c++11 link_pkgconfig -PKGCONFIG += gsettings-qt xcb - -#include(../../libqt5-ukui-style/settings/settings.pri) -include(../../libqt5-ukui-style/libqt5-ukui-style.pri) - -DEFINES += PROXYSTYLE_LIBRARY - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which has been marked as deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS -#DEFINES += QT_NO_DEBUG_OUTPUT -DEFINES += QT_MESSAGELOGCONTEXT - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -SOURCES += \ - gesture-helper.cpp \ - proxy-style.cpp \ - proxy-style-plugin.cpp \ - blur-helper.cpp \ - window-manager.cpp - -HEADERS += \ - gesture-helper.h \ - proxy-style.h \ - proxy-style_global.h \ - proxy-style-plugin.h \ - blur-helper.h \ - window-manager.h - -unix { - target.path = $$[QT_INSTALL_PLUGINS]/styles - INSTALLS += target -} - -DISTFILES += \ - ukui-style.json diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/proxy-style_global.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/proxy-style_global.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/proxy-style_global.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/proxy-style_global.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,34 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef PROXYSTYLE_GLOBAL_H -#define PROXYSTYLE_GLOBAL_H - -#include <QtCore/qglobal.h> - -#if defined(PROXYSTYLE_LIBRARY) -# define PROXYSTYLESHARED_EXPORT Q_DECL_EXPORT -#else -# define PROXYSTYLESHARED_EXPORT Q_DECL_IMPORT -#endif - -#endif // PROXYSTYLE_GLOBAL_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/ukui-style.json qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/ukui-style.json --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/ukui-style.json 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/ukui-style.json 1970-01-01 08:00:00.000000000 +0800 @@ -1,3 +0,0 @@ -{ - "Keys": [ "ukui" ] -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/window-manager.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/window-manager.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/window-manager.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/window-manager.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,314 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "window-manager.h" - -#include <QWidget> -#include <QMouseEvent> - -#include <KWindowSystem> -#include <NETWM> -#include <QX11Info> -#include <xcb/xcb.h> - -#include <QApplication> -#include <QWindow> - -#include <QDebug> - -WindowManager::WindowManager(QObject *parent) : QObject(parent) -{ - m_timer.setTimerType(Qt::PreciseTimer); - m_timer.setInterval(100); - m_timer.setSingleShot(true); - m_start_point = QPoint(0, 0); - - qApp->installEventFilter(new AppEventFilter(this)); - - if (QX11Info::isPlatformX11()) - return; - - using namespace KWayland::Client; - m_connection = ConnectionThread::fromApplication(qApp); - if (!m_connection) - return; - m_registry = new Registry(this); - m_registry->create(m_connection); - - connect(m_registry, &KWayland::Client::Registry::interfaceAnnounced, this, [=](){ - const auto interface = m_registry->interface( Registry::Interface::Seat ); - if( interface.name != 0 ) { - m_seat = m_registry->createSeat( interface.name, interface.version, this ); - connect(m_seat, &Seat::hasPointerChanged, this, [=](bool pointerChanged){ - if (pointerChanged) { - if (!m_pointer) { - m_pointer = m_seat->createPointer(this); - connect(m_pointer, &KWayland::Client::Pointer::buttonStateChanged, this, [=](int serial){ - m_serial = serial; - }); - } - } else { - delete m_pointer; - m_pointer = nullptr; - } - }); - } - }); - - m_registry->setup(); - m_connection->roundtrip(); -} - -void WindowManager::registerWidget(QWidget *w) -{ - if (dragable = isDragable(w)) { - w->removeEventFilter(this); - w->installEventFilter(this); - } -} - -void WindowManager::unregisterWidget(QWidget *w) -{ - if (dragable) - w->removeEventFilter(this); -} - -bool WindowManager::eventFilter(QObject *obj, QEvent *e) -{ - //qDebug()<<e->type(); - switch (e->type()) { - case QEvent::MouseButtonPress: { - QMouseEvent *event = static_cast<QMouseEvent*>(e); - - if (event->button() == Qt::LeftButton) { - // If the cursor is not normal arrow cursor, - // we should consider there is another excepted operation - // which current widget hope do. So we won't trigger - // the window move event. - QWidget *w = qobject_cast<QWidget *>(obj); - if (w->cursor().shape() != Qt::CursorShape::ArrowCursor) - return false; - - buttonPresseEvent(obj, event); - return false; - } - return false; - } - case QEvent::MouseMove: { - //if (QWidget::mouseGrabber()) return false; - QMouseEvent *event = static_cast<QMouseEvent*>(e); - - /*! \note In x11, accuracy of the MouseEvent translated from TouchEvent is not - * consistent with the accuracy of the native MouseEvent(TouchEvent is a decimal - * and MouseEvent is an integer). - * When the touch is pressed, if the mouse clicks the right button, Qt will think that - * the positions of the two clicks are inconsistent, and will send a MouseMoveEvent, - * the source of this MouseMoveEvent is not MouseEventSynthesizedByQt, so this MouseMoveEvent - * will not tirgger w->grabMouse(), window will be grabbed by kwin but no TouchEndEvent is received - * Therefore, the MouseMoveEvent is filtered out here if the moving distance is too small. - * \return return true because some borderless windows handle window dragging separately, - * if return false will cause these windows to behave abnormally - * \author wangweinan@kylinos.cn - */ - if (qAbs(event->pos().x() - m_start_point.x()) < 2 && - qAbs(event->pos().y() - m_start_point.y()) < 2) { - return true; - } - - //move request - mouseMoveEvent(obj, event); - return false; - } - case QEvent::MouseButtonRelease: { - QMouseEvent *event = static_cast<QMouseEvent*>(e); - mouseReleaseEvent(obj, event); - return false; - } - case QEvent::Move: { - if (m_current_obj && m_is_dragging) { - //qDebug()<<"drag end"; - endDrag(); - } else { - //qDebug()<<"move"; - } - return false; - } - default: - return false; - } -} - -void WindowManager::buttonPresseEvent(QObject *obj, QMouseEvent *e) -{ - //qDebug()<<"mouse press event"; - endDrag(); - QWidget *w = qobject_cast<QWidget*>(obj); - //NOTE: We have to skip the border for resize event. - auto pos = w->mapFromGlobal(e->globalPos()); - - //title active height set 48px - QRect activeRect(0, 0, w->width(), 48); - if (!activeRect.contains(pos)) { - //qDebug()<<"skip move event"; - return; - } -// if (!w->rect().adjusted(10, 10, -10, -10).contains(pos)) { -// //qDebug()<<"skip move event"; -// return; -// } - - - m_prepared_to_drag = true; - m_is_dragging = false; - m_current_obj = obj; - m_start_point = e->pos(); - m_timer.start(); -} - -void WindowManager::mouseMoveEvent(QObject *obj, QMouseEvent *e) -{ - //qDebug()<<"mouse move event"; - - if (!m_prepared_to_drag) - return; - - QWidget *w = qobject_cast<QWidget*>(obj); - const QPoint native = e->globalPos(); - qreal dpiRatio = qApp->devicePixelRatio(); - if (QX11Info::isPlatformX11()) { - if (m_is_dragging) - return; - -// qDebug()<<"x11 move start"; - auto connection = QX11Info::connection(); - xcb_ungrab_pointer(connection, XCB_TIME_CURRENT_TIME); - NETRootInfo(connection, NET::WMMoveResize).moveResizeRequest(w->winId(), native.x() * dpiRatio, native.y() * dpiRatio, NET::Move); -// qDebug()<<"x11 move end"; - - if (e->source() == Qt::MouseEventSynthesizedByQt) { - if (!w->mouseGrabber()) { - //! \note Under XI, grabMouse will grab touch devices at the same time. - //! When the touch device grabbing changes, xserver will send TouchEndEvent - //! to the client that monitors the touch sequence. - //! \see qtbase QXcbConnection::xi2SetMouseGrabEnabled - w->grabMouse(); - w->releaseMouse(); - } - } - - xcb_button_release_event_t* event = new xcb_button_release_event_t; - memset(event, 0x00, sizeof(xcb_button_release_event_t)); - event->response_type = XCB_BUTTON_RELEASE; - event->event = w->winId(); - event->time = QX11Info::getTimestamp(); - event->same_screen = 1; - event->root = QX11Info::appRootWindow(); - event->root_x = native.x(); - event->root_y = native.y(); - event->event_x = 0; - event->event_y = 0; - event->child = 0; - event->state = 0; - event->detail = XCB_BUTTON_INDEX_1; - - xcb_send_event(connection, false, w->winId(), XCB_EVENT_MASK_BUTTON_RELEASE, (char *) event); - delete event; - - xcb_flush(connection); - - m_is_dragging = true; - - m_timer.start(); - } else { - auto widget = qobject_cast<QWidget *>(obj); - auto topLevel = widget->topLevelWidget(); - -#if (QT_VERSION >= QT_VERSION_CHECK(5,15,0)) - topLevel->windowHandle()->startSystemMove(); -#else - auto shellSurface = KWayland::Client::ShellSurface::fromWindow(topLevel->windowHandle()); - if (!shellSurface) - return; - shellSurface->requestMove(m_seat, m_serial); -#endif - - } - - return; -} - -void WindowManager::mouseReleaseEvent(QObject *obj, QMouseEvent *e) -{ - //qDebug()<<"mouse release event"; - endDrag(); -} - -void WindowManager::endDrag() -{ - m_is_dragging = false; - m_current_obj = nullptr; - m_start_point = QPoint(0, 0); - m_timer.stop(); -} - -bool WindowManager::isDragable(QWidget *widget) -{ - if (widget && widget->isWindow()) { - if ((widget->windowFlags() & Qt::Popup) == Qt::Popup) { - if ((widget->windowFlags() & Qt::Tool) == Qt::Tool) - return true; - return false; - } - return true; - } else { - return false; - } -} - - - -// AppEventFilter -AppEventFilter::AppEventFilter(WindowManager *parent) : QObject(parent) -{ - m_wm = parent; -} - -bool AppEventFilter::eventFilter(QObject *obj, QEvent *e) -{ - if (e->type() == QEvent::MouseButtonRelease) { - m_wm->m_prepared_to_drag = false; - m_wm->m_is_dragging = false; - m_wm->m_current_obj = nullptr; - m_wm->m_timer.stop(); - m_wm->m_start_point = QPoint(); - } - -// if (m_wm->m_is_dragging && m_wm->m_current_obj && (e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseMove)) { -// QMouseEvent mouseEvent(QEvent::MouseButtonRelease, -// m_wm->m_start_point, -// Qt::LeftButton, -// Qt::LeftButton, -// Qt::NoModifier); -// qApp->sendEvent(m_wm->m_current_obj, &mouseEvent); -// } - return false; -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/window-manager.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/window-manager.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/proxy-style/window-manager.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/proxy-style/window-manager.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,97 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef WINDOWMANAGER_H -#define WINDOWMANAGER_H - -#include <QObject> -#include <QTimer> -#include <QPoint> - -#include <KWayland/Client/shell.h> -#include <KWayland/Client/seat.h> -#include <KWayland/Client/registry.h> -#include <KWayland/Client/connection_thread.h> -#include <KWayland/Client/pointer.h> - -class QMouseEvent; -class AppEventFilter; - -/*! - * \brief The WindowManager class - * \details - * This class is use to help window management. - * There are some qt's windows, such as frameless window, could not - * move and move resize by it self. Through registering widget to window - * manager, we can let them movable and can be maximum/half-maximum like - * other normal window. - */ -class WindowManager : public QObject -{ - friend class AppEventFilter; - Q_OBJECT -public: - explicit WindowManager(QObject *parent = nullptr); - - void registerWidget(QWidget *w); - void unregisterWidget(QWidget *w); - - bool eventFilter(QObject *obj, QEvent *e); - - void buttonPresseEvent(QObject *obj, QMouseEvent *e); - void mouseMoveEvent(QObject *obj, QMouseEvent *e); - void mouseReleaseEvent(QObject *obj, QMouseEvent *e); - -protected: - void endDrag(); - -private: - QObject *m_current_obj = nullptr; - bool m_is_dragging = false; - QTimer m_timer; - QPoint m_start_point; - - bool m_prepared_to_drag = false; - bool isDragable(QWidget *widget); - bool dragable = true; - - KWayland::Client::ConnectionThread *m_connection = nullptr; - KWayland::Client::Registry *m_registry = nullptr; - KWayland::Client::Seat *m_seat = nullptr; - KWayland::Client::Pointer *m_pointer = nullptr; - int m_serial = 0; -}; - -class AppEventFilter : public QObject -{ - friend class WindowManager; - Q_OBJECT -private: - explicit AppEventFilter(WindowManager *parent); - ~AppEventFilter() {} - - bool eventFilter(QObject *obj, QEvent *e); - - WindowManager *m_wm = nullptr; -}; - -#endif // WINDOWMANAGER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/animations.pri qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/animations.pri --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/animations.pri 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/animations.pri 1970-01-01 08:00:00.000000000 +0800 @@ -1,38 +0,0 @@ -INCLUDEPATH += $$PWD - -HEADERS += \ - $$PWD/config-box-animator.h \ - $$PWD/config-box-animation-helper.h \ - $$PWD/config-button-animator.h \ - $$PWD/config-button-animation-helper.h \ - $$PWD/config-progressbar-animation-helper.h \ - $$PWD/config-progressbar-animation.h \ - $$PWD/config-scrollbar-animation-helper.h \ - $$PWD/config-tab-widget-animation-helper.h \ - $$PWD/config-radiobutton-animation-helper.h \ - $$PWD/config-radiobutton-animator.h \ - $$PWD/config-checkbox-animator.h \ - $$PWD/config-checkbox-animation-helper.h \ - $$PWD/config-slider-animator.h \ - $$PWD/config-slider-animation-helper.h \ - $$PWD/config-tree-animator.h \ - $$PWD/config-tree-animation-helper.h - -SOURCES += \ - $$PWD/config-box-animator.cpp \ - $$PWD/config-box-animation-helper.cpp \ - $$PWD/config-button-animation-helper.cpp \ - $$PWD/config-button-animator.cpp \ - $$PWD/config-progressbar-animation-helper.cpp \ - $$PWD/config-progressbar-animation.cpp \ - $$PWD/config-scrollbar-animation-helper.cpp \ - $$PWD/config-tab-widget-animation-helper.cpp \ - $$PWD/config-radiobutton-animator.cpp \ - $$PWD/config-radiobutton-animation-helper.cpp \ - $$PWD/config-checkbox-animator.cpp \ - $$PWD/config-checkbox-animation-helper.cpp \ - $$PWD/config-slider-animator.cpp \ - $$PWD/config-slider-animation-helper.cpp \ - $$PWD/config-tree-animator.cpp \ - $$PWD/config-tree-animation-helper.cpp - diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-box-animation-helper.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -24,8 +24,8 @@ #define BOXANIMATIONHELPER_H #include <QObject> -#include "animation-helper.h" -#include "animator-iface.h" +#include "animations/animation-helper.h" +#include "animations/animator-iface.h" #include "config-box-animator.h" namespace UKUIConfigStyleSpace { diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-box-animator.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -27,7 +27,8 @@ #include <QVariantAnimation> #include <QParallelAnimationGroup> -#include "animator-iface.h" +#include "animations/animator-iface.h" + namespace UKUIConfigStyleSpace { diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-button-animation-helper.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -24,8 +24,8 @@ #define BUTTONANIMATIONHELPER_H #include <QObject> -#include "animation-helper.h" -#include "animator-iface.h" +#include "animations/animation-helper.h" +#include "animations/animator-iface.h" #include "config-button-animator.h" namespace UKUIConfigStyleSpace { diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-button-animator.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -27,7 +27,8 @@ #include <QVariantAnimation> #include <QParallelAnimationGroup> -#include "animator-iface.h" +#include "animations/animator-iface.h" + diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animation-helper.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -24,8 +24,8 @@ #define CHECKBOXANIMATIONHELPER_H #include <QObject> -#include "animation-helper.h" -#include "animator-iface.h" +#include "animations/animation-helper.h" +#include "animations/animator-iface.h" #include "config-checkbox-animator.h" namespace UKUIConfigStyleSpace { diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -67,7 +67,7 @@ m_onScale->setStartValue(0.0); m_onScale->setEndValue(1.0); m_onScale->setDuration(260); - m_onScale->setEasingCurve(QEasingCurve::InOutSine); + m_onScale->setEasingCurve(QEasingCurve::OutCubic); addAnimation(m_onScale); connect(m_onScale, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { w->update(); @@ -80,7 +80,7 @@ m_onOpacity->setStartValue(0.0); m_onOpacity->setEndValue(1.0); m_onOpacity->setDuration(120); - m_onOpacity->setEasingCurve(QEasingCurve::InOutSine); + m_onOpacity->setEasingCurve(QEasingCurve::OutCubic); addAnimation(m_onOpacity); connect(m_onOpacity, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { w->update(); @@ -93,7 +93,7 @@ m_onBase->setStartValue(0.0); m_onBase->setEndValue(1.0); m_onBase->setDuration(180); - m_onBase->setEasingCurve(QEasingCurve::InOutSine); + m_onBase->setEasingCurve(QEasingCurve::OutCubic); addAnimation(m_onBase); connect(m_onBase, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { w->update(); diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-checkbox-animator.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -27,7 +27,8 @@ #include <QVariantAnimation> #include <QParallelAnimationGroup> -#include "animator-iface.h" +#include "animations/animator-iface.h" + namespace UKUIConfigStyleSpace { diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation-helper.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-progressbar-animation.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animation-helper.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -24,8 +24,8 @@ #define RADIOBUTTONANIMATIONHELPER_H #include <QObject> -#include "animation-helper.h" -#include "animator-iface.h" +#include "animations/animation-helper.h" +#include "animations/animator-iface.h" #include "config-radiobutton-animator.h" namespace UKUIConfigStyleSpace { diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-radiobutton-animator.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -27,7 +27,8 @@ #include <QVariantAnimation> #include <QParallelAnimationGroup> -#include "animator-iface.h" +#include "animations/animator-iface.h" + namespace UKUIConfigStyleSpace { diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-scrollbar-animation-helper.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -24,7 +24,7 @@ #define SCROLLBARANIMATIONHELPER_H #include <QObject> -#include "animation-helper.h" +#include "animations/animation-helper.h" namespace UKUIConfigStyleSpace { diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-slider-animation-helper.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -24,7 +24,7 @@ #define SLIDERANIMATIONHELPER_H #include <QObject> -#include "animation-helper.h" +#include "animations/animation-helper.h" namespace UKUIConfigStyleSpace { diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -108,7 +108,7 @@ m_silder_move_position->setStartValue(0.0); m_silder_move_position->setEndValue(1.0); m_silder_move_position->setDuration(150); - m_silder_move_position->setEasingCurve(QEasingCurve::Linear); + m_silder_move_position->setEasingCurve(QEasingCurve::InOutCubic); addAnimation(m_silder_move_position); connect(m_slider_opacity, &QVariantAnimation::valueChanged, w, [=]() { diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-slider-animator.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -24,7 +24,8 @@ #define SLIDERANIMATOR_H #include <QParallelAnimationGroup> -#include "animator-iface.h" +#include "animations/animator-iface.h" + class QVariantAnimation; diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,12 +16,12 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ #include "config-tab-widget-animation-helper.h" -#include "tabwidget/ukui-tabwidget-default-slide-animator.h" +#include "animations/tabwidget/ukui-tabwidget-default-slide-animator.h" using namespace UKUIConfigStyleSpace; diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-tab-widget-animation-helper.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -24,7 +24,7 @@ #define TABWIDGETANIMATIONHELPER_H #include <QObject> -#include "animation-helper.h" +#include "animations/animation-helper.h" namespace UKUIConfigStyleSpace { diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,10 +16,11 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ + #include "config-tree-animation-helper.h" #include "config-tree-animator.h" diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-tree-animation-helper.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -24,7 +24,7 @@ #define TREEANIMATIONHELPER_H #include <QObject> -#include "animation-helper.h" +#include "animations/animation-helper.h" namespace UKUIConfigStyleSpace { diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -279,17 +279,17 @@ 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 -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/animations/config-tree-animator.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -24,7 +24,9 @@ #define TREEANIMATOR_H #include <QParallelAnimationGroup> -#include "animator-iface.h" +#include <QModelIndex> +#include "animations/animator-iface.h" + class QVariantAnimation; @@ -63,8 +65,8 @@ QVariantAnimation *m_expand = nullptr; QVariantAnimation *m_collaps = nullptr; - QString m_expandItem; - QString m_collapsItem; + QModelIndex m_expandIndex; + QModelIndex m_collapsIndex; }; } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/config-shadow-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,10 +16,11 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ + #include "config-shadow-helper.h" #include <QPainter> @@ -36,6 +37,8 @@ #include <QApplication> #include <QDebug> +#include <QMenu> +#include "settings/ukui-style-settings.h" #define INNERRECT_WIDTH 1 @@ -107,7 +110,7 @@ } } - auto shadow = getShadow(shadowColor, shadowBorder, darkness, radius.x(), radius.y(), radius.z(), radius.w()); + auto shadow = getShadow(shadowColor, shadowBorder, darkness, widget, radius.x(), radius.y(), radius.z(), radius.w()); shadow->setPadding(QMargins(margins.x(), margins.y(), margins.z(), margins.w())); shadow->setWindow(widget->windowHandle()); shadow->create(); @@ -138,7 +141,7 @@ } } -QPixmap ConfigShadowHelper::getShadowPixmap(QColor color, /*ConfigShadowHelper::State state,*/ int shadow_border, qreal darkness, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight) +QPixmap ConfigShadowHelper::getShadowPixmap(QColor color, /*ConfigShadowHelper::State state,*/ int shadow_border, qreal darkness, QWidget* widget, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight) { int maxTopRadius = qMax(borderRadiusTopLeft, borderRadiusTopRight); int maxBottomRadius = qMax(borderRadiusBottomLeft, borderRadiusBottomRight); @@ -154,9 +157,15 @@ QPoint currentPos; int qAppMaxradius = maxRadius; - if(qApp->style()->property("maxRadius").isValid()){ - qAppMaxradius = qApp->style()->property("maxRadius").toInt(); -// qDebug() << "radius...." << qAppMaxradius; + if(widget){ + if(widget->inherits("QComboBoxPrivateContainer") || widget->inherits("QMenu")){ + auto settings = UKUIStyleSettings::globalInstance(); + if(settings && settings->keys().contains("windowRadius")) + qAppMaxradius = settings->get("windowRadius").toInt(); + } + else if(widget->property("maxRadius").isValid()) + qAppMaxradius = widget->property("maxRadius").toInt(); + // qDebug() << "radius...." << qAppMaxradius; } // move to top left arc start point windowRelativePath.moveTo(borderRadiusTopLeft, 0); @@ -230,7 +239,7 @@ QPixmap darkerTarget = QPixmap::fromImage(newImg); painter2.begin(&darkerTarget); - auto borderPath = caculateRelativePainterPath(borderRadiusTopLeft + 0.5, borderRadiusTopRight + 0.5, borderRadiusBottomLeft + 0.5, borderRadiusBottomRight + 0.5); + auto borderPath = caculateRelativePainterPath(widget, borderRadiusTopLeft + 0.5, borderRadiusTopRight + 0.5, borderRadiusBottomLeft + 0.5, borderRadiusBottomRight + 0.5); painter2.setCompositionMode(QPainter::CompositionMode_DestinationOver); painter2.setRenderHint(QPainter::HighQualityAntialiasing); QColor borderColor = color; @@ -239,12 +248,12 @@ painter2.setBrush(Qt::NoBrush); painter2.translate(shadow_border, shadow_border); painter2.translate(-0.5, -0.5); - painter2.drawPath(borderPath); +// painter2.drawPath(borderPath); return darkerTarget; } -QPainterPath ConfigShadowHelper::caculateRelativePainterPath(qreal borderRadiusTopLeft, qreal borderRadiusTopRight, qreal borderRadiusBottomLeft, qreal borderRadiusBottomRight) +QPainterPath ConfigShadowHelper::caculateRelativePainterPath(QWidget *widget, qreal borderRadiusTopLeft, qreal borderRadiusTopRight, qreal borderRadiusBottomLeft, qreal borderRadiusBottomRight) { qreal maxTopRadius = qMax(borderRadiusTopLeft, borderRadiusTopRight); qreal maxBottomRadius = qMax(borderRadiusBottomLeft, borderRadiusBottomRight); @@ -258,9 +267,15 @@ QPointF currentPos; int qAppMaxradius = maxRadius; - if(qApp->style()->property("maxRadius").isValid()){ - qAppMaxradius = qApp->style()->property("maxRadius").toInt(); - qDebug() << "radius...." << qAppMaxradius; + if(widget){ + if(widget->inherits("QComboBoxPrivateContainer") || widget->inherits("QMenu")){ + auto settings = UKUIStyleSettings::globalInstance(); + if(settings && settings->keys().contains("windowRadius")) + qAppMaxradius = settings->get("windowRadius").toInt(); + + } + else if(widget->property("maxRadius").isValid()) + qAppMaxradius = widget->property("maxRadius").toInt(); } // move to top left arc start point @@ -305,9 +320,9 @@ return windowRelativePath; } -KWindowShadow *ConfigShadowHelper::getShadow(QColor color, int shadow_border, qreal darkness, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight) +KWindowShadow *ConfigShadowHelper::getShadow(QColor color, int shadow_border, qreal darkness, QWidget* widget, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight) { - QPixmap shadowPixmap = getShadowPixmap(color, shadow_border, darkness, borderRadiusTopLeft, borderRadiusTopRight, borderRadiusBottomLeft, borderRadiusBottomRight); + QPixmap shadowPixmap = getShadowPixmap(color, shadow_border, darkness, widget, borderRadiusTopLeft, borderRadiusTopRight, borderRadiusBottomLeft, borderRadiusBottomRight); qreal maxTopRadius = qMax(borderRadiusTopLeft, borderRadiusTopRight); qreal maxBottomRadius = qMax(borderRadiusBottomLeft, borderRadiusBottomRight); int maxRadius = qMax(maxTopRadius, maxBottomRadius); @@ -373,7 +388,7 @@ return false; } - auto shadow = getShadow(shadowColor, shadowBorder, darkness, radius.x(), radius.y(), radius.z(), radius.w()); + auto shadow = getShadow(shadowColor, shadowBorder, darkness, widget, radius.x(), radius.y(), radius.z(), radius.w()); shadow->setPadding(QMargins(margins.x(), margins.y(), margins.z(), margins.w())); shadow->setWindow(widget->windowHandle()); shadow->create(); @@ -405,7 +420,7 @@ int radius = 10; - auto shadow = getShadow(shadowColor, 15, 0.5, radius, radius, radius, radius); + auto shadow = getShadow(shadowColor, 15, 0.5, widget, radius, radius, radius, radius); shadow->setPadding(QMargins(15, 15, 15, 15)); shadow->setWindow(widget->windowHandle()); shadow->create(); diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/config-shadow-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/config-shadow-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/config-shadow-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/config-shadow-helper.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -47,19 +47,21 @@ QColor color, int shadow_border, qreal darkness, + QWidget *widget, int borderRadiusTopLeft = 0, int borderRadiusTopRight = 0, int borderRadiusBottomLeft = 0, int borderRadiusBottomRight = 0); - QPainterPath caculateRelativePainterPath(qreal borderRadiusTopLeft = 0, + QPainterPath caculateRelativePainterPath(QWidget *widget, + qreal borderRadiusTopLeft = 0, qreal borderRadiusTopRight = 0, qreal borderRadiusBottomLeft = 0, qreal borderRadiusBottomRight = 0); KWindowShadow *getShadow(QColor color, int shadow_border, - qreal darkness, + qreal darkness, QWidget* widget, int borderRadiusTopLeft = 0, int borderRadiusTopRight = 0, int borderRadiusBottomLeft = 0, @@ -69,6 +71,7 @@ private: QMap<const QWidget *, KWindowShadow *> m_shadows; + int m_maxRadius = 8; }; } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/config-style-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/config-style-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/config-style-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/config-style-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/config-style-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/config-style-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/config-style-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/config-style-helper.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/config-view-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/config-view-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/config-view-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/config-view-helper.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,3 +1,25 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: xibowen <xibowen@kylinos.cn> + * + */ + #include "ukui-config-style.h" #include <QListView> #include <QTreeView> @@ -121,7 +143,7 @@ QTextOption textOption; textOption.setWrapMode(wrapText ? QTextOption::WordWrap : QTextOption::ManualWrap); //FIX ME,bug106749::QTablewidget text cannot be aligned, forced changed it wrap mode to wrapanywhere - if(wrapText && (widget->inherits("QTableWidget") || widget->inherits("QTableView"))) + if(wrapText && widget && (widget->inherits("QTableWidget") || widget->inherits("QTableView"))) { textOption.setWrapMode(QTextOption::WrapAnywhere); } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pri qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pri --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pri 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pri 1970-01-01 08:00:00.000000000 +0800 @@ -1,25 +0,0 @@ -INCLUDEPATH += $$PWD - -include(animations/animations.pri) -include(widget-parameters/widget-parameters.pri) - -SOURCES += \ - $$PWD/ukui-config-style-parameters.cpp \ - $$PWD/ukui-config-style.cpp \ - $$PWD/config-shadow-helper.cpp \ - $$PWD/config-view-helper.cpp \ - $$PWD/config-style-helper.cpp -# $$PWD/readconfig.cpp - -HEADERS += \ - $$PWD/ukui-config-style-parameters.h \ - $$PWD/ukui-config-style.h \ - $$PWD/config-shadow-helper.h \ - $$PWD/config-style-helper.h \ - -# $$PWD/readconfig.h \ -# $$PWD/themeinformation.h - -DISTFILES += $$PWD/themeconfig/UKUIConfigDefault.json \ - $$PWD/themeconfig/UKUIConfigClassical.json \ - $$PWD/themeconfig/UKUIConfigFashion.json diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pro qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pro --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/qt5-config-style-ukui.pro 2024-12-20 09:22:49.000000000 +0800 @@ -49,7 +49,6 @@ shadow-helper.h \ ukui-config-style-helper.h \ readconfig.h \ - themeinformation.h \ ../common/blur-helper.h \ ../common/gesture-helper.h \ ../common/window-manager.h \ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigClassical.json qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigClassical.json --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigClassical.json 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigClassical.json 1970-01-01 08:00:00.000000000 +0800 @@ -1,730 +0,0 @@ -{ - "Radius":{ - "Max_Radius" : {"value": "0", "type": "int"}, - "Normal_Radius" : {"value": "0", "type": "int"}, - "Min_Radius" : {"value": "0", "type": "int"} - }, - "ColorAdjustRules" : "HSL", - "LightTheme":{ - "Palette":{ - "WindowText_at" : {"value": "38, 38, 38", "type": "color"}, - "WindowText_iat" : {"value": "38, 38, 38", "type": "color"}, - "WindowText_dis" : {"value": "166, 166, 166", "type": "color"}, - "Button_at" : {"value": "250, 250, 250 ", "type": "color"}, - "Button_iat" : {"value": "250, 250, 250", "type": "color"}, - "Button_dis" : {"value": "217, 217, 217", "type": "color"}, - "Light_at" : {"value": "255, 255, 255", "type": "color"}, - "Light_iat" : {"value": "255, 255, 255", "type": "color"}, - "Light_dis" : {"value": "242, 242, 242", "type": "color"}, - "Midlight_at" : {"value": "170, 170, 170", "type": "color"}, - "Midlight_iat" : {"value": "170, 170, 170", "type": "color"}, - "Midlight_dis" : {"value": "230, 230, 230", "type": "color"}, - "Dark_at" : {"value": "77, 77, 77", "type": "color"}, - "Dark_iat" : {"value": "77, 77, 77", "type": "color"}, - "Dark_dis" : {"value": "64, 64, 64", "type": "color"}, - "Mid_at" : {"value": "115, 115, 115", "type": "color"}, - "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, - "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, - "Text_at" : {"value": "38, 38, 38 ", "type": "color"}, - "Text_iat" : {"value": "38, 38, 38", "type": "color"}, - "Text_dis" : {"value": "140, 140, 140", "type": "color"}, - "BrightText_at" : {"value": "89, 89, 89", "type": "color"}, - "BrightText_iat" : {"value": "89, 89, 89", "type": "color"}, - "BrightText_dis" : {"value": "77, 77, 77", "type": "color"}, - "ButtonText_at" : {"value": "38, 38, 38", "type": "color"}, - "ButtonText_iat" : {"value": "38, 38, 38", "type": "color"}, - "ButtonText_dis" : {"value": "179, 179, 179", "type": "color"}, - "Base_at" : {"value": "255, 255, 255", "type": "color"}, - "Base_iat" : {"value": "245, 245, 245", "type": "color"}, - "Base_dis" : {"value": "237, 237, 237", "type": "color"}, - "Window_at" : {"value": "245, 245, 245", "type": "color"}, - "Window_iat" : {"value": "237, 237, 237", "type": "color"}, - "Window_dis" : {"value": "230, 230, 230", "type": "color"}, - "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, - "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, - "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, - "HighLight_at" : {"value": "48, 148, 241", "type": "color"}, - "HighLight_iat" : {"value": "133, 180, 236", "type": "color"}, - "HighLight_dis" : {"value": "217, 217, 217 ", "type": "color"}, - "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, - "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, - "HighLightText_dis" : {"value": "179, 179, 179", "type": "color"}, - "Link_at" : {"value": "43, 121, 218 ", "type": "color"}, - "Link_iat" : {"value": "43, 121, 218 ", "type": "color"}, - "Link_dis" : {"value": "43, 121, 218 ", "type": "color"}, - "LinkVisited_at" : {"value": "167, 87, 193 ", "type": "color"}, - "LinkVisited_iat" : {"value": "167, 87, 193 ", "type": "color"}, - "LinkVisited_dis" : {"value": "167, 87, 193 ", "type": "color"}, - "AlternateBase_at" : {"value": "244, 245, 245 ", "type": "color"}, - "AlternateBase_iat" : {"value": "244, 245, 245 ", "type": "color"}, - "AlternateBase_dis" : {"value": "244, 245, 245 ", "type": "color"}, - "NoRole_at" : {"value": "240, 240, 240 ", "type": "color"}, - "NoRole_iat" : {"value": "240, 240, 240 ", "type": "color"}, - "NoRole_dis" : {"value": "217, 217, 217 ", "type": "color"}, - "ToolTipBase_at" : {"value": "255, 255, 255 ", "type": "color"}, - "ToolTipBase_iat" : {"value": "255, 255, 255 ", "type": "color"}, - "ToolTipBase_dis" : {"value": "255, 255, 255 ", "type": "color"}, - "ToolTipText_at" : {"value": "38, 38, 38 ", "type": "color"}, - "ToolTipText_iat" : {"value": "38, 38, 38 ", "type": "color"}, - "ToolTipText_dis" : {"value": "38, 38, 38 ", "type": "color"}, - "PlaceholderText_at" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, - "PlaceholderText_iat" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, - "PlaceholderText_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"} - }, - "PushButton":{ - "DefaultPushButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, - "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "207, 20, 34", "type": "color"}, - "ClickPen" : {"value": "161, 0, 12", "type": "color"}, - "FocusPen" : {"value": "207, 20, 34", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "ToolButton":{ - "DefaultToolButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, - "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "207, 20, 34", "type": "color"}, - "ClickPen" : {"value": "161, 0, 12", "type": "color"}, - "FocusPen" : {"value": "207, 20, 34", "type": "color"}, - "TextColor" : {"value": "HighLightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "HighLightText_at", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "LineEdit":{ - "DefaultLineEdit":{ - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentLineEdit":{ - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "SpinBox":{ - "DefaultSpinBox":{ - "HorizonLayout":{ - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} - }, - "DefaultLayout":{ - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} - } - } - }, - "ComboBox":{ - "DefaultComboBox":{ - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_iat", "type": "paletterole"} - } - }, - "ListView":{ - "DefaultListView":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "TranslucentListView":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "TreeView":{ - "DefaultTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "Table":{ - "DefaultTable":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "CheckBox":{ - "DefaultCheckBox":{ - "DisablePen" : {"value": "Button_dis", "type": "color"}, - "ContentPen" : {"value": "Text_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "PathBrush" : {"value": "Text_at", "type": "paletterole"}, - "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentCheckBox":{ - "DisablePen" : {"value": "Button_dis", "type": "color"}, - "ContentPen" : {"value": "Text_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "PathBrush" : {"value": "Text_at", "type": "paletterole"}, - "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "RadioButton":{ - "DefaultRadioButton":{ - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, - "ChildrenOnDefaultBrush" : {"value": "Text_at", "type": "paletterole"}, - "ChildrenOnHoverBrush" : {"value": "Text_at", "type": "paletterole"}, - "ChildrenOnClickBrush" : {"value": "Text_at", "type": "paletterole"}, - "ChildrenOnDisableBrush" : {"value": "ButtonText_dis","type": "paletterole"} - } - }, - "SliderBar":{ - "DefaultSliderBar":{ - "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveValueDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveValueHoverBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveValueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_at", "type": "paletterole"} - }, - "TranslucentSliderBar":{ - "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveValueDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveValueHoverBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveValueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_at", "type": "paletterole"} - } - }, - "ProgressBar":{ - "DefaultProgressBar" :{ - "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, - "ContentEnd" : {"value": "HighLight_at", "type": "paletterole"}, - "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentProgressBar": { - "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, - "ContentEnd" : {"value": "HighLight_at", "type": "paletterole"}, - "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} - } - }, - "ScrollBar":{ - "DefaultScrollBar" :{ - "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Button_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, - "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} - }, - "TranslucentScrollBar": { - "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Button_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, - "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} - } - }, - "ToolTip":{ - "DefaultToolTip" :{ - "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, - "BackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"} - } - }, - "TabWidget":{ - "DefaultTabWidget" :{ - "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarBackgroundBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TabBarDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "TabBarHoverBrush" : { "type": "color"}, - "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"} - } - }, - "Menu":{ - "DefaultMenu" :{ - "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "MenuBackgroundPen" : {"value": "187, 187, 187", "type": "color"}, - "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} - } - } - }, - "DarkTheme":{ - "Palette":{ - "WindowText_at" : {"value": "217, 217, 217", "type": "color"}, - "WindowText_iat" : {"value": "217, 217, 217", "type": "color"}, - "WindowText_dis" : {"value": "77, 77, 77", "type": "color"}, - "Button_at" : {"value": "68, 68, 68 ", "type": "color"}, - "Button_iat" : {"value": "68, 68, 68 ", "type": "color"}, - "Button_dis" : {"value": "43, 43, 43 ", "type": "color"}, - "Light_at" : {"value": "255, 255, 255", "type": "color"}, - "Light_iat" : {"value": "255, 255, 255", "type": "color"}, - "Light_dis" : {"value": "242, 242, 242", "type": "color"}, - "Midlight_at" : {"value": "77, 77, 77", "type": "color"}, - "Midlight_iat" : {"value": "77, 77, 77", "type": "color"}, - "Midlight_dis" : {"value": "64, 64, 64", "type": "color"}, - "Dark_at" : {"value": "38, 38, 38", "type": "color"}, - "Dark_iat" : {"value": "38, 38, 38", "type": "color"}, - "Dark_dis" : {"value": "26, 26, 26", "type": "color"}, - "Mid_at" : {"value": "115, 115, 115", "type": "color"}, - "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, - "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, - "Text_at" : {"value": "217, 217, 217", "type": "color"}, - "Text_iat" : {"value": "217, 217, 217", "type": "color"}, - "Text_dis" : {"value": "77, 77, 77", "type": "color"}, - "BrightText_at" : {"value": "255, 255, 255", "type": "color"}, - "BrightText_iat" : {"value": "255, 255, 255", "type": "color"}, - "BrightText_dis" : {"value": "77, 77, 77", "type": "color"}, - "ButtonText_at" : {"value": "217, 217, 217", "type": "color"}, - "ButtonText_iat" : {"value": "217, 217, 217", "type": "color"}, - "ButtonText_dis" : {"value": "76, 76, 79", "type": "color"}, - "Base_at" : {"value": "18, 18, 18", "type": "color"}, - "Base_iat" : {"value": "28, 28, 28", "type": "color"}, - "Base_dis" : {"value": "36, 36, 36", "type": "color"}, - "Window_at" : {"value": "35, 36, 38", "type": "color"}, - "Window_iat" : {"value": "34, 34, 34", "type": "color"}, - "Window_dis" : {"value": "18, 18, 18", "type": "color"}, - "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, - "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, - "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, - "HighLight_at" : {"value": "126, 180, 234", "type": "color"}, - "HighLight_iat" : {"value": "68, 143, 218", "type": "color"}, - "HighLight_dis" : {"value": "43, 43, 43", "type": "color"}, - "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, - "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, - "HighLightText_dis" : {"value": "77, 77, 77", "type": "color"}, - "Link_at" : {"value": "43, 121, 218", "type": "color"}, - "Link_iat" : {"value": "43, 121, 218", "type": "color"}, - "Link_dis" : {"value": "43, 121, 218", "type": "color"}, - "LinkVisited_at" : {"value": "167, 87, 193", "type": "color"}, - "LinkVisited_iat" : {"value": "167, 87, 193", "type": "color"}, - "LinkVisited_dis" : {"value": "167, 87, 193", "type": "color"}, - "AlternateBase_at" : {"value": "38, 38, 38 ", "type": "color"}, - "AlternateBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, - "AlternateBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, - "NoRole_at" : {"value": "51, 51, 51 ", "type": "color"}, - "NoRole_iat" : {"value": "51, 51, 51 ", "type": "color"}, - "NoRole_dis" : {"value": "60, 60, 64 ", "type": "color"}, - "ToolTipBase_at" : {"value": "38, 38, 38 ", "type": "color"}, - "ToolTipBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, - "ToolTipBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, - "ToolTipText_at" : {"value": "217, 217, 217", "type": "color"}, - "ToolTipText_iat" : {"value": "217, 217, 217", "type": "color"}, - "ToolTipText_dis" : {"value": "217, 217, 217", "type": "color"}, - "PlaceholderText_at" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, - "PlaceholderText_iat" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, - "PlaceholderText_dis" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"} - }, - "PushButton":{ - "DefaultPushButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, - "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "207, 20, 34", "type": "color"}, - "ClickPen" : {"value": "161, 0, 12", "type": "color"}, - "FocusPen" : {"value": "161, 0, 12", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "ToolButton":{ - "DefaultToolButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, - "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "207, 20, 34", "type": "color"}, - "ClickPen" : {"value": "161, 0, 12", "type": "color"}, - "FocusPen" : {"value": "161, 0, 12", "type": "color"}, - "TextColor" : {"value": "AlternateBase_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "AlternateBase_at", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "LineEdit":{ - "DefaultLineEdit":{ - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentLineEdit":{ - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "SpinBox":{ - "DefaultSpinBox":{ - "HorizonLayout":{ - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} - }, - "DefaultLayout":{ - "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} - } - } - }, - "ComboBox":{ - "DefaultComboBox":{ - "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "ListView":{ - "DefaultListView":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "TranslucentListView":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "TreeView":{ - "DefaultTreeView":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "Table":{ - "DefaultTable":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "CheckBox":{ - "DefaultCheckBox":{ - "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, - "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentCheckBox":{ - "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, - "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "RadioButton":{ - "DefaultRadioButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "SliderBar":{ - "DefaultSliderBar":{ - "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveValueDefaultBrush" : {"value": "HighLight_iat", "type": "paletterole"}, - "GrooveValueHoverBrush" : {"value": "HighLight_iat", "type": "paletterole"}, - "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueHoverBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentSliderBar":{ - "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveValueDefaultBrush" : {"value": "HighLight_iat", "type": "paletterole"}, - "GrooveValueHoverBrush" : {"value": "HighLight_iat", "type": "paletterole"}, - "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueHoverBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "ProgressBar":{ - "DefaultProgressBar" :{ - "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} - }, - "TranslucentProgressBar": { - "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, - "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} - } - }, - "ScrollBar":{ - "DefaultScrollBar" :{ - "GrooveDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Button_dis", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "SliderHoverBrush" : { "type": "color"}, - "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} - }, - "TranslucentScrollBar": { - "GrooveDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Button_dis", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "SliderHoverBrush" : { "type": "color"}, - "SliderDisableBrush" : {"value": "Midlight_dis", "type": "paletterole"} - } - }, - "ToolTip":{ - "DefaultToolTip" :{ - "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, - "BackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"} - } - }, - "TabWidget":{ - "DefaultTabWidget" :{ - "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarBackgroundBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TabBarDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TabBarHoverBrush" : { "type": "color"}, - "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"} - } - }, - "Menu":{ - "DefaultMenu" :{ - "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "MenuBackgroundPen" : {"value": "89, 89, 89", "type": "color"}, - "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} - } - } - } -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigDefault.json 1970-01-01 08:00:00.000000000 +0800 @@ -1,772 +0,0 @@ -{ - "Radius":{ - "Max_Radius" : {"value": "8", "type": "int"}, - "Normal_Radius" : {"value": "6", "type": "int"}, - "Min_Radius" : {"value": "4", "type": "int"} - }, - "ColorAdjustRules" : "Default", - "LightTheme":{ - "Palette":{ - "WindowText_at" : {"value": "38, 38, 38", "type": "color"}, - "WindowText_iat" : {"value": "0, 0, 0, 255*0.55", "type": "color"}, - "WindowText_dis" : {"value": "0, 0, 0, 255*0.3", "type": "color"}, - "Button_at" : {"value": "230, 230, 230 ", "type": "color"}, - "Button_iat" : {"value": "230, 230, 230", "type": "color"}, - "Button_dis" : {"value": "233, 233, 233", "type": "color"}, - "Light_at" : {"value": "255, 255, 255", "type": "color"}, - "Light_iat" : {"value": "255, 255, 255", "type": "color"}, - "Light_dis" : {"value": "242, 242, 242", "type": "color"}, - "Midlight_at" : {"value": "218, 218, 218", "type": "color"}, - "Midlight_iat" : {"value": "218, 218, 218", "type": "color"}, - "Midlight_dis" : {"value": "230, 230, 230", "type": "color"}, - "Dark_at" : {"value": "77, 77, 77", "type": "color"}, - "Dark_iat" : {"value": "77, 77, 77", "type": "color"}, - "Dark_dis" : {"value": "64, 64, 64", "type": "color"}, - "Mid_at" : {"value": "115, 115, 115", "type": "color"}, - "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, - "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, - "Text_at" : {"value": "38, 38, 38 ", "type": "color"}, - "Text_iat" : {"value": "38, 38, 38", "type": "color"}, - "Text_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"}, - "BrightText_at" : {"value": "0, 0, 0", "type": "color"}, - "BrightText_iat" : {"value": "0, 0, 0", "type": "color"}, - "BrightText_dis" : {"value": "0, 0, 0", "type": "color"}, - "ButtonText_at" : {"value": "38, 38, 38", "type": "color"}, - "ButtonText_iat" : {"value": "38, 38, 38", "type": "color"}, - "ButtonText_dis" : {"value": "179, 179, 179", "type": "color"}, - "Base_at" : {"value": "255, 255, 255", "type": "color"}, - "Base_iat" : {"value": "245, 245, 245", "type": "color"}, - "Base_dis" : {"value": "237, 237, 237", "type": "color"}, - "Window_at" : {"value": "245, 245, 245", "type": "color"}, - "Window_iat" : {"value": "237, 237, 237", "type": "color"}, - "Window_dis" : {"value": "230, 230, 230", "type": "color"}, - "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, - "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, - "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, - "HighLight_at" : {"value": "55, 144, 250", "type": "color"}, - "HighLight_iat" : {"value": "55, 144, 250", "type": "color"}, - "HighLight_dis" : {"value": "233, 233, 233 ", "type": "color"}, - "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, - "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, - "HighLightText_dis" : {"value": "179, 179, 179", "type": "color"}, - "Link_at" : {"value": "55, 144, 250 ", "type": "color"}, - "Link_iat" : {"value": "55, 144, 250 ", "type": "color"}, - "Link_dis" : {"value": "55, 144, 250 ", "type": "color"}, - "LinkVisited_at" : {"value": "114, 46, 209 ", "type": "color"}, - "LinkVisited_iat" : {"value": "114, 46, 209 ", "type": "color"}, - "LinkVisited_dis" : {"value": "114, 46, 209 ", "type": "color"}, - "AlternateBase_at" : {"value": "245, 245, 245 ", "type": "color"}, - "AlternateBase_iat" : {"value": "245, 245, 245 ", "type": "color"}, - "AlternateBase_dis" : {"value": "245, 245, 245 ", "type": "color"}, - "NoRole_at" : {"value": "240, 240, 240 ", "type": "color"}, - "NoRole_iat" : {"value": "240, 240, 240 ", "type": "color"}, - "NoRole_dis" : {"value": "217, 217, 217 ", "type": "color"}, - "ToolTipBase_at" : {"value": "255, 255, 255 ", "type": "color"}, - "ToolTipBase_iat" : {"value": "255, 255, 255 ", "type": "color"}, - "ToolTipBase_dis" : {"value": "255, 255, 255 ", "type": "color"}, - "ToolTipText_at" : {"value": "38, 38, 38 ", "type": "color"}, - "ToolTipText_iat" : {"value": "38, 38, 38 ", "type": "color"}, - "ToolTipText_dis" : {"value": "38, 38, 38 ", "type": "color"}, - "PlaceholderText_at" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, - "PlaceholderText_iat" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, - "PlaceholderText_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"} - }, - "PushButton":{ - "DefaultPushButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, - "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "Base_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "ToolButton":{ - "DefaultToolButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, - "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "Base_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "LineEdit":{ - "DefaultLineEdit":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"value": "NoRole_dis", "type": "paletterole"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentLineEdit":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "0, 0, 0, 0.04", "type": "color"}, - "HoverBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, - "FocusBrush" : {"value": "255, 255, 255, 0.65", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "SpinBox":{ - "DefaultSpinBox":{ - "HorizonLayout":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "UpHoverBrush" : {"type": "color"}, - "UpFocusHoverBrush" : {"type": "color"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DownHoverBrush" : {"type": "color"}, - "DownFocusHoverBrush" : {"type": "color"} - }, - "DefaultLayout":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, - "UpHoverBrush" : {"type": "color"}, - "UpFocusHoverBrush" : {"type": "color"}, - "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, - "DownHoverBrush" : {"type": "color"}, - "DownFocusHoverBrush" : {"type": "color"} - } - } - }, - "ComboBox":{ - "DefaultComboBox":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "OnBrush" : {"value": "Base_at", "type": "paletterole"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "ListView":{ - "DefaultListView":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} - }, - "TranslucentListView":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "SelectBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} - } - }, - "TreeView":{ - "DefaultTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} - } - }, - "Table":{ - "DefaultTable":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} - } - }, - "CheckBox":{ - "DefaultCheckBox":{ - "DefaultPen" : {"value": "166, 166, 166", "type": "color"}, - "HoverPen" : {"value": "166, 166, 166", "type": "color"}, - "ClickPen" : {"value": "Mid_at", "type": "paletterole"}, - "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "OnHoverPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "OnClickPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "NoRole_dis", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentCheckBox":{ - "DisablePen" : {"value": "166, 166, 166", "type": "color"}, - "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "OnHoverPen" : {"value": "0, 0, 0, 0.15", "type": "color"}, - "OnClickPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "RadioButton":{ - "DefaultRadioButton":{ - "DefaultPen" : {"value": "166, 166, 166", "type": "color"}, - "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "DefaultBrush" : {"value": "Light_at", "type": "paletterole"}, - "HoverBrush" : { "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnClickBrush" : {"value": "Button_at", "type": "paletterole"}, - "ChildrenOnDisableBrush" : {"value": "HighLightText_dis","type": "paletterole"} - } - - }, - "SliderBar":{ - "DefaultSliderBar":{ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "color"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentSliderBar":{ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "color"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "ProgressBar":{ - "DefaultProgressBar" :{ - "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, - "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentProgressBar": { - "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, - "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, - "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "ScrollBar":{ - "DefaultScrollBar" :{ - "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "SliderHoverBrush" : { "type": "color"}, - "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentScrollBar": { - "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.06", "type": "color"}, - "GrooveInactiveBrush" : {"value": "0, 0, 0, 0.06", "type": "color"}, - "SliderDefaultBrush" : {"value": "0, 0, 0 , 0.10", "type": "color"}, - "SliderHoverBrush" : {"value": "0, 0, 0, 0.18", "type": "color"}, - "SliderClickBrush" : {"value": "0, 0, 0, 0.28", "type": "color"}, - "SliderDisableBrush" : {"value": "0, 0, 0, 0.10", "type": "color"} - } - }, - "ToolTip":{ - "DefaultToolTip" :{ - "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, - "BackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"} - } - }, - "TabWidget":{ - "DefaultTabWidget" :{ - "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarHoverBrush" : { "type": "color"}, - "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} - } - }, - "Menu":{ - "DefaultMenu" :{ - "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "MenuBackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"}, - "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} - } - } - }, - "DarkTheme":{ - "Palette":{ - "WindowText_at" : {"value": "217, 217, 217", "type": "color"}, - "WindowText_iat" : {"value": "255, 255, 255, 255 * 0.55", "type": "color"}, - "WindowText_dis" : {"value": "255, 255, 255, 255 * 0.3", "type": "color"}, - "Button_at" : {"value": "55, 55, 59 ", "type": "color"}, - "Button_iat" : {"value": "55, 55, 59 ", "type": "color"}, - "Button_dis" : {"value": "46, 46, 46 ", "type": "color"}, - "Light_at" : {"value": "255, 255, 255", "type": "color"}, - "Light_iat" : {"value": "255, 255, 255", "type": "color"}, - "Light_dis" : {"value": "242, 242, 242", "type": "color"}, - "Midlight_at" : {"value": "95, 95, 98", "type": "color"}, - "Midlight_iat" : {"value": "95, 95, 98", "type": "color"}, - "Midlight_dis" : {"value": "79, 79, 82", "type": "color"}, - "Dark_at" : {"value": "38, 38, 38", "type": "color"}, - "Dark_iat" : {"value": "38, 38, 38", "type": "color"}, - "Dark_dis" : {"value": "26, 26, 26", "type": "color"}, - "Mid_at" : {"value": "115, 115, 115", "type": "color"}, - "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, - "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, - "Text_at" : {"value": "217, 217, 217", "type": "color"}, - "Text_iat" : {"value": "217, 217, 217", "type": "color"}, - "Text_dis" : {"value": "255, 255, 255, 255 * 0.3", "type": "color"}, - "BrightText_at" : {"value": "255, 255, 255", "type": "color"}, - "BrightText_iat" : {"value": "255, 255, 255", "type": "color"}, - "BrightText_dis" : {"value": "255, 255, 255", "type": "color"}, - "ButtonText_at" : {"value": "217, 217, 217", "type": "color"}, - "ButtonText_iat" : {"value": "217, 217, 217", "type": "color"}, - "ButtonText_dis" : {"value": "76, 76, 79", "type": "color"}, - "Base_at" : {"value": "29, 29, 29", "type": "color"}, - "Base_iat" : {"value": "28, 28, 28", "type": "color"}, - "Base_dis" : {"value": "36, 36, 36", "type": "color"}, - "Window_at" : {"value": "35, 36, 38", "type": "color"}, - "Window_iat" : {"value": "26, 26, 26", "type": "color"}, - "Window_dis" : {"value": "18, 18, 18", "type": "color"}, - "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, - "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, - "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, - "HighLight_at" : {"value": "55, 144, 250", "type": "color"}, - "HighLight_iat" : {"value": "55, 144, 250", "type": "color"}, - "HighLight_dis" : {"value": "46, 46, 46", "type": "color"}, - "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, - "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, - "HighLightText_dis" : {"value": "179, 179, 179", "type": "color"}, - "Link_at" : {"value": "55, 144, 250", "type": "color"}, - "Link_iat" : {"value": "55, 144, 250", "type": "color"}, - "Link_dis" : {"value": "55, 144, 250", "type": "color"}, - "LinkVisited_at" : {"value": "114, 46, 209", "type": "color"}, - "LinkVisited_iat" : {"value": "114, 46, 209", "type": "color"}, - "LinkVisited_dis" : {"value": "114, 46, 209", "type": "color"}, - "AlternateBase_at" : {"value": "38, 38, 38 ", "type": "color"}, - "AlternateBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, - "AlternateBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, - "NoRole_at" : {"value": "51, 51, 51 ", "type": "color"}, - "NoRole_iat" : {"value": "51, 51, 51 ", "type": "color"}, - "NoRole_dis" : {"value": "60, 60, 60 ", "type": "color"}, - "ToolTipBase_at" : {"value": "38, 38, 38 ", "type": "color"}, - "ToolTipBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, - "ToolTipBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, - "ToolTipText_at" : {"value": "217, 217, 217", "type": "color"}, - "ToolTipText_iat" : {"value": "217, 217, 217", "type": "color"}, - "ToolTipText_dis" : {"value": "217, 217, 217", "type": "color"}, - "PlaceholderText_at" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, - "PlaceholderText_iat" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, - "PlaceholderText_dis" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"} - }, - "PushButton":{ - "DefaultPushButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, - "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "255, 255, 255, 0.1", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - } - }, - "ToolButton":{ - "DefaultToolButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, - "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "255, 255, 255, 0.1", "type": "color"}, - "HoverBrush" : { "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - } - }, - "LineEdit":{ - "DefaultLineEdit":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentLineEdit":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, - "HoverBrush" : {"type": "color"}, - "FocusBrush" : {"value": "29, 29, 29, 0.45", "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "SpinBox":{ - "DefaultSpinBox":{ - "HorizonLayout":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "UpHoverBrush" : {"type": "color"}, - "UpFocusHoverBrush" : {"type": "color"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DownHoverBrush" : {"type": "color"}, - "DownFocusHoverBrush" : {"type": "color"} - }, - "DefaultLayout":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, - "UpHoverBrush" : {"type": "color"}, - "UpFocusHoverBrush" : {"type": "color"}, - "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, - "DownHoverBrush" : {"type": "color"}, - "DownFocusHoverBrush" : {"type": "color"} - } - } - }, - "ComboBox":{ - "DefaultComboBox":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "OnBrush" : {"value": "Base_at", "type": "paletterole"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "ListView":{ - "DefaultListView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - }, - "TranslucentListView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "SelectBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } - }, - "TreeView":{ - "DefaultTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} - } - }, - "Table":{ - "DefaultTable":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} - } - }, - "CheckBox":{ - "DefaultCheckBox":{ - "DefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "HoverPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "ClickPen" : {"value": "Mid_dis", "type": "paletterole"}, - "OnDefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "OnHoverPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "OnClickPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : { "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - }, - "TranslucentCheckBox":{ - "OnDefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "OnHoverPen" : {"value": "255, 255, 255, 0.20", "type": "color"}, - "OnClickPen" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, - "HoverBrush" : { "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "color"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "RadioButton":{ - "DefaultRadioButton":{ - "DefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "OnDefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "SliderBar":{ - "DefaultSliderBar":{ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "color"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "HighLight_dis", "type": "paletterole"} - }, - "TranslucentSliderBar":{ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "color"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "HighLight_dis", "type": "paletterole"} - } - }, - "ProgressBar":{ - "DefaultProgressBar" :{ - "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, - "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentProgressBar": { - "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, - "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "ScrollBar":{ - "DefaultScrollBar" :{ - "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "SliderHoverBrush" : { "type": "color"}, - "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentScrollBar": { - "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, - "GrooveInactiveBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, - "SliderDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "SliderHoverBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, - "SliderClickBrush" : {"value": "255, 255, 255, 0.30", "type": "color"}, - "SliderDisableBrush" : {"value": "255, 255, 255, 0.10", "type": "color"} - } - }, - "ToolTip":{ - "DefaultToolTip" :{ - "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, - "BackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"} - } - }, - "TabWidget":{ - "DefaultTabWidget" :{ - "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarHoverBrush" : { "type": "color"}, - "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} - } - }, - "Menu":{ - "DefaultMenu" :{ - "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "MenuBackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} - } - } - } -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/UKUIConfigFashion.json 1970-01-01 08:00:00.000000000 +0800 @@ -1,764 +0,0 @@ -{ - "Radius":{ - "Max_Radius" : {"value": "8", "type": "int"}, - "Normal_Radius" : {"value": "6", "type": "int"}, - "Min_Radius" : {"value": "4", "type": "int"} - }, - "ColorAdjustRules" : "Default", - "LightTheme":{ - "Palette":{ - "WindowText_at" : {"value": "38,38,38 ", "type": "color"}, - "WindowText_iat" : {"value": "0,0,0,255*0.55 ", "type": "color"}, - "WindowText_dis" : {"value": "0,0,0,255*0.3 ", "type": "color"}, - "Button_at" : {"value": "230,230,230 ", "type": "color"}, - "Button_iat" : {"value": "230, 230, 230 ", "type": "color"}, - "Button_dis" : {"value": "233, 233, 233 ", "type": "color"}, - "Light_at" : {"value": "255, 255, 255 ", "type": "color"}, - "Light_iat" : {"value": "255, 255, 255 ", "type": "color"}, - "Light_dis" : {"value": "242, 242, 242 ", "type": "color"}, - "Midlight_at" : {"value": "218, 218, 218 ", "type": "color"}, - "Midlight_iat" : {"value": "218, 218, 218 ", "type": "color"}, - "Midlight_dis" : {"value": "230, 230, 230 ", "type": "color"}, - "Dark_at" : {"value": "77, 77, 77 ", "type": "color"}, - "Dark_iat" : {"value": "77, 77, 77 ", "type": "color"}, - "Dark_dis" : {"value": "64, 64, 64 ", "type": "color"}, - "Mid_at" : {"value": "115, 115, 115 ", "type": "color"}, - "Mid_iat" : {"value": "115, 115, 115 ", "type": "color"}, - "Mid_dis" : {"value": "102, 102, 102 ", "type": "color"}, - "Text_at" : {"value": "38, 38, 38 ", "type": "color"}, - "Text_iat" : {"value": "38, 38, 38 ", "type": "color"}, - "Text_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"}, - "BrightText_at" : {"value": "0, 0, 0 ", "type": "color"}, - "BrightText_iat" : {"value": "0, 0, 0 ", "type": "color"}, - "BrightText_dis" : {"value": "0, 0, 0 ", "type": "color"}, - "ButtonText_at" : {"value": "38, 38, 38 ", "type": "color"}, - "ButtonText_iat" : {"value": "38, 38, 38 ", "type": "color"}, - "ButtonText_dis" : {"value": "179, 179, 179 ", "type": "color"}, - "Base_at" : {"value": "255, 255, 255 ", "type": "color"}, - "Base_iat" : {"value": "245, 245, 245 ", "type": "color"}, - "Base_dis" : {"value": "237, 237, 237 ", "type": "color"}, - "Window_at" : {"value": "245, 245, 245 ", "type": "color"}, - "Window_iat" : {"value": "237, 237, 237 ", "type": "color"}, - "Window_dis" : {"value": "230, 230, 230 ", "type": "color"}, - "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, - "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, - "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21 ", "type": "color"}, - "HighLight_at" : {"value": "120, 115, 245 ", "type": "color"}, - "HighLight_iat" : {"value": "120, 115, 245 ", "type": "color"}, - "HighLight_dis" : {"value": "233, 233, 233 ", "type": "color"}, - "HighLightText_at" : {"value": "255, 255, 255 ", "type": "color"}, - "HighLightText_iat" : {"value": "255, 255, 255 ", "type": "color"}, - "HighLightText_dis" : {"value": "179, 179, 179 ", "type": "color"}, - "Link_at" : {"value": "120, 115, 245 ", "type": "color"}, - "Link_iat" : {"value": "120, 115, 245 ", "type": "color"}, - "Link_dis" : {"value": "120, 115, 245 ", "type": "color"}, - "LinkVisited_at" : {"value": "62, 118, 247 ", "type": "color"}, - "LinkVisited_iat" : {"value": "62, 118, 247 ", "type": "color"}, - "LinkVisited_dis" : {"value": "62, 118, 247 ", "type": "color"}, - "AlternateBase_at" : {"value": "245, 245, 245 ", "type": "color"}, - "AlternateBase_iat" : {"value": "245, 245, 245 ", "type": "color"}, - "AlternateBase_dis" : {"value": "245, 245, 245 ", "type": "color"}, - "NoRole_at" : {"value": "240, 240, 240 ", "type": "color"}, - "NoRole_iat" : {"value": "240, 240, 240 ", "type": "color"}, - "NoRole_dis" : {"value": "217, 217, 217 ", "type": "color"}, - "ToolTipBase_at" : {"value": "255, 255, 255 ", "type": "color"}, - "ToolTipBase_iat" : {"value": "255, 255, 255 ", "type": "color"}, - "ToolTipBase_dis" : {"value": "255, 255, 255 ", "type": "color"}, - "ToolTipText_at" : {"value": "38, 38, 38 ", "type": "color"}, - "ToolTipText_iat" : {"value": "38, 38, 38 ", "type": "color"}, - "ToolTipText_dis" : {"value": "38, 38, 38 ", "type": "color"}, - "PlaceholderText_at" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, - "PlaceholderText_iat" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, - "PlaceholderText_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"} - }, - "PushButton":{ - "DefaultPushButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "242, 82, 117 ~ 221, 44, 68", "type": "gradient"}, - "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "218, 218, 218 ~ 184, 184, 184", "type": "gradient"}, - "ClickBrush" : {"value": "191, 191, 191", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "Base_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "38, 38, 38, 0.10", "type": "color"}, - "HoverBrush" : { "type": "gradient"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - } - }, - "ToolButton":{ - "DefaultToolButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "242, 82, 117 ~ 221, 44, 68", "type": "gradient"}, - "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "218, 218, 218 ~ 184, 184, 184", "type": "gradient"}, - "ClickBrush" : {"value": "191, 191, 191", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "Base_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "38, 38, 38, 0.10", "type": "color"}, - "HoverBrush" : { "type": "gradient"}, - "TextColor" : {"value": "Base_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "Base_at", "type": "paletterole"} - } - }, - "LineEdit":{ - "DefaultLineEdit":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "102, 97, 208", "type": "color"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentLineEdit":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "gradient"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "SpinBox":{ - "DefaultSpinBox":{ - "HorizonLayout":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpHoverBrush" : {"type": "gradient"}, - "UpFocusHoverBrush" : {"type": "gradient"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DownHoverBrush" : {"type": "gradient"}, - "DownFocusHoverBrush" : {"type": "gradient"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} - }, - "DefaultLayout":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpHoverBrush" : {"type": "gradient"}, - "UpFocusHoverBrush" : {"type": "gradient"}, - "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, - "DownHoverBrush" : {"type": "gradient"}, - "DownFocusHoverBrush" : {"type": "gradient"}, - "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"} - } - } - }, - "ComboBox":{ - "DefaultComboBox":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "OnBrush" : {"value": "Base_at", "type": "paletterole"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "ListView":{ - "DefaultListView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - }, - "TranslucentListView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "BrightText_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "BrightText_at", "type": "paletterole"} - } - }, - "TreeView":{ - "DefaultTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } - }, - "Table":{ - "DefaultTable":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } - }, - "CheckBox":{ - "DefaultCheckBox":{ - "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, - "HoverPen" : {"value": "140, 140, 140", "type": "color"}, - "ClickPen" : {"value": "140, 140, 140", "type": "color"}, - "OnDefaultPen" : {"value": "83, 80, 171", "type": "color"}, - "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Light_at", "type": "paletterole"}, - "HoverBrush" : { "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, - "PathDisableBrush" : {"value": "140, 140, 140", "type": "color"} - }, - "TranslucentCheckBox":{ - "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, - "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "115, 115, 115, 0.2", "type": "color"}, - "HoverBrush" : { "type": "gradient"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, - "PathDisableBrush" : {"value": "140, 140, 140", "type": "color"} - } - }, - "RadioButton":{ - "DefaultRadioButton":{ - "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, - "OnDefaultPen" : {"value": "83, 80, 171", "type": "color"}, - "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "HoverBrush" : { "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "SliderBar":{ - "DefaultSliderBar":{ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : {"type": "gradient"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentSliderBar":{ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "gradient"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "ProgressBar":{ - "DefaultProgressBar" :{ - "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, - "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentProgressBar": { - "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, - "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, - "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "ScrollBar":{ - "DefaultScrollBar" :{ - "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "SliderHoverBrush" : { "type": "gradient"}, - "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentScrollBar": { - "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, - "GrooveInactiveBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, - "SliderDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, - "SliderHoverBrush" : {"value": "0, 0, 0, 0.20", "type": "color"}, - "SliderClickBrush" : {"value": "0, 0, 0, 0.30", "type": "color"}, - "SliderDisableBrush" : {"value": "0, 0, 0, 0.10", "type": "color"} - } - }, - "ToolTip":{ - "DefaultToolTip" :{ - "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, - "BackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"} - } - }, - "TabWidget":{ - "DefaultTabWidget" :{ - "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarHoverBrush" : { "type": "gradient"}, - "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} - } - }, - "Menu":{ - "DefaultMenu" :{ - "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "MenuBackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"}, - "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} - } - } - }, - "DarkTheme":{ - "Palette":{ - "WindowText_at" : {"value": "217, 217, 217 ", "type": "color"}, - "WindowText_iat" : {"value": "255, 255, 255, 255 * 0.55 ", "type": "color"}, - "WindowText_dis" : {"value": "255, 255, 255, 255 * 0.3 ", "type": "color"}, - "Button_at" : {"value": "55, 55, 59 ", "type": "color"}, - "Button_iat" : {"value": "55, 55, 59 ", "type": "color"}, - "Button_dis" : {"value": "46, 46, 46 ", "type": "color"}, - "Light_at" : {"value": "255, 255, 255 ", "type": "color"}, - "Light_iat" : {"value": "255, 255, 255 ", "type": "color"}, - "Light_dis" : {"value": "242, 242, 242 ", "type": "color"}, - "Midlight_at" : {"value": "95, 95, 98 ", "type": "color"}, - "Midlight_iat" : {"value": "95, 95, 98 ", "type": "color"}, - "Midlight_dis" : {"value": "79, 79, 82 ", "type": "color"}, - "Dark_at" : {"value": "38, 38, 38 ", "type": "color"}, - "Dark_iat" : {"value": "38, 38, 38 ", "type": "color"}, - "Dark_dis" : {"value": "26, 26, 26 ", "type": "color"}, - "Mid_at" : {"value": "115, 115, 115 ", "type": "color"}, - "Mid_iat" : {"value": "115, 115, 115 ", "type": "color"}, - "Mid_dis" : {"value": "102, 102, 102 ", "type": "color"}, - "Text_at" : {"value": "217, 217, 217 ", "type": "color"}, - "Text_iat" : {"value": "217, 217, 217 ", "type": "color"}, - "Text_dis" : {"value": "255, 255, 255, 255 * 0.3 ", "type": "color"}, - "BrightText_at" : {"value": "255, 255, 255 ", "type": "color"}, - "BrightText_iat" : {"value": "255, 255, 255 ", "type": "color"}, - "BrightText_dis" : {"value": "255, 255, 255 ", "type": "color"}, - "ButtonText_at" : {"value": "217, 217, 217 ", "type": "color"}, - "ButtonText_iat" : {"value": "217, 217, 217 ", "type": "color"}, - "ButtonText_dis" : {"value": "76, 76, 79 ", "type": "color"}, - "Base_at" : {"value": "29, 29, 29 ", "type": "color"}, - "Base_iat" : {"value": "28, 28, 28 ", "type": "color"}, - "Base_dis" : {"value": "36, 36, 36 ", "type": "color"}, - "Window_at" : {"value": "35, 36, 38 ", "type": "color"}, - "Window_iat" : {"value": "26, 26, 26 ", "type": "color"}, - "Window_dis" : {"value": "18, 18, 18 ", "type": "color"}, - "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, - "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, - "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21 ", "type": "color"}, - "HighLight_at" : {"value": "120, 115, 245 ", "type": "color"}, - "HighLight_iat" : {"value": "120, 115, 245 ", "type": "color"}, - "HighLight_dis" : {"value": "46, 46, 46 ", "type": "color"}, - "HighLightText_at" : {"value": "255, 255, 255 ", "type": "color"}, - "HighLightText_iat" : {"value": "255, 255, 255 ", "type": "color"}, - "HighLightText_dis" : {"value": "77, 77, 77 ", "type": "color"}, - "Link_at" : {"value": "120, 115, 245 ", "type": "color"}, - "Link_iat" : {"value": "120, 115, 245 ", "type": "color"}, - "Link_dis" : {"value": "120, 115, 245 ", "type": "color"}, - "LinkVisited_at" : {"value": "62, 118, 247 ", "type": "color"}, - "LinkVisited_iat" : {"value": "62, 118, 247 ", "type": "color"}, - "LinkVisited_dis" : {"value": "62, 118, 247 ", "type": "color"}, - "AlternateBase_at" : {"value": "38, 38, 38 ", "type": "color"}, - "AlternateBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, - "AlternateBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, - "NoRole_at" : {"value": "51, 51, 51 ", "type": "color"}, - "NoRole_iat" : {"value": "51, 51, 51 ", "type": "color"}, - "NoRole_dis" : {"value": "60, 60, 60 ", "type": "color"}, - "ToolTipBase_at" : {"value": "38, 38, 38 ", "type": "color"}, - "ToolTipBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, - "ToolTipBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, - "ToolTipText_at" : {"value": "217, 217, 217 ", "type": "color"}, - "ToolTipText_iat" : {"value": "217, 217, 217 ", "type": "color"}, - "ToolTipText_dis" : {"value": "217, 217, 217 ", "type": "color"}, - "PlaceholderText_at" : {"value": "255, 255, 255, 255 * 0.35 ", "type": "color"}, - "PlaceholderText_iat" : {"value": "255, 255, 255, 255 * 0.35 ", "type": "color"}, - "PlaceholderText_dis" : {"value": "255, 255, 255, 255 * 0.35 ", "type": "color"} - }, - "PushButton":{ - "DefaultPushButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "242, 116, 113 ~ 221, 44, 68", "type": "gradient"}, - "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "95, 95, 95 ~ 56, 56, 56", "type": "gradient"}, - "ClickBrush" : {"value": "95, 95, 95", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, - "HoverBrush" : {"value": "255, 255, 255, 0.2 ~ 217, 217, 217, 0.2", "type": "gradient"}, - "ClickBrush" : {"value": "255, 255, 255, 0.3", "type": "color"}, - "DisableBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - } - }, - "ToolButton":{ - "DefaultToolButton":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "WindowCloseButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "242, 116, 113 ~ 221, 44, 68", "type": "gradient"}, - "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "WindowButton":{ - "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"value": "95, 95, 95 ~ 56, 56, 56", "type": "gradient"}, - "ClickBrush" : {"value": "95, 95, 95", "type": "color"}, - "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "UseButtonPalette":{ - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "ImportButton":{ - "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - }, - "TranslucentButton":{ - "DefaultBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, - "HoverBrush" : {"value": "255, 255, 255, 0.2 ~ 217, 217, 217, 0.2", "type": "gradient"}, - "ClickBrush" : {"value": "255, 255, 255, 0.3", "type": "color"}, - "DisableBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, - "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, - "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"} - } - }, - "LineEdit":{ - "DefaultLineEdit":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "FocusBrush" : {"value": "Window_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentLineEdit":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverBrush" : {"type": "gradient"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "SpinBox":{ - "DefaultSpinBox":{ - "HorizonLayout":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "FocusBrush" : {"value": "Window_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpHoverBrush" : {"type": "gradient"}, - "UpFocusHoverBrush" : {"type": "gradient"}, - "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "DownHoverBrush" : {"type": "gradient"}, - "DownFocusHoverBrush" : {"type": "gradient"}, - "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} - }, - "DefaultLayout":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "gradient"}, - "FocusBrush" : {"value": "Window_dis", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "UpHoverBrush" : {"type": "gradient"}, - "UpFocusHoverBrush" : {"type": "gradient"}, - "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, - "DownHoverBrush" : {"type": "gradient"}, - "DownFocusHoverBrush" : {"type": "gradient"}, - "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"} - } - } - }, - "ComboBox":{ - "DefaultComboBox":{ - "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, - "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, - "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "OnBrush" : {"value": "Base_at", "type": "paletterole"}, - "EditBrush" : {"value": "Base_at", "type": "paletterole"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "ListView":{ - "DefaultListView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - }, - "TranslucentListView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "Light_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } - }, - "TreeView":{ - "DefaultTreeView":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } - }, - "Table":{ - "DefaultTable":{ - "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "HoverBrush" : { "type": "gradient"}, - "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, - "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, - "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} - } - }, - "CheckBox":{ - "DefaultCheckBox":{ - "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, - "HoverPen" : {"value": "140, 140, 140", "type": "color"}, - "ClickPen" : {"value": "140, 140, 140", "type": "color"}, - "OnDefaultPen" : {"value": "160, 157, 248", "type": "color"}, - "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "HoverBrush" : {"type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : {"type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, - "PathDisableBrush" : {"value": "140, 140, 140", "type": "color"} - }, - "TranslucentCheckBox":{ - "OnDefaultPen" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, - "DefaultBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, - "HoverBrush" : { "type": "gradient"}, - "ClickBrush" : {"value": "255, 255, 255, 0.30", "type": "color"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, - "PathDisableBrush" : {"value": "179, 179, 179", "type": "color"} - } - }, - "RadioButton":{ - "DefaultRadioButton":{ - "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, - "OnDefaultPen" : {"value": "160, 157, 248", "type": "color"}, - "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "OnHoverBrush" : { "type": "gradient"}, - "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, - "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, - "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} - } - }, - "SliderBar":{ - "DefaultSliderBar":{ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "gradient"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentSliderBar":{ - "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "HandleHoverBrush" : { "type": "gradient"}, - "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, - "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "ProgressBar":{ - "DefaultProgressBar" :{ - "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, - "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentProgressBar": { - "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, - "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - } - }, - "ScrollBar":{ - "DefaultScrollBar" :{ - "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, - "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, - "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, - "SliderHoverBrush" : { "type": "gradient"}, - "SliderDisableBrush" : {"value": "Button_dis", "type": "paletterole"} - }, - "TranslucentScrollBar": { - "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "GrooveInactiveBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "SliderDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, - "SliderHoverBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, - "SliderClickBrush" : {"value": "255, 255, 255, 0.30", "type": "color"}, - "SliderDisableBrush" : {"value": "255, 255, 255, 0.10", "type": "color"} - } - }, - "ToolTip":{ - "DefaultToolTip" :{ - "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, - "BackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"} - } - }, - "TabWidget":{ - "DefaultTabWidget" :{ - "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, - "TabBarHoverBrush" : { "type": "gradient"}, - "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, - "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"} - } - }, - "Menu":{ - "DefaultMenu" :{ - "MenuBackgroundBrush" : {"value": "Window_dis", "type": "paletterole"}, - "MenuBackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, - "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, - "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"} - } - } - } -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/classical.json 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,905 @@ +{ + "Radius":{ + "Max_Radius" : {"value": "0", "type": "int"}, + "Normal_Radius" : {"value": "0", "type": "int"}, + "Min_Radius" : {"value": "0", "type": "int"} + }, + "ColorAdjustRules" : "HSL", + "LightTheme":{ + "Palette":{ + "WindowText_at" : {"value": "38, 38, 38", "type": "color"}, + "WindowText_iat" : {"value": "38, 38, 38", "type": "color"}, + "WindowText_dis" : {"value": "166, 166, 166", "type": "color"}, + "Button_at" : {"value": "250, 250, 250 ", "type": "color"}, + "Button_iat" : {"value": "250, 250, 250", "type": "color"}, + "Button_dis" : {"value": "217, 217, 217", "type": "color"}, + "Light_at" : {"value": "255, 255, 255", "type": "color"}, + "Light_iat" : {"value": "255, 255, 255", "type": "color"}, + "Light_dis" : {"value": "242, 242, 242", "type": "color"}, + "Midlight_at" : {"value": "170, 170, 170", "type": "color"}, + "Midlight_iat" : {"value": "170, 170, 170", "type": "color"}, + "Midlight_dis" : {"value": "230, 230, 230", "type": "color"}, + "Dark_at" : {"value": "77, 77, 77", "type": "color"}, + "Dark_iat" : {"value": "77, 77, 77", "type": "color"}, + "Dark_dis" : {"value": "64, 64, 64", "type": "color"}, + "Mid_at" : {"value": "115, 115, 115", "type": "color"}, + "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, + "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, + "Text_at" : {"value": "38, 38, 38 ", "type": "color"}, + "Text_iat" : {"value": "38, 38, 38", "type": "color"}, + "Text_dis" : {"value": "140, 140, 140", "type": "color"}, + "BrightText_at" : {"value": "89, 89, 89", "type": "color"}, + "BrightText_iat" : {"value": "89, 89, 89", "type": "color"}, + "BrightText_dis" : {"value": "77, 77, 77", "type": "color"}, + "ButtonText_at" : {"value": "38, 38, 38", "type": "color"}, + "ButtonText_iat" : {"value": "38, 38, 38", "type": "color"}, + "ButtonText_dis" : {"value": "179, 179, 179", "type": "color"}, + "Base_at" : {"value": "255, 255, 255", "type": "color"}, + "Base_iat" : {"value": "245, 245, 245", "type": "color"}, + "Base_dis" : {"value": "237, 237, 237", "type": "color"}, + "Window_at" : {"value": "245, 245, 245", "type": "color"}, + "Window_iat" : {"value": "237, 237, 237", "type": "color"}, + "Window_dis" : {"value": "230, 230, 230", "type": "color"}, + "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, + "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, + "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, + "HighLight_at" : {"value": "48, 148, 241", "type": "color"}, + "HighLight_iat" : {"value": "133, 180, 236", "type": "color"}, + "HighLight_dis" : {"value": "217, 217, 217 ", "type": "color"}, + "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, + "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, + "HighLightText_dis" : {"value": "179, 179, 179", "type": "color"}, + "Link_at" : {"value": "43, 121, 218 ", "type": "color"}, + "Link_iat" : {"value": "43, 121, 218 ", "type": "color"}, + "Link_dis" : {"value": "43, 121, 218 ", "type": "color"}, + "LinkVisited_at" : {"value": "167, 87, 193 ", "type": "color"}, + "LinkVisited_iat" : {"value": "167, 87, 193 ", "type": "color"}, + "LinkVisited_dis" : {"value": "167, 87, 193 ", "type": "color"}, + "AlternateBase_at" : {"value": "244, 245, 245 ", "type": "color"}, + "AlternateBase_iat" : {"value": "244, 245, 245 ", "type": "color"}, + "AlternateBase_dis" : {"value": "244, 245, 245 ", "type": "color"}, + "NoRole_at" : {"value": "240, 240, 240 ", "type": "color"}, + "NoRole_iat" : {"value": "240, 240, 240 ", "type": "color"}, + "NoRole_dis" : {"value": "217, 217, 217 ", "type": "color"}, + "ToolTipBase_at" : {"value": "255, 255, 255 ", "type": "color"}, + "ToolTipBase_iat" : {"value": "255, 255, 255 ", "type": "color"}, + "ToolTipBase_dis" : {"value": "255, 255, 255 ", "type": "color"}, + "ToolTipText_at" : {"value": "38, 38, 38 ", "type": "color"}, + "ToolTipText_iat" : {"value": "38, 38, 38 ", "type": "color"}, + "ToolTipText_dis" : {"value": "38, 38, 38 ", "type": "color"}, + "PlaceholderText_at" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, + "PlaceholderText_iat" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, + "PlaceholderText_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"} + }, + "PushButton":{ + "DefaultPushButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, + "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowCloseButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, + "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "207, 20, 34", "type": "color"}, + "ClickPen" : {"value": "161, 0, 12", "type": "color"}, + "FocusPen" : {"value": "207, 20, 34", "type": "color"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "UseButtonPalette":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, + "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "ImportButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, + "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "TranslucentButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, + "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "ToolButton":{ + "DefaultToolButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, + "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowCloseButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, + "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "207, 20, 34", "type": "color"}, + "ClickPen" : {"value": "161, 0, 12", "type": "color"}, + "FocusPen" : {"value": "207, 20, 34", "type": "color"}, + "TextColor" : {"value": "HighLightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "HighLightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "UseButtonPalette":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, + "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "ImportButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, + "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "TranslucentButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, + "DisablePen" : {"value": "NoRole_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "LineEdit":{ + "DefaultLineEdit":{ + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, + "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, + "HoverPen" : {"value": "187, 187, 187", "type": "color"}, + "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisablePen" : {"value": "187, 187, 187", "type": "color"}, + "DisableBrush" : {"value": "Base_at", "type": "paletterole"} + }, + "TranslucentLineEdit":{ + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, + "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, + "HoverPen" : {"value": "187, 187, 187", "type": "color"}, + "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisablePen" : {"value": "187, 187, 187", "type": "color"}, + "DisableBrush" : {"value": "Base_at", "type": "paletterole"} + } + }, + "SpinBox":{ + "DefaultSpinBox":{ + "HorizonLayout":{ + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "FocusBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverPen" : {"value": "187, 187, 187", "type": "color"}, + "DisablePen" : {"value": "187, 187, 187", "type": "color"}, + "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, + "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "UpDefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "DownDefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} + }, + "DefaultLayout":{ + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "FocusBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverPen" : {"value": "187, 187, 187", "type": "color"}, + "DisablePen" : {"value": "187, 187, 187", "type": "color"}, + "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, + "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "UpDefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "DownDefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} + } + } + }, + "ComboBox":{ + "DefaultComboBox":{ + "DisablePen" : {"value": "187, 187, 187", "type": "color"}, + "DefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"type": "color"}, + "EditBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "ListView":{ + "DefaultListView":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} + }, + "HighlightListView":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} + }, + "TranslucentListView":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} + } + }, + "TreeView":{ + "DefaultTreeView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} + }, + "HighlightTreeView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} + } + }, + "Table":{ + "DefaultTable":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} + }, + "HighlightTable":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} + } + }, + "CheckBox":{ + "DefaultCheckBox":{ + "DefaultPen" : {"value": "166, 166, 166", "type": "color"}, + "DisablePen" : {"value": "166, 166, 166", "type": "color"}, + "ContentPen" : {"value": "Text_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, + "PathBrush" : {"value": "Text_at", "type": "paletterole"}, + "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "TranslucentCheckBox":{ + "DefaultPen" : {"value": "166, 166, 166", "type": "color"}, + "DisablePen" : {"value": "166, 166, 166", "type": "color"}, + "ContentPen" : {"value": "Text_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_at", "type": "paletterole"}, + "PathBrush" : {"value": "Text_at", "type": "paletterole"}, + "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "RadioButton":{ + "DefaultRadioButton":{ + "DefaultPen" : {"value": "166, 166, 166", "type": "color"}, + "DisablePen" : {"value": "Button_dis", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "Button_iat", "type": "paletterole"}, + "ChildrenOnDefaultBrush" : {"value": "Text_at", "type": "paletterole"}, + "ChildrenOnHoverBrush" : {"value": "Text_at", "type": "paletterole"}, + "ChildrenOnClickBrush" : {"value": "Text_at", "type": "paletterole"}, + "ChildrenOnDisableBrush" : {"value": "ButtonText_dis","type": "paletterole"} + } + }, + "SliderBar":{ + "DefaultSliderBar":{ + "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, + "HandleDisablePen" : {"value": "187, 187, 187", "type": "color"}, + "GrooveValueDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "GrooveValueHoverBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "GrooveValueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveUnvalueDisableBrush" : {"value": "Button_at", "type": "paletterole"}, + "SliderGroovePen" : {"value": "187, 187, 187", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + }, + "TranslucentSliderBar":{ + "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, + "HandleDisablePen" : {"value": "187, 187, 187", "type": "color"}, + "GrooveValueDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "GrooveValueHoverBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "GrooveValueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveUnvalueDisableBrush" : {"value": "Button_at", "type": "paletterole"}, + "SliderGroovePen" : {"value": "187, 187, 187", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "ProgressBar":{ + "DefaultProgressBar" :{ + "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, + "ContentEnd" : {"value": "HighLight_at", "type": "paletterole"}, + "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveDefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "GrooveDisablePen" : {"value": "187, 187, 187", "type": "color"}, + "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} + }, + "TranslucentProgressBar": { + "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, + "ContentEnd" : {"value": "HighLight_at", "type": "paletterole"}, + "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveDefaultPen" : {"value": "187, 187, 187", "type": "color"}, + "GrooveDisablePen" : {"value": "187, 187, 187", "type": "color"}, + "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} + } + }, + "ScrollBar":{ + "DefaultScrollBar" :{ + "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveInactiveBrush" : {"value": "Button_iat", "type": "paletterole"}, + "SliderDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, + "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "SliderClickBrush" : {"value": "136, 136, 136", "type": "color"}, + "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} + }, + "TranslucentScrollBar": { + "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveInactiveBrush" : {"value": "Button_iat", "type": "paletterole"}, + "SliderDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, + "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "SliderClickBrush" : {"value": "136, 136, 136", "type": "color"}, + "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} + } + }, + "ToolTip":{ + "DefaultToolTip" :{ + "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, + "BackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"} + } + }, + "TabWidget":{ + "DefaultTabWidget" :{ + "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarBackgroundBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, + "TabBarHoverBrush" : { "type": "color"}, + "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "Menu":{ + "DefaultMenu" :{ + "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, + "MenuBackgroundPen" : {"value": "127, 127, 127", "type": "color"}, + "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"}, + "MenuItemFocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + } + }, + "DarkTheme":{ + "Palette":{ + "WindowText_at" : {"value": "217, 217, 217", "type": "color"}, + "WindowText_iat" : {"value": "217, 217, 217", "type": "color"}, + "WindowText_dis" : {"value": "77, 77, 77", "type": "color"}, + "Button_at" : {"value": "68, 68, 68 ", "type": "color"}, + "Button_iat" : {"value": "68, 68, 68 ", "type": "color"}, + "Button_dis" : {"value": "43, 43, 43 ", "type": "color"}, + "Light_at" : {"value": "255, 255, 255", "type": "color"}, + "Light_iat" : {"value": "255, 255, 255", "type": "color"}, + "Light_dis" : {"value": "242, 242, 242", "type": "color"}, + "Midlight_at" : {"value": "77, 77, 77", "type": "color"}, + "Midlight_iat" : {"value": "77, 77, 77", "type": "color"}, + "Midlight_dis" : {"value": "64, 64, 64", "type": "color"}, + "Dark_at" : {"value": "38, 38, 38", "type": "color"}, + "Dark_iat" : {"value": "38, 38, 38", "type": "color"}, + "Dark_dis" : {"value": "26, 26, 26", "type": "color"}, + "Mid_at" : {"value": "115, 115, 115", "type": "color"}, + "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, + "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, + "Text_at" : {"value": "217, 217, 217", "type": "color"}, + "Text_iat" : {"value": "217, 217, 217", "type": "color"}, + "Text_dis" : {"value": "77, 77, 77", "type": "color"}, + "BrightText_at" : {"value": "255, 255, 255", "type": "color"}, + "BrightText_iat" : {"value": "255, 255, 255", "type": "color"}, + "BrightText_dis" : {"value": "77, 77, 77", "type": "color"}, + "ButtonText_at" : {"value": "217, 217, 217", "type": "color"}, + "ButtonText_iat" : {"value": "217, 217, 217", "type": "color"}, + "ButtonText_dis" : {"value": "76, 76, 79", "type": "color"}, + "Base_at" : {"value": "18, 18, 18", "type": "color"}, + "Base_iat" : {"value": "28, 28, 28", "type": "color"}, + "Base_dis" : {"value": "36, 36, 36", "type": "color"}, + "Window_at" : {"value": "35, 36, 38", "type": "color"}, + "Window_iat" : {"value": "34, 34, 34", "type": "color"}, + "Window_dis" : {"value": "18, 18, 18", "type": "color"}, + "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, + "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, + "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, + "HighLight_at" : {"value": "126, 180, 234", "type": "color"}, + "HighLight_iat" : {"value": "68, 143, 218", "type": "color"}, + "HighLight_dis" : {"value": "43, 43, 43", "type": "color"}, + "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, + "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, + "HighLightText_dis" : {"value": "77, 77, 77", "type": "color"}, + "Link_at" : {"value": "43, 121, 218", "type": "color"}, + "Link_iat" : {"value": "43, 121, 218", "type": "color"}, + "Link_dis" : {"value": "43, 121, 218", "type": "color"}, + "LinkVisited_at" : {"value": "167, 87, 193", "type": "color"}, + "LinkVisited_iat" : {"value": "167, 87, 193", "type": "color"}, + "LinkVisited_dis" : {"value": "167, 87, 193", "type": "color"}, + "AlternateBase_at" : {"value": "38, 38, 38 ", "type": "color"}, + "AlternateBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, + "AlternateBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, + "NoRole_at" : {"value": "51, 51, 51 ", "type": "color"}, + "NoRole_iat" : {"value": "51, 51, 51 ", "type": "color"}, + "NoRole_dis" : {"value": "60, 60, 64 ", "type": "color"}, + "ToolTipBase_at" : {"value": "38, 38, 38 ", "type": "color"}, + "ToolTipBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, + "ToolTipBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, + "ToolTipText_at" : {"value": "217, 217, 217", "type": "color"}, + "ToolTipText_iat" : {"value": "217, 217, 217", "type": "color"}, + "ToolTipText_dis" : {"value": "217, 217, 217", "type": "color"}, + "PlaceholderText_at" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, + "PlaceholderText_iat" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, + "PlaceholderText_dis" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"} + }, + "PushButton":{ + "DefaultPushButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "DisablePen" : {"value": "89, 89, 89", "type": "color"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowCloseButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, + "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "207, 20, 34", "type": "color"}, + "ClickPen" : {"value": "161, 0, 12", "type": "color"}, + "FocusPen" : {"value": "161, 0, 12", "type": "color"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "UseButtonPalette":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "DisablePen" : {"value": "89, 89, 89", "type": "color"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "ImportButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "DisablePen" : {"value": "89, 89, 89", "type": "color"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "TranslucentButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "DisablePen" : {"value": "89, 89, 89", "type": "color"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "ToolButton":{ + "DefaultToolButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "DisablePen" : {"value": "89, 89, 89", "type": "color"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowCloseButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "244, 78, 80", "type": "color"}, + "ClickBrush" : {"value": "204, 20, 34", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "207, 20, 34", "type": "color"}, + "ClickPen" : {"value": "161, 0, 12", "type": "color"}, + "FocusPen" : {"value": "161, 0, 12", "type": "color"}, + "TextColor" : {"value": "AlternateBase_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "AlternateBase_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "UseButtonPalette":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "DisablePen" : {"value": "89, 89, 89", "type": "color"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "ImportButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "DisablePen" : {"value": "89, 89, 89", "type": "color"}, + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "LineEdit":{ + "DefaultLineEdit":{ + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, + "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "HoverBrush" : {"value": "Base_at", "type": "color"}, + "HoverPen" : {"value": "89, 89, 89", "type": "color"}, + "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisablePen" : {"value": "89, 89, 89", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} + }, + "TranslucentLineEdit":{ + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, + "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "HoverBrush" : {"value": "Base_at", "type": "color"}, + "HoverPen" : {"value": "89, 89, 89", "type": "color"}, + "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisablePen" : {"value": "89, 89, 89", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} + } + }, + "SpinBox":{ + "DefaultSpinBox":{ + "HorizonLayout":{ + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, + "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, + "HoverPen" : {"value": "89, 89, 89", "type": "color"}, + "DisablePen" : {"value": "89, 89, 89", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "UpDefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "DownDefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} + }, + "DefaultLayout":{ + "FocusPen" : {"value": "HighLight_iat", "type": "paletterole"}, + "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, + "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "HoverBrush" : {"value": "Base_at", "type": "paletterole"}, + "HoverPen" : {"value": "89, 89, 89", "type": "color"}, + "DisablePen" : {"value": "89, 89, 89", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "UpDefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "DownDefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} + } + } + }, + "ComboBox":{ + "DefaultComboBox":{ + "DisablePen" : {"value": "89, 89, 89", "type": "color"}, + "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"type": "color"}, + "EditBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "ListView":{ + "DefaultListView":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} + }, + "HighlightListView":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} + }, + "TranslucentListView":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} + } + }, + "TreeView":{ + "DefaultTreeView":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} + }, + "HighlightTreeView":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} + } + }, + "Table":{ + "DefaultTable":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} + }, + "HighlightTable":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextHoverPen" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "ButtonText_at", "type": "paletterole"} + } + }, + "CheckBox":{ + "DefaultCheckBox":{ + "DefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "DisablePen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "PathBrush" : {"value": "Text_at", "type": "paletterole"}, + "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "TranslucentCheckBox":{ + "DefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "DisablePen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "PathBrush" : {"value": "Text_at", "type": "paletterole"}, + "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "RadioButton":{ + "DefaultRadioButton":{ + "DefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "DisablePen" : {"value": "89, 89, 89", "type": "color"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "SliderBar":{ + "DefaultSliderBar":{ + "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, + "HandleDisablePen" : {"value": "89, 89, 89", "type": "color"}, + "GrooveValueDefaultBrush" : {"value": "HighLight_iat", "type": "paletterole"}, + "GrooveValueHoverBrush" : {"value": "HighLight_iat", "type": "paletterole"}, + "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveUnvalueDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, + "GrooveUnvalueHoverBrush" : {"value": "Button_dis", "type": "paletterole"}, + "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "SliderGroovePen" : {"value": "89, 89, 89", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + }, + "TranslucentSliderBar":{ + "HandleDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HandleDisableBrush" : {"value": "Button_at", "type": "paletterole"}, + "HandleDisablePen" : {"value": "89, 89, 89", "type": "color"}, + "GrooveValueDefaultBrush" : {"value": "HighLight_iat", "type": "paletterole"}, + "GrooveValueHoverBrush" : {"value": "HighLight_iat", "type": "paletterole"}, + "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveUnvalueDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, + "GrooveUnvalueHoverBrush" : {"value": "Button_dis", "type": "paletterole"}, + "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "SliderGroovePen" : {"value": "89, 89, 89", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "ProgressBar":{ + "DefaultProgressBar" :{ + "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveDefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "GrooveDisablePen" : {"value": "89, 89, 89", "type": "color"}, + "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} + }, + "TranslucentProgressBar": { + "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveDisableBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveDefaultPen" : {"value": "89, 89, 89", "type": "color"}, + "GrooveDisablePen" : {"value": "89, 89, 89", "type": "color"}, + "ContentPen" : {"value": "0, 0, 0, 0", "type": "color"} + } + }, + "ScrollBar":{ + "DefaultScrollBar" :{ + "GrooveDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, + "GrooveInactiveBrush" : {"value": "Button_dis", "type": "paletterole"}, + "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "SliderHoverBrush" : {"value": "87, 87, 93", "type": "color"}, + "SliderClickBrush" : {"value": "102, 102, 102", "type": "color"}, + "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} + }, + "TranslucentScrollBar": { + "GrooveDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, + "GrooveInactiveBrush" : {"value": "Button_dis", "type": "paletterole"}, + "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "SliderHoverBrush" : {"value": "87, 87, 93", "type": "color"}, + "SliderClickBrush" : {"value": "102, 102, 102", "type": "color"}, + "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} + } + }, + "ToolTip":{ + "DefaultToolTip" :{ + "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, + "BackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"} + } + }, + "TabWidget":{ + "DefaultTabWidget" :{ + "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarBackgroundBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TabBarDefaultBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TabBarHoverBrush" : { "type": "color"}, + "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "Menu":{ + "DefaultMenu" :{ + "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, + "MenuBackgroundPen" : {"value": "89, 89, 89", "type": "color"}, + "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"}, + "MenuItemFocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + } + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/default.json qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/default.json --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/default.json 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/default.json 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,927 @@ +{ + "Radius":{ + "Max_Radius" : {"value": "8", "type": "int"}, + "Normal_Radius" : {"value": "6", "type": "int"}, + "Min_Radius" : {"value": "4", "type": "int"} + }, + "ColorAdjustRules" : "Default", + "LightTheme":{ + "Palette":{ + "WindowText_at" : {"value": "38, 38, 38", "type": "color"}, + "WindowText_iat" : {"value": "0, 0, 0, 255*0.55", "type": "color"}, + "WindowText_dis" : {"value": "0, 0, 0, 255*0.3", "type": "color"}, + "Button_at" : {"value": "230, 230, 230 ", "type": "color"}, + "Button_iat" : {"value": "230, 230, 230", "type": "color"}, + "Button_dis" : {"value": "233, 233, 233", "type": "color"}, + "Light_at" : {"value": "255, 255, 255", "type": "color"}, + "Light_iat" : {"value": "255, 255, 255", "type": "color"}, + "Light_dis" : {"value": "242, 242, 242", "type": "color"}, + "Midlight_at" : {"value": "218, 218, 218", "type": "color"}, + "Midlight_iat" : {"value": "218, 218, 218", "type": "color"}, + "Midlight_dis" : {"value": "230, 230, 230", "type": "color"}, + "Dark_at" : {"value": "77, 77, 77", "type": "color"}, + "Dark_iat" : {"value": "77, 77, 77", "type": "color"}, + "Dark_dis" : {"value": "64, 64, 64", "type": "color"}, + "Mid_at" : {"value": "115, 115, 115", "type": "color"}, + "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, + "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, + "Text_at" : {"value": "38, 38, 38 ", "type": "color"}, + "Text_iat" : {"value": "38, 38, 38", "type": "color"}, + "Text_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"}, + "BrightText_at" : {"value": "0, 0, 0", "type": "color"}, + "BrightText_iat" : {"value": "0, 0, 0", "type": "color"}, + "BrightText_dis" : {"value": "0, 0, 0", "type": "color"}, + "ButtonText_at" : {"value": "38, 38, 38", "type": "color"}, + "ButtonText_iat" : {"value": "38, 38, 38", "type": "color"}, + "ButtonText_dis" : {"value": "179, 179, 179", "type": "color"}, + "Base_at" : {"value": "255, 255, 255", "type": "color"}, + "Base_iat" : {"value": "245, 245, 245", "type": "color"}, + "Base_dis" : {"value": "237, 237, 237", "type": "color"}, + "Window_at" : {"value": "245, 245, 245", "type": "color"}, + "Window_iat" : {"value": "237, 237, 237", "type": "color"}, + "Window_dis" : {"value": "230, 230, 230", "type": "color"}, + "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, + "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, + "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, + "HighLight_at" : {"value": "55, 144, 250", "type": "color"}, + "HighLight_iat" : {"value": "55, 144, 250", "type": "color"}, + "HighLight_dis" : {"value": "233, 233, 233 ", "type": "color"}, + "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, + "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, + "HighLightText_dis" : {"value": "179, 179, 179", "type": "color"}, + "Link_at" : {"value": "55, 144, 250 ", "type": "color"}, + "Link_iat" : {"value": "55, 144, 250 ", "type": "color"}, + "Link_dis" : {"value": "55, 144, 250 ", "type": "color"}, + "LinkVisited_at" : {"value": "114, 46, 209 ", "type": "color"}, + "LinkVisited_iat" : {"value": "114, 46, 209 ", "type": "color"}, + "LinkVisited_dis" : {"value": "114, 46, 209 ", "type": "color"}, + "AlternateBase_at" : {"value": "245, 245, 245 ", "type": "color"}, + "AlternateBase_iat" : {"value": "245, 245, 245 ", "type": "color"}, + "AlternateBase_dis" : {"value": "245, 245, 245 ", "type": "color"}, + "NoRole_at" : {"value": "240, 240, 240 ", "type": "color"}, + "NoRole_iat" : {"value": "240, 240, 240 ", "type": "color"}, + "NoRole_dis" : {"value": "217, 217, 217 ", "type": "color"}, + "ToolTipBase_at" : {"value": "255, 255, 255 ", "type": "color"}, + "ToolTipBase_iat" : {"value": "255, 255, 255 ", "type": "color"}, + "ToolTipBase_dis" : {"value": "255, 255, 255 ", "type": "color"}, + "ToolTipText_at" : {"value": "38, 38, 38 ", "type": "color"}, + "ToolTipText_iat" : {"value": "38, 38, 38 ", "type": "color"}, + "ToolTipText_dis" : {"value": "38, 38, 38 ", "type": "color"}, + "PlaceholderText_at" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, + "PlaceholderText_iat" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, + "PlaceholderText_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"} + }, + "PushButton":{ + "DefaultPushButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowCloseButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, + "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, + "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "UseButtonPalette":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "ClickBrush" : {"value": "184, 184, 184", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "ImportButton":{ + "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "Base_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "TranslucentButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, + "HoverBrush" : {"value": "0, 0, 0, 0.16", "type": "color"}, + "ClickBrush" : {"value": "0, 0, 0, 0.20", "type": "color"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "ToolButton":{ + "DefaultToolButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowCloseButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, + "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, + "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "UseButtonPalette":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "ClickBrush" : {"value": "184, 184, 184", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "ImportButton":{ + "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "Base_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "TranslucentButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, + "HoverBrush" : {"value": "0, 0, 0, 0.16", "type": "color"}, + "ClickBrush" : {"value": "0, 0, 0, 0.20", "type": "color"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "LineEdit":{ + "DefaultLineEdit":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, + "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} + }, + "TranslucentLineEdit":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "0, 0, 0, 0.04", "type": "color"}, + "HoverBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, + "FocusBrush" : {"value": "255, 255, 255, 0.65", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} + } + }, + "SpinBox":{ + "DefaultSpinBox":{ + "HorizonLayout":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, + "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "UpHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "UpFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "UpClickBrush" : {"value": "184, 184, 184", "type": "color"}, + "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DownHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "DownClickBrush" : {"value": "184, 184, 184", "type": "color"}, + "DownFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"} + }, + "DefaultLayout":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, + "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, + "UpHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "UpFocusHoverBrush" : {"type": "color"}, + "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, + "DownHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "DownFocusHoverBrush" : {"type": "color"} + } + } + }, + "ComboBox":{ + "DefaultComboBox":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "OnBrush" : {"value": "Base_at", "type": "paletterole"}, + "EditBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "ListView":{ + "DefaultListView":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, + "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} + }, + "HighlightListView":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, + "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} + }, + "TranslucentListView":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, + "SelectBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} + } + }, + "TreeView":{ + "DefaultTreeView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, + "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} + }, + "HighlightTreeView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, + "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} + } + }, + "Table":{ + "DefaultTable":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, + "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} + }, + "HighlightTable":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, + "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} + } + }, + "CheckBox":{ + "DefaultCheckBox":{ + "DefaultPen" : {"value": "166, 166, 166", "type": "color"}, + "HoverPen" : {"value": "166, 166, 166", "type": "color"}, + "ClickPen" : {"value": "Mid_at", "type": "paletterole"}, + "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, + "OnHoverPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, + "OnClickPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, + "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "255, 255, 255", "type": "color"}, + "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, + "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, + "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "OnHoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "TranslucentCheckBox":{ + "DefaultPen" : {"value": "0, 0, 0, 0.35", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0.30", "type": "color"}, + "ClickPen" : {"value": "0, 0, 0, 0.65", "type": "color"}, + "DisablePen" : {"value": "166, 166, 166", "type": "color"}, + "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, + "OnHoverPen" : {"value": "0, 0, 0, 0.15", "type": "color"}, + "OnClickPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, + "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, + "HoverBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, + "ClickBrush" : {"value": "0, 0, 0, 0.16", "type": "color"}, + "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "OnHoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "RadioButton":{ + "DefaultRadioButton":{ + "DefaultPen" : {"value": "166, 166, 166", "type": "color"}, + "HoverPen" : {"value": "166, 166, 166", "type": "color"}, + "ClickPen" : {"value": "Mid_at", "type": "paletterole"}, + "DisablePen" : {"value": "166, 166, 166", "type": "color"}, + "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, + "DefaultBrush" : {"value": "Light_at", "type": "paletterole"}, + "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, + "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, + "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "OnHoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "ChildrenOnClickBrush" : {"value": "Button_at", "type": "paletterole"}, + "ChildrenOnDisableBrush" : {"value": "HighLightText_dis","type": "paletterole"} + } + }, + "SliderBar":{ + "DefaultSliderBar":{ + "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HandleHoverBrush" : { "type": "color"}, + "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + }, + "TranslucentSliderBar":{ + "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HandleHoverBrush" : { "type": "color"}, + "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveUnvalueDefaultBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, + "GrooveUnvalueHoverBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, + "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "ProgressBar":{ + "DefaultProgressBar" :{ + "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, + "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} + }, + "TranslucentProgressBar": { + "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, + "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, + "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} + } + }, + "ScrollBar":{ + "DefaultScrollBar" :{ + "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, + "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, + "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "SliderClickBrush" : {"value": "184, 184, 184", "type": "color"}, + "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} + }, + "TranslucentScrollBar": { + "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.06", "type": "color"}, + "GrooveInactiveBrush" : {"value": "0, 0, 0, 0.06", "type": "color"}, + "SliderDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, + "SliderHoverBrush" : {"value": "0, 0, 0, 0.18", "type": "color"}, + "SliderClickBrush" : {"value": "0, 0, 0, 0.28", "type": "color"}, + "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} + } + }, + "ToolTip":{ + "DefaultToolTip" :{ + "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, + "BackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"} + } + }, + "TabWidget":{ + "DefaultTabWidget" :{ + "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, + "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, + "TabBarHoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, + "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "Menu":{ + "DefaultMenu" :{ + "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, + "MenuBackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"}, + "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"}, + "MenuItemFocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + } + }, + "DarkTheme":{ + "Palette":{ + "WindowText_at" : {"value": "217, 217, 217", "type": "color"}, + "WindowText_iat" : {"value": "255, 255, 255, 255 * 0.55", "type": "color"}, + "WindowText_dis" : {"value": "255, 255, 255, 255 * 0.3", "type": "color"}, + "Button_at" : {"value": "55, 55, 59 ", "type": "color"}, + "Button_iat" : {"value": "55, 55, 59 ", "type": "color"}, + "Button_dis" : {"value": "46, 46, 46 ", "type": "color"}, + "Light_at" : {"value": "255, 255, 255", "type": "color"}, + "Light_iat" : {"value": "255, 255, 255", "type": "color"}, + "Light_dis" : {"value": "242, 242, 242", "type": "color"}, + "Midlight_at" : {"value": "95, 95, 98", "type": "color"}, + "Midlight_iat" : {"value": "95, 95, 98", "type": "color"}, + "Midlight_dis" : {"value": "79, 79, 82", "type": "color"}, + "Dark_at" : {"value": "38, 38, 38", "type": "color"}, + "Dark_iat" : {"value": "38, 38, 38", "type": "color"}, + "Dark_dis" : {"value": "26, 26, 26", "type": "color"}, + "Mid_at" : {"value": "115, 115, 115", "type": "color"}, + "Mid_iat" : {"value": "115, 115, 115", "type": "color"}, + "Mid_dis" : {"value": "102, 102, 102", "type": "color"}, + "Text_at" : {"value": "217, 217, 217", "type": "color"}, + "Text_iat" : {"value": "217, 217, 217", "type": "color"}, + "Text_dis" : {"value": "255, 255, 255, 255 * 0.3", "type": "color"}, + "BrightText_at" : {"value": "255, 255, 255", "type": "color"}, + "BrightText_iat" : {"value": "255, 255, 255", "type": "color"}, + "BrightText_dis" : {"value": "255, 255, 255", "type": "color"}, + "ButtonText_at" : {"value": "217, 217, 217", "type": "color"}, + "ButtonText_iat" : {"value": "217, 217, 217", "type": "color"}, + "ButtonText_dis" : {"value": "76, 76, 79", "type": "color"}, + "Base_at" : {"value": "29, 29, 29", "type": "color"}, + "Base_iat" : {"value": "28, 28, 28", "type": "color"}, + "Base_dis" : {"value": "36, 36, 36", "type": "color"}, + "Window_at" : {"value": "35, 36, 38", "type": "color"}, + "Window_iat" : {"value": "26, 26, 26", "type": "color"}, + "Window_dis" : {"value": "18, 18, 18", "type": "color"}, + "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, + "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16", "type": "color"}, + "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21", "type": "color"}, + "HighLight_at" : {"value": "55, 144, 250", "type": "color"}, + "HighLight_iat" : {"value": "55, 144, 250", "type": "color"}, + "HighLight_dis" : {"value": "46, 46, 46", "type": "color"}, + "HighLightText_at" : {"value": "255, 255, 255", "type": "color"}, + "HighLightText_iat" : {"value": "255, 255, 255", "type": "color"}, + "HighLightText_dis" : {"value": "179, 179, 179", "type": "color"}, + "Link_at" : {"value": "55, 144, 250", "type": "color"}, + "Link_iat" : {"value": "55, 144, 250", "type": "color"}, + "Link_dis" : {"value": "55, 144, 250", "type": "color"}, + "LinkVisited_at" : {"value": "114, 46, 209", "type": "color"}, + "LinkVisited_iat" : {"value": "114, 46, 209", "type": "color"}, + "LinkVisited_dis" : {"value": "114, 46, 209", "type": "color"}, + "AlternateBase_at" : {"value": "38, 38, 38 ", "type": "color"}, + "AlternateBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, + "AlternateBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, + "NoRole_at" : {"value": "51, 51, 51 ", "type": "color"}, + "NoRole_iat" : {"value": "51, 51, 51 ", "type": "color"}, + "NoRole_dis" : {"value": "60, 60, 60 ", "type": "color"}, + "ToolTipBase_at" : {"value": "38, 38, 38 ", "type": "color"}, + "ToolTipBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, + "ToolTipBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, + "ToolTipText_at" : {"value": "217, 217, 217", "type": "color"}, + "ToolTipText_iat" : {"value": "217, 217, 217", "type": "color"}, + "ToolTipText_dis" : {"value": "217, 217, 217", "type": "color"}, + "PlaceholderText_at" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, + "PlaceholderText_iat" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"}, + "PlaceholderText_dis" : {"value": "255, 255, 255, 255 * 0.35", "type": "color"} + }, + "PushButton":{ + "DefaultPushButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowCloseButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, + "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowButton":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "UseButtonPalette":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "95, 95, 95", "type": "color"}, + "ClickBrush" : {"value": "65, 65, 65", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "ImportButton":{ + "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "TranslucentButton":{ + "DefaultBrush" : {"value": "255, 255, 255, 0.1", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.2", "type": "color"}, + "ClickBrush" : {"value": "255, 255, 255, 0.3", "type": "color"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "ToolButton":{ + "DefaultToolButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowCloseButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "243, 34, 45", "type": "color"}, + "ClickBrush" : {"value": "204, 18, 34", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowButton":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "UseButtonPalette":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "95, 95, 95", "type": "color"}, + "ClickBrush" : {"value": "65, 65, 65", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "ImportButton":{ + "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HoverBrush" : {"type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "TranslucentButton":{ + "DefaultBrush" : {"value": "255, 255, 255, 0.1", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.2", "type": "color"}, + "ClickBrush" : {"value": "255, 255, 255, 0.3", "type": "color"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "LineEdit":{ + "DefaultLineEdit":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, + "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} + }, + "TranslucentLineEdit":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, + "FocusBrush" : {"value": "29, 29, 29, 0.45", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} + } + }, + "SpinBox":{ + "DefaultSpinBox":{ + "HorizonLayout":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, + "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "UpHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "UpClickBrush" : {"value": "65, 65, 65", "type": "color"}, + "UpFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "DownHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "DownClickBrush" : {"value": "65, 65, 65", "type": "color"}, + "DownFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"} + }, + "DefaultLayout":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "Button_at", "type": "paletterole"}, + "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, + "UpHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "UpFocusHoverBrush" : {"type": "color"}, + "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, + "DownHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "DownFocusHoverBrush" : {"type": "color"} + } + } + }, + "ComboBox":{ + "DefaultComboBox":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "OnBrush" : {"value": "Base_at", "type": "paletterole"}, + "EditBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "ListView":{ + "DefaultListView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} + }, + "HighlightListView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} + }, + "TranslucentListView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, + "SelectBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} + } + }, + "TreeView":{ + "DefaultTreeView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} + }, + "HighlightTreeView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} + } + }, + "Table":{ + "DefaultTable":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} + }, + "HighlightTable":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "HighLightText_at", "type": "paletterole"} + } + }, + "CheckBox":{ + "DefaultCheckBox":{ + "DefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "HoverPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "ClickPen" : {"value": "Mid_dis", "type": "paletterole"}, + "OnDefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "OnHoverPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "OnClickPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, + "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "OnHoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "TranslucentCheckBox":{ + "DefaultPen" : {"value": "255, 255, 255, 0.35", "type": "color"}, + "HoverPen" : {"value": "255, 255, 255, 0.30", "type": "color"}, + "ClickPen" : {"value": "255, 255, 255, 0.25", "type": "color"}, + "OnDefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "OnHoverPen" : {"value": "255, 255, 255, 0.20", "type": "color"}, + "OnClickPen" : {"value": "255, 255, 255, 0.10", "type": "color"}, + "ContentPen" : {"value": "HighLightText_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "255, 255, 255, 0.04", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, + "ClickBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, + "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "OnHoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "PathBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "PathDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "RadioButton":{ + "DefaultRadioButton":{ + "DefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "HoverPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "ClickPen" : {"value": "Mid_dis", "type": "paletterole"}, + "DisablePen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "OnDefaultPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "ClickBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "OnHoverBrush" : { "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "SliderBar":{ + "DefaultSliderBar":{ + "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HandleHoverBrush" : { "type": "color"}, + "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveUnvalueDisableBrush" : {"value": "HighLight_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + }, + "TranslucentSliderBar":{ + "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HandleHoverBrush" : { "type": "color"}, + "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveUnvalueDefaultBrush" : {"value": "255, 255, 255, 0.1","type": "color"}, + "GrooveUnvalueHoverBrush" : {"value": "255, 255, 255, 0.1","type": "color"}, + "GrooveUnvalueDisableBrush" : {"value": "HighLight_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "ProgressBar":{ + "DefaultProgressBar" :{ + "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, + "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} + }, + "TranslucentProgressBar": { + "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, + "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, + "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} + } + }, + "ScrollBar":{ + "DefaultScrollBar" :{ + "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, + "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, + "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "SliderHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "SliderClickBrush" : {"value": "65, 65, 65", "type": "color"}, + "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} + }, + "TranslucentScrollBar": { + "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, + "GrooveInactiveBrush" : {"value": "255, 255, 255, 0.08", "type": "color"}, + "SliderDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, + "SliderHoverBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, + "SliderClickBrush" : {"value": "255, 255, 255, 0.30", "type": "color"}, + "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} + } + }, + "ToolTip":{ + "DefaultToolTip" :{ + "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, + "BackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"} + } + }, + "TabWidget":{ + "DefaultTabWidget" :{ + "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, + "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, + "TabBarHoverBrush" : {"value": "255, 255, 255, 0.15","type": "color"}, + "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "Menu":{ + "DefaultMenu" :{ + "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, + "MenuBackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"}, + "MenuItemFocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + } + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/fashion.json 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,923 @@ +{ + "Radius":{ + "Max_Radius" : {"value": "8", "type": "int"}, + "Normal_Radius" : {"value": "6", "type": "int"}, + "Min_Radius" : {"value": "4", "type": "int"} + }, + "ColorAdjustRules" : "Default", + "LightTheme":{ + "Palette":{ + "WindowText_at" : {"value": "38,38,38 ", "type": "color"}, + "WindowText_iat" : {"value": "0,0,0,255*0.55 ", "type": "color"}, + "WindowText_dis" : {"value": "0,0,0,255*0.3 ", "type": "color"}, + "Button_at" : {"value": "230,230,230 ", "type": "color"}, + "Button_iat" : {"value": "230, 230, 230 ", "type": "color"}, + "Button_dis" : {"value": "233, 233, 233 ", "type": "color"}, + "Light_at" : {"value": "255, 255, 255 ", "type": "color"}, + "Light_iat" : {"value": "255, 255, 255 ", "type": "color"}, + "Light_dis" : {"value": "242, 242, 242 ", "type": "color"}, + "Midlight_at" : {"value": "218, 218, 218 ", "type": "color"}, + "Midlight_iat" : {"value": "218, 218, 218 ", "type": "color"}, + "Midlight_dis" : {"value": "230, 230, 230 ", "type": "color"}, + "Dark_at" : {"value": "77, 77, 77 ", "type": "color"}, + "Dark_iat" : {"value": "77, 77, 77 ", "type": "color"}, + "Dark_dis" : {"value": "64, 64, 64 ", "type": "color"}, + "Mid_at" : {"value": "115, 115, 115 ", "type": "color"}, + "Mid_iat" : {"value": "115, 115, 115 ", "type": "color"}, + "Mid_dis" : {"value": "102, 102, 102 ", "type": "color"}, + "Text_at" : {"value": "38, 38, 38 ", "type": "color"}, + "Text_iat" : {"value": "38, 38, 38 ", "type": "color"}, + "Text_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"}, + "BrightText_at" : {"value": "0, 0, 0 ", "type": "color"}, + "BrightText_iat" : {"value": "0, 0, 0 ", "type": "color"}, + "BrightText_dis" : {"value": "0, 0, 0 ", "type": "color"}, + "ButtonText_at" : {"value": "38, 38, 38 ", "type": "color"}, + "ButtonText_iat" : {"value": "38, 38, 38 ", "type": "color"}, + "ButtonText_dis" : {"value": "179, 179, 179 ", "type": "color"}, + "Base_at" : {"value": "255, 255, 255 ", "type": "color"}, + "Base_iat" : {"value": "245, 245, 245 ", "type": "color"}, + "Base_dis" : {"value": "237, 237, 237 ", "type": "color"}, + "Window_at" : {"value": "245, 245, 245 ", "type": "color"}, + "Window_iat" : {"value": "237, 237, 237 ", "type": "color"}, + "Window_dis" : {"value": "230, 230, 230 ", "type": "color"}, + "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, + "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, + "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21 ", "type": "color"}, + "HighLight_at" : {"value": "120, 115, 245 ", "type": "color"}, + "HighLight_iat" : {"value": "120, 115, 245 ", "type": "color"}, + "HighLight_dis" : {"value": "233, 233, 233 ", "type": "color"}, + "HighLightText_at" : {"value": "255, 255, 255 ", "type": "color"}, + "HighLightText_iat" : {"value": "255, 255, 255 ", "type": "color"}, + "HighLightText_dis" : {"value": "179, 179, 179 ", "type": "color"}, + "Link_at" : {"value": "120, 115, 245 ", "type": "color"}, + "Link_iat" : {"value": "120, 115, 245 ", "type": "color"}, + "Link_dis" : {"value": "120, 115, 245 ", "type": "color"}, + "LinkVisited_at" : {"value": "62, 118, 247 ", "type": "color"}, + "LinkVisited_iat" : {"value": "62, 118, 247 ", "type": "color"}, + "LinkVisited_dis" : {"value": "62, 118, 247 ", "type": "color"}, + "AlternateBase_at" : {"value": "245, 245, 245 ", "type": "color"}, + "AlternateBase_iat" : {"value": "245, 245, 245 ", "type": "color"}, + "AlternateBase_dis" : {"value": "245, 245, 245 ", "type": "color"}, + "NoRole_at" : {"value": "240, 240, 240 ", "type": "color"}, + "NoRole_iat" : {"value": "240, 240, 240 ", "type": "color"}, + "NoRole_dis" : {"value": "217, 217, 217 ", "type": "color"}, + "ToolTipBase_at" : {"value": "255, 255, 255 ", "type": "color"}, + "ToolTipBase_iat" : {"value": "255, 255, 255 ", "type": "color"}, + "ToolTipBase_dis" : {"value": "255, 255, 255 ", "type": "color"}, + "ToolTipText_at" : {"value": "38, 38, 38 ", "type": "color"}, + "ToolTipText_iat" : {"value": "38, 38, 38 ", "type": "color"}, + "ToolTipText_dis" : {"value": "38, 38, 38 ", "type": "color"}, + "PlaceholderText_at" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, + "PlaceholderText_iat" : {"value": "0, 0, 0, 255 * 0.35 ", "type": "color"}, + "PlaceholderText_dis" : {"value": "0, 0, 0, 255 * 0.3 ", "type": "color"} + }, + "PushButton":{ + "DefaultPushButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"type": "gradient"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowCloseButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "242, 82, 117 ~ 221, 44, 68", "type": "gradient"}, + "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "218, 218, 218 ~ 184, 184, 184", "type": "gradient"}, + "ClickBrush" : {"value": "191, 191, 191", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "UseButtonPalette":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "218, 218, 218 ~ 184, 184, 184", "type": "gradient"}, + "ClickBrush" : {"value": "191, 191, 191", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "ImportButton":{ + "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HoverBrush" : {"type": "gradient"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "Base_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "TranslucentButton":{ + "DefaultBrush" : {"value": "115, 115, 115, 0.2", "type": "color"}, + "HoverBrush" : {"value": "115, 115, 115, 0.2 ~ 77, 77, 77, 0.2", "type": "gradient"}, + "ClickBrush" : {"value": "77, 77, 77, 0.3", "type": "color"}, + "DisableBrush" : {"value": "38, 38, 38, 0.1", "type": "color"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "ToolButton":{ + "DefaultToolButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"type": "gradient"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowCloseButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "242, 82, 117 ~ 221, 44, 68", "type": "gradient"}, + "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "218, 218, 218 ~ 184, 184, 184", "type": "gradient"}, + "ClickBrush" : {"value": "191, 191, 191", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "UseButtonPalette":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "218, 218, 218 ~ 184, 184, 184", "type": "gradient"}, + "ClickBrush" : {"value": "191, 191, 191", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "ButtonText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "ImportButton":{ + "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HoverBrush" : {"type": "gradient"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "Base_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "TranslucentButton":{ + "DefaultBrush" : {"value": "38, 38, 38, 0.10", "type": "color"}, + "HoverBrush" : {"value": "115, 115, 115, 0.2 ~ 77, 77, 77, 0.2", "type": "gradient"}, + "ClickBrush" : {"value": "77, 77, 77, 0.3", "type": "color"}, + "DisableBrush" : {"value": "38, 38, 38, 0.1", "type": "color"}, + "TextColor" : {"value": "Base_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "Base_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "LineEdit":{ + "DefaultLineEdit":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "102, 97, 208", "type": "color"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "217, 217, 217, 0.5 ~ 191, 191, 191, 0.5", "type": "gradient"}, + "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} + }, + "TranslucentLineEdit":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DefaultBrush" : {"value": "115, 115, 115, 0.15", "type": "color"}, + "HoverBrush" : {"value": "115, 115, 115, 0.2 ~ 77, 77, 77, 0.2", "type": "gradient"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "FocusBrush" : {"value": "255, 255, 255, 0.65", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} + } + }, + "SpinBox":{ + "DefaultSpinBox":{ + "HorizonLayout":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "217, 217, 217, 0.5 ~ 191, 191, 191, 0.5", "type": "gradient"}, + "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "UpHoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, + "UpFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "UpClickBrush" : {"value": "184, 184, 184", "type": "color"}, + "DownHoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, + "DownFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "DownClickBrush" : {"value": "184, 184, 184", "type": "color"}, + "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} + }, + "DefaultLayout":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "217, 217, 217, 0.5 ~ 191, 191, 191, 0.5", "type": "gradient"}, + "FocusBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "UpHoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, + "UpFocusHoverBrush" : {"type": "gradient"}, + "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, + "DownHoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, + "DownFocusHoverBrush" : {"type": "gradient"}, + "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"} + } + } + }, + "ComboBox":{ + "DefaultComboBox":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "OnBrush" : {"value": "Base_at", "type": "paletterole"}, + "EditBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "ListView":{ + "DefaultListView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, + "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} + }, + "HighlightListView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, + "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} + }, + "TranslucentListView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "SelectBrush" : {"value": "77, 77, 77, 0.25", "type": "color"}, + "HoverBrush" : {"value": "115, 115, 115, 0.1 ~ 77, 77, 77, 0.1", "type": "gradient"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "BrightText_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "BrightText_at", "type": "paletterole"} + } + }, + "TreeView":{ + "DefaultTreeView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, + "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} + }, + "HighlightTreeView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, + "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} + } + }, + "Table":{ + "DefaultTable":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, + "SelectBrush" : {"value": "Button_dis", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} + }, + "HighlightTable":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, + "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} + } + }, + "CheckBox":{ + "DefaultCheckBox":{ + "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, + "HoverPen" : {"value": "140, 140, 140", "type": "color"}, + "ClickPen" : {"value": "140, 140, 140", "type": "color"}, + "OnDefaultPen" : {"value": "83, 80, 171", "type": "color"}, + "ContentPen" : {"value": "Light_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Light_at", "type": "paletterole"}, + "HoverBrush" : {"value": "115, 115, 115, 0.2 ~ 77, 77, 77, 0.2","type": "gradient"}, + "ClickBrush" : {"value": "217, 217, 217", "type": "color"}, + "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "OnHoverBrush" : { "type": "gradient"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, + "PathDisableBrush" : {"value": "140, 140, 140", "type": "color"} + }, + "TranslucentCheckBox":{ + "DefaultPen" : {"value": "0, 0, 0, 0.3", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0.3", "type": "color"}, + "ClickPen" : {"value": "0, 0, 0, 0.3", "type": "color"}, + "OnDefaultPen" : {"value": "0, 0, 0, 0.1", "type": "color"}, + "ContentPen" : {"value": "Light_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "115, 115, 115, 0.2", "type": "color"}, + "HoverBrush" : {"value": "95, 95, 95, 0.2 ~ 77, 77, 77, 0.2", "type": "gradient"}, + "ClickBrush" : {"value": "77, 77, 77, 0.30", "type": "color"}, + "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "OnHoverBrush" : { "type": "gradient"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, + "PathDisableBrush" : {"value": "140, 140, 140", "type": "color"} + } + }, + "RadioButton":{ + "DefaultRadioButton":{ + "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, + "HoverPen" : {"value": "140, 140, 140", "type": "color"}, + "ClickPen" : {"value": "140, 140, 140", "type": "color"}, + "DisablePen" : {"value": "166, 166, 166", "type": "color"}, + "OnDefaultPen" : {"value": "83, 80, 171", "type": "color"}, + "DefaultBrush" : {"value": "Base_at", "type": "paletterole"}, + "HoverBrush" : {"value": "0, 0, 0, 0.05", "type": "color"}, + "ClickBrush" : {"value": "0, 0, 0, 0.15", "type": "color"}, + "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "OnHoverBrush" : { "type": "gradient"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "SliderBar":{ + "DefaultSliderBar":{ + "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HandleHoverBrush" : {"type": "gradient"}, + "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + }, + "TranslucentSliderBar":{ + "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HandleHoverBrush" : { "type": "gradient"}, + "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveUnvalueDefaultBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, + "GrooveUnvalueHoverBrush" : {"value": "0, 0, 0, 0.1", "type": "color"}, + "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "ProgressBar":{ + "DefaultProgressBar" :{ + "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, + "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} + }, + "TranslucentProgressBar": { + "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, + "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, + "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} + } + }, + "ScrollBar":{ + "DefaultScrollBar" :{ + "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, + "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, + "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "SliderHoverBrush" : {"value": "218, 218, 218, 0.5 ~ 184, 184, 184, 0.5", "type": "gradient"}, + "SliderClickBrush" : {"value": "184, 184, 184", "type": "color"}, + "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} + }, + "TranslucentScrollBar": { + "GrooveDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, + "GrooveInactiveBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, + "SliderDefaultBrush" : {"value": "0, 0, 0, 0.10", "type": "color"}, + "SliderHoverBrush" : {"value": "0, 0, 0, 0.20", "type": "color"}, + "SliderClickBrush" : {"value": "0, 0, 0, 0.30", "type": "color"}, + "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} + } + }, + "ToolTip":{ + "DefaultToolTip" :{ + "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, + "BackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"} + } + }, + "TabWidget":{ + "DefaultTabWidget" :{ + "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, + "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, + "TabBarHoverBrush" : {"value": "238, 238, 238 ~ 232, 232, 232","type": "gradient"}, + "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "Menu":{ + "DefaultMenu" :{ + "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, + "MenuBackgroundPen" : {"value": "38, 38, 38, 0.15", "type": "color"}, + "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"}, + "MenuItemFocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + } + }, + "DarkTheme":{ + "Palette":{ + "WindowText_at" : {"value": "217, 217, 217 ", "type": "color"}, + "WindowText_iat" : {"value": "255, 255, 255, 255 * 0.55 ", "type": "color"}, + "WindowText_dis" : {"value": "255, 255, 255, 255 * 0.3 ", "type": "color"}, + "Button_at" : {"value": "55, 55, 59 ", "type": "color"}, + "Button_iat" : {"value": "55, 55, 59 ", "type": "color"}, + "Button_dis" : {"value": "46, 46, 46 ", "type": "color"}, + "Light_at" : {"value": "255, 255, 255 ", "type": "color"}, + "Light_iat" : {"value": "255, 255, 255 ", "type": "color"}, + "Light_dis" : {"value": "242, 242, 242 ", "type": "color"}, + "Midlight_at" : {"value": "95, 95, 98 ", "type": "color"}, + "Midlight_iat" : {"value": "95, 95, 98 ", "type": "color"}, + "Midlight_dis" : {"value": "79, 79, 82 ", "type": "color"}, + "Dark_at" : {"value": "38, 38, 38 ", "type": "color"}, + "Dark_iat" : {"value": "38, 38, 38 ", "type": "color"}, + "Dark_dis" : {"value": "26, 26, 26 ", "type": "color"}, + "Mid_at" : {"value": "115, 115, 115 ", "type": "color"}, + "Mid_iat" : {"value": "115, 115, 115 ", "type": "color"}, + "Mid_dis" : {"value": "102, 102, 102 ", "type": "color"}, + "Text_at" : {"value": "217, 217, 217 ", "type": "color"}, + "Text_iat" : {"value": "217, 217, 217 ", "type": "color"}, + "Text_dis" : {"value": "255, 255, 255, 255 * 0.3 ", "type": "color"}, + "BrightText_at" : {"value": "255, 255, 255 ", "type": "color"}, + "BrightText_iat" : {"value": "255, 255, 255 ", "type": "color"}, + "BrightText_dis" : {"value": "255, 255, 255 ", "type": "color"}, + "ButtonText_at" : {"value": "217, 217, 217 ", "type": "color"}, + "ButtonText_iat" : {"value": "217, 217, 217 ", "type": "color"}, + "ButtonText_dis" : {"value": "76, 76, 79 ", "type": "color"}, + "Base_at" : {"value": "29, 29, 29 ", "type": "color"}, + "Base_iat" : {"value": "28, 28, 28 ", "type": "color"}, + "Base_dis" : {"value": "36, 36, 36 ", "type": "color"}, + "Window_at" : {"value": "35, 36, 38 ", "type": "color"}, + "Window_iat" : {"value": "26, 26, 26 ", "type": "color"}, + "Window_dis" : {"value": "18, 18, 18 ", "type": "color"}, + "Shadow_at" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, + "Shadow_iat" : {"value": "0, 0, 0, 255 * 0.16 ", "type": "color"}, + "Shadow_dis" : {"value": "0, 0, 0, 255 * 0.21 ", "type": "color"}, + "HighLight_at" : {"value": "120, 115, 245 ", "type": "color"}, + "HighLight_iat" : {"value": "120, 115, 245 ", "type": "color"}, + "HighLight_dis" : {"value": "46, 46, 46 ", "type": "color"}, + "HighLightText_at" : {"value": "255, 255, 255 ", "type": "color"}, + "HighLightText_iat" : {"value": "255, 255, 255 ", "type": "color"}, + "HighLightText_dis" : {"value": "77, 77, 77 ", "type": "color"}, + "Link_at" : {"value": "120, 115, 245 ", "type": "color"}, + "Link_iat" : {"value": "120, 115, 245 ", "type": "color"}, + "Link_dis" : {"value": "120, 115, 245 ", "type": "color"}, + "LinkVisited_at" : {"value": "62, 118, 247 ", "type": "color"}, + "LinkVisited_iat" : {"value": "62, 118, 247 ", "type": "color"}, + "LinkVisited_dis" : {"value": "62, 118, 247 ", "type": "color"}, + "AlternateBase_at" : {"value": "38, 38, 38 ", "type": "color"}, + "AlternateBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, + "AlternateBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, + "NoRole_at" : {"value": "51, 51, 51 ", "type": "color"}, + "NoRole_iat" : {"value": "51, 51, 51 ", "type": "color"}, + "NoRole_dis" : {"value": "60, 60, 60 ", "type": "color"}, + "ToolTipBase_at" : {"value": "38, 38, 38 ", "type": "color"}, + "ToolTipBase_iat" : {"value": "38, 38, 38 ", "type": "color"}, + "ToolTipBase_dis" : {"value": "38, 38, 38 ", "type": "color"}, + "ToolTipText_at" : {"value": "217, 217, 217 ", "type": "color"}, + "ToolTipText_iat" : {"value": "217, 217, 217 ", "type": "color"}, + "ToolTipText_dis" : {"value": "217, 217, 217 ", "type": "color"}, + "PlaceholderText_at" : {"value": "255, 255, 255, 255 * 0.35 ", "type": "color"}, + "PlaceholderText_iat" : {"value": "255, 255, 255, 255 * 0.35 ", "type": "color"}, + "PlaceholderText_dis" : {"value": "255, 255, 255, 255 * 0.35 ", "type": "color"} + }, + "PushButton":{ + "DefaultPushButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"type": "gradient"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowCloseButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "242, 116, 113 ~ 221, 44, 68", "type": "gradient"}, + "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "95, 95, 95 ~ 56, 56, 56", "type": "gradient"}, + "ClickBrush" : {"value": "95, 95, 95", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "UseButtonPalette":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "95, 95, 95 ~ 65, 65, 65", "type": "gradient"}, + "ClickBrush" : {"value": "95, 95, 95", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "ImportButton":{ + "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HoverBrush" : {"type": "gradient"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "TranslucentButton":{ + "DefaultBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.2 ~ 217, 217, 217, 0.2", "type": "gradient"}, + "ClickBrush" : {"value": "255, 255, 255, 0.3", "type": "color"}, + "DisableBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "ToolButton":{ + "DefaultToolButton":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"type": "gradient"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowCloseButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "242, 116, 113 ~ 221, 44, 68", "type": "gradient"}, + "ClickBrush" : {"value": "198, 42, 63", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "WindowButton":{ + "DefaultBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverBrush" : {"value": "95, 95, 95 ~ 56, 56, 56", "type": "gradient"}, + "ClickBrush" : {"value": "95, 95, 95", "type": "color"}, + "DisableBrush" : {"value": "0, 0, 0, 0", "type": "color"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "UseButtonPalette":{ + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "95, 95, 95 ~ 65, 65, 65", "type": "gradient"}, + "ClickBrush" : {"value": "95, 95, 95", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "ImportButton":{ + "DefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HoverBrush" : {"type": "gradient"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + }, + "TranslucentButton":{ + "DefaultBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.2 ~ 217, 217, 217, 0.2", "type": "gradient"}, + "ClickBrush" : {"value": "255, 255, 255, 0.3", "type": "color"}, + "DisableBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, + "TextColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextHoverColor" : {"value": "BrightText_at", "type": "paletterole"}, + "TextDisableColor" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "LineEdit":{ + "DefaultLineEdit":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5", "type": "gradient"}, + "FocusBrush" : {"value": "Window_dis", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} + }, + "TranslucentLineEdit":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DefaultBrush" : {"value": "217, 217, 217, 0.1", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.2 ~ 217, 217, 217, 0.2", "type": "gradient"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "FocusBrush" : {"value": "29, 29, 29, 0.45", "type": "color"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"} + } + }, + "SpinBox":{ + "DefaultSpinBox":{ + "HorizonLayout":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5", "type": "gradient"}, + "FocusBrush" : {"value": "Window_dis", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "UpHoverBrush" : {"value": "95, 95, 95 ~ 65, 65, 65", "type": "gradient"}, + "UpFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "UpDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "UpClickBrush" : {"value": "65, 65, 65", "type": "color"}, + "DownHoverBrush" : {"value": "95, 95, 95 ~ 65, 65, 65", "type": "gradient"}, + "DownFocusHoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "DownClickBrush" : {"value": "65, 65, 65", "type": "color"}, + "DownDefaultBrush" : {"value": "Button_at", "type": "paletterole"} + }, + "DefaultLayout":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5", "type": "gradient"}, + "FocusBrush" : {"value": "Window_dis", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "UpHoverBrush" : {"value": "95, 95, 95 ~ 65, 65, 65", "type": "gradient"}, + "UpFocusHoverBrush" : {"type": "gradient"}, + "UpDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"}, + "DownHoverBrush" : {"value": "95, 95, 95 ~ 65, 65, 65", "type": "gradient"}, + "DownFocusHoverBrush" : {"type": "gradient"}, + "DownDefaultBrush" : {"value": "0, 0, 0, 0 ", "type": "color"} + } + } + }, + "ComboBox":{ + "DefaultComboBox":{ + "DefaultPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "HoverPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "DisablePen" : {"value": "0, 0, 0, 0", "type": "color"}, + "OnPen" : {"value": "0, 0, 0, 0", "type": "color"}, + "EditPen" : {"value": "HighLight_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "Midlight_at", "type": "paletterole"}, + "OnBrush" : {"value": "Base_at", "type": "paletterole"}, + "EditBrush" : {"value": "Base_at", "type": "paletterole"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "ListView":{ + "DefaultListView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5","type": "gradient"}, + "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} + }, + "HighlightListView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5","type": "gradient"}, + "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} + }, + "TranslucentListView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.15 ~ 217, 217, 217, 0.15", "type": "gradient"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "SelectBrush" : {"value": "255, 255, 255, 0.2", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Light_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} + } + }, + "TreeView":{ + "DefaultTreeView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5","type": "gradient"}, + "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} + }, + "HighlightTreeView":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5","type": "gradient"}, + "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} + } + }, + "Table":{ + "DefaultTable":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5","type": "gradient"}, + "SelectBrush" : {"value": "64, 64, 64", "type": "color"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Text_at", "type": "paletterole"} + }, + "HighlightTable":{ + "DefaultBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "HoverBrush" : {"value": "95, 95, 95, 0.5 ~ 65, 65, 65, 0.5","type": "gradient"}, + "SelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "DisableBrush" : {"value": "255, 255, 255, 0", "type": "color"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"}, + "TextDisablePen" : {"value": "Text_dis", "type": "paletterole"}, + "TextHoverPen" : {"value": "Text_at", "type": "paletterole"}, + "TextSelectPen" : {"value": "Light_at", "type": "paletterole"} + } + }, + "CheckBox":{ + "DefaultCheckBox":{ + "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, + "HoverPen" : {"value": "140, 140, 140", "type": "color"}, + "ClickPen" : {"value": "140, 140, 140", "type": "color"}, + "OnDefaultPen" : {"value": "160, 157, 248", "type": "color"}, + "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, + "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "OnHoverBrush" : {"type": "gradient"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, + "PathDisableBrush" : {"value": "140, 140, 140", "type": "color"} + }, + "TranslucentCheckBox":{ + "DefaultPen" : {"value": "255, 255, 255, 0.30", "type": "color"}, + "HoverPen" : {"value": "255, 255, 255, 0.30", "type": "color"}, + "ClickPen" : {"value": "255, 255, 255, 0.30", "type": "color"}, + "OnDefaultPen" : {"value": "255, 255, 255, 0.10", "type": "color"}, + "ContentPen" : {"value": "BrightText_at", "type": "paletterole"}, + "DefaultBrush" : {"value": "217, 217, 217, 0.15", "type": "color"}, + "HoverBrush" : {"value": "255, 255, 255, 0.2 ~ 217, 217, 217, 0.2","type": "gradient"}, + "ClickBrush" : {"value": "255, 255, 255, 0.30", "type": "color"}, + "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "OnHoverBrush" : { "type": "gradient"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "PathBrush" : {"value": "BrightText_at", "type": "paletterole"}, + "PathDisableBrush" : {"value": "179, 179, 179", "type": "color"} + } + }, + "RadioButton":{ + "DefaultRadioButton":{ + "DefaultPen" : {"value": "140, 140, 140", "type": "color"}, + "HoverPen" : {"value": "140, 140, 140", "type": "color"}, + "ClickPen" : {"value": "140, 140, 140", "type": "color"}, + "DisablePen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "OnDefaultPen" : {"value": "160, 157, 248", "type": "color"}, + "DefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "HoverBrush" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "ClickBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, + "OnDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "OnHoverBrush" : { "type": "gradient"}, + "DisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "ChildrenOnDefaultBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "ChildrenOnHoverBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "ChildrenOnClickBrush" : {"value": "HighLightText_at", "type": "paletterole"}, + "ChildrenOnDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"} + } + }, + "SliderBar":{ + "DefaultSliderBar":{ + "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HandleHoverBrush" : { "type": "gradient"}, + "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveUnvalueDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveUnvalueHoverBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + }, + "TranslucentSliderBar":{ + "HandleDefaultBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "HandleHoverBrush" : { "type": "gradient"}, + "HandleDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveValueDisableBrush" : {"value": "ButtonText_dis", "type": "paletterole"}, + "GrooveUnvalueDefaultBrush" : {"value": "255, 255, 255, 0.1", "type": "color"}, + "GrooveUnvalueHoverBrush" : {"value": "255, 255, 255, 0.1", "type": "color"}, + "GrooveUnvalueDisableBrush" : {"value": "Button_dis", "type": "paletterole"}, + "FocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "ProgressBar":{ + "DefaultProgressBar" :{ + "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, + "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "GrooveDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} + }, + "TranslucentProgressBar": { + "ContentStart" : {"value": "HighLight_at", "type": "paletterole"}, + "ContentBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, + "GrooveDisableBrush" : {"value": "Button_dis", "type": "paletterole"} + } + }, + "ScrollBar":{ + "DefaultScrollBar" :{ + "GrooveDefaultBrush" : {"value": "Base_at", "type": "paletterole"}, + "GrooveInactiveBrush" : {"value": "Base_iat", "type": "paletterole"}, + "SliderDefaultBrush" : {"value": "Button_at", "type": "paletterole"}, + "SliderHoverBrush" : {"value": "95, 95, 95 ~ 65, 65, 65", "type": "gradient"}, + "SliderClickBrush" : {"value": "95, 95, 95", "type": "color"}, + "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} + }, + "TranslucentScrollBar": { + "GrooveDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, + "GrooveInactiveBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, + "SliderDefaultBrush" : {"value": "255, 255, 255, 0.10", "type": "color"}, + "SliderHoverBrush" : {"value": "255, 255, 255, 0.20", "type": "color"}, + "SliderClickBrush" : {"value": "255, 255, 255, 0.30", "type": "color"}, + "SliderDisableBrush" : {"value": "0, 0, 0, 0", "type": "color"} + } + }, + "ToolTip":{ + "DefaultToolTip" :{ + "BackgroundBrush" : {"value": "ToolTipBase_at", "type": "paletterole"}, + "BackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"} + } + }, + "TabWidget":{ + "DefaultTabWidget" :{ + "WidgetBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarBackgroundBrush" : {"value": "Window_at", "type": "paletterole"}, + "TabBarDefaultBrush" : {"value": "Window_at", "type": "paletterole"}, + "TabBarHoverBrush" : {"value": "50, 51, 52 ~ 43, 44, 45", "type": "gradient"}, + "TabBarSelectBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarClickBrush" : {"value": "Base_at", "type": "paletterole"}, + "TabBarFocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + }, + "Menu":{ + "DefaultMenu" :{ + "MenuBackgroundBrush" : {"value": "Base_at", "type": "paletterole"}, + "MenuBackgroundPen" : {"value": "255, 255, 255, 0.15", "type": "color"}, + "MenuItemSelectBrush" : {"value": "HighLight_at", "type": "paletterole"}, + "MenuTextHoverPen" : {"value": "HighLightText_at", "type": "paletterole"}, + "MenuItemFocusPen" : {"value": "HighLight_at", "type": "paletterole"} + } + } + } +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/kdefault-dark.css qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/kdefault-dark.css --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/kdefault-dark.css 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/kdefault-dark.css 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,186 @@ +body { + --kgray-alpha12: rgba(255, 255, 255, 0.03); + --kline-brand-click: rgba(55, 144, 250, 0); + --kline-brand-disable: rgba(55, 144, 250, 0); + --kline-window: rgba(255, 255, 255, 0.1); + --brighttext-disable: rgba(255, 255, 255, 1); + --brighttext-active: rgba(255, 255, 255, 1); + --kwhite: rgba(255, 255, 255, 1); + --kblack: rgba(0, 0, 0, 1); + --link-active: rgba(55, 144, 250, 1); + --tooltipbase-disable: rgba(30, 30, 30, 1); + --norole-disable: rgba(68, 68, 68, 1); + --midlight-active: rgba(84, 84, 84, 1); + --kbrand5: rgba(0, 129, 31, 1); + --tooltiptext-disable: rgba(255, 255, 255, 0.9); + --kgray-5: rgba(68, 68, 68, 1); + --kline-brand-normal: rgba(55, 144, 250, 0); + --kgray-alpha4: rgba(255, 255, 255, 0.15); + --highlight-inactive: rgba(55, 144, 250, 1); + --ksuccess-hover: linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%), rgba(0, 180, 42, 1); + --kcomponent-normal: rgba(74, 74, 74, 1); + --kwarning-hover: linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%), rgba(255, 125, 0, 1); + --window-inactive: rgba(54, 54, 54, 1); + --kfont-secondary: rgba(255, 255, 255, 0.6); + --kcomponent-alpha-normal: rgba(255, 255, 255, 0.1); + --dark-inactive: rgba(0, 0, 0, 1); + --buttontext-active: rgba(255, 255, 255, 0.9); + --kcomponent-hover: rgba(84, 84, 84, 1); + --kgray-11: rgba(125, 125, 125, 1); + --text-disable: rgba(255, 255, 255, 0.3); + --button-active: rgba(74, 74, 74, 1); + --kerror-hover: linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%), rgba(245, 63, 63, 1); + --kline-disable-alpha: rgba(255, 255, 255, 0.1); + --kbrand7: rgba(241, 133, 43, 1); + --link-disable: rgba(125, 125, 125, 1); + --kline-normal-alpha: rgba(255, 255, 255, 0.15); + --kfont-white-secondary: rgba(255, 255, 255, 0.65); + --kgray-alpha2: rgba(255, 255, 255, 0.08); + --kgray-alpha1: rgba(255, 255, 255, 0.05); + --kerror-normal: rgba(245, 63, 63, 1); + --kgray-17: rgba(240, 240, 240, 1); + --kcomponent-disable: rgba(60, 60, 60, 1); + --base-disable: rgba(60, 60, 60, 1); + --kgray-6: rgba(74, 74, 74, 1); + --window-active: rgba(46, 46, 46, 1); + --base-inactive: rgba(34, 34, 34, 1); + --highlightedtext-active: rgba(255, 255, 255, 0.9); + --kgray-alpha10: rgba(255, 255, 255, 0.35); + --kgray-13: rgba(160, 160, 160, 1); + --kbrand6: rgba(223, 49, 55, 1); + --kcontain-general-normal: rgba(30, 30, 30, 1); + --kcontain-general-alpha-hover: rgba(255, 255, 255, 0.05); + --kgray-alpha7: rgba(255, 255, 255, 0.25); + --kbrand-normal: rgba(55, 144, 250, 1); + --alternatebase-inactive: rgba(54, 54, 54, 1); + --kbrand-focus: linear-gradient(0deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 100%), rgba(55, 144, 250, 1); + --kcontain-click: rgba(60, 60, 60, 1); + --kgray-12: rgba(135, 135, 135, 1); + --mid-active: rgba(54, 54, 54, 1); + --kgray-alpha0: rgba(255, 255, 255, 0); + --kline-window-acitive: rgba(255, 255, 255, 0.1); + --tooltiptext-active: rgba(255, 255, 255, 0.9); + --kgray-15: rgba(200, 200, 200, 1); + --buttontext-inactive: rgba(255, 255, 255, 0.9); + --alternatebase-disable: rgba(54, 54, 54, 1); + --dark-disable: rgba(34, 34, 34, 1); + --kfont-primary-disable: rgba(255, 255, 255, 0.3); + --kgray-1: rgba(34, 34, 34, 1); + --highlight-active: rgba(55, 144, 250, 1); + --light-inactive: rgba(255, 255, 255, 1); + --kgray-alpha3: rgba(255, 255, 255, 0.1); + --kgray-16: rgba(220, 220, 220, 1); + --kgray-14: rgba(185, 185, 185, 1); + --brighttext-inactive: rgba(255, 255, 255, 1); + --text-active: rgba(255, 255, 255, 0.9); + --kcomponent-alpha-hover: rgba(255, 255, 255, 0.15); + --kgray-2: rgba(46, 46, 46, 1); + --tooltiptext-inactive: rgba(255, 255, 255, 0.9); + --norole-active: rgba(34, 34, 34, 1); + --kbrand-click: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%), rgba(55, 144, 250, 1); + --kerror-click: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%), rgba(245, 63, 63, 1); + --windowtext-disable: rgba(255, 255, 255, 0.3); + --kcontain-general-alpha-click: rgba(255, 255, 255, 0.08); + --highlight-disable: rgba(60, 60, 60, 1); + --kcomponent-click: rgba(115, 115, 115, 1); + --norole-inactive: rgba(34, 34, 34, 1); + --kmodalmask: rgba(0, 0, 0, 0.2); + --kbrand1: rgba(55, 144, 250, 1); + --kcontain-hover: rgba(54, 54, 54, 1); + --tooltipbase-inactive: rgba(30, 30, 30, 1); + --kcomponent-alpha-click: rgba(255, 255, 255, 0.2); + --kgray-8: rgba(95, 95, 95, 1); + --kgray-alpha8: rgba(255, 255, 255, 0.28); + --kgray-alpha13: rgba(255, 255, 255, 0.4); + --linkvisited-disable: rgba(125, 125, 125, 1); + --kgray-alpha11: rgba(255, 255, 255, 0.55); + --kgray-10: rgba(115, 115, 115, 1); + --mid-disable: rgba(68, 68, 68, 1); + --kgray-4: rgba(60, 60, 60, 1); + --kgray-alpha5: rgba(255, 255, 255, 0.18); + --kbrand3: rgba(235, 48, 150, 1); + --windowtext-active: rgba(255, 255, 255, 0.9); + --shadow-active: rgba(255, 255, 255, 0.4); + --kwarning-normal: rgba(255, 125, 0, 1); + --kgray-alpha6: rgba(255, 255, 255, 0.2); + --kfont-secondary-disable: rgba(255, 255, 255, 0.25); + --linkvisited-inactive: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%), rgba(55, 144, 250, 1); + --highlightedtext-disable: rgba(255, 255, 255, 0.3); + --midlight-disable: rgba(74, 74, 74, 1); + --kline-brand-hover: rgba(55, 144, 250, 0); + --light-disable: rgba(220, 220, 220, 1); + --kfont-primary: rgba(255, 255, 255, 0.9); + --kbrand4: rgba(240, 188, 54, 1); + --kbrand-hover: linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%), rgba(55, 144, 250, 1); + --kgray-7: rgba(84, 84, 84, 1); + --kbrand2: rgba(114, 46, 209, 1); + --placeholdertext-disable: rgba(255, 255, 255, 0.5); + --light-active: rgba(255, 255, 255, 1); + --kcontain-secondary-alppha-normal: rgba(255, 255, 255, 0.03); + --kfont-strong: rgba(255, 255, 255, 1); + --kcontain-secondary-normal: rgba(46, 46, 46, 1); + --kcomponent-alpha-disable: rgba(255, 255, 255, 0.08); + --placeholdertext-active: rgba(255, 255, 255, 0.5); + --midlight-inactive: rgba(84, 84, 84, 1); + --shadow-disable: rgba(255, 255, 255, 0.25); + --linkvisited-active: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%), rgba(55, 144, 250, 1); + --kwarning-click: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%), rgba(255, 125, 0, 1); + --kline-component-normal: rgba(255, 255, 255, 0); + --ksuccess-click: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%), rgba(0, 180, 42, 1); + --alternatebase-active: rgba(54, 54, 54, 1); + --kfont-white-secondary-disable: rgba(255, 255, 255, 0.25); + --kline-component-disable: rgba(255, 255, 255, 0); + --shadow-inactive: rgba(255, 255, 255, 0.25); + --mid-inactive: rgba(54, 54, 54, 1); + --kgray-3: rgba(54, 54, 54, 1); + --kfont-white-disable: rgba(255, 255, 255, 0.3); + --kfont-white: rgba(255, 255, 255, 0.9); + --base-active: rgba(30, 30, 30, 1); + --kgray-0: rgba(30, 30, 30, 1); + --placeholdertext-inactive: rgba(255, 255, 255, 0.5); + --window-disable: rgba(60, 60, 60, 1); + --ksuccess-normal: rgba(0, 180, 42, 1); + --kgray-9: rgba(105, 105, 105, 1); + --kgray-alpha9: rgba(255, 255, 255, 0.3); + --button-inactive: rgba(74, 74, 74, 1); + --link-inactive: rgba(55, 144, 250, 1); + --kline-component-hover: rgba(255, 255, 255, 0); + --dark-active: rgba(0, 0, 0, 1); + --tooltipbase-active: rgba(30, 30, 30, 1); + --button-disable: rgba(60, 60, 60, 1); + --highlightedtext-inactive: rgba(255, 255, 255, 0.9); + --buttontext-disable: rgba(255, 255, 255, 0.3); + --text-inactive: rgba(255, 255, 255, 0.9); + --kline-component-click: rgba(255, 255, 255, 0); + --windowtext-inactive: rgba(255, 255, 255, 0.9); + --token-fontfamily-noto-sans-cjk-sc: "Noto Sans CJK SC"; + --token-fontsize-12: 12px; + --token-fontstyle-regular: regular; + --token-fontfamily-noto-sans-cjk-sc-1: "Noto Sans CJK SC"; + --token-fontsize-24: 24px; + --token-fontstyle-regular-1: regular; + --token-fontfamily-noto-sans-cjk-sc-2: "Noto Sans CJK SC"; + --token-fontsize-16: 16px; + --token-fontstyle-regular-2: regular; + --token-fontfamily-noto-sans-cjk-sc-3: "Noto Sans CJK SC"; + --token-fontsize-18: 18px; + --token-fontstyle-regular-3: regular; + --token-fontfamily-noto-sans-cjk-sc-4: "Noto Sans CJK SC"; + --token-fontsize-14: 14px; + --token-fontstyle-regular-4: regular; + --normalline: 1px; + --focusline: 2px; + --kmargin-big: 16px; + --kmargin-min: 4px; + --kmargin-conten: 40px; + --kmagrin-window: 24px; + --kmargin-normal: 8px; + --kpadding-8: 8px; + --kpadding-normal: 2px 16px 2px 16px; + --kpadding-min: 2px 8px 2px 8px; + --kpdding-window: 16px 24px 24px 24px; + --kradius-normal: 6px; + --kradius-min: 4px; + --kradius-menu: 8px; + --kradius-window: 12px; +} \ No newline at end of file diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/kdefault-light.css qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/kdefault-light.css --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/themeconfig/kdefault-light.css 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/themeconfig/kdefault-light.css 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,186 @@ +body { + --kgray-3: rgba(242, 242, 242, 1); + --kbrand2: rgba(114, 46, 209, 1); + --placeholdertext-inactive: rgba(0, 0, 0, 0.5); + --windowtext-disable: rgba(0, 0, 0, 0.35); + --kgray-4: rgba(238, 238, 238, 1); + --kline-component-click: rgba(0, 0, 0, 0); + --kcontain-general-alpha-hover: rgba(0, 0, 0, 0.05); + --kbrand4: rgba(240, 188, 54, 1); + --base-disable: rgba(250, 250, 250, 1); + --kerror-hover: linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%), rgba(245, 63, 63, 1); + --kcomponent-hover: rgba(220, 220, 220, 1); + --kfont-white: rgba(255, 255, 255, 1); + --highlight-disable: rgba(238, 238, 238, 1); + --kgray-alpha0: rgba(0, 0, 0, 0); + --ksuccess-click: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%), rgba(0, 180, 42, 1); + --kgray-11: rgba(175, 175, 175, 1); + --text-inactive: rgba(0, 0, 0, 0.85); + --kline-window: rgba(0, 0, 0, 0.1); + --kbrand-click: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%), rgba(55, 144, 250, 1); + --light-inactive: rgba(255, 255, 255, 1); + --kfont-white-secondary-disable: rgba(255, 255, 255, 0.3); + --kbrand7: rgba(241, 133, 43, 1); + --kcomponent-normal: rgba(230, 230, 230, 1); + --text-disable: rgba(0, 0, 0, 0.35); + --link-inactive: rgba(55, 144, 250, 1); + --kgray-alpha4: rgba(0, 0, 0, 0.15); + --kcontain-click: rgba(238, 238, 238, 1); + --highlightedtext-inactive: rgba(255, 255, 255, 1); + --kcomponent-alpha-disable: rgba(0, 0, 0, 0.08); + --highlight-active: rgba(55, 144, 250, 1); + --kcomponent-click: rgba(185, 185, 185, 1); + --kwhite: rgba(255, 255, 255, 1); + --tooltiptext-inactive: rgba(0, 0, 0, 0.85); + --linkvisited-active: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%), rgba(55, 144, 250, 1); + --kblack: rgba(0, 0, 0, 1); + --kgray-0: rgba(255, 255, 255, 1); + --kbrand-hover: linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%), rgba(55, 144, 250, 1); + --kgray-alpha6: rgba(0, 0, 0, 0.2); + --tooltipbase-inactive: rgba(255, 255, 255, 1); + --kgray-alpha5: rgba(0, 0, 0, 0.18); + --kgray-alpha1: rgba(0, 0, 0, 0.05); + --base-active: rgba(255, 255, 255, 1); + --kwarning-hover: linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%), rgba(255, 125, 0, 1); + --kfont-white-disable: rgba(255, 255, 255, 0.35); + --kgray-alpha12: rgba(0, 0, 0, 0.03); + --kgray-6: rgba(230, 230, 230, 1); + --window-inactive: rgba(242, 242, 242, 1); + --kbrand-normal: rgba(55, 144, 250, 1); + --highlightedtext-active: rgba(255, 255, 255, 1); + --kbrand5: rgba(0, 129, 31, 1); + --kgray-alpha10: rgba(0, 0, 0, 0.35); + --kgray-1: rgba(250, 250, 250, 1); + --kgray-10: rgba(185, 185, 185, 1); + --window-disable: rgba(242, 242, 242, 1); + --kline-brand-normal: rgba(55, 144, 250, 0); + --button-active: rgba(230, 230, 230, 1); + --kwarning-click: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%), rgba(255, 125, 0, 1); + --kcomponent-alpha-hover: rgba(0, 0, 0, 0.15); + --kgray-5: rgba(235, 235, 235, 1); + --brighttext-disable: rgba(0, 0, 0, 1); + --kline-brand-hover: rgba(55, 144, 250, 0); + --kgray-13: rgba(115, 115, 115, 1); + --kerror-normal: rgba(245, 63, 63, 1); + --norole-active: rgba(250, 250, 250, 1); + --linkvisited-inactive: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%), rgba(55, 144, 250, 1); + --buttontext-inactive: rgba(0, 0, 0, 0.85); + --kcontain-general-alpha-click: rgba(0, 0, 0, 0.08); + --text-active: rgba(0, 0, 0, 0.85); + --windowtext-active: rgba(0, 0, 0, 0.85); + --kgray-alpha8: rgba(0, 0, 0, 0.28); + --link-disable: rgba(0, 0, 0, 0.35); + --placeholdertext-active: rgba(0, 0, 0, 0.5); + --kline-brand-disable: rgba(55, 144, 250, 0); + --base-inactive: rgba(250, 250, 250, 1); + --linkvisited-disable: rgba(0, 0, 0, 0.35); + --kbrand6: rgba(223, 49, 55, 1); + --tooltipbase-active: rgba(255, 255, 255, 1); + --kfont-strong: rgba(0, 0, 0, 1); + --buttontext-disable: rgba(0, 0, 0, 0.35); + --mid-inactive: rgba(115, 115, 115, 1); + --mid-active: rgba(115, 115, 115, 1); + --kwarning-normal: rgba(255, 125, 0, 1); + --kgray-7: rgba(220, 220, 220, 1); + --highlight-inactive: rgba(55, 144, 250, 1); + --light-disable: rgba(250, 250, 250, 1); + --alternatebase-active: rgba(246, 246, 246, 1); + --shadow-inactive: rgba(0, 0, 0, 0.25); + --kbrand3: rgba(235, 48, 150, 1); + --kgray-8: rgba(210, 210, 210, 1); + --kgray-2: rgba(246, 246, 246, 1); + --kline-component-normal: rgba(0, 0, 0, 0); + --buttontext-active: rgba(0, 0, 0, 0.85); + --brighttext-inactive: rgba(0, 0, 0, 1); + --midlight-inactive: rgba(220, 220, 220, 1); + --kcontain-secondary-normal: rgba(246, 246, 246, 1); + --mid-disable: rgba(102, 102, 102, 1); + --kline-component-hover: rgba(0, 0, 0, 0); + --ksuccess-hover: linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%), rgba(0, 180, 42, 1); + --dark-inactive: rgba(0, 0, 0, 1); + --kcontain-general-normal: rgba(255, 255, 255, 1); + --windowtext-inactive: rgba(0, 0, 0, 0.6); + --kline-disable-alpha: rgba(0, 0, 0, 0.05); + --kgray-12: rgba(165, 165, 165, 1); + --kfont-secondary-disable: rgba(0, 0, 0, 0.3); + --kfont-secondary: rgba(0, 0, 0, 0.6); + --link-active: rgba(55, 144, 250, 1); + --kfont-primary-disable: rgba(0, 0, 0, 0.35); + --kgray-alpha3: rgba(0, 0, 0, 0.1); + --norole-inactive: rgba(250, 250, 250, 1); + --kgray-alpha11: rgba(0, 0, 0, 0.55); + --button-disable: rgba(238, 238, 238, 1); + --kgray-9: rgba(200, 200, 200, 1); + --alternatebase-disable: rgba(246, 246, 246, 1); + --kcomponent-alpha-click: rgba(0, 0, 0, 0.2); + --shadow-disable: rgba(0, 0, 0, 0.25); + --kbrand-focus: linear-gradient(0deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 100%), rgba(55, 144, 250, 1); + --kmodalmask: rgba(0, 0, 0, 0.2); + --kcontain-hover: rgba(242, 242, 242, 1); + --kgray-16: rgba(64, 64, 64, 1); + --highlightedtext-disable: rgba(0, 0, 0, 0.35); + --kerror-click: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%), rgba(245, 63, 63, 1); + --kline-normal-alpha: rgba(0, 0, 0, 0.1); + --kgray-alpha9: rgba(0, 0, 0, 0.3); + --midlight-disable: rgba(230, 230, 230, 1); + --kfont-white-secondary: rgba(255, 255, 255, 0.65); + --tooltiptext-active: rgba(0, 0, 0, 0.85); + --placeholdertext-disable: rgba(0, 0, 0, 0.35); + --kgray-17: rgba(38, 38, 38, 1); + --button-inactive: rgba(230, 230, 230, 1); + --shadow-active: rgba(0, 0, 0, 0.4); + --alternatebase-inactive: rgba(246, 246, 246, 1); + --norole-disable: rgba(235, 235, 235, 1); + --kgray-alpha7: rgba(0, 0, 0, 0.25); + --dark-active: rgba(0, 0, 0, 1); + --kgray-alpha13: rgba(0, 0, 0, 0.4); + --tooltipbase-disable: rgba(255, 255, 255, 1); + --kcomponent-disable: rgba(238, 238, 238, 1); + --midlight-active: rgba(220, 220, 220, 1); + --brighttext-active: rgba(0, 0, 0, 1); + --kbrand1: rgba(55, 144, 250, 1); + --kgray-14: rgba(102, 102, 102, 1); + --kgray-alpha2: rgba(0, 0, 0, 0.08); + --kcontain-secondary-alppha-normal: rgba(0, 0, 0, 0.03); + --window-active: rgba(246, 246, 246, 1); + --kfont-primary: rgba(0, 0, 0, 0.85); + --kline-component-disable: rgba(0, 0, 0, 0); + --kcomponent-alpha-normal: rgba(0, 0, 0, 0.1); + --tooltiptext-disable: rgba(0, 0, 0, 0.85); + --kline-window-acitive: rgba(0, 0, 0, 0.1); + --kline-brand-click: rgba(55, 144, 250, 0); + --dark-disable: rgba(64, 64, 64, 1); + --kgray-15: rgba(77, 77, 77, 1); + --ksuccess-normal: rgba(0, 180, 42, 1); + --light-active: rgba(255, 255, 255, 1); + --token-fontfamily-noto-sans-cjk-sc: "Noto Sans CJK SC"; + --token-fontsize-24: 24px; + --token-fontstyle-regular: regular; + --token-fontfamily-noto-sans-cjk-sc-1: "Noto Sans CJK SC"; + --token-fontsize-12: 12px; + --token-fontstyle-regular-1: regular; + --token-fontfamily-noto-sans-cjk-sc-2: "Noto Sans CJK SC"; + --token-fontsize-16: 16px; + --token-fontstyle-regular-2: regular; + --token-fontfamily-noto-sans-cjk-sc-3: "Noto Sans CJK SC"; + --token-fontsize-14: 14px; + --token-fontstyle-regular-3: regular; + --token-fontfamily-noto-sans-cjk-sc-4: "Noto Sans CJK SC"; + --token-fontsize-18: 18px; + --token-fontstyle-regular-4: regular; + --focusline: 2px; + --normalline: 1px; + --kmargin-component: 40px; + --kmargin-big: 16px; + --kmargin-min: 4px; + --kmargin-normal: 8px; + --kmagrin-window: 24px; + --kpadding-min: 2px 8px 2px 8px; + --kpadding-normal: 2px 16px 2px 16px; + --kpadding-window: 16px 24px 24px 24px; + --kpadding-8: 8px; + --kradius-menu: 8px; + --kradius-window: 12px; + --kradius-normal: 6px; + --kradius-min: 4px; +} \ No newline at end of file diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Lei Chen <leichen@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -36,9 +36,10 @@ #include <QFile> #include <QStandardPaths> -#include "ukui-style-settings.h" +#include "settings/ukui-style-settings.h" #include "ukui-config-style-parameters.h" -#include "black-list.h" +#include "settings/black-list.h" +#include "../platformthemedebug.h" extern QColor configMixColor(const QColor &c1, const QColor &c2, qreal bias); extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); @@ -47,7 +48,6 @@ UKUIConfigStyleParameters::UKUIConfigStyleParameters(QObject *parent, bool isDark, QString cfgName) { - cDebug << "UKUIConfigStyleParameters................"; QDBusMessage message = QDBusMessage::createMethodCall("com.kylin.statusmanager.interface", "/", "com.kylin.statusmanager.interface", @@ -61,205 +61,122 @@ } updateParameters(m_isTableMode); - auto settings = UKUIStyleSettings::globalInstance(); - auto styleName = settings->get("styleName").toString(); - m_themeColor = settings->get("theme-color").toString(); - - setCfgName(cfgName); - - initPalette(isDark); - - initRadiusCfg(); - - switch (m_adjustColorRules) { - case DefaultRGB: - MenuItem_HMargin = 8; - Menu_MarginWidth = 4; - Menu_Combobox_Popup_MarginWidth = Menu_MarginWidth; - - Slider_Thickness = 20; - Slider_Length = 20; - Slider_GrooveLength = 4; - - TabBar_ScrollButtonOverlap = 2; - indicatorIconHoverNeedHighLight = true; - ScrooBar_ShowLine = false; - TabBar_ScrollButtonWidth = 16; - setTabBarIndicatorLayout(TabBarIndicatorLayout::TabBarIndicator_Horizontal); + auto settings = UKUIStyleSettings::globalInstance(); + if (settings->keys().contains("styleName")) + m_styleName = settings->get("styleName").toString(); - break; - case HSL: - MenuItem_HMargin = 0; - Menu_MarginWidth = 1; - Menu_Combobox_Popup_MarginWidth = Menu_MarginWidth; + if (settings->keys().contains("widgetThemeName")) + m_widgetThemeName = settings->get("widgetThemeName").toString(); - Slider_Thickness = 18; - Slider_Length = 9; - Slider_GrooveLength = 6; - setTabBarIndicatorLayout(TabBarIndicatorLayout::TabBarIndicator_Vertical); + if (settings->keys().contains("themeColor")) + m_themeColor = settings->get("themeColor").toString(); + m_dtconfig = new UKUIGlobalDTConfig::GlobalDTConfig(); - TabBar_ScrollButtonOverlap = 0; - indicatorIconHoverNeedHighLight = false; - ScrooBar_ShowLine = true; - TabBar_SplitLine = true; - TabBar_ScrollButtonWidth = 32; - break; - default: - break; - } + initPalette(); } -void UKUIConfigStyleParameters::initialDefaultPaletteColor(QString colorPath, bool isDark) +UKUIConfigStyleParameters::~UKUIConfigStyleParameters() { - if (!QFile(colorPath).exists()) { - QString path = ColorPath; - colorPath = path + "UKUIConfigDefault.json"; - } - - if (!QFile(colorPath).exists()) { - cDebug << "colorPath:" << colorPath << "is not exists"; - return; - } - if (m_readCfg) { - m_readCfg->deleteLater(); - m_readCfg = nullptr; + if(m_dtconfig) + { + delete m_dtconfig; } +} - m_readCfg = new ReadThemeConfig(colorPath, isDark); - m_adjustColorRules = m_readCfg->getColorValueAdjustRules() == "HSL" ? AdjustColorRules::HSL : AdjustColorRules::DefaultRGB; - UKUIColorTheme::PaletteColorCfg paletteColorCfg = m_readCfg->paletteColorCfg(); - - defaultPalette.setColor(QPalette::Active, QPalette::WindowText, paletteColorCfg.windowText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::WindowText, paletteColorCfg.windowText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::WindowText, paletteColorCfg.windowText_dis); +void UKUIConfigStyleParameters::initPalette() +{ + defaultPalette.setColor(QPalette::Active, QPalette::WindowText, m_dtconfig->windowTextActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::WindowText, m_dtconfig->windowTextInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::WindowText, m_dtconfig->windowTextDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::Button, paletteColorCfg.button_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Button, paletteColorCfg.button_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Button, paletteColorCfg.button_dis); + defaultPalette.setColor(QPalette::Active, QPalette::Button, m_dtconfig->buttonActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::Button, m_dtconfig->buttonInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::Button, m_dtconfig->buttonDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::Light, paletteColorCfg.light_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Light, paletteColorCfg.light_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Light, paletteColorCfg.light_dis); + defaultPalette.setColor(QPalette::Active, QPalette::Light, m_dtconfig->lightActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::Light, m_dtconfig->lightInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::Light, m_dtconfig->lightDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::Midlight, paletteColorCfg.midlight_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Midlight, paletteColorCfg.midlight_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Midlight, paletteColorCfg.midlight_dis); + defaultPalette.setColor(QPalette::Active, QPalette::Midlight, m_dtconfig->midlightActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::Midlight, m_dtconfig->midlightInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::Midlight, m_dtconfig->midlightDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::Dark, paletteColorCfg.dark_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Dark, paletteColorCfg.dark_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Dark, paletteColorCfg.dark_dis); + defaultPalette.setColor(QPalette::Active, QPalette::Dark, m_dtconfig->darkActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::Dark, m_dtconfig->darkInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::Dark, m_dtconfig->darkDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::Mid, paletteColorCfg.mid_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Mid, paletteColorCfg.mid_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Mid, paletteColorCfg.mid_dis); + defaultPalette.setColor(QPalette::Active, QPalette::Mid, m_dtconfig->midActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::Mid, m_dtconfig->midInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::Mid, m_dtconfig->midDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::Text, paletteColorCfg.text_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Text, paletteColorCfg.text_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Text, paletteColorCfg.text_dis); + defaultPalette.setColor(QPalette::Active, QPalette::Text, m_dtconfig->textActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::Text, m_dtconfig->textInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::Text, m_dtconfig->textDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::BrightText, paletteColorCfg.brightText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::BrightText, paletteColorCfg.brightText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::BrightText, paletteColorCfg.brightText_dis); + defaultPalette.setColor(QPalette::Active, QPalette::BrightText, m_dtconfig->brightTextActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::BrightText, m_dtconfig->brightTextInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::BrightText, m_dtconfig->brightTextDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::ButtonText, paletteColorCfg.buttonText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::ButtonText, paletteColorCfg.buttonText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::ButtonText, paletteColorCfg.buttonText_dis); + defaultPalette.setColor(QPalette::Active, QPalette::ButtonText, m_dtconfig->buttonTextActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::ButtonText, m_dtconfig->buttonTextInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::ButtonText, m_dtconfig->buttonTextDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::Base, paletteColorCfg.base_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Base, paletteColorCfg.base_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Base, paletteColorCfg.base_dis); + defaultPalette.setColor(QPalette::Active, QPalette::Base, m_dtconfig->baseActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::Base, m_dtconfig->baseInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::Base, m_dtconfig->baseDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::Window, paletteColorCfg.window_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Window, paletteColorCfg.window_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Window, paletteColorCfg.window_dis); + defaultPalette.setColor(QPalette::Active, QPalette::Window, m_dtconfig->windowActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::Window, m_dtconfig->windowInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::Window, m_dtconfig->windowDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::Shadow, paletteColorCfg.shadow_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Shadow, paletteColorCfg.shadow_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Shadow, paletteColorCfg.shadow_dis); + defaultPalette.setColor(QPalette::Active, QPalette::Shadow, m_dtconfig->shadowActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::Shadow, m_dtconfig->shadowInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::Shadow, m_dtconfig->shadowDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::Highlight, paletteColorCfg.highLight_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Highlight, paletteColorCfg.highLight_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Highlight, paletteColorCfg.highLight_dis); + defaultPalette.setColor(QPalette::Active, QPalette::Highlight, m_dtconfig->highLightActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::Highlight, m_dtconfig->highLightInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::Highlight, m_dtconfig->highLightDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::HighlightedText, paletteColorCfg.highLightText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::HighlightedText, paletteColorCfg.highLightText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::HighlightedText, paletteColorCfg.highLightText_dis); + defaultPalette.setColor(QPalette::Active, QPalette::HighlightedText, m_dtconfig->highLightedTextActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::HighlightedText, m_dtconfig->highLightedTextInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::HighlightedText, m_dtconfig->highLightedTextDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::Link, paletteColorCfg.link_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Link, paletteColorCfg.link_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Link, paletteColorCfg.link_dis); + defaultPalette.setColor(QPalette::Active, QPalette::Link, m_dtconfig->linkActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::Link, m_dtconfig->linkInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::Link, m_dtconfig->linkDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::LinkVisited, paletteColorCfg.linkVisited_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::LinkVisited, paletteColorCfg.linkVisited_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::LinkVisited, paletteColorCfg.linkVisited_dis); + defaultPalette.setColor(QPalette::Active, QPalette::LinkVisited, m_dtconfig->linkVisitedActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::LinkVisited, m_dtconfig->linkVisitedInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::LinkVisited, m_dtconfig->linkVisitedDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::AlternateBase, paletteColorCfg.alternateBase_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::AlternateBase, paletteColorCfg.alternateBase_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::AlternateBase, paletteColorCfg.alternateBase_dis); + defaultPalette.setColor(QPalette::Active, QPalette::AlternateBase, m_dtconfig->alternateBaseActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::AlternateBase, m_dtconfig->alternateBaseInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::AlternateBase, m_dtconfig->alternateBaseDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::NoRole, paletteColorCfg.noRole_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::NoRole, paletteColorCfg.noRole_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::NoRole, paletteColorCfg.noRole_dis); + defaultPalette.setColor(QPalette::Active, QPalette::NoRole, m_dtconfig->noRoleActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::NoRole, m_dtconfig->noRoleInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::NoRole, m_dtconfig->noRoleDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::ToolTipBase, paletteColorCfg.toolTipBase_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipBase, paletteColorCfg.toolTipBase_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipBase, paletteColorCfg.toolTipBase_dis); + defaultPalette.setColor(QPalette::Active, QPalette::ToolTipBase, m_dtconfig->toolTipBaseActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipBase, m_dtconfig->toolTipBaseInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipBase, m_dtconfig->toolTipBaseDisable().color()); - defaultPalette.setColor(QPalette::Active, QPalette::ToolTipText, paletteColorCfg.toolTipText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipText, paletteColorCfg.toolTipText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipText, paletteColorCfg.toolTipText_dis); + defaultPalette.setColor(QPalette::Active, QPalette::ToolTipText, m_dtconfig->toolTipTextActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipText, m_dtconfig->toolTipTextInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipText, m_dtconfig->toolTipTextDisable().color()); #if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) - defaultPalette.setColor(QPalette::Active, QPalette::PlaceholderText, paletteColorCfg.placeholderText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::PlaceholderText, paletteColorCfg.placeholderText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::PlaceholderText, paletteColorCfg.placeholderText_dis); + defaultPalette.setColor(QPalette::Active, QPalette::PlaceholderText, m_dtconfig->placeholderTextActive().color()); + defaultPalette.setColor(QPalette::Inactive, QPalette::PlaceholderText, m_dtconfig->placeholderTextInactive().color()); + defaultPalette.setColor(QPalette::Disabled, QPalette::PlaceholderText, m_dtconfig->placeholderTextDisable().color()); #endif - if(isDark){ - Indicator_IconDefault = defaultPalette.color(QPalette::Active, QPalette::ButtonText); - Indicator_IconHover = defaultPalette.color(QPalette::Active, QPalette::BrightText); - Indicator_IconSunken = defaultPalette.color(QPalette::Active, QPalette::BrightText); - Indicator_IconDisable = defaultPalette.color(QPalette::Disabled, QPalette::Midlight); - } - else{ - Indicator_IconDefault = defaultPalette.color(QPalette::Active, QPalette::Midlight); - Indicator_IconHover = defaultPalette.color(QPalette::Active, QPalette::ButtonText); - Indicator_IconSunken = defaultPalette.color(QPalette::Active, QPalette::ButtonText); - Indicator_IconDisable = defaultPalette.color(QPalette::Disabled, QPalette::Midlight); - } -} - -void UKUIConfigStyleParameters::initPalette(bool isDark) -{ - cDebug << "homelocation:" << QStandardPaths::writableLocation(QStandardPaths::HomeLocation); - QString cfgPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + - HomeCFGColorPath + cfgName() + ".json"; - if(!QFile::exists(cfgPath)) - cfgPath = ColorPath + cfgName() + ".json"; - initialDefaultPaletteColor(cfgPath, isDark); -} - -void UKUIConfigStyleParameters::initRadiusCfg() -{ - cDebug << "homelocation:" << QStandardPaths::writableLocation(QStandardPaths::HomeLocation); - QString cfgPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + - HomeCFGColorPath + cfgName() + ".json"; - if(!QFile::exists(cfgPath)) - cfgPath = UsrRadiusPath + cfgName() + ".json"; - - if (!QFile(cfgPath).exists()) { - cDebug << "cfgPath:" << cfgPath << "is not exists"; - return; - } - if (m_readCfg == nullptr) { - m_readCfg = new ReadThemeConfig(cfgPath); - m_adjustColorRules = m_readCfg->getColorValueAdjustRules() == "HSL" ? AdjustColorRules::HSL : AdjustColorRules::DefaultRGB; - } - m_radiusStruct = m_readCfg->getRadiusStruct(UKUI_Radius); - radius = m_radiusStruct.normalRadius; - cDebug << "min:" << m_radiusStruct.minRadius << "normal:" << m_radiusStruct.normalRadius << "max:" << m_radiusStruct.maxRadius; + Indicator_IconDefault = defaultPalette.color(QPalette::Active, QPalette::Mid); + Indicator_IconHover = defaultPalette.color(QPalette::Active, QPalette::Text); + Indicator_IconSunken = defaultPalette.color(QPalette::Active, QPalette::Text); + Indicator_IconDisable = defaultPalette.color(QPalette::Disabled, QPalette::Text); } QPalette UKUIConfigStyleParameters::setPalette(QPalette &palette) @@ -358,20 +275,10 @@ return m_spinBoxControlLayout; } - -int UKUIConfigStyleParameters::getTabBarIndicatorLayout() -{ - return m_tabBarIndicatorLayout; -} - -void UKUIConfigStyleParameters::setTabBarIndicatorLayout(TabBarIndicatorLayout layout) -{ - m_tabBarIndicatorLayout = layout; -} - -void UKUIConfigStyleParameters::setUKUIThemeColor(QString themeColor) +void UKUIConfigStyleParameters::setUKUIThemeColor(QPalette p, QString themeColor) { m_themeColor = themeColor; + m_default_palette = p; } QString UKUIConfigStyleParameters::themeColor() @@ -379,15 +286,9 @@ return m_themeColor; } -bool UKUIConfigStyleParameters::isDefaultThemeColor() -{ -// return false; - return (m_themeColor == "default"); -} - void UKUIConfigStyleParameters::updateParameters(bool isTabletMode) { - if(isTabletMode){//styleName == "ukui-dark"){// + if (isTabletMode) {//styleName == "ukui-dark"){// m_scaleRatio4_3 = (4 * 1.0) / 3.0; m_scaleRatio3_2 = (3 * 1.0) / 2.0; m_scaleRatio2_1 = (2 * 1.0) / 1.0; @@ -399,8 +300,7 @@ m_isTableMode = true; m_spinBoxControlLayout = SpinBoxControlLayout::Horizontal; m_headerDefaultSectionSizeVertical = m_headerDefaultSectionSizeVertical4_3; - } - else{ + } else { m_scaleRatio4_3 = 1.0; m_scaleRatio3_2 = 1.0; m_scaleRatio2_1 = 1.0; @@ -428,6 +328,7 @@ ScroolBar_Width = ScroolBar_Width_origin * m_scaleRatio3_2; Slider_Length = Slider_Length_origin * m_scaleRatio2_1; Slider_Thickness = Slider_Thickness_origin * m_scaleRatio2_1; + Slider_DefaultWidth = Slider_DefaultWidth_origin * m_scaleRatio2_1; Slider_GrooveLength = Slider_GrooveLength_origin * m_scaleRatio2_1; Slider_DefaultLength = Slider_DefaultLength_origin * m_scaleSliderDefaultLength; LineEdit_DefaultWidth = LineEdit_DefaultWidth_origin * m_ScaleLineEditDefaultLength; @@ -445,44 +346,36 @@ QColor UKUIConfigStyleParameters::adjustColor(const QColor c, int hRange, int sRange, int lRange, int aRange) { -// cDebug << "22222" << c.red() << c.green() << c.blue() << -// c.hslHue() << c.hslSaturationF() << c.lightnessF() << -// hRange << sRange << lRange; QColor cc; int s, l, a; - if((c.hslSaturationF() + sRange * 1.0 / 100.0) > 1){ + if ((c.hslSaturationF() + sRange * 1.0 / 100.0) > 1) { cWarning << "adjustColor s out of range1"; s = 255; - } - else if((c.hslSaturationF() + sRange * 1.0 / 100.0) < 0){ + } else if((c.hslSaturationF() + sRange * 1.0 / 100.0) < 0) { cWarning << "adjustColor s out of range0"; s = 0; - } - else + } else s = (c.hslSaturationF() + sRange * 1.0 / 100.0) *255.0; - if((c.lightnessF() + lRange * 1.0 / 100.0) > 0.97){//根据设计稿寻光色彩识别 l应<=0.97 + if ((c.lightnessF() + lRange * 1.0 / 100.0) > 0.97) {//根据设计稿寻光色彩识别 l应<=0.97 cWarning << "adjustColor l out of range1" << c.lightnessF() << lRange << (c.lightnessF() + lRange * 1.0 / 100.0); l = 255.0 * 0.97; - } - else if((c.lightnessF() + lRange * 1.0 / 100.0) < 0.15){//根据设计稿上l最小取的均值 + } else if ((c.lightnessF() + lRange * 1.0 / 100.0) < 0.15) {//根据设计稿上l最小取的均值 cWarning << "adjustColor l out of range0"; l = 0.15 * 255.0; - } - else + } else l = (c.lightnessF() + lRange * 1.0 / 100.0) *255.0; - if((c.alphaF() + aRange * 1.0 / 100.0) > 1){ + if ((c.alphaF() + aRange * 1.0 / 100.0) > 1) { cWarning << "adjustColor a out of range1"; a = 255; - } - else if((c.alphaF() + aRange * 1.0 / 100.0) < 0){ + } else if ((c.alphaF() + aRange * 1.0 / 100.0) < 0) { cWarning << "adjustColor a out of range0"; a = 0; - } - else + } else a = (c.alphaF() + aRange * 1.0 / 100.0) *255.0; + cc.setHsl(c.hslHue() + hRange, s, l, a); // cDebug << "33333" << c.hslHue() + hRange << (c.hslSaturationF() + sRange * 1.0 / 100.0) *255.0 << // (c.lightnessF() + lRange * 1.0 / 100.0) * 255.0 << @@ -495,7 +388,7 @@ { QColor cc; cc.setHsl(c.hslHue() + range, c.hslSaturation(), c.lightness(), c.alpha()); - return cc; + return cc; } QColor UKUIConfigStyleParameters::adjustS(const QColor c, int range) @@ -503,18 +396,16 @@ QColor cc; int s; - if((c.hslSaturationF() + range * 1.0 / 100.0) > 1){ + if ((c.hslSaturationF() + range * 1.0 / 100.0) > 1) { cWarning << "adjustS s out of range1"; s = 255; - } - else if((c.hslSaturationF() + range * 1.0 / 100.0) < 0){ + } else if ((c.hslSaturationF() + range * 1.0 / 100.0) < 0) { cWarning << "adjustS s out of range0"; s = 0; - } - else + } else s = (c.hslSaturationF() + range * 1.0 / 100.0) *255.0; cc.setHsl(c.hslHue(), s, c.lightness(), c.alpha()); - return cc; + return cc; } QColor UKUIConfigStyleParameters::adjustL(const QColor c, int range) @@ -522,44 +413,39 @@ QColor cc; int l; - if((c.lightnessF() + range * 1.0 / 100.0) > 0.97){ + if ((c.lightnessF() + range * 1.0 / 100.0) > 0.97) { cWarning << "adjustL l out of range1"; l = 255.0 * 0.97; - } - else if((c.lightnessF() + range * 1.0 / 100.0) < 0.15){ + } else if((c.lightnessF() + range * 1.0 / 100.0) < 0.15) { cWarning << "adjustL l out of range0" << c.lightnessF() << range << (c.lightnessF() + range * 1.0 / 100.0); l = 255.0 * 0.15; - } - else + } else l = (c.lightnessF() + range * 1.0 / 100.0) *255.0; cc.setHsl(c.hslHue(), c.hslSaturation(), l, c.alpha()); - return cc; + return cc; } QColor UKUIConfigStyleParameters::adjustA(const QColor c, int range) { QColor cc; int a; - if((c.alphaF() + range * 1.0 / 100.0) > 1){ + if ((c.alphaF() + range * 1.0 / 100.0) > 1) { cWarning << "adjustA a out of range1"; a = 255; - } - else if((c.alphaF() + range * 1.0 / 100.0) < 0){ + } else if ((c.alphaF() + range * 1.0 / 100.0) < 0) { cWarning << "adjustA a out of range0"; a = 0; - } - else + } else a = (c.alphaF() + range * 1.0 / 100.0) *255.0; - cc.setHsl(c.hslHue(), c.hslSaturation(), c.lightness(), a); - return cc; + return cc; } QColor UKUIConfigStyleParameters::highlightClick(bool isDark, QPalette p) { - if(isDark){ + if (isDark) { return adjustColor(p.color(QPalette::Active, QPalette::Highlight), 0, -25, -34);//hightlight->210,72%,71% 210,47%,37% } return adjustColor(p.color(QPalette::Active, QPalette::Highlight), 3, 10, 31);//hightlight->209,87%,57% 212,97%,88% @@ -567,7 +453,7 @@ QColor UKUIConfigStyleParameters::highlightHover(bool isDark, QPalette p) { - if(isDark){ + if (isDark) { return adjustColor(p.color(QPalette::Active, QPalette::Highlight), 0, -26, -40);//210,46%,31% } return adjustColor(p.color(QPalette::Active, QPalette::Highlight), 4, 2, 36);//213,89%,93% @@ -575,24 +461,16 @@ QColor UKUIConfigStyleParameters::buttonDarkClick(bool isDark, QPalette p) { - if(isDark){ + if (isDark) { return adjustColor(p.color(QPalette::Disabled, QPalette::ButtonText), 0, 1, 5); } return QColor(); } -void UKUIConfigStyleParameters::normalButtonColor(bool isDark, QPalette p, QPen &defaultPen, QBrush &defaultBrush, QPen &hoverPen, - QBrush &hoverBrush, QPen &clickPen, QBrush &clickBrush, QPen &disablePen, QBrush &disableBrush) -{ - //default - if(isDark){ - defaultPen = QPen(QBrush(adjustColor(defaultBrush.color(), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else - defaultPen = QPen(QBrush(adjustColor(defaultBrush.color(), 0, 0, -25)), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - +void UKUIConfigStyleParameters::normalButtonColor(bool isDark, QPalette p, QPen &defaultPen, QBrush &defaultBrush, + QPen &hoverPen, QBrush &hoverBrush, QPen &clickPen, QBrush &clickBrush, + QPen &disablePen, QBrush &disableBrush) +{ //hover if (isDark) { //hightlight->210,72%,71% 210,67%,56% @@ -605,7 +483,6 @@ } hoverBrush = QBrush(highlightHover(isDark, p)); - //click if (isDark) { //hightlight->210,72%,71% @@ -617,52 +494,33 @@ 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); } clickBrush = QBrush(highlightClick(isDark, p)); - - //disable - if (isDark) { - disablePen = QPen(QBrush(adjustL(disableBrush.color(), 18)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - } - -void UKUIConfigStyleParameters::setCfgName(QString cfgName) +UKUIGlobalDTConfig::GlobalDTConfig* UKUIConfigStyleParameters::readCfg() { - if(cfgName == "") - cfgName = "UKUIConfigDefault"; - if(m_cfgName != cfgName) - m_cfgName = cfgName; -} + if(!m_dtconfig){ + m_dtconfig = new UKUIGlobalDTConfig::GlobalDTConfig(); + } -QString UKUIConfigStyleParameters::cfgName() -{ - return m_cfgName; + return m_dtconfig; } -ReadThemeConfig* UKUIConfigStyleParameters::readCfg() +QBrush UKUIConfigStyleParameters::parseBrush(QRect rect, QBrush dtBrush) { - if(!m_readCfg){ - m_readCfg = new ReadThemeConfig("", false); - m_adjustColorRules = m_readCfg->getColorValueAdjustRules() == "HSL" ? AdjustColorRules::HSL : AdjustColorRules::DefaultRGB; + QBrush result; + if(dtBrush.style() == Qt::SolidPattern){ + result = dtBrush; + } else if (dtBrush.style() == Qt::LinearGradientPattern) { + QLinearGradient linearGradient; + linearGradient.setStart(rect.topLeft()); + linearGradient.setFinalStop(rect.bottomLeft()); + linearGradient.setStops(dtBrush.gradient()->stops()); + result = QBrush(linearGradient); } - return m_readCfg; -} - -UKUIRadiusInformation::UKUIRadiusStruct UKUIConfigStyleParameters::radiusProperty() -{ - return m_radiusStruct; -} -int UKUIConfigStyleParameters::getAdjustColorRules() -{ - return m_adjustColorRules; + return result; } -bool UKUIConfigStyleParameters::colorIsSame(QColor oldColor, QColor newColor) -{ - return (oldColor == newColor); -} void UKUIConfigStyleParameters::initConfigPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) { @@ -672,7 +530,49 @@ bool useButtonPalette = false; bool needTranslucent = false; - UKUIColorTheme::ButtonColorCfg buttonColorCfg = readCfg()->buttonColorCfg(option->palette); + int radius = (widget && widget->property("normalRadius").isValid()) ? + widget->property("normalRadius").toInt() : m_dtconfig->kradiusNormal(); + + QBrush defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonActive()); + QBrush disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonDisable()); + QBrush clickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentClick()); + QBrush hoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentHover()); + + QBrush defaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentNormal()); + QBrush hoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentHover()); + QBrush clickPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentClick()); + QBrush disablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentDisable()); + + + QPen defaultPen = QPen(defaultPenBrush, (defaultPenBrush.style() == Qt::NoBrush || defaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen hoverPen = QPen(hoverPenBrush, (hoverPenBrush.style() == Qt::NoBrush || hoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen clickPen = QPen(clickPenBrush, (clickPenBrush.style() == Qt::NoBrush || clickPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen disablePen = QPen(disablePenBrush, (disablePenBrush.style() == Qt::NoBrush || disablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + QBrush checkBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightActive()); + QBrush checkHoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandHover()); + QBrush checkClickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandClick()); + QBrush checkDisableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightDisable()); + + QBrush checkPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()); + QBrush checkHoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandHover()); + QBrush checkClickPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandClick()); + QBrush checkDisablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandDisable()); + + QPen checkPen = QPen(checkPenBrush, (checkPenBrush.style() == Qt::NoBrush || checkPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen checkHoverPen = QPen(checkHoverPenBrush, (checkHoverPenBrush.style() == Qt::NoBrush || checkHoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen checkClickPen = QPen(checkClickPenBrush, (checkClickPenBrush.style() == Qt::NoBrush || checkClickPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen checkDisablePen = QPen(checkDisablePenBrush, (checkDisablePenBrush.style() == Qt::NoBrush || checkDisablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + QPen focusPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandFocus()), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); if (widget) { if (widget->property("isWindowButton").isValid()) { @@ -695,215 +595,113 @@ needTranslucent = widget->property("needTranslucent").toBool(); } } - if (isWindowColoseButton) - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_WindowCloseButton); - if (isWindowButton) - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_WindowButton); - if (useButtonPalette || isWindowButton) { - if (needTranslucent) - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_TranslucentButton); - else - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_UseButtonPalette); - } - if (isImportant) - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); - - int radius = m_radiusStruct.normalRadius; - - QBrush defaultBrush = QBrush(buttonColorCfg.defaultBrush); - QBrush disableBrush = QBrush(buttonColorCfg.disableBrush); - QBrush clickBrush; - QBrush hoverBrush; - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - - - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - QPen defaultPen ; - QPen hoverPen ; - QPen clickPen ; - QPen disablePen ; - QPen checkPen ; - QPen checkHoverPen ; - QPen checkClickPen ; - QPen checkDisablePen; - QPen focusPen; - - QBrush checkBrush; - QBrush checkHoverBrush; - QBrush checkClickBrush; - QBrush checkDisableBrush; - - defaultPen = QPen(QBrush(buttonColorCfg.defaultPen), (buttonColorCfg.defaultPen == Qt::NoPen || buttonColorCfg.defaultPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - hoverPen = QPen(QBrush(buttonColorCfg.hoverPen), (buttonColorCfg.hoverPen == Qt::NoPen || buttonColorCfg.hoverPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - clickPen = QPen(QBrush(buttonColorCfg.clickPen), (buttonColorCfg.clickPen == Qt::NoPen || buttonColorCfg.clickPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - disablePen = QPen(QBrush(buttonColorCfg.disablePen), (buttonColorCfg.disablePen == Qt::NoPen || buttonColorCfg.disablePen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if (isWindowColoseButton){ - if(buttonColorCfg.hoverType == Obj_Color_Type) - { - hoverBrush = buttonColorCfg.hoverBrush; - } - else if(buttonColorCfg.hoverType == Obj_Gradient_Type){ - linearGradient.setColorAt(0, buttonColorCfg.hoverGradientList.value(0)); - linearGradient.setColorAt(1, buttonColorCfg.hoverGradientList.value(1)); - hoverBrush = QBrush(linearGradient); - } - clickBrush = buttonColorCfg.clickBrush; - focusPen = QPen(QBrush(clickBrush), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else { - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - - if(buttonColorCfg.hoverType == Obj_Color_Type){ - if (isDark) { - hoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } else { - hoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } - if (isDark) { - clickBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } else { - clickBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } - } - else{ - if (isDark) { - startColor = configMixColor(highlight, QColor(Qt::white), 0.2); - endColor = configMixColor(highlight, QColor(Qt::black), 0.05); - } else { - startColor = configMixColor(highlight, QColor(Qt::white), 0.05); - endColor = configMixColor(highlight, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - clickBrush = QBrush(configMixColor(highlight, mix, 0.1)); - - } - - if (isWindowButton && useTransparentButtonList().contains(qAppName())) { - if (isDark) { - mix.setAlphaF(0.28); - hoverBrush = QBrush(mix); - mix.setAlphaF(0.15); - clickBrush = QBrush(mix); - } else { - mix.setAlphaF(0.15); - hoverBrush = QBrush(mix); - mix.setAlphaF(0.28); - clickBrush = QBrush(mix); - } - } else if (useButtonPalette || isWindowButton) { - if(buttonColorCfg.hoverType == Obj_Color_Type){ - if (needTranslucent) - { - QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); - hoverColor.setAlphaF(isDark ? 0.20 : 0.16); - hoverBrush.setColor(hoverColor); - - QColor clickColor = option->palette.color(QPalette::Active, QPalette::BrightText); - clickColor.setAlphaF(isDark ? 0.30 : 0.21); - clickBrush.setColor(clickColor); - } - else - { - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - - if (isDark) { - hoverBrush = QBrush(configMixColor(button, mix, 0.2)); - clickBrush = QBrush(configMixColor(button, mix, 0.05)); - } else { - hoverBrush = QBrush(configMixColor(button, mix, 0.05)); - clickBrush = QBrush(configMixColor(button, mix, 0.2)); - } - } - } - else{ - if(needTranslucent) - { - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Light); - endColor = option->palette.color(QPalette::Active, QPalette::Text); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } else { - startColor = option->palette.color(QPalette::Active, QPalette::Mid); - endColor = option->palette.color(QPalette::Active, QPalette::Dark); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - QColor clickColor = option->palette.color(QPalette::Active, QPalette::Dark); - if(isDark) - clickColor = option->palette.color(QPalette::Active, QPalette::Light); - clickColor.setAlphaF(isDark ? 0.30 : 0.30); - clickBrush.setColor(clickColor); - } - else{ - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - - //hover - if (isDark) { - startColor = configMixColor(button, QColor(Qt::white), 0.2); - endColor = configMixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = configMixColor(button, QColor(Qt::black), 0.05); - endColor = configMixColor(button, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - //click - clickBrush = QBrush(configMixColor(button, mix, 0.2)); - } - } - } - focusPen = QPen(QBrush(configMixColor(highlight, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + if (isWindowColoseButton) { + defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kGrayAlpha0()); + hoverBrush= parseBrush(option ? option->rect : QRect(), m_dtconfig->kErrorHover()); + clickBrush= parseBrush(option ? option->rect : QRect(), m_dtconfig->kErrorClick()); + disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kGrayAlpha0()); + + defaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentNormal()); + hoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentHover()); + clickPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentClick()); + disablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentDisable()); + + defaultPen = QPen(defaultPenBrush, (defaultPenBrush.style() == Qt::NoBrush || defaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + hoverPen = QPen(hoverPenBrush, (hoverPenBrush.style() == Qt::NoBrush || hoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + clickPen = QPen(clickPenBrush, (clickPenBrush.style() == Qt::NoBrush || clickPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + disablePen = QPen(disablePenBrush, (disablePenBrush.style() == Qt::NoBrush || disablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + } - } - break; - case AdjustColorRules::HSL:{ - if(buttonColorCfg.focusPen != Qt::NoPen) - focusPen = QPen(QBrush(buttonColorCfg.focusPen), (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if (!isWindowColoseButton) - { - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); - focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), - (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else{ - clickBrush = QBrush(buttonColorCfg.clickBrush); - hoverBrush = QBrush(buttonColorCfg.hoverBrush); - } - } - default: - break; + if (useButtonPalette || isWindowButton) { + if (needTranslucent) { + defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentAlphaNormal()); + disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentAlphaDisable()); + hoverBrush= parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentAlphaHover()); + clickBrush= parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentAlphaClick()); + + defaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentNormal()); + hoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentHover()); + clickPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentClick()); + disablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentDisable()); + + defaultPen = QPen(defaultPenBrush, (defaultPenBrush.style() == Qt::NoBrush || defaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + hoverPen = QPen(hoverPenBrush, (hoverPenBrush.style() == Qt::NoBrush || hoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + clickPen = QPen(clickPenBrush, (clickPenBrush.style() == Qt::NoBrush || clickPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + disablePen = QPen(disablePenBrush, (disablePenBrush.style() == Qt::NoBrush || disablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + } else { + defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonActive()); + disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonDisable()); + clickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentClick()); + hoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentHover()); + + defaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentNormal()); + hoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentHover()); + clickPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentClick()); + disablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentDisable()); + + defaultPen = QPen(defaultPenBrush, (defaultPenBrush.style() == Qt::NoBrush || defaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + hoverPen = QPen(hoverPenBrush, (hoverPenBrush.style() == Qt::NoBrush || hoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + clickPen = QPen(clickPenBrush, (clickPenBrush.style() == Qt::NoBrush || clickPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + disablePen = QPen(disablePenBrush, (disablePenBrush.style() == Qt::NoBrush || disablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); } } - checkPen = hoverPen; - checkHoverPen = hoverPen; - checkClickPen = clickPen; - checkDisablePen = disablePen; - - checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); - checkHoverBrush = hoverBrush; - checkClickBrush = clickBrush; - checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); + if (isImportant) { + defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightActive()); + disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightDisable()); + hoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandHover()); + clickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandClick()); + + defaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()); + hoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandHover()); + clickPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandClick()); + disablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandDisable()); + + defaultPen = QPen(defaultPenBrush, (defaultPenBrush.style() == Qt::NoBrush || defaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + hoverPen = QPen(hoverPenBrush, (hoverPenBrush.style() == Qt::NoBrush || hoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + clickPen = QPen(clickPenBrush, (clickPenBrush.style() == Qt::NoBrush || clickPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + disablePen = QPen(disablePenBrush, (disablePenBrush.style() == Qt::NoBrush || disablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + } + + auto *w = const_cast<QWidget *>(widget); + + if (w) { + w->setProperty("radius", radius); + w->setProperty("defaultBrush", defaultBrush); + w->setProperty("clickBrush", clickBrush); + w->setProperty("hoverBrush", hoverBrush); + w->setProperty("disableBrush", disableBrush); + w->setProperty("checkBrush", checkBrush); + w->setProperty("checkHoverBrush", checkHoverBrush); + w->setProperty("checkClickBrush", checkClickBrush); + w->setProperty("checkDisableBrush", checkDisableBrush); + w->setProperty("defaultPen", defaultPen); + w->setProperty("clickPen", clickPen); + w->setProperty("hoverPen", hoverPen); + w->setProperty("disablePen", disablePen); + w->setProperty("checkPen", checkPen); + w->setProperty("checkHoverPen", checkHoverPen); + w->setProperty("checkClickPen", checkClickPen); + w->setProperty("checkDisablePen", checkDisablePen); + w->setProperty("focusPen", focusPen); + } if (widget) { if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { @@ -933,12 +731,35 @@ if (widget->property("setCheckDisableBrush").isValid() && widget->property("setCheckDisableBrush").canConvert<QBrush>()) { checkDisableBrush = widget->property("setCheckDisableBrush").value<QBrush>(); } + if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { + defaultPen = widget->property("setDefaultPen").value<QPen>(); + } + if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { + clickPen = widget->property("setClickPen").value<QPen>(); + } + if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { + hoverPen = widget->property("setHoverPen").value<QPen>(); + } + if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { + disablePen = widget->property("setDisablePen").value<QPen>(); + } + if (widget->property("setCheckPen").isValid() && widget->property("setCheckPen").canConvert<QPen>()) { + checkPen = widget->property("setCheckPen").value<QPen>(); + } + if (widget->property("setCheckHoverPen").isValid() && widget->property("setCheckHoverPen").canConvert<QPen>()) { + checkHoverPen = widget->property("setCheckHoverPen").value<QPen>(); + } + if (widget->property("setCheckClickPen").isValid() && widget->property("setCheckClickPen").canConvert<QPen>()) { + checkClickPen = widget->property("setCheckClickPen").value<QPen>(); + } + if (widget->property("setCheckDisablePen").isValid() && widget->property("setCheckDisablePen").canConvert<QPen>()) { + checkDisablePen = widget->property("setCheckDisablePen").value<QPen>(); + } if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { focusPen = widget->property("setFocusPen").value<QPen>(); } } - m_PushButtonParameters.radius = radius; m_PushButtonParameters.pushButtonDefaultBrush = defaultBrush; m_PushButtonParameters.pushButtonClickBrush = clickBrush; @@ -959,20 +780,42 @@ m_PushButtonParameters.pushButtonFocusPen = focusPen; } +void UKUIConfigStyleParameters::getDefaultConfigPushButtonBevelParameters(ConfigPushButtonParameters *p, bool isDark) +{ + initConfigPushButtonBevelParameters(isDark, nullptr, nullptr); + p->radius = m_PushButtonParameters.radius; + p->pushButtonDefaultBrush = m_PushButtonParameters.pushButtonDefaultBrush ; + p->pushButtonClickBrush = m_PushButtonParameters.pushButtonClickBrush ; + p->pushButtonHoverBrush = m_PushButtonParameters.pushButtonHoverBrush ; + p->pushButtonDisableBrush = m_PushButtonParameters.pushButtonDisableBrush ; + p->pushButtonCheckBrush = m_PushButtonParameters.pushButtonCheckBrush ; + p->pushButtonCheckHoverBrush = m_PushButtonParameters.pushButtonCheckHoverBrush ; + p->pushButtonCheckClickBrush = m_PushButtonParameters.pushButtonCheckClickBrush ; + p->pushButtonCheckDisableBrush = m_PushButtonParameters.pushButtonCheckDisableBrush; + p->pushButtonDefaultPen = m_PushButtonParameters.pushButtonDefaultPen ; + p->pushButtonClickPen = m_PushButtonParameters.pushButtonClickPen ; + p->pushButtonHoverPen = m_PushButtonParameters.pushButtonHoverPen ; + p->pushButtonDisablePen = m_PushButtonParameters.pushButtonDisablePen ; + p->pushButtonCheckPen = m_PushButtonParameters.pushButtonCheckPen ; + p->pushButtonCheckHoverPen = m_PushButtonParameters.pushButtonCheckHoverPen ; + p->pushButtonCheckClickPen = m_PushButtonParameters.pushButtonCheckClickPen ; + p->pushButtonCheckDisablePen = m_PushButtonParameters.pushButtonCheckDisablePen ; + p->pushButtonFocusPen = m_PushButtonParameters.pushButtonFocusPen ; + +} + void UKUIConfigStyleParameters::initConfigPushButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) { bool iconHighlight = false; bool textHighlight = false; - const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option); + const QStyleOptionButton *button = option ? qstyleoption_cast<const QStyleOptionButton *>(option) : nullptr; bool isWindowButton = false; bool useButtonPalette = false; bool isImportant = false; bool isWindowColoseButton = false; bool needTranslucent = false; - UKUIColorTheme::ButtonColorCfg buttonColorCfg = readCfg()->buttonColorCfg(option->palette); - if (widget) { if (widget->property("isWindowButton").isValid()) { if (widget->property("isWindowButton").toInt() == 0x01) { @@ -994,42 +837,28 @@ needTranslucent = widget->property("needTranslucent").toBool(); } } - if (isWindowColoseButton) - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_WindowCloseButton); - if (isWindowButton) - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_WindowButton); - if (useButtonPalette || isWindowButton) { - if (needTranslucent) - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_TranslucentButton); - else - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_UseButtonPalette); - } - if (isImportant) - buttonColorCfg = readCfg()->buttonColorCfg(option->palette, C_Button_ImportButton); - QColor textColor = buttonColorCfg.textColor; + QColor textDefaultColor = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonTextActive()).color(); + QColor textHoverColor = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonTextActive()).color(); + QColor textDisableColor = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonTextDisable()).color(); //icon - if ((isWindowButton || useButtonPalette) && !(button->state & QStyle::State_On)) { + if (button && (isWindowButton || useButtonPalette) && !(button->state & QStyle::State_On)) { iconHighlight = false; } else { iconHighlight = true; } - if(m_adjustColorRules == AdjustColorRules::HSL) - iconHighlight = false; - - //text - bool hover = option->state & QStyle::State_MouseOver; - bool click = option->state & (QStyle::State_On | QStyle::State_Sunken); - - if(hover || click){ - textColor = buttonColorCfg.textHoverColor; + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("iconHighlight", iconHighlight); + w->setProperty("textHighlight", textHighlight); + w->setProperty("textDefaultColor", textDefaultColor); + w->setProperty("textHoverColor", textHoverColor); + w->setProperty("textDisableColor", textDisableColor); } if (widget) { - if(!widget->isEnabled()) - textColor = option->palette.color(QPalette::Disabled, QPalette::ButtonText); if (widget->property("setIconHoverClickHighlight").isValid() && widget->property("setIconHoverClickHighlight").canConvert<bool>()) { iconHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); @@ -1037,14 +866,32 @@ if (widget->property("setTextHoverClickHighlight").isValid() && widget->property("setTextHoverClickHighlight").canConvert<bool>()) { textHighlight = widget->property("setTextHoverClickHighlight").value<bool>(); } - if (widget->property("setTextColor").isValid() && widget->property("setTextColor").canConvert<QColor>()) { - textColor = widget->property("setTextColor").value<QColor>(); + if (widget->property("setTextDefaultColor").isValid() && widget->property("setTextDefaultColor").canConvert<QColor>()) { + textDefaultColor = widget->property("setTextDefaultColor").value<QColor>(); + } + if (widget->property("setTextHoverColor").isValid() && widget->property("setTextHoverColor").canConvert<QColor>()) { + textHoverColor = widget->property("setTextHoverColor").value<QColor>(); + } + if (widget->property("setTextDisableColor").isValid() && widget->property("setTextDisableColor").canConvert<QColor>()) { + textDisableColor = widget->property("setTextDisableColor").value<QColor>(); } } m_PushButtonParameters.iconHoverClickHighlight = iconHighlight; m_PushButtonParameters.textHoverClickHighlight = textHighlight; - m_PushButtonParameters.textColor = textColor; + m_PushButtonParameters.textDefaultColor = textDefaultColor; + m_PushButtonParameters.textHoverColor = textHoverColor; + m_PushButtonParameters.textDisableColor = textDisableColor; +} + +void UKUIConfigStyleParameters::getDefaultConfigPushButtonLabelParameters(ConfigPushButtonParameters *p, bool isDark) +{ + initConfigPushButtonLabelParameters(isDark, nullptr, nullptr); + p->iconHoverClickHighlight = m_PushButtonParameters.iconHoverClickHighlight; + p->textHoverClickHighlight = m_PushButtonParameters.textHoverClickHighlight; + p->textDefaultColor = m_PushButtonParameters.textDefaultColor ; + p->textHoverColor = m_PushButtonParameters.textHoverColor ; + p->textDisableColor = m_PushButtonParameters.textDisableColor ; } void UKUIConfigStyleParameters::initConfigToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) @@ -1054,7 +901,50 @@ bool isImportant = false; bool useButtonPalette = false; bool needTranslucent = false; - UKUIColorTheme::ToolButtonColorCfg buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette); + + int radius = (widget && widget->property("normalRadius").isValid()) ? + widget->property("normalRadius").toInt() : m_dtconfig->kradiusNormal(); + + QBrush defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonActive()); + QBrush disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonDisable()); + QBrush clickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentClick()); + QBrush hoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentHover()); + + QBrush defaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentNormal()); + QBrush hoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentHover()); + QBrush clickPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentClick()); + QBrush disablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentDisable()); + + + QPen defaultPen = QPen(defaultPenBrush, (defaultPenBrush.style() == Qt::NoBrush || defaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen hoverPen = QPen(hoverPenBrush, (hoverPenBrush.style() == Qt::NoBrush || hoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen clickPen = QPen(clickPenBrush, (clickPenBrush.style() == Qt::NoBrush || clickPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen disablePen = QPen(disablePenBrush, (disablePenBrush.style() == Qt::NoBrush || disablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + QBrush checkBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightActive()); + QBrush checkHoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandHover()); + QBrush checkClickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandClick()); + QBrush checkDisableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightDisable()); + + QBrush checkPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()); + QBrush checkHoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandHover()); + QBrush checkClickPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandClick()); + QBrush checkDisablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandDisable()); + + QPen checkPen = QPen(checkPenBrush, (checkPenBrush.style() == Qt::NoBrush || checkPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen checkHoverPen = QPen(checkHoverPenBrush, (checkHoverPenBrush.style() == Qt::NoBrush || checkHoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen checkClickPen = QPen(checkClickPenBrush, (checkClickPenBrush.style() == Qt::NoBrush || checkClickPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen checkDisablePen = QPen(checkDisablePenBrush, (checkDisablePenBrush.style() == Qt::NoBrush || checkDisablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + QPen focusPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandFocus()), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); if (widget) { if (widget->property("isWindowButton").isValid()) { @@ -1077,212 +967,112 @@ needTranslucent = widget->property("needTranslucent").toBool(); } } - if (isWindowColoseButton) - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_WindowCloseButton); - if (isWindowButton) - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_WindowButton); - if (useButtonPalette || isWindowButton) { - if (needTranslucent) - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_TranslucentButton); - else - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_UseButtonPalette); - } - if (isImportant) - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); - - int radius = m_radiusStruct.normalRadius; - QBrush defaultBrush = QBrush(buttonColorCfg.defaultBrush); - QBrush disableBrush = QBrush(buttonColorCfg.disableBrush); - QBrush clickBrush = QBrush(buttonColorCfg.clickBrush); - QBrush hoverBrush = QBrush(buttonColorCfg.hoverBrush); - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - QPen defaultPen ; - QPen hoverPen ; - QPen clickPen ; - QPen disablePen ; - QPen checkPen ; - QPen checkHoverPen ; - QPen checkClickPen ; - QPen checkDisablePen; - QPen focusPen; - QBrush checkBrush; - QBrush checkHoverBrush; - QBrush checkClickBrush; - QBrush checkDisableBrush; - - defaultPen = QPen(QBrush(buttonColorCfg.defaultPen), (buttonColorCfg.defaultPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - hoverPen = QPen(QBrush(buttonColorCfg.hoverPen), (buttonColorCfg.hoverPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - clickPen = QPen(QBrush(buttonColorCfg.clickPen), (buttonColorCfg.clickPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - disablePen = QPen(QBrush(buttonColorCfg.disablePen), (buttonColorCfg.disablePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if (isWindowColoseButton){ - if(buttonColorCfg.hoverType == Obj_Color_Type) - { - hoverBrush = buttonColorCfg.hoverBrush; - } - else if(buttonColorCfg.hoverType == Obj_Gradient_Type){ - linearGradient.setColorAt(0, buttonColorCfg.hoverGradientList.value(0)); - linearGradient.setColorAt(1, buttonColorCfg.hoverGradientList.value(1)); - hoverBrush = QBrush(linearGradient); - } - clickBrush = buttonColorCfg.clickBrush; - focusPen = QPen(QBrush(clickBrush), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else { - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - - if(buttonColorCfg.hoverType == Obj_Color_Type){ - if (isDark) { - hoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } else { - hoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } - if (isDark) { - clickBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } else { - clickBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } - } - else{ - if (isDark) { - startColor = configMixColor(highlight, QColor(Qt::white), 0.2); - endColor = configMixColor(highlight, QColor(Qt::black), 0.05); - } else { - startColor = configMixColor(highlight, QColor(Qt::white), 0.05); - endColor = configMixColor(highlight, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - clickBrush = QBrush(configMixColor(highlight, mix, 0.1)); - - } - - if (isWindowButton && useTransparentButtonList().contains(qAppName())) { - if (isDark) { - mix.setAlphaF(0.28); - hoverBrush = QBrush(mix); - mix.setAlphaF(0.15); - clickBrush = QBrush(mix); - } else { - mix.setAlphaF(0.15); - hoverBrush = QBrush(mix); - mix.setAlphaF(0.28); - clickBrush = QBrush(mix); - } - } else if (useButtonPalette || isWindowButton) { - if(buttonColorCfg.hoverType == Obj_Color_Type){ - if (needTranslucent) - { - QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); - hoverColor.setAlphaF(isDark ? 0.20 : 0.16); - hoverBrush.setColor(hoverColor); - - QColor clickColor = option->palette.color(QPalette::Active, QPalette::BrightText); - clickColor.setAlphaF(isDark ? 0.30 : 0.21); - clickBrush.setColor(clickColor); - } - else - { - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - - if (isDark) { - hoverBrush = QBrush(configMixColor(button, mix, 0.2)); - clickBrush = QBrush(configMixColor(button, mix, 0.05)); - } else { - hoverBrush = QBrush(configMixColor(button, mix, 0.05)); - clickBrush = QBrush(configMixColor(button, mix, 0.2)); - } - } - } - else{ - if(needTranslucent) - { - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Light); - endColor = option->palette.color(QPalette::Active, QPalette::Text); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } else { - startColor = option->palette.color(QPalette::Active, QPalette::Mid); - endColor = option->palette.color(QPalette::Active, QPalette::Dark); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - QColor clickColor = option->palette.color(QPalette::Active, QPalette::Dark); - if(isDark) - clickColor = option->palette.color(QPalette::Active, QPalette::Light); - clickColor.setAlphaF(isDark ? 0.30 : 0.30); - clickBrush.setColor(clickColor); - } - else{ - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - - //hover - if (isDark) { - startColor = configMixColor(button, QColor(Qt::white), 0.2); - endColor = configMixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = configMixColor(button, QColor(Qt::black), 0.05); - endColor = configMixColor(button, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - //click - clickBrush = QBrush(configMixColor(button, mix, 0.2)); - } - } - } - focusPen = QPen(QBrush(configMixColor(highlight, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + if (isWindowColoseButton) { + defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kGrayAlpha0()); + hoverBrush= parseBrush(option ? option->rect : QRect(), m_dtconfig->kErrorHover()); + clickBrush= parseBrush(option ? option->rect : QRect(), m_dtconfig->kErrorClick()); + disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kGrayAlpha0()); + + defaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentNormal()); + hoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentHover()); + clickPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentClick()); + disablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentDisable()); + + defaultPen = QPen(defaultPenBrush, (defaultPenBrush.style() == Qt::NoBrush || defaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + hoverPen = QPen(hoverPenBrush, (hoverPenBrush.style() == Qt::NoBrush || hoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + clickPen = QPen(clickPenBrush, (clickPenBrush.style() == Qt::NoBrush || clickPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + disablePen = QPen(disablePenBrush, (disablePenBrush.style() == Qt::NoBrush || disablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + } - } - break; - case AdjustColorRules::HSL:{ - if(buttonColorCfg.focusPen != Qt::NoPen) - focusPen = QPen(QBrush(buttonColorCfg.focusPen), (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if (!isWindowColoseButton) - { - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); - focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), - (buttonColorCfg.focusPen == Qt::NoPen || buttonColorCfg.focusPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else{ - clickBrush = QBrush(buttonColorCfg.clickBrush); - hoverBrush = QBrush(buttonColorCfg.hoverBrush); - } - } - default: - break; + if (useButtonPalette || isWindowButton) { + if (needTranslucent) { + defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentAlphaNormal()); + disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentAlphaDisable()); + hoverBrush= parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentAlphaHover()); + clickBrush= parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentAlphaClick()); + + defaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentNormal()); + hoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentHover()); + clickPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentClick()); + disablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentDisable()); + + defaultPen = QPen(defaultPenBrush, (defaultPenBrush.style() == Qt::NoBrush || defaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + hoverPen = QPen(hoverPenBrush, (hoverPenBrush.style() == Qt::NoBrush || hoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + clickPen = QPen(clickPenBrush, (clickPenBrush.style() == Qt::NoBrush || clickPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + disablePen = QPen(disablePenBrush, (disablePenBrush.style() == Qt::NoBrush || disablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + } else { + defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonActive()); + disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonDisable()); + clickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentClick()); + hoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentHover()); + + defaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentNormal()); + hoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentHover()); + clickPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentClick()); + disablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentDisable()); + + defaultPen = QPen(defaultPenBrush, (defaultPenBrush.style() == Qt::NoBrush || defaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + hoverPen = QPen(hoverPenBrush, (hoverPenBrush.style() == Qt::NoBrush || hoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + clickPen = QPen(clickPenBrush, (clickPenBrush.style() == Qt::NoBrush || clickPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + disablePen = QPen(disablePenBrush, (disablePenBrush.style() == Qt::NoBrush || disablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); } } - checkPen = defaultPen; - checkHoverPen = hoverPen; - checkClickPen = clickPen; - checkDisablePen = disablePen; - - checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); - checkHoverBrush = hoverBrush; - checkClickBrush = clickBrush; - checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); + if (isImportant) { + defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightActive()); + disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightDisable()); + hoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandHover()); + clickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandClick()); + + defaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()); + hoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandHover()); + clickPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandClick()); + disablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandDisable()); + + defaultPen = QPen(defaultPenBrush, (defaultPenBrush.style() == Qt::NoBrush || defaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + hoverPen = QPen(hoverPenBrush, (hoverPenBrush.style() == Qt::NoBrush || hoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + clickPen = QPen(clickPenBrush, (clickPenBrush.style() == Qt::NoBrush || clickPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + disablePen = QPen(disablePenBrush, (disablePenBrush.style() == Qt::NoBrush || disablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + } + + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("radius", radius); + w->setProperty("defaultBrush", defaultBrush); + w->setProperty("clickBrush", clickBrush); + w->setProperty("hoverBrush", hoverBrush); + w->setProperty("disableBrush", disableBrush); + w->setProperty("checkBrush", checkBrush); + w->setProperty("checkHoverBrush", checkHoverBrush); + w->setProperty("checkClickBrush", checkClickBrush); + w->setProperty("checkDisableBrush", checkDisableBrush); + w->setProperty("defaultPen", defaultPen); + w->setProperty("clickPen", clickPen); + w->setProperty("hoverPen", hoverPen); + w->setProperty("disablePen", disablePen); + w->setProperty("checkPen", checkPen); + w->setProperty("checkHoverPen", checkHoverPen); + w->setProperty("checkClickPen", checkClickPen); + w->setProperty("checkDisablePen", checkDisablePen); + w->setProperty("focusPen", focusPen); + } if (widget) { if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { @@ -1312,6 +1102,30 @@ if (widget->property("setCheckDisableBrush").isValid() && widget->property("setCheckDisableBrush").canConvert<QBrush>()) { checkDisableBrush = widget->property("setCheckDisableBrush").value<QBrush>(); } + if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { + defaultPen = widget->property("setDefaultPen").value<QPen>(); + } + if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { + clickPen = widget->property("setClickPen").value<QPen>(); + } + if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { + hoverPen = widget->property("setHoverPen").value<QPen>(); + } + if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { + disablePen = widget->property("setDisablePen").value<QPen>(); + } + if (widget->property("setCheckPen").isValid() && widget->property("setCheckPen").canConvert<QPen>()) { + checkPen = widget->property("setCheckPen").value<QPen>(); + } + if (widget->property("setCheckHoverPen").isValid() && widget->property("setCheckHoverPen").canConvert<QPen>()) { + checkHoverPen = widget->property("setCheckHoverPen").value<QPen>(); + } + if (widget->property("setCheckClickPen").isValid() && widget->property("setCheckClickPen").canConvert<QPen>()) { + checkClickPen = widget->property("setCheckClickPen").value<QPen>(); + } + if (widget->property("setCheckDisablePen").isValid() && widget->property("setCheckDisablePen").canConvert<QPen>()) { + checkDisablePen = widget->property("setCheckDisablePen").value<QPen>(); + } if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { focusPen = widget->property("setFocusPen").value<QPen>(); } @@ -1334,7 +1148,31 @@ m_ToolButtonParameters.toolButtonCheckHoverPen = checkHoverPen; m_ToolButtonParameters.toolButtonCheckClickPen = checkClickPen; m_ToolButtonParameters.toolButtonCheckDisablePen = checkDisablePen; - m_ToolButtonParameters.toolButtonFocusPen = focusPen; + m_ToolButtonParameters.toolButtonFocusPen = focusPen; +} + +void UKUIConfigStyleParameters::getDefaultConfigToolButtonPanelParameters(ConfigToolButtonParameters *p, bool isDark) +{ + initConfigToolButtonPanelParameters(isDark, nullptr, nullptr); + p->radius = m_ToolButtonParameters.radius; + p->toolButtonDefaultBrush = m_ToolButtonParameters.toolButtonDefaultBrush ; + p->toolButtonClickBrush = m_ToolButtonParameters.toolButtonClickBrush ; + p->toolButtonHoverBrush = m_ToolButtonParameters.toolButtonHoverBrush ; + p->toolButtonDisableBrush = m_ToolButtonParameters.toolButtonDisableBrush ; + p->toolButtonCheckBrush = m_ToolButtonParameters.toolButtonCheckBrush ; + p->toolButtonCheckHoverBrush = m_ToolButtonParameters.toolButtonCheckHoverBrush ; + p->toolButtonCheckClickBrush = m_ToolButtonParameters.toolButtonCheckClickBrush ; + p->toolButtonCheckDisableBrush = m_ToolButtonParameters.toolButtonCheckDisableBrush; + p->toolButtonDefaultPen = m_ToolButtonParameters.toolButtonDefaultPen ; + p->toolButtonClickPen = m_ToolButtonParameters.toolButtonClickPen ; + p->toolButtonHoverPen = m_ToolButtonParameters.toolButtonHoverPen ; + p->toolButtonDisablePen = m_ToolButtonParameters.toolButtonDisablePen ; + p->toolButtonCheckPen = m_ToolButtonParameters.toolButtonCheckPen ; + p->toolButtonCheckHoverPen = m_ToolButtonParameters.toolButtonCheckHoverPen ; + p->toolButtonCheckClickPen = m_ToolButtonParameters.toolButtonCheckClickPen ; + p->toolButtonCheckDisablePen = m_ToolButtonParameters.toolButtonCheckDisablePen ; + p->toolButtonFocusPen = m_ToolButtonParameters.toolButtonFocusPen ; + } void UKUIConfigStyleParameters::initConfigToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) @@ -1349,8 +1187,6 @@ bool isWindowColoseButton = false; bool needTranslucent = false; - UKUIColorTheme::ToolButtonColorCfg buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette); - if (widget) { if (widget->property("isWindowButton").isValid()) { if (widget->property("isWindowButton").toInt() == 0x01) { @@ -1372,20 +1208,10 @@ needTranslucent = widget->property("needTranslucent").toBool(); } } - if (isWindowColoseButton) - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_WindowCloseButton); - if (isWindowButton) - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_WindowButton); - if (useButtonPalette || isWindowButton) { - if (needTranslucent) - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_TranslucentButton); - else - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_UseButtonPalette); - } - if (isImportant) - buttonColorCfg = readCfg()->toolButtonColorCfg(option->palette, C_Button_ImportButton); - QColor textColor = buttonColorCfg.textColor; + QColor textDefaultColor = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonTextActive()).color(); + QColor textHoverColor = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonTextActive()).color(); + QColor textDisableColor = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonTextDisable()).color(); //icon if ((isWindowButton || useButtonPalette) && !(button->state & QStyle::State_On)) { @@ -1394,20 +1220,15 @@ iconHighlight = true; } - if(m_adjustColorRules == AdjustColorRules::HSL) - iconHighlight = false; - - //text - bool hover = option->state & QStyle::State_MouseOver; - bool click = option->state & (QStyle::State_On | QStyle::State_Sunken); - - if(hover || click){ - textColor = buttonColorCfg.textHoverColor; + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("iconHighlight", iconHighlight); + w->setProperty("textHighlight", textHighlight); + w->setProperty("textDefaultColor", textDefaultColor); + w->setProperty("textHoverColor", textHoverColor); + w->setProperty("textDisableColor", textDisableColor); } - if (widget) { - if(!widget->isEnabled()) - textColor = option->palette.color(QPalette::Disabled, QPalette::ButtonText); if (widget->property("setIconHoverClickHighlight").isValid() && widget->property("setIconHoverClickHighlight").canConvert<bool>()) { iconHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); @@ -1415,101 +1236,73 @@ if (widget->property("setTextHoverClickHighlight").isValid() && widget->property("setTextHoverClickHighlight").canConvert<bool>()) { textHighlight = widget->property("setTextHoverClickHighlight").value<bool>(); } - if (widget->property("setTextColor").isValid() && widget->property("setTextColor").canConvert<bool>()) { - textColor = widget->property("setTextColor").value<bool>(); + if (widget->property("setTextDefaultColor").isValid() && widget->property("setTextDefaultColor").canConvert<QColor>()) { + textDefaultColor = widget->property("setTextDefaultColor").value<QColor>(); + } + if (widget->property("setTextHoverColor").isValid() && widget->property("setTextHoverColor").canConvert<QColor>()) { + textHoverColor = widget->property("setTextHoverColor").value<QColor>(); + } + if (widget->property("setTextDisableColor").isValid() && widget->property("setTextDisableColor").canConvert<QColor>()) { + textDisableColor = widget->property("setTextDisableColor").value<QColor>(); } } m_ToolButtonParameters.iconHoverClickHighlight = iconHighlight; m_ToolButtonParameters.textHoverClickHighlight = textHighlight; - m_ToolButtonParameters.textColor = textColor; + m_ToolButtonParameters.textDefaultColor = textDefaultColor; + m_ToolButtonParameters.textHoverColor = textHoverColor; + m_ToolButtonParameters.textDisableColor = textDisableColor; +} + +void UKUIConfigStyleParameters::getDefaultConfigToolButtonLabelParameters(ConfigToolButtonParameters *p, bool isDark) +{ + initConfigToolButtonLabelParameters(isDark, nullptr, nullptr); + p->iconHoverClickHighlight = m_ToolButtonParameters.iconHoverClickHighlight; + p->textHoverClickHighlight = m_ToolButtonParameters.textHoverClickHighlight; + p->textDefaultColor = m_ToolButtonParameters.textDefaultColor ; + p->textHoverColor = m_ToolButtonParameters.textHoverColor ; + p->textDisableColor = m_ToolButtonParameters.textDisableColor ; } void UKUIConfigStyleParameters::initConfigLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) { - int radius = m_radiusStruct.normalRadius; + int radius =m_dtconfig->kradiusNormal(); + bool needTranslucent = false; if (widget && widget->property("needTranslucent").isValid()) { needTranslucent = widget->property("needTranslucent").toBool(); } - UKUIColorTheme::LineEditColorCfg lineEditColorCfg = readCfg()->lineEditColorCfg(option->palette, needTranslucent ? C_LineEdit_Translucent : C_LineEdit_Default); - - QBrush defaultBrush = lineEditColorCfg.defaultBrush; - QBrush hoverBrush = lineEditColorCfg.hoverBrush; - QBrush focusBrush = lineEditColorCfg.focusBrush; - QBrush disableBrush = lineEditColorCfg.disableBrush; - - QPen defaultPen = QPen(lineEditColorCfg.defaultPen, lineEditColorCfg.defaultPen.alpha() == 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen hoverPen = QPen(lineEditColorCfg.hoverPen, lineEditColorCfg.hoverPen.alpha() == 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen focusPen = QPen(lineEditColorCfg.focusPen, m_adjustColorRules == 0 ? 2 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen disablePen = QPen(lineEditColorCfg.disablePen, lineEditColorCfg.disablePen.alpha() == 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if(lineEditColorCfg.hoverType == Obj_Gradient_Type){ - QColor startColor; - QColor endColor; - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - if(!needTranslucent) - { - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Midlight); - endColor = option->palette.color(QPalette::Disabled, QPalette::NoRole); - startColor.setAlphaF(0.5); - endColor.setAlphaF(0.5); - } else { - startColor = option->palette.color(QPalette::Active, QPalette::Midlight); - endColor = configMixColor(startColor, mix, 0.1); - startColor.setAlphaF(0.5); - endColor.setAlphaF(0.5); - } - } - else{ - QColor defaultColor = option->palette.color(QPalette::Active, QPalette::Mid); - if (isDark) - defaultColor = option->palette.color(QPalette::Active, QPalette::Text); - defaultColor.setAlphaF(isDark ? 0.1 : 0.15); - defaultBrush.setColor(defaultColor); - - QColor focusColor = option->palette.color(QPalette::Active, QPalette::Base); - focusColor.setAlphaF(isDark ? 0.45 : 0.65); - focusBrush.setColor(focusColor); - - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Light); - endColor = option->palette.color(QPalette::Active, QPalette::Text); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } else { - startColor = option->palette.color(QPalette::Active, QPalette::Mid); - endColor = option->palette.color(QPalette::Active, QPalette::Dark); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - } - else - hoverBrush= defaultBrush; - - switch (m_adjustColorRules) { - case HSL:{ - if(isDark){ - defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else - defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - hoverPen = defaultPen; - } - break; - default: - break; + QBrush defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonActive()); + QBrush hoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentHover()); + QBrush focusBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainGeneralNormal()); + QBrush disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentDisable()); + + QBrush defaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentNormal()); + QBrush hoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentHover()); + QBrush focusPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightActive()); + QBrush disablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentDisable()); + + QPen defaultPen = QPen(defaultPenBrush, (defaultPenBrush.style() == Qt::NoBrush || defaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen hoverPen = QPen(hoverPenBrush, (hoverPenBrush.style() == Qt::NoBrush || hoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen focusPen = QPen(focusPenBrush, (focusPenBrush.style() == Qt::NoBrush || focusPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen disablePen = QPen(disablePenBrush, (disablePenBrush.style() == Qt::NoBrush || disablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("radius", radius); + w->setProperty("defaultBrush", defaultBrush); + w->setProperty("focusBrush", focusBrush); + w->setProperty("hoverBrush", hoverBrush); + w->setProperty("disableBrush", disableBrush); + w->setProperty("defaultPen", defaultPen); + w->setProperty("hoverPen", hoverPen); + w->setProperty("disablePen", disablePen); + w->setProperty("focusPen", focusPen); } if (widget) { @@ -1542,326 +1335,140 @@ } } - m_LineEditParameters.radius = radius; + m_LineEditParameters.radius = radius; m_LineEditParameters.lineEditDefaultBrush = defaultBrush; - m_LineEditParameters.lineEditHoverBrush = hoverBrush; - m_LineEditParameters.lineEditFocusBrush = focusBrush; + m_LineEditParameters.lineEditHoverBrush = hoverBrush; + m_LineEditParameters.lineEditFocusBrush = focusBrush; m_LineEditParameters.lineEditDisableBrush = disableBrush; - m_LineEditParameters.lineEditDefaultPen = defaultPen; - m_LineEditParameters.lineEditHoverPen = hoverPen; - m_LineEditParameters.lineEditFocusPen = focusPen; - m_LineEditParameters.lineEditDisablePen = disablePen; + m_LineEditParameters.lineEditDefaultPen = defaultPen; + m_LineEditParameters.lineEditHoverPen = hoverPen; + m_LineEditParameters.lineEditFocusPen = focusPen; + m_LineEditParameters.lineEditDisablePen = disablePen; +} + +void UKUIConfigStyleParameters::getDefaultConfigLineEditParameters(ConfigLineEditParameters *p, bool isDark) +{ + initConfigLineEditParameters(isDark, nullptr, nullptr); + p->radius = m_LineEditParameters.radius ; + p->lineEditDefaultBrush = m_LineEditParameters.lineEditDefaultBrush; + p->lineEditHoverBrush = m_LineEditParameters.lineEditHoverBrush ; + p->lineEditFocusBrush = m_LineEditParameters.lineEditFocusBrush ; + p->lineEditDisableBrush = m_LineEditParameters.lineEditDisableBrush; + p->lineEditDefaultPen = m_LineEditParameters.lineEditDefaultPen ; + p->lineEditHoverPen = m_LineEditParameters.lineEditHoverPen ; + p->lineEditFocusPen = m_LineEditParameters.lineEditFocusPen ; + p->lineEditDisablePen = m_LineEditParameters.lineEditDisablePen ; } void UKUIConfigStyleParameters::initConfigSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout) { - int radius = m_radiusStruct.normalRadius; - - UKUIColorTheme::SpinBoxColorCfg spinBoxColorCfg = - readCfg()->spinBoxColorCfg(option->palette, C_SpinBox_Default, isHorizonLayout ? C_SpinBox_HorizonLayout : C_SpinBox_DefaultLayout); - - QBrush defaultBrush = spinBoxColorCfg.defaultBrush; - QBrush hoverBrush = spinBoxColorCfg.hoverBrush; - QBrush focusBrush = spinBoxColorCfg.focusBrush; - QBrush disableBrush = spinBoxColorCfg.disableBrush; - - QPen defaultPen = QPen(spinBoxColorCfg.defaultPen, spinBoxColorCfg.defaultPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen hoverPen = QPen(spinBoxColorCfg.hoverPen, spinBoxColorCfg.defaultPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen focusPen = QPen(spinBoxColorCfg.focusPen, m_adjustColorRules == 0 ? 2 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen disablePen = QPen(spinBoxColorCfg.disablePen, spinBoxColorCfg.defaultPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - QBrush upHoverBrush = spinBoxColorCfg.upHoverBrush ; - QBrush upFocusHoverBrush = spinBoxColorCfg.upFocusHoverBrush ; - QBrush upClickBrush = spinBoxColorCfg.upClickBrush ; - QBrush upDefaultBrush = spinBoxColorCfg.upDefaultBrush ; - QBrush downHoverBrush = spinBoxColorCfg.downHoverBrush ; - QBrush downFocusHoverBrush = spinBoxColorCfg.downFocusHoverBrush; - QBrush downClickBrush = spinBoxColorCfg.downClickBrush ; - QBrush downDefaultBrush = spinBoxColorCfg.downDefaultBrush ; - - QPen upDefaultPen = QPen(spinBoxColorCfg.upDefaultPen , spinBoxColorCfg.upDefaultPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen upHoverPen = QPen(spinBoxColorCfg.upHoverPen , spinBoxColorCfg.upHoverPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen upFocusHoverPen = QPen(spinBoxColorCfg.upFocusPen , spinBoxColorCfg.upFocusPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen upClickPen = QPen(spinBoxColorCfg.upClickPen , spinBoxColorCfg.upClickPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen upDisablePen = QPen(spinBoxColorCfg.upDisablePen , spinBoxColorCfg.upDisablePen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen downDefaultPen = QPen(spinBoxColorCfg.downDefaultPen , spinBoxColorCfg.downDefaultPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen downHoverPen = QPen(spinBoxColorCfg.downHoverPen , spinBoxColorCfg.downHoverPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen downFocusHoverPen = QPen(spinBoxColorCfg.downFocusPen , spinBoxColorCfg.downFocusPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen downClickPen = QPen(spinBoxColorCfg.downClickPen , spinBoxColorCfg.downClickPen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen downDisablePen = QPen(spinBoxColorCfg.downDisablePen , spinBoxColorCfg.downDisablePen.alpha()<= 0 ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - if (isHorizonLayout) - hoverPen.setWidth(m_adjustColorRules == 0 ? 2 : 1); - - if(spinBoxColorCfg.hoverType == Obj_Gradient_Type){ - //hoverBrush - QColor startColor; - QColor endColor; - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - if(!isDefaultThemeColor()){ - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Midlight); - endColor = option->palette.color(QPalette::Disabled, QPalette::NoRole); - startColor.setAlphaF(0.5); - endColor.setAlphaF(0.5); - } else { - startColor = option->palette.color(QPalette::Active, QPalette::Midlight); - endColor = configMixColor(startColor, mix, 0.1); - startColor.setAlphaF(0.5); - endColor.setAlphaF(0.5); - } - } - else{ - startColor = spinBoxColorCfg.hoverGradientList.value(0); - endColor = spinBoxColorCfg.hoverGradientList.value(1); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - } - else - hoverBrush= defaultBrush; - } - break; - case AdjustColorRules::HSL:{ - if(isDark){ - defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else - defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - hoverPen = defaultPen; - hoverBrush = defaultBrush; - - focusBrush = defaultBrush; - - //disable state - if (isDark) { - disablePen = QPen(QBrush(adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), 18)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - } else { - disablePen = QPen(option->palette.brush(QPalette::Disabled, QPalette::Button), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - } - break; - default: - break; - } - - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - QColor startColor; - QColor endColor; - - QLinearGradient upLinearGradient; - upLinearGradient.setStart(option->rect.left(), option->rect.top()); - upLinearGradient.setFinalStop(option->rect.left(), option->rect.center().y()); - QLinearGradient downLinearGradient; - downLinearGradient.setStart(option->rect.left(), option->rect.center().y()); - downLinearGradient.setFinalStop(option->rect.left(), option->rect.bottom()); - - //up hover - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - if(spinBoxColorCfg.upHoverBrushType == Obj_Color_Type) - { - if (isDark) { - upHoverBrush = QBrush(configMixColor(button, mix, 0.2)); - } else { - upHoverBrush = QBrush(configMixColor(button, mix, 0.05)); - } - } - else if(spinBoxColorCfg.upHoverBrushType == Obj_Gradient_Type){ - if (isDark) { - startColor = configMixColor(button, QColor(Qt::white), 0.2); - endColor = configMixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = configMixColor(button, QColor(Qt::black), 0.05); - endColor = configMixColor(button, QColor(Qt::black), 0.2); - } - upLinearGradient.setColorAt(0, startColor); - upLinearGradient.setColorAt(1, endColor); - upHoverBrush = QBrush(upLinearGradient); - } - - if(spinBoxColorCfg.downHoverBrushType == Obj_Color_Type) - { - if (isDark) { - downHoverBrush = QBrush(configMixColor(button, mix, 0.2)); - } else { - downHoverBrush = QBrush(configMixColor(button, mix, 0.05)); - } - } - else if(spinBoxColorCfg.downHoverBrushType == Obj_Gradient_Type){ - if (isDark) { - startColor = configMixColor(button, QColor(Qt::white), 0.2); - endColor = configMixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = configMixColor(button, QColor(Qt::black), 0.05); - endColor = configMixColor(button, QColor(Qt::black), 0.2); - } - downLinearGradient.setColorAt(0, startColor); - downLinearGradient.setColorAt(1, endColor); - downHoverBrush = QBrush(downLinearGradient); - } - - if(spinBoxColorCfg.upFocusHoverBrushType == Obj_Color_Type) - { - if (isDark) { - upFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } else { - upFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } - } - else if(spinBoxColorCfg.upFocusHoverBrushType == Obj_Gradient_Type){ - if(isHorizonLayout){ - if (isDark) { - startColor = configMixColor(button, QColor(Qt::white), 0.2); - endColor = configMixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = configMixColor(button, QColor(Qt::black), 0.05); - endColor = configMixColor(button, QColor(Qt::black), 0.2); - } - }else{ - if (isDark) { - startColor = configMixColor(highlight, QColor(Qt::white), 0.2); - endColor = configMixColor(highlight, QColor(Qt::white), 0.05); - } else { - startColor = configMixColor(highlight, QColor(Qt::black), 0.05); - endColor = configMixColor(highlight, QColor(Qt::black), 0.2); - } - } - upLinearGradient.setColorAt(0, startColor); - upLinearGradient.setColorAt(1, endColor); - upFocusHoverBrush = QBrush(upLinearGradient); - } - - if(spinBoxColorCfg.downFocusHoverBrushType == Obj_Color_Type) - { - if (isDark) { - downFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } else { - downFocusHoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } - } - else if(spinBoxColorCfg.downFocusHoverBrushType == Obj_Gradient_Type){ - if(isHorizonLayout){ - if (isDark) { - startColor = configMixColor(button, QColor(Qt::white), 0.2); - endColor = configMixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = configMixColor(button, QColor(Qt::black), 0.05); - endColor = configMixColor(button, QColor(Qt::black), 0.2); - } - }else{ - if (isDark) { - startColor = configMixColor(highlight, QColor(Qt::white), 0.2); - endColor = configMixColor(highlight, QColor(Qt::white), 0.05); - } else { - startColor = configMixColor(highlight, QColor(Qt::black), 0.05); - endColor = configMixColor(highlight, QColor(Qt::black), 0.2); - } - } - - downLinearGradient.setColorAt(0, startColor); - downLinearGradient.setColorAt(1, endColor); - downFocusHoverBrush = QBrush(downLinearGradient); - } + int radius = (widget && widget->property("normalRadius").isValid()) ? widget->property("normalRadius").toInt() : m_dtconfig->kradiusNormal(); - //up click - if (isDark) { - if(isHorizonLayout) - upClickBrush = QBrush(configMixColor(button, mix, 0.05)); - else - upClickBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } else { - if(isHorizonLayout) - upClickBrush = QBrush(configMixColor(button, mix, 0.2)); - else - upClickBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } - //down click - if (isDark) { - if(isHorizonLayout) - downClickBrush = QBrush(configMixColor(button, mix, 0.05)); - else - downClickBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } else { - if(isHorizonLayout) - downClickBrush = QBrush(configMixColor(button, mix, 0.2)); - else - downClickBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } + QBrush defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonActive()); + QBrush hoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentHover()); + QBrush focusBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainGeneralNormal()); + QBrush disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonDisable()); + + QBrush defaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentNormal()); + QBrush hoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentHover()); + QBrush focusPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightActive()); + QBrush disablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentDisable()); + + QPen defaultPen = QPen(defaultPenBrush, (defaultPenBrush.style() == Qt::NoBrush || defaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen hoverPen = QPen(hoverPenBrush, (hoverPenBrush.style() == Qt::NoBrush || hoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen focusPen = QPen(focusPenBrush, (focusPenBrush.style() == Qt::NoBrush || focusPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen disablePen = QPen(disablePenBrush, (disablePenBrush.style() == Qt::NoBrush || disablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + QBrush upHoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentHover() ); + QBrush upFocusHoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentClick() ); + QBrush upClickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentClick() ); + QBrush upDefaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonActive() ); + QBrush downHoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentHover() ); + QBrush downFocusHoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentClick() ); + QBrush downClickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentClick() ); + QBrush downDefaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonActive() ); + + QPen upDefaultPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()) , + parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()).color().alpha()<= 0 ? + 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen upHoverPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandHover()) , + parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandHover()).color().alpha()<= 0 ? + 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen upFocusHoverPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandClick()) , + parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandClick()).color().alpha()<= 0 ? + 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen upClickPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandClick()) , + parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandClick()).color().alpha()<= 0 ? + 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen upDisablePen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandDisable()) , + parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandDisable()).color().alpha()<= 0 ? + 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen downDefaultPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()) , + parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()).color().alpha()<= 0 ? + 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen downHoverPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandHover()) , + parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandHover()).color().alpha()<= 0 ? + 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen downFocusHoverPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandClick()) , + parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandClick()).color().alpha()<= 0 ? + 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen downClickPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandClick()) , + parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandClick()).color().alpha()<= 0 ? + 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen downDisablePen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandDisable()) , + parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandDisable()).color().alpha()<= 0 ? + 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - break; - case AdjustColorRules::HSL:{ - if(isDark) - upDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else - upDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - //up hover - if (isDark) { - upHoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { - upHoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - upHoverBrush = QBrush(highlightHover(isDark, option->palette)); - //up focus hover - upFocusHoverBrush = upHoverBrush; - upFocusHoverPen = upHoverPen; - - //up click - if (isDark) { - upClickPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { - upClickPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - upClickBrush = QBrush(highlightClick(isDark, option->palette)); + if (isHorizonLayout) + hoverPen.setWidth(2); - //up disable - upDisablePen = disablePen; + QRect upLinearRect(!option ? QPoint(0, 0) : QPoint(option->rect.left(), option->rect.top()), + !option ? QPoint(0, 0) : QPoint(option->rect.left(), option->rect.center().y())); - //down default - downDefaultBrush = upDefaultBrush; - downDefaultPen = upDefaultPen; + QRect downLinearRect(!option ? QPoint(0, 0) : QPoint(option->rect.left(), option->rect.center().y()), + !option ? QPoint(0, 0) : QPoint(option->rect.left(), option->rect.bottom())); - //down hover - downHoverBrush = upHoverBrush; - downHoverPen = upHoverPen; - - //down focus hover - downFocusHoverPen = upFocusHoverPen; - downFocusHoverBrush = upFocusHoverBrush; - - //down click - downClickBrush = upClickBrush; - downClickPen = upClickPen; - - //down disable - downDisablePen = upDisablePen; - - } - - break; + //up hover + if (m_dtconfig->kComponentHover().style() == Qt::LinearGradientPattern) { + upHoverBrush = parseBrush(option ? option->rect : upLinearRect, m_dtconfig->kComponentHover()); + downHoverBrush = parseBrush(option ? option->rect : downLinearRect, m_dtconfig->kComponentHover()); + } + + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("radius", radius); + w->setProperty("defaultBrush", defaultBrush); + w->setProperty("focusBrush", focusBrush); + w->setProperty("hoverBrush", hoverBrush); + w->setProperty("disableBrush", disableBrush); + w->setProperty("defaultPen", defaultPen); + w->setProperty("hoverPen", hoverPen); + w->setProperty("disablePen", disablePen); + w->setProperty("focusPen", focusPen); + w->setProperty("upDefaultBrush", upDefaultBrush); + w->setProperty("upFocusHoverBrush", upFocusHoverBrush); + w->setProperty("upClickBrush", upClickBrush); + w->setProperty("upHoverBrush", upHoverBrush); + w->setProperty("downDefaultBrush", downDefaultBrush); + w->setProperty("downHoverBrush", downHoverBrush); + w->setProperty("downFocusHoverBrush", downFocusHoverBrush); + w->setProperty("downClickBrush", downClickBrush); + w->setProperty("upDefaultPen", upDefaultPen); + w->setProperty("upHoverPen", upHoverPen); + w->setProperty("upFocusHoverPen", upFocusHoverPen); + w->setProperty("upClickPen", upClickPen); + w->setProperty("upDisablePen", upDisablePen); + w->setProperty("downDefaultPen", downDefaultPen); + w->setProperty("downHoverPen", downHoverPen); + w->setProperty("downFocusHoverPen", downFocusHoverPen); + w->setProperty("downClickPen", downClickPen); + w->setProperty("downDisablePen", downDisablePen); } - if (widget) { if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { radius = widget->property("setRadius").value<int>(); @@ -1948,13 +1555,13 @@ m_SpinBoxParameters.radius = radius; m_SpinBoxParameters.spinBoxDefaultBrush = defaultBrush; - m_SpinBoxParameters.spinBoxHoverBrush = hoverBrush; - m_SpinBoxParameters.spinBoxFocusBrush = focusBrush; + m_SpinBoxParameters.spinBoxHoverBrush = hoverBrush; + m_SpinBoxParameters.spinBoxFocusBrush = focusBrush; m_SpinBoxParameters.spinBoxDisableBrush = disableBrush; m_SpinBoxParameters.spinBoxDefaultPen = defaultPen; - m_SpinBoxParameters.spinBoxHoverPen = hoverPen; - m_SpinBoxParameters.spinBoxFocusPen = focusPen; + m_SpinBoxParameters.spinBoxHoverPen = hoverPen; + m_SpinBoxParameters.spinBoxFocusPen = focusPen; m_SpinBoxParameters.spinBoxDisablePen = disablePen; m_SpinBoxParameters.spinBoxUpDefaultBrush = upDefaultBrush; @@ -1978,47 +1585,95 @@ m_SpinBoxParameters.spinBoxDownClickPen = downClickPen; m_SpinBoxParameters.spinBoxDownDisablePen = downDisablePen; - m_SpinBoxParameters.spinBoxUpIconHightPixMap = (m_adjustColorRules == 0 ? true : false); - m_SpinBoxParameters.spinBoxDownIconHightPixMap = (m_adjustColorRules == 0 ? true : false); + m_SpinBoxParameters.spinBoxUpIconHightPixMap = true; + m_SpinBoxParameters.spinBoxDownIconHightPixMap = true; } -void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) +void UKUIConfigStyleParameters::getDefaultConfigSpinBoxParameters(ConfigSpinBoxParameters *p, bool isDark) { - int radius = m_radiusStruct.normalRadius; + initConfigSpinBoxParameters(isDark, nullptr, nullptr); + p->radius = m_SpinBoxParameters.radius ; + p->spinBoxDefaultBrush = m_SpinBoxParameters.spinBoxDefaultBrush ; + p->spinBoxHoverBrush = m_SpinBoxParameters.spinBoxHoverBrush ; + p->spinBoxFocusBrush = m_SpinBoxParameters.spinBoxFocusBrush ; + p->spinBoxDisableBrush = m_SpinBoxParameters.spinBoxDisableBrush ; + + p->spinBoxDefaultPen = m_SpinBoxParameters.spinBoxDefaultPen ; + p->spinBoxHoverPen = m_SpinBoxParameters.spinBoxHoverPen ; + p->spinBoxFocusPen = m_SpinBoxParameters.spinBoxFocusPen ; + p->spinBoxDisablePen = m_SpinBoxParameters.spinBoxDisablePen ; + + p->spinBoxUpDefaultBrush = m_SpinBoxParameters.spinBoxUpDefaultBrush ; + p->spinBoxUpHoverBrush = m_SpinBoxParameters.spinBoxUpHoverBrush ; + p->spinBoxUpFocusHoverBrush = m_SpinBoxParameters.spinBoxUpFocusHoverBrush ; + p->spinBoxUpClickBrush = m_SpinBoxParameters.spinBoxUpClickBrush ; + p->spinBoxDownHoverBrush = m_SpinBoxParameters.spinBoxDownHoverBrush ; + p->spinBoxDownFocusHoverBrush = m_SpinBoxParameters.spinBoxDownFocusHoverBrush ; + p->spinBoxDownClickBrush = m_SpinBoxParameters.spinBoxDownClickBrush ; + p->spinBoxDownDefaultBrush = m_SpinBoxParameters.spinBoxDownDefaultBrush ; + + p->spinBoxUpDefaultPen = m_SpinBoxParameters.spinBoxUpDefaultPen ; + p->spinBoxUpHoverPen = m_SpinBoxParameters.spinBoxUpHoverPen ; + p->spinBoxUpFocusHoverPen = m_SpinBoxParameters.spinBoxUpFocusHoverPen ; + p->spinBoxUpClickPen = m_SpinBoxParameters.spinBoxUpClickPen ; + p->spinBoxUpDisablePen = m_SpinBoxParameters.spinBoxUpDisablePen ; + + p->spinBoxDownDefaultPen = m_SpinBoxParameters.spinBoxDownDefaultPen ; + p->spinBoxDownHoverPen = m_SpinBoxParameters.spinBoxDownHoverPen ; + p->spinBoxDownFocusHoverPen = m_SpinBoxParameters.spinBoxDownFocusHoverPen ; + p->spinBoxDownClickPen = m_SpinBoxParameters.spinBoxDownClickPen ; + p->spinBoxDownDisablePen = m_SpinBoxParameters.spinBoxDownDisablePen ; - UKUIColorTheme::ComboBoxColorCfg comboBoxColorCfg = readCfg()->comboBoxColorCfg(option->palette, C_ComboBox_Default); + p->spinBoxUpIconHightPixMap = m_SpinBoxParameters.spinBoxUpIconHightPixMap ; + p->spinBoxDownIconHightPixMap = m_SpinBoxParameters.spinBoxDownIconHightPixMap ; - QBrush defaultBrush = comboBoxColorCfg.defaultBrush; - QBrush hoverBrush = comboBoxColorCfg.hoverBrush; - QBrush onBrush = comboBoxColorCfg.onBrush; - QBrush editBrush = comboBoxColorCfg.editBrush; - QBrush disableBrush = comboBoxColorCfg.disableBrush; - - QPen defaultPen = QPen(comboBoxColorCfg.defaultPen, (comboBoxColorCfg.defaultPen.alpha() == 0 || comboBoxColorCfg.defaultPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen hoverPen = QPen(comboBoxColorCfg.hoverPen, (comboBoxColorCfg.hoverPen.alpha() == 0 || comboBoxColorCfg.hoverPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen onPen = QPen(comboBoxColorCfg.onPen, (comboBoxColorCfg.onPen.alpha() == 0 || comboBoxColorCfg.onPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen editPen = QPen(comboBoxColorCfg.editPen, (m_adjustColorRules == AdjustColorRules::DefaultRGB) ? 2 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen disablePen = QPen(comboBoxColorCfg.disablePen, (comboBoxColorCfg.disablePen.alpha() == 0 || comboBoxColorCfg.disablePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB: - if (isDark) { - hoverBrush = QBrush(configMixColor(button, mix, 0.2)); - } else { - hoverBrush = QBrush(configMixColor(button, mix, 0.05)); - } - break; - case AdjustColorRules::HSL: - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - onPen, onBrush, disablePen, disableBrush); - //edit - editPen = onPen; - break; - default: - break; +} + +void UKUIConfigStyleParameters::initConfigComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) +{ + int radius = (widget && widget->property("normalRadius").isValid()) ? + widget->property("normalRadius").toInt() : m_dtconfig->kradiusNormal(); + + QBrush defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonActive()); + QBrush hoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentHover()); + QBrush onBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentClick()); + QBrush editBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainGeneralNormal()); + QBrush disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonDisable()); + + QBrush defaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentNormal()); + QBrush hoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentHover()); + QBrush onPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentClick()); + QBrush editPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightActive()); + QBrush disablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentDisable()); + QBrush focusPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightActive()); + + QPen defaultPen = QPen(defaultPenBrush, (defaultPenBrush.style() == Qt::NoBrush || defaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen hoverPen = QPen(hoverPenBrush, (hoverPenBrush.style() == Qt::NoBrush || hoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen onPen = QPen(onPenBrush, (onPenBrush.style() == Qt::NoBrush || onPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen editPen = QPen(editPenBrush, (editPenBrush.style() == Qt::NoBrush || editPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen disablePen = QPen(disablePenBrush, (disablePenBrush.style() == Qt::NoBrush || disablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen focusPen = QPen(focusPenBrush, (focusPenBrush.style() == Qt::NoBrush || focusPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("radius", radius); + w->setProperty("defaultBrush", defaultBrush); + w->setProperty("onBrush", onBrush); + w->setProperty("hoverBrush", hoverBrush); + w->setProperty("disableBrush", disableBrush); + w->setProperty("editBrush", editBrush); + w->setProperty("defaultPen", defaultPen); + w->setProperty("hoverPen", hoverPen); + w->setProperty("onPen", onPen); + w->setProperty("disablePen", disablePen); + w->setProperty("editPen", editPen); + w->setProperty("focusPen", focusPen); } if (widget) { @@ -2055,119 +1710,90 @@ if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { disablePen = widget->property("setDisablePen").value<QPen>(); } + if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { + focusPen = widget->property("setFocusPen").value<QPen>(); + } } - m_ComboBoxParameters.radius = radius; + m_ComboBoxParameters.radius = radius; m_ComboBoxParameters.comboBoxDefaultBrush = defaultBrush; - m_ComboBoxParameters.comboBoxHoverBrush = hoverBrush; - m_ComboBoxParameters.comboBoxOnBrush = onBrush; - m_ComboBoxParameters.comboBoxEditBrush = editBrush; + m_ComboBoxParameters.comboBoxHoverBrush = hoverBrush; + m_ComboBoxParameters.comboBoxOnBrush = onBrush; + m_ComboBoxParameters.comboBoxEditBrush = editBrush; m_ComboBoxParameters.comboBoxDisableBrush = disableBrush; - m_ComboBoxParameters.comboBoxDefaultPen = defaultPen; - m_ComboBoxParameters.comboBoxHoverPen = hoverPen; - m_ComboBoxParameters.comboBoxOnPen = onPen; - m_ComboBoxParameters.comboBoxEditPen = editPen; - m_ComboBoxParameters.comboBoxDisablePen = disablePen; + m_ComboBoxParameters.comboBoxDefaultPen = defaultPen; + m_ComboBoxParameters.comboBoxHoverPen = hoverPen; + m_ComboBoxParameters.comboBoxOnPen = onPen; + m_ComboBoxParameters.comboBoxEditPen = editPen; + m_ComboBoxParameters.comboBoxDisablePen = disablePen; + m_ComboBoxParameters.comboBoxFocusPen = focusPen; +} + +void UKUIConfigStyleParameters::getDefaultConfigComboBoxParameters(ConfigComboBoxParameters *p, bool isDark) +{ + initConfigComboBoxParameters(isDark, nullptr, nullptr); + p->radius = m_ComboBoxParameters.radius ; + p->comboBoxDefaultBrush = m_ComboBoxParameters.comboBoxDefaultBrush; + p->comboBoxHoverBrush = m_ComboBoxParameters.comboBoxHoverBrush ; + p->comboBoxOnBrush = m_ComboBoxParameters.comboBoxOnBrush ; + p->comboBoxEditBrush = m_ComboBoxParameters.comboBoxEditBrush ; + p->comboBoxDisableBrush = m_ComboBoxParameters.comboBoxDisableBrush; + p->comboBoxDefaultPen = m_ComboBoxParameters.comboBoxDefaultPen ; + p->comboBoxHoverPen = m_ComboBoxParameters.comboBoxHoverPen ; + p->comboBoxOnPen = m_ComboBoxParameters.comboBoxOnPen ; + p->comboBoxEditPen = m_ComboBoxParameters.comboBoxEditPen ; + p->comboBoxDisablePen = m_ComboBoxParameters.comboBoxDisablePen ; + p->comboBoxFocusPen = m_ComboBoxParameters.comboBoxFocusPen ; } -void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) +void UKUIConfigStyleParameters::initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool highlight) { - int radius = m_radiusStruct.normalRadius; + int radius = (widget && widget->property("normalRadius").isValid()) ? + widget->property("normalRadius").toInt() : m_dtconfig->kradiusNormal(); bool needTranslucent = false; + bool highlightMode = highlight; + if (widget && widget->property("highlightMode").isValid()) { + highlightMode = widget->property("highlightMode").toBool(); + } if (widget && widget->property("needTranslucent").isValid()) { needTranslucent = widget->property("needTranslucent").toBool(); } - UKUIColorTheme::ListViewColorCfg listViewColorCfg = readCfg()->listViewColorCfg(option->palette ,needTranslucent ? C_ListView_Translucent : C_ListView_Default); - - QBrush defaultBrush = listViewColorCfg.defaultBrush; - QBrush hoverBrush = listViewColorCfg.hoverBrush; - QBrush selectBrush = listViewColorCfg.selectBrush; - QBrush disableBrush = listViewColorCfg.disableBrush; - QPen textHoverPen = QPen(listViewColorCfg.textHoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen textSelectPen = QPen(listViewColorCfg.textSelectPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen hoverPen = QPen(listViewColorCfg.hoverPen, listViewColorCfg.hoverPen.alpha() > 0 ? 1 : 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen selectPen = QPen(listViewColorCfg.selectPen, listViewColorCfg.selectPen.alpha() > 0 ? 1 : 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if(!option->state & QStyle::State_Enabled){ - textSelectPen = option->palette.color(QPalette::Disabled, QPalette::Text); - textHoverPen = option->palette.color(QPalette::Disabled, QPalette::Text); - } - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB: - //hover - if(listViewColorCfg.hoverType == Obj_Color_Type) - hoverBrush = listViewColorCfg.hoverBrush; - else if(listViewColorCfg.hoverType == Obj_Gradient_Type){ - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - - if(needTranslucent){ - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Light); - endColor = option->palette.color(QPalette::Active, QPalette::Text); - startColor.setAlphaF(0.15); - endColor.setAlphaF(0.15); - } else { - startColor = option->palette.color(QPalette::Active, QPalette::Mid); - endColor = option->palette.color(QPalette::Active, QPalette::Dark); - startColor.setAlphaF(0.1); - endColor.setAlphaF(0.1); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - QColor selectColor = option->palette.color(QPalette::Active, QPalette::Dark); - if(isDark) - selectColor = option->palette.color(QPalette::Active, QPalette::Light); - selectColor.setAlphaF(isDark ? 0.20 : 0.25); - selectBrush.setColor(selectColor); - } - else{ - //hover - if (isDark) { - startColor = configMixColor(button, QColor(Qt::white), 0.2); - endColor = configMixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = configMixColor(button, QColor(Qt::black), 0.05); - endColor = configMixColor(button, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - } - } - break; - case AdjustColorRules::HSL: - hoverBrush = QBrush(highlightHover(isDark, option->palette)); - selectBrush = QBrush(highlightClick(isDark, option->palette)); - if(isDark) - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - if(isDark) - - selectPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else - selectPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - break; - default: - break; + QBrush defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainGeneralNormal()); + QBrush hoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainHover()); + QBrush selectBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainClick()); + QBrush disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainGeneralNormal()); + QPen textHoverPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kFontPrimary()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen textSelectPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kFontPrimary()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen textDisablePen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kFontPrimaryDisable()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + QPen hoverPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentHover()), + parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentHover()).color().alpha() > 0 ? + 1 : 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen selectPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentClick()), + parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentClick()).color().alpha() > 0 ? + 1 : 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen focusPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentClick()), + parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentClick()).color().alpha() > 0 ? + 2 : 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("radius", radius); + w->setProperty("defaultBrush", defaultBrush); + w->setProperty("hoverBrush", hoverBrush); + w->setProperty("disableBrush", disableBrush); + w->setProperty("selectBrush", selectBrush); + w->setProperty("textHoverPen", textHoverPen); + w->setProperty("textSelectPen", textSelectPen); + w->setProperty("textDisablePen", textDisablePen); + w->setProperty("hoverPen", hoverPen); + w->setProperty("selectPen", selectPen); + w->setProperty("focusPen", focusPen); } - if (widget) { if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { radius = widget->property("setRadius").value<int>(); @@ -2190,6 +1816,18 @@ if (widget->property("setTextSelectPen").isValid() && widget->property("setTextSelectPen").canConvert<QPen>()) { textSelectPen = widget->property("setTextSelectPen").value<QPen>(); } + if (widget->property("setTextDisablePen").isValid() && widget->property("setTextDisablePen").canConvert<QPen>()) { + textDisablePen = widget->property("setTextDisablePen").value<QPen>(); + } + if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { + hoverPen = widget->property("setHoverPen").value<QPen>(); + } + if (widget->property("setSelectPen").isValid() && widget->property("setSelectPen").canConvert<QPen>()) { + selectPen = widget->property("setSelectPen").value<QPen>(); + } + if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { + focusPen = widget->property("setFocusPen").value<QPen>(); + } } m_ListParameters.radius = radius; @@ -2198,96 +1836,102 @@ m_ListParameters.listSelectBrush = selectBrush; m_ListParameters.listDisableBrush = disableBrush; m_ListParameters.listTextHoverPen = textHoverPen; - m_ListParameters.listTextSelectPen = textSelectPen; - m_ListParameters.listHoverPen = hoverPen; + m_ListParameters.listTextSelectPen = textSelectPen; + m_ListParameters.listTextDisablePen = textDisablePen; + m_ListParameters.listHoverPen = hoverPen; m_ListParameters.listSelectPen = selectPen; + m_ListParameters.listFocusPen = focusPen; } -void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) +void UKUIConfigStyleParameters::getDefaultConfigListParameters(ConfigListParameters *p, bool isDark) { - int radius = m_radiusStruct.normalRadius;; - - UKUIColorTheme::TreeViewColorCfg treeViewColorCfg = readCfg()->treeViewColorCfg(option->palette, C_TreeView_Default); - - QBrush defaultBrush = treeViewColorCfg.defaultBrush; - QBrush hoverBrush = treeViewColorCfg.hoverBrush; - QBrush selectBrush = treeViewColorCfg.selectBrush; - QBrush disableBrush = treeViewColorCfg.disableBrush; - QPen textHoverPen = QPen(treeViewColorCfg.textHoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen textSelectPen = QPen(treeViewColorCfg.textSelectPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen hoverPen = QPen(treeViewColorCfg.hoverPen, (treeViewColorCfg.hoverPen == Qt::NoPen || treeViewColorCfg.hoverPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen selectPen = QPen(treeViewColorCfg.selectPen, (treeViewColorCfg.selectPen == Qt::NoPen || treeViewColorCfg.selectPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - QBrush branchDefaultBrush = treeViewColorCfg.branchDefaultBrush; - QBrush branchHoverBrush = treeViewColorCfg.branchHoverBrush; - QBrush branchSelectBrush = treeViewColorCfg.branchSelectBrush; - QBrush branchDisableBrush = treeViewColorCfg.branchDisableBrush; - - if(!option->state & QStyle::State_Enabled){ - textSelectPen = option->palette.color(QPalette::Disabled, QPalette::Text); - textHoverPen = option->palette.color(QPalette::Disabled, QPalette::Text); - } - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - //hover - QLinearGradient linearGradient; - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor startColor; - QColor endColor; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - if(treeViewColorCfg.hoverType == Obj_Color_Type){ - hoverBrush = treeViewColorCfg.hoverBrush; - branchHoverBrush = hoverBrush; - } - else if(treeViewColorCfg.hoverType == Obj_Gradient_Type){ - if (isDark) { - startColor = configMixColor(button, QColor(Qt::white), 0.2); - endColor = configMixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = configMixColor(button, QColor(Qt::black), 0.05); - endColor = configMixColor(button, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - branchHoverBrush = QBrush(linearGradient); - } - } - break; - case AdjustColorRules::HSL:{ - hoverBrush = QBrush(highlightHover(isDark, option->palette)); - branchHoverBrush = hoverBrush; - selectBrush = QBrush(highlightClick(isDark, option->palette)); - - if(isDark) - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - if(isDark) - - selectPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else - selectPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - break; - default: - break; - } - - branchDefaultBrush = defaultBrush; - branchSelectBrush = selectBrush; - branchDisableBrush = disableBrush; + initConfigListParameters(isDark, nullptr, nullptr); + p->radius = m_ListParameters.radius ; + p->listDefaultBrush = m_ListParameters.listDefaultBrush ; + p->listHoverBrush = m_ListParameters.listHoverBrush ; + p->listSelectBrush = m_ListParameters.listSelectBrush ; + p->listDisableBrush = m_ListParameters.listDisableBrush ; + p->listTextHoverPen = m_ListParameters.listTextHoverPen ; + p->listTextSelectPen = m_ListParameters.listTextSelectPen ; + p->listTextDisablePen = m_ListParameters.listTextDisablePen ; + p->listHoverPen = m_ListParameters.listHoverPen ; + p->listSelectPen = m_ListParameters.listSelectPen ; + p->listFocusPen = m_ListParameters.listFocusPen ; +} + +void UKUIConfigStyleParameters::getHighlightModeConfigListParameters(ConfigListParameters *p, bool isDark) +{ + initConfigListParameters(isDark, nullptr, nullptr, true); + + p->radius = m_ListParameters.radius ; + p->listDefaultBrush = m_ListParameters.listDefaultBrush ; + p->listHoverBrush = m_ListParameters.listHoverBrush ; + p->listSelectBrush = m_ListParameters.listSelectBrush ; + p->listDisableBrush = m_ListParameters.listDisableBrush ; + p->listTextHoverPen = m_ListParameters.listTextHoverPen ; + p->listTextSelectPen = m_ListParameters.listTextSelectPen ; + p->listTextDisablePen = m_ListParameters.listTextDisablePen ; + p->listHoverPen = m_ListParameters.listHoverPen ; + p->listSelectPen = m_ListParameters.listSelectPen ; + p->listFocusPen = m_ListParameters.listFocusPen ; +} + +void UKUIConfigStyleParameters::initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool highlight) +{ + int radius = (widget && widget->property("normalRadius").isValid()) ? + widget->property("normalRadius").toInt() : m_dtconfig->kradiusNormal(); + + bool highlightMode = highlight; + if (widget && widget->property("highlightMode").isValid()) { + highlightMode = widget->property("highlightMode").toBool(); + } + + QBrush defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->baseActive()); + QBrush hoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainHover()); + QBrush selectBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainClick()); + QBrush disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->baseActive()); + + QPen textHoverPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kFontPrimary()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen textSelectPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kFontPrimary()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen textDisablePen = QPen(parseBrush(option ? option->rect : QRect(),m_dtconfig->kFontSecondaryDisable()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + QBrush hoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainHover()); + QBrush selectPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()); + QBrush focusPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()); + + + QPen hoverPen = QPen(hoverPenBrush, (hoverPenBrush.style() == Qt::NoBrush || hoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen selectPen = QPen(selectPenBrush, (selectPenBrush.style() == Qt::NoBrush || selectPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen focusPen = QPen(focusPenBrush, (focusPenBrush.style() == Qt::NoBrush || focusPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + QBrush branchDefaultBrush = defaultBrush; + QBrush branchHoverBrush = hoverBrush; + QBrush branchSelectBrush = selectBrush; + QBrush branchDisableBrush = disableBrush; + + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("radius", radius); + w->setProperty("defaultBrush", defaultBrush); + w->setProperty("hoverBrush", hoverBrush); + w->setProperty("disableBrush", disableBrush); + w->setProperty("selectBrush", selectBrush); + w->setProperty("branchDefaultBrush", branchDefaultBrush); + w->setProperty("branchHoverBrush", branchHoverBrush); + w->setProperty("branchSelectBrush", branchSelectBrush); + w->setProperty("branchDisableBrush", branchDisableBrush); + w->setProperty("textHoverPen", textHoverPen); + w->setProperty("textSelectPen", textSelectPen); + w->setProperty("textDisablePen", textDisablePen); + w->setProperty("hoverPen", hoverPen); + w->setProperty("selectPen", selectPen); + w->setProperty("focusPen", focusPen); + } if (widget) { - if (widget->property("animation").isValid()) - m_TreeParameters.animation = widget->property("animation").toBool(); - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { radius = widget->property("setRadius").value<int>(); } @@ -2321,9 +1965,21 @@ if (widget->property("setTextSelectPen").isValid() && widget->property("setTextSelectPen").canConvert<QPen>()) { textSelectPen = widget->property("setTextSelectPen").value<QPen>(); } + if (widget->property("setTextDisablePen").isValid() && widget->property("setTextDisablePen").canConvert<QPen>()) { + textDisablePen = widget->property("setTextDisablePen").value<QPen>(); + } + if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { + hoverPen = widget->property("setHoverPen").value<QPen>(); + } + if (widget->property("setSelectPen").isValid() && widget->property("setSelectPen").canConvert<QPen>()) { + selectPen = widget->property("setSelectPen").value<QPen>(); + } + if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { + focusPen = widget->property("setFocusPen").value<QPen>(); + } } - m_TreeParameters.radius = radius; + m_TreeParameters.radius = radius; m_TreeParameters.treeDefaultBrush = defaultBrush; m_TreeParameters.treeHoverBrush = hoverBrush; m_TreeParameters.treeSelectBrush = selectBrush; @@ -2334,78 +1990,102 @@ m_TreeParameters.treeBranchSelectBrush = branchSelectBrush; m_TreeParameters.treeBranchDisableBrush = branchDisableBrush; - m_TreeParameters.treeHoverPen = hoverPen; - m_TreeParameters.treeSelectPen = selectPen; - m_TreeParameters.treeTextHoverPen = textHoverPen; - m_TreeParameters.treeTextSelectPen = textSelectPen; -} - -void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int radius = m_radiusStruct.normalRadius;; - UKUIColorTheme::TableColorCfg tableColorCfg = readCfg()->tableColorCfg(option->palette, C_Table_Default); - - QBrush defaultBrush = tableColorCfg.defaultBrush; - QBrush hoverBrush = QBrush(tableColorCfg.hoverBrush); - QBrush selectBrush = tableColorCfg.selectBrush; - QBrush disableBrush = tableColorCfg.disableBrush; - QPen hoverPen = QPen(tableColorCfg.hoverPen, (tableColorCfg.hoverPen.alpha() == 0 || tableColorCfg.hoverPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen selectPen = QPen(tableColorCfg.selectPen, (tableColorCfg.selectPen.alpha() == 0 || tableColorCfg.selectPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen textHoverPen = QPen(tableColorCfg.textHoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen textSelectPen = QPen(tableColorCfg.textSelectPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if(!option->state & QStyle::State_Enabled){ - textSelectPen = option->palette.color(QPalette::Disabled, QPalette::Text); - textHoverPen = option->palette.color(QPalette::Disabled, QPalette::Text); - } - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - if(tableColorCfg.hoverType == Obj_Color_Type) - hoverBrush= QBrush(tableColorCfg.hoverBrush); - else if(tableColorCfg.hoverType == Obj_Gradient_Type){ - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor startColor; - QColor endColor; - if (isDark) { - startColor = configMixColor(button, QColor(Qt::white), 0.2); - endColor = configMixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = configMixColor(button, QColor(Qt::black), 0.05); - endColor = configMixColor(button, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - } - } - break; - case AdjustColorRules::HSL:{ - hoverBrush = QBrush(highlightHover(isDark, option->palette)); - selectBrush = QBrush(highlightClick(isDark, option->palette)); - - if(isDark) - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - if(isDark) - - selectPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else - selectPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - } - break; - default: - break; + m_TreeParameters.treeHoverPen = hoverPen; + m_TreeParameters.treeSelectPen = selectPen; + m_TreeParameters.treeFocusPen = focusPen; + m_TreeParameters.treeTextHoverPen = textHoverPen; + m_TreeParameters.treeTextSelectPen = textSelectPen; + m_TreeParameters.treeTextDisablePen = textDisablePen; +} + +void UKUIConfigStyleParameters::getDefaultConfigTreeParameters(ConfigTreeParameters *p, bool isDark) +{ + initConfigTreeParameters(isDark, nullptr, nullptr); + + p->radius = m_TreeParameters.radius ; + p->treeDefaultBrush = m_TreeParameters.treeDefaultBrush ; + p->treeHoverBrush = m_TreeParameters.treeHoverBrush ; + p->treeSelectBrush = m_TreeParameters.treeSelectBrush ; + p->treeDisableBrush = m_TreeParameters.treeDisableBrush ; + p->treeBranchDefaultBrush = m_TreeParameters.treeBranchDefaultBrush; + p->treeBranchHoverBrush = m_TreeParameters.treeBranchHoverBrush ; + p->treeBranchSelectBrush = m_TreeParameters.treeBranchSelectBrush ; + p->treeBranchDisableBrush = m_TreeParameters.treeBranchDisableBrush; + p->treeHoverPen = m_TreeParameters.treeHoverPen ; + p->treeSelectPen = m_TreeParameters.treeSelectPen ; + p->treeFocusPen = m_TreeParameters.treeFocusPen ; + p->treeTextHoverPen = m_TreeParameters.treeTextHoverPen ; + p->treeTextSelectPen = m_TreeParameters.treeTextSelectPen ; + p->treeTextDisablePen = m_TreeParameters.treeTextDisablePen ; +} + +void UKUIConfigStyleParameters::getHighlightModeConfigTreeParameters(ConfigTreeParameters *p, bool isDark) +{ + initConfigTreeParameters(isDark, nullptr, nullptr, true); + + p->radius = m_TreeParameters.radius ; + p->treeDefaultBrush = m_TreeParameters.treeDefaultBrush ; + p->treeHoverBrush = m_TreeParameters.treeHoverBrush ; + p->treeSelectBrush = m_TreeParameters.treeSelectBrush ; + p->treeDisableBrush = m_TreeParameters.treeDisableBrush ; + p->treeBranchDefaultBrush = m_TreeParameters.treeBranchDefaultBrush; + p->treeBranchHoverBrush = m_TreeParameters.treeBranchHoverBrush ; + p->treeBranchSelectBrush = m_TreeParameters.treeBranchSelectBrush ; + p->treeBranchDisableBrush = m_TreeParameters.treeBranchDisableBrush; + p->treeHoverPen = m_TreeParameters.treeHoverPen ; + p->treeSelectPen = m_TreeParameters.treeSelectPen ; + p->treeFocusPen = m_TreeParameters.treeFocusPen ; + p->treeTextHoverPen = m_TreeParameters.treeTextHoverPen ; + p->treeTextSelectPen = m_TreeParameters.treeTextSelectPen ; + p->treeTextDisablePen = m_TreeParameters.treeTextDisablePen ; +} + +void UKUIConfigStyleParameters::initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool highlight) +{ + int radius = (widget && widget->property("normalRadius").isValid()) ? + widget->property("normalRadius").toInt() : m_dtconfig->kradiusNormal(); + + bool highlightMode = highlight; + if (widget && widget->property("highlightMode").isValid()) { + highlightMode = widget->property("highlightMode").toBool(); + } + + QBrush defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->baseActive()); + QBrush hoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainHover()); + QBrush selectBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainClick()); + QBrush disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->baseActive()); + + QPen textHoverPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kFontPrimary()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen textSelectPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kFontPrimary()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen textDisablePen = QPen(parseBrush(option ? option->rect : QRect(),m_dtconfig->kFontSecondaryDisable()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + QBrush hoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainHover()); + QBrush selectPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()); + QBrush focusPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()); + + + QPen hoverPen = QPen(hoverPenBrush, (hoverPenBrush.style() == Qt::NoBrush || hoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen selectPen = QPen(selectPenBrush, (selectPenBrush.style() == Qt::NoBrush || selectPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen focusPen = QPen(focusPenBrush, (focusPenBrush.style() == Qt::NoBrush || focusPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("radius", radius); + w->setProperty("defaultBrush", defaultBrush); + w->setProperty("hoverBrush", hoverBrush); + w->setProperty("disableBrush", disableBrush); + w->setProperty("selectBrush", selectBrush); + w->setProperty("textHoverPen", textHoverPen); + w->setProperty("textSelectPen", textSelectPen); + w->setProperty("textDisablePen", textSelectPen); + w->setProperty("hoverPen", hoverPen); + w->setProperty("selectPen", selectPen); + w->setProperty("focusPen", focusPen); } + if (widget) { if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { radius = widget->property("setRadius").value<int>(); @@ -2434,18 +2114,59 @@ if (widget->property("setTextSelectPen").isValid() && widget->property("setTextSelectPen").canConvert<QPen>()) { textSelectPen = widget->property("setTextSelectPen").value<QPen>(); } + if (widget->property("setTextDisablePen").isValid() && widget->property("setTextDisablePen").canConvert<QPen>()) { + textSelectPen = widget->property("setTextDisablePen").value<QPen>(); + } + if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { + focusPen = widget->property("setFocusPen").value<QPen>(); + } } - m_TableParameters.radius = radius; - m_TableParameters.tableDefaultBrush = defaultBrush; - m_TableParameters.tableHoverBrush = hoverBrush; - m_TableParameters.tableSelectBrush = selectBrush; - m_TableParameters.tableDisableBrush = disableBrush; - m_TableParameters.tableHoverPen = hoverPen; - m_TableParameters.tableSelectPen = selectPen; - - m_TableParameters.tableTextHoverPen = textHoverPen; - m_TableParameters.tableTextSelectPen = textSelectPen; + m_TableParameters.radius = radius; + m_TableParameters.tableDefaultBrush = defaultBrush; + m_TableParameters.tableHoverBrush = hoverBrush; + m_TableParameters.tableSelectBrush = selectBrush; + m_TableParameters.tableDisableBrush = disableBrush; + m_TableParameters.tableHoverPen = hoverPen; + m_TableParameters.tableSelectPen = selectPen; + m_TableParameters.tableFocusPen = focusPen; + m_TableParameters.tableTextHoverPen = textHoverPen; + m_TableParameters.tableTextSelectPen = textSelectPen; + m_TableParameters.tableTextDisablePen = textDisablePen; +} + +void UKUIConfigStyleParameters::getDefaultConfigTableParameters(ConfigTableParameters *p, bool isDark) +{ + initConfigTableParameters(isDark, nullptr, nullptr); + + p->radius = m_TableParameters.radius ; + p->tableDefaultBrush = m_TableParameters.tableDefaultBrush ; + p->tableHoverBrush = m_TableParameters.tableHoverBrush ; + p->tableSelectBrush = m_TableParameters.tableSelectBrush ; + p->tableDisableBrush = m_TableParameters.tableDisableBrush ; + p->tableHoverPen = m_TableParameters.tableHoverPen ; + p->tableSelectPen = m_TableParameters.tableSelectPen ; + p->tableFocusPen = m_TableParameters.tableFocusPen ; + p->tableTextHoverPen = m_TableParameters.tableTextHoverPen ; + p->tableTextSelectPen = m_TableParameters.tableTextSelectPen ; + p->tableTextDisablePen = m_TableParameters.tableTextDisablePen; +} + +void UKUIConfigStyleParameters::getHighlightModeConfigTableParameters(ConfigTableParameters *p, bool isDark) +{ + initConfigTableParameters(isDark, nullptr, nullptr, true); + + p->radius = m_TableParameters.radius ; + p->tableDefaultBrush = m_TableParameters.tableDefaultBrush ; + p->tableHoverBrush = m_TableParameters.tableHoverBrush ; + p->tableSelectBrush = m_TableParameters.tableSelectBrush ; + p->tableDisableBrush = m_TableParameters.tableDisableBrush ; + p->tableHoverPen = m_TableParameters.tableHoverPen ; + p->tableSelectPen = m_TableParameters.tableSelectPen ; + p->tableFocusPen = m_TableParameters.tableFocusPen ; + p->tableTextHoverPen = m_TableParameters.tableTextHoverPen ; + p->tableTextSelectPen = m_TableParameters.tableTextSelectPen ; + p->tableTextDisablePen = m_TableParameters.tableTextDisablePen; } void UKUIConfigStyleParameters::initConfigCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) @@ -2455,199 +2176,57 @@ needTranslucent = widget->property("needTranslucent").toBool(); } - UKUIColorTheme::CheckBoxColorCfg checkboxColorCfg = readCfg()->checkBoxColorCfg(option->palette, needTranslucent ? C_CheckBox_Translucent : C_CheckBox_Default); + int radius = (widget && widget->property("minRadius").isValid()) ? + widget->property("minRadius").toInt() : m_dtconfig->kradiusMin(); - int radius = m_radiusStruct.minRadius; - - QPen defaultPen = QPen(checkboxColorCfg.defaultPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen hoverPen = QPen(checkboxColorCfg.hoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen clickPen = QPen(checkboxColorCfg.clickPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen disablePen = QPen(checkboxColorCfg.disablePen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen onDefaultPen = QPen(checkboxColorCfg.onDefaultPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen onHoverPen = QPen(checkboxColorCfg.onHoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen onClickPen = QPen(checkboxColorCfg.onClickPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen contentPen = QPen(checkboxColorCfg.contentPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - QBrush defaultBrush = checkboxColorCfg.defaultBrush; - QBrush hoverBrush = checkboxColorCfg.hoverBrush; - QBrush clickBrush = checkboxColorCfg.clickBrush; - QBrush disableBrush = checkboxColorCfg.disableBrush; - QBrush onDefaultBrush = checkboxColorCfg.onDefaultBrush; - QBrush onHoverBrush = checkboxColorCfg.onHoverBrush; - QBrush onClickBrush = checkboxColorCfg.onClickBrush; - QBrush pathBrush = checkboxColorCfg.pathBrush; - QBrush pathDisableBrush = checkboxColorCfg.pathDisableBrush; + QPen defaultPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineNormal()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen hoverPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineNormal()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen clickPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineNormal()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen disablePen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineDisable()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen onDefaultPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineNormal()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen onHoverPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineNormal()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen onClickPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineNormal()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen contentPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineNormal()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + QBrush defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonActive()); + QBrush hoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentHover()); + QBrush clickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentClick()); + QBrush disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonDisable()); + QBrush onDefaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightActive()); + QBrush onHoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandHover()); + QBrush onClickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandClick()); + QBrush pathBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightInactive()); + QBrush pathDisableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kGrayAlpha10()); bool onHoverBrushIslinearGradient = false; - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - if(checkboxColorCfg.hoverType == Obj_Color_Type){ - if(!needTranslucent){ - hoverBrush = QBrush(configMixColor(defaultBrush.color(), mix, isDark ? 0.15 : 0.05)); - - clickBrush = QBrush(configMixColor(defaultBrush.color(), mix, isDark ? 0.1 : 0.15)); - } - else{ - QColor defaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); - defaultColor.setAlphaF(isDark ? 0.04 : 0.05); - defaultBrush.setColor(defaultColor); - QColor defaultPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - defaultPenColor.setAlphaF(0.35); - defaultPen = QPen(QBrush(defaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); - hoverColor.setAlphaF(isDark ? 0.10 : 0.10); - hoverBrush.setColor(hoverColor); - QColor hoverPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - hoverPenColor.setAlphaF(0.3); - hoverPen = QPen(QBrush(hoverPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - - QColor clickColor = option->palette.color(QPalette::Active, QPalette::BrightText); - clickColor.setAlphaF(isDark ? 0.20 : 0.16); - clickBrush.setColor(clickColor); - QColor clickPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - if(!isDark) - clickPenColor = option->palette.color(QPalette::Active, QPalette::Mid); - clickPenColor.setAlphaF(isDark ? 0.25 : 0.65); - clickPen = QPen(QBrush(clickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - } - else if(checkboxColorCfg.hoverType == Obj_Gradient_Type){ - if(needTranslucent){ - QColor defaultColor = option->palette.color(QPalette::Active, QPalette::Mid); - if(isDark) - defaultColor = option->palette.color(QPalette::Active, QPalette::Text); - defaultColor.setAlphaF(isDark ? 0.15 : 0.20); - defaultBrush.setColor(defaultColor); - QColor defaultPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - defaultPenColor.setAlphaF(0.3); - defaultPen = QPen(QBrush(defaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Light); - endColor = option->palette.color(QPalette::Active, QPalette::Text); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } else { - startColor = option->palette.color(QPalette::Active, QPalette::Mid); - endColor = option->palette.color(QPalette::Active, QPalette::Dark); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - hoverPen = defaultPen; - - QColor clickColor = option->palette.color(QPalette::Active, QPalette::Dark); - if(isDark) - clickColor = option->palette.color(QPalette::Active, QPalette::Light); - clickColor.setAlphaF(0.30); - clickBrush.setColor(clickColor); - clickPen = defaultPen; - } - onHoverBrushIslinearGradient = true; - } - - if(checkboxColorCfg.onHoverType == Obj_Color_Type){ - onHoverBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, isDark? 0.2 : 0.05)); - - onClickBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, isDark ? 0.05 : 0.2)); - - } - else if(checkboxColorCfg.hoverType == Obj_Gradient_Type){ - //on default - QColor DefaultPenColor = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor onDefaultPenColor = configMixColor(DefaultPenColor, mix, 0.1); - onDefaultPen = QPen(QBrush(onDefaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - onDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); - if(needTranslucent) - { - QColor onDefaultPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - onDefaultPenColor.setAlphaF(0.1); - onDefaultPen = QPen(QBrush(onDefaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } -// cDebug << "ondefaultbrush..." << onDefaultBrush.color().red() << onDefaultBrush.color().green() << onDefaultBrush.color().blue(); - //on hover - QColor onHoverPenColor = configMixColor(DefaultPenColor, mix, 0.1); - onHoverPen = QPen(QBrush(onHoverPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - if (isDark) { - startColor = configMixColor(onDefaultBrush.color(), QColor(Qt::white), 0.2); - endColor = configMixColor(onDefaultBrush.color(), QColor(Qt::black), 0.05); - } else { - startColor = configMixColor(onDefaultBrush.color(), QColor(Qt::white), 0.05); - endColor = configMixColor(onDefaultBrush.color(), QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - onHoverBrush = QBrush(linearGradient); - if(needTranslucent) - { - QColor onHoverPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - onHoverPenColor.setAlphaF(0.2); - onHoverPen = QPen(QBrush(onHoverPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - - //on click - QColor onClickPenColor = configMixColor(DefaultPenColor, mix, 0.1); - onClickPen = QPen(QBrush(onClickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - onClickBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, 0.1)); - if(needTranslucent) - { - QColor onClickPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - onClickPenColor.setAlphaF(0.2); - onClickPen = QPen(QBrush(onClickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - } - disablePen = defaultPen; + if (m_dtconfig->kBrandHover().style() == Qt::LinearGradientPattern) { + onHoverBrushIslinearGradient = true; } - break; - case AdjustColorRules::HSL:{ - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); - - //on default - onDefaultPen = defaultPen; - onDefaultBrush = defaultBrush; - - //on hover - onHoverPen = hoverPen; - onHoverBrush = hoverBrush; - - //on click - onClickPen = clickPen; - onClickBrush = clickBrush; - disablePen = defaultPen; - - //path - pathBrush = option->palette.brush(QPalette::Active, QPalette::Text); - pathDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::ButtonText); - } - default: - break; + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("radius", radius); + w->setProperty("defaultBrush", defaultBrush); + w->setProperty("hoverBrush", hoverBrush); + w->setProperty("clickBrush", clickBrush); + w->setProperty("disableBrush", disableBrush); + w->setProperty("onDefaultBrush", onDefaultBrush); + w->setProperty("onHoverBrush", onHoverBrush); + w->setProperty("onClickBrush", onClickBrush); + w->setProperty("pathDisableBrush", pathDisableBrush); + w->setProperty("pathBrush", pathBrush); + w->setProperty("contentPen", contentPen); + w->setProperty("defaultPen", defaultPen); + w->setProperty("disablePen", disablePen); + w->setProperty("hoverPen", hoverPen); + w->setProperty("clickPen", clickPen); + w->setProperty("onDefaultPen", onDefaultPen); + w->setProperty("onHoverPen", onHoverPen); + w->setProperty("onClickPen", onClickPen); + w->setProperty("onHoverBrushIslinearGradient", onHoverBrushIslinearGradient); } - if (widget && widget->property("animation").isValid()) - m_CheckBoxParameters.animation = widget->property("animation").toBool(); - - m_CheckBoxParameters.checkBoxContentPen = contentPen; - if (widget) { if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { radius = widget->property("setRadius").value<int>(); @@ -2716,6 +2295,7 @@ m_CheckBoxParameters.checkBoxOnDefaultPen = onDefaultPen; m_CheckBoxParameters.checkBoxOnHoverPen = onHoverPen; m_CheckBoxParameters.checkBoxOnClickPen = onClickPen; + m_CheckBoxParameters.checkBoxContentPen = contentPen; m_CheckBoxParameters.checkBoxDefaultBrush = defaultBrush; m_CheckBoxParameters.checkBoxHoverBrush = hoverBrush; @@ -2730,123 +2310,81 @@ m_CheckBoxParameters.onHoverBrushIslinearGradient = onHoverBrushIslinearGradient; } -void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) +void UKUIConfigStyleParameters::getDefaultConfigCheckBoxParameters(ConfigCheckBoxParameters *p, bool isDark) { - m_RadioButtonParameters.radius = m_radiusStruct.normalRadius; - - UKUIColorTheme::RadioButtonColorCfg radioButtonColorCfg = readCfg()->radioButtonColorCfg(option->palette, C_RadioButton_Default); - QPen defaultPen = QPen(radioButtonColorCfg.defaultPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen hoverPen = QPen(radioButtonColorCfg.hoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen clickPen = QPen(radioButtonColorCfg.clickPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen disablePen = QPen(radioButtonColorCfg.disablePen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen onDefaultPen = QPen(radioButtonColorCfg.onDefaultPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen onHoverPen = QPen(radioButtonColorCfg.onHoverPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen onClickPen = QPen(radioButtonColorCfg.onClickPen, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - QBrush defaultBrush = radioButtonColorCfg.defaultBrush; - QBrush hoverBrush = radioButtonColorCfg.hoverBrush; - QBrush clickBrush = radioButtonColorCfg.clickBrush; - QBrush disableBrush = radioButtonColorCfg.disableBrush; - QBrush onDefaultBrush = radioButtonColorCfg.onDefaultBrush; - QBrush onClickBrush = radioButtonColorCfg.onClickBrush; - QBrush childrenOnDefaultBrush = radioButtonColorCfg.childrenOnDefaultBrush; - QBrush childrenOnHoverBrush = radioButtonColorCfg.childrenOnHoverBrush; - QBrush childrenOnClickBrush = radioButtonColorCfg.childrenOnClickBrush; - QBrush childrenOnDisableBrush = radioButtonColorCfg.childrenOnDisableBrush; - QBrush onHoverBrush = QBrush(radioButtonColorCfg.onHoverBrush); - if(radioButtonColorCfg.onHoverType == Obj_Color_Type) - onHoverBrush= QBrush(radioButtonColorCfg.onHoverBrush); - else if(radioButtonColorCfg.onHoverType == Obj_Gradient_Type){ - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - linearGradient.setColorAt(0, radioButtonColorCfg.onHoverGradientList.value(0)); - linearGradient.setColorAt(1, radioButtonColorCfg.onHoverGradientList.value(1)); - onHoverBrush = QBrush(linearGradient); - } - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - m_RadioButtonParameters.childrenRadius = (qstyleoption_cast<const QStyleOptionButton*>(option)->rect.adjusted(1, 1, -1, -1).width()) / 2 - 2; - - //hover - hoverPen = defaultPen; - if (isDark) { - hoverBrush = QBrush(configMixColor(defaultBrush.color(), mix, 0.15)); - } else { - hoverBrush = QBrush(configMixColor(defaultBrush.color(), mix, 0.05)); - } - - //click - clickPen = defaultPen; - if (isDark) { - clickBrush = QBrush(configMixColor(defaultBrush.color(), mix, 0.1)); - } else { - clickBrush = QBrush(configMixColor(defaultBrush.color(), mix, 0.15)); - } - - //disable - disablePen = defaultPen; + initConfigCheckBoxParameters(isDark, nullptr, nullptr); - onHoverPen = onDefaultPen; - if(radioButtonColorCfg.onHoverType == Obj_Color_Type){ - //on hover - if (isDark) { - onHoverBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, 0.2)); - } else { - onHoverBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, 0.05)); - } - } - else if(radioButtonColorCfg.onHoverType == Obj_Gradient_Type){ - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - if (isDark) { - startColor = configMixColor(onDefaultBrush.color(), QColor(Qt::white), 0.2); - endColor = configMixColor(onDefaultBrush.color(), QColor(Qt::black), 0.05); - } else { - startColor = configMixColor(onDefaultBrush.color(), QColor(Qt::white), 0.05); - endColor = configMixColor(onDefaultBrush.color(), QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - onHoverBrush = QBrush(linearGradient); - } - - //on click - onClickPen = onDefaultPen; - if (isDark) { - onClickBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, 0.05)); - } else { - onClickBrush = QBrush(configMixColor(onDefaultBrush.color(), mix, 0.2)); - } - } - break; - case AdjustColorRules::HSL:{ - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); - - //on default - onDefaultPen = defaultPen; - onDefaultBrush = defaultBrush; - - //on hover - onHoverPen = hoverPen; - onHoverBrush = hoverBrush; + p->radius = m_CheckBoxParameters.radius ; + p->checkBoxDefaultPen = m_CheckBoxParameters.checkBoxDefaultPen ; + p->checkBoxHoverPen = m_CheckBoxParameters.checkBoxHoverPen ; + p->checkBoxClickPen = m_CheckBoxParameters.checkBoxClickPen ; + p->checkBoxDisablePen = m_CheckBoxParameters.checkBoxDisablePen ; + p->checkBoxOnDefaultPen = m_CheckBoxParameters.checkBoxOnDefaultPen ; + p->checkBoxOnHoverPen = m_CheckBoxParameters.checkBoxOnHoverPen ; + p->checkBoxOnClickPen = m_CheckBoxParameters.checkBoxOnClickPen ; + p->checkBoxContentPen = m_CheckBoxParameters.checkBoxContentPen ; + p->checkBoxDefaultBrush = m_CheckBoxParameters.checkBoxDefaultBrush ; + p->checkBoxHoverBrush = m_CheckBoxParameters.checkBoxHoverBrush ; + p->checkBoxClickBrush = m_CheckBoxParameters.checkBoxClickBrush ; + p->checkBoxDisableBrush = m_CheckBoxParameters.checkBoxDisableBrush ; + p->checkBoxOnDefaultBrush = m_CheckBoxParameters.checkBoxOnDefaultBrush ; + p->checkBoxOnHoverBrush = m_CheckBoxParameters.checkBoxOnHoverBrush ; + p->checkBoxOnClickBrush = m_CheckBoxParameters.checkBoxOnClickBrush ; + p->checkBoxPathBrush = m_CheckBoxParameters.checkBoxPathBrush ; + p->checkBoxPathDisableBrush = m_CheckBoxParameters.checkBoxPathDisableBrush ; + p->onHoverBrushIslinearGradient = m_CheckBoxParameters.onHoverBrushIslinearGradient; +} - //on click - onClickPen = clickPen; - onClickBrush = clickBrush; +void UKUIConfigStyleParameters::initConfigRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) +{ + m_RadioButtonParameters.radius = (widget && widget->property("normalRadius").isValid()) ? + widget->property("normalRadius").toInt() : m_dtconfig->kradiusMenu(); - m_RadioButtonParameters.childrenRadius = (qstyleoption_cast<const QStyleOptionButton*>(option)->rect.width()) / 2; - break; - } - default: - break; + QPen defaultPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineNormal()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen hoverPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineNormal()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen clickPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineNormal()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen disablePen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineDisable()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen onDefaultPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineNormal()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen onHoverPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineNormal()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen onClickPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineNormal()), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + QBrush defaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonActive()); + QBrush hoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentHover()); + QBrush clickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentClick()); + QBrush disableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonDisable()); + QBrush onDefaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightActive()); + QBrush onClickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandClick()); + QBrush childrenOnDefaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->lightActive()); + QBrush childrenOnHoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->lightActive()); + QBrush childrenOnClickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->buttonActive()); + QBrush childrenOnDisableBrush = QBrush(QColor(179, 179, 179)); + QBrush onHoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandHover()); + + if(option) + m_RadioButtonParameters.childrenRadius = + (qstyleoption_cast<const QStyleOptionButton*>(option)->rect.adjusted(1, 1, -1, -1).width()) / 2 - 2; + + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("radius", radius); + w->setProperty("defaultBrush", defaultBrush); + w->setProperty("hoverBrush", hoverBrush); + w->setProperty("clickBrush", clickBrush); + w->setProperty("disableBrush", disableBrush); + w->setProperty("onDefaultBrush", onDefaultBrush); + w->setProperty("onHoverBrush", onHoverBrush); + w->setProperty("onClickBrush", onClickBrush); + w->setProperty("childrenOnDefaultBrush", childrenOnDefaultBrush); + w->setProperty("childrenOnHoverBrush", childrenOnHoverBrush); + w->setProperty("childrenOnClickBrush", childrenOnClickBrush); + w->setProperty("childrenOnDisableBrush", childrenOnDisableBrush); + w->setProperty("defaultPen", defaultPen); + w->setProperty("disablePen", disablePen); + w->setProperty("hoverPen", hoverPen); + w->setProperty("clickPen", clickPen); + w->setProperty("onDefaultPen", onDefaultPen); + w->setProperty("onHoverPen", onHoverPen); + w->setProperty("onClickPen", onClickPen); } //if set property @@ -2893,11 +2431,20 @@ if (widget->property("setOnClickBrush").isValid() && widget->property("setOnClickBrush").canConvert<QBrush>()) { onClickBrush = widget->property("setOnClickBrush").value<QBrush>(); } + if (widget->property("setChildrenOnDefaultBrush").isValid() && widget->property("setChildrenOnDefaultBrush").canConvert<QBrush>()) { + childrenOnDefaultBrush = widget->property("setChildrenOnDefaultBrush").value<QBrush>(); + } + if (widget->property("setChildrenOnHoverBrush").isValid() && widget->property("setChildrenOnHoverBrush").canConvert<QBrush>()) { + childrenOnHoverBrush = widget->property("setChildrenOnHoverBrush").value<QBrush>(); + } + if (widget->property("setChildrenOnClickBrush").isValid() && widget->property("setChildrenOnClickBrush").canConvert<QBrush>()) { + childrenOnClickBrush = widget->property("setChildrenOnClickBrush").value<QBrush>(); + } + if (widget->property("setChildrenOnDisableBrush").isValid() && widget->property("setChildrenOnDisableBrush").canConvert<QBrush>()) { + childrenOnDisableBrush = widget->property("setChildrenOnDisableBrush").value<QBrush>(); + } } - if(widget && widget->property("animation").isValid()) - m_RadioButtonParameters.animation = widget->property("animation").toBool(); - m_RadioButtonParameters.radioButtonDefaultPen = defaultPen; m_RadioButtonParameters.radioButtonHoverPen = hoverPen; m_RadioButtonParameters.radioButtonClickPen = clickPen; @@ -2920,6 +2467,29 @@ m_RadioButtonParameters.radioButtonChildrenOnDisableBrush = childrenOnDisableBrush; } +void UKUIConfigStyleParameters::getDefaultConfigRadioButtonParameters(ConfigRadioButtonParameters *p, bool isDark) +{ + initConfigRadioButtonParameters(isDark, nullptr, nullptr); + p->radioButtonDefaultPen = m_RadioButtonParameters.radioButtonDefaultPen ; + p->radioButtonHoverPen = m_RadioButtonParameters.radioButtonHoverPen ; + p->radioButtonClickPen = m_RadioButtonParameters.radioButtonClickPen ; + p->radioButtonDisablePen = m_RadioButtonParameters.radioButtonDisablePen ; + p->radioButtonOnDefaultPen = m_RadioButtonParameters.radioButtonOnDefaultPen ; + p->radioButtonOnHoverPen = m_RadioButtonParameters.radioButtonOnHoverPen ; + p->radioButtonOnClickPen = m_RadioButtonParameters.radioButtonOnClickPen ; + p->radioButtonDefaultBrush = m_RadioButtonParameters.radioButtonDefaultBrush ; + p->radioButtonHoverBrush = m_RadioButtonParameters.radioButtonHoverBrush ; + p->radioButtonClickBrush = m_RadioButtonParameters.radioButtonClickBrush ; + p->radioButtonDisableBrush = m_RadioButtonParameters.radioButtonDisableBrush ; + p->radioButtonOnDefaultBrush = m_RadioButtonParameters.radioButtonOnDefaultBrush ; + p->radioButtonOnHoverBrush = m_RadioButtonParameters.radioButtonOnHoverBrush ; + p->radioButtonOnClickBrush = m_RadioButtonParameters.radioButtonOnClickBrush ; + p->radioButtonChildrenOnDefaultBrush = m_RadioButtonParameters.radioButtonChildrenOnDefaultBrush; + p->radioButtonChildrenOnHoverBrush = m_RadioButtonParameters.radioButtonChildrenOnHoverBrush ; + p->radioButtonChildrenOnClickBrush = m_RadioButtonParameters.radioButtonChildrenOnClickBrush ; + p->radioButtonChildrenOnDisableBrush = m_RadioButtonParameters.radioButtonChildrenOnDisableBrush; +} + void UKUIConfigStyleParameters::initConfigSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) { int grooveRadius = Slider_GrooveLength/2; @@ -2928,171 +2498,84 @@ if (widget && widget->property("needTranslucent").isValid()) { needTranslucent = widget->property("needTranslucent").toBool(); } - UKUIColorTheme::SliderBarColorCfg sliderColorCfg = readCfg()->sliderBarColorCfg(option->palette, needTranslucent ? C_SliderBar_Translucent : C_SliderBar_Default); - QBrush handleDefaultBrush = sliderColorCfg.handleDefaultBrush; - QBrush handleHoverBrush = sliderColorCfg.handleHoverBrush; - QBrush handleClickBrush = sliderColorCfg.handleClickBrush; - QBrush handleDisableBrush = sliderColorCfg.handleDisableBrush; - - QBrush grooveValueDefaultBrush = sliderColorCfg.grooveValueDefaultBrush; - QBrush grooveValueHoverBrush = sliderColorCfg.grooveValueHoverBrush; - QBrush grooveValueDisableBrush = sliderColorCfg.grooveValueDisableBrush; - QBrush grooveUnvalueDefaultBrush = sliderColorCfg.grooveUnvalueDefaultBrush; - QBrush grooveUnvalueHoverBrush = sliderColorCfg.grooveUnvalueHoverBrush; - QBrush grooveUnvalueDisableBrush = sliderColorCfg.grooveUnvalueDisableBrush; - - QPen handleDefaultPen = QPen(sliderColorCfg.handleDefaultPen, (sliderColorCfg.handleDefaultPen.alpha() == 0 || sliderColorCfg.handleDefaultPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen handleHoverPen = QPen(sliderColorCfg.handleHoverPen , (sliderColorCfg.handleHoverPen.alpha() == 0 || sliderColorCfg.handleHoverPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen handleClickPen = QPen(sliderColorCfg.handleClickPen , (sliderColorCfg.handleClickPen.alpha() == 0 || sliderColorCfg.handleClickPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen handleDisablePen = QPen(sliderColorCfg.handleDisablePen, (sliderColorCfg.handleDisablePen.alpha() == 0 || sliderColorCfg.handleDisablePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen sliderGroovePen = QPen(sliderColorCfg.sliderGroovePen , (sliderColorCfg.sliderGroovePen.alpha() == 0 || sliderColorCfg.sliderGroovePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QBrush handleDefaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightActive()); + QBrush handleHoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandHover()); + QBrush handleClickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandClick()); + QBrush handleDisableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kGray11()); + + QBrush grooveValueDefaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandClick()); + QBrush grooveValueHoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandClick()); + QBrush grooveValueDisableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kGray12()); + QBrush grooveUnvalueDefaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->midlightDisable()); + QBrush grooveUnvalueHoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->midlightDisable()); + QBrush grooveUnvalueDisableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->midlightDisable()); + + QBrush handleDefaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()); + QBrush handleHoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()); + QBrush handleClickPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()); + QBrush handleDisablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandDisable()); + QBrush sliderGroovePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentNormal()); + QBrush focusPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineBrandNormal()); + + QPen handleDefaultPen = QPen(handleDefaultPenBrush, (handleDefaultPenBrush.style() == Qt::NoBrush || handleDefaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen handleHoverPen = QPen(handleHoverPenBrush, (handleHoverPenBrush.style() == Qt::NoBrush || handleHoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen handleClickPen = QPen(handleClickPenBrush, (handleClickPenBrush.style() == Qt::NoBrush || handleClickPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen handleDisablePen = QPen(handleDisablePenBrush, (handleDisablePenBrush.style() == Qt::NoBrush || handleDisablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen sliderGroovePen = QPen(sliderGroovePenBrush, (sliderGroovePenBrush.style() == Qt::NoBrush || sliderGroovePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen focusPen = QPen(focusPenBrush, (focusPenBrush.style() == Qt::NoBrush || focusPenBrush.color().alpha() == 0) ? 0 : 2, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPainterPath handlePath; + int radius = (widget && widget->property("normalRadius").isValid()) ? + widget->property("normalRadius").toInt() : m_dtconfig->kradiusNormal(); const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option); - const bool horizontal = slider->orientation == Qt::Horizontal; - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - QRect handleRect = option->rect; - handlePath.addEllipse(handleRect); - - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - if(sliderColorCfg.handleHoverType == Obj_Color_Type){ - //handle hover - if (isDark) { - handleHoverBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } else { - handleHoverBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } - } - else if(sliderColorCfg.handleHoverType == Obj_Gradient_Type){ - //handle hover - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - if (slider->orientation == Qt::Vertical) { - linearGradient.setStart(option->rect.topRight()); - linearGradient.setFinalStop(option->rect.topLeft()); - } else { - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - } - - if (isDark) { - startColor = configMixColor(highlight, QColor(Qt::white), 0.2); - endColor = configMixColor(highlight, QColor(Qt::black), 0.05); - } else { - startColor = configMixColor(highlight, QColor(Qt::white), 0.05); - endColor = configMixColor(highlight, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - handleHoverBrush = QBrush(linearGradient); - } - - //handle click - if (isDark) { - handleClickBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } else { - handleClickBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } - - //groove value defult - if (isDark) { - grooveValueDefaultBrush = QBrush(configMixColor(highlight, mix, 0.05)); - } else { - grooveValueDefaultBrush = QBrush(configMixColor(highlight, mix, 0.2)); - } - - //groove value hover - grooveValueHoverBrush = grooveValueDefaultBrush; - - //groove value disable - grooveValueDisableBrush = handleDisableBrush; - - if(needTranslucent) - { - QColor color = option->palette.color(QPalette::Active, QPalette::BrightText); - color.setAlphaF(0.1); - grooveUnvalueDefaultBrush.setColor(color); - } - grooveUnvalueHoverBrush = grooveUnvalueDefaultBrush; - } - break; - case AdjustColorRules::HSL:{ - if (isDark) { - handleDefaultPen = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15); - } else { - handleDefaultPen = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3); - } - handleDefaultPen.setWidth(1); - handleHoverPen = handleDefaultPen; - handleHoverPen.setWidth(1); - handleHoverBrush = highlightHover(isDark, option->palette); - - //handle click - handleClickPen = handleDefaultPen; - handleHoverPen.setWidth(1); - handleClickBrush = highlightClick(isDark, option->palette); - - //handle disable - if(isDark) - { - handleDisablePen = adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), 18); - } - else - handleDisablePen = adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), -12); - handleDisablePen.setWidth(1); - - if (isDark) { - grooveValueDefaultBrush = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15); - } else { - grooveValueDefaultBrush = option->palette.color(QPalette::Active, QPalette::Highlight); - } - //groove value hover - grooveValueHoverBrush = grooveValueDefaultBrush; - - if(isDark){ - sliderGroovePen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else - sliderGroovePen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + const bool horizontal = slider ? slider->orientation == Qt::Horizontal : false; - QRect handleRect = option->rect; - if(horizontal){ - handlePath.moveTo(handleRect.left(), handleRect.top()); - handlePath.lineTo(handleRect.left(), handleRect.top() + (2 * (handleRect.height())/3)); - handlePath.lineTo(handleRect.center().x(), handleRect.bottom()); - handlePath.lineTo(handleRect.right(), handleRect.top() + (2 * (handleRect.height())/3)); - handlePath.lineTo(handleRect.right(), handleRect.top()); - handlePath.lineTo(handleRect.left(), handleRect.top()); + QRect handleRect = option ? option->rect : QRect(0,0,0,0); + handlePath.addEllipse(handleRect); - }else { - handlePath.moveTo(handleRect.right(),handleRect.top()); - handlePath.lineTo(handleRect.right() - (2 * (handleRect.width())/3) , handleRect.top()); - handlePath.lineTo(handleRect.left(), handleRect.center().y() ); - handlePath.lineTo(handleRect.right() - (2 * (handleRect.width())/3), handleRect.bottom()); - handlePath.lineTo(handleRect.right(), handleRect.bottom()); - handlePath.lineTo(handleRect.right(),handleRect.top()); - } - - grooveRadius = radiusProperty().normalRadius; - - } - break; - default: - break; + if (m_dtconfig->kBrandHover().style() == Qt::LinearGradientPattern && !horizontal) { + //vertical handle hover + QLinearGradient linearGradient; + linearGradient.setStart(!option ? QPoint(0,0) : option->rect.topRight()); + linearGradient.setFinalStop(!option ? QPoint(0,0) : option->rect.topLeft()); + linearGradient.setStops(m_dtconfig->kBrandHover().gradient()->stops()); + handleHoverBrush = QBrush(linearGradient); + } + + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("radius", radius); + w->setProperty("grooveRadius", grooveRadius); + w->setProperty("handleDefaultBrush", handleDefaultBrush); + w->setProperty("handleHoverBrush", handleHoverBrush); + w->setProperty("handleClickBrush", handleClickBrush); + w->setProperty("handleDisableBrush", handleDisableBrush); + w->setProperty("grooveValueDefaultBrush", grooveValueDefaultBrush); + w->setProperty("grooveValueHoverBrush", grooveValueHoverBrush); + w->setProperty("grooveValueDisableBrush", grooveValueDisableBrush); + w->setProperty("grooveUnvalueDefaultBrush", grooveUnvalueDefaultBrush); + w->setProperty("grooveUnvalueHoverBrush", grooveUnvalueHoverBrush); + w->setProperty("grooveUnvalueDisableBrush", grooveUnvalueDisableBrush); + w->setProperty("handleDefaultPen", handleDefaultPen); + w->setProperty("handleHoverPen", handleHoverPen); + w->setProperty("handleClickPen", handleClickPen); + w->setProperty("handleDisablePen", handleDisablePen); + w->setProperty("sliderGroovePen", sliderGroovePen); + w->setProperty("focusPen", focusPen); } - if (widget->property("animation").isValid()) - m_SliderParameters.animation = widget->property("animation").toBool(); - if (widget) { + if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { + radius = widget->property("setRadius").value<int>(); + } if (widget->property("setGrooveRadius").isValid() && widget->property("setGrooveRadius").canConvert<int>()) { grooveRadius = widget->property("setGrooveRadius").value<int>(); } @@ -3126,8 +2609,28 @@ if (widget->property("setGrooveUnvalueDisableBrush").isValid() && widget->property("setGrooveUnvalueDisableBrush").canConvert<QBrush>()) { grooveUnvalueDisableBrush = widget->property("setGrooveUnvalueDisableBrush").value<QBrush>(); } + + if (widget->property("setHandleDefaultPen").isValid() && widget->property("setHandleDefaultPen").canConvert<QBrush>()) { + handleDefaultPen = widget->property("setHandleDefaultPen").value<QPen>(); + } + if (widget->property("setHandleHoverPen").isValid() && widget->property("setHandleHoverPen").canConvert<QBrush>()) { + handleHoverPen = widget->property("setHandleHoverPen").value<QPen>(); + } + if (widget->property("setHandleClickPen").isValid() && widget->property("setHandleClickPen").canConvert<QBrush>()) { + handleClickPen = widget->property("setHandleClickPen").value<QPen>(); + } + if (widget->property("setHandleDisablePen").isValid() && widget->property("setHandleDisablePen").canConvert<QBrush>()) { + handleDisablePen = widget->property("setHandleDisablePen").value<QPen>(); + } + if (widget->property("setSliderGroovePen").isValid() && widget->property("setSliderGroovePen").canConvert<QBrush>()) { + sliderGroovePen = widget->property("setSliderGroovePen").value<QPen>(); + } + if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QBrush>()) { + focusPen = widget->property("setFocusPen").value<QPen>(); + } } + m_SliderParameters.radius = radius; m_SliderParameters.sliderGrooveRadius = grooveRadius; m_SliderParameters.sliderHandleDefaultBrush = handleDefaultBrush; @@ -3136,102 +2639,115 @@ m_SliderParameters.sliderHandleDisableBrush = handleDisableBrush; m_SliderParameters.sliderGrooveValueDefaultBrush = grooveValueDefaultBrush; - m_SliderParameters.sliderGrooveValueHoverBrush = grooveValueHoverBrush; + m_SliderParameters.sliderGrooveValueHoverBrush = grooveValueHoverBrush; m_SliderParameters.sliderGrooveValueDisableBrush = grooveValueDisableBrush; m_SliderParameters.sliderGrooveUnvalueDefaultBrush = grooveUnvalueDefaultBrush; - m_SliderParameters.sliderGrooveUnvalueHoverBrush = grooveUnvalueHoverBrush; + m_SliderParameters.sliderGrooveUnvalueHoverBrush = grooveUnvalueHoverBrush; m_SliderParameters.sliderGrooveUnvalueDisableBrush = grooveUnvalueDisableBrush; m_SliderParameters.sliderHandleDefaultPen = handleDefaultPen; - m_SliderParameters.sliderHandleHoverPen = handleHoverPen; - m_SliderParameters.sliderHandleClickPen = handleClickPen; + m_SliderParameters.sliderHandleHoverPen = handleHoverPen; + m_SliderParameters.sliderHandleClickPen = handleClickPen; m_SliderParameters.sliderHandleDisablePen = handleDisablePen; - m_SliderParameters.sliderGroovePen = sliderGroovePen; + m_SliderParameters.sliderGroovePen = sliderGroovePen; + m_SliderParameters.focusPen = focusPen; + m_SliderParameters.sliderHandlePath = handlePath; } +void UKUIConfigStyleParameters::getDefaultSliderParameters(ConfigSliderParameters *p, bool isDark) +{ + initConfigSliderParameters(isDark, nullptr, nullptr); + p->radius = m_SliderParameters.radius ; + p->sliderGrooveRadius = m_SliderParameters.sliderGrooveRadius ; + p->sliderHandleDefaultBrush = m_SliderParameters.sliderHandleDefaultBrush ; + p->sliderHandleHoverBrush = m_SliderParameters.sliderHandleHoverBrush ; + p->sliderHandleClickBrush = m_SliderParameters.sliderHandleClickBrush ; + p->sliderHandleDisableBrush = m_SliderParameters.sliderHandleDisableBrush ; + p->sliderGrooveValueDefaultBrush = m_SliderParameters.sliderGrooveValueDefaultBrush ; + p->sliderGrooveValueHoverBrush = m_SliderParameters.sliderGrooveValueHoverBrush ; + p->sliderGrooveValueDisableBrush = m_SliderParameters.sliderGrooveValueDisableBrush ; + p->sliderGrooveUnvalueDefaultBrush = m_SliderParameters.sliderGrooveUnvalueDefaultBrush; + p->sliderGrooveUnvalueHoverBrush = m_SliderParameters.sliderGrooveUnvalueHoverBrush ; + p->sliderGrooveUnvalueDisableBrush = m_SliderParameters.sliderGrooveUnvalueDisableBrush; + p->sliderHandleDefaultPen = m_SliderParameters.sliderHandleDefaultPen ; + p->sliderHandleHoverPen = m_SliderParameters.sliderHandleHoverPen ; + p->sliderHandleClickPen = m_SliderParameters.sliderHandleClickPen ; + p->sliderHandleDisablePen = m_SliderParameters.sliderHandleDisablePen ; + p->sliderGroovePen = m_SliderParameters.sliderGroovePen ; + p->focusPen = m_SliderParameters.focusPen ; +} + void UKUIConfigStyleParameters::initConfigProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) { - int radius = widget ? (widget->height() / 2 > m_radiusStruct.normalRadius ? m_radiusStruct.normalRadius : widget->height() / 2) : m_radiusStruct.normalRadius; + int normalRadius = (widget && widget->property("normalRadius").isValid()) ? + widget->property("normalRadius").toInt() : m_dtconfig->kradiusNormal(); + int radius = widget ? (widget->height() / 2 > normalRadius ? normalRadius : widget->height() / 2) : normalRadius; bool needTranslucent = false; if (widget && widget->property("needTranslucent").isValid()) { needTranslucent = widget->property("needTranslucent").toBool(); } - UKUIColorTheme::ProgressBarColorCfg progressColorCfg = readCfg()->progressBarColorCfg(option->palette, needTranslucent ? C_ProgressBar_Translucent : C_ProgressBar_Default); - QBrush contentBrush = progressColorCfg.contentBrush; - QBrush grooveDefaultBrush = progressColorCfg.grooveDefaultBrush; - QBrush grooveDisableBrush = progressColorCfg.grooveDisableBrush; - - QPen contentPen = QPen(progressColorCfg.contentPen , (progressColorCfg.contentPen.alpha() == 0 || progressColorCfg.contentPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen grooveDefaultPen = QPen(progressColorCfg.grooveDefaultPen , (progressColorCfg.grooveDefaultPen.alpha() == 0 || progressColorCfg.grooveDefaultPen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen grooveDisablePen = QPen(progressColorCfg.grooveDisablePen , (progressColorCfg.grooveDisablePen.alpha() == 0 || progressColorCfg.grooveDisablePen == Qt::NoPen) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QBrush contentBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightActive()); + QBrush grooveDefaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentNormal()); + QBrush grooveDisableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentDisable()); + + + QBrush contentPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->highLightActive()); + QBrush grooveDefaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentNormal()); + QBrush grooveDisablePenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentDisable()); + + QPen contentPen = QPen(contentPenBrush, (contentPenBrush.style() == Qt::NoBrush || contentPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen grooveDefaultPen = QPen(grooveDefaultPenBrush, (grooveDefaultPenBrush.style() == Qt::NoBrush || grooveDefaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen grooveDisablePen = QPen(grooveDisablePenBrush, (grooveDisablePenBrush.style() == Qt::NoBrush || grooveDisablePenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option); - const bool vertical = pb->orientation == Qt::Vertical; - const bool inverted = pb->invertedAppearance; + const bool vertical = pb ? pb->orientation == Qt::Vertical : false; + const bool inverted = pb ? pb->invertedAppearance : false; - bool reverse = (!vertical && (pb->direction == Qt::RightToLeft)) || vertical; + bool reverse = (!vertical && pb && (pb->direction == Qt::RightToLeft)) || vertical; if (inverted) reverse = !reverse; - QColor startColor = progressColorCfg.contentStartColor; - QColor endColor = progressColorCfg.contentEndColor; - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB:{ - //content - startColor = progressColorCfg.contentStartColor; - endColor= startColor.lighter(120); + //content + if (contentBrush.style() == Qt::LinearGradientPattern) { QLinearGradient linearGradient; - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); + linearGradient.setStops(contentBrush.gradient()->stops()); if (vertical) { if (reverse) { - linearGradient.setStart(pb->rect.bottomLeft()); - linearGradient.setFinalStop(pb->rect.topLeft()); + linearGradient.setStart(!pb ? QPoint(0, 0) : pb->rect.bottomLeft()); + linearGradient.setFinalStop(!pb ? QPoint(0, 0) : pb->rect.topLeft()); } else { - linearGradient.setStart(pb->rect.topLeft()); - linearGradient.setFinalStop(pb->rect.bottomLeft()); + linearGradient.setStart(!pb ? QPoint(0, 0) : pb->rect.topLeft()); + linearGradient.setFinalStop(!pb ? QPoint(0, 0) : pb->rect.bottomLeft()); } } else { if (reverse) { - linearGradient.setStart(pb->rect.topRight()); + linearGradient.setStart(!pb ? QPoint(0, 0) : pb->rect.topRight()); linearGradient.setFinalStop(pb->rect.topLeft()); } else { - linearGradient.setStart(pb->rect.topLeft()); - linearGradient.setFinalStop(pb->rect.topRight()); + linearGradient.setStart(!pb ? QPoint(0, 0) : pb->rect.topLeft()); + linearGradient.setFinalStop(!pb ? QPoint(0, 0) : pb->rect.topRight()); } } contentBrush = QBrush(linearGradient); } - break; - case AdjustColorRules::HSL: - //content - if(isDark) - contentBrush = QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), -1, 15, -14)); - - - endColor = contentBrush.color(); - startColor = contentBrush.color(); - contentPen = QPen(QColor(Qt::NoPen), 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if(isDark){ - grooveDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else - grooveDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //groove disable - grooveDisablePen = grooveDefaultPen; - - break; - default: - break; + + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("radius", radius); + w->setProperty("contentPen", contentPen); + w->setProperty("grooveDefaultPen", grooveDefaultPen); + w->setProperty("grooveDisablePen", grooveDisablePen); + w->setProperty("contentBrush", contentBrush); + w->setProperty("grooveDefaultBrush", grooveDefaultBrush); + w->setProperty("grooveDisableBrush", grooveDisableBrush); } if(widget){ @@ -3247,28 +2763,14 @@ if (widget->property("setGrooveDisableBrush").isValid() && widget->property("setGrooveDisableBrush").canConvert<QBrush>()) { grooveDisableBrush = widget->property("setGrooveDisableBrush").value<QBrush>(); } - if (widget->property("setContentHightColor").isValid() && widget->property("setContentHightColor").canConvert<QColor>()) { - startColor = widget->property("setContentHightColor").value<QColor>(); + if (widget->property("setGrooveDefaultPen").isValid() && widget->property("setGrooveDefaultPen").canConvert<QColor>()) { + grooveDefaultPen = widget->property("setGrooveDefaultPen").value<QPen>(); } - if (widget->property("setContentMidLightColor").isValid() && widget->property("setContentMidLightColor").canConvert<QColor>()) { - endColor = widget->property("setContentMidLightColor").value<QColor>(); + if (widget->property("setGrooveDisablePen").isValid() && widget->property("setGrooveDisablePen").canConvert<QColor>()) { + grooveDisablePen = widget->property("setGrooveDisablePen").value<QPen>(); } } - if(qApp->palette().color(QPalette::Active, QPalette::Button) != - option->palette.color(QPalette::Active, QPalette::Button)) - grooveDefaultBrush = pb->palette.brush(QPalette::Active, QPalette::Button); - if(needTranslucent && qApp->palette().color(QPalette::Active, QPalette::BrightText) != - option->palette.color(QPalette::Active, QPalette::BrightText)) - { - QColor grooveDefaultColor = pb->palette.color(QPalette::Active, QPalette::BrightText); - grooveDefaultColor.setAlphaF(0.10); - grooveDefaultBrush.setColor(grooveDefaultColor); - } - if(qApp->palette().color(QPalette::Disabled, QPalette::Button) != - option->palette.color(QPalette::Disabled, QPalette::Button)) - grooveDisableBrush = pb->palette.brush(QPalette::Disabled, QPalette::Button); - m_ProgressBarParameters.radius = radius; m_ProgressBarParameters.progressBarContentPen = contentPen; @@ -3278,8 +2780,18 @@ m_ProgressBarParameters.progressBarContentBrush = contentBrush; m_ProgressBarParameters.progressBarGrooveDefaultBrush = grooveDefaultBrush; m_ProgressBarParameters.progressBarGrooveDisableBrush = grooveDisableBrush; - m_ProgressBarParameters.progressBarContentHightColor = endColor; - m_ProgressBarParameters.progressBarContentMidLightColor = startColor; +} + +void UKUIConfigStyleParameters::getDefaultProgressBarParameters(ConfigProgressBarParameters *p, bool isDark) +{ + initConfigProgressBarParameters(isDark, nullptr, nullptr); + p->radius = m_ProgressBarParameters.radius ; + p->progressBarContentPen = m_ProgressBarParameters.progressBarContentPen ; + p->progressBarGrooveDefaultPen = m_ProgressBarParameters.progressBarGrooveDefaultPen ; + p->progressBarGrooveDisablePen = m_ProgressBarParameters.progressBarGrooveDisablePen ; + p->progressBarContentBrush = m_ProgressBarParameters.progressBarContentBrush ; + p->progressBarGrooveDefaultBrush = m_ProgressBarParameters.progressBarGrooveDefaultBrush ; + p->progressBarGrooveDisableBrush = m_ProgressBarParameters.progressBarGrooveDisableBrush ; } void UKUIConfigStyleParameters::initConfigScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) @@ -3289,24 +2801,20 @@ if (widget && widget->property("needTranslucent").isValid()) { needTranslucent = widget->property("needTranslucent").toBool(); } - UKUIColorTheme::ScrollBarColorCfg scrollBarColorCfg = readCfg()->scrollBarColorCfg(option->palette, needTranslucent ? C_ScrollBar_Translucent : C_ScrollBar_Default); - QBrush grooveDefaultBrush = scrollBarColorCfg.grooveDefaultBrush; - QBrush grooveInactiveBrush = scrollBarColorCfg.grooveInactiveBrush; - QBrush sliderDefaultBrush = scrollBarColorCfg.sliderDefaultBrush; - QBrush sliderHoverBrush = scrollBarColorCfg.sliderHoverBrush; - QBrush sliderClickBrush = scrollBarColorCfg.sliderClickBrush; - QBrush sliderDisableBrush = scrollBarColorCfg.sliderDisableBrush; - - if(widget->property("animation").isValid()) - m_ScrollBarParameters.animation = widget->property("animation").toBool(); - - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); + QBrush grooveDefaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainGeneralNormal()); + QBrush grooveInactiveBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainGeneralNormal()); + QBrush sliderDefaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kGray6()); + QBrush sliderHoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainHover()); + QBrush sliderClickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainClick()); + QBrush sliderDisableBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kGray3()); const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option); //radius - if(m_radiusStruct.normalRadius != 0){ + int normalRadius = (widget && widget->property("normalRadius").isValid()) ? + widget->property("normalRadius").toInt() : m_dtconfig->kradiusMin(); + if (bar && normalRadius != 0) { if (bar->orientation == Qt::Horizontal) { sliderRadius = (bar->rect.height()) / 4; } else { @@ -3315,81 +2823,35 @@ m_ScrollBarParameters.grooveWidthAnimation = true; ScrooBar_ShowLine = false; ScroolBar_LineLength = 0; - } - else{ - sliderRadius = m_radiusStruct.normalRadius; + } else { + int normalRadius = (widget && widget->property("normalRadius").isValid()) ? + widget->property("normalRadius").toInt() : m_dtconfig->kradiusNormal(); + sliderRadius = normalRadius; m_ScrollBarParameters.grooveWidthAnimation = false; ScrooBar_ShowLine = true; ScroolBar_LineLength = 16; } //slider hover - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB: - if(!needTranslucent){ - if(scrollBarColorCfg.sliderHoverType == Obj_Color_Type){ - //slider hover - if (isDark) { - sliderHoverBrush = QBrush(configMixColor(sliderDefaultBrush.color(), mix, 0.2)); - } else { - sliderHoverBrush = QBrush(configMixColor(sliderDefaultBrush.color(), mix, 0.05)); - } - - //slider click - if (isDark) { - sliderClickBrush = QBrush(configMixColor(sliderDefaultBrush.color(), mix, 0.05)); - } else { - sliderClickBrush = QBrush(configMixColor(sliderDefaultBrush.color(), mix, 0.2)); - } - } - else if(scrollBarColorCfg.sliderHoverType == Obj_Gradient_Type){ - if (bar->orientation == Qt::Horizontal) { - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - } else { - linearGradient.setStart(option->rect.topRight()); - linearGradient.setFinalStop(option->rect.topLeft()); - } - - QColor color = option->palette.color(QPalette::Active, QPalette::Button); - if (isDark) { - startColor = configMixColor(color, QColor(Qt::white), 0.2); - endColor = configMixColor(color, QColor(Qt::white), 0.05); - } else { - startColor = configMixColor(color, QColor(Qt::black), 0.05); - endColor = configMixColor(color, QColor(Qt::black), 0.2); - } - - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - sliderHoverBrush = QBrush(linearGradient); - sliderClickBrush = QBrush(configMixColor(sliderDefaultBrush.color(), mix, 0.2)); - } - } - break; - case HSL: - //slider hover - if (isDark) { - sliderHoverBrush = buttonDarkClick(isDark, option->palette); - } - - //slider click - if (isDark) { - sliderClickBrush = adjustL(option->palette.color(QPalette::Active, QPalette::Button), 13); - } else { - sliderClickBrush = adjustL(option->palette.color(QPalette::Active, QPalette::Button), -45); - } - - break; - default: - break; + if (m_dtconfig->kContainHover().style() == Qt::LinearGradientPattern && bar && bar->orientation == Qt::Vertical) { + QLinearGradient linearGradient; + linearGradient.setStart(!option ? QPoint(0,0) : option->rect.topRight()); + linearGradient.setFinalStop(!option ? QPoint(0,0) : option->rect.topLeft()); + linearGradient.setStops(m_dtconfig->kContainHover().gradient()->stops()); + sliderHoverBrush = QBrush(linearGradient); } - if(widget){ + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("radius", sliderRadius); + w->setProperty("grooveDefaultBrush", grooveDefaultBrush); + w->setProperty("grooveInactiveBrush", grooveInactiveBrush); + w->setProperty("sliderDefaultBrush", sliderDefaultBrush); + w->setProperty("sliderHoverBrush", sliderHoverBrush); + w->setProperty("sliderClickBrush", sliderClickBrush); + w->setProperty("sliderDisableBrush", sliderDisableBrush); + } + if (widget) { if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { radius = widget->property("setRadius").value<int>(); } @@ -3423,112 +2885,131 @@ m_ScrollBarParameters.scrollBarSliderDisableBrush = sliderDisableBrush; } +void UKUIConfigStyleParameters::getDefaultScrollBarParameters(ConfigScrollBarParameters *p, bool isDark) +{ + initConfigScrollBarParameters(isDark, nullptr, nullptr); + p->radius = m_ScrollBarParameters.radius ; + p->scrollBarGrooveDefaultBrush = m_ScrollBarParameters.scrollBarGrooveDefaultBrush ; + p->scrollBarGrooveInactiveBrush = m_ScrollBarParameters.scrollBarGrooveInactiveBrush; + p->scrollBarSliderDefaultBrush = m_ScrollBarParameters.scrollBarSliderDefaultBrush ; + p->scrollBarSliderHoverBrush = m_ScrollBarParameters.scrollBarSliderHoverBrush ; + p->scrollBarSliderClickBrush = m_ScrollBarParameters.scrollBarSliderClickBrush ; + p->scrollBarSliderDisableBrush = m_ScrollBarParameters.scrollBarSliderDisableBrush ; +} + void UKUIConfigStyleParameters::initConfigToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) { - UKUIColorTheme::ToolTipColorCfg tooltipColorCfg = readCfg()->toolTipColorCfg(option->palette, C_ToolTip_Default); - QBrush backgroundBrush = tooltipColorCfg.backgroundBrush; - QPen backgroundPen = QPen(tooltipColorCfg.backgroundPen, (tooltipColorCfg.backgroundPen.alpha() == 0 || tooltipColorCfg.backgroundPen == Qt::NoPen ) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen backgroundPen = QPen(parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineWindowActive()), + (parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineWindowActive()).color().alpha() == 0 || + parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineWindowActive()).color() == Qt::NoPen ) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); //background - backgroundBrush = option->palette.color(QPalette::Active, QPalette::ToolTipBase); + auto color = parseBrush(option ? option->rect : QRect(), m_dtconfig->baseActive()).color(); + if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { + auto opacity = UKUIStyleSettings::globalInstance()->get("menuTransparency").toInt()/100.0; + color.setAlphaF(opacity); + } + if (qApp->property("blurEnable").isValid()) { + bool blurEnable = qApp->property("blurEnable").toBool(); + if (!blurEnable) { + color.setAlphaF(1); + } + } + if (widget) { + if (widget->property("useSystemStyleBlur").isValid() && !widget->property("useSystemStyleBlur").toBool()) { + color.setAlphaF(1); + } + } + //if blur effect is not supported, do not use transparent color. + if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind) || blackAppListWithBlurHelper().contains(qAppName())) { + color.setAlphaF(1); + } + QBrush backgroundBrush = color; - int radius = m_radiusStruct.normalRadius; + int radius = (widget && widget->property("normalRadius").isValid()) ? + widget->property("normalRadius").toInt() : m_dtconfig->kradiusNormal(); - if(widget){ + auto settings = UKUIStyleSettings::globalInstance(); + if(settings && settings->keys().contains("windowRadius")) + radius = settings->get("windowRadius").toInt(); + + if (widget) { if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { radius = widget->property("setRadius").value<int>(); } if (widget->property("setBackgroundBrush").isValid() && widget->property("setBackgroundBrush").canConvert<QBrush>()) { backgroundBrush = widget->property("setBackgroundBrush").value<QBrush>(); } + if (widget->property("setBackgroundPen").isValid() && widget->property("setBackgroundPen").canConvert<QBrush>()) { + backgroundPen = widget->property("setBackgroundPen").value<QPen>(); + } } + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("radius", radius); + w->setProperty("backgroundBrush", backgroundBrush); + w->setProperty("backgroundPen", backgroundPen); + } m_ToolTipParameters.radius = radius; m_ToolTipParameters.toolTipBackgroundBrush = backgroundBrush; m_ToolTipParameters.toolTipBackgroundPen = backgroundPen; } +void UKUIConfigStyleParameters::getDefaultToolTipParameters(ConfigToolTipParameters *p, bool isDark) +{ + initConfigToolTipParameters(isDark, nullptr, nullptr); + p->radius = m_ToolTipParameters.radius ; + p->toolTipBackgroundBrush = m_ToolTipParameters.toolTipBackgroundBrush; + p->toolTipBackgroundPen = m_ToolTipParameters.toolTipBackgroundPen ; +} + void UKUIConfigStyleParameters::initConfigTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) { - int tabradius = m_radiusStruct.normalRadius; - UKUIColorTheme::TabWidgetColorCfg tabWidgetColorCfg = readCfg()->tabWidgetColorCfg(option->palette, C_TabWidget_Default); + int tabradius = (widget && widget->property("normalRadius").isValid()) ? + widget->property("normalRadius").toInt() : m_dtconfig->kradiusNormal(); - QBrush widgetBackgroundBrush = tabWidgetColorCfg.widgetBackgroundBrush; - QBrush tabBarBackgroundBrush = tabWidgetColorCfg.tabBarBackgroundBrush; - QBrush tabBarDefaultBrush = tabWidgetColorCfg.tabBarDefaultBrush; - QBrush tabBarHoverBrush = tabWidgetColorCfg.tabBarHoverBrush; - QBrush tabBarSelectBrush = tabWidgetColorCfg.tabBarSelectBrush; - QBrush tabBarClickBrush = tabWidgetColorCfg.tabBarClickBrush; -// QPen tabBarHoverPen = QPen(tabWidgetColorCfg.tabBarHoverPen, (tabWidgetColorCfg.tabBarHoverPen == Qt::NoPen || tabWidgetColorCfg.tabBarHoverPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); -// QPen tabBarClickPen = QPen(tabWidgetColorCfg.tabBarClickPen, (tabWidgetColorCfg.tabBarClickPen == Qt::NoPen || tabWidgetColorCfg.tabBarClickPen.alpha() == 0) ? 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QPen tabBarPen = QPen(QColor(Qt::NoPen), 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - - switch (m_adjustColorRules) { - case AdjustColorRules::DefaultRGB: - if(tabWidgetColorCfg.tabBarHoverType == Obj_Color_Type){ - //tabbar hover - QColor hover_color = option->palette.color(QPalette::Active, QPalette::Window); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - tabBarHoverBrush = QBrush(configMixColor(hover_color, mix, 0.1)); - } - else if(tabWidgetColorCfg.tabBarHoverType == Obj_Gradient_Type){ - //tabbar hover - QColor hover_color = option->palette.color(QPalette::Active, QPalette::Window); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - if (isDark) { - startColor = configMixColor(hover_color, mix, 0.1); - endColor = configMixColor(hover_color, mix, 0.05); - } else { - startColor = configMixColor(hover_color, mix, 0.05); - endColor = configMixColor(hover_color, mix, 0.1); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - tabBarHoverBrush = QBrush(linearGradient); - } - break; - case AdjustColorRules::HSL:{ - bool selected = option->state & QStyle::State_Selected; - bool hover = option->state & QStyle::State_MouseOver; - bool click = option->state & (QStyle::State_On | QStyle::State_Sunken); - - if (isDark) { - tabBarHoverBrush = highlightHover(isDark, option->palette); - tabBarClickBrush = highlightClick(isDark, option->palette); - if(click){ - tabBarPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else if(hover && !selected){ - tabBarPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - }else { - tabBarHoverBrush = highlightHover(isDark, option->palette); - tabBarClickBrush = highlightClick(isDark, option->palette); - - if(click){ - tabBarPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 1, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else if(hover && !selected){ - tabBarPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - } + QBrush widgetBackgroundBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->baseActive()); + QBrush tabBarBackgroundBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainGeneralNormal()); + QBrush tabBarDefaultBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainGeneralNormal()); + QBrush tabBarHoverBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainHover()); + QBrush tabBarSelectBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainGeneralNormal()); + QBrush tabBarClickBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kContainClick()); + + QBrush tabBarHoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentHover()); + QBrush tabBarClickPenPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentClick()); + QBrush tabBarDefaultPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentNormal()); + QBrush tabBarFocusPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kBrandFocus()); + + QPen tabBarHoverPen = QPen(tabBarHoverPenBrush, (tabBarHoverPenBrush.style() == Qt::NoBrush || tabBarHoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen tabBarClickPen = QPen(tabBarClickPenPenBrush, (tabBarClickPenPenBrush.style() == Qt::NoBrush || tabBarClickPenPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen tabBarDefaultPen = QPen(tabBarDefaultPenBrush, (tabBarDefaultPenBrush.style() == Qt::NoBrush || tabBarDefaultPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen tabBarFocusPen = QPen(tabBarFocusPenBrush, (tabBarFocusPenBrush.style() == Qt::NoBrush || tabBarFocusPenBrush.color().alpha() == 0) ? 0 : 2, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + +// if((option->state & QStyle::State_HasFocus) && (option->state & QStyle::State_Enabled)){ +// tabBarPen = tabBarFocusPen; +// } + + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("radius", tabradius); + w->setProperty("widgetBackgroundBrush", widgetBackgroundBrush); + w->setProperty("tabBarBackgroundBrush", tabBarBackgroundBrush); + w->setProperty("tabBarDefaultBrush", tabBarDefaultBrush); + w->setProperty("tabBarHoverBrush", tabBarHoverBrush); + w->setProperty("tabBarClickBrush", tabBarClickBrush); + w->setProperty("tabBarSelectBrush", tabBarSelectBrush); + w->setProperty("tabBarDefaultPen", tabBarDefaultPen); + w->setProperty("tabBarFocusPen", tabBarFocusPen); + w->setProperty("tabBarClickPen", tabBarClickPen); + w->setProperty("tabBarHoverPen", tabBarHoverPen); } - break; - default: - break; - } - - if(widget){ + if (widget) { if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { tabradius = widget->property("setRadius").value<int>(); } @@ -3550,68 +3031,148 @@ if (widget->property("setTabBarSelectBrush").isValid() && widget->property("setTabBarSelectBrush").canConvert<QBrush>()) { tabBarSelectBrush = widget->property("setTabBarSelectBrush").value<QBrush>(); } + if (widget->property("setTabBarDefaultPen").isValid() && widget->property("setTabBarDefaultPen").canConvert<QPen>()) { + tabBarDefaultPen = widget->property("setTabBarDefaultPen").value<QPen>(); + } + if (widget->property("setTabBarFocusPen").isValid() && widget->property("setTabBarFocusPen").canConvert<QPen>()) { + tabBarFocusPen = widget->property("setTabBarFocusPen").value<QPen>(); + } + if (widget->property("setTabBarClickPen").isValid() && widget->property("setTabBarClickPen").canConvert<QPen>()) { + tabBarFocusPen = widget->property("setTabBarClickPen").value<QPen>(); + } + if (widget->property("setTabBarHoverPen").isValid() && widget->property("setTabBarHoverPen").canConvert<QPen>()) { + tabBarFocusPen = widget->property("setTabBarHoverPen").value<QPen>(); + } } m_TabWidgetParameters.radius = tabradius; m_TabWidgetParameters.tabWidgetBackgroundBrush = widgetBackgroundBrush; - m_TabWidgetParameters.tabBarBackgroundBrush = tabBarBackgroundBrush; + m_TabWidgetParameters.tabBarBackgroundBrush = QBrush(QColor(255,0,0)); m_TabWidgetParameters.tabBarDefaultBrush = tabBarDefaultBrush; m_TabWidgetParameters.tabBarHoverBrush = tabBarHoverBrush; m_TabWidgetParameters.tabBarClickBrush = tabBarClickBrush; m_TabWidgetParameters.tabBarSelectBrush = tabBarSelectBrush; - m_TabWidgetParameters.tabBarPen = tabBarPen; + m_TabWidgetParameters.tabBarDefaultPen = tabBarDefaultPen; + m_TabWidgetParameters.tabBarHoverPen = tabBarHoverPen; + m_TabWidgetParameters.tabBarClickPen = tabBarClickPen; + m_TabWidgetParameters.tabBarFocusPen = tabBarFocusPen; +} + +void UKUIConfigStyleParameters::getDefaultTabWidgetParameters(ConfigTabWidgetParameters *p, bool isDark) +{ + initConfigTabWidgetParameters(isDark, nullptr, nullptr); + + p->radius = m_TabWidgetParameters.radius ; + p->tabWidgetBackgroundBrush = m_TabWidgetParameters.tabWidgetBackgroundBrush; + p->tabBarBackgroundBrush = m_TabWidgetParameters.tabBarBackgroundBrush ; + p->tabBarDefaultBrush = m_TabWidgetParameters.tabBarDefaultBrush ; + p->tabBarHoverBrush = m_TabWidgetParameters.tabBarHoverBrush ; + p->tabBarClickBrush = m_TabWidgetParameters.tabBarClickBrush ; + p->tabBarSelectBrush = m_TabWidgetParameters.tabBarSelectBrush ; + p->tabBarDefaultPen = m_TabWidgetParameters.tabBarDefaultPen ; + p->tabBarHoverPen = m_TabWidgetParameters.tabBarHoverPen ; + p->tabBarClickPen = m_TabWidgetParameters.tabBarClickPen ; + p->tabBarFocusPen = m_TabWidgetParameters.tabBarFocusPen ; } void UKUIConfigStyleParameters::initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) { - int frameradius = m_radiusStruct.maxRadius; - int itemradius = m_radiusStruct.normalRadius; - QPixmap framePixmap(option->rect.size()); - UKUIColorTheme::MenuColorCfg menuColorCfg = readCfg()->menuColorCfg(C_Menu_Default); - - QBrush menuBackgroundBrush = menuColorCfg.menuBackgroundBrush; - QPen menuBackgroundPen = QPen(menuColorCfg.menuBackgroundPen, (menuColorCfg.menuBackgroundPen.alpha() == 0 || menuColorCfg.menuBackgroundPen == Qt::NoPen ) ? - 0 : 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - QBrush itemSelectBrush = menuColorCfg.menuItemSelectBrush; - QPen menuHoverPen = menuColorCfg.menuTextHoverPen; - - //item select brush - switch (m_adjustColorRules) { - case HSL: - if(isDark) - itemSelectBrush = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 3, 23, -11); - else{ - itemSelectBrush = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -17, -6); - } - break; - default: - break; - } + int frameradius = (widget && widget->property("maxRadius").isValid()) ? + widget->property("maxRadius").toInt() : m_dtconfig->kradiusMenu(); + auto settings = UKUIStyleSettings::globalInstance(); + if(settings && settings->keys().contains("windowRadius")) + frameradius = settings->get("windowRadius").toInt(); - if(widget){ + int itemradius = (widget && widget->property("normalRadius").isValid()) ? + widget->property("normalRadius").toInt() : m_dtconfig->kradiusNormal(); + QBrush itemSelectBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kComponentClick()); + + QBrush menuBackgroundPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineWindowActive()); + QBrush menuHoverPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kFontPrimary()); + QBrush menuItemFocusPenBrush = parseBrush(option ? option->rect : QRect(), m_dtconfig->kLineComponentClick()); + + QPen menuBackgroundPen = QPen(menuBackgroundPenBrush, (menuBackgroundPenBrush.style() == Qt::NoBrush || menuBackgroundPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen menuHoverPen = QPen(menuHoverPenBrush, (menuHoverPenBrush.style() == Qt::NoBrush || menuHoverPenBrush.color().alpha() == 0) ? 0 : 1, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + QPen menuItemFocusPen = QPen(menuItemFocusPenBrush, (menuItemFocusPenBrush.style() == Qt::NoBrush || menuItemFocusPenBrush.color().alpha() == 0) ? 0 : 2, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + + auto color = parseBrush(option ? option->rect : QRect(), m_dtconfig->baseActive()).color(); + if (widget && !widget->inherits("QComboBoxPrivateContainer") && UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { + auto opacity = UKUIStyleSettings::globalInstance()->get("menuTransparency").toInt()/100.0; + color.setAlphaF(opacity); + } + if (qApp->property("blurEnable").isValid()) { + bool blurEnable = qApp->property("blurEnable").toBool(); + if (!blurEnable) { + color.setAlphaF(1); + } + } + if (widget) { + if (widget->property("useSystemStyleBlur").isValid() && !widget->property("useSystemStyleBlur").toBool()) { + color.setAlphaF(1); + } + } + //if blur effect is not supported, do not use transparent color. + if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind) || blackAppListWithBlurHelper().contains(qAppName())) { + color.setAlphaF(1); + } + QBrush menuBackgroundBrush = color; + + auto *w = const_cast<QWidget *>(widget); + if (w) { + w->setProperty("frameradius", frameradius); + w->setProperty("itemradius", itemradius); + w->setProperty("menuBackgroundBrush", menuBackgroundBrush); + w->setProperty("menuBackgroundPen", menuBackgroundPen); + w->setProperty("itemSelectBrush", itemSelectBrush); + w->setProperty("menuHoverPen", menuHoverPen); + w->setProperty("itemFocusPen", menuItemFocusPen); + } + + if (widget) { if (widget->property("setFrameRadius").isValid() && widget->property("setFrameRadius").canConvert<int>()) { frameradius = widget->property("setFrameRadius").value<int>(); } if (widget->property("setItemRadius").isValid() && widget->property("setItemRadius").canConvert<int>()) { itemradius = widget->property("setItemRadius").value<int>(); } - if (widget->property("setFramePixmap").isValid() && widget->property("setFramePixmap").canConvert<QPixmap>()) { - framePixmap = widget->property("setFramePixmap").value<QPixmap>(); - } if (widget->property("setItemSelectBrush").isValid() && widget->property("setItemSelectBrush").canConvert<QBrush>()) { itemSelectBrush = widget->property("setItemSelectBrush").value<QBrush>(); } if (widget->property("setTextHoverPen").isValid() && widget->property("setTextHoverPen").canConvert<QPen>()) { menuHoverPen = widget->property("setTextHoverPen").value<QPen>(); } + if (widget->property("setMenuBackgroundBrush").isValid() && widget->property("setMenuBackgroundBrush").canConvert<QBrush>()) { + menuBackgroundBrush = widget->property("setMenuBackgroundBrush").value<QBrush>(); + } + if (widget->property("setMenuBackgroundPen").isValid() && widget->property("setMenuBackgroundPen").canConvert<QPen>()) { + menuBackgroundPen = widget->property("setMenuBackgroundPen").value<QPen>(); + } + if (widget->property("setItemFocusPen").isValid() && widget->property("setItemFocusPen").canConvert<QPen>()) { + menuItemFocusPen = widget->property("setItemFocusPen").value<QPen>(); + } } m_MenuParameters.frameRadius = frameradius; m_MenuParameters.itemRadius = itemradius; - m_MenuParameters.menuFramePixmap = framePixmap; m_MenuParameters.menuBackgroundBrush = menuBackgroundBrush; m_MenuParameters.menuBackgroundPen = menuBackgroundPen; m_MenuParameters.menuItemSelectBrush = itemSelectBrush; + m_MenuParameters.menuItemFocusPen = menuItemFocusPen; m_MenuParameters.menuTextHoverPen = menuHoverPen; } + +void UKUIConfigStyleParameters::getDefaultMenuParameters(ConfigMenuParameters *p, bool isDark) +{ + initConfigTabWidgetParameters(isDark, nullptr, nullptr); + p->frameRadius = m_MenuParameters.frameRadius ; + p->itemRadius = m_MenuParameters.itemRadius ; + p->menuBackgroundBrush = m_MenuParameters.menuBackgroundBrush; + p->menuBackgroundPen = m_MenuParameters.menuBackgroundPen ; + p->menuItemSelectBrush = m_MenuParameters.menuItemSelectBrush; + p->menuItemFocusPen = m_MenuParameters.menuItemFocusPen ; + p->menuTextHoverPen = m_MenuParameters.menuTextHoverPen ; +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/ukui-config-style-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Lei Chen <leichen@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -45,6 +45,7 @@ #include "widget-parameters/config-menu-parameters.h" #include "../readconfig.h" +using namespace UKUIGlobalDTConfig; namespace UKUIConfigStyleSpace { class UKUIConfigStyleParameters: public QObject @@ -52,6 +53,7 @@ Q_OBJECT public: UKUIConfigStyleParameters(QObject *parent, bool isDark, QString cfgName = ""); + ~UKUIConfigStyleParameters(); enum SpinBoxControlLayout { Horizontal, @@ -59,71 +61,74 @@ }; Q_ENUM(SpinBoxControlLayout) - enum TabBarIndicatorLayout { - TabBarIndicator_Horizontal, - TabBarIndicator_Vertical - }; - Q_ENUM(TabBarIndicatorLayout) - - enum AdjustColorRules { - DefaultRGB, - HSL - }; - Q_ENUM(AdjustColorRules) - void updateParameters(bool isTabletMode); QPalette setPalette(QPalette &palette); int getSpinBoxControlLayout(); - - int getTabBarIndicatorLayout(); - void setTabBarIndicatorLayout(TabBarIndicatorLayout layout); - - void setUKUIThemeColor(QString themeColor); + void setUKUIThemeColor(QPalette p, QString themeColor); QString themeColor(); - bool isDefaultThemeColor(); - - void initialDefaultPaletteColor(QString colorPath, bool isDark); - virtual void initPalette(bool isDark); - virtual void initRadiusCfg(); + virtual void initPalette(); //pushbutton virtual void initConfigPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); + virtual void getDefaultConfigPushButtonBevelParameters(ConfigPushButtonParameters *p, bool isDark); + virtual void initConfigPushButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); + virtual void getDefaultConfigPushButtonLabelParameters(ConfigPushButtonParameters *p, bool isDark); //toolbutton virtual void initConfigToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); + virtual void getDefaultConfigToolButtonPanelParameters(ConfigToolButtonParameters *p, bool isDark); + virtual void initConfigToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget); + virtual void getDefaultConfigToolButtonLabelParameters(ConfigToolButtonParameters *p, bool isDark); virtual void initConfigLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget); + virtual void getDefaultConfigLineEditParameters(ConfigLineEditParameters *p, bool isDark); virtual void initConfigSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false); + virtual void getDefaultConfigSpinBoxParameters(ConfigSpinBoxParameters *p, bool isDark); virtual void initConfigComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget); + virtual void getDefaultConfigComboBoxParameters(ConfigComboBoxParameters *p, bool isDark); - virtual void initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - - virtual void initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget); - - virtual void initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget); + virtual void initConfigListParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool highlightmode = false); + virtual void getDefaultConfigListParameters(ConfigListParameters *p, bool isDark); + virtual void getHighlightModeConfigListParameters(ConfigListParameters *p, bool isDark); + + virtual void initConfigTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool highlightmode = false); + virtual void getDefaultConfigTreeParameters(ConfigTreeParameters *p, bool isDark); + virtual void getHighlightModeConfigTreeParameters(ConfigTreeParameters *p, bool isDark); + + virtual void initConfigTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool highlightmode = false); + virtual void getDefaultConfigTableParameters(ConfigTableParameters *p, bool isDark); + virtual void getHighlightModeConfigTableParameters(ConfigTableParameters *p, bool isDark); virtual void initConfigCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget); + virtual void getDefaultConfigCheckBoxParameters(ConfigCheckBoxParameters *p, bool isDark); virtual void initConfigRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget); + virtual void getDefaultConfigRadioButtonParameters(ConfigRadioButtonParameters *p, bool isDark); virtual void initConfigSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget); + virtual void getDefaultSliderParameters(ConfigSliderParameters *p, bool isDark); virtual void initConfigProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget); + virtual void getDefaultProgressBarParameters(ConfigProgressBarParameters *p, bool isDark); virtual void initConfigScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget); + virtual void getDefaultScrollBarParameters(ConfigScrollBarParameters *p, bool isDark); virtual void initConfigToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget); + virtual void getDefaultToolTipParameters(ConfigToolTipParameters *p, bool isDark); virtual void initConfigTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget); + virtual void getDefaultTabWidgetParameters(ConfigTabWidgetParameters *p, bool isDark); virtual void initConfigMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget); + virtual void getDefaultMenuParameters(ConfigMenuParameters *p, bool isDark); virtual QColor lanhuHSLToQtHsl(int h, int s, int l, int a = 255); virtual QColor adjustColor(const QColor c, int hRange = 0, int sRange = 0, int lRange = 0, int aRange = 0); @@ -138,15 +143,13 @@ QPen &clickPen, QBrush &clickBrush, QPen &disablePen, QBrush &disableBrush); void setCfgName(QString cfgName); QString cfgName(); - ReadThemeConfig* readCfg(); + UKUIGlobalDTConfig::GlobalDTConfig *readCfg(); - UKUIRadiusInformation::UKUIRadiusStruct radiusProperty(); - - int getAdjustColorRules(); - - bool colorIsSame(QColor oldColor, QColor newColor); + QBrush parseBrush(QRect rect, QBrush dtBrush); public: + UKUIGlobalDTConfig::GlobalDTConfig *m_dtconfig; + ConfigPushButtonParameters m_PushButtonParameters; ConfigToolButtonParameters m_ToolButtonParameters; ConfigLineEditParameters m_LineEditParameters; @@ -230,6 +233,8 @@ // slider int Slider_DefaultLength = 94; int Slider_DefaultLength_origin = 94; + int Slider_DefaultWidth = 34; + int Slider_DefaultWidth_origin = 34; int Slider_Length = 20; int Slider_Length_origin = 20; int Slider_Thickness = 20; @@ -284,7 +289,7 @@ bool TabBar_SplitLine = true; // tooltip - int ToolTip_DefaultMargin = 8; + int ToolTip_DefaultMargin = 10; int ToolTip_Height = 36; int ToolTip_Height_origin = 36; @@ -317,12 +322,10 @@ private: int m_spinBoxControlLayout = SpinBoxControlLayout::Vertical; - int m_tabBarIndicatorLayout = TabBarIndicatorLayout::TabBarIndicator_Horizontal; - int m_adjustColorRules = AdjustColorRules::DefaultRGB; - QString m_cfgName; - ReadThemeConfig *m_readCfg = nullptr; + QString m_styleName = "ukui-light"; + QString m_widgetThemeName = "default"; QString m_themeColor = "default"; - UKUIRadiusInformation::UKUIRadiusStruct m_radiusStruct; + QPalette m_default_palette; }; } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/ukui-config-style.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ -/* +/* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -24,9 +24,10 @@ #include "config-style-helper.h" -#include "ukui-style-settings.h" -#include "ukui-tabwidget-default-slide-animator.h" +#include "settings/ukui-style-settings.h" +#include "animations/tabwidget/ukui-tabwidget-default-slide-animator.h" +#include <QSharedPointer> #include <QStyleOption> #include <QWidget> #include <QPainter> @@ -49,17 +50,17 @@ #include "animations/config-tree-animation-helper.h" #include "config-shadow-helper.h" -#include "blur-helper.h" -#include "gesture-helper.h" -#include "window-manager.h" -#include "application-style-settings.h" - -#include "ukui-style-settings.h" - -#include "highlight-effect.h" +#include "../blur-helper.h" +#include "../gesture-helper.h" +#include "../window-manager.h" +#include "../platformthemedebug.h" +#include "settings/application-style-settings.h" +#include "settings/ukui-style-settings.h" +#include "effects/highlight-effect.h" +#include "../readconfig.h" #include "ukui-config-style-parameters.h" -#include "black-list.h" +#include "settings/black-list.h" #include <QIcon> @@ -81,6 +82,7 @@ #include <QTreeWidget> #include <QListWidget> #include <QHeaderView> +#include <QTextEdit> #include <QEvent> #include <QDebug> #include <QPixmapCache> @@ -95,6 +97,7 @@ #include <QCheckBox> #include <KWindowEffects> #include <KWindowSystem> +#include <QtConcurrent/QtConcurrent> #include <private/qlineedit_p.h> @@ -111,6 +114,8 @@ using namespace UKUIConfigStyleSpace; +const char* GESTURE_LIB = "libqt5-gesture-extensions.so.1"; + #define DBUS_STATUS_MANAGER_IF "com.kylin.statusmanager.interface" #define COMMERCIAL_VERSION true @@ -162,27 +167,27 @@ m_window_manager = new WindowManager(this); - m_app_style_settings = ApplicationStyleSettings::getInstance(); - if (m_app_style_settings) { - connect(m_app_style_settings, &ApplicationStyleSettings::colorStretageChanged, [=](const ApplicationStyleSettings::ColorStretagy &stretagy) { - ////todo implemet palette switch. - switch (stretagy) { - case ApplicationStyleSettings::System: { - break; - } - case ApplicationStyleSettings::Bright: { - break; - } - case ApplicationStyleSettings::Dark: { - break; - } - default: - break; - } - }); - } else { - qWarning("org.ukui.style is null!"); - } +// m_app_style_settings = ApplicationStyleSettings::getInstance(); +// if (m_app_style_settings) { +// connect(m_app_style_settings, &ApplicationStyleSettings::colorStretageChanged, [=](const ApplicationStyleSettings::ColorStretagy &stretagy) { +// ////todo implemet palette switch. +// switch (stretagy) { +// case ApplicationStyleSettings::System: { +// break; +// } +// case ApplicationStyleSettings::Bright: { +// break; +// } +// case ApplicationStyleSettings::Dark: { +// break; +// } +// default: +// break; +// } +// }); +// } else { +// qWarning("org.ukui.style is null!"); +// } if (QGSettings::isSchemaInstalled("org.ukui.peripherals-mouse")) { QGSettings *settings = new QGSettings("org.ukui.peripherals-mouse"); @@ -202,8 +207,8 @@ } else { qWarning("org.ukui.peripherals-mouse no doubleClick keys!"); } - settings->deleteLater(); - settings = nullptr; +// settings->deleteLater(); +// settings = nullptr; } else { qWarning("org.ukui.peripherals-mouse is null!"); } @@ -260,22 +265,10 @@ } } - if (m_widget_theme == "default") { - sp = new UKUIConfigStyleParameters(this, isUseDarkPalette(), "UKUIConfigDefault"); - } else if (m_widget_theme == "fashion"){ - sp = new UKUIConfigStyleParameters(this, isUseDarkPalette(), "UKUIConfigFashion"); - }else if (m_widget_theme == "classical"){ - sp = new UKUIConfigStyleParameters(this, isUseDarkPalette(), "UKUIConfigClassical"); - }else if (m_widget_theme != ""){ - sp = new UKUIConfigStyleParameters(this, isUseDarkPalette(), m_widget_theme); - } - else { - sp = new UKUIConfigStyleParameters(this, isUseDarkPalette(), "UKUIConfigDefault"); - } - - setProperty("maxRadius", sp->radiusProperty().maxRadius); - setProperty("normalRadius", sp->radiusProperty().normalRadius); - setProperty("minRadius", sp->radiusProperty().minRadius); + if(m_widget_theme == "") + m_widget_theme == "default"; + + sp = new UKUIConfigStyleParameters(this, isUseDarkPalette(), m_widget_theme); } UKUIConfigStyle::~UKUIConfigStyle() @@ -327,10 +320,10 @@ { bool should = false; - if (w->inherits("QComboBoxPrivateContainer")) + if (w && w->inherits("QComboBoxPrivateContainer")) return true; - if (w->inherits("QTipLabel")) { + if (w && w->inherits("QTipLabel")) { return true; } @@ -370,6 +363,7 @@ // } // return false; // } + if (obj != nullptr && obj->inherits("QTipLabel")) { auto label = qobject_cast<QLabel *>(obj); @@ -386,11 +380,13 @@ } } } - if(e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick){ + auto mousePressEvent = static_cast<QMouseEvent*>(e); + + if((e->type() ==QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) && (proxy()->styleHint(QStyle::SH_Slider_AbsoluteSetButtons) == mousePressEvent->button() || + proxy()->styleHint(QStyle::SH_Slider_PageSetButtons) == mousePressEvent->button())){ + aSliderDebug << "e->type:" << e->type() << mousePressEvent->button(); if(obj->property("animation").isValid() && !obj->property("animation").toBool()) return false; - if(!sp->m_SliderParameters.animation) - return false; auto *slider = qobject_cast<QSlider *>(obj); if(slider == nullptr || !slider->isEnabled()) @@ -402,17 +398,11 @@ const bool horizontal = slider->orientation() == Qt::Horizontal; -// qDebug() << "MouseButtonPress............"; - auto mousePressEvent = static_cast<QMouseEvent*>(e); -// if(mousePressEvent) -// qDebug() << "mousepressevent....." << mousePressEvent->pos() << mousePressEvent->localPos() << slider->geometry(); - - QStyleOptionSlider *opt = new QStyleOptionSlider(); - opt->init(slider); -// qDebug() << "pppppppp;;;;;;;;;:" << subControlRect(CC_Slider, opt, SC_SliderHandle, slider); - - QRect handleRect = sliderHandleRec(); + aSliderDebug << "MouseButtonPress............"; + QRect handleRect = sliderHandleRec(slider); if(horizontal){ + aSliderDebug << "mousepressevent1111 pos...." << mousePressEvent->pos().x() << handleRect.x(); + if(mousePressEvent->pos().x() <= handleRect.x()){ animator->setExtraProperty("addValue", false); @@ -424,6 +414,7 @@ return false; } else{ + aSliderDebug << "mousepressevent1111 pos...." << mousePressEvent->pos().y() << handleRect.y(); if(mousePressEvent->pos().y() <= handleRect.y()){ animator->setExtraProperty("addValue", true); @@ -440,71 +431,115 @@ if(startPosition <= slider->maximum() && startPosition >= slider->minimum()){ if(animator->value("move_position") != 1.0){ if(animator->getExtraProperty("addValue").isValid()){ -// qDebug() << "pagestep..." << slider->pageStep() << animator->getExtraProperty("addValue").toBool(); + aSliderDebug << "pagestep..." << slider->pageStep() << animator->getExtraProperty("addValue").toBool(); int step = (animator->getExtraProperty("addValue").toBool() ? 1 : -1) * slider->pageStep(); -// qDebug() << "step............" << step; + aSliderDebug << "step............" << step; + bool absoluteButton = proxy()->styleHint(QStyle::SH_Slider_AbsoluteSetButtons) == mousePressEvent->button(); + if(absoluteButton) + { + QStyleOptionSlider *opt = new QStyleOptionSlider(); + opt->init(slider); + + QRect gr = proxy()->subControlRect(QStyle::CC_Slider, opt, QStyle::SC_SliderGroove, slider); + QRect sr = proxy()->subControlRect(QStyle::CC_Slider, opt, QStyle::SC_SliderHandle, slider); + int sliderMin, sliderMax, sliderLength; + QPoint center = sr.center() - sr.topLeft(); + int pos; + + if (slider->orientation() == Qt::Horizontal) { + sliderLength = sr.width(); + sliderMin = gr.x(); + sliderMax = gr.right() - sliderLength + 1; + pos = (mousePressEvent->pos() - center).x(); + aSliderDebug << "Horizontal pos....:" << mousePressEvent->pos() << center << pos; + } else { + sliderLength = sr.height(); + sliderMin = gr.y(); + sliderMax = gr.bottom() - sliderLength + 1; + pos = (mousePressEvent->pos() - center).y(); + aSliderDebug << "vertical pos....:" << mousePressEvent->pos() << center << pos; + } + aSliderDebug << "minumum..." << slider->minimum() << slider->maximum() << sliderMin << sliderMax << pos << opt->upsideDown; + bool upsideDown = (slider->orientation() == Qt::Horizontal) ? + (slider->invertedAppearance() != (slider->layoutDirection() == Qt::RightToLeft)) + : (!slider->invertedAppearance()); + int sliderValue = sliderValueFromPosition(slider->minimum(), slider->maximum(), pos - sliderMin, sliderMax - sliderMin, upsideDown);//opt->upsideDown); + aSliderDebug << "sliderValue....." << sliderValue << slider->value(); + step = sliderValue - slider->value(); + aSliderDebug << "step0000...." << step; + aSliderDebug << "addValue........." << animator->getExtraProperty("addValue"); + } animator->startAnimator("move_position"); - int endPos = (startPosition + step) - (startPosition + step)%step; + int endPos = (startPosition + step) - (absoluteButton ? 0 : (startPosition + step)%step); + aSliderDebug << "endPos0000....." << endPos; if(!animator->getExtraProperty("addValue").toBool()) - endPos = (startPosition + step) + (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0); -// qDebug() << "endPos1111....." << endPos; + endPos = (startPosition + step) + (absoluteButton ? 0 : (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0)); + aSliderDebug << "endPos1111....." << endPos; if(animator->getExtraProperty("addValue").toBool()) endPos = qMin(endPos, slider->maximum()); else endPos = qMax(endPos, slider->minimum()); -// qDebug() << "endPos....." << endPos; + aSliderDebug << "endPos....." << endPos; animator->setExtraProperty("end_position", endPos); animator->setExtraProperty("start_position", startPosition); // qApp->sendEvent(slider, e); + slider->setFocus(); return true; } } } } - else + else{ + slider->setFocus(); return true; + } return false; } } if(qobject_cast<QScrollBar*>(obj)){ - if(e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick){ - if(!sp->m_ScrollBarParameters.animation) - return false; + auto mousePressEvent = static_cast<QMouseEvent*>(e); + auto *scrollbar = qobject_cast<QScrollBar *>(obj); + if(scrollbar == nullptr || !scrollbar->isEnabled()) + return false; + + bool midButtonAbsPos = proxy()->styleHint(QStyle::SH_ScrollBar_MiddleClickAbsolutePosition, 0, scrollbar); +// if(mousePressEvent->button() != Qt::LeftButton) +// return false; + if ((e->type() != QEvent::MouseButtonPress && e->type() != QEvent::MouseButtonDblClick) + || (!(mousePressEvent->button() == Qt::LeftButton || (midButtonAbsPos && mousePressEvent->button() == Qt::MidButton)))) + return false; - auto *scrollbar = qobject_cast<QScrollBar *>(obj); - if(scrollbar == nullptr || !scrollbar->isEnabled()) + if(obj->property("animation").isValid() && !obj->property("animation").toBool()) return false; auto animator = m_scrollbar_animation_helper->animator(scrollbar); if(!animator) return false; - + aScrollBarDebug << "event..." << e->type() << mousePressEvent->button(); const bool horizontal = scrollbar->orientation() == Qt::Horizontal; - auto mousePressEvent = static_cast<QMouseEvent*>(e); + QRect handleRect = scrollbarSliderRec(scrollbar); if(horizontal){ - if(mousePressEvent->pos().x() <= scrollbarSliderRec().x()){ - animator->setExtraProperty("addValue", false); - + if(mousePressEvent->pos().x() <= handleRect.x()){ + animator->setExtraProperty("addValue", /*scrollbar->layoutDirection() == Qt::RightToLeft ? true :*/ false); } - else if(mousePressEvent->pos().x() >= scrollbarSliderRec().x() + scrollbarSliderRec().width()){ - animator->setExtraProperty("addValue", true); + else if(mousePressEvent->pos().x() >= handleRect.x() + handleRect.width()){ + animator->setExtraProperty("addValue", /*scrollbar->layoutDirection() == Qt::RightToLeft ? false :*/ true); } else return false; } else{ - if(mousePressEvent->pos().y() <= scrollbarSliderRec().y()){ + if(mousePressEvent->pos().y() <= handleRect.y()){ animator->setExtraProperty("addValue", false); - } - else if(mousePressEvent->pos().y() >= scrollbarSliderRec().y() + scrollbarSliderRec().height()){ + else if(mousePressEvent->pos().y() >= handleRect.y() + handleRect.height()){ animator->setExtraProperty("addValue", true); } else @@ -512,27 +547,76 @@ } if(!animator->isRunning("move_position")){ - int startPosition = scrollbar->value();//scrollbar->sliderPosition();//sliderPositionFromValue(bar->minimum, bar->maximum, scrollBar->value(), maxlen - sliderlen, bar->upsideDown); -// qDebug() << "startPosition......." << startPosition << scrollbar->value(); + int startPosition = scrollbar->value(); + aScrollBarDebug << "startPosition......." << startPosition << scrollbar->value(); if(startPosition <= scrollbar->maximum() && startPosition >= scrollbar->minimum()){ -// qDebug() << "CC_ScrollBar............" << animator->isRunning("move_position") << animator->currentAnimatorTime("move_position"); + aScrollBarDebug << "CC_ScrollBar............" << animator->isRunning("move_position") << animator->currentAnimatorTime("move_position"); if(animator->value("move_position") != 1.0){ if(animator->getExtraProperty("addValue").isValid()){ -// qDebug() << "pagestep..." << scrollbar->pageStep() << animator->getExtraProperty("addValue").toBool(); + aScrollBarDebug << "pagestep..." << scrollbar->pageStep() << animator->getExtraProperty("addValue").toBool(); int step = (animator->getExtraProperty("addValue").toBool() ? 1 : -1) * scrollbar->pageStep(); -// qDebug() << "step............" << step; + aScrollBarDebug << "step............" << step << animator->getExtraProperty("addValue").toBool(); + + QStyleOptionSlider *opt = new QStyleOptionSlider(); + opt->init(scrollbar); + + aScrollBarDebug << "11111111" << scrollbar->property("ScrollBarSliderRect").isValid(); + + QRect sr = scrollbar->property("ScrollBarSliderRect").isValid() ? + scrollbar->property("ScrollBarSliderRect").value<QRect>() : + QRect(); + + aScrollBarDebug << "12333333" << scrollbar->property("ScrollBarGrooveRect").isValid(); + QRect gr = scrollbar->property("ScrollBarGrooveRect").isValid() ? + scrollbar->property("ScrollBarGrooveRect").value<QRect>() : + QRect(); + + bool absoluteButton = (midButtonAbsPos && mousePressEvent->button() == Qt::MidButton) + || (proxy()->styleHint(QStyle::SH_ScrollBar_LeftClickAbsolutePosition, opt, scrollbar) + && mousePressEvent->button() == Qt::LeftButton); + if(absoluteButton){ + int sliderMin, sliderMax, sliderLength, pos; + + if (horizontal == Qt::Horizontal) { + sliderLength = sr.width(); + sliderMin = gr.x(); + sliderMax = gr.right() - sliderLength + 1; + aScrollBarDebug << "sliderLength....." << sliderLength << gr << gr.right(); + pos = mousePressEvent->pos().x() - sliderLength / 2; + if (scrollbar->layoutDirection() == Qt::RightToLeft) + opt->upsideDown = !opt->upsideDown; + } else { + sliderLength = sr.height(); + sliderMin = gr.y(); + sliderMax = gr.bottom() - sliderLength + 1; + pos = mousePressEvent->pos().y() - sliderLength / 2; + + } + + bool upsideDown = scrollbar->invertedAppearance(); + aScrollBarDebug << "minimum..." << scrollbar->minimum() << scrollbar->maximum() << pos << sliderMin << sliderMax; + int scrollValue = sliderValueFromPosition(scrollbar->minimum(), scrollbar->maximum(), pos - sliderMin, + sliderMax - sliderMin, upsideDown);//opt->upsideDown); + aScrollBarDebug << "scrollValue....." << scrollValue << scrollbar->value(); + step = scrollValue - scrollbar->value(); + aScrollBarDebug << "step0000...." << step; + aScrollBarDebug << "addValue........." << animator->getExtraProperty("addValue"); + + } animator->startAnimator("move_position"); - int endPos = (startPosition + step) - (startPosition + step)%step; + int endPos = (startPosition + step) - (absoluteButton ? 0 : (startPosition + step)%step); + aScrollBarDebug << "endPos000....." << startPosition << step << endPos; + if(!animator->getExtraProperty("addValue").toBool()) - endPos = (startPosition + step) + (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0); -// qDebug() << "endPos1111....." << endPos; + endPos = (startPosition + step) + (absoluteButton ? 0 : (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0)); + aScrollBarDebug << "endPos1111....." << endPos; if(animator->getExtraProperty("addValue").toBool()) endPos = qMin(endPos, scrollbar->maximum()); else endPos = qMax(endPos, scrollbar->minimum()); -// qDebug() << "endPos....." << endPos; + aScrollBarDebug << "endPos....." << endPos; animator->setExtraProperty("end_position", endPos); animator->setExtraProperty("start_position", startPosition); @@ -546,9 +630,19 @@ return true; return false; - } + } + + if (qobject_cast<QMenu *>(obj)) { + if (e->type() == QEvent::Show) { + if (QMenu *w = qobject_cast<QMenu *>(obj)) { + if (!KWindowSystem::compositingActive()) { + w->setProperty("useSystemStyleBlur", false); + } + } + } + } return false; } @@ -583,8 +677,8 @@ case SH_ComboBox_PopupFrameStyle: return QFrame::NoFrame | QFrame::Plain; -// case SH_Button_FocusPolicy: -// return Qt::TabFocus; + case SH_Button_FocusPolicy: + return Qt::TabFocus; case SH_Header_ArrowAlignment: return Qt::AlignRight | Qt::AlignVCenter; @@ -614,6 +708,11 @@ case SH_BlinkCursorWhenTextSelected: { return m_blink_cursor; } + case SH_TabBar_Alignment: { + if (widget && widget->layoutDirection() == Qt::RightToLeft) + return Qt::AlignRight; + return Qt::AlignLeft; + } default: break; } @@ -632,8 +731,61 @@ if (auto settings = UKUIStyleSettings::globalInstance()) { QString themeColor = settings->get("themeColor").toString(); themeColor = settings->get("theme-color").toString(); - setThemeColor(themeColor, palette); - sp->setUKUIThemeColor(themeColor); + + QColor color = palette.color(QPalette::Active, QPalette::Highlight); + if (themeColor == "default") { + + } else if (themeColor == "daybreakBlue") { + color = QColor(55, 144, 250); + } else if (themeColor == "jamPurple") { + color = QColor(120, 115, 245); + } else if (themeColor == "magenta") { + color = QColor(235, 48, 150); + } else if (themeColor == "sunRed") { + color = QColor(243, 34, 45); + } else if (themeColor == "sunsetOrange") { + color = QColor(246, 140, 39); + } else if (themeColor == "dustGold") { + color = QColor(249, 197, 61); + } else if (themeColor == "polarGreen") { + color = QColor(82, 196, 41); + } else if (!themeColor.isEmpty() && themeColor.startsWith("(") && themeColor.endsWith(")")) { + QColor c = color; + QString colorStr = themeColor; + colorStr = colorStr.remove(colorStr.length() - 1, 1); + colorStr = colorStr.remove(0, 1); + QStringList list = colorStr.split(","); + if (list.length() == 3 || list.length() == 4) { + c.setRed(list[0].toInt()); + c.setGreen(list[1].toInt()); + c.setBlue(list[2].toInt()); + if (list.length() == 4) { + QStringList alphaList = QString(list[3]).split("*"); + if (alphaList.length() == 2) { + if (alphaList[0].toFloat() == 255.0) + c.setAlphaF(alphaList[1].toFloat()); + else if (alphaList[1].toFloat() == 255.0) + c.setAlphaF(alphaList[0].toFloat()); + else + c.setAlphaF(alphaList[0].toFloat() * alphaList[1].toFloat() / 255.0); + + } else if (alphaList.length() == 1) { + if(alphaList[0].toFloat() <= 1.0) + c.setAlphaF(alphaList[0].toFloat()); + else + c.setAlpha(alphaList[0].toInt()); + } else + c.setAlphaF(1.0); + } + } else if (list.length() == 1 && list[0].length() == 7 && list[0].startsWith("#")) { + c = list[0]; + } + + color = c; + } + + setThemeColor(color, palette); + sp->setUKUIThemeColor(palette, themeColor); } return palette; @@ -731,32 +883,10 @@ -void UKUIConfigStyle::setThemeColor(QString themeColor, QPalette &palette) const +void UKUIConfigStyle::setThemeColor(QColor color, QPalette &palette) const { - if (themeColor == "default") { - - } else if (themeColor == "daybreakBlue") { - palette.setColor(QPalette::Active, QPalette::Highlight, QColor(55, 144, 250)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(55, 144, 250)); - } else if (themeColor == "jamPurple") { - palette.setColor(QPalette::Active, QPalette::Highlight, QColor(120, 115, 245)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(120, 115, 245)); - } else if (themeColor == "magenta") { - palette.setColor(QPalette::Active, QPalette::Highlight, QColor(235, 48, 150)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(235, 48, 150)); - } else if (themeColor == "sunRed") { - palette.setColor(QPalette::Active, QPalette::Highlight, QColor(243, 34, 45)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(243, 34, 45)); - } else if (themeColor == "sunsetOrange") { - palette.setColor(QPalette::Active, QPalette::Highlight, QColor(246, 140, 39)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(246, 140, 39)); - } else if (themeColor == "dustGold") { - palette.setColor(QPalette::Active, QPalette::Highlight, QColor(249, 197, 61)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(249, 197, 61)); - } else if (themeColor == "polarGreen") { - palette.setColor(QPalette::Active, QPalette::Highlight, QColor(82, 196, 41)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(82, 196, 41)); - } + palette.setColor(QPalette::Active, QPalette::Highlight, color); + palette.setColor(QPalette::Inactive, QPalette::Highlight, color); } void UKUIConfigStyle::updateTabletModeValue(bool isTabletMode) @@ -771,39 +901,66 @@ } } -QRect UKUIConfigStyle::scrollbarSliderRec() +QRect UKUIConfigStyle::scrollbarSliderRec(QWidget *w) { - return m_scrollBarSliderRec; + if(w && m_scrollBarSliderRec.contains(w)) + return m_scrollBarSliderRec.value(w); + return QRect(); } -void UKUIConfigStyle::setScrollbarSliderRec(QRect rect) const +void UKUIConfigStyle::setScrollbarSliderRec(QWidget *w, QRect rect) const { - if(m_scrollBarSliderRec != rect) - m_scrollBarSliderRec = rect; + if(w){ + if(m_scrollBarSliderRec.contains(w)){ + QRect r = m_scrollBarSliderRec.value(w); + if(r != rect) + m_scrollBarSliderRec.insert(w, rect); + return; + } + m_scrollBarSliderRec.insert(w, rect); + } } -QRect UKUIConfigStyle::sliderHandleRec() +QRect UKUIConfigStyle::sliderHandleRec(QWidget *w) { - return m_sliderHandleRec; + if(w && m_sliderHandleRec.contains(w)) + return m_sliderHandleRec.value(w); + return QRect(); } -void UKUIConfigStyle::setSliderHandleRec(QRect rect) const +void UKUIConfigStyle::setSliderHandleRec(QWidget *w, QRect rect) const { - if(m_sliderHandleRec != rect) - m_sliderHandleRec = rect; + if(w){ + if(m_sliderHandleRec.contains(w)){ + QRect r = m_sliderHandleRec.value(w); + if(r != rect) + m_sliderHandleRec.insert(w, rect); + return; + } + m_sliderHandleRec.insert(w, rect); + } } void UKUIConfigStyle::polish(QWidget *widget) { - QLibrary gestureLib("libqt5-gesture-extensions"); + QLibrary gestureLib(GESTURE_LIB); if (widget && gestureLib.load()) { typedef void (*RegisterFun) (QWidget*, QObject*); auto fun = (RegisterFun) gestureLib.resolve("registerWidget"); - fun(widget, widget); + if (fun) { + fun(widget, widget); + } else { + qWarning() << "Can't resolve registerWidget from" << GESTURE_LIB << gestureLib.errorString(); + } } - if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget->inherits("QMenu"))) { + if(!widget) + return; + + realSetWindowSurfaceFormatAlpha(widget); + + if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget && widget->inherits("QMenu"))) { if (widget && widget->testAttribute(Qt::WA_TranslucentBackground) && widget->isTopLevel()) { //FIXME: #if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) @@ -832,13 +989,8 @@ } } - if(!widget) - return; - Style::polish(widget); - realSetWindowSurfaceFormatAlpha(widget); - m_shadow_helper->registerWidget(widget); if (qobject_cast<QTabWidget*>(widget)) { @@ -884,11 +1036,6 @@ if(qobject_cast<QSlider*>(widget)){ m_slider_animation_helper->registerWidget(widget); -// auto slider = qobject_cast<QSlider*>(widget); -// connect(slider, &QSlider::valueChanged, this, [=](int value){ -// slide -// qDebug() << "slider valueChanged:" << value; -// }); } /*! \todo QDateTimeEdit widget affected with calendarPopup() draw QComboBox style or QSpinBox style. @@ -980,7 +1127,6 @@ if(widget != nullptr && widget->inherits("QListView")) { auto listview = qobject_cast<QListView *>(widget); -// qDebug() << "listview is null0000: " << (listview == nullptr); if(listview != nullptr) { connect(listview->selectionModel(), &QItemSelectionModel::selectionChanged, [listview](const QItemSelection &selected, const QItemSelection &deselected){ @@ -991,15 +1137,14 @@ if(widget != nullptr && widget->inherits("QTreeView")){ m_tree_animation_helper->registerWidget(widget); - if(qobject_cast<QTreeView *>(widget)->isAnimated() && !widget->property("animation").isValid()){ - widget->setProperty("animation", true); + if(!qobject_cast<QTreeView *>(widget)->isAnimated() && + widget->property("animation").isValid() && !widget->property("animation").toBool()){ + qobject_cast<QTreeView *>(widget)->setAnimated(false); } - if(widget->property("animation").isValid()){ - sp->m_TreeParameters.animation = widget->property("animation").toBool(); - qobject_cast<QTreeView *>(widget)->setAnimated(sp->m_TreeParameters.animation); + else{ + widget->setProperty("animation", true); + qobject_cast<QTreeView *>(widget)->setAnimated(true); } - else - qobject_cast<QTreeView *>(widget)->setAnimated(sp->m_TreeParameters.animation); auto tree = qobject_cast<QTreeView*>(widget); connect(tree, &QTreeView::expanded, this, [=](const QModelIndex &index){ @@ -1009,9 +1154,7 @@ if(!animator) return; - //qDebug() <<"expanded index:" << index.internalId(); - - animator->setExtraProperty("expandItem", QString::number(index.internalId())); + animator->setExtraProperty("expandItem", index); if(animator->isRunning("collaps")){ animator->stopAnimator("collaps"); @@ -1029,9 +1172,7 @@ if(!animator) return; - qDebug() <<"collapsed index:" << index.internalId(); - - animator->setExtraProperty("collapsItem", QString::number(index.internalId())); + animator->setExtraProperty("collapsItem", index); if(animator->isRunning("expand")){ animator->stopAnimator("expand"); @@ -1045,18 +1186,39 @@ } + //input right to left + QString systemLang = QLocale::system().name(); + if(systemLang == "ug_CN" || systemLang == "ky_KG" || systemLang == "kk_KZ") { +// if (auto spinbox = qobject_cast<QSpinBox *>(widget)) { +// spinbox->setAlignment(Qt::AlignRight); +// } +// if (auto lineedit = qobject_cast<QLineEdit *>(widget)) { +// lineedit->setAlignment(Qt::AlignRight); +// } +// if (auto textedit = qobject_cast<QTextEdit *>(widget)) { +// textedit->setAlignment(Qt::AlignRight); +// } +// if (auto label = qobject_cast<QLabel *>(widget)) { +// label->setAlignment(Qt::AlignRight); +// } + } + widget->installEventFilter(this); } void UKUIConfigStyle::unpolish(QWidget *widget) { - QLibrary gestureLib("libqt5-gesture-extensions"); + QLibrary gestureLib(GESTURE_LIB); if (widget && gestureLib.load()) { typedef void (*UnRegisterFun) (QWidget*, QObject*); auto fun = (UnRegisterFun) gestureLib.resolve("unregisterWidget"); - fun(widget, widget); + if (fun) { + fun(widget, widget); + } else { + qWarning() << "Can't resolve unregisterWidget from" << GESTURE_LIB << gestureLib.errorString(); + } } - if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget->inherits("QMenu"))) { + if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget && widget->inherits("QMenu"))) { if (widget->testAttribute(Qt::WA_TranslucentBackground) && widget->isTopLevel()) { #if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) m_blur_helper->unregisterWidget(widget); @@ -1075,6 +1237,8 @@ } } + if(!widget) + return; m_shadow_helper->unregisterWidget(widget); widget->removeEventFilter(this); @@ -1146,6 +1310,14 @@ Style::unpolish(widget); } +void UKUIConfigStyle::polish(QApplication *app) +{ +// QtConcurrent::run(this, &UKUIConfigStyle::getDefaultControlParameters, app); + getDefaultControlParameters(app); + + Style::polish(app); +} + QIcon UKUIConfigStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const { if (QApplication::desktopSettingsAware() && !QIcon::themeName().isEmpty()) { @@ -1287,15 +1459,9 @@ QColor c(pixel); int h, s, l, a; c.getHsl(&h, &s, &l, &a); - qDebug() << "cccccccc0:" << h << s << l << a; - if(x ==0 && y ==0) - qDebug() << "000000000" << c.red() << c.green() << c.blue() << c.alpha(); s += a > 0 ? 82 : 0; l += a > 0 ? 78 : 0; c.setHsl(h, s, l, a); - if(x ==0 && y ==0) - qDebug() << "000000000" << c.red() << c.green() << c.blue() << c.alpha(); - qDebug() << "cccccccc1:" << h << s << l << a; *scanLine = c.rgba();//qRgba(c.red(), c.green(), c.blue(), c.alpha()); ++scanLine; @@ -1331,7 +1497,8 @@ painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); painter->setBrush(sp->m_MenuParameters.menuBackgroundBrush); painter->setPen(sp->m_MenuParameters.menuBackgroundPen); - painter->drawRoundedRect(widget->rect(), sp->m_MenuParameters.frameRadius, sp->m_MenuParameters.frameRadius); + if(widget) + painter->drawRoundedRect(widget->rect(), sp->m_MenuParameters.frameRadius, sp->m_MenuParameters.frameRadius); painter->restore(); if(sp->Menu_Right_Bottom_Corner){ @@ -1364,7 +1531,25 @@ return; } case PE_FrameFocusRect: { - if (qobject_cast<const QAbstractItemView *>(widget)) + if (qApp->focusWidget() && qApp->focusWidget()->inherits("QTreeView")) + { + sp->initConfigTreeParameters(isUseDarkPalette(), option, widget); + QPen focusPen = sp->m_TreeParameters.treeFocusPen; + painter->save(); + painter->setBrush(Qt::NoBrush); + painter->setPen(focusPen); + int width = focusPen.width(); + + if(width == 1 && sp->m_TreeParameters.radius != 0) + painter->translate(0.5, 0.5); + painter->setRenderHint(QPainter::Antialiasing, sp->m_TreeParameters.radius != 0); + + painter->drawRoundedRect(option->rect.adjusted(width/2.0, width/2.0, -width/2.0, -width/2.0), + sp->m_TreeParameters.radius, sp->m_TreeParameters.radius); + painter->restore(); + return; + } + else if (qobject_cast<const QAbstractItemView *>(widget)) return; break; } @@ -1410,13 +1595,11 @@ width = sp->m_PushButtonParameters.pushButtonCheckDisablePen.width(); painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonCheckDisablePen); painter->setBrush(sp->m_PushButtonParameters.pushButtonCheckDisableBrush); - } - else if (button->features & QStyleOptionButton::Flat) { + } else if (button->features & QStyleOptionButton::Flat) { width = 0; painter->setPen(Qt::NoPen); painter->setBrush(Qt::NoBrush); - } - else { + } else { width = sp->m_PushButtonParameters.pushButtonDisablePen.width(); painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonDisablePen); painter->setBrush(sp->m_PushButtonParameters.pushButtonDisableBrush); @@ -1455,14 +1638,13 @@ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonDefaultPen); painter->setBrush(sp->m_PushButtonParameters.pushButtonDefaultBrush); } - - //focus - if (focus && focusStateActiveList().contains(qAppName())) { - width = sp->m_PushButtonParameters.pushButtonFocusPen.width(); - painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonFocusPen); - } } } + //focus + if (focus) { + width = sp->m_PushButtonParameters.pushButtonFocusPen.width(); + painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonFocusPen); + } } painter->setRenderHint(QPainter::Antialiasing, sp->m_PushButtonParameters.radius != 0); @@ -1472,7 +1654,8 @@ } else { if(width == 1 && sp->m_PushButtonParameters.radius != 0) painter->translate(0.5, 0.5); - painter->drawRoundedRect(rect.adjusted(width, width, -width, -width), sp->m_PushButtonParameters.radius, sp->m_PushButtonParameters.radius); + painter->drawRoundedRect(rect.adjusted(width, width, -width, -width), + sp->m_PushButtonParameters.radius, sp->m_PushButtonParameters.radius); } painter->restore(); return; @@ -1762,14 +1945,13 @@ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_ToolButtonParameters.toolButtonDefaultPen); painter->setBrush(sp->m_ToolButtonParameters.toolButtonDefaultBrush); } - - //focus - if (focus && focusStateActiveList().contains(qAppName())) { - width = sp->m_ToolButtonParameters.toolButtonFocusPen.width(); - painter->setPen(width <= 0 ? Qt::NoPen : sp->m_ToolButtonParameters.toolButtonFocusPen); - } } } + //focus + if (focus) { + width = sp->m_ToolButtonParameters.toolButtonFocusPen.width(); + painter->setPen(width <= 0 ? Qt::NoPen : sp->m_ToolButtonParameters.toolButtonFocusPen); + } } painter->setRenderHint(QPainter::Antialiasing, sp->m_ToolButtonParameters.radius != 0); @@ -2063,7 +2245,8 @@ 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){ @@ -2102,6 +2285,12 @@ target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); else if(!sp->indicatorIconHoverNeedHighLight) target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); + else if(widget && (widget->inherits("QTreeView") || widget->inherits("QTreeWidget"))){ + if(widget->property("highlightMode").isValid() && widget->property("highlightMode").toBool()) + target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); + else + target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); + } else target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); @@ -2137,9 +2326,10 @@ 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); @@ -2152,9 +2342,6 @@ } QIcon icon = QIcon::fromTheme("ukui-end-symbolic"); - if(widget && widget->parent() && widget->parentWidget()->inherits("QTabBar") && - sp->getTabBarIndicatorLayout() != UKUIConfigStyleParameters::TabBarIndicatorLayout::TabBarIndicator_Horizontal) - icon = QIcon::fromTheme("ukui-down-symbolic"); if(!icon.isNull()) { int indWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); @@ -2167,8 +2354,20 @@ QPixmap pixmap = icon.pixmap(iconsize, mode, QIcon::Off); pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); QPixmap target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); - if(!sp->indicatorIconHoverNeedHighLight) + + if(widget && (widget->inherits("QDoubleSpinBox") || widget->inherits("QSpinBox")) && !sp->m_SpinBoxParameters.spinBoxUpIconHightPixMap) + target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); + else if(!sp->indicatorIconHoverNeedHighLight && widget && !widget->inherits("QMenu")) target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); + else if(widget && (widget->inherits("QTreeView") || widget->inherits("QTreeWidget"))){ + if(widget->property("highlightMode").isValid() && widget->property("highlightMode").toBool()) + target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); + else + target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); + } + else + target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); + painter->save(); painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); if(startAnimation){ @@ -2196,9 +2395,6 @@ case PE_IndicatorArrowLeft: { QIcon icon = QIcon::fromTheme("ukui-start-symbolic"); - if(widget && widget->parent() && widget->parentWidget()->inherits("QTabBar") && - sp->getTabBarIndicatorLayout() != UKUIConfigStyleParameters::TabBarIndicatorLayout::TabBarIndicator_Horizontal) - icon = QIcon::fromTheme("ukui-up-symbolic"); if(!icon.isNull()) { int indWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); @@ -2211,7 +2407,7 @@ QPixmap pixmap = icon.pixmap(iconsize, mode, QIcon::Off); pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); QPixmap target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); - if(!sp->indicatorIconHoverNeedHighLight) + if(!sp->indicatorIconHoverNeedHighLight && widget && !widget->inherits("QMenu")) target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); painter->save(); painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); @@ -2238,7 +2434,9 @@ auto animator = m_radiobutton_animation_helper->animator(widget); - if (enable && sp->m_RadioButtonParameters.animation && + bool hasAnimation = widget &&(!widget->property("animation").isValid() || + (widget->property("animation").isValid() && widget->property("animation").toBool())); + if (enable && hasAnimation && animator != nullptr && animator->isRunning("SunKenOn")) { float value = animator->value("SunKenOn").toFloat(); QColor clickColor = sp->m_RadioButtonParameters.radioButtonClickBrush.color(); @@ -2257,7 +2455,6 @@ frameColor.blue() + value * (onDefaultPenColor.blue() - frameColor.blue()), frameColor.alpha() + value * (onDefaultPenColor.alpha() - frameColor.alpha()))); QColor penColor = frameBrush.color(); -// qDebug()<<"onDefaultPenColor......." << onDefaultPenColor.red() << onDefaultPenColor.green() << onDefaultPenColor.blue() << onDefaultPenColor.alphaF(); penColor.setAlphaF(onDefaultPenColor.alphaF()); painter->setPen(QPen(QBrush(penColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); @@ -2275,10 +2472,9 @@ painter->restore(); return; } - else if (enable && sp->m_RadioButtonParameters.animation && + else if (enable && hasAnimation && animator != nullptr && animator->isRunning("Off")) { float value = animator->value("Off").toFloat(); -// qDebug() << "off SunKenOn value......" << qobject_cast<const QRadioButton *>(widget)->text() << value; QPen pen = sp->m_RadioButtonParameters.radioButtonDefaultPen; pen.color().setAlphaF(sp->m_RadioButtonParameters.radioButtonDefaultPen.color().alphaF() * (1.0 - value)); painter->setPen(pen); @@ -2304,12 +2500,10 @@ if (enable) { if (on) { if (animator != nullptr) { - if (sp->m_RadioButtonParameters.animation && !animator->isRunning("SunKenOn") ) { - // qDebug() << "SunKenOn time....:" << qobject_cast<const QRadioButton *>(widget)->text() << animator->currentAnimatorTime("SunKenOn"); + if (hasAnimation && !animator->isRunning("SunKenOn") ) { if(animator->currentAnimatorTime("SunKenOn") == 0){ animator->startAnimator("SunKenOn"); animator->setAnimatorCurrentTime("Off", 0); -// qDebug() << "startAnimator SunKenOn......" << qobject_cast<const QRadioButton *>(widget)->text() << animator->currentAnimatorTime("Off"); painter->setPen(sp->m_RadioButtonParameters.radioButtonDefaultPen); painter->setBrush(sp->m_RadioButtonParameters.radioButtonDefaultBrush); painter->drawEllipse(rect); @@ -2341,7 +2535,7 @@ painter->restore(); return; } else { - if (sp->m_RadioButtonParameters.animation && animator != nullptr) { + if (hasAnimation && animator != nullptr) { if (!animator->isRunning("Off") && animator->currentAnimatorTime("SunKenOn") > 0 && animator->currentAnimatorTime("Off") == 0) { animator->startAnimator("Off"); animator->setAnimatorCurrentTime("SunKenOn", 0); @@ -2401,12 +2595,14 @@ painter->setClipRect(rect); painter->setRenderHint(QPainter::Antialiasing, sp->m_CheckBoxParameters.radius != 0); + bool hasAnimation = widget &&(!widget->property("animation").isValid() || + (widget->property("animation").isValid() && widget->property("animation").toBool())); + auto animator = m_checkbox_animation_helper->animator(widget); - if (sp->m_CheckBoxParameters.animation && animator != nullptr) { + if (hasAnimation && animator != nullptr) { if(animator->isRunning("OnBase")) { float value = animator->value("OnBase").toFloat(); -// qDebug() << "onBase.....value:" << value; margin = sp->m_CheckBoxParameters.checkBoxDefaultPen.width(); QColor onDefaultColor = mouseOver ? (!sp->m_CheckBoxParameters.onHoverBrushIslinearGradient ? @@ -2450,11 +2646,10 @@ if (animator != nullptr) { - if(sp->m_CheckBoxParameters.animation && animator->isRunning("OnOpacity")) + if(hasAnimation && animator->isRunning("OnOpacity")) { float value = animator->value("OnOpacity").toFloat(); -// qDebug() << "OnOpacity.....value00000:" << value; if (on) { QBrush brush = sp->m_CheckBoxParameters.checkBoxContentPen.brush(); QColor color = brush.color(); @@ -2478,9 +2673,8 @@ } } - if (sp->m_CheckBoxParameters.animation && animator != nullptr && animator->isRunning("OnScale")) { + if (hasAnimation && animator != nullptr && animator->isRunning("OnScale")) { float value = animator->value("OnScale").toFloat(); -// qDebug() << "OnScale.....value:" << value; if (on) { path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.top() + heigth / 2); path.lineTo(pathrect.left() + width * 0.45, pathrect.bottom() - heigth / 3 - (1.0 - value) * heigth /8); @@ -2513,23 +2707,21 @@ } } - if (sp->m_CheckBoxParameters.animation && animator != nullptr && animator->isRunning("Off")) { + if (hasAnimation && animator != nullptr && animator->isRunning("Off")) { float value = animator->value("Off").toFloat(); -// qDebug() << "Off.....value:" << value; margin = sp->m_CheckBoxParameters.checkBoxDefaultPen.width(); QPen pen = mouseOver ? sp->m_CheckBoxParameters.checkBoxHoverPen : sp->m_CheckBoxParameters.checkBoxDefaultPen; pen.color().setAlphaF(sp->m_CheckBoxParameters.checkBoxDefaultPen.color().alphaF() * (1.0 - value)); painter->setPen(pen); QColor defaultColor = mouseOver ? (sp->m_CheckBoxParameters.onHoverBrushIslinearGradient ? - sp->m_CheckBoxParameters.checkBoxHoverBrush.color() : sp->m_CheckBoxParameters.checkBoxDefaultBrush.color()): + sp->m_CheckBoxParameters.checkBoxClickBrush.color() : sp->m_CheckBoxParameters.checkBoxDefaultBrush.color()): sp->m_CheckBoxParameters.checkBoxDefaultBrush.color(); QColor onDefaultColor = mouseOver ? sp->m_CheckBoxParameters.checkBoxOnClickBrush.color() : sp->m_CheckBoxParameters.checkBoxOnClickBrush.color(); QBrush brush(QColor(defaultColor.red() + value * (onDefaultColor.red() - defaultColor.red()), defaultColor.green() + value * (onDefaultColor.green() - defaultColor.green()), defaultColor.blue() + value * (onDefaultColor.blue() - defaultColor.blue()), defaultColor.alpha() + value * (onDefaultColor.alpha() - defaultColor.alpha()))); - // qDebug() << "sunkenon brush...." << brush.color().red() << brush.color().green() << brush.color().blue(); painter->setBrush(brush); if(painter->pen().width() == 1 && sp->m_CheckBoxParameters.radius != 0) painter->translate(0.5, 0.5); @@ -2537,9 +2729,7 @@ painter->restore(); painter->save(); bool _nochange = animator->getExtraProperty("noChange").toBool(); -// qDebug() << "_nochange.........." << _nochange; if (!_nochange) { -// qDebug() << "off ......on,,,,,,,,,,,"; path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.top() + heigth / 2); path.lineTo(pathrect.left() + width * 0.45, pathrect.bottom() - heigth / 3 - (1.0 - value) * heigth /8); path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0, pathrect.top() + heigth / 3 + (1.0 - value) * heigth /6); @@ -2551,7 +2741,6 @@ painter->setPen(QPen(brush, 1.5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); painter->setRenderHint(QPainter::Antialiasing, true); } else if (_nochange) { -// qDebug() << "off ......noChange,,,,,,,,,,,"; path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.center().y()); path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0 , pathrect.center().y()); @@ -2571,7 +2760,7 @@ if (enable) { if (on | noChange) { - if(sp->m_CheckBoxParameters.animation && animator != nullptr) + if(hasAnimation && animator != nullptr) { if(!animator->isRunning("OnBase") && animator->currentAnimatorTime("OnBase") == 0) { @@ -2588,9 +2777,6 @@ painter->setPen(sp->m_CheckBoxParameters.checkBoxClickPen); painter->setBrush(sp->m_CheckBoxParameters.checkBoxClickBrush); -// qDebug() << "start onscale............"; -// painter->setPen(sp->m_CheckBoxParameters.checkBoxDefaultPen); -// painter->setBrush(Qt::yellow);//sp->m_CheckBoxParameters.checkBoxHoverPen); if(painter->pen().width() == 1 && sp->m_CheckBoxParameters.radius != 0) painter->translate(0.5, 0.5); painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), sp->m_CheckBoxParameters.radius, sp->m_CheckBoxParameters.radius); @@ -2621,17 +2807,18 @@ painter->save(); //draw path if (on) { - painter->setPen(QPen(sp->m_CheckBoxParameters.checkBoxPathBrush, 1.5, + painter->setPen(QPen(sp->m_CheckBoxParameters.checkBoxContentPen.color(), 1.5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); painter->setRenderHint(QPainter::Antialiasing, true); } else if (noChange) { - painter->setPen(QPen(sp->m_CheckBoxParameters.checkBoxPathBrush, 2)); + painter->setPen(QPen(sp->m_CheckBoxParameters.checkBoxContentPen.color(), 1.5, + Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); } painter->setBrush(Qt::NoBrush); painter->drawPath(path); } else { if (animator != nullptr) { - if(sp->m_CheckBoxParameters.animation && !animator->isRunning("Off") && + if(hasAnimation && !animator->isRunning("Off") && animator->currentAnimatorTime("Off") == 0 && animator->currentAnimatorTime("OnScale") > 0 && animator->currentAnimatorTime("OnOpacity") > 0 && @@ -2748,6 +2935,10 @@ painter->drawRoundedRect(vi->rect, Radius, Radius); painter->restore(); } + + if (dynamic_cast<QPixmap *>(painter->device())) { + proxy()->drawPrimitive(PE_PanelItemViewItem, option, painter, widget); + } return; } break; @@ -2760,14 +2951,19 @@ const bool enable = vi->state & State_Enabled; const bool select = vi->state & State_Selected; const bool hover = vi->state & State_MouseOver; + bool focus = vi->state & State_HasFocus; + int focusRadius; QBrush defaultBrush; QBrush hoverBrush; QBrush selectBrush; QBrush disableBrush; QPainterPath path; + QPainterPath rectPath; + QPen hoverPen = Qt::NoPen; + QPen focusPen = Qt::NoPen; QPen selectPen = Qt::NoPen; QPainterPath borderPath0; QPainterPath borderPath1; @@ -2785,19 +2981,39 @@ if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) { sp->initConfigTreeParameters(isUseDarkPalette(), option, widget); - +// if(const QStyleOptionViewItem *vimm = qstyleoption_cast<const QStyleOptionViewItem *>(option)){ +// qDebug() << "item vi..........." << vimm << vimm->index; +// if(vimm->widget){ +// auto tree = qobject_cast<const QTreeView*>(widget); + +// if(focus){ +// QRect treeFocusRec = QRect(tree->x(), option->rect.y(), tree->width(), option->rect.height()); +// painter->save(); +// painter->setPen(QPen(QColor(Qt::red), 1)); +// painter->setBrush(Qt::NoBrush); +// painter->drawRect(treeFocusRec); +// painter->restore(); +// } +// //focus = itemWidget->hasFocus(); +// } +// } defaultBrush = sp->m_TreeParameters.treeDefaultBrush; hoverBrush = sp->m_TreeParameters.treeHoverBrush; selectBrush = sp->m_TreeParameters.treeSelectBrush; disableBrush = sp->m_TreeParameters.treeDisableBrush; hoverPen = sp->m_TreeParameters.treeHoverPen; selectPen = sp->m_TreeParameters.treeSelectPen; + focusPen = sp->m_TreeParameters.treeFocusPen; + focusRadius = sp->m_TreeParameters.radius; int borderWidth = (hoverPen.color().alpha() != 0 && hoverPen.color() != Qt::NoPen) ? hoverPen.width() : 0; if (vi->viewItemPosition == QStyleOptionViewItem::Beginning) { if(vi->rect.left() == 0) { QRect rect = vi->rect.adjusted(0, 0, 1, 1); + int margin = 4; + + path.setFillRule(Qt::WindingFill); path.moveTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); path.arcTo(rect.left(), rect.top(), 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 180, -90); path.lineTo(rect.right(), rect.top()); @@ -2805,6 +3021,7 @@ path.lineTo(rect.left() + sp->m_TreeParameters.radius, rect.bottom()); path.arcTo(rect.left(), rect.bottom() - 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, -90, -90); path.lineTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); + path.addRect(rect.adjusted(sp->m_TreeParameters.radius, -margin, margin, +margin)); borderPath0.moveTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); borderPath0.arcTo(rect.left(), rect.top(), 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 180, -90); @@ -2814,7 +3031,7 @@ borderPath1.arcTo(rect.left(), rect.bottom() - 1 - 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, -90, -90); borderPath1.lineTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); } else { - path.addRect(vi->rect); + rectPath.addRect(vi->rect); borderPath0.moveTo(vi->rect.left(), vi->rect.top()); borderPath0.lineTo(vi->rect.right() + borderWidth, vi->rect.top()); @@ -2822,7 +3039,7 @@ borderPath1.lineTo(vi->rect.left(), vi->rect.bottom()); } } else if (vi->viewItemPosition == QStyleOptionViewItem::Middle) { - path.addRect(option->rect); + rectPath.addRect(option->rect); borderPath0.moveTo(option->rect.left(), option->rect.top()); borderPath0.lineTo(option->rect.right() + borderWidth, option->rect.top()); @@ -2830,14 +3047,19 @@ borderPath1.lineTo(option->rect.right() + borderWidth, option->rect.bottom()); } else if (vi->viewItemPosition == QStyleOptionViewItem::End) { QRect rect = vi->rect.adjusted(0, 0, 1, 1); - path.moveTo(rect.left(), rect.top()); + int margin = 4; + + path.setFillRule(Qt::WindingFill); + + path.moveTo(rect.left() + rect.width() / 2.0, rect.top()); path.lineTo(rect.right() - sp->m_TreeParameters.radius, rect.top()); path.arcTo(rect.right() - 2 * sp->m_TreeParameters.radius, rect.top(), 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 90, -90); path.lineTo(rect.right(), rect.bottom() - 2 * sp->m_TreeParameters.radius); path.arcTo(rect.right() - 2 * sp->m_TreeParameters.radius, rect.bottom() - 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 0, -90); - path.lineTo(rect.left(), rect.bottom()); - path.lineTo(rect.left(), rect.top()); + path.lineTo(rect.left() + rect.width() / 2.0, rect.bottom()); + path.lineTo(rect.left() + rect.width() / 2.0, rect.top()); + path.addRect(rect.adjusted(-margin, 0, -sp->m_TreeParameters.radius, margin)); borderPath0.moveTo(rect.left(), rect.top()); borderPath0.lineTo(rect.right() - sp->m_TreeParameters.radius, rect.top()); @@ -2854,6 +3076,10 @@ borderPath0.addRoundedRect(vi->rect, sp->m_TreeParameters.radius, sp->m_TreeParameters.radius); } else { QRect rect = vi->rect.adjusted(0, 0, 1, 1); + int margin = 4; + + path.setFillRule(Qt::WindingFill); + path.moveTo(rect.left(), rect.top()); path.lineTo(rect.right() - sp->m_TreeParameters.radius, rect.top()); path.arcTo(rect.right() - 2 * sp->m_TreeParameters.radius, rect.top(), 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 90, -90); @@ -2862,6 +3088,7 @@ 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 0, -90); path.lineTo(rect.left(), rect.bottom()); path.lineTo(rect.left(), rect.top()); + path.addRect(rect.adjusted(-margin, 0, -sp->m_TreeParameters.radius, margin)); borderPath0.moveTo(rect.left(), rect.top()); borderPath0.lineTo(rect.right() - sp->m_TreeParameters.radius, rect.top()); @@ -2885,8 +3112,12 @@ disableBrush = sp->m_ListParameters.listDisableBrush; hoverPen = sp->m_ListParameters.listHoverPen; selectPen = sp->m_ListParameters.listSelectPen; + focusPen = sp->m_ListParameters.listFocusPen; + focusRadius = sp->m_ListParameters.radius; auto *listView = qobject_cast<const QListView *>(widget); + int focusWidth = focus ? focusPen.width()/2 : 0; + if(select && listView != nullptr){ if(listView == nullptr){ @@ -2895,7 +3126,6 @@ } int currentIndex = vi->index.row(); int allNum = listView->model()->rowCount(); - // qDebug() << "index....." << currentIndex << allNum; bool begin = false; bool end = false; @@ -2906,15 +3136,12 @@ onlyOne = true; } else{ - - // qDebug() << "all index11111...." << listView->model()->rowCount(); QList<QModelIndex> selectList = listView->selectionModel()->selectedIndexes(); QList<int> selectIndexList; foreach (QModelIndex index, selectList) { int i = index.row(); selectIndexList.append(i); } - // qDebug() << "selectIndexList...." << selectIndexList; if(selectIndexList.contains(currentIndex - 1) && selectIndexList.contains(currentIndex +1)) mid = true; else if(selectIndexList.contains(currentIndex - 1)) @@ -2925,41 +3152,41 @@ if(begin){ QRect rect = vi->rect; - path.moveTo(rect.left(), rect.bottom() + 1); - path.lineTo(rect.left(), rect.top() + sp->m_ListParameters.radius); - path.arcTo(rect.left(), rect.top(), 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, 180, -90); - path.lineTo(rect.right() - sp->m_ListParameters.radius, rect.top()); - path.arcTo(rect.right() - 2 * sp->m_ListParameters.radius, rect.top(), 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, 90, -90); - path.lineTo(rect.right(), rect.bottom() +1); - path.lineTo(rect.left(), rect.bottom() + 1); + path.moveTo(rect.left() + focusWidth, rect.bottom() + 1 - focusWidth); + path.lineTo(rect.left() + focusWidth, rect.top() + sp->m_ListParameters.radius + focusWidth); + path.arcTo(rect.left() + focusWidth, rect.top() + focusWidth, 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, 180, -90); + path.lineTo(rect.right() - sp->m_ListParameters.radius - focusWidth, rect.top() + focusWidth); + path.arcTo(rect.right() - 2 * sp->m_ListParameters.radius- focusWidth, rect.top() + focusWidth, 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, 90, -90); + path.lineTo(rect.right() - focusWidth, rect.bottom() +1 - focusWidth); + path.lineTo(rect.left() + focusWidth, rect.bottom() + 1 - focusWidth); } else if(mid){ QRect rect = vi->rect; - path.moveTo(rect.left(), rect.bottom() + 1); - path.lineTo(rect.left(), rect.top()); - path.lineTo(rect.right(), rect.top()); - path.lineTo(rect.right(), rect.bottom() +1); - path.lineTo(rect.left(), rect.bottom() + 1); + path.moveTo(rect.left() + focusWidth, rect.bottom() + 1 - focusWidth); + path.lineTo(rect.left() + focusWidth, rect.top() + focusWidth); + path.lineTo(rect.right() - focusWidth, rect.top() + focusWidth); + path.lineTo(rect.right() - focusWidth, rect.bottom() + 1 - focusWidth); + path.lineTo(rect.left() + focusWidth, rect.bottom() + 1 - focusWidth); } else if(end) { QRect rect = vi->rect; - path.moveTo(rect.left(), rect.top()); - path.lineTo(rect.right(), rect.top()); - path.lineTo(rect.right(), rect.bottom() - sp->m_ListParameters.radius); - path.arcTo(rect.right() - 2 * sp->m_ListParameters.radius, rect.bottom() - 2 * sp->m_ListParameters.radius, + path.moveTo(rect.left() + focusWidth, rect.top() + focusWidth); + path.lineTo(rect.right() - focusWidth, rect.top() + focusWidth); + path.lineTo(rect.right() - focusWidth, rect.bottom() - sp->m_ListParameters.radius - focusWidth); + path.arcTo(rect.right() - 2 * sp->m_ListParameters.radius - focusWidth, rect.bottom() - 2 * sp->m_ListParameters.radius - focusWidth, 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, 0, -90); - path.lineTo(rect.left() + sp->m_ListParameters.radius, rect.bottom()); - path.arcTo(rect.left(), rect.bottom() - 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, -90, -90); - path.lineTo(rect.left(), rect.top()); + path.lineTo(rect.left() + sp->m_ListParameters.radius + focusWidth, rect.bottom() - focusWidth); + path.arcTo(rect.left() + focusWidth, rect.bottom() - 2 * sp->m_ListParameters.radius - focusWidth, 2 * sp->m_ListParameters.radius, 2 * sp->m_ListParameters.radius, -90, -90); + path.lineTo(rect.left() + focusWidth, rect.top() + focusWidth); } else { - path.addRoundedRect(vi->rect, sp->m_ListParameters.radius, sp->m_ListParameters.radius); + path.addRoundedRect(vi->rect.adjusted(focusWidth, focusWidth, -1 * focusWidth, -1 * focusWidth), sp->m_ListParameters.radius, sp->m_ListParameters.radius); } } else - path.addRoundedRect(vi->rect, sp->m_ListParameters.radius, sp->m_ListParameters.radius); + path.addRoundedRect(vi->rect.adjusted(focusWidth, focusWidth, -1 * focusWidth, -1 * focusWidth), sp->m_ListParameters.radius, sp->m_ListParameters.radius); } else if(qobject_cast<const QTableView *>(widget) || qobject_cast<const QTableWidget *>(widget)){ sp->initConfigTableParameters(isUseDarkPalette(), option, widget); @@ -2969,11 +3196,15 @@ disableBrush = sp->m_TableParameters.tableDisableBrush; hoverPen = sp->m_TableParameters.tableHoverPen; selectPen = sp->m_TableParameters.tableSelectPen; + focusPen = sp->m_TableParameters.tableFocusPen; + focusRadius = sp->m_TableParameters.radius; + int focusWidth = focus ? focusPen.width()/2 : 0; - path.addRoundedRect(vi->rect, sp->m_TableParameters.radius, sp->m_TableParameters.radius); + path.addRoundedRect(vi->rect.adjusted(focusWidth, focusWidth, -1 * focusWidth, -1 * focusWidth), sp->m_TableParameters.radius, sp->m_TableParameters.radius); } else { path.addRect(vi->rect); + focusRadius = 0; defaultBrush = QBrush(Qt::transparent); hoverBrush = option->palette.brush(QPalette::Disabled, QPalette::Midlight); selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); @@ -2988,6 +3219,13 @@ QRect textRect = proxy()->subElementRect(SE_ItemViewItemText, option, widget); int iconMode_Radius = sp->radius; + if(isList) + iconMode_Radius = sp->m_ListParameters.radius; + else if(isTree) + iconMode_Radius = sp->m_TreeParameters.radius; + else if(isTable) + iconMode_Radius = sp->m_TableParameters.radius; + if (!enable) return; @@ -3061,7 +3299,7 @@ } painter->save(); - painter->setRenderHint(QPainter::Antialiasing, true); + painter->setPen(Qt::NoPen); if (!enable) { painter->setBrush(disableBrush); @@ -3072,7 +3310,14 @@ } else { painter->setBrush(defaultBrush); } - painter->drawPath(path); + + if(!path.isEmpty()){ + painter->setRenderHint(QPainter::Antialiasing, true); + painter->drawPath(path); + } + painter->setRenderHint(QPainter::Antialiasing, false); + painter->drawPath(rectPath); + painter->restore(); painter->save(); @@ -3082,8 +3327,11 @@ if (enable && select) { painter->setPen((selectPen == Qt::NoPen || selectPen.color().alpha() == 0) ? Qt::NoPen : selectPen); if(isTree){ - if(painter->pen().width() == 1) + if (painter->pen().width() == 1 && + !(vi->viewItemPosition == QStyleOptionViewItem::OnlyOne && + vi->rect.left() == 0)) { painter->translate(0, 0.5); + } if(!borderPath0.isEmpty()){ painter->drawPath(borderPath0); @@ -3102,8 +3350,11 @@ } else if (enable && hover) { painter->setPen((hoverPen == Qt::NoPen || hoverPen.color().alpha() == 0) ? Qt::NoPen : hoverPen); if(isTree){ - if(painter->pen().width() == 1) + if (painter->pen().width() == 1 && + !(vi->viewItemPosition == QStyleOptionViewItem::OnlyOne && + vi->rect.left() == 0)) { painter->translate(0, 0.5); + } if(!borderPath0.isEmpty()){ painter->drawPath(borderPath0); @@ -3121,11 +3372,107 @@ else painter->drawPath(path); } + +// if(isTree && focus){ +// auto tree = qobject_cast<const QTreeView*>(widget); + +// QRect treeFocusRec = QRect(tree->viewport()->x(), option->rect.y(), tree->viewport()->width(), option->rect.height()); +// qDebug() << "treeFocusRec......" <<treeFocusRec; +// painter->save(); +// painter->setPen(QPen(QColor(Qt::red), 1)); +// painter->setBrush(Qt::NoBrush); +// painter->drawRect(treeFocusRec); +// painter->restore(); +// } painter->restore(); - } - if (vi->state & State_HasFocus) { + +// if(focus) +// qDebug() << "item focusssss true" << focus; + +// if (focus) { +// painter->save(); +// painter->setPen((focusPen == Qt::NoPen || focusPen.color().alpha() == 0) ? Qt::NoPen : focusPen); +// if(isTree){ +// if (painter->pen().width() == 1 && +// !(vi->viewItemPosition == QStyleOptionViewItem::OnlyOne && +// vi->rect.left() == 0)) { +// painter->translate(0, 0.5); +// } + +// if(!borderPath0.isEmpty()){ +// painter->drawPath(borderPath0); +// } +// if(!borderPath1.isEmpty()){ +// painter->drawPath(borderPath1); +// } +// if(!borderPath2.isEmpty()){ +// if(painter->pen().width() == 1) +// painter->translate(-0.5, 0); +// painter->drawPath(borderPath2); +// } +// } +// else +// painter->drawPath(path); +// painter->restore(); +// } } + if (!isTree && focus) { + painter->save(); + painter->setRenderHint(QPainter::Antialiasing, true); + painter->setPen((focusPen == Qt::NoPen || focusPen.color().alpha() == 0) ? Qt::NoPen : focusPen); + painter->drawPath(path); + painter->restore(); + } +// else if(isTree){ +// if(focus){ +// auto tree = qobject_cast<const QTreeView*>(widget); +// QRect treeItemRec = QRect(tree->viewport()->x(), option->rect.y(), tree->width(), option->rect.height()); +// qDebug() << "treeItemRec......" << treeItemRec; + +// QStyleOptionFocusRect o; +// o.QStyleOption::operator=(*vi); +// o.rect = treeItemRec;//proxy()->subElementRect(SE_ItemViewItemFocusRect, vi, widget); +// qDebug() << "ooooooo" << o.rect << proxy()->subElementRect(SE_TreeViewDisclosureItem, vi, widget); +// painter->save(); +// painter->setPen(QPen(QColor(Qt::blue), 1)); +// painter->setBrush(Qt::NoBrush); +// painter->drawRect(o.rect); +// painter->restore(); + +// drawPrimitive(QStyle::PE_FrameFocusRect, &o, painter, tree); +// auto t = const_cast<QTreeView *>(tree); +// t->setProperty("focusRect", vi->rect); + //drawPrimitive(QStyle::PE_IndicatorBranch, option, painter, tree); +// } +// auto tree = qobject_cast<const QTreeView*>(widget); +// auto t = const_cast<QTreeView *>(tree); +// tree->model()->index() +// if(const QStyleOptionViewItem *vimm = qstyleoption_cast<const QStyleOptionViewItem *>(option)) +// qDebug() << "item vi..........." << vimm << vimm->index << vimm->index.row() << vimm->index.column(); +// qDebug() << "children........" << tree->childAt(vi->rect.center()); +// if(vi->state & QStyle::State_HasFocus){ +// qDebug() << "hasfocus......."; +// } + // if(vi->state & QStyle::State_HasFocus){ +// t->setProperty("focusPoint", vi->rect.center()); +// } + +// QRect treeItemRec = QRect(tree->x(), option->rect.y(), tree->width(), option->rect.height()); +// qDebug() << "treeItemRec......" << treeItemRec; +// if(t->property("focusPoint").isValid() && t->property("focusPoint").canConvert<QPoint>()){ +// QPoint p = t->property("focusPoint").toPoint(); +//// qDebug() << "focuspoint...." << p; +// if(treeItemRec.contains(p)) +// { +// painter->save(); +// painter->setPen(QPen(QColor(Qt::red), 1)); +// painter->setBrush(Qt::red); +// painter->drawRect(treeItemRec); +// painter->restore(); +// } +// } +// } return; } break; @@ -3137,15 +3484,21 @@ bool isHover = option->state & State_MouseOver; bool isSelected = option->state & State_Selected; bool enable = option->state & State_Enabled; +// bool focus = false; +// if(const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option)){ +// focus = vi->state & State_HasFocus; +// } QBrush brush; QPen hoverPen = Qt::NoPen; QPen selectPen = Qt::NoPen; +// QPen focusPen = Qt::NoPen; QPainterPath borderPath0; QPainterPath borderPath1; sp->initConfigTreeParameters(isUseDarkPalette(), option, widget); hoverPen = sp->m_TreeParameters.treeHoverPen; selectPen = sp->m_TreeParameters.treeSelectPen; + //focusPen = sp->m_TreeParameters.treeFocusPen; if (!enable) { brush = sp->m_TreeParameters.treeBranchDisableBrush; @@ -3158,16 +3511,22 @@ } QPainterPath path; + QPainterPath rectPath; + if (option->rect.left() == 0) { //raund radius at beginning QRect rect = option->rect.adjusted(0, 0, 1, 1); + path.setFillRule(Qt::WindingFill); + int margin = 4; + path.moveTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); path.arcTo(rect.left(), rect.top(), 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 180, -90); - path.lineTo(rect.right(), rect.top()); - path.lineTo(rect.right(), rect.bottom()); + path.lineTo(rect.right() / 2.0, rect.top()); + path.lineTo(rect.right() / 2.0, rect.bottom()); path.lineTo(rect.left() + sp->m_TreeParameters.radius, rect.bottom()); path.arcTo(rect.left(), rect.bottom() - 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, -90, -90); path.lineTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); + path.addRect(rect.adjusted(sp->m_TreeParameters.radius, -margin, margin, +margin)); borderPath0.moveTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); borderPath0.arcTo(rect.left(), rect.top(), 2 * sp->m_TreeParameters.radius, 2 * sp->m_TreeParameters.radius, 180, -90); @@ -3179,7 +3538,7 @@ borderPath1.lineTo(rect.left(), rect.top() + sp->m_TreeParameters.radius); } else { - path.addRect(option->rect); + rectPath.addRect(option->rect); QRect rect = option->rect.adjusted(0, 0, 1, 1); @@ -3188,17 +3547,25 @@ borderPath1.moveTo(rect.right(), rect.bottom() - 1); borderPath1.lineTo(rect.left(), rect.bottom() - 1); } + painter->save(); + painter->setClipRect(option->rect); auto tree = qobject_cast<const QTreeView *>(widget); - painter->save(); - painter->setRenderHint(QPainter::Antialiasing, true); QPoint oldBO = painter->brushOrigin(); if(isHover && tree && tree->verticalScrollMode() == QAbstractItemView::ScrollPerPixel){ painter->setBrushOrigin(QPoint(0,0)); } painter->setPen(Qt::NoPen); painter->setBrush(brush); - painter->drawPath(path); + + if(!path.isEmpty()){ + painter->setRenderHint(QPainter::Antialiasing, true); + painter->drawPath(path); + } + + painter->setRenderHint(QPainter::Antialiasing, false); + painter->drawPath(rectPath); + painter->setBrushOrigin(oldBO); painter->restore(); @@ -3215,6 +3582,13 @@ painter->setPen(hoverPen); } +// if(focus) +// qDebug() << "branch focusssss true" << focus; +// if(option->state & State_HasFocus) +// { +// painter->setPen(focusPen); +// } + if(painter->pen().width() == 1 && sp->m_TreeParameters.radius != 0) painter->translate(0.5, 0.5); @@ -3227,8 +3601,17 @@ 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)) { @@ -3362,6 +3745,7 @@ } } + proxy()->subControlRect(control, option, SC_ScrollBarGroove, widget); return; } break; @@ -3373,10 +3757,12 @@ sp->initConfigSliderParameters(isUseDarkPalette(), option, widget); QRect groove = proxy()->subControlRect(CC_Slider, option, SC_SliderGroove, widget); QRect handle = proxy()->subControlRect(CC_Slider, option, SC_SliderHandle, widget); + int width = 0; const bool horizontal = slider->orientation == Qt::Horizontal; const bool enable = slider->state & State_Enabled; const bool hover = slider->state & State_MouseOver; const bool suken = slider->state & State_Sunken; + const bool focus = slider->state & State_HasFocus; if (slider->subControls & SC_SliderGroove) { if (horizontal) { groove.setHeight(sp->Slider_GrooveLength); @@ -3496,7 +3882,7 @@ else handle.setX((option->rect.width() - handle.width()) / 2); handleOption.rect = handle; - setSliderHandleRec(handleOption.rect); + setSliderHandleRec(const_cast<QWidget*>(widget), handleOption.rect); sp->initConfigSliderParameters(isUseDarkPalette(), &handleOption, widget); @@ -3525,6 +3911,19 @@ painter->drawPath(sp->m_SliderParameters.sliderHandlePath); painter->restore(); } + + if (enable && focus) { + painter->save(); + painter->setRenderHint(QPainter::Antialiasing, true); + painter->setPen(sp->m_SliderParameters.focusPen.width() == 0 ? Qt::NoPen : sp->m_SliderParameters.focusPen); + width = painter->pen().width(); + if(width == 1) + painter->translate(0.5, 0.5); + painter->setBrush(Qt::NoBrush); + painter->drawRoundedRect(slider->rect.adjusted(width, width, -width, -width), + sp->m_SliderParameters.radius, sp->m_SliderParameters.radius); + painter->restore(); + } return; } break; @@ -3537,6 +3936,8 @@ const bool enable = comboBox->state & State_Enabled; const bool on = comboBox->state & State_On; const bool hover = comboBox->state & State_MouseOver; + const bool focus = comboBox->state & State_HasFocus; + int width = 0; painter->save(); @@ -3571,12 +3972,26 @@ painter->setBrush(sp->m_ComboBoxParameters.comboBoxDefaultBrush); } } + + //focus + if (focus) { + width = sp->m_ComboBoxParameters.comboBoxFocusPen.width(); + painter->setPen(width <= 0 ? Qt::NoPen : sp->m_ComboBoxParameters.comboBoxFocusPen); + } } if(width == 1 && sp->m_ComboBoxParameters.radius != 0) painter->translate(0.5, 0.5); painter->drawRoundedRect(option->rect.adjusted(width, width, -width, -width), sp->m_ComboBoxParameters.radius, sp->m_ComboBoxParameters.radius); painter->restore(); + + if (comboBox->subControls & SC_ComboBoxArrow) { + QRect arrowRect = proxy()->subControlRect(CC_ComboBox, comboBox, SC_ComboBoxArrow, widget); + QStyleOption arrow = *option; + arrow.state = option->state & State_Enabled ? State_Enabled : State_None; + arrow.rect = arrowRect; + proxy()->drawPrimitive(PE_IndicatorArrowDown, &arrow, painter, widget); + } return; } break; @@ -3840,7 +4255,6 @@ painter->setPen(width <= 0 ? Qt::NoPen : sp->m_SpinBoxParameters.spinBoxUpClickPen); painter->setBrush(sp->m_SpinBoxParameters.spinBoxUpClickBrush); } else { - qDebug() << "focus." << focus; if (focus) { upOption.state |= State_MouseOver; int width = sp->m_SpinBoxParameters.spinBoxUpFocusHoverPen.width(); @@ -3876,6 +4290,28 @@ painter->restore(); } else { upOption.state = State_None; + int width = sp->m_SpinBoxParameters.spinBoxUpDisablePen.width(); + painter->setPen(width <= 0 ? Qt::NoPen : sp->m_SpinBoxParameters.spinBoxUpDisablePen); + painter->setBrush(sp->m_SpinBoxParameters.spinBoxUpDisableBrush); + QPainterPath upPath; + + upRect.adjust(0, 0, 1 - width, 1); + upPath.moveTo(upRect.left(), upRect.top() + sp->m_SpinBoxParameters.radius); + upPath.arcTo(upRect.left(), upRect.top(), sp->m_SpinBoxParameters.radius * 2, sp->m_SpinBoxParameters.radius * 2, 180, -90); + upPath.lineTo(upRect.right() - sp->m_SpinBoxParameters.radius, upRect.top()); + upPath.arcTo(upRect.right() - 2 * sp->m_SpinBoxParameters.radius, upRect.top(), sp->m_SpinBoxParameters.radius * 2, + sp->m_SpinBoxParameters.radius * 2, 90, -90); + upPath.lineTo(upRect.right(), upRect.bottom()); + upPath.lineTo(upRect.left(), upRect.bottom()); + upPath.lineTo(upRect.left(), upRect.top() + sp->m_SpinBoxParameters.radius); + + if(painter->pen().width() == 1 && sp->m_SpinBoxParameters.radius != 0) + painter->translate(0.5, 0.5); + + painter->drawPath(upPath); +// painter->drawRect(upRect); + painter->restore(); + } //down button @@ -3934,7 +4370,31 @@ // painter->drawRect(downRect); painter->restore(); } else { + QPainterPath downPath; + painter->save(); + painter->setRenderHint(QPainter::Antialiasing, sp->m_SpinBoxParameters.radius != 0); + downOption.state = State_None; + int width = sp->m_SpinBoxParameters.spinBoxDownDisablePen.width(); + painter->setPen(width <= 0 ? Qt::NoPen : sp->m_SpinBoxParameters.spinBoxDownDisablePen); + painter->setBrush(sp->m_SpinBoxParameters.spinBoxDownDisableBrush); + downRect.adjust(0, 0, 1 - width, 1 - width); + downPath.moveTo(downRect.left(), downRect.bottom() - sp->m_SpinBoxParameters.radius); + downPath.arcTo(downRect.left(), downRect.bottom() - sp->m_SpinBoxParameters.radius * 2, sp->m_SpinBoxParameters.radius * 2, + sp->m_SpinBoxParameters.radius * 2, 180, 90); + downPath.lineTo(downRect.right() - sp->m_SpinBoxParameters.radius, downRect.bottom()); + downPath.arcTo(downRect.right() - sp->m_SpinBoxParameters.radius * 2, downRect.bottom() - sp->m_SpinBoxParameters.radius * 2, + sp->m_SpinBoxParameters.radius * 2, sp->m_SpinBoxParameters.radius * 2, 270, 90); + downPath.lineTo(downRect.right(), downRect.top()); + downPath.lineTo(downRect.left(), downRect.top()); + downPath.lineTo(downRect.left(), downRect.bottom() - sp->m_SpinBoxParameters.radius); + + if(painter->pen().width() == 1 && sp->m_SpinBoxParameters.radius != 0) + painter->translate(0.5, 0.5); + + painter->drawPath(downPath); +// painter->drawRect(downRect); + painter->restore(); } if (!enable) { @@ -4102,6 +4562,12 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const { + QString systemLang = QLocale::system().name(); + if(systemLang == "ug_CN" || systemLang == "ky_KG" || systemLang == "kk_KZ"){ + QGuiApplication::setLayoutDirection(Qt::RightToLeft); + } else { + QGuiApplication::setLayoutDirection(Qt::LeftToRight); + } switch (element) { case CE_ScrollBarSlider: { @@ -4122,8 +4588,10 @@ painter->setPen(Qt::NoPen); painter->setRenderHint(QPainter::Antialiasing, true); + bool hasAnimation = widget &&(!widget->property("animation").isValid() || + (widget->property("animation").isValid() && widget->property("animation").toBool())); - if(sp->m_ScrollBarParameters.animation) { + if(hasAnimation) { qreal len; if(sp->m_ScrollBarParameters.grooveWidthAnimation){ //width animation @@ -4137,7 +4605,7 @@ animator->startAnimator("groove_width"); } } - if(widget->isEnabled()) + if(widget && widget->isEnabled()) len = animator->value("groove_width").toReal() * 4 * sp->m_scaleRatio2_1 + 4; else len = 4; @@ -4153,7 +4621,7 @@ drawRect = bar->rect; } - setScrollbarSliderRec(QRect(drawRect.x(), drawRect.y(), drawRect.width(), drawRect.height())); + setScrollbarSliderRec(const_cast<QWidget*>(widget), QRect(drawRect.x(), drawRect.y(), drawRect.width(), drawRect.height())); //hover color animation // animator->setAnimatorDirectionForward("slider_opacity", mouseOver); @@ -4355,6 +4823,7 @@ const bool enable = button->state & State_Enabled; const bool text = !button->text.isEmpty(); const bool icon = !button->icon.isNull(); + const bool inactive = enable && !(button->state & State_Active); bool isImportant = false; if (widget && widget->property("isImportant").isValid()) { @@ -4428,10 +4897,12 @@ } if (iconRect.isValid()) { - if (widget && !widget->property("useIconHighlightEffect").isValid()) { + bool qqcButtonUseSymbolicIcon = option->styleObject && option->styleObject->inherits("QQuickStyleItem1") && button->icon.name().contains("symbolic"); + if ((widget && !widget->property("useIconHighlightEffect").isValid()) || qqcButtonUseSymbolicIcon) { if (!sp->m_PushButtonParameters.iconHoverClickHighlight) { pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, &sub, widget); - } else { + } + else{ pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, &sub, widget); } } else { @@ -4457,10 +4928,16 @@ // } else { // proxy()->drawItemText(painter, textRect, tf, button->palette, false, button->text, QPalette::ButtonText); // } - painter->setBrush(Qt::NoBrush); - painter->setPen(QPen(sp->m_PushButtonParameters.textColor)); - painter->drawText(textRect, button->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); + QColor penColor = sp->m_PushButtonParameters.textDefaultColor; + if(!enable) + penColor = sp->m_PushButtonParameters.textDisableColor; + else if(button->state & QStyle::State_MouseOver || button->state & QStyle::State_Sunken) + penColor = sp->m_PushButtonParameters.textHoverColor; + painter->setBrush(Qt::NoBrush); + painter->setPen(QPen(penColor)); +// painter->drawText(textRect, button->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); + painter->drawText(textRect,tf, button->text); // proxy()->drawItemText(painter, textRect, tf, button->palette, false, button->text, sp->m_PushButtonParameters.textColor); } @@ -4478,6 +4955,7 @@ const bool arrow = tb->features & QStyleOptionToolButton::MenuButtonPopup; const bool ha = tb->features & QStyleOptionToolButton::Arrow; const bool enable = tb->state & State_Enabled; + const bool inactive = enable && !(tb->state & State_Active); QFontMetrics fm = tb->fontMetrics; int Margin_Height = sp->Button_MarginHeight; int ToolButton_MarginWidth = sp->ToolButton_MarginWidth; @@ -4582,8 +5060,14 @@ // } else { // proxy()->drawItemText(painter, textRect, alignment, tb->palette, false, tb->text, QPalette::ButtonText); // } + QColor penColor = sp->m_ToolButtonParameters.textDefaultColor; + if(!enable) + penColor = sp->m_ToolButtonParameters.textDisableColor; + else if(tb->state & QStyle::State_MouseOver || tb->state & QStyle::State_Sunken) + penColor = sp->m_ToolButtonParameters.textHoverColor; + painter->setBrush(Qt::NoBrush); - painter->setPen(QPen(sp->m_ToolButtonParameters.textColor)); + painter->setPen(QPen(penColor)); painter->drawText(textRect, tb->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); } @@ -4746,181 +5230,56 @@ // penPath.arcTo(QRect(drawRect.right() - moveWidth - TabBarTab_Radius * 2, drawRect.top(), // TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); // penPath.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); + } else if (hover){ + + path.addRoundedRect(drawRect, TabBarTab_Radius, TabBarTab_Radius); + } else { - if (widget != NULL && qobject_cast<const QTabBar*>(widget)) { - const auto *tabbar = qobject_cast<const QTabBar*>(widget); - int select_index = tabbar->currentIndex(); - int now_index = tabbar->tabAt(QPoint(drawRect.x(),drawRect.y())); - int tab_count = tabbar->count(); - - if (select_index - now_index == 1) { - //select rect left - drawRect.adjust(0, 0, tabOverlap, 0); - if (now_index == 0) { - path.moveTo(drawRect.left(), drawRect.top() + TabBarTab_Radius); - path.lineTo(drawRect.left(), drawRect.bottom()); - path.lineTo(drawRect.right() - TabBarTab_Radius, drawRect.bottom()); - path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.bottom() - TabBarTab_Radius * 2, - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 270, 90); - path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); - path.arcTo(QRect(drawRect.right(), drawRect.top(), - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, -90); - path.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); - path.arcTo(QRect(drawRect.left(), drawRect.top(), - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, 90); - -// penPath.moveTo(drawRect.left(), drawRect.top() + TabBarTab_Radius); -// penPath.lineTo(drawRect.left(), drawRect.bottom()); -// penPath.moveTo(drawRect.right() - moveWidth - TabBarTab_Radius, drawRect.bottom()); -// penPath.arcTo(QRect(drawRect.right() - moveWidth - TabBarTab_Radius * 2, drawRect.bottom() - TabBarTab_Radius * 2, -// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 270, 90); -// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top() + TabBarTab_Radius); -// penPath.arcTo(QRect(drawRect.right() - moveWidth, drawRect.top(), -// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, -90); -// penPath.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); -// penPath.arcTo(QRect(drawRect.left(), drawRect.top(), -// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, 90); - } else { - path.moveTo(drawRect.left(), drawRect.top()); - path.lineTo(drawRect.left(), drawRect.bottom()); - path.lineTo(drawRect.right() - TabBarTab_Radius, drawRect.bottom()); - path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.bottom() - TabBarTab_Radius * 2, - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 270, 90); - path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); - path.arcTo(QRect(drawRect.right(), drawRect.top(), - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, -90); - path.lineTo(drawRect.left(), drawRect.top()); - -// penPath.moveTo(drawRect.left(), drawRect.top()); -// penPath.lineTo(drawRect.left(), drawRect.bottom()); -// penPath.moveTo(drawRect.right() - moveWidth - TabBarTab_Radius, drawRect.bottom()); -// penPath.arcTo(QRect(drawRect.right() - moveWidth - TabBarTab_Radius * 2, drawRect.bottom() - TabBarTab_Radius * 2, -// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 270, 90); -// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top() + TabBarTab_Radius); -// penPath.arcTo(QRect(drawRect.right() - moveWidth, drawRect.top(), -// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, -90); -// penPath.lineTo(drawRect.left(), drawRect.top()); - } - } else if(select_index - now_index == -1) { - //select rect right - drawRect.adjust(0, 0, tabOverlap, 0); - if (now_index == tab_count - 1) { - path.moveTo(drawRect.right(), drawRect.bottom()); - path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); - path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.top(), - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); - path.lineTo(drawRect.left() - TabBarTab_Radius, drawRect.top()); - path.arcTo(QRect(drawRect.left() - TabBarTab_Radius * 2, drawRect.top(), - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, -90); - path.lineTo(drawRect.left(), drawRect.bottom() - TabBarTab_Radius); - path.arcTo(QRect(drawRect.left(), drawRect.bottom() - TabBarTab_Radius * 2, - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, 90); - path.lineTo(drawRect.right(), drawRect.bottom()); - -// penPath.moveTo(drawRect.right() - moveWidth, drawRect.bottom()); -// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top() + TabBarTab_Radius); -// penPath.arcTo(QRect(drawRect.right() - moveWidth - TabBarTab_Radius * 2, drawRect.top(), -// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); -// penPath.lineTo(drawRect.left() - TabBarTab_Radius, drawRect.top()); -// penPath.arcTo(QRect(drawRect.left() - TabBarTab_Radius * 2, drawRect.top(), -// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, -90); -// penPath.lineTo(drawRect.left(), drawRect.bottom() - TabBarTab_Radius); -// penPath.arcTo(QRect(drawRect.left(), drawRect.bottom() - TabBarTab_Radius * 2, -// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, 90); - } else { - path.moveTo(drawRect.right(), drawRect.bottom()); - path.lineTo(drawRect.right(), drawRect.top()); - path.lineTo(drawRect.left() - TabBarTab_Radius, drawRect.top()); - path.arcTo(QRect(drawRect.left() - TabBarTab_Radius * 2, drawRect.top(), TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, -90); - path.lineTo(drawRect.left(), drawRect.bottom() - TabBarTab_Radius); - path.arcTo(QRect(drawRect.left(), drawRect.bottom() - TabBarTab_Radius * 2, - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, 90); - path.lineTo(drawRect.right(), drawRect.bottom()); - -// penPath.moveTo(drawRect.right() - moveWidth, drawRect.bottom()); -// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top()); -// penPath.lineTo(drawRect.left() - TabBarTab_Radius, drawRect.top()); -// penPath.arcTo(QRect(drawRect.left() - TabBarTab_Radius * 2, drawRect.top(), TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, -90); -// penPath.lineTo(drawRect.left(), drawRect.bottom() - TabBarTab_Radius); -// penPath.arcTo(QRect(drawRect.left(), drawRect.bottom() - TabBarTab_Radius * 2, -// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, 90); - } - } else { - if (now_index == 0) { - drawRect.adjust(0, 0, tabOverlap, 0); - path.moveTo(drawRect.left(), drawRect.top() + TabBarTab_Radius); - path.lineTo(drawRect.left(), drawRect.bottom()); - path.lineTo(drawRect.right(), drawRect.bottom()); - path.lineTo(drawRect.right(), drawRect.top()); - path.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); - path.arcTo(QRect(drawRect.left(), drawRect.top(), - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, 90); - - -// penPath.moveTo(drawRect.left(), drawRect.top() + TabBarTab_Radius); -// penPath.lineTo(drawRect.left(), drawRect.bottom()); -// penPath.moveTo(drawRect.right() - moveWidth, drawRect.bottom()); -// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top()); -// penPath.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); -// penPath.arcTo(QRect(drawRect.left(), drawRect.top(), -// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, 90); - - } else if (now_index == tab_count - 1) { - drawRect.adjust(0, 0, tabOverlap, 0); - path.moveTo(drawRect.right(), drawRect.bottom()); - path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); - path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.top(), - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); - path.lineTo(drawRect.left(), drawRect.top()); - path.lineTo(drawRect.left(), drawRect.bottom()); - path.lineTo(drawRect.right(), drawRect.bottom()); - -// penPath.moveTo(drawRect.right() - moveWidth, drawRect.bottom()); -// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top() + TabBarTab_Radius); -// penPath.arcTo(QRect(drawRect.right() - moveWidth - TabBarTab_Radius * 2, drawRect.top(), -// TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); -// penPath.lineTo(drawRect.left(), drawRect.top()); -// penPath.lineTo(drawRect.left(), drawRect.bottom()); - } else { - path.addRect(drawRect); -// penPath.addRect(drawRect); - } - } - } else { - path.addRect(drawRect); -// penPath.addRect(drawRect); - } + + path.addRect(drawRect); } - int penWidth = sp->m_TabWidgetParameters.tabBarPen.width(); - drawRect.adjust(0, 0, -1, 0); - penPath.moveTo(drawRect.left(), drawRect.bottom() - penWidth); - penPath.lineTo(drawRect.left(), drawRect.top()); - penPath.lineTo(drawRect.right(), drawRect.top()); - penPath.lineTo(drawRect.right(), drawRect.bottom() - penWidth); - penPath.lineTo(drawRect.left(), drawRect.bottom() - penWidth); + int penWidth = (sp->m_TabWidgetParameters.tabBarDefaultPen == Qt::NoPen || + sp->m_TabWidgetParameters.tabBarDefaultPen.color().alpha() == 0) ? + 0 : sp->m_TabWidgetParameters.tabBarDefaultPen.width(); + int radius = sp->m_TabWidgetParameters.radius; + QPen pen = Qt::NoPen; +// drawRect.adjust(0, 0, -1 * penWidth, 0); +// penPath.moveTo(drawRect.left(), drawRect.bottom() - penWidth - radius); +// penPath.lineTo(drawRect.left(), drawRect.top()); +// penPath.lineTo(drawRect.right(), drawRect.top()); +// penPath.lineTo(drawRect.right(), drawRect.bottom() - penWidth); +// penPath.lineTo(drawRect.left(), drawRect.bottom() - penWidth); if(click) { + penWidth = sp->m_TabWidgetParameters.tabBarClickPen.width(); painter->setBrush(sp->m_TabWidgetParameters.tabBarClickBrush); + pen = sp->m_TabWidgetParameters.tabBarClickPen; } else if (selected) { painter->setBrush(sp->m_TabWidgetParameters.tabBarSelectBrush); } else if (hover) { + penWidth = sp->m_TabWidgetParameters.tabBarHoverPen.width(); painter->setBrush(sp->m_TabWidgetParameters.tabBarHoverBrush); + pen = sp->m_TabWidgetParameters.tabBarHoverPen; } else{ + penWidth = sp->m_TabWidgetParameters.tabBarDefaultPen.width(); painter->setBrush(sp->m_TabWidgetParameters.tabBarDefaultBrush); + pen = sp->m_TabWidgetParameters.tabBarDefaultPen; + } + if((tab->state & State_Enabled) && (tab->state & State_HasFocus)){ + penWidth = sp->m_TabWidgetParameters.tabBarFocusPen.width(); + pen = sp->m_TabWidgetParameters.tabBarFocusPen; } painter->drawPath(path); painter->restore(); painter->save(); - painter->setPen(penWidth > 0 ? sp->m_TabWidgetParameters.tabBarPen : Qt::NoPen); + painter->setPen(penWidth > 0 ? pen : Qt::NoPen); painter->setBrush(Qt::NoBrush); painter->setRenderHint(QPainter::Antialiasing, true); - if(painter->pen().width() == 1) - painter->translate(0.5, 0.5); - painter->drawPath(penPath); - painter->restore(); - painter->save(); +// if(painter->pen().width() == 1) +// painter->translate(0.5, 0.5); + painter->drawRoundedRect(drawRect.adjusted(penWidth/2, penWidth/2, -1 * penWidth/2, -1 * penWidth), radius, radius); painter->restore(); return; @@ -5014,14 +5373,8 @@ case CE_ComboBoxLabel: { if (const QStyleOptionComboBox *comboBox = qstyleoption_cast<const QStyleOptionComboBox *>(option)) { - QRect arrowRect = proxy()->subControlRect(CC_ComboBox, comboBox, SC_ComboBoxArrow, widget); QRect editRect = proxy()->subControlRect(CC_ComboBox, comboBox, SC_ComboBoxEditField, widget); - QStyleOption arrow = *option; - arrow.state = option->state & State_Enabled ? State_Enabled : State_None; - arrow.rect = arrowRect; - proxy()->drawPrimitive(PE_IndicatorArrowDown, &arrow, painter, widget); - painter->save(); painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); if (!comboBox->currentIcon.isNull()) { @@ -5185,6 +5538,7 @@ { if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) { const bool enable(menuItem->state & State_Enabled); + const bool focus = menuItem->state & State_HasFocus; if (menuItem->menuItemType == QStyleOptionMenuItem::EmptyArea) { return; } @@ -5222,6 +5576,14 @@ painter->drawRoundedRect(drawRect, sp->m_MenuParameters.itemRadius, sp->m_MenuParameters.itemRadius); painter->restore(); } + if(enable && focus){ + painter->save(); + painter->setRenderHint(QPainter::Antialiasing); + painter->setPen(sp->m_MenuParameters.menuItemFocusPen); + painter->setBrush(Qt::transparent); + painter->drawRoundedRect(drawRect, sp->m_MenuParameters.itemRadius, sp->m_MenuParameters.itemRadius); + painter->restore(); + } int MenuItem_Spacing = sp->MenuItem_Spacing; int MenuItem_HMargin = sp->MenuContent_HMargin; @@ -5244,9 +5606,9 @@ QIcon::Mode mode = enable ? QIcon::Active : QIcon::Disabled; QPixmap pixmap = icon.pixmap(iconWidth, iconWidth, mode , QIcon::On); QPixmap drawPixmap; - if(!isComboBox && !sp->indicatorIconHoverNeedHighLight) - drawPixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - else +// if(!isComboBox && !sp->indicatorIconHoverNeedHighLight) +// drawPixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); +// else drawPixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); QRect iconRect(drawRect.x(), drawRect.y() + (drawRect.height() - iconWidth) / 2, iconWidth, iconWidth); @@ -5265,9 +5627,9 @@ QIcon::Mode mode = enable ? (selected ? QIcon::Active : QIcon::Normal) : QIcon::Disabled; QPixmap pixmap = icon.pixmap(iconWidth, iconWidth, mode , QIcon::On); QPixmap drawPixmap; - if(!isComboBox && !sp->indicatorIconHoverNeedHighLight) - drawPixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - else +// if(!isComboBox && !sp->indicatorIconHoverNeedHighLight) +// drawPixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); +// else drawPixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); QRect iconRect(drawRect.x(), drawRect.y() + (drawRect.height() - iconWidth) / 2, iconWidth, iconWidth); @@ -5284,33 +5646,12 @@ bool hasIcon = false; - if(isComboBox) - { - auto *comboBox = qobject_cast<const QComboBox*>(widget); - int column = comboBox->count(); - for(int i = 0; i < column; i++) - { - if(!comboBox->itemIcon(i).isNull()){ - hasIcon = true; - break; - } - } - } - else if(menuItem->maxIconWidth != 0) + if (isComboBox) { + if(!menuItem->icon.isNull()) + hasIcon = true; + } else if(menuItem->maxIconWidth != 0) { hasIcon = true; - -// if(qobject_cast<const QMenu*>(widget)) -// { -// auto *menu = qobject_cast<const QMenu*>(widget); -// int column = menu->actions().length(); -// for(int i = 0; i < column; i++) -// { -// if(!menu->actions().at(i)->icon().isNull()) -// { -// hasIcon = true; -// } -// } -// } + } if (menuItem->menuHasCheckableItems || hasIcon) { int iconWidth = proxy()->pixelMetric(PM_SmallIconSize, option, widget); @@ -5344,9 +5685,9 @@ QPixmap pixmap = menuItem->icon.pixmap(iconSize, mode, state); pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); QPixmap target; - if(!isComboBox && !sp->indicatorIconHoverNeedHighLight) - target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - else +// if(!isComboBox && !sp->indicatorIconHoverNeedHighLight) +// target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); +// else target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); @@ -5360,6 +5701,7 @@ painter->drawPixmap(iconRect, target); painter->restore(); } + //text if (!menuItem->text.isEmpty()) { QString text = menuItem->text; @@ -5386,7 +5728,7 @@ if (layout) textToDraw_flags |= Qt::AlignRight; else - textToDraw_flags |= Qt::AlignLeft; + textToDraw_flags |= Qt::AlignLeft | Qt::AlignAbsolute; painter->drawText(drawRect, textToDraw_flags, textToDraw); } @@ -5399,12 +5741,12 @@ if (layout) text_flags |= Qt::AlignLeft; else - text_flags |= Qt::AlignRight; + text_flags |= Qt::AlignRight | Qt::AlignAbsolute; QFontMetrics metrics(font); QString elidedText = metrics.elidedText(text, Qt::ElideRight, drawRect.width()); - painter->drawText(drawRect, text_flags, elidedText); + painter->restore(); } return; @@ -5427,7 +5769,7 @@ if (const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(option)) { painter->save(); painter->setPen(Qt::NoPen); - if(widget->isEnabled()){ + if(widget && widget->isEnabled()){ painter->setBrush(tb->palette.button().color()); if(option->state & State_MouseOver) { @@ -5545,8 +5887,6 @@ if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { sp->initConfigProgressBarParameters(isUseDarkPalette(), pb, widget); - QBrush brush = sp->m_ProgressBarParameters.progressBarContentBrush; - const bool vertical = pb->orientation == Qt::Vertical; const bool inverted = pb->invertedAppearance; @@ -5554,19 +5894,25 @@ if (inverted) reverse = !reverse; - QColor progressBarContentHightColor = sp->m_ProgressBarParameters.progressBarContentHightColor; - QColor progressBarContentMidLightColor = sp->m_ProgressBarParameters.progressBarContentMidLightColor; - QLinearGradient linearGradient; + if(vertical){ + linearGradient.setStart(pb->rect.bottomRight()); + linearGradient.setFinalStop(pb->rect.topLeft()); + } + else{ + linearGradient.setStart(pb->rect.topLeft()); + linearGradient.setFinalStop(pb->rect.bottomRight()); + } + linearGradient.setStops(sp->m_ProgressBarParameters.progressBarContentBrush.gradient()->stops()); + QBrush brush(linearGradient); + if (QVariantAnimation *animation = m_animation_helper->animation(option->styleObject)) { if(animation->state() == QAbstractAnimation::Running){ bool forward = animation->direction() == QAbstractAnimation::Forward; if(!forward) reverse = !reverse; - linearGradient.setColorAt(0, progressBarContentMidLightColor); - linearGradient.setColorAt(1, progressBarContentHightColor); - + linearGradient.setStops(sp->m_ProgressBarParameters.progressBarContentBrush.gradient()->stops()); if (vertical) { if (reverse) { linearGradient.setStart(pb->rect.bottomLeft()); @@ -5595,8 +5941,8 @@ QColor penColor = sp->m_ProgressBarParameters.progressBarContentPen.color(); int width = (penColor.alpha() == 0 || penColor == Qt::NoPen) ? 0 : sp->m_ProgressBarParameters.progressBarContentPen.width(); painter->setPen(width > 0 ? sp->m_ProgressBarParameters.progressBarContentPen : Qt::NoPen); -// if(width == 1 && sp->m_ProgressBarParameters.radius != 0) -// painter->translate(0.5, 0.5); + // if(width == 1 && sp->m_ProgressBarParameters.radius != 0) + // painter->translate(0.5, 0.5); painter->setBrush(brush); width = (sp->m_ProgressBarParameters.progressBarGrooveDefaultPen.color().alpha() == 0 || sp->m_ProgressBarParameters.progressBarGrooveDefaultPen.color() == Qt::NoPen) ? @@ -5695,6 +6041,7 @@ proxy()->drawPrimitive(PE_IndicatorHeaderArrow, &subopt, painter, widget); } painter->setClipRegion(clipRegion); + return; } break; @@ -5773,7 +6120,7 @@ const bool enable = option->state & State_Enabled; painter->save(); painter->setPen(Qt::NoPen); - painter->setBrush(option->palette.brush(enable ? QPalette::Active : QPalette::Disabled, QPalette::Base)); + painter->setBrush(Qt::NoBrush);//option->palette.brush(enable ? QPalette::Active : QPalette::Disabled, QPalette::Base)); painter->drawRect(option->rect); painter->restore(); return; @@ -5792,6 +6139,7 @@ proxy()->drawPrimitive(PE_PanelItemViewItem, option, painter, widget); + if (vi->features & QStyleOptionViewItem::HasCheckIndicator) { QStyleOptionButton option; option.rect = checkRect; @@ -5820,7 +6168,19 @@ // mode = QIcon::Selected; QIcon::State state = vi->state & QStyle::State_Open ? QIcon::On : QIcon::Off; QPixmap pixmap = vi->icon.pixmap(vi->decorationSize, mode, state); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, vi); + + if(!sp->indicatorIconHoverNeedHighLight) + pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); + else if(widget && (widget->inherits("QTreeView") || widget->inherits("QTreeWidget"))){ + if(widget->property("highlightMode").isValid() && widget->property("highlightMode").toBool()) + pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); + else + pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); + } + else + pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); + + //pixmap = proxy()->generatedIconPixmap(mode, pixmap, vi); painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); proxy()->drawItemPixmap(painter, iconRect, vi->decorationAlignment, HighLightEffect::ordinaryGeneratePixmap(pixmap, vi, widget)); } @@ -5829,15 +6189,20 @@ QPen ViewItemHover; QPen ViewItemSelect; + QPen ViewItemDisable; + if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) { ViewItemHover = sp->m_TreeParameters.treeTextHoverPen; ViewItemSelect = sp->m_TreeParameters.treeTextSelectPen; + ViewItemDisable = sp->m_TreeParameters.treeTextDisablePen; } else if(qobject_cast<const QListView *>(widget) || qobject_cast<const QListWidget *>(widget)){ ViewItemHover = sp->m_ListParameters.listTextHoverPen; ViewItemSelect = sp->m_ListParameters.listTextSelectPen; + ViewItemDisable = sp->m_ListParameters.listTextDisablePen; } else if(qobject_cast<const QTableView *>(widget) || qobject_cast<const QTableWidget *>(widget)){ ViewItemHover = sp->m_TableParameters.tableTextHoverPen; ViewItemSelect = sp->m_TableParameters.tableTextSelectPen; + ViewItemDisable = sp->m_TableParameters.tableTextDisablePen; } else { @@ -5849,7 +6214,9 @@ if (cg == QPalette::Normal && !(vi->state & QStyle::State_Active)) cg = QPalette::Inactive; - if (((vi->decorationPosition == QStyleOptionViewItem::Top) || (vi->decorationPosition == QStyleOptionViewItem::Bottom)) + if(!vi->state & QStyle::State_Enabled) + painter->setPen(ViewItemDisable); + else if (((vi->decorationPosition == QStyleOptionViewItem::Top) || (vi->decorationPosition == QStyleOptionViewItem::Bottom)) && !(vi->state & State_Selected) && (vi->state & QStyle::State_Enabled)) { painter->setPen(vi->palette.color(cg, QPalette::Text)); } @@ -5871,6 +6238,18 @@ viewItemDrawText(painter, vi, textRect); } + +// if(vi->state & QStyle::State_HasFocus){ +// QStyleOptionFocusRect o; +// o.QStyleOption::operator=(*vi); +// o.rect = proxy()->subElementRect(SE_ItemViewItemFocusRect, vi, widget); +// qDebug() << "ooooooo" << o.rect << proxy()->subElementRect(SE_TreeViewDisclosureItem, vi, widget); +// painter->save(); +// painter->setPen(QPen(QColor(Qt::blue), 1)); +// painter->setBrush(Qt::NoBrush); +// painter->drawRect(o.rect); +// painter->restore(); +// } painter->restore(); return; } @@ -6108,8 +6487,7 @@ int lineLength = 0; int distance = 4; if (sp->ScrooBar_ShowLine && widget && ((widget->property("drawScrollBarGroove").isValid() && - widget->property("drawScrollBarGroove").toBool()) || !widget->property("drawScrollBarGroove").isValid())) - { + widget->property("drawScrollBarGroove").toBool()) || !widget->property("drawScrollBarGroove").isValid())) { lineLength = sp->ScroolBar_LineLength; distance = 0; } @@ -6130,8 +6508,14 @@ } auto animator = m_scrollbar_animation_helper->animator(widget); - if (animator && sp->m_ScrollBarParameters.animation) { -// qDebug() << "bar value..." << bar->sliderValue << bar->sliderPosition; + bool hasAnimation = widget &&(!widget->property("animation").isValid() || + (widget->property("animation").isValid() && widget->property("animation").toBool())); + int sliderstart = lineLength + sliderPositionFromValue(bar->minimum, bar->maximum, + bar->sliderPosition,maxlen - sliderlen, bar->upsideDown) + distance / 2; + + aScrollBarDebug << "sliderstart0000......" << sliderstart << lineLength << bar->sliderPosition; + if (animator && hasAnimation) { + aScrollBarDebug << "bar value..." << bar->sliderValue << bar->sliderPosition; if(animator->isRunning("move_position") || (animator->getExtraProperty("start_position").toInt() != animator->getExtraProperty("end_position").toInt() && @@ -6144,15 +6528,24 @@ int startValue = animator->getExtraProperty("start_position").toInt(); int endValue = animator->getExtraProperty("end_position").toInt(); int v = startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal(); -// qDebug() << "v...................." << v << startValue << endValue; - if(v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)) + aScrollBarDebug << "v...................." << v << startValue << endValue; + if (v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)) { sbar->setValue(v); + auto startPos = sliderPositionFromValue(bar->minimum, bar->maximum, startValue, + maxlen - sliderlen, bar->upsideDown) + distance / 2; + auto endPos = sliderPositionFromValue(bar->minimum, bar->maximum, + endValue, maxlen - sliderlen, bar->upsideDown) + distance / 2; + + aScrollBarDebug << "startpos....:" << startPos << "endpos...:" << endPos; + sliderstart = lineLength + startPos + (endPos - startPos) * 1.0 * animator->value("move_position").toReal(); + aScrollBarDebug << "sliderstart11111......" << sliderstart; + + } } } } } - int sliderstart = lineLength + sliderPositionFromValue(bar->minimum, bar->maximum, bar->sliderPosition, maxlen - sliderlen, bar->upsideDown) + distance / 2; switch (subControl) { case SC_ScrollBarSubLine: { @@ -6195,24 +6588,36 @@ case SC_ScrollBarSlider: { - if(!animator->isRunning("move_position") && animator->currentAnimatorTime("move_position") != 0){ -// qDebug() << "stop animator time........."; + if(animator && !animator->isRunning("move_position") && animator->currentAnimatorTime("move_position") != 0){ + aScrollBarDebug << "stop animator time........."; animator->setAnimatorCurrentTime("move_position", 0); animator->setExtraProperty("end_position", 0); animator->setExtraProperty("start_position", 0); } + QRect r; if (horizontal) - return QRect(sliderstart, 0, sliderlen, rect.height()); + r = QRect(sliderstart, 0, sliderlen, rect.height()); else - return QRect(0, sliderstart, rect.width(), sliderlen); + r = QRect(0, sliderstart, rect.width(), sliderlen); + QWidget *w = const_cast<QWidget *>(widget); + aScrollBarDebug << "SC_ScrollBarSlider......" << w << r; + if (w) + w->setProperty("ScrollBarSliderRect", r); + return r; } case SC_ScrollBarGroove: { + QRect r; if (horizontal) - return QRect(rect.x() + lineLength, rect.y(), rect.width() - 2 * lineLength, rect.height()); + r = QRect(rect.x() + lineLength, rect.y(), rect.width() - 2 * lineLength, rect.height()); else - return QRect(rect.x(), rect.y() + lineLength, rect.width(), rect.height() - 2 * lineLength); + r = QRect(rect.x(), rect.y() + lineLength, rect.width(), rect.height() - 2 * lineLength); + QWidget *w = const_cast<QWidget *>(widget); + aScrollBarDebug << "SC_ScrollBarGroove......" << w << r; + if (w) + w->setProperty("ScrollBarGrooveRect", r); + return r; } default: @@ -6245,38 +6650,53 @@ { auto animator = m_slider_animation_helper->animator(widget); - if (slider && animator && sp->m_SliderParameters.animation){ + int sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum, slider->sliderValue, + proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); + aScrollBarDebug << "sliderPos000........" << sliderPos; + bool hasAnimation = widget && ((widget->property("animation").isValid() && widget->property("animation").toBool()) || + (!widget->property("animation").isValid())); + if (slider && animator && hasAnimation){ if(animator->isRunning("move_position") || (animator->getExtraProperty("start_position").toInt() != animator->getExtraProperty("end_position").toInt() && slider->sliderValue != animator->getExtraProperty("end_position").toInt())) { auto sliderBar = qobject_cast<const QAbstractSlider *>(widget); -// qDebug() << "value......." << subControl << slider->sliderValue << animator->getExtraProperty("start_position").toInt(); -// qDebug() << "isrunning............." << animator->isRunning("move_position"); -// qDebug() << "CC_Slider.....:" << animator->isRunning("move_position") << animator->value("move_position").toReal(); -// qDebug() << "value:.........." << animator->value("move_position").toReal(); + aScrollBarDebug << "value......." << subControl << slider->sliderValue << animator->getExtraProperty("start_position").toInt(); + aScrollBarDebug << "isrunning............." << animator->isRunning("move_position"); + aScrollBarDebug << "CC_Slider.....:" << animator->isRunning("move_position") << animator->value("move_position").toReal(); + aScrollBarDebug << "value:.........." << animator->value("move_position").toReal(); QAbstractSlider *sbar = const_cast<QAbstractSlider *>(sliderBar); - if(sbar){ + if (sbar) { int startValue = animator->getExtraProperty("start_position").toInt(); int endValue = animator->getExtraProperty("end_position").toInt(); -// qDebug() << "startvalue:" << startValue << "endvalue:" << endValue -// << animator->getExtraProperty("start_position").toInt() -// << animator->getExtraProperty("end_position").toInt(); + aScrollBarDebug << "startvalue:" << startValue << "endvalue:" << endValue + << animator->getExtraProperty("start_position").toInt() + << animator->getExtraProperty("end_position").toInt(); int v = startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal(); - if(v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)) + aScrollBarDebug << "vvvvvvvvvvv" << v; + if(v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)){ sbar->setValue(startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal()); + + auto startPos = sliderPositionFromValue(slider->minimum, slider->maximum, startValue, + proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); + auto endPos = sliderPositionFromValue(slider->minimum, slider->maximum, endValue, + proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); + sliderPos = startPos + (endPos - startPos) * 1.0 * animator->value("move_position").toReal(); + aScrollBarDebug << "sliderPos1111........" << sliderPos; + } + aScrollBarDebug << "sbar value:" << sbar->value(); } } } - if (animator && sp->m_SliderParameters.animation) { + if (animator && hasAnimation) { if(!animator->isRunning("move_position") && animator->currentAnimatorTime("move_position") != 0){ animator->setAnimatorCurrentTime("move_position", 0); animator->setExtraProperty("end_position", 0); animator->setExtraProperty("start_position", 0); -// qDebug() << "setAnimatorCurrentTime0000000000000000" << animator->getExtraProperty("start_position").toInt() << animator->getExtraProperty("end_position").toInt(); + aScrollBarDebug << "setAnimatorCurrentTime0000000000000000" << animator->getExtraProperty("start_position").toInt() << animator->getExtraProperty("end_position").toInt(); } } @@ -6288,8 +6708,7 @@ else handleRect.setSize(QSize(handleThickness, handleLength)); handleRect.moveCenter(rect.center()); - int sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum, slider->sliderValue, - proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); + if (horizontal) { handleRect.moveLeft(sliderPos + sp->Slider_Margin); } else { @@ -6460,12 +6879,6 @@ const bool verticalTabs = option->rect.width() < option->rect.height(); const int buttonWidth = qMax(proxy()->pixelMetric(QStyle::PM_TabBarScrollButtonWidth, 0, widget), QApplication::globalStrut().width()); const int lap = proxy()->pixelMetric(QStyle::PM_TabBar_ScrollButtonOverlap, 0, widget); - if(sp->getTabBarIndicatorLayout() != UKUIConfigStyleParameters::TabBarIndicatorLayout::TabBarIndicator_Horizontal){ - QRect rect = QStyle::visualRect(option->direction, option->rect, - QRect(option->rect.right() - buttonWidth, option->rect.top() + 2, - buttonWidth, (option->rect.height() - 4) / 2)); - return rect; - } QRect rect = verticalTabs ? QRect(-lap, option->rect.height() - (buttonWidth * 2), option->rect.width() + 2 * lap, buttonWidth) : QStyle::visualRect(option->direction, option->rect, @@ -6480,13 +6893,6 @@ const int lap = proxy()->pixelMetric(QStyle::PM_TabBar_ScrollButtonOverlap, 0, widget); const int buttonWidth = qMax(proxy()->pixelMetric(QStyle::PM_TabBarScrollButtonWidth, 0, widget), QApplication::globalStrut().width()); - if(sp->getTabBarIndicatorLayout() != UKUIConfigStyleParameters::TabBarIndicatorLayout::TabBarIndicator_Horizontal){ - QRect rect = QStyle::visualRect(option->direction, option->rect, - QRect(option->rect.right() - buttonWidth, option->rect.top() + (option->rect.height()) / 2, - buttonWidth, (option->rect.height() - 4) / 2)); - return rect; - } - QRect rect = verticalTabs ? QRect(-lap, option->rect.height() - buttonWidth, option->rect.width() + 2 * lap, buttonWidth) : QStyle::visualRect(option->direction, option->rect, QRect(option->rect.right() - buttonWidth - lap, option->rect.top() + lap, @@ -6840,7 +7246,7 @@ if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(option)) { bool clear = false; if (widget) { - if (qobject_cast<QComboBox *>(widget->parent())) + if (widget->parent() && qobject_cast<QComboBox *>(widget->parent())) { return option->rect; } @@ -7027,15 +7433,17 @@ bool hasIcon = false; if(isComboBox) { - auto *comboBox = qobject_cast<const QComboBox*>(widget); - int column = comboBox->count(); - for(int i = 0; i < column; i++) - { - if(!comboBox->itemIcon(i).isNull()){ - hasIcon = true; - break; - } - } + if(!menuItem->icon.isNull()) + hasIcon = true; +// auto *comboBox = qobject_cast<const QComboBox*>(widget); +// int column = comboBox->count(); +// for(int i = 0; i < column; i++) +// { +// if(!comboBox->itemIcon(i).isNull()){ +// hasIcon = true; +// break; +// } +// } } else if(menuItem->maxIconWidth != 0) { @@ -7123,7 +7531,7 @@ newSize.setWidth(qMin(newSize.width(), sp->TabBar_DefaultMaxWidth)); } - if (qobject_cast<const QTabBar*>(widget)) { + if (widget && qobject_cast<const QTabBar*>(widget)) { //set height between min and max newSize.setHeight(qMax(newSize.height(), widget->minimumHeight())); newSize.setHeight(qMin(newSize.height(), widget->maximumHeight())); @@ -7309,11 +7717,12 @@ { if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) { const bool horizontal(slider->orientation == Qt::Horizontal); + if (horizontal) { - newSize.setHeight(newSize.height() + 2 * sp->Slider_Margin); + newSize.setHeight(qMax(newSize.height() + 2 * sp->Slider_Margin, sp->Slider_DefaultWidth)); newSize.setWidth(qMax(newSize.width(), sp->Slider_DefaultLength)); } else { - newSize.setWidth(newSize.width() + 2 * sp->Slider_Margin); + newSize.setWidth(qMax(newSize.width() + 2 * sp->Slider_Margin, sp->Slider_DefaultWidth)); newSize.setHeight(qMax(newSize.height(), sp->Slider_DefaultLength)); } return newSize; @@ -7453,3 +7862,335 @@ QRect UKUIConfigStyle::centerRect(const QRect &rect, int width, int height) const { return QRect(rect.left() + (rect.width() - width)/2, rect.top() + (rect.height() - height)/2, width, height); } +void UKUIConfigStyle::getDefaultControlParameters(QApplication *app) +{ + //pushbutton + QSharedPointer<ConfigPushButtonParameters> pb(new ConfigPushButtonParameters); + sp->getDefaultConfigPushButtonBevelParameters(pb.data(), isUseDarkPalette()); + app->setProperty("PushButton_DefaultParameters_Radius" , pb.data()->radius); + app->setProperty("PushButton_DefaultParameters_DefaultBrush" , pb.data()->pushButtonDefaultBrush ); + app->setProperty("PushButton_DefaultParameters_ClickBrush" , pb.data()->pushButtonClickBrush ); + app->setProperty("PushButton_DefaultParameters_HoverBrush" , pb.data()->pushButtonHoverBrush ); + app->setProperty("PushButton_DefaultParameters_DisableBrush" , pb.data()->pushButtonDisableBrush ); + app->setProperty("PushButton_DefaultParameters_CheckBrush" , pb.data()->pushButtonCheckBrush ); + app->setProperty("PushButton_DefaultParameters_CheckHoverBrush" , pb.data()->pushButtonCheckHoverBrush ); + app->setProperty("PushButton_DefaultParameters_CheckClickBrush" , pb.data()->pushButtonCheckClickBrush ); + app->setProperty("PushButton_DefaultParameters_CheckDisableBrush", pb.data()->pushButtonCheckDisableBrush); + app->setProperty("PushButton_DefaultParameters_DefaultPen" , pb.data()->pushButtonDefaultPen ); + app->setProperty("PushButton_DefaultParameters_ClickPen" , pb.data()->pushButtonClickPen ); + app->setProperty("PushButton_DefaultParameters_HoverPen" , pb.data()->pushButtonHoverPen ); + app->setProperty("PushButton_DefaultParameters_DisablePen" , pb.data()->pushButtonDisablePen ); + app->setProperty("PushButton_DefaultParameters_CheckPen" , pb.data()->pushButtonCheckPen ); + app->setProperty("PushButton_DefaultParameters_CheckHoverPen" , pb.data()->pushButtonCheckHoverPen ); + app->setProperty("PushButton_DefaultParameters_CheckClickPen" , pb.data()->pushButtonCheckClickPen ); + app->setProperty("PushButton_DefaultParameters_CheckDisablePen" , pb.data()->pushButtonCheckDisablePen ); + app->setProperty("PushButton_DefaultParameters_FocusPen" , pb.data()->pushButtonFocusPen ); + + sp->getDefaultConfigPushButtonLabelParameters(pb.data(), isUseDarkPalette()); + + app->setProperty("PushButton_DefaultParameters_TextDefaultColor" , pb.data()->textDefaultColor ); + app->setProperty("PushButton_DefaultParameters_TextHoverColor" , pb.data()->textHoverColor ); + + //ToolButton + QSharedPointer<ConfigToolButtonParameters> tb(new ConfigToolButtonParameters); + sp->getDefaultConfigToolButtonPanelParameters(tb.data(), isUseDarkPalette()); + app->setProperty("ToolButton_DefaultParameters_Radius" , tb.data()->radius); + app->setProperty("ToolButton_DefaultParameters_DefaultBrush" , tb.data()->toolButtonDefaultBrush ); + app->setProperty("ToolButton_DefaultParameters_ClickBrush" , tb.data()->toolButtonClickBrush ); + app->setProperty("ToolButton_DefaultParameters_HoverBrush" , tb.data()->toolButtonHoverBrush ); + app->setProperty("ToolButton_DefaultParameters_DisableBrush" , tb.data()->toolButtonDisableBrush ); + app->setProperty("ToolButton_DefaultParameters_CheckBrush" , tb.data()->toolButtonCheckBrush ); + app->setProperty("ToolButton_DefaultParameters_CheckHoverBrush" , tb.data()->toolButtonCheckHoverBrush ); + app->setProperty("ToolButton_DefaultParameters_CheckClickBrush" , tb.data()->toolButtonCheckClickBrush ); + app->setProperty("ToolButton_DefaultParameters_CheckDisableBrush", tb.data()->toolButtonCheckDisableBrush); + app->setProperty("ToolButton_DefaultParameters_DefaultPen" , tb.data()->toolButtonDefaultPen ); + app->setProperty("ToolButton_DefaultParameters_ClickPen" , tb.data()->toolButtonClickPen ); + app->setProperty("ToolButton_DefaultParameters_HoverPen" , tb.data()->toolButtonHoverPen ); + app->setProperty("ToolButton_DefaultParameters_DisablePen" , tb.data()->toolButtonDisablePen ); + app->setProperty("ToolButton_DefaultParameters_CheckPen" , tb.data()->toolButtonCheckPen ); + app->setProperty("ToolButton_DefaultParameters_CheckHoverPen" , tb.data()->toolButtonCheckHoverPen ); + app->setProperty("ToolButton_DefaultParameters_CheckClickPen" , tb.data()->toolButtonCheckClickPen ); + app->setProperty("ToolButton_DefaultParameters_CheckDisablePen" , tb.data()->toolButtonCheckDisablePen ); + app->setProperty("ToolButton_DefaultParameters_FocusPen" , tb.data()->toolButtonFocusPen ); + + sp->getDefaultConfigToolButtonLabelParameters(tb.data(), isUseDarkPalette()); + app->setProperty("ToolButton_DefaultParameters_TextDefaultColor" , tb.data()->textDefaultColor ); + app->setProperty("ToolButton_DefaultParameters_TextHoverColor" , tb.data()->textHoverColor ); + + //lineedit + QSharedPointer<ConfigLineEditParameters> lineedit(new ConfigLineEditParameters); + sp->getDefaultConfigLineEditParameters(lineedit.data(), isUseDarkPalette()); + app->setProperty("Lineedit_DefaultParameters_Radius", lineedit.data()->radius ); + app->setProperty("Lineedit_DefaultParameters_DefaultBrush", lineedit.data()->lineEditDefaultBrush); + app->setProperty("Lineedit_DefaultParameters_HoverBrush", lineedit.data()->lineEditHoverBrush ); + app->setProperty("Lineedit_DefaultParameters_FocusBrush", lineedit.data()->lineEditFocusBrush ); + app->setProperty("Lineedit_DefaultParameters_DisableBrush", lineedit.data()->lineEditDisableBrush); + app->setProperty("Lineedit_DefaultParameters_DefaultPen", lineedit.data()->lineEditDefaultPen ); + app->setProperty("Lineedit_DefaultParameters_HoverPen", lineedit.data()->lineEditHoverPen ); + app->setProperty("Lineedit_DefaultParameters_FocusPen", lineedit.data()->lineEditFocusPen ); + app->setProperty("Lineedit_DefaultParameters_DisablePen", lineedit.data()->lineEditDisablePen ); + + //spinbox + QSharedPointer<ConfigSpinBoxParameters> spinbox(new ConfigSpinBoxParameters); + sp->getDefaultConfigSpinBoxParameters(spinbox.data(), isUseDarkPalette()); + app->setProperty("SpinBox_DefaultParameters_Radius" ,spinbox.data()->radius ); + app->setProperty("SpinBox_DefaultParameters_DefaultBrush" ,spinbox.data()->spinBoxDefaultBrush ); + app->setProperty("SpinBox_DefaultParameters_HoverBrush" ,spinbox.data()->spinBoxHoverBrush ); + app->setProperty("SpinBox_DefaultParameters_FocusBrush" ,spinbox.data()->spinBoxFocusBrush ); + app->setProperty("SpinBox_DefaultParameters_DisableBrush" ,spinbox.data()->spinBoxDisableBrush ); + app->setProperty("SpinBox_DefaultParameters_DefaultPen" ,spinbox.data()->spinBoxDefaultPen ); + app->setProperty("SpinBox_DefaultParameters_HoverPen" ,spinbox.data()->spinBoxHoverPen ); + app->setProperty("SpinBox_DefaultParameters_FocusPen" ,spinbox.data()->spinBoxFocusPen ); + app->setProperty("SpinBox_DefaultParameters_DisablePen" ,spinbox.data()->spinBoxDisablePen ); + app->setProperty("SpinBox_DefaultParameters_UpDefaultBrush" ,spinbox.data()->spinBoxUpDefaultBrush ); + app->setProperty("SpinBox_DefaultParameters_UpHoverBrush" ,spinbox.data()->spinBoxUpHoverBrush ); + app->setProperty("SpinBox_DefaultParameters_UpFocusHoverBrush" ,spinbox.data()->spinBoxUpFocusHoverBrush ); + app->setProperty("SpinBox_DefaultParameters_UpClickBrush" ,spinbox.data()->spinBoxUpClickBrush ); + app->setProperty("SpinBox_DefaultParameters_DownHoverBrush" ,spinbox.data()->spinBoxDownHoverBrush ); + app->setProperty("SpinBox_DefaultParameters_DownFocusHoverBrush" ,spinbox.data()->spinBoxDownFocusHoverBrush); + app->setProperty("SpinBox_DefaultParameters_DownClickBrush" ,spinbox.data()->spinBoxDownClickBrush ); + app->setProperty("SpinBox_DefaultParameters_DownDefaultBrush" ,spinbox.data()->spinBoxDownDefaultBrush ); + app->setProperty("SpinBox_DefaultParameters_UpDefaultPen" ,spinbox.data()->spinBoxUpDefaultPen ); + app->setProperty("SpinBox_DefaultParameters_UpHoverPen" ,spinbox.data()->spinBoxUpHoverPen ); + app->setProperty("SpinBox_DefaultParameters_UpFocusHoverPen" ,spinbox.data()->spinBoxUpFocusHoverPen ); + app->setProperty("SpinBox_DefaultParameters_UpClickPen" ,spinbox.data()->spinBoxUpClickPen ); + app->setProperty("SpinBox_DefaultParameters_UpDisablePen" ,spinbox.data()->spinBoxUpDisablePen ); + app->setProperty("SpinBox_DefaultParameters_DownDefaultPen" ,spinbox.data()->spinBoxDownDefaultPen ); + app->setProperty("SpinBox_DefaultParameters_DownHoverPen" ,spinbox.data()->spinBoxDownHoverPen ); + app->setProperty("SpinBox_DefaultParameters_DownFocusHoverPen" ,spinbox.data()->spinBoxDownFocusHoverPen ); + app->setProperty("SpinBox_DefaultParameters_DownClickPen " ,spinbox.data()->spinBoxDownClickPen ); + app->setProperty("SpinBox_DefaultParameters_DownDisablePen" ,spinbox.data()->spinBoxDownDisablePen ); + app->setProperty("SpinBox_DefaultParameters_UpIconHightPixMap" ,spinbox.data()->spinBoxUpIconHightPixMap ); + app->setProperty("SpinBox_DefaultParameters_DownIconHightPixMap" ,spinbox.data()->spinBoxDownIconHightPixMap); + + //combobox + QSharedPointer<ConfigComboBoxParameters> comboBox(new ConfigComboBoxParameters); + sp->getDefaultConfigComboBoxParameters(comboBox.data(), isUseDarkPalette()); + app->setProperty("ComboBox_DefaultParameters_Radius" , comboBox.data()->radius ); + app->setProperty("ComboBox_DefaultParameters_DefaultBrush", comboBox.data()->comboBoxDefaultBrush); + app->setProperty("ComboBox_DefaultParameters_HoverBrush" , comboBox.data()->comboBoxHoverBrush ); + app->setProperty("ComboBox_DefaultParameters_OnBrush" , comboBox.data()->comboBoxOnBrush ); + app->setProperty("ComboBox_DefaultParameters_EditBrush" , comboBox.data()->comboBoxEditBrush ); + app->setProperty("ComboBox_DefaultParameters_DisableBrush", comboBox.data()->comboBoxDisableBrush); + app->setProperty("ComboBox_DefaultParameters_DefaultPen" , comboBox.data()->comboBoxDefaultPen ); + app->setProperty("ComboBox_DefaultParameters_HoverPen" , comboBox.data()->comboBoxHoverPen ); + app->setProperty("ComboBox_DefaultParameters_OnPen" , comboBox.data()->comboBoxOnPen ); + app->setProperty("ComboBox_DefaultParameters_EditPen" , comboBox.data()->comboBoxEditPen ); + app->setProperty("ComboBox_DefaultParameters_DisablePen" , comboBox.data()->comboBoxDisablePen ); + app->setProperty("ComboBox_DefaultParameters_FocusPen" , comboBox.data()->comboBoxFocusPen ); + + //list + QSharedPointer<ConfigListParameters> list(new ConfigListParameters); + sp->getDefaultConfigListParameters(list.data(), isUseDarkPalette()); + app->setProperty("List_DefaultParameters_Radius" , list.data()->radius ); + app->setProperty("List_DefaultParameters_DefaultBrush" , list.data()->listDefaultBrush ); + app->setProperty("List_DefaultParameters_HoverBrush" , list.data()->listHoverBrush ); + app->setProperty("List_DefaultParameters_SelectBrush" , list.data()->listSelectBrush ); + app->setProperty("List_DefaultParameters_DisableBrush" , list.data()->listDisableBrush ); + app->setProperty("List_DefaultParameters_TextHoverPen" , list.data()->listTextHoverPen ); + app->setProperty("List_DefaultParameters_TextSelectPen" , list.data()->listTextSelectPen ); + app->setProperty("List_DefaultParameters_TextDisablePen" , list.data()->listTextDisablePen); + app->setProperty("List_DefaultParameters_HoverPen" , list.data()->listHoverPen ); + app->setProperty("List_DefaultParameters_SelectPen" , list.data()->listSelectPen ); + app->setProperty("List_DefaultParameters_FocusPen" , list.data()->listFocusPen ); + + sp->getHighlightModeConfigListParameters(list.data(), isUseDarkPalette()); + app->setProperty("List_HighlightMode_Radius" , list.data()->radius ); + app->setProperty("List_HighlightMode_DefaultBrush" , list.data()->listDefaultBrush ); + app->setProperty("List_HighlightMode_HoverBrush" , list.data()->listHoverBrush ); + app->setProperty("List_HighlightMode_SelectBrush" , list.data()->listSelectBrush ); + app->setProperty("List_HighlightMode_DisableBrush" , list.data()->listDisableBrush ); + app->setProperty("List_HighlightMode_TextHoverPen" , list.data()->listTextHoverPen ); + app->setProperty("List_HighlightMode_TextSelectPen" , list.data()->listTextSelectPen ); + app->setProperty("List_HighlightMode_TextDisablePen", list.data()->listTextDisablePen); + app->setProperty("List_HighlightMode_HoverPen" , list.data()->listHoverPen ); + app->setProperty("List_HighlightMode_SelectPen" , list.data()->listSelectPen ); + app->setProperty("List_HighlightMode_FocusPen" , list.data()->listFocusPen ); + + //tree + QSharedPointer<ConfigTreeParameters> tree(new ConfigTreeParameters); + sp->getDefaultConfigTreeParameters(tree.data(), isUseDarkPalette()); + app->setProperty("Tree_DefaultParameters_Radius" , tree.data()->radius ); + app->setProperty("Tree_DefaultParameters_DefaultBrush" , tree.data()->treeDefaultBrush ); + app->setProperty("Tree_DefaultParameters_HoverBrush" , tree.data()->treeHoverBrush ); + app->setProperty("Tree_DefaultParameters_SelectBrush" , tree.data()->treeSelectBrush ); + app->setProperty("Tree_DefaultParameters_DisableBrush" , tree.data()->treeDisableBrush ); + app->setProperty("Tree_DefaultParameters_BranchDefaultBrush", tree.data()->treeBranchDefaultBrush); + app->setProperty("Tree_DefaultParameters_BranchHoverBrush" , tree.data()->treeBranchHoverBrush ); + app->setProperty("Tree_DefaultParameters_BranchSelectBrush" , tree.data()->treeBranchSelectBrush ); + app->setProperty("Tree_DefaultParameters_BranchDisableBrush", tree.data()->treeBranchDisableBrush); + app->setProperty("Tree_DefaultParameters_HoverPen" , tree.data()->treeHoverPen ); + app->setProperty("Tree_DefaultParameters_SelectPen" , tree.data()->treeSelectPen ); + app->setProperty("Tree_DefaultParameters_FocusPen" , tree.data()->treeFocusPen ); + app->setProperty("Tree_DefaultParameters_TextHoverPen" , tree.data()->treeTextHoverPen ); + app->setProperty("Tree_DefaultParameters_TextSelectPen" , tree.data()->treeTextSelectPen ); + app->setProperty("Tree_DefaultParameters_TextDisablePen" , tree.data()->treeTextDisablePen ); + + sp->getHighlightModeConfigTreeParameters(tree.data(), isUseDarkPalette()); + app->setProperty("Tree_HighlightMode_Radius" , tree.data()->radius ); + app->setProperty("Tree_HighlightMode_DefaultBrush" , tree.data()->treeDefaultBrush ); + app->setProperty("Tree_HighlightMode_HoverBrush" , tree.data()->treeHoverBrush ); + app->setProperty("Tree_HighlightMode_SelectBrush" , tree.data()->treeSelectBrush ); + app->setProperty("Tree_HighlightMode_DisableBrush" , tree.data()->treeDisableBrush ); + app->setProperty("Tree_HighlightMode_BranchDefaultBrush", tree.data()->treeBranchDefaultBrush); + app->setProperty("Tree_HighlightMode_BranchHoverBrush" , tree.data()->treeBranchHoverBrush ); + app->setProperty("Tree_HighlightMode_BranchSelectBrush" , tree.data()->treeBranchSelectBrush ); + app->setProperty("Tree_HighlightMode_BranchDisableBrush", tree.data()->treeBranchDisableBrush); + app->setProperty("Tree_HighlightMode_HoverPen" , tree.data()->treeHoverPen ); + app->setProperty("Tree_HighlightMode_SelectPen" , tree.data()->treeSelectPen ); + app->setProperty("Tree_HighlightMode_FocusPen" , tree.data()->treeFocusPen ); + app->setProperty("Tree_HighlightMode_TextHoverPen" , tree.data()->treeTextHoverPen ); + app->setProperty("Tree_HighlightMode_TextSelectPen" , tree.data()->treeTextSelectPen ); + app->setProperty("Tree_HighlightMode_TextDisablePen" , tree.data()->treeTextDisablePen ); + + //table + QSharedPointer<ConfigTableParameters> table(new ConfigTableParameters); + sp->getDefaultConfigTableParameters(table.data(), isUseDarkPalette()); + app->setProperty("Table_DefaultParameters_Radius" , table.data()->radius ); + app->setProperty("Table_DefaultParameters_DefaultBrush" , table.data()->tableDefaultBrush ); + app->setProperty("Table_DefaultParameters_HoverBrush" , table.data()->tableHoverBrush ); + app->setProperty("Table_DefaultParameters_SelectBrush" , table.data()->tableSelectBrush ); + app->setProperty("Table_DefaultParameters_DisableBrush" , table.data()->tableDisableBrush ); + app->setProperty("Table_DefaultParameters_HoverPen" , table.data()->tableHoverPen ); + app->setProperty("Table_DefaultParameters_SelectPen" , table.data()->tableSelectPen ); + app->setProperty("Table_DefaultParameters_FocusPen" , table.data()->tableFocusPen ); + app->setProperty("Table_DefaultParameters_TextHoverPen" , table.data()->tableTextHoverPen ); + app->setProperty("Table_DefaultParameters_TextSelectPen" , table.data()->tableTextSelectPen ); + app->setProperty("Table_DefaultParameters_TextDisablePen", table.data()->tableTextDisablePen); + + sp->getHighlightModeConfigTableParameters(table.data(), isUseDarkPalette()); + app->setProperty("Table_HighlightMode_Radius" , table.data()->radius ); + app->setProperty("Table_HighlightMode_DefaultBrush" , table.data()->tableDefaultBrush ); + app->setProperty("Table_HighlightMode_HoverBrush" , table.data()->tableHoverBrush ); + app->setProperty("Table_HighlightMode_SelectBrush" , table.data()->tableSelectBrush ); + app->setProperty("Table_HighlightMode_DisableBrush" , table.data()->tableDisableBrush ); + app->setProperty("Table_HighlightMode_HoverPen" , table.data()->tableHoverPen ); + app->setProperty("Table_HighlightMode_SelectPen" , table.data()->tableSelectPen ); + app->setProperty("Table_HighlightMode_FocusPen" , table.data()->tableFocusPen ); + app->setProperty("Table_HighlightMode_TextHoverPen" , table.data()->tableTextHoverPen ); + app->setProperty("Table_HighlightMode_TextSelectPen" , table.data()->tableTextSelectPen ); + app->setProperty("Table_HighlightMode_TextDisablePen", table.data()->tableTextDisablePen); + + + //checkbox + QSharedPointer<ConfigCheckBoxParameters> checkBox(new ConfigCheckBoxParameters); + sp->getDefaultConfigCheckBoxParameters(checkBox.data(), isUseDarkPalette()); + app->setProperty("CheckBox_DefaultParameters_Radius" , checkBox.data()->radius ); + app->setProperty("CheckBox_DefaultParameters_DefaultPen" , checkBox.data()->checkBoxDefaultPen ); + app->setProperty("CheckBox_DefaultParameters_HoverPen" , checkBox.data()->checkBoxHoverPen ); + app->setProperty("CheckBox_DefaultParameters_ClickPen" , checkBox.data()->checkBoxClickPen ); + app->setProperty("CheckBox_DefaultParameters_DisablePen" , checkBox.data()->checkBoxDisablePen ); + app->setProperty("CheckBox_DefaultParameters_OnDefaultPen" , checkBox.data()->checkBoxOnDefaultPen ); + app->setProperty("CheckBox_DefaultParameters_OnHoverPen" , checkBox.data()->checkBoxOnHoverPen ); + app->setProperty("CheckBox_DefaultParameters_OnClickPen" , checkBox.data()->checkBoxOnClickPen ); + app->setProperty("CheckBox_DefaultParameters_ContentPen" , checkBox.data()->checkBoxContentPen ); + app->setProperty("CheckBox_DefaultParameters_DefaultBrush" , checkBox.data()->checkBoxDefaultBrush ); + app->setProperty("CheckBox_DefaultParameters_HoverBrush" , checkBox.data()->checkBoxHoverBrush ); + app->setProperty("CheckBox_DefaultParameters_ClickBrush" , checkBox.data()->checkBoxClickBrush ); + app->setProperty("CheckBox_DefaultParameters_DisableBrush" , checkBox.data()->checkBoxDisableBrush ); + app->setProperty("CheckBox_DefaultParameters_OnDefaultBrush" , checkBox.data()->checkBoxOnDefaultBrush ); + app->setProperty("CheckBox_DefaultParameters_OnHoverBrush" , checkBox.data()->checkBoxOnHoverBrush ); + app->setProperty("CheckBox_DefaultParameters_OnClickBrush" , checkBox.data()->checkBoxOnClickBrush ); + app->setProperty("CheckBox_DefaultParameters_PathBrush" , checkBox.data()->checkBoxPathBrush ); + app->setProperty("CheckBox_DefaultParameters_PathDisableBrush", checkBox.data()->checkBoxPathDisableBrush); + + //radiobutton + QSharedPointer<ConfigRadioButtonParameters> radiobutton(new ConfigRadioButtonParameters); + sp->getDefaultConfigRadioButtonParameters(radiobutton.data(), isUseDarkPalette()); + app->setProperty("RadioButton_DefaultParameters_Radius" , radiobutton.data()->radius ); + app->setProperty("RadioButton_DefaultParameters_DefaultPen" , radiobutton.data()->radioButtonDefaultPen ); + app->setProperty("RadioButton_DefaultParameters_HoverPen" , radiobutton.data()->radioButtonHoverPen ); + app->setProperty("RadioButton_DefaultParameters_ClickPen" , radiobutton.data()->radioButtonClickPen ); + app->setProperty("RadioButton_DefaultParameters_DisablePen" , radiobutton.data()->radioButtonDisablePen ); + app->setProperty("RadioButton_DefaultParameters_OnDefaultPen" , radiobutton.data()->radioButtonOnDefaultPen ); + app->setProperty("RadioButton_DefaultParameters_OnHoverPen" , radiobutton.data()->radioButtonOnHoverPen ); + app->setProperty("RadioButton_DefaultParameters_OnClickPen" , radiobutton.data()->radioButtonOnClickPen ); + app->setProperty("RadioButton_DefaultParameters_DefaultBrush" , radiobutton.data()->radioButtonDefaultBrush ); + app->setProperty("RadioButton_DefaultParameters_HoverBrush" , radiobutton.data()->radioButtonHoverBrush ); + app->setProperty("RadioButton_DefaultParameters_ClickBrush" , radiobutton.data()->radioButtonClickBrush ); + app->setProperty("RadioButton_DefaultParameters_DisableBrush" , radiobutton.data()->radioButtonDisableBrush ); + app->setProperty("RadioButton_DefaultParameters_OnDefaultBrush" , radiobutton.data()->radioButtonOnDefaultBrush ); + app->setProperty("RadioButton_DefaultParameters_OnHoverBrush" , radiobutton.data()->radioButtonOnHoverBrush ); + app->setProperty("RadioButton_DefaultParameters_OnClickBrush" , radiobutton.data()->radioButtonOnClickBrush ); + app->setProperty("RadioButton_DefaultParameters_ChildrenOnDefaultBrush", radiobutton.data()->radioButtonChildrenOnDefaultBrush); + app->setProperty("RadioButton_DefaultParameters_ChildrenOnHoverBrush" , radiobutton.data()->radioButtonChildrenOnHoverBrush ); + app->setProperty("RadioButton_DefaultParameters_ChildrenOnClickBrush ", radiobutton.data()->radioButtonChildrenOnClickBrush ); + app->setProperty("RadioButton_DefaultParameters_ChildrenOnDisableBrush", radiobutton.data()->radioButtonChildrenOnDisableBrush); + + //slider + QSharedPointer<ConfigSliderParameters> slider(new ConfigSliderParameters); + sp->getDefaultSliderParameters(slider.data(), isUseDarkPalette()); + app->setProperty("Slider_DefaultParameters_Radius" , slider.data()->radius ); + app->setProperty("Slider_DefaultParameters_GrooveRadius" , slider.data()->sliderGrooveRadius ); + app->setProperty("Slider_DefaultParameters_HandleDefaultBrush" , slider.data()->sliderHandleDefaultBrush ); + app->setProperty("Slider_DefaultParameters_HandleHoverBrush" , slider.data()->sliderHandleHoverBrush ); + app->setProperty("Slider_DefaultParameters_HandleClickBrush" , slider.data()->sliderHandleClickBrush ); + app->setProperty("Slider_DefaultParameters_HandleDisableBrush" , slider.data()->sliderHandleDisableBrush ); + app->setProperty("Slider_DefaultParameters_GrooveValueDefaultBrush" , slider.data()->sliderGrooveValueDefaultBrush ); + app->setProperty("Slider_DefaultParameters_GrooveValueHoverBrush" , slider.data()->sliderGrooveValueHoverBrush ); + app->setProperty("Slider_DefaultParameters_GrooveValueDisableBrush" , slider.data()->sliderGrooveValueDisableBrush ); + app->setProperty("Slider_DefaultParameters_GrooveUnvalueDefaultBrush", slider.data()->sliderGrooveUnvalueDefaultBrush); + app->setProperty("Slider_DefaultParameters_GrooveUnvalueHoverBrush" , slider.data()->sliderGrooveUnvalueHoverBrush ); + app->setProperty("Slider_DefaultParameters_GrooveUnvalueDisableBrush", slider.data()->sliderGrooveUnvalueDisableBrush); + app->setProperty("Slider_DefaultParameters_HandleDefaultPen" , slider.data()->sliderHandleDefaultPen ); + app->setProperty("Slider_DefaultParameters_HandleHoverPen" , slider.data()->sliderHandleHoverPen ); + app->setProperty("Slider_DefaultParameters_HandleClickPen" , slider.data()->sliderHandleClickPen ); + app->setProperty("Slider_DefaultParameters_HandleDisablePen" , slider.data()->sliderHandleDisablePen ); + app->setProperty("Slider_DefaultParameters_GroovePen" , slider.data()->sliderGroovePen ); + app->setProperty("Slider_DefaultParameters_focusPen" , slider.data()->focusPen ); + + //progressabr + QSharedPointer<ConfigProgressBarParameters> progressbar(new ConfigProgressBarParameters); + sp->getDefaultProgressBarParameters(progressbar.data(), isUseDarkPalette()); + app->setProperty("ProgressBar_DefaultParameters_Radius" , progressbar.data()->radius ); + app->setProperty("ProgressBar_DefaultParameters_ContentPen" , progressbar.data()->progressBarContentPen ); + app->setProperty("ProgressBar_DefaultParameters_GrooveDefaultPen" , progressbar.data()->progressBarGrooveDefaultPen ); + app->setProperty("ProgressBar_DefaultParameters_GrooveDisablePen" , progressbar.data()->progressBarGrooveDisablePen ); + app->setProperty("ProgressBar_DefaultParameters_ContentBrush" , progressbar.data()->progressBarContentBrush ); + app->setProperty("ProgressBar_DefaultParameters_GrooveDefaultBrush" , progressbar.data()->progressBarGrooveDefaultBrush ); + app->setProperty("ProgressBar_DefaultParameters_GrooveDisableBrush" , progressbar.data()->progressBarGrooveDisableBrush ); + + //scrollbar + QSharedPointer<ConfigScrollBarParameters> scrollbar(new ConfigScrollBarParameters); + sp->getDefaultScrollBarParameters(scrollbar.data(), isUseDarkPalette()); + app->setProperty("ScrollBar_DefaultParameters_Radius" , scrollbar.data()->radius ); + app->setProperty("ScrollBar_DefaultParameters_GrooveDefaultBrush" , scrollbar.data()->scrollBarGrooveDefaultBrush ); + app->setProperty("ScrollBar_DefaultParameters_GrooveInactiveBrush", scrollbar.data()->scrollBarGrooveInactiveBrush); + app->setProperty("ScrollBar_DefaultParameters_SliderDefaultBrush" , scrollbar.data()->scrollBarSliderDefaultBrush ); + app->setProperty("ScrollBar_DefaultParameters_SliderHoverBrush" , scrollbar.data()->scrollBarSliderHoverBrush ); + app->setProperty("ScrollBar_DefaultParameters_SliderClickBrush" , scrollbar.data()->scrollBarSliderClickBrush ); + app->setProperty("ScrollBar_DefaultParameters_SliderDisableBrush" , scrollbar.data()->scrollBarSliderDisableBrush ); + + //tooltip + QSharedPointer<ConfigToolTipParameters> tooltip(new ConfigToolTipParameters); + sp->getDefaultToolTipParameters(tooltip.data(), isUseDarkPalette()); + app->setProperty("ToolTip_DefaultParameters_Radius" , tooltip.data()->radius ); + app->setProperty("ToolTip_DefaultParameters_BackgroundBrush", tooltip.data()->toolTipBackgroundBrush); + app->setProperty("ToolTip_DefaultParameters_BackgroundPen" , tooltip.data()->toolTipBackgroundPen ); + + //tabwidget + QSharedPointer<ConfigTabWidgetParameters> tabwidget(new ConfigTabWidgetParameters); + sp->getDefaultTabWidgetParameters(tabwidget.data(), isUseDarkPalette()); + app->setProperty("TabWidget_DefaultParameters_Radius" , tabwidget.data()->radius ); + app->setProperty("TabWidget_DefaultParameters_tabWidgetBackgroundBrush", tabwidget.data()->tabWidgetBackgroundBrush); + app->setProperty("TabWidget_DefaultParameters_tabBarBackgroundBrush" , tabwidget.data()->tabBarBackgroundBrush ); + app->setProperty("TabWidget_DefaultParameters_tabBarDefaultBrush" , tabwidget.data()->tabBarDefaultBrush ); + app->setProperty("TabWidget_DefaultParameters_tabBarHoverBrush" , tabwidget.data()->tabBarHoverBrush ); + app->setProperty("TabWidget_DefaultParameters_tabBarClickBrush" , tabwidget.data()->tabBarClickBrush ); + app->setProperty("TabWidget_DefaultParameters_tabBarSelectBrush" , tabwidget.data()->tabBarSelectBrush ); + app->setProperty("TabWidget_DefaultParameters_tabBarDefaultPen" , tabwidget.data()->tabBarDefaultPen ); + app->setProperty("TabWidget_DefaultParameters_tabBarHoverPen" , tabwidget.data()->tabBarHoverPen ); + app->setProperty("TabWidget_DefaultParameters_tabBarClickPen" , tabwidget.data()->tabBarClickPen ); + app->setProperty("TabWidget_DefaultParameters_tabBarFocusPen" , tabwidget.data()->tabBarFocusPen ); + + //menu + QSharedPointer<ConfigMenuParameters> menu(new ConfigMenuParameters); + sp->getDefaultMenuParameters(menu.data(), isUseDarkPalette()); + app->setProperty("Menu_DefaultParameters_frameRadius" , menu.data()->frameRadius ); + app->setProperty("Menu_DefaultParameters_itemRadius" , menu.data()->itemRadius ); + app->setProperty("Menu_DefaultParameters_menuBackgroundBrush", menu.data()->menuBackgroundBrush); + app->setProperty("Menu_DefaultParameters_menuBackgroundPen" , menu.data()->menuBackgroundPen ); + app->setProperty("Menu_DefaultParameters_menuItemSelectBrush", menu.data()->menuItemSelectBrush); + app->setProperty("Menu_DefaultParameters_menuItemFocusPen" , menu.data()->menuItemFocusPen ); + app->setProperty("Menu_DefaultParameters_menuTextHoverPen" , menu.data()->menuTextHoverPen ); +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/ukui-config-style.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/ukui-config-style.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/ukui-config-style.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/ukui-config-style.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -24,6 +24,13 @@ #define UKUICONFIGSTYLE_H #include <QProxyStyle> +#include <QFontMetrics> +#include <QStyleOption> +#include <private/qtextengine_p.h> +#include <qmath.h> +#include <QGSettings> +#include "widget-parameters/control-parameters.h" + class QStyleOptionViewItem; class QDBusInterface; @@ -35,18 +42,12 @@ #define Style QProxyStyle #endif -#include <QFontMetrics> -#include <QStyleOption> -#include <private/qtextengine_p.h> -#include <qmath.h> -#include <QGSettings> -#include <QProxyStyle> class BlurHelper; class GestureHelper; class WindowManager; -class ApplicationStyleSettings; +//class ApplicationStyleSettings; //QT_BEGIN_NAMESPACE //namespace UKUIConfigStyleSpace { class UKUIConfigStyle; } //QT_END_NAMESPACE @@ -88,6 +89,8 @@ void polish(QWidget *widget); void unpolish(QWidget *widget); void polish(QPalette& palette) ; + void polish(QApplication *app); + QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = nullptr, const QWidget *widget = nullptr) const override; @@ -144,10 +147,10 @@ private Q_SLOTS: void updateTabletModeValue(bool isTabletMode); - QRect scrollbarSliderRec(); - void setScrollbarSliderRec(QRect rect) const; - QRect sliderHandleRec(); - void setSliderHandleRec(QRect rect) const; + QRect scrollbarSliderRec(QWidget *w); + void setScrollbarSliderRec(QWidget *w, QRect rect) const; + QRect sliderHandleRec(QWidget *w); + void setSliderHandleRec(QWidget *w,QRect rect) const; private: bool isUseDarkPalette() const; @@ -159,7 +162,7 @@ QColor highLight_Click(const QStyleOption *option) const; QColor highLight_Hover(const QStyleOption *option) const; - void setThemeColor(QString themeColor, QPalette &palette) const; + void setThemeColor(QColor color, QPalette &palette) const; // view QString calculateElidedText(const QString &text, const QTextOption &textOption, @@ -170,6 +173,7 @@ void viewItemLayout(const QStyleOptionViewItem *option, QRect *checkRect, QRect *pixmapRect, QRect *textRect, bool sizehint) const; QSize viewItemSize(const QStyleOptionViewItem *option, int role) const; + void getDefaultControlParameters(QApplication *app); private: UKUIConfigStyleSpace::ConfigTabWidgetAnimationHelper *m_tab_animation_helper = nullptr; @@ -194,18 +198,17 @@ // UKUIConfigStyleParameters UKUIConfigStyleSpace::UKUIConfigStyleParameters *sp = nullptr; - mutable QRect m_scrollBarSliderRec; - mutable QRect m_sliderHandleRec; + mutable QHash<QWidget*, QRect> m_scrollBarSliderRec; + mutable QHash<QWidget*, QRect> m_sliderHandleRec; BlurHelper *m_blur_helper = nullptr; GestureHelper *m_gesture_helper = nullptr; WindowManager *m_window_manager = nullptr; - ApplicationStyleSettings *m_app_style_settings = nullptr; +// ApplicationStyleSettings *m_app_style_settings = nullptr; bool m_blink_cursor = true; int m_blink_cursor_time = 1200; - }; #endif // UKUICONFIGSTYLE_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-checkbox-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -26,10 +26,13 @@ #include <QBrush> #include <QPen> +#include "control-parameters.h" + namespace UKUIConfigStyleSpace { -class ConfigCheckBoxParameters +class ConfigCheckBoxParameters : public ControlParameters { + Q_OBJECT public: ConfigCheckBoxParameters(); @@ -54,7 +57,7 @@ QPen checkBoxOnHoverPen; QPen checkBoxOnClickPen; QPen checkBoxContentPen; - bool animation = true; +// bool animation = true; bool onHoverBrushIslinearGradient = false; }; } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,3 +1,25 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: xibowen <xibowen@kylinos.cn> + * + */ + #include "config-combobox-parameters.h" using namespace UKUIConfigStyleSpace; diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-combobox-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -25,10 +25,13 @@ #include <QBrush> #include <QPen> +#include "control-parameters.h" + namespace UKUIConfigStyleSpace { -class ConfigComboBoxParameters +class ConfigComboBoxParameters : public ControlParameters { + Q_OBJECT public: ConfigComboBoxParameters(); @@ -46,6 +49,7 @@ QPen comboBoxOnPen; QPen comboBoxEditPen; QPen comboBoxDisablePen; + QPen comboBoxFocusPen; }; } #endif // ConfigComboBoxParameters_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-lineedit-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -27,10 +27,13 @@ #include <QBrush> #include <QPen> +#include "control-parameters.h" + namespace UKUIConfigStyleSpace { -class ConfigLineEditParameters +class ConfigLineEditParameters : public ControlParameters { + Q_OBJECT public: ConfigLineEditParameters(); diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-list-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -26,10 +26,13 @@ #include <QBrush> #include <QPen> +#include "control-parameters.h" + namespace UKUIConfigStyleSpace { -class ConfigListParameters +class ConfigListParameters : public ControlParameters { + Q_OBJECT public: ConfigListParameters(); @@ -42,8 +45,10 @@ QBrush listDisableBrush; QPen listTextHoverPen; QPen listTextSelectPen; + QPen listTextDisablePen; QPen listHoverPen; QPen listSelectPen; + QPen listFocusPen; }; } #endif // LISTPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-menu-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -27,10 +27,13 @@ #include <QPixmap> #include <QBrush> #include <QPen> +#include "control-parameters.h" + namespace UKUIConfigStyleSpace { -class ConfigMenuParameters +class ConfigMenuParameters : public ControlParameters { + Q_OBJECT public: ConfigMenuParameters(); @@ -46,6 +49,9 @@ QPixmap menuFramePixmap; QPen menuTextHoverPen; + + QPen menuItemFocusPen; + }; } #endif // MENUPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-progressbar-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -26,10 +26,13 @@ #include <QBrush> #include <QPen> +#include "control-parameters.h" + namespace UKUIConfigStyleSpace { -class ConfigProgressBarParameters +class ConfigProgressBarParameters : public ControlParameters { + Q_OBJECT public: ConfigProgressBarParameters(); @@ -39,8 +42,6 @@ QBrush progressBarContentBrush; QBrush progressBarGrooveDefaultBrush; QBrush progressBarGrooveDisableBrush; - QColor progressBarContentMidLightColor; - QColor progressBarContentHightColor; QPen progressBarContentPen = Qt::NoPen; QPen progressBarGrooveDefaultPen = Qt::NoPen; diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <xibowen@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-pushbutton-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -27,10 +27,13 @@ #include <QBrush> #include <QPen> +#include "control-parameters.h" + namespace UKUIConfigStyleSpace { -class ConfigPushButtonParameters +class ConfigPushButtonParameters : public ControlParameters { + Q_OBJECT public: ConfigPushButtonParameters(); @@ -39,7 +42,10 @@ bool iconHoverClickHighlight; bool textHoverClickHighlight; - QColor textColor; + QColor textDefaultColor; + QColor textHoverColor; + QColor textDisableColor; + QBrush pushButtonDefaultBrush; QBrush pushButtonHoverBrush; diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-radiobutton-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -25,10 +25,13 @@ #include <QBrush> #include <QPen> +#include "control-parameters.h" + namespace UKUIConfigStyleSpace { -class ConfigRadioButtonParameters +class ConfigRadioButtonParameters : public ControlParameters { + Q_OBJECT public: ConfigRadioButtonParameters(); @@ -55,7 +58,7 @@ QPen radioButtonOnDefaultPen; QPen radioButtonOnHoverPen; QPen radioButtonOnClickPen; - bool animation = true; +// bool animation = true; }; } #endif // RADIOBUTTONPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -26,5 +26,4 @@ ConfigScrollBarParameters::ConfigScrollBarParameters() { - animation = true; } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-scrollbar-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -25,10 +25,13 @@ #define SCROLLBARPARAMETERS_H #include <QBrush> +#include "control-parameters.h" + namespace UKUIConfigStyleSpace { -class ConfigScrollBarParameters +class ConfigScrollBarParameters : public ControlParameters { + Q_OBJECT public: ConfigScrollBarParameters(); @@ -42,7 +45,7 @@ QBrush scrollBarSliderHoverBrush; QBrush scrollBarSliderClickBrush; QBrush scrollBarSliderDisableBrush; - bool animation = true; +// bool animation = true; }; } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -27,24 +27,24 @@ ConfigSliderParameters::ConfigSliderParameters() { - + radius = 0; sliderHandleDefaultPen = QPen(Qt::NoPen); - sliderHandleHoverPen = QPen(Qt::NoPen);; - sliderHandleClickPen = QPen(Qt::NoPen);; - sliderHandleDisablePen = QPen(Qt::NoPen);; - - sliderHandleDefaultBrush = QBrush(Qt::NoBrush); - sliderHandleHoverBrush = QBrush(Qt::NoBrush); - sliderHandleClickBrush = QBrush(Qt::NoBrush); - sliderHandleDisableBrush = QBrush(Qt::NoBrush); - - sliderGrooveValueDefaultBrush = QBrush(Qt::NoBrush); - sliderGrooveValueHoverBrush = QBrush(Qt::NoBrush); - sliderGrooveValueDisableBrush = QBrush(Qt::NoBrush); - - sliderGrooveUnvalueDefaultBrush = QBrush(Qt::NoBrush); - sliderGrooveUnvalueHoverBrush = QBrush(Qt::NoBrush); - sliderGrooveUnvalueDisableBrush = QBrush(Qt::NoBrush); - - animation = true; + sliderHandleHoverPen = QPen(Qt::NoPen); + sliderHandleClickPen = QPen(Qt::NoPen); + sliderHandleDisablePen = QPen(Qt::NoPen); + sliderGroovePen = QPen(Qt::NoPen); + focusPen = QPen(Qt::NoPen); + + sliderHandleDefaultBrush = QBrush(Qt::NoBrush); + sliderHandleHoverBrush = QBrush(Qt::NoBrush); + sliderHandleClickBrush = QBrush(Qt::NoBrush); + sliderHandleDisableBrush = QBrush(Qt::NoBrush); + + sliderGrooveValueDefaultBrush = QBrush(Qt::NoBrush); + sliderGrooveValueHoverBrush = QBrush(Qt::NoBrush); + sliderGrooveValueDisableBrush = QBrush(Qt::NoBrush); + + sliderGrooveUnvalueDefaultBrush = QBrush(Qt::NoBrush); + sliderGrooveUnvalueHoverBrush = QBrush(Qt::NoBrush); + sliderGrooveUnvalueDisableBrush = QBrush(Qt::NoBrush); } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-slider-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -27,15 +27,18 @@ #include <QBrush> #include <QPainterPath> #include <QPen> +#include "control-parameters.h" + namespace UKUIConfigStyleSpace { -class ConfigSliderParameters +class ConfigSliderParameters : public ControlParameters { + Q_OBJECT public: ConfigSliderParameters(); //private: -// int radius; + int radius; QBrush sliderHandleDefaultBrush; QBrush sliderHandleHoverBrush; QBrush sliderHandleClickBrush; @@ -54,9 +57,10 @@ QPen sliderHandleClickPen = Qt::NoPen; QPen sliderHandleDisablePen = Qt::NoPen; QPen sliderGroovePen = Qt::NoPen; + QPen focusPen = Qt::NoPen; QPainterPath sliderHandlePath; - bool animation = true; +// bool animation = true; int sliderGrooveRadius = 2; }; diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-spinbox-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -26,11 +26,12 @@ #include <QBrush> #include <QPen> - +#include "control-parameters.h" namespace UKUIConfigStyleSpace { -class ConfigSpinBoxParameters +class ConfigSpinBoxParameters : public ControlParameters { + Q_OBJECT public: ConfigSpinBoxParameters(); diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-table-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -25,11 +25,13 @@ #include <QBrush> #include <QPen> +#include "control-parameters.h" namespace UKUIConfigStyleSpace { -class ConfigTableParameters +class ConfigTableParameters : public ControlParameters { + Q_OBJECT public: ConfigTableParameters(); @@ -42,8 +44,10 @@ QBrush tableDisableBrush; QPen tableHoverPen; QPen tableSelectPen; + QPen tableFocusPen; QPen tableTextHoverPen; QPen tableTextSelectPen; + QPen tableTextDisablePen; }; } #endif // TABLEPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <xibowen@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tabwidget-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <xibowen@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ @@ -26,10 +26,13 @@ #include <QBrush> #include <QPen> +#include "control-parameters.h" + namespace UKUIConfigStyleSpace { -class ConfigTabWidgetParameters +class ConfigTabWidgetParameters : public ControlParameters { + Q_OBJECT public: ConfigTabWidgetParameters(); @@ -42,7 +45,10 @@ QBrush tabBarHoverBrush; QBrush tabBarClickBrush; QBrush tabBarSelectBrush; - QPen tabBarPen = Qt::NoPen; + QPen tabBarDefaultPen = Qt::NoPen; + QPen tabBarFocusPen = Qt::NoPen; + QPen tabBarClickPen = Qt::NoPen; + QPen tabBarHoverPen = Qt::NoPen; }; } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <xibowen@kylinos.cn> + * Authors: xibowen <xibowen@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-toolbutton-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -26,10 +26,13 @@ #include <QBrush> #include <QPen> +#include "control-parameters.h" + namespace UKUIConfigStyleSpace { -class ConfigToolButtonParameters +class ConfigToolButtonParameters : public ControlParameters { + Q_OBJECT public: ConfigToolButtonParameters(); @@ -58,7 +61,9 @@ QPen toolButtonCheckDisablePen; QPen toolButtonFocusPen; - QColor textColor; + QColor textDefaultColor; + QColor textHoverColor ; + QColor textDisableColor; }; } #endif // TOOLBUTTONPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tooltip-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -26,10 +26,12 @@ #include <QBrush> #include <QPen> +#include "control-parameters.h" namespace UKUIConfigStyleSpace { -class ConfigToolTipParameters +class ConfigToolTipParameters : public ControlParameters { + Q_OBJECT public: ConfigToolTipParameters(); diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/config-tree-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Xibowen <lanyue@kylinos.cn> + * Authors: xibowen <lanyue@kylinos.cn> * */ @@ -25,10 +25,12 @@ #include <QBrush> #include <QPen> +#include "control-parameters.h" namespace UKUIConfigStyleSpace { -class ConfigTreeParameters +class ConfigTreeParameters : public ControlParameters { + Q_OBJECT public: ConfigTreeParameters(); @@ -46,11 +48,13 @@ QBrush treeBranchDisableBrush; QPen treeHoverPen; QPen treeSelectPen; + QPen treeFocusPen; QPen treeTextHoverPen; QPen treeTextSelectPen; + QPen treeTextDisablePen; bool indicatorIconHoverNeedHighLight = true; - bool animation = true; +// bool animation = true; }; } diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,34 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: xibowen <lanyue@kylinos.cn> + * + */ + + +#include "control-parameters.h" +using namespace UKUIConfigStyleSpace; + +ControlParameters::ControlParameters(QObject *parent) : QObject(parent) +{ + +} +ControlParameters::~ControlParameters() +{ + +} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h 1970-01-01 08:00:00.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/control-parameters.h 2024-12-20 09:22:49.000000000 +0800 @@ -0,0 +1,42 @@ +/* + * Qt5-UKUI's Library + * + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library. If not, see <https://www.gnu.org/licenses/>. + * + * Authors: xibowen <lanyue@kylinos.cn> + * + */ + + +#ifndef ControlParameters_H +#define ControlParameters_H + +#include <QObject> + +namespace UKUIConfigStyleSpace { + +class ControlParameters : public QObject +{ + Q_OBJECT +public: + explicit ControlParameters(QObject *parent = nullptr); + + ~ControlParameters(); + +// virtual void getParameters(){} +}; +} +#endif // ControlParameters_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/widget-parameters.pri qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/widget-parameters.pri --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-config-style-ukui/widget-parameters/widget-parameters.pri 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-config-style-ukui/widget-parameters/widget-parameters.pri 1970-01-01 08:00:00.000000000 +0800 @@ -1,39 +0,0 @@ -INCLUDEPATH += $$PWD - -HEADERS += \ - $$PWD/config-checkbox-parameters.h \ - $$PWD/config-combobox-parameters.h \ - $$PWD/config-lineedit-parameters.h \ - $$PWD/config-list-parameters.h \ - $$PWD/config-menu-parameters.h \ - $$PWD/config-progressbar-parameters.h \ - $$PWD/config-pushbutton-parameters.h \ - $$PWD/config-radiobutton-parameters.h \ - $$PWD/config-scrollbar-parameters.h \ - $$PWD/config-slider-parameters.h \ - $$PWD/config-spinbox-parameters.h \ - $$PWD/config-table-parameters.h \ - $$PWD/config-tabwidget-parameters.h \ - $$PWD/config-toolbutton-parameters.h \ - $$PWD/config-tooltip-parameters.h \ - $$PWD/config-tree-parameters.h - -SOURCES += \ - $$PWD/config-checkbox-parameters.cpp \ - $$PWD/config-combobox-parameters.cpp \ - $$PWD/config-lineedit-parameters.cpp \ - $$PWD/config-list-parameters.cpp \ - $$PWD/config-menu-parameters.cpp \ - $$PWD/config-progressbar-parameters.cpp \ - $$PWD/config-pushbutton-parameters.cpp \ - $$PWD/config-radiobutton-parameters.cpp \ - $$PWD/config-scrollbar-parameters.cpp \ - $$PWD/config-slider-parameters.cpp \ - $$PWD/config-spinbox-parameters.cpp \ - $$PWD/config-table-parameters.cpp \ - $$PWD/config-tabwidget-parameters.cpp \ - $$PWD/config-toolbutton-parameters.cpp \ - $$PWD/config-tooltip-parameters.cpp \ - $$PWD/config-tree-parameters.cpp - - diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/animations.pri qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/animations.pri --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/animations.pri 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/animations.pri 1970-01-01 08:00:00.000000000 +0800 @@ -1,38 +0,0 @@ -INCLUDEPATH += $$PWD - -HEADERS += \ - $$PWD/box-animator.h \ - $$PWD/box-animation-helper.h \ - $$PWD/button-animator.h \ - $$PWD/button-animation-helper.h \ - $$PWD/progressbar-animation-helper.h \ - $$PWD/progressbar-animation.h \ - $$PWD/scrollbar-animation-helper.h \ - $$PWD/tab-widget-animation-helper.h \ - $$PWD/radiobutton-animator.h \ - $$PWD/radiobutton-animation-helper.h \ - $$PWD/checkbox-animator.h \ - $$PWD/checkbox-animation-helper.h \ - $$PWD/slider-animator.h \ - $$PWD/slider-animation-helper.h \ - $$PWD/tree-animator.h \ - $$PWD/tree-animation-helper.h - -SOURCES += \ - $$PWD/box-animator.cpp \ - $$PWD/box-animation-helper.cpp \ - $$PWD/button-animation-helper.cpp \ - $$PWD/button-animator.cpp \ - $$PWD/progressbar-animation-helper.cpp \ - $$PWD/progressbar-animation.cpp \ - $$PWD/scrollbar-animation-helper.cpp \ - $$PWD/tab-widget-animation-helper.cpp \ - $$PWD/radiobutton-animator.cpp \ - $$PWD/radiobutton-animation-helper.cpp \ - $$PWD/checkbox-animator.cpp \ - $$PWD/checkbox-animation-helper.cpp \ - $$PWD/slider-animator.cpp \ - $$PWD/slider-animation-helper.cpp \ - $$PWD/tree-animator.cpp \ - $$PWD/tree-animation-helper.cpp - diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/box-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/box-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/box-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/box-animation-helper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,77 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "box-animation-helper.h" - -#include "box-animator.h" -#include <QWidget> - -BoxAnimationHelper::BoxAnimationHelper(QObject *parent) : AnimationHelper(parent) -{ - -} - -BoxAnimationHelper::~BoxAnimationHelper() -{ -} - -bool BoxAnimationHelper::registerWidget(QWidget *w) -{ - auto animator = new UKUI::Box::BoxAnimator; - bool result = animator->bindWidget(w); - if (!result) - { - animator->deleteLater(); - animator = nullptr; - } - else - { - m_animators->insertMulti(w, animator); - } - - connect(w, &QWidget::destroyed, this, [=](){ - unregisterWidget(w); - }); - - return result; -} - -bool BoxAnimationHelper::unregisterWidget(QWidget *w) -{ - auto animators = m_animators->values(w); - bool result = false; - for (auto animator : animators) { - if (animator) { - result = animator->unboundWidget(); - delete animator; - animator = nullptr; - } - } - m_animators->remove(w); - return result; -} - -AnimatorIface *BoxAnimationHelper::animator(const QWidget *w) -{ - return m_animators->value(w); -} - diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/box-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/box-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/box-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/box-animation-helper.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,48 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef BOXANIMATIONHELPER_H -#define BOXANIMATIONHELPER_H - -#include <QObject> -#include "animation-helper.h" -#include "animator-iface.h" -#include "box-animator.h" - -class BoxAnimationHelper : public AnimationHelper -{ - Q_OBJECT -public: - BoxAnimationHelper(QObject *parent = nullptr); - ~BoxAnimationHelper(); - - bool registerWidget(QWidget *w); - bool unregisterWidget(QWidget *w); - - AnimatorIface *animator(const QWidget *w); - -signals: - -public slots: -}; - -#endif // BOXANIMATIONHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/box-animator.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/box-animator.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/box-animator.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/box-animator.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,246 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "box-animator.h" - -#include <QComboBox> - -using namespace UKUI::Box; - -BoxAnimator::BoxAnimator(QObject *parent) : QParallelAnimationGroup (parent) -{ - -} - -BoxAnimator::~BoxAnimator() -{ - if(m_mouseover){ - m_mouseover->deleteLater(); - m_mouseover = nullptr; - } - if(m_sunken){ - m_sunken->deleteLater(); - m_sunken = nullptr; - } - if(m_widget){ - m_widget->deleteLater(); - m_widget = nullptr; - } -} - - -bool BoxAnimator::bindWidget(QWidget *w) -{ - if (w->property("doNotAnimate").toBool()) - return false; - - if (qobject_cast<QComboBox*>(w)) { - m_widget = w; - } else { - return false; - } - - m_mouseover = new QVariantAnimation(this); - m_mouseover->setStartValue(0.0); - m_mouseover->setEndValue(1.0); - m_mouseover->setDuration(100); - m_mouseover->setEasingCurve(QEasingCurve::OutCubic); - addAnimation(m_mouseover); - - m_sunken = new QVariantAnimation(this); - m_sunken->setStartValue(0.0); - m_sunken->setEndValue(1.0); - m_sunken->setDuration(75); - m_sunken->setEasingCurve(QEasingCurve::InCubic); - addAnimation(m_sunken); - - connect(m_sunken, &QVariantAnimation::valueChanged, w, [=]() { - w->repaint(); - }); - connect(m_mouseover, &QVariantAnimation::valueChanged, w, [=]() { - w->repaint(); - }); - connect(m_sunken, &QVariantAnimation::finished, w, [=]() { - w->repaint(); - }); - connect(m_mouseover, &QVariantAnimation::finished, w, [=]() { - w->repaint(); - }); - - return true; - -} - -bool BoxAnimator::unboundWidget() -{ - this->stop(); - this->setDirection(QAbstractAnimation::Forward); - if(m_mouseover){ - m_mouseover->deleteLater(); - m_mouseover = nullptr; - } - if(m_sunken){ - m_sunken->deleteLater(); - m_sunken = nullptr; - } - - if (m_widget) { - this->setParent(nullptr); - return true; - } - return false; - -} - -QVariant BoxAnimator::value(const QString &property) -{ - if(property == "MouseOver") - return m_mouseover->currentValue(); - else if(property == "SunKen") - return m_sunken->currentValue(); - else - return QVariant(); -} - -bool BoxAnimator::isRunning(const QString &property) -{ - if(property == "MouseOver") - return m_mouseover->state() == Running; - else if(property == "SunKen") - return m_sunken->state() == Running; - else - return this->state() == Running; -} - -bool BoxAnimator::setAnimatorStartValue(const QString &property, const QVariant &value) -{ - if(property == "MouseOver") - { - m_mouseover->setStartValue(value); - return true; - } - else if(property == "SunKen") - { - m_sunken->setStartValue(value); - return true; - } - else - { - return false; - } -} - -bool BoxAnimator::setAnimatorEndValue(const QString &property, const QVariant &value) -{ - if(property == "MouseOver") - { - m_mouseover->setEndValue(value); - return true; - } - else if(property == "SunKen") - { - m_sunken->setEndValue(value); - return true; - } - else - { - return false; - } -} - -bool BoxAnimator::setAnimatorDuration(const QString &property, int duration) -{ - if(property == "MouseOver") - { - m_mouseover->setDuration(duration); - return true; - } - else if(property == "SunKen") - { - m_sunken->setDuration(duration); - return true; - } - else - { - return false; - } -} - -void BoxAnimator::setAnimatorDirectionForward(const QString &property, bool forward) -{ - auto d = forward? QAbstractAnimation::Forward: QAbstractAnimation::Backward; - if(property == "MouseOver") - m_mouseover->setDirection(d); - else if(property == "SunKen") - m_sunken->setDirection(d); - else - return; -} -void BoxAnimator::startAnimator(const QString &property) -{ - if(property == "MouseOver") - m_mouseover->start(); - else if(property == "SunKen") - m_sunken->start(); - else - this->start(); -} - -void BoxAnimator::stopAnimator(const QString &property) -{ - if(property == "MouseOver") - { - m_mouseover->stop(); - m_mouseover->setCurrentTime(0); - } - else if(property == "SunKen") - { - m_sunken->stop(); - m_sunken->setCurrentTime(0); - } - else - { - this->stop(); - this->setCurrentTime(0); - } -} - -int BoxAnimator::currentAnimatorTime(const QString &property) -{ - if(property == "MouseOver") - return m_mouseover->currentTime(); - else if(property == "SunKen") - return m_sunken->currentTime(); - else - return this->currentTime(); -} - -int BoxAnimator::totalAnimationDuration(const QString &property) -{ - if(property == "MouseOver") - return m_mouseover->duration(); - else if(property == "SunKen") - return m_sunken->duration(); - else - return this->duration(); -} - diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/box-animator.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/box-animator.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/box-animator.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/box-animator.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,66 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef BOXANIMATOR_H -#define BOXANIMATOR_H - -#include <QObject> -#include <QVariantAnimation> -#include <QParallelAnimationGroup> - -#include "animator-iface.h" - -namespace UKUI { - -namespace Box { -class BoxAnimator : public QParallelAnimationGroup, public AnimatorIface -{ - Q_OBJECT -public: - explicit BoxAnimator(QObject *parent = nullptr); - ~BoxAnimator(); - - bool bindWidget(QWidget *w); - bool unboundWidget(); - QWidget *boundedWidget() {return m_widget;} - QVariant value(const QString &property); - bool setAnimatorStartValue(const QString &property, const QVariant &value); - bool setAnimatorEndValue(const QString &property, const QVariant &value); - bool setAnimatorDuration(const QString &property, int duration); - void setAnimatorDirectionForward(const QString &property = nullptr, bool forward = true); - bool isRunning(const QString &property = nullptr); - void startAnimator(const QString &property = nullptr); - void stopAnimator(const QString &property = nullptr); - int currentAnimatorTime(const QString &property = nullptr); - int totalAnimationDuration(const QString &property = nullptr); - -signals: - -private: - QWidget* m_widget = nullptr; - QVariantAnimation *m_mouseover = nullptr; - QVariantAnimation *m_sunken = nullptr; -}; -} -} - -#endif // BOXANIMATOR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/button-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/button-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/button-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/button-animation-helper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,77 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "button-animation-helper.h" -#include "button-animator.h" -#include <QWidget> - -ButtonAnimationHelper::ButtonAnimationHelper(QObject *parent) : AnimationHelper(parent) -{ - -} - -ButtonAnimationHelper::~ButtonAnimationHelper() -{ - -} - - -bool ButtonAnimationHelper::registerWidget(QWidget *w) -{ - auto animator = new UKUI::Button::ButtonAnimator; - bool result = animator->bindWidget(w); - if (!result) - { - animator->deleteLater(); - animator = nullptr; - } - else - { - m_animators->insertMulti(w, animator); - } - - connect(w, &QWidget::destroyed, this, [=](){ - unregisterWidget(w); - }); - - return result; -} - -bool ButtonAnimationHelper::unregisterWidget(QWidget *w) -{ - auto animators = m_animators->values(w); - bool result = false; - for (auto animator : animators) { - if (animator) { - result = animator->unboundWidget(); - delete animator; - animator = nullptr; - } - } - m_animators->remove(w); - return result; -} - -AnimatorIface *ButtonAnimationHelper::animator(const QWidget *w) -{ - return m_animators->value(w); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/button-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/button-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/button-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/button-animation-helper.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,47 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef BUTTONANIMATIONHELPER_H -#define BUTTONANIMATIONHELPER_H - -#include <QObject> -#include "animation-helper.h" -#include "animator-iface.h" -#include "button-animator.h" - -class ButtonAnimationHelper: public AnimationHelper -{ - Q_OBJECT -public: - ButtonAnimationHelper(QObject *parent = nullptr); - ~ButtonAnimationHelper(); - bool registerWidget(QWidget *w); - bool unregisterWidget(QWidget *w); - - AnimatorIface *animator(const QWidget *w); - -signals: - -public slots: -}; - -#endif // BUTTONANIMATIONHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/button-animator.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/button-animator.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/button-animator.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/button-animator.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,260 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "button-animator.h" -#include <QToolButton> -#include <QPushButton> -#include <QComboBox> -#include <QSpinBox> -#include <QDoubleSpinBox> - -using namespace UKUI::Button; - -ButtonAnimator::ButtonAnimator(QObject *parent) : QParallelAnimationGroup (parent) -{ - -} - -ButtonAnimator::~ButtonAnimator() -{ - if(m_mouseover){ - m_mouseover->deleteLater(); - m_mouseover = nullptr; - } - if(m_sunken){ - m_sunken->deleteLater(); - m_sunken = nullptr; - } -} - -bool ButtonAnimator::bindWidget(QWidget *w) -{ - if (w->property("doNotAnimate").toBool()) - return false; - if (qobject_cast<QToolButton*>(w) || qobject_cast<QPushButton*>(w) || qobject_cast<QComboBox*>(w) - || qobject_cast<QSpinBox*>(w) || qobject_cast<QDoubleSpinBox*>(w)) { - m_widget = w; - } else { - return false; - } - - m_mouseover = new QVariantAnimation(); - m_mouseover->setStartValue(0.0); - m_mouseover->setEndValue(1.0); - m_mouseover->setDuration(100); - m_mouseover->setEasingCurve(QEasingCurve::OutCubic); - addAnimation(m_mouseover); - - m_sunken = new QVariantAnimation(); - m_sunken->setStartValue(0.0); - m_sunken->setEndValue(1.0); - m_sunken->setDuration(75); - m_sunken->setEasingCurve(QEasingCurve::InCubic); - addAnimation(m_sunken); - - connect(m_sunken, &QVariantAnimation::valueChanged, w, [=]() { - w->update(); - }); - connect(m_mouseover, &QVariantAnimation::valueChanged, w, [=]() { - w->update(); - }); - connect(m_sunken, &QVariantAnimation::finished, w, [=]() { - w->update(); - }); - connect(m_mouseover, &QVariantAnimation::finished, w, [=]() { - w->update(); - }); - return true; -} - -bool ButtonAnimator::unboundWidget() -{ - this->stop(); - this->setDirection(QAbstractAnimation::Forward); - - if(m_mouseover){ - m_mouseover->deleteLater(); - m_mouseover = nullptr; - } - if(m_sunken){ - m_sunken->deleteLater(); - m_sunken = nullptr; - } - - if (m_widget) { - this->setParent(nullptr); - return true; - } - return false; - -} - -QVariant ButtonAnimator::value(const QString &property) -{ - if(property == "MouseOver") - return m_mouseover->currentValue(); - else if(property == "SunKen") - return m_sunken->currentValue(); - else - return QVariant(); -} - -bool ButtonAnimator::isRunning(const QString &property) -{ - if(property == "MouseOver") - return m_mouseover->state() == Running; - else if(property == "SunKen") - return m_sunken->state() == Running; - else - return this->state() == Running; -} - -bool ButtonAnimator::setAnimatorStartValue(const QString &property, const QVariant &value) -{ - if(property == "MouseOver") - { - m_mouseover->setStartValue(value); - return true; - } - else if(property == "SunKen") - { - m_sunken->setStartValue(value); - return true; - } - else - { - return false; - } -} - -bool ButtonAnimator::setAnimatorEndValue(const QString &property, const QVariant &value) -{ - if(property == "MouseOver") - { - m_mouseover->setEndValue(value); - return true; - } - else if(property == "SunKen") - { - m_sunken->setEndValue(value); - return true; - } - else - { - return false; - } -} - -bool ButtonAnimator::setAnimatorDuration(const QString &property, int duration) -{ - if(property == "MouseOver") - { - m_mouseover->setDuration(duration); - return true; - } - else if(property == "SunKen") - { - m_sunken->setDuration(duration); - return true; - } - else - { - return false; - } -} - -void ButtonAnimator::setAnimatorDirectionForward(const QString &property, bool forward) -{ - auto d = forward? QAbstractAnimation::Forward: QAbstractAnimation::Backward; - if(property == "MouseOver") - m_mouseover->setDirection(d); - else if(property == "SunKen") - m_sunken->setDirection(d); - else - return; -} -void ButtonAnimator::startAnimator(const QString &property) -{ - if(property == "MouseOver") - m_mouseover->start(); - else if(property == "SunKen") - m_sunken->start(); - else - this->start(); -} - -void ButtonAnimator::stopAnimator(const QString &property) -{ - if(property == "MouseOver") { - m_mouseover->stop(); - m_mouseover->setCurrentTime(0); - } - else if(property == "SunKen") - { - m_sunken->stop(); - m_sunken->setCurrentTime(0); - } - else - { - this->stop(); - this->setCurrentTime(0); - } -} - -int ButtonAnimator::currentAnimatorTime(const QString &property) -{ - if(property == "MouseOver") - return m_mouseover->currentTime(); - else if(property == "SunKen") - return m_sunken->currentTime(); - else - return this->currentTime(); -} - -void ButtonAnimator::setAnimatorCurrentTime(const QString &property, const int msecs) -{ - if ("MouseOver" == property) { - m_mouseover->setCurrentTime(msecs); - } else if("SunKen" == property) { - m_sunken->setCurrentTime(msecs); - } -} - -int ButtonAnimator::totalAnimationDuration(const QString &property) -{ - if(property == "MouseOver") - return m_mouseover->duration(); - else if(property == "SunKen") - return m_sunken->duration(); - else - return this->duration(); -} - -QVariant ButtonAnimator::endValue(const QString &property) -{ - if(property == "MouseOver") - return m_mouseover->endValue(); - else if(property == "SunKen") - return m_sunken->endValue(); - else - return this->endValue(); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/button-animator.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/button-animator.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/button-animator.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/button-animator.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,72 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef BUTTONANIMATOR_H -#define BUTTONANIMATOR_H - -#include <QObject> -#include <QVariantAnimation> -#include <QParallelAnimationGroup> - -#include "animator-iface.h" - - - -namespace UKUI { - -namespace Button { -class ButtonAnimator : public QParallelAnimationGroup, public AnimatorIface -{ - Q_OBJECT -public: - explicit ButtonAnimator(QObject *parent = nullptr); - ~ButtonAnimator(); - - bool bindWidget(QWidget *w); - bool unboundWidget(); - QWidget *boundedWidget() {return m_widget;} - QVariant value(const QString &property); - bool setAnimatorStartValue(const QString &property, const QVariant &value); - bool setAnimatorEndValue(const QString &property, const QVariant &value); - bool setAnimatorDuration(const QString &property, int duration); - void setAnimatorDirectionForward(const QString &property = nullptr, bool forward = true); - bool isRunning(const QString &property = nullptr); - void startAnimator(const QString &property = nullptr); - void stopAnimator(const QString &property = nullptr); - int currentAnimatorTime(const QString &property = nullptr); - void setAnimatorCurrentTime(const QString &property = nullptr, const int msecs = 0); - int totalAnimationDuration(const QString &property = nullptr); - QVariant endValue(const QString &property = nullptr); - -signals: - -private: - QWidget* m_widget = nullptr; - QVariantAnimation *m_mouseover = nullptr; - QVariantAnimation *m_sunken = nullptr; - -}; - -} -} - -#endif // BUTTONANIMATOR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,79 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "checkbox-animation-helper.h" - -#include "checkbox-animator.h" -#include <QWidget> -#include <QDebug> - -CheckBoxAnimationHelper::CheckBoxAnimationHelper(QObject *parent) : AnimationHelper(parent) -{ - -} - -CheckBoxAnimationHelper::~CheckBoxAnimationHelper() -{ - -} - -bool CheckBoxAnimationHelper::registerWidget(QWidget *w) -{ - auto animator = new UKUI::CheckBox::CheckBoxAnimator; - bool result = animator->bindWidget(w); - if (!result) - { - animator->deleteLater(); - animator = nullptr; - } - else - { - m_animators->insert(w, animator); - } - - connect(w, &QWidget::destroyed, this, [=](){ - unregisterWidget(w); - }); - - return result; -} - -bool CheckBoxAnimationHelper::unregisterWidget(QWidget *w) -{ - auto animators = m_animators->values(w); - bool result = false; - for (auto animator : animators) { - if (animator) { - result = animator->unboundWidget(); - delete animator; - animator = nullptr; - } - } - m_animators->remove(w); - return result; -} - -AnimatorIface *CheckBoxAnimationHelper::animator(const QWidget *w) -{ - return m_animators->value(w); -} - diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/checkbox-animation-helper.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,47 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef CHECKBOXANIMATIONHELPER_H -#define CHECKBOXANIMATIONHELPER_H - -#include <QObject> -#include "animation-helper.h" -#include "animator-iface.h" -#include "checkbox-animator.h" - -class CheckBoxAnimationHelper : public AnimationHelper -{ - Q_OBJECT -public: - CheckBoxAnimationHelper(QObject *parent = nullptr); - ~CheckBoxAnimationHelper(); - bool registerWidget(QWidget *w); - bool unregisterWidget(QWidget *w); - - AnimatorIface *animator(const QWidget *w); - -signals: - -public slots: -}; - -#endif // CHECKBOXANIMATIONHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/checkbox-animator.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/checkbox-animator.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/checkbox-animator.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/checkbox-animator.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,398 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "checkbox-animator.h" - -#include <QCheckBox> -#include <QDebug> - -using namespace UKUI::CheckBox; - -CheckBoxAnimator::CheckBoxAnimator(QObject *parent) : QParallelAnimationGroup (parent) -{ - -} - -CheckBoxAnimator::~CheckBoxAnimator() -{ - if(m_onScale){ - m_onScale->deleteLater(); - m_onScale = nullptr; - } - if(m_onOpacity){ - m_onOpacity->deleteLater(); - m_onOpacity = nullptr; - } - if(m_onBase){ - m_onBase->deleteLater(); - m_onBase = nullptr; - } - if(m_off){ - m_off->deleteLater(); - m_off = nullptr; - } -} - -bool CheckBoxAnimator::bindWidget(QWidget *w) -{ - if (w->property("doNotAnimate").toBool()) - return false; - - if (qobject_cast<QCheckBox*>(w)) { - m_widget = w; - } else { - return false; - } - - m_onScale = new QVariantAnimation(this); - m_onScale->setStartValue(0.0); - m_onScale->setEndValue(1.0); - m_onScale->setDuration(260); - m_onScale->setEasingCurve(QEasingCurve::InOutSine); - addAnimation(m_onScale); - connect(m_onScale, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { - w->update(); - }); - connect(m_onScale, &QVariantAnimation::finished, w, [=]() { - w->update(); - }); - - m_onOpacity = new QVariantAnimation(this); - m_onOpacity->setStartValue(0.0); - m_onOpacity->setEndValue(1.0); - m_onOpacity->setDuration(120); - m_onOpacity->setEasingCurve(QEasingCurve::InOutSine); - addAnimation(m_onOpacity); - connect(m_onOpacity, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { - w->update(); - }); - connect(m_onOpacity, &QVariantAnimation::finished, w, [=]() { - w->update(); - }); - - m_onBase = new QVariantAnimation(this); - m_onBase->setStartValue(0.0); - m_onBase->setEndValue(1.0); - m_onBase->setDuration(180); - m_onBase->setEasingCurve(QEasingCurve::InOutSine); - addAnimation(m_onBase); - connect(m_onBase, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { - w->update(); - }); - connect(m_onBase, &QVariantAnimation::finished, w, [=]() { - w->update(); - }); - - m_off = new QVariantAnimation(this); - m_off->setStartValue(1.0); - m_off->setEndValue(0.0); - m_off->setDuration(100); - m_off->setEasingCurve(QEasingCurve::OutCubic); - addAnimation(m_off); - - connect(m_off, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { - w->update(); - }); - connect(m_off, &QVariantAnimation::finished, w, [=]() { - qDebug() << "m_off finished......."; - w->update(); - }); - return true; - -} - -bool CheckBoxAnimator::unboundWidget() -{ - this->stop(); - this->setDirection(QAbstractAnimation::Forward); - if(m_onScale){ - m_onScale->deleteLater(); - m_onScale = nullptr; - } - if(m_onOpacity){ - m_onOpacity->deleteLater(); - m_onOpacity = nullptr; - } - if(m_onBase){ - m_onBase->deleteLater(); - m_onBase = nullptr; - } - if(m_off){ - m_off->deleteLater(); - m_off = nullptr; - } - - if (m_widget) { - this->setParent(nullptr); - return true; - } - return false; - -} - -QVariant CheckBoxAnimator::value(const QString &property) -{ - if(property == "OnScale") - return m_onScale->currentValue(); - else if(property == "OnOpacity") - return m_onOpacity->currentValue(); - else if(property == "OnBase") - return m_onBase->currentValue(); - else if(property == "Off") - return m_off->currentValue(); - else - return QVariant(); -} - -bool CheckBoxAnimator::isRunning(const QString &property) -{ - if(property == "OnScale") - return m_onScale->state() == Running; - else if(property == "OnOpacity") - return m_onOpacity->state() == Running; - else if(property == "OnBase") - return m_onBase->state() == Running; - else if(property == "Off") - return m_off->state() == Running; - else - return this->state() == Running; -} - -bool CheckBoxAnimator::setAnimatorStartValue(const QString &property, const QVariant &value) -{ - if(property == "OnScale") - { - m_onScale->setStartValue(value); - return true; - } - else if(property == "OnOpacity") - { - m_onOpacity->setStartValue(value); - return true; - } - else if(property == "OnBase") - { - m_onBase->setStartValue(value); - return true; - } - else if(property == "Off") - { - m_off->setStartValue(value); - return true; - } - else - { - return false; - } -} - -bool CheckBoxAnimator::setAnimatorEndValue(const QString &property, const QVariant &value) -{ - if(property == "OnScale") - { - m_onScale->setEndValue(value); - return true; - } - else if(property == "OnOpacity") - { - m_onOpacity->setEndValue(value); - return true; - } - else if(property == "OnBase") - { - m_onBase->setEndValue(value); - return true; - } - else if(property == "Off") - { - m_off->setEndValue(value); - return true; - } - else - { - return false; - } -} - -bool CheckBoxAnimator::setAnimatorDuration(const QString &property, int duration) -{ - if(property == "OnScale") - { - m_onScale->setDuration(duration); - return true; - } - else if(property == "OnOpacity") - { - m_onOpacity->setDuration(duration); - return true; - } - else if(property == "OnBase") - { - m_onBase->setDuration(duration); - return true; - } - else if(property == "Off") - { - m_off->setDuration(duration); - return true; - } - else - { - return false; - } -} - -void CheckBoxAnimator::setAnimatorDirectionForward(const QString &property, bool forward) -{ - auto d = forward? QAbstractAnimation::Forward: QAbstractAnimation::Backward; - if(property == "OnScale") - m_onScale->setDirection(d); - else if(property == "OnOpacity") - { - m_onOpacity->setDirection(d); - } - else if(property == "OnBase") - { - m_onBase->setDirection(d); - } - else if(property == "Off") - { - m_off->setDirection(d); - } - else - return; -} -void CheckBoxAnimator::startAnimator(const QString &property) -{ - if(property == "OnScale") - m_onScale->start(); - else if(property == "OnOpacity") - { - m_onOpacity->start(); - } - else if(property == "OnBase") - { - m_onBase->start(); - } - else if(property == "Off") - { - m_off->start(); - } - else - this->start(); -} - -void CheckBoxAnimator::stopAnimator(const QString &property) -{ - if(property == "OnScale") - { - m_onScale->stop(); - m_onScale->setCurrentTime(0); - } - else if(property == "OnOpacity") - { - m_onOpacity->stop(); - m_onOpacity->setCurrentTime(0); - } - else if(property == "OnBase") - { - m_onBase->stop(); - m_onBase->setCurrentTime(0); - } - else if(property == "Off") - { - m_off->stop(); - m_off->setCurrentTime(0); - } - else - { - this->stop(); - this->setCurrentTime(0); - } -} - -int CheckBoxAnimator::currentAnimatorTime(const QString &property) -{ - if(property == "OnScale") - return m_onScale->currentTime(); - else if(property == "OnOpacity") - { - return m_onOpacity->currentTime(); - } - else if(property == "OnBase") - { - return m_onBase->currentTime(); - } - else if(property == "Off") - return m_off->currentTime(); - else - return this->currentTime(); -} - -void CheckBoxAnimator::setAnimatorCurrentTime(const QString &property, const int msecs) -{ - if ("OnScale" == property) { - m_onScale->setCurrentTime(msecs); - } - else if(property == "OnOpacity") - { - m_onOpacity->setCurrentTime(msecs); - } - else if(property == "OnBase") - { - m_onBase->setCurrentTime(msecs); - } - else if("Off" == property) { - m_off->setCurrentTime(msecs); - } -} - -int CheckBoxAnimator::totalAnimationDuration(const QString &property) -{ - if(property == "OnScale") - return m_onScale->duration(); - else if(property == "OnOpacity") - { - return m_onOpacity->duration(); - } - else if(property == "OnBase") - { - return m_onBase->duration(); - } - else if(property == "Off") - return m_off->duration(); - else - return this->duration(); -} - -void CheckBoxAnimator::setExtraProperty(const QString &property, const QVariant &value) -{ - if(property == "nochange") - m_noChange = value.toBool(); -} - -QVariant CheckBoxAnimator::getExtraProperty(const QString &property) -{ - if(property == "nochange") - return m_noChange; - return QVariant(); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/checkbox-animator.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/checkbox-animator.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/checkbox-animator.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/checkbox-animator.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,72 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef CHECKBOXANIMATOR_H -#define CHECKBOXANIMATOR_H - -#include <QObject> -#include <QVariantAnimation> -#include <QParallelAnimationGroup> - -#include "animator-iface.h" - -namespace UKUI { - -namespace CheckBox { -class CheckBoxAnimator : public QParallelAnimationGroup, public AnimatorIface -{ - Q_OBJECT -public: - explicit CheckBoxAnimator(QObject *parent = nullptr); - ~CheckBoxAnimator(); - - bool bindWidget(QWidget *w); - bool unboundWidget(); - QWidget *boundedWidget() {return m_widget;} - QVariant value(const QString &property); - bool setAnimatorStartValue(const QString &property, const QVariant &value); - bool setAnimatorEndValue(const QString &property, const QVariant &value); - bool setAnimatorDuration(const QString &property, int duration); - void setAnimatorDirectionForward(const QString &property = nullptr, bool forward = true); - bool isRunning(const QString &property = nullptr); - void startAnimator(const QString &property = nullptr); - void stopAnimator(const QString &property = nullptr); - int currentAnimatorTime(const QString &property = nullptr); - void setAnimatorCurrentTime(const QString &property, const int msecs); - int totalAnimationDuration(const QString &property = nullptr); - void setExtraProperty(const QString &property, const QVariant &value); - QVariant getExtraProperty(const QString &property); - -signals: - -private: - QWidget* m_widget = nullptr; - QVariantAnimation *m_onScale = nullptr; - QVariantAnimation *m_onOpacity = nullptr; - QVariantAnimation *m_onBase = nullptr; - QVariantAnimation *m_off = nullptr; - bool m_noChange = false; -}; -} -} - -#endif // CHECKBOXANIMATOR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,79 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "progressbar-animation-helper.h" - -ProgressBarAnimationHelper::ProgressBarAnimationHelper(QObject *parent) : QObject(parent) -{ - animations = new QHash<QObject *, QVariantAnimation *>(); -} - - - -ProgressBarAnimationHelper::~ProgressBarAnimationHelper() -{ - for(auto item = animations->begin(); item != animations->end(); item++) - delete item.value(); - - if(animations){ - delete animations; - animations = nullptr; - } -} - - - -void ProgressBarAnimationHelper::startAnimation(QVariantAnimation *animation) -{ - stopAnimation(animation->parent()); - connect(animation, SIGNAL(destroyed()), SLOT(_q_removeAnimation()), Qt::UniqueConnection); - animations->insert(animation->parent(), animation); - animation->start(); -} - - - -void ProgressBarAnimationHelper::stopAnimation(QObject *target) -{ - QVariantAnimation *animation = animations->take(target); - if (animation) { - animation->stop(); - delete animation; - animation = nullptr; - } -} - - - -QVariantAnimation* ProgressBarAnimationHelper::animation(QObject *target) -{ - return animations->value(target); -} - - - -void ProgressBarAnimationHelper::_q_removeAnimation() -{ - QObject *animation = this->sender(); - if (animation) - animations->remove(animation->parent()); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/progressbar-animation-helper.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,50 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef PROGRESSBARANIMATIONHELPER_H -#define PROGRESSBARANIMATIONHELPER_H - -#include <QObject> -#include <QVariantAnimation> -#include <QHash> -#include "progressbar-animation.h" - - -class ProgressBarAnimationHelper : public QObject -{ - Q_OBJECT -public: - ProgressBarAnimationHelper(QObject *parent = nullptr); - virtual ~ProgressBarAnimationHelper(); - - void startAnimation(QVariantAnimation *animation); - void stopAnimation(QObject *target); - QVariantAnimation* animation(QObject *target); - -public slots: - void _q_removeAnimation(); - -private: - QHash<QObject*, QVariantAnimation*> *animations = nullptr; -}; - -#endif // PROGRESSBARANIMATIONHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/progressbar-animation.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/progressbar-animation.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/progressbar-animation.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/progressbar-animation.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,57 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "progressbar-animation.h" - -ProgressBarAnimation::ProgressBarAnimation(QObject *parent) : QVariantAnimation (parent) -{ - init(); -} - - -ProgressBarAnimation::~ProgressBarAnimation() -{ - -} - -QWidget *ProgressBarAnimation::target() -{ - return qobject_cast<QWidget*>(parent()); -} - - - -void ProgressBarAnimation::init() -{ - this->setStartValue(0.0); - this->setEndValue(1.0); - this->setDuration(2500); - this->setDirection(QAbstractAnimation::Forward); - this->setEasingCurve(QEasingCurve::InOutSine); - - connect(this, &QVariantAnimation::valueChanged, target(), [=](QVariant value) { - target()->repaint(); - }); - connect(this, &QVariantAnimation::finished, target(), [=]() { - target()->repaint(); - }); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/progressbar-animation.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/progressbar-animation.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/progressbar-animation.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/progressbar-animation.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,44 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef PROGRESSBARANIMATOR_H -#define PROGRESSBARANIMATOR_H - -#include <QObject> -#include <QVariantAnimation> -#include <QProgressBar> - - - -class ProgressBarAnimation : public QVariantAnimation -{ - Q_OBJECT -public: - ProgressBarAnimation(QObject *parent); - ~ProgressBarAnimation(); - - QWidget *target(); -private: - void init(); -}; - -#endif // PROGRESSBARANIMATOR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,75 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "radiobutton-animation-helper.h" - -#include "radiobutton-animator.h" -#include <QWidget> -#include <QDebug> - -RadioButtonAnimationHelper::RadioButtonAnimationHelper(QObject *parent) : AnimationHelper(parent) -{ - -} - -RadioButtonAnimationHelper::~RadioButtonAnimationHelper() -{ - -} - -bool RadioButtonAnimationHelper::registerWidget(QWidget *w) -{ - auto animator = new UKUI::RadioButton::RadioButtonAnimator; - bool result = animator->bindWidget(w); - if (!result) - { - animator->deleteLater(); - } - else - { - m_animators->insert(w, animator); - } - - connect(w, &QWidget::destroyed, this, [=](){ - unregisterWidget(w); - }); - - return result; -} - -bool RadioButtonAnimationHelper::unregisterWidget(QWidget *w) -{ - auto animator= m_animators->value(w); - bool result = false; - if (animator) { - result = animator->unboundWidget(); - delete animator; - } - m_animators->remove(w); - return result; -} - -AnimatorIface *RadioButtonAnimationHelper::animator(const QWidget *w) -{ - return m_animators->value(w); -} - diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/radiobutton-animation-helper.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,47 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef RADIOBUTTONANIMATIONHELPER_H -#define RADIOBUTTONANIMATIONHELPER_H - -#include <QObject> -#include "animation-helper.h" -#include "animator-iface.h" -#include "radiobutton-animator.h" - -class RadioButtonAnimationHelper : public AnimationHelper -{ - Q_OBJECT -public: - RadioButtonAnimationHelper(QObject *parent = nullptr); - ~RadioButtonAnimationHelper(); - bool registerWidget(QWidget *w); - bool unregisterWidget(QWidget *w); - - AnimatorIface *animator(const QWidget *w); - -signals: - -public slots: -}; - -#endif // RADIOBUTTONANIMATIONHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,260 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "radiobutton-animator.h" - -#include <QRadioButton> -#include <QDebug> - -using namespace UKUI::RadioButton; - -RadioButtonAnimator::RadioButtonAnimator(QObject *parent) : QParallelAnimationGroup (parent) -{ - -} - -RadioButtonAnimator::~RadioButtonAnimator() -{ - if(m_off){ - m_off->deleteLater(); - m_off = nullptr; - } - if(m_sunkenon){ - m_sunkenon->deleteLater(); - m_sunkenon = nullptr; - } -} - -bool RadioButtonAnimator::bindWidget(QWidget *w) -{ - if (w->property("doNotAnimate").toBool()) - return false; - - if (qobject_cast<QRadioButton*>(w)) { - m_widget = w; - } else { - return false; - } - - m_sunkenon = new QVariantAnimation(this); - m_sunkenon->setStartValue(0.0); - m_sunkenon->setEndValue(1.0); - m_sunkenon->setDuration(200); - m_sunkenon->setEasingCurve(QEasingCurve::OutCubic); - - addAnimation(m_sunkenon); - - connect(m_sunkenon, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { - w->update(); - }); - connect(m_sunkenon, &QVariantAnimation::finished, w, [=]() { - w->update(); - }); - - m_off = new QVariantAnimation(this); - m_off->setStartValue(1.0); - m_off->setEndValue(0.0); - m_off->setDuration(100); - m_off->setEasingCurve(QEasingCurve::OutCubic); - - addAnimation(m_off); - - connect(m_off, &QVariantAnimation::valueChanged, w, [=](const QVariant &value) { - w->update(); - }); - connect(m_off, &QVariantAnimation::finished, w, [=]() { - w->update(); - }); - return true; - -} - -bool RadioButtonAnimator::unboundWidget() -{ - this->stop(); - this->setDirection(QAbstractAnimation::Forward); - if(m_sunkenon){ - m_sunkenon->deleteLater(); - m_sunkenon = nullptr; - } - if(m_off){ - m_off->deleteLater(); - m_off = nullptr; - } - - if (m_widget) { - this->setParent(nullptr); - return true; - } - return false; - -} - -QVariant RadioButtonAnimator::value(const QString &property) -{ - if(property == "SunKenOn") - return m_sunkenon->currentValue(); - else if(property == "Off") - return m_off->currentValue(); - else - return QVariant(); -} - -bool RadioButtonAnimator::isRunning(const QString &property) -{ - if(property == "SunKenOn"){ - return m_sunkenon->state() == Running; - } - else if(property == "Off") - return m_off->state() == Running; - else - return this->state() == Running; -} - -bool RadioButtonAnimator::setAnimatorStartValue(const QString &property, const QVariant &value) -{ - if(property == "SunKenOn") - { - m_sunkenon->setStartValue(value); - return true; - } - else if(property == "Off") - { - m_off->setStartValue(value); - return true; - } - else - { - return false; - } -} - -bool RadioButtonAnimator::setAnimatorEndValue(const QString &property, const QVariant &value) -{ - if(property == "SunKenOn") - { - m_sunkenon->setEndValue(value); - return true; - } - else if(property == "Off") - { - m_off->setEndValue(value); - return true; - } - else - { - return false; - } -} - -bool RadioButtonAnimator::setAnimatorDuration(const QString &property, int duration) -{ - if(property == "SunKenOn") - { - m_sunkenon->setDuration(duration); - return true; - } - else if(property == "Off") - { - m_off->setDuration(duration); - return true; - } - else - { - return false; - } -} - -void RadioButtonAnimator::setAnimatorDirectionForward(const QString &property, bool forward) -{ - auto d = forward? QAbstractAnimation::Forward: QAbstractAnimation::Backward; - if(property == "SunKenOn") - m_sunkenon->setDirection(d); - else if(property == "Off") - { - m_off->setDirection(d); - } - else - return; -} -void RadioButtonAnimator::startAnimator(const QString &property) -{ - if(property == "SunKenOn") - { - m_sunkenon->start(); - } - else if(property == "Off") - { - m_off->start(); - } - else - this->start(); -} - -void RadioButtonAnimator::stopAnimator(const QString &property) -{ - if(property == "SunKenOn") - { - m_sunkenon->stop(); - m_sunkenon->setCurrentTime(0); - } - else if(property == "Off") - { - m_off->stop(); - m_off->setCurrentTime(0); - } - else - { - this->stop(); - this->setCurrentTime(0); - } -} - -int RadioButtonAnimator::currentAnimatorTime(const QString &property) -{ - if(property == "SunKenOn") - return m_sunkenon->currentTime(); - if(property == "Off") - return m_off->currentTime(); - else - return this->currentTime(); -} - -void RadioButtonAnimator::setAnimatorCurrentTime(const QString &property, const int msecs) -{ - if ("SunKenOn" == property) { - m_sunkenon->setCurrentTime(msecs); - } else if("Off" == property) { - m_off->setCurrentTime(msecs); - } -} - -int RadioButtonAnimator::totalAnimationDuration(const QString &property) -{ - if(property == "SunKenOn") - return m_sunkenon->duration(); - if(property == "Off") - return m_off->duration(); - else - return this->duration(); -} - diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/radiobutton-animator.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,67 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef RADIOANIMATOR_H -#define RADIOANIMATOR_H - -#include <QObject> -#include <QVariantAnimation> -#include <QParallelAnimationGroup> - -#include "animator-iface.h" - -namespace UKUI { - -namespace RadioButton { -class RadioButtonAnimator : public QParallelAnimationGroup, public AnimatorIface -{ - Q_OBJECT -public: - explicit RadioButtonAnimator(QObject *parent = nullptr); - ~RadioButtonAnimator(); - - bool bindWidget(QWidget *w); - bool unboundWidget(); - QWidget *boundedWidget() {return m_widget;} - QVariant value(const QString &property); - bool setAnimatorStartValue(const QString &property, const QVariant &value); - bool setAnimatorEndValue(const QString &property, const QVariant &value); - bool setAnimatorDuration(const QString &property, int duration); - void setAnimatorDirectionForward(const QString &property = nullptr, bool forward = true); - bool isRunning(const QString &property = nullptr); - void startAnimator(const QString &property = nullptr); - void stopAnimator(const QString &property = nullptr); - int currentAnimatorTime(const QString &property = nullptr); - void setAnimatorCurrentTime(const QString &property = nullptr, const int msecs = 0); - int totalAnimationDuration(const QString &property = nullptr); - -signals: - -private: - QWidget* m_widget = nullptr; - QVariantAnimation *m_off = nullptr; - QVariantAnimation *m_sunkenon = nullptr; -}; -} -} - -#endif // RADIOANIMATOR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,79 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "scrollbar-animation-helper.h" - -#include "animations/scrollbar/ukui-scrollbar-default-interaction-animator.h" - -#include <QWidget> - -ScrollBarAnimationHelper::ScrollBarAnimationHelper(QObject *parent) : AnimationHelper(parent) -{ - -} - -ScrollBarAnimationHelper::~ScrollBarAnimationHelper() -{ - -} - -bool ScrollBarAnimationHelper::registerWidget(QWidget *w) -{ - auto animator = new UKUI::ScrollBar::DefaultInteractionAnimator; - bool result = animator->bindWidget(w); - if (!result) - { - animator->deleteLater(); - animator = nullptr; - } - else - { - m_animators->insertMulti(w, animator); - } - - connect(w, &QWidget::destroyed, this, [=](){ - unregisterWidget(w); - }); - - return result; -} - -bool ScrollBarAnimationHelper::unregisterWidget(QWidget *w) -{ -// auto animator = w->findChild<UKUI::ScrollBar::DefaultInteractionAnimator*>("ukui_scrollbar_default_interaction_animator", Qt::FindDirectChildrenOnly); - auto animators = m_animators->values(w); - bool result = false; - for (auto animator : animators) { - if (animator) { - result = animator->unboundWidget(); - delete animator; - animator = nullptr; - } - } - m_animators->remove(w); - return result; -} - -AnimatorIface *ScrollBarAnimationHelper::animator(const QWidget *w) -{ - return m_animators->value(w); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/scrollbar-animation-helper.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,45 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef SCROLLBARANIMATIONHELPER_H -#define SCROLLBARANIMATIONHELPER_H - -#include <QObject> -#include "animation-helper.h" - -class ScrollBarAnimationHelper : public AnimationHelper -{ - Q_OBJECT -public: - explicit ScrollBarAnimationHelper(QObject *parent = nullptr); - ~ScrollBarAnimationHelper(); - bool registerWidget(QWidget *w); - bool unregisterWidget(QWidget *w); - - AnimatorIface *animator(const QWidget *w); - -signals: - -public slots: -}; - -#endif // SCROLLBARANIMATIONHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,78 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "slider-animation-helper.h" - -#include "slider-animator.h" - -#include <QWidget> - -SliderAnimationHelper::SliderAnimationHelper(QObject *parent) : AnimationHelper(parent) -{ - -} - -SliderAnimationHelper::~SliderAnimationHelper() -{ - -} - -bool SliderAnimationHelper::registerWidget(QWidget *w) -{ - auto animator = new UKUI::Slider::SliderAnimator; - bool result = animator->bindWidget(w); - if (!result) - { - animator->deleteLater(); - animator = nullptr; - } - else - { - m_animators->insertMulti(w, animator); - } - - connect(w, &QWidget::destroyed, this, [=](){ - unregisterWidget(w); - }); - - return result; -} - -bool SliderAnimationHelper::unregisterWidget(QWidget *w) -{ - auto animators= m_animators->values(w); - bool result = false; - for (auto animator : animators) { - if (animator) { - result = animator->unboundWidget(); - delete animator; - animator = nullptr; - } - } - m_animators->remove(w); - return result; -} - -AnimatorIface *SliderAnimationHelper::animator(const QWidget *w) -{ - return m_animators->value(w); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/slider-animation-helper.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,45 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef SLIDERANIMATIONHELPER_H -#define SLIDERANIMATIONHELPER_H - -#include <QObject> -#include "animation-helper.h" - -class SliderAnimationHelper : public AnimationHelper -{ - Q_OBJECT -public: - explicit SliderAnimationHelper(QObject *parent = nullptr); - ~SliderAnimationHelper(); - bool registerWidget(QWidget *w); - bool unregisterWidget(QWidget *w); - - AnimatorIface *animator(const QWidget *w); - -signals: - -public slots: -}; - -#endif // SLIDERANIMATIONHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/slider-animator.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/slider-animator.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/slider-animator.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/slider-animator.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,392 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "slider-animator.h" -#include <QSlider> - -#include <QVariantAnimation> - -#include <QDebug> - -using namespace UKUI::Slider; - -SliderAnimator::SliderAnimator(QObject *parent) : QParallelAnimationGroup (parent) -{ - -} - -SliderAnimator::~SliderAnimator() -{ - if(m_slider_opacity){ - m_slider_opacity->deleteLater(); - m_slider_opacity = nullptr; - } - if(m_hover_bg_width){ - m_hover_bg_width->deleteLater(); - m_hover_bg_width = nullptr; - } - if(m_sunken_silder_additional_opacity){ - m_sunken_silder_additional_opacity->deleteLater(); - m_sunken_silder_additional_opacity = nullptr; - } - if(m_silder_move_position){ - m_silder_move_position->deleteLater(); - m_silder_move_position = nullptr; - } -} - -/*! - * \brief SliderAnimator::bindWidget - * \param w - * \return - * - * \details - * QObject has a feature that parent object can use findChild() method - * getting a specific named child. - * - * I use QObject::setObjectName() set my animator and bind to a scroll bar. - * So that i could not cache a hash or map to manage animators. - * - * \bug - * Cause I use named QObject child to cache the animator for a scrollbar, - * However there are some troubles for my unexcepted. - * - * For example, qt5 assistant's main view can not find child correctly. - * I don't know if animator bind with child was been removed at some times. - */ -bool SliderAnimator::bindWidget(QWidget *w) -{ - if (w->property("doNotAnimate").toBool()) - return false; - - if (qobject_cast<QSlider*>(w)) { - m_widget = w; - } else { - return false; - } - - m_slider_opacity = new QVariantAnimation(this); - m_slider_opacity->setStartValue(0.0); - m_slider_opacity->setEndValue(1.0); - m_slider_opacity->setDuration(200); - m_slider_opacity->setEasingCurve(QEasingCurve::InOutCubic); - addAnimation(m_slider_opacity); - - m_hover_bg_width = new QVariantAnimation(this); - m_hover_bg_width->setStartValue(0.0); - m_hover_bg_width->setEndValue(1.0); - m_hover_bg_width->setDuration(200); - m_hover_bg_width->setEasingCurve(QEasingCurve::InOutCubic); - addAnimation(m_hover_bg_width); - - m_sunken_silder_additional_opacity = new QVariantAnimation(this); - m_sunken_silder_additional_opacity->setStartValue(0.0); - m_sunken_silder_additional_opacity->setEndValue(0.10); - m_sunken_silder_additional_opacity->setDuration(150); - addAnimation(m_sunken_silder_additional_opacity); - - m_silder_move_position = new QVariantAnimation(this); - m_silder_move_position->setStartValue(0.0); - m_silder_move_position->setEndValue(1.0); - m_silder_move_position->setDuration(150); - m_silder_move_position->setEasingCurve(QEasingCurve::Linear); - addAnimation(m_silder_move_position); - - connect(m_slider_opacity, &QVariantAnimation::valueChanged, w, [=]() { - w->update(); - }); - connect(m_sunken_silder_additional_opacity, &QVariantAnimation::valueChanged, w, [=]() { - w->update(); - }); - connect(m_silder_move_position, &QVariantAnimation::valueChanged, w, [=]() { - w->update(); - }); - connect(m_hover_bg_width, &QVariantAnimation::valueChanged, w, [=]() { - w->update(); - }); - connect(m_slider_opacity, &QVariantAnimation::finished, w, [=]() { - w->update(); - }); - connect(m_sunken_silder_additional_opacity, &QVariantAnimation::finished, w, [=]() { - w->update(); - }); - connect(m_silder_move_position, &QVariantAnimation::finished, w, [=]() { - w->update(); - }); - connect(m_hover_bg_width, &QVariantAnimation::finished, w, [=]() { - w->update(); - }); - - return true; -} - -bool SliderAnimator::unboundWidget() -{ - this->stop(); - this->setDirection(QAbstractAnimation::Forward); - if(m_slider_opacity){ - m_slider_opacity->deleteLater(); - m_slider_opacity = nullptr; - } - if(m_hover_bg_width){ - m_hover_bg_width->deleteLater(); - m_hover_bg_width = nullptr; - } - if(m_sunken_silder_additional_opacity){ - m_sunken_silder_additional_opacity->deleteLater(); - m_sunken_silder_additional_opacity = nullptr; - } - if(m_silder_move_position){ - m_silder_move_position->deleteLater(); - m_silder_move_position = nullptr; - } - if (m_widget) { - this->setParent(nullptr); - return true; - } - return false; -} - -QVariant SliderAnimator::value(const QString &property) -{ - if (property == "slider_opacity") { - return m_slider_opacity->currentValue(); - } else if (property == "additional_opacity") { - return m_sunken_silder_additional_opacity->currentValue(); - } else if (property == "move_position") { - return m_silder_move_position->currentValue(); - } else if (property == "bg_width") { - return m_hover_bg_width->currentValue(); - } else { - return QVariant(); - } -} - -bool SliderAnimator::setAnimatorStartValue(const QString &property, const QVariant &value) -{ - if (property == "slider_opacity") { - m_slider_opacity->setStartValue(value); - return true; - } else if (property == "additional_opacity") - { - m_sunken_silder_additional_opacity->setStartValue(value); - return true; - } else if (property == "move_position") { - m_silder_move_position->setStartValue(value); - return true; - } else if (property == "bg_width") { - m_hover_bg_width->setStartValue(value); - return true; - } else { - return false; - } -} - -bool SliderAnimator::setAnimatorEndValue(const QString &property, const QVariant &value) -{ - if (property == "slider_opacity") { - m_slider_opacity->setEndValue(value); - return true; - } else if (property == "additional_opacity") { - m_sunken_silder_additional_opacity->setEndValue(value); - return true; - } else if (property == "move_position") { - m_silder_move_position->setEndValue(value); - return true; - } else if (property == "bg_width") { - m_hover_bg_width->setEndValue(value); - return true; - } else { - return false; - } -} - -QVariant SliderAnimator::animatorStartValue(const QString &property) -{ - if (property == "slider_opacity") { - return m_slider_opacity->startValue(); - } else if (property == "additional_opacity") { - return m_sunken_silder_additional_opacity->startValue(); - } else if (property == "move_position") { - return m_silder_move_position->startValue(); - } else if (property == "bg_width") { - return m_hover_bg_width->startValue(); - } else { - return QVariant(); - } -} - -QVariant SliderAnimator::animatorEndValue(const QString &property) -{ - if (property == "slider_opacity") { - return m_slider_opacity->endValue(); - } else if (property == "additional_opacity") { - return m_sunken_silder_additional_opacity->endValue(); - } else if (property == "move_position") { - return m_silder_move_position->endValue(); - } else if (property == "bg_width") { - return m_hover_bg_width->endValue(); - } else { - return QVariant(); - } -} - - -bool SliderAnimator::setAnimatorDuration(const QString &property, int duration) -{ - if (property == "slider_opacity") { - m_slider_opacity->setDuration(duration); - return true; - } else if (property == "additional_opacity") { - m_sunken_silder_additional_opacity->setDuration(duration); - return true; - } else if (property == "move_position") { - m_silder_move_position->setDuration(duration); - return true; - } else if (property == "bg_width") { - m_hover_bg_width->setDuration(duration); - return true; - } else { - return false; - } -} - -void SliderAnimator::setAnimatorDirectionForward(const QString &property, bool forward) -{ - auto d = forward? QAbstractAnimation::Forward: QAbstractAnimation::Backward; - if (property == "slider_opacity") { - m_slider_opacity->setDirection(d); - } else if (property == "additional_opacity") { - m_sunken_silder_additional_opacity->setDirection(d); - } else if (property == "move_position") { - m_silder_move_position->setDirection(d); - } else if (property == "bg_width") { - m_hover_bg_width->setDirection(d); - } else { - return; - } -} - -bool SliderAnimator::isRunning(const QString &property) -{ - if (property == "slider_opacity") { - return m_slider_opacity->state() == Running; - } else if (property == "additional_opacity") { - return m_sunken_silder_additional_opacity->state() == Running; - } else if (property == "move_position") { - return m_silder_move_position->state() == Running; - } else if (property == "bg_width") { - return m_hover_bg_width->state() == Running; - } else { - return this->state() == Running; - } -} - -void SliderAnimator::startAnimator(const QString &property) -{ - if (property == "slider_opacity") { - m_slider_opacity->start(); - } else if (property == "additional_opacity") { - m_sunken_silder_additional_opacity->start(); - } else if (property == "move_position") { - m_silder_move_position->start(); - } else if (property == "bg_width") { - m_hover_bg_width->start(); - } else { - this->start(); - } -} - -void SliderAnimator::stopAnimator(const QString &property) -{ - if (property == "slider_opacity") { - m_slider_opacity->stop(); - } else if (property == "additional_opacity") { - m_sunken_silder_additional_opacity->stop(); - } else if (property == "move_position") { - m_silder_move_position->stop(); - } else if (property == "bg_width") { - m_hover_bg_width->stop(); - } else { - this->stop(); - } -} - -int SliderAnimator::currentAnimatorTime(const QString &property) -{ - if (property == "slider_opacity") { - return m_slider_opacity->currentTime(); - } else if (property == "additional_opacity") { - return m_sunken_silder_additional_opacity->currentTime(); - } else if (property == "move_position") { - return m_silder_move_position->currentTime(); - } else if (property == "bg_width") { - return m_hover_bg_width->currentTime(); - } else { - return this->currentTime(); - } -} - -void SliderAnimator::setAnimatorCurrentTime(const QString &property, const int msecs) -{ - if ("move_position" == property) { - m_silder_move_position->setCurrentTime(msecs); - } -} - - -int SliderAnimator::totalAnimationDuration(const QString &property) -{ - if (property == "slider_opacity") { - return m_slider_opacity->duration(); - } else if (property == "additional_opacity") { - return m_sunken_silder_additional_opacity->duration(); - } else if (property == "move_position") { - return m_silder_move_position->duration(); - } else if (property == "bg_width") { - return m_hover_bg_width->duration(); - } else { - return this->duration(); - } -} - -void SliderAnimator::setExtraProperty(const QString &property, const QVariant &value) -{ - if(property == "end_position") - m_endPosition = value.toInt(); - else if(property == "start_position") - m_startPosition = value.toInt(); - else if(property == "addValue") - m_addValue = value.toBool(); -} - -QVariant SliderAnimator::getExtraProperty(const QString &property) -{ - if(property == "end_position") - return m_endPosition; - else if(property == "start_position") - return m_startPosition; - else if(property == "addValue") - return m_addValue; - return QVariant(); -} - diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/slider-animator.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/slider-animator.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/slider-animator.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/slider-animator.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,79 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef SLIDERANIMATOR_H -#define SLIDERANIMATOR_H - -#include <QParallelAnimationGroup> -#include "animator-iface.h" - -class QVariantAnimation; - -namespace UKUI { - -namespace Slider { - -class SliderAnimator : public QParallelAnimationGroup, public AnimatorIface -{ - Q_OBJECT -public: - explicit SliderAnimator(QObject *parent = nullptr); - ~SliderAnimator(); - - bool bindWidget(QWidget *w); - bool unboundWidget(); - QWidget *boundedWidget() {return m_widget;} - - QVariant value(const QString &property); - bool isRunning(const QString &property = nullptr); - bool setAnimatorStartValue(const QString &property, const QVariant &value); - bool setAnimatorEndValue(const QString &property, const QVariant &value); - QVariant animatorStartValue(const QString &property); - QVariant animatorEndValue(const QString &property); - - bool setAnimatorDuration(const QString &property, int duration); - void setAnimatorDirectionForward(const QString &property = nullptr, bool forward = true); - void startAnimator(const QString &property = nullptr); - void stopAnimator(const QString &property = nullptr); - int currentAnimatorTime(const QString &property = nullptr); - void setAnimatorCurrentTime(const QString &property, const int msecs); - int totalAnimationDuration(const QString &property); - void setExtraProperty(const QString &property, const QVariant &value); - QVariant getExtraProperty(const QString &property); - -private: - QWidget *m_widget = nullptr; - - QVariantAnimation *m_slider_opacity = nullptr; - QVariantAnimation *m_hover_bg_width = nullptr; - QVariantAnimation *m_sunken_silder_additional_opacity = nullptr; - QVariantAnimation *m_silder_move_position = nullptr; - int m_endPosition = 0; - int m_startPosition = 0; - bool m_addValue; -}; - -} - -} - -#endif // SLIDERANIMATOR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,75 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "tab-widget-animation-helper.h" -#include "tabwidget/ukui-tabwidget-default-slide-animator.h" - -TabWidgetAnimationHelper::TabWidgetAnimationHelper(QObject *parent) : AnimationHelper(parent) -{ - -} - -TabWidgetAnimationHelper::~TabWidgetAnimationHelper() -{ - -} - -bool TabWidgetAnimationHelper::registerWidget(QWidget *w) -{ - auto animator = new UKUI::TabWidget::DefaultSlideAnimator; - bool result = animator->bindWidget(w); - if (!result) - { - animator->deleteLater(); - animator = nullptr; - } - else - { - m_animators->insertMulti(w, animator); - } - - connect(w, &QWidget::destroyed, this, [=](){ - unregisterWidget(w); - }); - - return result; -} - -bool TabWidgetAnimationHelper::unregisterWidget(QWidget *w) -{ - auto animators = m_animators->values(w); - bool result = false; - for (auto animator : animators) { - if (animator) { - result = animator->unboundWidget(); - delete animator; - animator = nullptr; - } - } - m_animators->remove(w); - return result; -} - -AnimatorIface *TabWidgetAnimationHelper::animator(const QWidget *w) -{ - return m_animators->value(w); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/tab-widget-animation-helper.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,42 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef TABWIDGETANIMATIONHELPER_H -#define TABWIDGETANIMATIONHELPER_H - -#include <QObject> -#include "animation-helper.h" - -class TabWidgetAnimationHelper : public AnimationHelper -{ - Q_OBJECT -public: - explicit TabWidgetAnimationHelper(QObject *parent = nullptr); - ~TabWidgetAnimationHelper(); - - bool registerWidget(QWidget *w); - bool unregisterWidget(QWidget *w); - - AnimatorIface *animator(const QWidget *w); -}; - -#endif // TABWIDGETANIMATIONHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,78 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "tree-animation-helper.h" - -#include "tree-animator.h" - -#include <QWidget> - -TreeAnimationHelper::TreeAnimationHelper(QObject *parent) : AnimationHelper(parent) -{ - -} - -TreeAnimationHelper::~TreeAnimationHelper() -{ - -} - -bool TreeAnimationHelper::registerWidget(QWidget *w) -{ - auto animator = new UKUI::Tree::TreeAnimator; - bool result = animator->bindWidget(w); - if (!result) - { - animator->deleteLater(); - animator = nullptr; - } - else - { - m_animators->insertMulti(w, animator); - } - - connect(w, &QWidget::destroyed, this, [=](){ - unregisterWidget(w); - }); - - return result; -} - -bool TreeAnimationHelper::unregisterWidget(QWidget *w) -{ - auto animators = m_animators->values(w); - bool result = false; - for (auto animator : animators) { - if (animator) { - result = animator->unboundWidget(); - delete animator; - animator = nullptr; - } - } - m_animators->remove(w); - return result; -} - -AnimatorIface *TreeAnimationHelper::animator(const QWidget *w) -{ - return m_animators->value(w); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/tree-animation-helper.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,45 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef TREEANIMATIONHELPER_H -#define TREEANIMATIONHELPER_H - -#include <QObject> -#include "animation-helper.h" - -class TreeAnimationHelper : public AnimationHelper -{ - Q_OBJECT -public: - explicit TreeAnimationHelper(QObject *parent = nullptr); - ~TreeAnimationHelper(); - bool registerWidget(QWidget *w); - bool unregisterWidget(QWidget *w); - - AnimatorIface *animator(const QWidget *w); - -signals: - -public slots: -}; - -#endif // TREEANIMATIONHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/tree-animator.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/tree-animator.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/tree-animator.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/tree-animator.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,296 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "tree-animator.h" -#include <QTreeView> - -#include <QVariantAnimation> - -#include <QDebug> - -using namespace UKUI::Tree; - -TreeAnimator::TreeAnimator(QObject *parent) : QParallelAnimationGroup (parent) -{ - -} - -TreeAnimator::~TreeAnimator() -{ - if(m_expand){ - m_expand->deleteLater(); - m_expand = nullptr; - } - if(m_collaps){ - m_collaps->deleteLater(); - m_collaps = nullptr; - } -} - -/*! - * \brief TreeAnimator::bindWidget - * \param w - * \return - * - * \details - * QObject has a feature that parent object can use findChild() method - * getting a specific named child. - * - * I use QObject::setObjectName() set my animator and bind to a scroll bar. - * So that i could not cache a hash or map to manage animators. - * - * \bug - * Cause I use named QObject child to cache the animator for a scrollbar, - * However there are some troubles for my unexcepted. - * - * For example, qt5 assistant's main view can not find child correctly. - * I don't know if animator bind with child was been removed at some times. - */ -bool TreeAnimator::bindWidget(QWidget *w) -{ - if (w->property("doNotAnimate").toBool()) - return false; - - if (qobject_cast<QTreeView*>(w)) { - m_widget = w; - } else { - return false; - } - - m_expand = new QVariantAnimation(this); - m_expand->setStartValue(0.0); - m_expand->setEndValue(1.0); - m_expand->setDuration(250); - m_expand->setEasingCurve(QEasingCurve::InOutCubic); - addAnimation(m_expand); - - m_collaps = new QVariantAnimation(this); - m_collaps->setStartValue(0.0); - m_collaps->setEndValue(1.0); - m_collaps->setDuration(250); - m_collaps->setEasingCurve(QEasingCurve::InOutCubic); - addAnimation(m_collaps); - - connect(m_expand, &QVariantAnimation::valueChanged, w, [=]() { - qobject_cast<QTreeView*>(w)->viewport()->update(); - }); - connect(m_collaps, &QVariantAnimation::valueChanged, w, [=]() { - qobject_cast<QTreeView*>(w)->viewport()->update(); - }); - connect(m_expand, &QVariantAnimation::finished, w, [=]() { - qobject_cast<QTreeView*>(w)->viewport()->update(); - }); - connect(m_collaps, &QVariantAnimation::finished, w, [=]() { - qobject_cast<QTreeView*>(w)->viewport()->update(); - }); - - return true; -} - -bool TreeAnimator::unboundWidget() -{ - this->stop(); - this->setDirection(QAbstractAnimation::Forward); - if(m_expand){ - m_expand->deleteLater(); - m_expand = nullptr; - } - if(m_collaps){ - m_collaps->deleteLater(); - m_collaps = nullptr; - } - - if (m_widget) { - this->setParent(nullptr); - return true; - } - return false; -} - -QVariant TreeAnimator::value(const QString &property) -{ - if (property == "expand") { - return m_expand->currentValue(); - } else if (property == "collaps") { - return m_collaps->currentValue(); - } else { - return QVariant(); - } -} - -bool TreeAnimator::setAnimatorStartValue(const QString &property, const QVariant &value) -{ - if (property == "expand") { - m_expand->setStartValue(value); - return true; - } else if (property == "collaps") - { - m_collaps->setStartValue(value); - return true; - } else { - return false; - } -} - -bool TreeAnimator::setAnimatorEndValue(const QString &property, const QVariant &value) -{ - if (property == "expand") { - m_expand->setEndValue(value); - return true; - } else if (property == "collaps") { - m_collaps->setEndValue(value); - return true; - } else { - return false; - } -} - -QVariant TreeAnimator::animatorStartValue(const QString &property) -{ - if (property == "expand") { - return m_expand->startValue(); - } else if (property == "collaps") { - return m_collaps->startValue(); - } else { - return QVariant(); - } -} - -QVariant TreeAnimator::animatorEndValue(const QString &property) -{ - if (property == "expand") { - return m_expand->endValue(); - } else if (property == "collaps") { - return m_collaps->endValue(); - } else { - return QVariant(); - } -} - - -bool TreeAnimator::setAnimatorDuration(const QString &property, int duration) -{ - if (property == "expand") { - m_expand->setDuration(duration); - return true; - } else if (property == "collaps") { - m_collaps->setDuration(duration); - return true; - } else { - return false; - } -} - -void TreeAnimator::setAnimatorDirectionForward(const QString &property, bool forward) -{ - auto d = forward? QAbstractAnimation::Forward: QAbstractAnimation::Backward; - if (property == "expand") { - m_expand->setDirection(d); - } else if (property == "collaps") { - m_collaps->setDirection(d); - } else { - return; - } -} - -bool TreeAnimator::isRunning(const QString &property) -{ - if (property == "expand") { - return m_expand->state() == Running; - } else if (property == "collaps") { - return m_collaps->state() == Running; - } else { - return this->state() == Running; - } -} - -void TreeAnimator::startAnimator(const QString &property) -{ - if (property == "expand") { - m_expand->start(); - } else if (property == "collaps") { - m_collaps->start(); - } else { - this->start(); - } -} - -void TreeAnimator::stopAnimator(const QString &property) -{ - if (property == "expand") { - m_expand->stop(); - } else if (property == "collaps") { - m_collaps->stop(); - } else { - this->stop(); - } -} - -int TreeAnimator::currentAnimatorTime(const QString &property) -{ - if (property == "expand") { - return m_expand->currentTime(); - } else if (property == "collaps") { - return m_collaps->currentTime(); - } else { - return this->currentTime(); - } -} - -void TreeAnimator::setAnimatorCurrentTime(const QString &property, const int msecs) -{ - if (property == "expand") { - return m_expand->setCurrentTime(msecs); - } else if (property == "collaps") { - return m_collaps->setCurrentTime(msecs); - } -} - - -int TreeAnimator::totalAnimationDuration(const QString &property) -{ - if (property == "expand") { - return m_expand->duration(); - } else if (property == "collaps") { - return m_collaps->duration(); - } else { - return this->duration(); - } -} - -void TreeAnimator::setExtraProperty(const QString &property, const QVariant &value) -{ - if(property == "expandItem") - m_expandItem = value.toString(); - else if(property == "collapsItem") - m_collapsItem = value.toString(); -} - -QVariant TreeAnimator::getExtraProperty(const QString &property) -{ - if(property == "expandItem") - return m_expandItem; - else if(property == "collapsItem") - return m_collapsItem; - return QVariant(); -} - diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/tree-animator.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/tree-animator.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/animations/tree-animator.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/animations/tree-animator.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,76 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef TREEANIMATOR_H -#define TREEANIMATOR_H - -#include <QParallelAnimationGroup> -#include "animator-iface.h" - -class QVariantAnimation; - -namespace UKUI { - -namespace Tree { - -class TreeAnimator : public QParallelAnimationGroup, public AnimatorIface -{ - Q_OBJECT -public: - explicit TreeAnimator(QObject *parent = nullptr); - ~TreeAnimator(); - - bool bindWidget(QWidget *w); - bool unboundWidget(); - QWidget *boundedWidget() {return m_widget;} - - QVariant value(const QString &property); - bool isRunning(const QString &property = nullptr); - bool setAnimatorStartValue(const QString &property, const QVariant &value); - bool setAnimatorEndValue(const QString &property, const QVariant &value); - QVariant animatorStartValue(const QString &property); - QVariant animatorEndValue(const QString &property); - - bool setAnimatorDuration(const QString &property, int duration); - void setAnimatorDirectionForward(const QString &property = nullptr, bool forward = true); - void startAnimator(const QString &property = nullptr); - void stopAnimator(const QString &property = nullptr); - int currentAnimatorTime(const QString &property = nullptr); - void setAnimatorCurrentTime(const QString &property, const int msecs); - int totalAnimationDuration(const QString &property); - void setExtraProperty(const QString &property, const QVariant &value); - QVariant getExtraProperty(const QString &property); - -private: - QWidget *m_widget = nullptr; - - QVariantAnimation *m_expand = nullptr; - QVariantAnimation *m_collaps = nullptr; - QString m_expandItem; - QString m_collapsItem; -}; - -} - -} - -#endif // TREEANIMATOR_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,766 +0,0 @@ -/* - * Copyright (C) 2018 Vlad Zagorodniy <vlad.zahorodnii@kde.org> - * - * The box blur implementation is based on AlphaBoxBlur from Firefox. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -// own -#include "breezeboxshadowrenderer.h" -#include <QX11Info> -#include <xcb/xcb.h> -#include <X11/Xlib.h> -#include <X11/X.h> -#include <xcb/xcb.h> -#include <QX11Info> -#include <X11/extensions/shape.h> - -// auto-generated -// Qt -#include <QPainter> - -#ifdef BREEZE_COMMON_USE_KDE4 -#include <QtCore/qmath.h> -#else -#include <QtMath> -#endif - -static inline int calculateBlurRadius(qreal stdDev) -{ - // See https://www.w3.org/TR/SVG11/filters.html#feGaussianBlurElement - const qreal gaussianScaleFactor = (3.0 * qSqrt(2.0 * M_PI) / 4.0) * 1.5; - return qMax(2, qFloor(stdDev * gaussianScaleFactor + 0.5)); -} - -static inline qreal calculateBlurStdDev(int radius) -{ - // See https://www.w3.org/TR/css-backgrounds-3/#shadow-blur - return radius * 0.5; -} - -static inline QSize calculateBlurExtent(int radius) -{ - const int blurRadius = calculateBlurRadius(calculateBlurStdDev(radius)); - return QSize(blurRadius, blurRadius); -} - -struct BoxLobes -{ - int left; ///< how many pixels sample to the left - int right; ///< how many pixels sample to the right -}; - -/** - * Compute box filter parameters. - * - * @param radius The blur radius. - * @returns Parameters for three box filters. - **/ -static QVector<BoxLobes> computeLobes(int radius) -{ - const int blurRadius = calculateBlurRadius(calculateBlurStdDev(radius)); - const int z = blurRadius / 3; - - int major; - int minor; - int final; - - switch (blurRadius % 3) { - case 0: - major = z; - minor = z; - final = z; - break; - - case 1: - major = z + 1; - minor = z; - final = z; - break; - - case 2: - major = z + 1; - minor = z; - final = z + 1; - break; - - default: -#if !BREEZE_COMMON_USE_KDE4 - Q_UNREACHABLE(); -#endif - break; - } - - Q_ASSERT(major + minor + final == blurRadius); - - return { - {major, minor}, - {minor, major}, - {final, final} - }; -} - -/** - * Process a row with a box filter. - * - * @param src The start of the row. - * @param dst The destination. - * @param width The width of the row, in pixels. - * @param horizontalStride The number of bytes from one alpha value to the - * next alpha value. - * @param verticalStride The number of bytes from one row to the next row. - * @param lobes Params of the box filter. - * @param transposeInput Whether the input is transposed. - * @param transposeOutput Whether the output should be transposed. - **/ -static inline void boxBlurRowAlpha(const uint8_t *src, uint8_t *dst, int width, int horizontalStride, - int verticalStride, const BoxLobes &lobes, bool transposeInput, - bool transposeOutput) -{ - const int inputStep = transposeInput ? verticalStride : horizontalStride; - const int outputStep = transposeOutput ? verticalStride : horizontalStride; - - const int boxSize = lobes.left + 1 + lobes.right; - const int reciprocal = (1 << 24) / boxSize; - - uint32_t alphaSum = (boxSize + 1) / 2; - - const uint8_t *left = src; - const uint8_t *right = src; - uint8_t *out = dst; - - const uint8_t firstValue = src[0]; - const uint8_t lastValue = src[(width - 1) * inputStep]; - - alphaSum += firstValue * lobes.left; - - const uint8_t *initEnd = src + (boxSize - lobes.left) * inputStep; - while (right < initEnd) { - alphaSum += *right; - right += inputStep; - } - - const uint8_t *leftEnd = src + boxSize * inputStep; - while (right < leftEnd) { - *out = (alphaSum * reciprocal) >> 24; - alphaSum += *right - firstValue; - right += inputStep; - out += outputStep; - } - - const uint8_t *centerEnd = src + width * inputStep; - while (right < centerEnd) { - *out = (alphaSum * reciprocal) >> 24; - alphaSum += *right - *left; - left += inputStep; - right += inputStep; - out += outputStep; - } - - const uint8_t *rightEnd = dst + width * outputStep; - while (out < rightEnd) { - *out = (alphaSum * reciprocal) >> 24; - alphaSum += lastValue - *left; - left += inputStep; - out += outputStep; - } -} - -/** - * Blur the alpha channel of a given image. - * - * @param image The input image. - * @param radius The blur radius. - * @param rect Specifies what part of the image to blur. If nothing is provided, then - * the whole alpha channel of the input image will be blurred. - **/ -static inline void boxBlurAlpha(QImage &image, int radius, const QRect &rect = {}) -{ - if (radius < 2) { - return; - } - - const QVector<BoxLobes> lobes = computeLobes(radius); - - const QRect blurRect = rect.isNull() ? image.rect() : rect; - - const int alphaOffset = QSysInfo::ByteOrder == QSysInfo::BigEndian ? 0 : 3; - const int width = blurRect.width(); - const int height = blurRect.height(); - const int rowStride = image.bytesPerLine(); - const int pixelStride = image.depth() >> 3; - - const int bufferStride = qMax(width, height) * pixelStride; - QScopedPointer<uint8_t, QScopedPointerArrayDeleter<uint8_t> > buf(new uint8_t[2 * bufferStride]); - uint8_t *buf1 = buf.data(); - uint8_t *buf2 = buf1 + bufferStride; - - // Blur the image in horizontal direction. - for (int i = 0; i < height; ++i) { - uint8_t *row = image.scanLine(blurRect.y() + i) + blurRect.x() * pixelStride + alphaOffset; - boxBlurRowAlpha(row, buf1, width, pixelStride, rowStride, lobes[0], false, false); - boxBlurRowAlpha(buf1, buf2, width, pixelStride, rowStride, lobes[1], false, false); - boxBlurRowAlpha(buf2, row, width, pixelStride, rowStride, lobes[2], false, false); - } - - // Blur the image in vertical direction. - for (int i = 0; i < width; ++i) { - uint8_t *column = image.scanLine(blurRect.y()) + (blurRect.x() + i) * pixelStride + alphaOffset; - boxBlurRowAlpha(column, buf1, height, pixelStride, rowStride, lobes[0], true, false); - boxBlurRowAlpha(buf1, buf2, height, pixelStride, rowStride, lobes[1], false, false); - boxBlurRowAlpha(buf2, column, height, pixelStride, rowStride, lobes[2], false, true); - } -} - -static inline void mirrorTopLeftQuadrant(QImage &image) -{ - const int width = image.width(); - const int height = image.height(); - - const int centerX = qCeil(width * 0.5); - const int centerY = qCeil(height * 0.5); - - const int alphaOffset = QSysInfo::ByteOrder == QSysInfo::BigEndian ? 0 : 3; - const int stride = image.depth() >> 3; - - for (int y = 0; y < centerY; ++y) { - uint8_t *in = image.scanLine(y) + alphaOffset; - uint8_t *out = in + (width - 1) * stride; - - for (int x = 0; x < centerX; ++x, in += stride, out -= stride) { - *out = *in; - } - } - - for (int y = 0; y < centerY; ++y) { - const uint8_t *in = image.scanLine(y) + alphaOffset; - uint8_t *out = image.scanLine(width - y - 1) + alphaOffset; - - for (int x = 0; x < width; ++x, in += stride, out += stride) { - *out = *in; - } - } -} - -static void renderShadow(QPainter *painter, const QRect &rect, qreal borderRadius, const QPoint &offset, int radius, const QColor &color) -{ - const QSize inflation = calculateBlurExtent(radius); - const QSize size = rect.size() + 2 * inflation; - -#if BREEZE_COMMON_USE_KDE4 - const qreal dpr = 1.0; -#else - const qreal dpr = painter->device()->devicePixelRatioF(); -#endif - - QImage shadow(size * dpr, QImage::Format_ARGB32_Premultiplied); -#if !BREEZE_COMMON_USE_KDE4 - shadow.setDevicePixelRatio(dpr); -#endif - shadow.fill(Qt::transparent); - - QRect boxRect(QPoint(0, 0), rect.size()); - boxRect.moveCenter(QRect(QPoint(0, 0), size).center()); - - const qreal xRadius = 2.0 * borderRadius / boxRect.width(); - const qreal yRadius = 2.0 * borderRadius / boxRect.height(); - - QPainter shadowPainter; - shadowPainter.begin(&shadow); - shadowPainter.setRenderHint(QPainter::Antialiasing); - shadowPainter.setPen(Qt::NoPen); - shadowPainter.setBrush(Qt::black); - shadowPainter.drawRoundedRect(boxRect, xRadius, yRadius); - shadowPainter.end(); - - // Because the shadow texture is symmetrical, that's enough to blur - // only the top-left quadrant and then mirror it. - const QRect blurRect(0, 0, qCeil(shadow.width() * 0.5), qCeil(shadow.height() * 0.5)); - const int scaledRadius = qRound(radius * dpr); - boxBlurAlpha(shadow, scaledRadius, blurRect); - mirrorTopLeftQuadrant(shadow); - - // Give the shadow a tint of the desired color. - shadowPainter.begin(&shadow); - shadowPainter.setCompositionMode(QPainter::CompositionMode_SourceIn); - shadowPainter.fillRect(shadow.rect(), color); - shadowPainter.end(); - - // Actually, present the shadow. - QRect shadowRect = shadow.rect(); - shadowRect.setSize(shadowRect.size() / dpr); - shadowRect.moveCenter(rect.center() + offset); - painter->drawImage(shadowRect, shadow); -} - -void BoxShadowRenderer::setBoxSize(const QSize &size) -{ - m_boxSize = size; -} - -void BoxShadowRenderer::setBorderRadius(qreal radius) -{ - m_borderRadius = radius; -} - -void BoxShadowRenderer::setDevicePixelRatio(qreal dpr) -{ - m_dpr = dpr; -} - -void BoxShadowRenderer::addShadow(const QPoint &offset, int radius, const QColor &color) -{ - Shadow shadow = {}; - shadow.offset = offset; - shadow.radius = radius; - shadow.color = color; - m_shadows.append(shadow); -} - -QImage BoxShadowRenderer::render() const -{ - if (m_shadows.isEmpty()) { - return {}; - } - - QSize canvasSize; -#if BREEZE_COMMON_USE_KDE4 - foreach (const Shadow &shadow, m_shadows) { -#else - for (const Shadow &shadow : qAsConst(m_shadows)) { -#endif - canvasSize = canvasSize.expandedTo( - calculateMinimumShadowTextureSize(m_boxSize, shadow.radius, shadow.offset)); - } - - QImage canvas(canvasSize * m_dpr, QImage::Format_ARGB32_Premultiplied); -#if !BREEZE_COMMON_USE_KDE4 - canvas.setDevicePixelRatio(m_dpr); -#endif - canvas.fill(Qt::transparent); - - QRect boxRect(QPoint(0, 0), m_boxSize); - boxRect.moveCenter(QRect(QPoint(0, 0), canvasSize).center()); - - QPainter painter(&canvas); -#if BREEZE_COMMON_USE_KDE4 - foreach (const Shadow &shadow, m_shadows) { -#else - for (const Shadow &shadow : qAsConst(m_shadows)) { -#endif - renderShadow(&painter, boxRect, m_borderRadius, shadow.offset, shadow.radius, shadow.color); - } - painter.end(); - - return canvas; -} - -QSize BoxShadowRenderer::calculateMinimumBoxSize(int radius) -{ - const QSize blurExtent = calculateBlurExtent(radius); - return 2 * blurExtent + QSize(1, 1); -} - -QSize BoxShadowRenderer::calculateMinimumShadowTextureSize(const QSize &boxSize, int radius, const QPoint &offset) -{ - return boxSize + 2 * calculateBlurExtent(radius) + QSize(qAbs(offset.x()), qAbs(offset.y())); -} - - -BreezeShadowHelper::BreezeShadowHelper( QObject* parent): - QObject( parent ) -{ - // delay till event dispatcher is running as Wayland is highly async -// QMetaObject::invokeMethod(this, "initializeWayland", Qt::QueuedConnection); -} - -//_______________________________________________________ -BreezeShadowHelper::~BreezeShadowHelper() -{ - - #if BREEZE_HAVE_X11 - if( Helper::isX11() ) - { foreach( const quint32& value, _pixmaps ) xcb_free_pixmap( Helper::connection(), value ); } - #endif - -} - -//_______________________________________________________ -bool BreezeShadowHelper::eventFilter( QObject* object, QEvent* event ) -{ - - // check event type - if( event->type() != QEvent::WinIdChange ) return false; - - // cast widget - QWidget* widget( static_cast<QWidget*>( object ) ); - - // install shadows and update winId - installShadows( widget ); - - return false; - -} - -//_______________________________________________________ -bool BreezeShadowHelper::installShadows(const QWidget* widget ) -{ - - qDebug() << "install shadows:" << (widget == nullptr); - if( !widget ) return false; - - /* - From bespin code. Supposedly prevent playing with some 'pseudo-widgets' - that have winId matching some other -random- window - */ -// if( !(widget->testAttribute(Qt::WA_WState_Created) && widget->internalWinId() )) -// { return false; } - - // create shadow tiles if needed - - - const qreal frameRadius = 0; - QColor color1(255,0,0); - QColor color2(0,255,0); - - const qreal dpr =1; - - const QSize boxSize = BoxShadowRenderer::calculateMinimumBoxSize(20) - .expandedTo(BoxShadowRenderer::calculateMinimumBoxSize(10)); -// color1.setAlphaF(0.22); -// color2.setAlphaF(0.12); - - BoxShadowRenderer shadowRenderer; - shadowRenderer.setBorderRadius(frameRadius); - shadowRenderer.setBoxSize(boxSize); - shadowRenderer.setDevicePixelRatio(dpr); - - shadowRenderer.addShadow(QPoint(0, 0), 20, color1); - shadowRenderer.addShadow(QPoint(0, -3), 10, color2); - - QImage shadowTexture = shadowRenderer.render(); - - const QRect outerRect(QPoint(0, 0), shadowTexture.size() / dpr); - - QRect boxRect(QPoint(0, 0), boxSize); - boxRect.moveCenter(outerRect.center()); - - // Mask out inner rect. - QPainter painter(&shadowTexture); - painter.setRenderHint(QPainter::Antialiasing); - - const QMargins margins = QMargins( - boxRect.left() - outerRect.left() - 2 - 0, - boxRect.top() - outerRect.top() - 2 - 5, - outerRect.right() - boxRect.right() - 2 + 0, - outerRect.bottom() - boxRect.bottom() - 2 + 5); - painter.setPen(Qt::NoPen); - painter.setBrush(Qt::black); -// painter.setCompositionMode(QPainter::CompositionMode_DestinationOut); - - painter.drawRoundedRect( - outerRect - margins, - frameRadius, - frameRadius); - - // We're done. - painter.end(); - - const QPoint innerRectTopLeft = outerRect.center(); - qDebug() << "innerRectTopLeft:" << innerRectTopLeft; - _shadowTiles = TileSet( - QPixmap::fromImage(shadowTexture), - innerRectTopLeft.x(), - innerRectTopLeft.y(), - 1, 1); - - - if( !_shadowTiles.isValid() ) return false; - - QVector<quint32> data( createPixmapHandles() ); - if( data.size() != 8 ) return false; - -// const QMargins margins(10,10,10,10); - const quint32 topSize = margins.top(); - const quint32 bottomSize = margins.bottom(); - const quint32 leftSize( margins.left() ); - const quint32 rightSize( margins.right() ); - - // assign to data and xcb property - data << QVector<quint32>{topSize, rightSize, bottomSize, leftSize}; - xcb_change_property( QX11Info::connection(), XCB_PROP_MODE_REPLACE, widget->winId(), _atom, XCB_ATOM_CARDINAL, 32, data.size(), data.constData() ); - xcb_flush( QX11Info::connection() ); - - - return false; -} - -const QVector<quint32>& BreezeShadowHelper::createPixmapHandles() -{ - - /** - shadow atom and property specification available at - https://community.kde.org/KWin/Shadow - */ - -// // create atom -// #if BREEZE_HAVE_X11 -// if( !_atom && Helper::isX11() ) _atom = _helper.createAtom( QLatin1String( netWMShadowAtomName ) ); -// #endif - - QString name = "_KDE_NET_WM_SHADOW"; - xcb_connection_t* connection( QX11Info::connection() ); - xcb_intern_atom_cookie_t cookie( xcb_intern_atom( connection, false, name.size(), qPrintable( name ) ) ); - ScopedPointer<xcb_intern_atom_reply_t> reply( xcb_intern_atom_reply( connection, cookie, nullptr) ); -//return reply ? reply->atom:0; - - _atom = reply ? reply->atom:0;//xcb_intern_atom_reply(QX11Info::connection(), xcb_intern_atom(QX11Info::connection(), 0, strlen("_NET_WM_SHADOW"), "_NET_WM_SHADOW"), NULL)->atom; - - // make sure size is valid - if( _pixmaps.empty() ) - { - _pixmaps = QVector<quint32> { - createPixmap( _shadowTiles.pixmap( 1 ) ), - createPixmap( _shadowTiles.pixmap( 2 ) ), - createPixmap( _shadowTiles.pixmap( 5 ) ), - createPixmap( _shadowTiles.pixmap( 8 ) ), - createPixmap( _shadowTiles.pixmap( 7 ) ), - createPixmap( _shadowTiles.pixmap( 6 ) ), - createPixmap( _shadowTiles.pixmap( 3 ) ), - createPixmap( _shadowTiles.pixmap( 0 ) ) - }; - } - - // return relevant list of pixmap handles - return _pixmaps; -} - -quint32 BreezeShadowHelper::createPixmap( const QPixmap& source ) -{ - - // do nothing for invalid pixmaps - if( source.isNull() ) return 0; -// if( !Helper::isX11() ) return 0; - - /* - in some cases, pixmap handle is invalid. This is the case notably - when Qt uses to RasterEngine. In this case, we create an X11 Pixmap - explicitly and draw the source pixmap on it. - */ - -// #if BREEZE_HAVE_X11 - - const int width( source.width() ); - const int height( source.height() ); - - // create X11 pixmap - xcb_pixmap_t pixmap = xcb_generate_id( QX11Info::connection() ); - xcb_create_pixmap( QX11Info::connection(), 32, pixmap, QX11Info::appRootWindow(), width, height ); - - xcb_gcontext_t _gc = xcb_generate_id( QX11Info::connection()); - xcb_create_gc( QX11Info::connection(), _gc, pixmap, 0, nullptr ); - - - // create image from QPixmap and assign to pixmap - QImage image( source.toImage() ); - - - #if QT_VERSION >= 0x051000 - xcb_put_image( QX11Info::connection(), XCB_IMAGE_FORMAT_Z_PIXMAP, pixmap, _gc, image.width(), image.height(), 0, 0, 0, 32, image.sizeInBytes(), image.constBits()); - #else - xcb_put_image( QX11Info::connection(), XCB_IMAGE_FORMAT_Z_PIXMAP, pixmap, _gc, image.width(), image.height(), 0, 0, 0, 32, image.byteCount(), image.constBits()); - #endif - - return pixmap; - -// #else -// return 0; -// #endif - -} - - -//___________________________________________________________ -inline bool bits(TileSet::Tiles flags, TileSet::Tiles testFlags) -{ return (flags & testFlags) == testFlags; } - -//______________________________________________________________________________________ -inline qreal devicePixelRatio( const QPixmap& pixmap ) -{ - #if QT_VERSION >= 0x050300 - return pixmap.devicePixelRatio(); - #else - Q_UNUSED( pixmap ); - return 1; - #endif -} - -//______________________________________________________________________________________ -inline void setDevicePixelRatio( QPixmap& pixmap, qreal value ) -{ - #if QT_VERSION >= 0x050300 - return pixmap.setDevicePixelRatio( value ); - #else - Q_UNUSED( pixmap ); - Q_UNUSED( value ); - #endif -} - -//______________________________________________________________ -void TileSet::initPixmap( PixmapList& pixmaps, const QPixmap &source, int width, int height, const QRect &rect) -{ - QSize size( width, height ); - if( !( size.isValid() && rect.isValid() ) ) - { - pixmaps.append( QPixmap() ); - - } else if( size != rect.size() ) { - - const qreal dpiRatio( devicePixelRatio( source ) ); - const QRect scaledRect( rect.topLeft()*dpiRatio, rect.size()*dpiRatio ); - const QSize scaledSize( size*dpiRatio ); - const QPixmap tile( source.copy(scaledRect) ); - QPixmap pixmap( scaledSize ); - - pixmap.fill(Qt::transparent); - QPainter painter(&pixmap); - painter.drawTiledPixmap(0, 0, scaledSize.width(), scaledSize.height(), tile); - setDevicePixelRatio( pixmap, dpiRatio ); - pixmaps.append( pixmap ); - - } else { - - const qreal dpiRatio( devicePixelRatio( source ) ); - const QRect scaledRect( rect.topLeft()*dpiRatio, rect.size()*dpiRatio ); - QPixmap pixmap( source.copy( scaledRect ) ); - setDevicePixelRatio( pixmap, dpiRatio ); - pixmaps.append( pixmap ); - - } - -} - -//______________________________________________________________ -TileSet::TileSet(): - _w1(0), - _h1(0), - _w3(0), - _h3(0) -{ _pixmaps.reserve(9); } - -//______________________________________________________________ -TileSet::TileSet(const QPixmap &source, int w1, int h1, int w2, int h2 ): - _w1(w1), - _h1(h1), - _w3(0), - _h3(0) -{ - _pixmaps.reserve(9); - if( source.isNull() ) return; - - _w3 = source.width()/devicePixelRatio( source ) - (w1 + w2); - _h3 = source.height()/devicePixelRatio( source ) - (h1 + h2); - int w = w2; - int h = h2; - - // initialise pixmap array - initPixmap( _pixmaps, source, _w1, _h1, QRect(0, 0, _w1, _h1) ); - initPixmap( _pixmaps, source, w, _h1, QRect(_w1, 0, w2, _h1) ); - initPixmap( _pixmaps, source, _w3, _h1, QRect(_w1+w2, 0, _w3, _h1) ); - initPixmap( _pixmaps, source, _w1, h, QRect(0, _h1, _w1, h2) ); - initPixmap( _pixmaps, source, w, h, QRect(_w1, _h1, w2, h2) ); - initPixmap( _pixmaps, source, _w3, h, QRect(_w1+w2, _h1, _w3, h2) ); - initPixmap( _pixmaps, source, _w1, _h3, QRect(0, _h1+h2, _w1, _h3) ); - initPixmap( _pixmaps, source, w, _h3, QRect(_w1, _h1+h2, w2, _h3) ); - initPixmap( _pixmaps, source, _w3, _h3, QRect(_w1+w2, _h1+h2, _w3, _h3) ); -} - -//___________________________________________________________ -void TileSet::render(const QRect &constRect, QPainter *painter, Tiles tiles) const -{ - - const bool oldHint( painter->testRenderHint( QPainter::SmoothPixmapTransform ) ); - painter->setRenderHint( QPainter::SmoothPixmapTransform, true ); - - // check initialization - if( _pixmaps.size() < 9 ) return; - - // copy source rect - QRect rect( constRect ); - - // get rect dimensions - int x0, y0, w, h; - rect.getRect(&x0, &y0, &w, &h); - - // calculate pixmaps widths - int wLeft(0); - int wRight(0); - if( _w1+_w3 > 0 ) - { - qreal wRatio( qreal( _w1 )/qreal( _w1 + _w3 ) ); - wLeft = (tiles&Right) ? qMin( _w1, int(w*wRatio) ):_w1; - wRight = (tiles&Left) ? qMin( _w3, int(w*(1.0-wRatio)) ):_w3; - } - - // calculate pixmap heights - int hTop(0); - int hBottom(0); - if( _h1+_h3 > 0 ) - { - qreal hRatio( qreal( _h1 )/qreal( _h1 + _h3 ) ); - hTop = (tiles&Bottom) ? qMin( _h1, int(h*hRatio) ):_h1; - hBottom = (tiles&Top) ? qMin( _h3, int(h*(1.0-hRatio)) ):_h3; - } - - // calculate corner locations - w -= wLeft + wRight; - h -= hTop + hBottom; - const int x1 = x0 + wLeft; - const int x2 = x1 + w; - const int y1 = y0 + hTop; - const int y2 = y1 + h; - - const int w2 = _pixmaps.at(7).width()/devicePixelRatio( _pixmaps.at(7) ); - const int h2 = _pixmaps.at(5).height()/devicePixelRatio( _pixmaps.at(5) ); - - // corner - if( bits( tiles, TileSet::Tile(Top|Left)) ) painter->drawPixmap(x0, y0, _pixmaps.at(0), 0, 0, wLeft*devicePixelRatio( _pixmaps.at(0) ), hTop*devicePixelRatio( _pixmaps.at(0) )); - if( bits( tiles, TileSet::Tile(Top|Right)) ) painter->drawPixmap(x2, y0, _pixmaps.at(2), (_w3-wRight)*devicePixelRatio( _pixmaps.at(2) ), 0, wRight*devicePixelRatio( _pixmaps.at(2) ), hTop*devicePixelRatio( _pixmaps.at(2) ) ); - if( bits( tiles, TileSet::Tile(Bottom|Left)) ) painter->drawPixmap(x0, y2, _pixmaps.at(6), 0, (_h3-hBottom)*devicePixelRatio( _pixmaps.at(6) ), wLeft*devicePixelRatio( _pixmaps.at(6) ), hBottom*devicePixelRatio( _pixmaps.at(6) )); - if( bits( tiles, TileSet::Tile(Bottom|Right)) ) painter->drawPixmap(x2, y2, _pixmaps.at(8), (_w3-wRight)*devicePixelRatio( _pixmaps.at(8) ), (_h3-hBottom)*devicePixelRatio( _pixmaps.at(8) ), wRight*devicePixelRatio( _pixmaps.at(8) ), hBottom*devicePixelRatio( _pixmaps.at(8) ) ); - - // top and bottom - if( w > 0 ) - { - if( tiles&Top ) painter->drawPixmap(x1, y0, w, hTop, _pixmaps.at(1), 0, 0, w2*devicePixelRatio( _pixmaps.at(1) ), hTop*devicePixelRatio( _pixmaps.at(1) ) ); - if( tiles&Bottom ) painter->drawPixmap(x1, y2, w, hBottom, _pixmaps.at(7), 0, (_h3-hBottom)*devicePixelRatio( _pixmaps.at(7) ), w2*devicePixelRatio( _pixmaps.at(7) ), hBottom*devicePixelRatio( _pixmaps.at(7) ) ); - } - - // left and right - if( h > 0 ) - { - if( tiles&Left ) painter->drawPixmap(x0, y1, wLeft, h, _pixmaps.at(3), 0, 0, wLeft*devicePixelRatio( _pixmaps.at(3) ), h2*devicePixelRatio( _pixmaps.at(3) ) ); - if( tiles&Right ) painter->drawPixmap(x2, y1, wRight, h, _pixmaps.at(5), (_w3-wRight)*devicePixelRatio( _pixmaps.at(5) ), 0, wRight*devicePixelRatio( _pixmaps.at(5) ), h2*devicePixelRatio( _pixmaps.at(5) ) ); - } - - // center - if( (tiles&Center) && h > 0 && w > 0 ) painter->drawPixmap(x1, y1, w, h, _pixmaps.at(4)); - - // restore - painter->setRenderHint( QPainter::SmoothPixmapTransform, oldHint ); - -} - diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/breezeboxshadowrenderer.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,268 +0,0 @@ -/* - * Copyright (C) 2018 Vlad Zagorodniy <vlad.zahorodnii@kde.org> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#pragma once - -// own -// Qt -#include <QEvent> -/* -#include <QMainWindow> - -#include <QWidget> - - - - -#include <QMenu> -#include <QPushButton> -#include <QIcon> -#include <QListWidget> -#include <QTabWidget> -#include <QToolTip> -#include <QAction> -#include <QTreeView> -#include <QLabel> -#include <QPalette> -#include <QColor> -#include <QDebug> -#include <QPainter> -#include <QPixmap> -#include <QStyle> -#include <QLineEdit> - -#include <QToolBar> -#include <QToolButton> -#include <QCheckBox> -#include <QLabel> -#include <QThread> -#include <QScrollBar> -#include <QVBoxLayout> - -#include <QContextMenuEvent> -#include <QMenu> -*/ -//#include <KWindowEffects> -#include <xcb/xproto.h> -#include <qdebug.h> - -#include <QVector4D> - -//#include <QTimer> - - -#include <xcb/xcb.h> - -//#include <QApplication> -#include <QWidget> -#include <QPainter> - -#include <QColor> -#include <QImage> -#include <QPoint> -#include <QSize> -#include <QScopedPointer> -#include <QWeakPointer> - -template <typename T> using ScopedPointer = QScopedPointer<T, QScopedPointerPodDeleter>; - -class BoxShadowRenderer -{ -public: - // Compiler generated constructors & destructor are fine. - - /** - * Set the size of the box. - * @param size The size of the box. - **/ - void setBoxSize(const QSize &size); - - /** - * Set the radius of box' corners. - * @param radius The border radius, in pixels. - **/ - void setBorderRadius(qreal radius); - - /** - * Set the device pixel ratio of the resulting shadow texture. - * @param dpr The device pixel ratio. - **/ - void setDevicePixelRatio(qreal dpr); - - /** - * Add a shadow. - * @param offset The offset of the shadow. - * @param radius The blur radius. - * @param color The color of the shadow. - **/ - void addShadow(const QPoint &offset, int radius, const QColor &color); - - /** - * Render the shadow. - **/ - QImage render() const; - - /** - * Calculate the minimum size of the box. - * - * This helper computes the minimum size of the box so the shadow behind it has - * full its strength. - * - * @param radius The blur radius of the shadow. - **/ - static QSize calculateMinimumBoxSize(int radius); - - /** - * Calculate the minimum size of the shadow texture. - * - * This helper computes the minimum size of the resulting texture so the shadow - * is not clipped. - * - * @param boxSize The size of the box. - * @param radius The blur radius. - * @param offset The offset of the shadow. - **/ - static QSize calculateMinimumShadowTextureSize(const QSize &boxSize, int radius, const QPoint &offset); - -private: - QSize m_boxSize; - qreal m_borderRadius = 0.0; - qreal m_dpr = 1.0; - - struct Shadow { - QPoint offset; - int radius; - QColor color; - }; - - QVector<Shadow> m_shadows; -}; - -class TileSet -{ - public: - /** - Create a TileSet from a pixmap. The size of the bottom/right chunks is - whatever is left over from the other chunks, whose size is specified - in the required parameters. - - @param w1 width of the left chunks - @param h1 height of the top chunks - @param w2 width of the not-left-or-right chunks - @param h2 height of the not-top-or-bottom chunks - */ - TileSet(const QPixmap&, int w1, int h1, int w2, int h2 ); - - //* empty constructor - TileSet(); - - //* destructor - virtual ~TileSet() - {} - - /** - Flags specifying what sides to draw in ::render. Corners are drawn when - the sides forming that corner are drawn, e.g. Top|Left draws the - top-center, center-left, and top-left chunks. The center-center chunk is - only drawn when Center is requested. - */ - enum Tile { - Top = 0x1, - Left = 0x2, - Bottom = 0x4, - Right = 0x8, - Center = 0x10, - TopLeft = Top|Left, - TopRight = Top|Right, - BottomLeft = Bottom|Left, - BottomRight = Bottom|Right, - Ring = Top|Left|Bottom|Right, - Horizontal = Left|Right|Center, - Vertical = Top|Bottom|Center, - Full = Ring|Center - }; - Q_DECLARE_FLAGS(Tiles, Tile) - - /** - Fills the specified rect with tiled chunks. Corners are never tiled, - edges are tiled in one direction, and the center chunk is tiled in both - directions. Partial tiles are used as needed so that the entire rect is - perfectly filled. Filling is performed as if all chunks are being drawn. - */ - void render(const QRect&, QPainter*, Tiles = Ring) const; - - //* return size associated to this tileset - QSize size() const - { return QSize( _w1 + _w3, _h1 + _h3 ); } - - //* is valid - bool isValid() const - { return _pixmaps.size() == 9; } - - //* returns pixmap for given index - QPixmap pixmap( int index ) const - { return _pixmaps[index]; } - - protected: - - //* shortcut to pixmap list - using PixmapList = QVector<QPixmap>; - - //* initialize pixmap - void initPixmap( PixmapList&, const QPixmap&, int w, int h, const QRect& ); - - private: - - //* pixmap arry - PixmapList _pixmaps; - - // dimensions - int _w1; - int _h1; - int _w3; - int _h3; - -}; - - -class BreezeShadowHelper: public QObject -{ - Q_OBJECT - - public: - //* constructor - BreezeShadowHelper( QObject*/*, Helper& */); - - //* destructor - ~BreezeShadowHelper() override; - - //* event filter - bool eventFilter( QObject*, QEvent* ) override; - - const QVector<quint32>& createPixmapHandles(); - quint32 createPixmap( const QPixmap& source ); - - bool installShadows( const QWidget * ); - -private: - QVector<quint32> _pixmaps; - TileSet _shadowTiles; - xcb_atom_t _atom = 0; - - -}; diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/kabstract-style-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/kabstract-style-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/kabstract-style-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/kabstract-style-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,3953 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Lei Chen <leichen@kylinos.cn> - * - */ - - -#include <QPushButton> -#include <QToolButton> -#include <QApplication> -#include <QPainter> -#include <KWindowEffects> -#include <QPainterPath> -#include <QDebug> -#include <QObject> -#include <QGSettings> -#include <QDBusMessage> -#include <QDBusArgument> -#include <QDBusConnection> - -#include "ukui-style-settings.h" -#include "kabstract-style-parameters.h" -#include "black-list.h" - -extern QColor mixColor(const QColor &c1, const QColor &c2, qreal bias); -extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); - -KAbstractStyleParameters::KAbstractStyleParameters(QObject *parent, bool isDark) -{ - QDBusMessage message = QDBusMessage::createMethodCall("com.kylin.statusmanager.interface", - "/", - "com.kylin.statusmanager.interface", - "get_current_tabletmode"); - QDBusMessage ret = QDBusConnection::sessionBus().call(message); - if (ret.type() != QDBusMessage::ReplyMessage) - { - //从返回参数获取返回值 - qDebug() << "complex type failed!"; - } - else - { - m_isTableMode = ret.arguments()[0].value<bool>(); - } - - updateParameters(m_isTableMode); - auto settings = UKUIStyleSettings::globalInstance(); - auto styleName = settings->get("styleName").toString(); - -} - -QPalette KAbstractStyleParameters::setPalette(QPalette &palette) -{ - palette.setColor(QPalette::Active, QPalette::WindowText, defaultPalette.color(QPalette::Active, QPalette::WindowText)); - palette.setColor(QPalette::Inactive, QPalette::WindowText, defaultPalette.color(QPalette::Inactive, QPalette::WindowText)); - palette.setColor(QPalette::Disabled, QPalette::WindowText, defaultPalette.color(QPalette::Disabled, QPalette::WindowText)); - - palette.setColor(QPalette::Active, QPalette::Button, defaultPalette.color(QPalette::Active, QPalette::Button)); - palette.setColor(QPalette::Inactive, QPalette::Button, defaultPalette.color(QPalette::Inactive, QPalette::Button)); - palette.setColor(QPalette::Disabled, QPalette::Button, defaultPalette.color(QPalette::Disabled, QPalette::Button)); - - palette.setColor(QPalette::Active, QPalette::Light, defaultPalette.color(QPalette::Active, QPalette::Light)); - palette.setColor(QPalette::Inactive, QPalette::Light, defaultPalette.color(QPalette::Inactive, QPalette::Light)); - palette.setColor(QPalette::Disabled, QPalette::Light, defaultPalette.color(QPalette::Disabled, QPalette::Light)); - - palette.setColor(QPalette::Active, QPalette::Midlight, defaultPalette.color(QPalette::Active, QPalette::Midlight)); - palette.setColor(QPalette::Inactive, QPalette::Midlight, defaultPalette.color(QPalette::Inactive, QPalette::Midlight)); - palette.setColor(QPalette::Disabled, QPalette::Midlight, defaultPalette.color(QPalette::Disabled, QPalette::Midlight)); - - palette.setColor(QPalette::Active, QPalette::Dark, defaultPalette.color(QPalette::Active, QPalette::Dark)); - palette.setColor(QPalette::Inactive, QPalette::Dark, defaultPalette.color(QPalette::Inactive, QPalette::Dark)); - palette.setColor(QPalette::Disabled, QPalette::Dark, defaultPalette.color(QPalette::Disabled, QPalette::Dark)); - - palette.setColor(QPalette::Active, QPalette::Mid, defaultPalette.color(QPalette::Active, QPalette::Mid)); - palette.setColor(QPalette::Inactive, QPalette::Mid, defaultPalette.color(QPalette::Inactive, QPalette::Mid)); - palette.setColor(QPalette::Disabled, QPalette::Mid, defaultPalette.color(QPalette::Disabled, QPalette::Mid)); - - palette.setColor(QPalette::Active, QPalette::Text, defaultPalette.color(QPalette::Active, QPalette::Text)); - palette.setColor(QPalette::Inactive, QPalette::Text, defaultPalette.color(QPalette::Inactive, QPalette::Text)); - palette.setColor(QPalette::Disabled, QPalette::Text, defaultPalette.color(QPalette::Disabled, QPalette::Text)); - - palette.setColor(QPalette::Active, QPalette::BrightText, defaultPalette.color(QPalette::Active, QPalette::BrightText)); - palette.setColor(QPalette::Inactive, QPalette::BrightText, defaultPalette.color(QPalette::Inactive, QPalette::BrightText)); - palette.setColor(QPalette::Disabled, QPalette::BrightText, defaultPalette.color(QPalette::Disabled, QPalette::BrightText)); - - palette.setColor(QPalette::Active, QPalette::ButtonText, defaultPalette.color(QPalette::Active, QPalette::ButtonText)); - palette.setColor(QPalette::Inactive, QPalette::ButtonText, defaultPalette.color(QPalette::Inactive, QPalette::ButtonText)); - palette.setColor(QPalette::Disabled, QPalette::ButtonText, defaultPalette.color(QPalette::Disabled, QPalette::ButtonText)); - - palette.setColor(QPalette::Active, QPalette::Base, defaultPalette.color(QPalette::Active, QPalette::Base)); - palette.setColor(QPalette::Inactive, QPalette::Base, defaultPalette.color(QPalette::Inactive, QPalette::Base)); - palette.setColor(QPalette::Disabled, QPalette::Base, defaultPalette.color(QPalette::Disabled, QPalette::Base)); - - palette.setColor(QPalette::Active, QPalette::Window, defaultPalette.color(QPalette::Active, QPalette::Window)); - palette.setColor(QPalette::Inactive, QPalette::Window, defaultPalette.color(QPalette::Inactive, QPalette::Window)); - palette.setColor(QPalette::Disabled, QPalette::Window, defaultPalette.color(QPalette::Disabled, QPalette::Window)); - - palette.setColor(QPalette::Active, QPalette::Shadow, defaultPalette.color(QPalette::Active, QPalette::Shadow)); - palette.setColor(QPalette::Inactive, QPalette::Shadow, defaultPalette.color(QPalette::Inactive, QPalette::Shadow)); - palette.setColor(QPalette::Disabled, QPalette::Shadow, defaultPalette.color(QPalette::Disabled, QPalette::Shadow)); - - palette.setColor(QPalette::Active, QPalette::Highlight, defaultPalette.color(QPalette::Active, QPalette::Highlight)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, defaultPalette.color(QPalette::Inactive, QPalette::Highlight)); - palette.setColor(QPalette::Disabled, QPalette::Highlight, defaultPalette.color(QPalette::Disabled, QPalette::Highlight)); - - palette.setColor(QPalette::Active, QPalette::HighlightedText, defaultPalette.color(QPalette::Active, QPalette::HighlightedText)); - palette.setColor(QPalette::Inactive, QPalette::HighlightedText, defaultPalette.color(QPalette::Inactive, QPalette::HighlightedText)); - palette.setColor(QPalette::Disabled, QPalette::HighlightedText, defaultPalette.color(QPalette::Disabled, QPalette::HighlightedText)); - - palette.setColor(QPalette::Active, QPalette::Link, defaultPalette.color(QPalette::Active, QPalette::Link)); - palette.setColor(QPalette::Inactive, QPalette::Link, defaultPalette.color(QPalette::Inactive, QPalette::Link)); - palette.setColor(QPalette::Disabled, QPalette::Link, defaultPalette.color(QPalette::Disabled, QPalette::Link)); - - palette.setColor(QPalette::Active, QPalette::LinkVisited, defaultPalette.color(QPalette::Active, QPalette::LinkVisited)); - palette.setColor(QPalette::Inactive, QPalette::LinkVisited, defaultPalette.color(QPalette::Inactive, QPalette::LinkVisited)); - palette.setColor(QPalette::Disabled, QPalette::LinkVisited, defaultPalette.color(QPalette::Disabled, QPalette::LinkVisited)); - - palette.setColor(QPalette::Active, QPalette::AlternateBase, defaultPalette.color(QPalette::Active, QPalette::AlternateBase)); - palette.setColor(QPalette::Inactive, QPalette::AlternateBase, defaultPalette.color(QPalette::Inactive, QPalette::AlternateBase)); - palette.setColor(QPalette::Disabled, QPalette::AlternateBase, defaultPalette.color(QPalette::Disabled, QPalette::AlternateBase)); - - palette.setColor(QPalette::Active, QPalette::NoRole, defaultPalette.color(QPalette::Active, QPalette::NoRole)); - palette.setColor(QPalette::Inactive, QPalette::NoRole, defaultPalette.color(QPalette::Inactive, QPalette::NoRole)); - palette.setColor(QPalette::Disabled, QPalette::NoRole, defaultPalette.color(QPalette::Disabled, QPalette::NoRole)); - - palette.setColor(QPalette::Active, QPalette::ToolTipBase, defaultPalette.color(QPalette::Active, QPalette::ToolTipBase)); - palette.setColor(QPalette::Inactive, QPalette::ToolTipBase, defaultPalette.color(QPalette::Inactive, QPalette::ToolTipBase)); - palette.setColor(QPalette::Disabled, QPalette::ToolTipBase, defaultPalette.color(QPalette::Disabled, QPalette::ToolTipBase)); - - palette.setColor(QPalette::Active, QPalette::ToolTipText, defaultPalette.color(QPalette::Active, QPalette::ToolTipText)); - palette.setColor(QPalette::Inactive, QPalette::ToolTipText, defaultPalette.color(QPalette::Inactive, QPalette::ToolTipText)); - palette.setColor(QPalette::Disabled, QPalette::ToolTipText, defaultPalette.color(QPalette::Disabled, QPalette::ToolTipText)); - -#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) - palette.setColor(QPalette::Active, QPalette::PlaceholderText, defaultPalette.color(QPalette::Active, QPalette::PlaceholderText)); - palette.setColor(QPalette::Inactive, QPalette::PlaceholderText, defaultPalette.color(QPalette::Inactive, QPalette::PlaceholderText)); - palette.setColor(QPalette::Disabled, QPalette::PlaceholderText, defaultPalette.color(QPalette::Disabled, QPalette::PlaceholderText)); -#endif - - return palette; -} - -int KAbstractStyleParameters::getSpinBoxControlLayout() -{ - return m_spinBoxControlLayout; -} - -void KAbstractStyleParameters::updateParameters(bool isTabletMode) -{ - if(isTabletMode){//styleName == "ukui-dark"){// - m_scaleRatio4_3 = (4 * 1.0) / 3.0; - m_scaleRatio3_2 = (3 * 1.0) / 2.0; - m_scaleRatio2_1 = (2 * 1.0) / 1.0; - m_scaleSliderDefaultLength = (241 * 1.0) / (94 * 1.0); - m_ScaleComboBoxDefaultLength = (49 * 1.0) / (40 * 1.0); - m_ScaleLineEditDefaultLength = (49 * 1.0) / (40 * 1.0); - m_scaleTabBarHeight6_5 = (6 *1.0) / (5 * 1.0); - - m_isTableMode = true; - m_spinBoxControlLayout = SpinBoxControlLayout::Horizontal; - m_headerDefaultSectionSizeVertical = m_headerDefaultSectionSizeVertical4_3; - } - else{ - m_scaleRatio4_3 = 1.0; - m_scaleRatio3_2 = 1.0; - m_scaleRatio2_1 = 1.0; - m_scaleSliderDefaultLength = 1.0; - m_ScaleComboBoxDefaultLength = 1.0; - m_ScaleLineEditDefaultLength = 1.0; - m_scaleTabBarHeight6_5 = 1.0; - - m_isTableMode = false; - m_spinBoxControlLayout = SpinBoxControlLayout::Vertical; - m_headerDefaultSectionSizeVertical = m_headerDefaultSectionSizeVertical1_1; - } - - ComboBox_DefaultMenuItemHeight = ComboBox_DefaultMenuItemHeight_original * m_scaleRatio4_3; - MenuItem_DefaultHeight = MenuItem_DefaultHeight_origin * m_scaleRatio4_3; - MenuItemSeparator_MarginHeight = MenuItemSeparator_MarginHeight_origin * m_scaleRatio4_3; - LineEdit_DefaultHeight = LineEdit_DefaultHeight_origin * m_scaleRatio4_3; - IconButton_DefaultWidth = IconButton_DefaultWidth_origin * m_scaleRatio4_3; - Button_DefaultHeight = Button_DefaultHeight_origin * m_scaleRatio4_3; - SpinBox_DefaultHeight = SpinBox_DefaultHeight_origin * m_scaleRatio4_3; - ComboBox_DefaultHeight = ComboBox_DefaultHeight_origin * m_scaleRatio4_3; - RadioButton_DefaultHeight = RadioButton_DefaultHeight_origin * m_scaleRatio4_3; - CheckBox_DefaultHeight = CheckBox_DefaultHeight_origin * m_scaleRatio4_3; - Table_HeaderHeight = Table_HeaderHeight_origin * m_scaleRatio4_3; - ScroolBar_Width = ScroolBar_Width_origin * m_scaleRatio3_2; - Slider_Length = Slider_Length_origin * m_scaleRatio2_1; - Slider_GrooveLength = Slider_GrooveLength_origin * m_scaleRatio2_1; - Slider_DefaultLength = Slider_DefaultLength_origin * m_scaleSliderDefaultLength; - LineEdit_DefaultWidth = LineEdit_DefaultWidth_origin * m_ScaleLineEditDefaultLength; - TabBar_DefaultHeight = TabBar_DefaultHeight_origin * m_scaleTabBarHeight6_5; - ViewItem_DefaultHeight = ViewItem_DefaultHeight_origin * m_scaleRatio4_3; - ToolTip_Height = ToolTip_Height_origin * m_scaleRatio4_3; - qDebug() << "updateParameters......... "; -} - -//Default widget theme -KDefaultStyleParameters::KDefaultStyleParameters(QObject *parent, bool isDark) : KAbstractStyleParameters(parent, isDark) -{ - radius = 6; - - ColoseButtonColor = QColor(204, 18, 34); - - - initPalette(isDark); -} - -void KDefaultStyleParameters::initPalette(bool isDark) -{ - //ukui-light palette UKUI3.1 - QColor windowText_at(38, 38, 38), - windowText_iat(0, 0, 0, 255 * 0.55), - windowText_dis(0, 0, 0, 255 * 0.3), - button_at(230, 230, 230), - button_iat(230, 230, 230), - button_dis(233, 233, 233), - light_at(255, 255, 255), - light_iat(255, 255, 255), - light_dis(242, 242, 242), - midlight_at(218, 218, 218), - midlight_iat(218, 218, 218), - midlight_dis(230, 230, 230), - dark_at(77, 77, 77), - dark_iat(77, 77, 77), - dark_dis(64, 64, 64), - mid_at(115, 115, 115), - mid_iat(115, 115, 115), - mid_dis(102, 102, 102), - text_at(38, 38, 38), - text_iat(38, 38, 38), - text_dis(0, 0, 0, 255 * 0.3), - brightText_at(0, 0, 0), - brightText_iat(0, 0, 0), - brightText_dis(0, 0, 0), - buttonText_at(38, 38, 38), - buttonText_iat(38, 38, 38), - buttonText_dis(0, 0, 0, 255 * 0.3), - base_at(255, 255, 255), - base_iat(245, 245, 245), - base_dis(237, 237, 237), - window_at(245, 245, 245), - window_iat(237, 237, 237), - window_dis(230, 230, 230), - shadow_at(0, 0, 0, 255 * 0.16), - shadow_iat(0, 0, 0, 255 * 0.16), - shadow_dis(0, 0, 0, 255 * 0.21), -// shadow_at(214, 214, 214), -// shadow_iat(214, 214, 214), -// shadow_dis(201, 201, 201), - highLight_at(55, 144, 250), - highLight_iat(55, 144, 250), - highLight_dis(233, 233, 233), - highLightText_at(255, 255, 255), - highLightText_iat(255, 255, 255), - highLightText_dis(179, 179, 179), - link_at(55, 144, 250), - link_iat(55, 144, 250), - link_dis(55, 144, 250), - linkVisited_at(114, 46, 209), - linkVisited_iat(114, 46, 209), - linkVisited_dis(114, 46, 209), - alternateBase_at(245, 245, 245), - alternateBase_iat(245, 245, 245), - alternateBase_dis(245, 245, 245), - noRale_at(240, 240, 240), - noRole_iat(240, 240, 240), - noRole_dis(217, 217, 217), - toolTipBase_at(255, 255, 255), - toolTipBase_iat(255, 255, 255), - toolTipBase_dis(255, 255, 255), - toolTipText_at(38, 38, 38), - toolTipText_iat(38, 38, 38), - toolTipText_dis(38, 38, 38), - placeholderText_at(0, 0, 0, 255 * 0.35), - placeholderText_iat(0, 0, 0, 255 * 0.35), - placeholderText_dis(0, 0, 0, 255 * 0.3); - - //ukui-dark - if (isDark) { - windowText_at.setRgb(217, 217, 217); - windowText_iat.setRgb(255, 255, 255, 255 * 0.55); - windowText_dis.setRgb(255, 255, 255, 255 * 0.3); - button_at.setRgb(55, 55, 59); - button_iat.setRgb(55, 55, 59); - button_dis.setRgb(46, 46, 46); - light_at.setRgb(255, 255, 255); - light_iat.setRgb(255, 255, 255); - light_dis.setRgb(242, 242, 242); - midlight_at.setRgb(95, 95, 98); - midlight_iat.setRgb(95, 95, 98); - midlight_dis.setRgb(79, 79, 82); - dark_at.setRgb(38, 38, 38); - dark_iat.setRgb(38, 38, 38); - dark_dis.setRgb(26, 26, 26); - mid_at.setRgb(115, 115, 115); - mid_iat.setRgb(115, 115, 115); - mid_dis.setRgb(102, 102, 102); - text_at.setRgb(217, 217, 217); - text_iat.setRgb(217, 217, 217); - text_dis.setRgb(255, 255, 255, 255 * 0.3); - brightText_at.setRgb(255, 255, 255); - brightText_iat.setRgb(255, 255, 255); - brightText_dis.setRgb(255, 255, 255); - buttonText_at.setRgb(217, 217, 217); - buttonText_iat.setRgb(217, 217, 217); - buttonText_dis.setRgb(255, 255, 255, 255 * 0.3); - base_at.setRgb(29, 29, 29); - base_iat.setRgb(28, 28, 28); - base_dis.setRgb(36, 36, 36); - window_at.setRgb(35, 36, 38); - window_iat.setRgb(26, 26, 26); - window_dis.setRgb(18, 18, 18); - shadow_at.setRgb(0, 0, 0, 255 * 0.16); - shadow_iat.setRgb(0, 0, 0, 255 * 0.16); - shadow_dis.setRgb(0, 0, 0, 255 * 0.21); -// shadow_at.setRgb(214, 214, 214); -// shadow_iat.setRgb(214, 214, 214); -// shadow_dis.setRgb(201, 201, 201); - highLight_at.setRgb(55, 144, 250); - highLight_iat.setRgb(55, 144, 250); - highLight_dis.setRgb(46, 46, 46); - highLightText_at.setRgb(255, 255, 255); - highLightText_iat.setRgb(255, 255, 255); - highLightText_dis.setRgb(77, 77, 77); - link_at.setRgb(55, 144, 250); - link_iat.setRgb(55, 144, 250); - link_dis.setRgb(55, 144, 250); - linkVisited_at.setRgb(114, 46, 209); - linkVisited_iat.setRgb(114, 46, 209); - linkVisited_dis.setRgb(114, 46, 209); - alternateBase_at.setRgb(38, 38, 38); - alternateBase_iat.setRgb(38, 38, 38); - alternateBase_dis.setRgb(38, 38, 38); - noRale_at.setRgb(51, 51, 51); - noRole_iat.setRgb(51, 51, 51); - noRole_dis.setRgb(60, 60, 60); - toolTipBase_at.setRgb(38, 38, 38); - toolTipBase_iat.setRgb(38, 38, 38); - toolTipBase_dis.setRgb(38, 38, 38); - toolTipText_at.setRgb(217, 217, 217); - toolTipText_iat.setRgb(217, 217, 217); - toolTipText_dis.setRgb(217, 217, 217); - placeholderText_at.setRgb(255, 255, 255, 255 * 0.35); - placeholderText_iat.setRgb(255, 255, 255, 255 * 0.35); - placeholderText_dis.setRgb(255, 255, 255, 255 * 0.3); - } - - defaultPalette.setColor(QPalette::Active, QPalette::WindowText, windowText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::WindowText, windowText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::WindowText, windowText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Button, button_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Button, button_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Button, button_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Light, light_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Light, light_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Light, light_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Midlight, midlight_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Midlight, midlight_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Midlight, midlight_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Dark, dark_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Dark, dark_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Dark, dark_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Mid, mid_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Mid, mid_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Mid, mid_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Text, text_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Text, text_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Text, text_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::BrightText, brightText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::BrightText, brightText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::BrightText, brightText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::ButtonText, buttonText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::ButtonText, buttonText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::ButtonText, buttonText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Base, base_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Base, base_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Base, base_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Window, window_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Window, window_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Window, window_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Shadow, shadow_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Shadow, shadow_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Shadow, shadow_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Highlight, highLight_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Highlight, highLight_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Highlight, highLight_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::HighlightedText, highLightText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::HighlightedText, highLightText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::HighlightedText, highLightText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Link, link_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Link, link_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Link, link_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::LinkVisited, linkVisited_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::LinkVisited, linkVisited_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::LinkVisited, linkVisited_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::AlternateBase, alternateBase_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::AlternateBase, alternateBase_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::AlternateBase, alternateBase_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::NoRole, noRale_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::NoRole, noRole_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::NoRole, noRole_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::ToolTipBase, toolTipBase_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipBase, toolTipBase_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipBase, toolTipBase_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::ToolTipText, toolTipText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipText, toolTipText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipText, toolTipText_dis); - -#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) - defaultPalette.setColor(QPalette::Active, QPalette::PlaceholderText, placeholderText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::PlaceholderText, placeholderText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::PlaceholderText, placeholderText_dis); -#endif -} - - -void KDefaultStyleParameters::initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - pushButtonParameters.radius = 6; - - QBrush defaultBrush; - QBrush clickBrush; - QBrush hoverBrush; - QBrush disableBrush; - - QBrush checkBrush; - QBrush checkHoverBrush; - QBrush checkClickBrush; - QBrush checkDisableBrush; - - QPen focusPen; - - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - if (isDark) { - hoverBrush = QBrush(mixColor(highlight, mix, 0.2)); - } else { - hoverBrush = QBrush(mixColor(highlight, mix, 0.05)); - } - if (isDark) { - clickBrush = QBrush(mixColor(highlight, mix, 0.05)); - } else { - clickBrush = QBrush(mixColor(highlight, mix, 0.2)); - } - - defaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - - checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); - checkHoverBrush = hoverBrush; - checkClickBrush = clickBrush; - checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); - - focusPen = QPen(QBrush(mixColor(highlight, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if (widget) { - bool isWindowButton = false; - bool isWindowColoseButton = false; - bool isImportant = false; - bool useButtonPalette = false; - bool needTranslucent = false; - - if (widget->property("isWindowButton").isValid()) { - if (widget->property("isWindowButton").toInt() == 0x01) { - isWindowButton = true; - } - if (widget->property("isWindowButton").toInt() == 0x02) { - isWindowColoseButton = true; - } - } - if (widget->property("isImportant").isValid()) { - isImportant = widget->property("isImportant").toBool(); - } - - if (widget->property("useButtonPalette").isValid()) { - useButtonPalette = widget->property("useButtonPalette").toBool(); - } - - if (widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - if (isWindowColoseButton) { - QColor ColoseButton = ColoseButtonColor; - - hoverBrush = QBrush(QColor(243, 34, 45)); - clickBrush = QBrush(ColoseButton); - - focusPen = QPen(QBrush(mixColor(ColoseButton, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - } else if (isWindowButton && useTransparentButtonList().contains(qAppName())) { - if (isDark) { - mix.setAlphaF(0.28); - hoverBrush = QBrush(mix); - mix.setAlphaF(0.15); - clickBrush = QBrush(mix); - } else { - mix.setAlphaF(0.15); - hoverBrush = QBrush(mix); - mix.setAlphaF(0.28); - clickBrush = QBrush(mix); - } - } else if (useButtonPalette || isWindowButton) { - if (needTranslucent) - { - QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); - hoverColor.setAlphaF(isDark ? 0.20 : 0.16); - hoverBrush.setColor(hoverColor); - - QColor clickColor = option->palette.color(QPalette::Active, QPalette::BrightText); - clickColor.setAlphaF(isDark ? 0.30 : 0.21); - clickBrush.setColor(clickColor); - } - else - { - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - - if (isDark) { - hoverBrush = QBrush(mixColor(button, mix, 0.2)); - clickBrush = QBrush(mixColor(button, mix, 0.05)); - } else { - hoverBrush = QBrush(mixColor(button, mix, 0.05)); - clickBrush = QBrush(mixColor(button, mix, 0.2)); - } - } - } - - if (needTranslucent) { - QColor defaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); - defaultColor.setAlphaF(0.1); - defaultBrush.setColor(defaultColor); - - QColor disableColor = option->palette.color(QPalette::Disabled, QPalette::BrightText); - disableColor.setAlphaF(0.1); - disableBrush.setColor(disableColor); - } - - if (isImportant) { - defaultBrush = highlight; - } - } - - pushButtonParameters.pushButtonDefaultBrush = defaultBrush; - pushButtonParameters.pushButtonClickBrush = clickBrush; - pushButtonParameters.pushButtonHoverBrush = hoverBrush; - pushButtonParameters.pushButtonDisableBrush = disableBrush; - pushButtonParameters.pushButtonCheckBrush = checkBrush; - pushButtonParameters.pushButtonCheckHoverBrush = checkHoverBrush; - pushButtonParameters.pushButtonCheckClickBrush = checkClickBrush; - pushButtonParameters.pushButtonCheckDisableBrush = checkDisableBrush; - pushButtonParameters.pushButtonFocusPen = focusPen; -} - -void KDefaultStyleParameters::initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - toolButtonParameters.radius = 6; - - QBrush defaultBrush; - QBrush clickBrush; - QBrush hoverBrush; - QBrush disableBrush; - - QBrush checkBrush; - QBrush checkHoverBrush; - QBrush checkClickBrush; - QBrush checkDisableBrush; - - QPen focusPen; - - - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - if (isDark) { - hoverBrush = QBrush(mixColor(highlight, mix, 0.2)); - clickBrush = QBrush(mixColor(highlight, mix, 0.05)); - } else { - hoverBrush = QBrush(mixColor(highlight, mix, 0.05)); - clickBrush = QBrush(mixColor(highlight, mix, 0.2)); - } - defaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - - checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); - checkHoverBrush = hoverBrush; - checkClickBrush = clickBrush; - checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); - - focusPen = QPen(QBrush(mixColor(highlight, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if (widget) { - bool isWindowButton = false; - bool isWindowColoseButton = false; - bool useButtonPalette = false; - bool needTranslucent = false; - - if (widget->property("isWindowButton").isValid()) { - if (widget->property("isWindowButton").toInt() == 0x01) { - isWindowButton = true; - } - if (widget->property("isWindowButton").toInt() == 0x02) { - isWindowColoseButton = true; - } - } - - if (widget->property("useButtonPalette").isValid()) { - useButtonPalette = widget->property("useButtonPalette").toBool(); - } - - if (widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - if (isWindowColoseButton) { - QColor ColoseButton = ColoseButtonColor; - - hoverBrush = QBrush(QColor(243, 34, 45)); - clickBrush = QBrush(ColoseButton); - - focusPen = QPen(QBrush(mixColor(ColoseButton, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - } else if (isWindowButton && useTransparentButtonList().contains(qAppName())) { - if (isDark) { - mix.setAlphaF(0.28); - hoverBrush = QBrush(mix); - mix.setAlphaF(0.15); - clickBrush = QBrush(mix); - } else { - mix.setAlphaF(0.15); - hoverBrush = QBrush(mix); - mix.setAlphaF(0.28); - clickBrush = QBrush(mix); - } - } else if (useButtonPalette || isWindowButton) { - if(needTranslucent) - { - QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); - hoverColor.setAlphaF(isDark ? 0.20 : 0.16); - hoverBrush.setColor(hoverColor); - - QColor clickColor = option->palette.color(QPalette::Active, QPalette::BrightText); - clickColor.setAlphaF(isDark ? 0.30 : 0.21); - clickBrush.setColor(clickColor); - } - else - { - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - - if (isDark) { - hoverBrush = QBrush(mixColor(button, mix, 0.2)); - clickBrush = QBrush(mixColor(button, mix, 0.05)); - } else { - hoverBrush = QBrush(mixColor(button, mix, 0.05)); - clickBrush = QBrush(mixColor(button, mix, 0.2)); - } - } - } - - if (needTranslucent) { - QColor defaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); - defaultColor.setAlphaF(0.1); - defaultBrush.setColor(defaultColor); - - QColor disableColor = option->palette.color(QPalette::Disabled, QPalette::BrightText); - disableColor.setAlphaF(0.1); - disableBrush.setColor(disableColor); - } - } - - toolButtonParameters.toolButtonDefaultBrush = defaultBrush; - toolButtonParameters.toolButtonClickBrush = clickBrush; - toolButtonParameters.toolButtonHoverBrush = hoverBrush; - toolButtonParameters.toolButtonDisableBrush = disableBrush; - toolButtonParameters.toolButtonCheckBrush = checkBrush; - toolButtonParameters.toolButtonCheckHoverBrush = checkHoverBrush; - toolButtonParameters.toolButtonCheckClickBrush = checkClickBrush; - toolButtonParameters.toolButtonCheckDisableBrush = checkDisableBrush; - toolButtonParameters.toolButtonFocusPen = focusPen; -} - -void KDefaultStyleParameters::initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - lineEditParameters.radius = 6; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush focusBrush; - QBrush disableBrush; - - QPen defaultPen; - QPen hoverPen; - QPen focusPen; - QPen disablePen; - - bool needTranslucent = false; - - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - //default state - defaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - defaultPen = QPen(Qt::NoPen); - defaultPen.setWidth(0); - - //hover state - hoverBrush = defaultBrush; - hoverPen = defaultPen; - - //focus state - focusBrush = option->palette.brush(QPalette::Active, QPalette::Base); - focusPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), - 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //disable state - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - disablePen = QPen(Qt::NoPen); - disablePen.setWidth(0); - - if(needTranslucent) - { - QColor defaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); - defaultColor.setAlphaF(isDark ? 0.08 : 0.04); - defaultBrush.setColor(defaultColor); - - QColor focusColor = option->palette.color(QPalette::Active, QPalette::Base); - focusColor.setAlphaF(isDark ? 0.45 : 0.65); - focusBrush.setColor(focusColor); - QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); - hoverColor.setAlphaF(isDark ? 0.20 : 0.10); - hoverBrush.setColor(hoverColor); - } - - lineEditParameters.lineEditDefaultBrush = defaultBrush; - lineEditParameters.lineEditHoverBrush = hoverBrush; - lineEditParameters.lineEditFocusBrush = focusBrush; - lineEditParameters.lineEditDisableBrush = disableBrush; - - lineEditParameters.lineEditDefaultPen = defaultPen; - lineEditParameters.lineEditHoverPen = hoverPen; - lineEditParameters.lineEditFocusPen = focusPen; - lineEditParameters.lineEditDisablePen = disablePen; -} - -void KDefaultStyleParameters::initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout) -{ - spinBoxParameters.radius = 6; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush focusBrush; - QBrush disableBrush; - - QPen defaultPen; - QPen hoverPen; - QPen focusPen; - QPen disablePen; - - QBrush upHoverBrush; - QBrush upFocusHoverBrush; - QBrush upClickBrush; - QBrush upDefaultBrush; - QBrush downHoverBrush; - QBrush downFocusHoverBrush; - QBrush downClickBrush; - QBrush downDefaultBrush; - - - //default state - if(!isHorizonLayout) - defaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - else - defaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - defaultPen = QPen(Qt::NoPen); - defaultPen.setWidth(0); - - //hover state - hoverBrush = defaultBrush; - hoverPen = defaultPen; - if(isHorizonLayout) - hoverPen.setWidth(2); - - //focus state - focusBrush = option->palette.brush(QPalette::Active, QPalette::Base); - focusPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), - 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //disable state - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - disablePen = QPen(Qt::NoPen); - defaultPen.setWidth(0); - - if(isHorizonLayout) - { - upDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - downDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - } - else - { - upDefaultBrush = QBrush(Qt::NoBrush); - downDefaultBrush = QBrush(Qt::NoBrush); - } - - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - //up hover - if (isDark) { - upHoverBrush = QBrush(mixColor(button, mix, 0.2)); - } else { - upHoverBrush = QBrush(mixColor(button, mix, 0.05)); - } - - //up focus hover - if (isDark) { - upFocusHoverBrush = QBrush(mixColor(highlight, mix, 0.2)); - } else { - upFocusHoverBrush = QBrush(mixColor(highlight, mix, 0.05)); - } - - //up click - if (isDark) { - if(isHorizonLayout) - upClickBrush = QBrush(mixColor(button, mix, 0.05)); - else - upClickBrush = QBrush(mixColor(highlight, mix, 0.05)); - } else { - if(isHorizonLayout) - upClickBrush = QBrush(mixColor(button, mix, 0.2)); - else - upClickBrush = QBrush(mixColor(highlight, mix, 0.2)); - } - - //down hover - if (isDark) { - downHoverBrush = QBrush(mixColor(button, mix, 0.2)); - } else { - downHoverBrush = QBrush(mixColor(button, mix, 0.05)); - } - - //down focus hover - if (isDark) { - downFocusHoverBrush = QBrush(mixColor(highlight, mix, 0.2)); - } else { - downFocusHoverBrush = QBrush(mixColor(highlight, mix, 0.05)); - } - - //down click - if (isDark) { - if(isHorizonLayout) - downClickBrush = QBrush(mixColor(button, mix, 0.05)); - else - downClickBrush = QBrush(mixColor(highlight, mix, 0.05)); - } else { - if(isHorizonLayout) - downClickBrush = QBrush(mixColor(button, mix, 0.2)); - else - downClickBrush = QBrush(mixColor(highlight, mix, 0.2)); - } - - - spinBoxParameters.spinBoxDefaultBrush = defaultBrush; - spinBoxParameters.spinBoxHoverBrush = hoverBrush; - spinBoxParameters.spinBoxFocusBrush = focusBrush; - spinBoxParameters.spinBoxDisableBrush = disableBrush; - - spinBoxParameters.spinBoxDefaultPen = defaultPen; - spinBoxParameters.spinBoxHoverPen = hoverPen; - spinBoxParameters.spinBoxFocusPen = focusPen; - spinBoxParameters.spinBoxDisablePen = disablePen; - - spinBoxParameters.spinBoxUpHoverBrush = upHoverBrush; - spinBoxParameters.spinBoxUpFocusHoverBrush = upFocusHoverBrush; - spinBoxParameters.spinBoxUpClickBrush = upClickBrush; - spinBoxParameters.spinBoxUpDefaultBrush = upDefaultBrush; - - spinBoxParameters.spinBoxDownHoverBrush = downHoverBrush; - spinBoxParameters.spinBoxDownFocusHoverBrush = downFocusHoverBrush; - spinBoxParameters.spinBoxDownClickBrush = downClickBrush; - spinBoxParameters.spinBoxDownDefaultBrush = downDefaultBrush; - -} - -void KDefaultStyleParameters::initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - comboBoxParameters.radius = 6; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush onBrush; - QBrush editBrush; - QBrush disableBrush; - - QPen defaultPen; - QPen hoverPen; - QPen onPen; - QPen editPen; - QPen disablePen; - - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - //default state - defaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - defaultPen = QPen(Qt::NoPen); - defaultPen.setWidth(0); - - //hover state - if (isDark) { - hoverBrush = QBrush(mixColor(button, mix, 0.2)); - } else { - hoverBrush = QBrush(mixColor(button, mix, 0.05)); - } - hoverPen = QPen(Qt::NoPen); - hoverPen.setWidth(0); - - //on state - if (isDark) { - onBrush = QBrush(mixColor(button, mix, 0.05)); - } else { - onBrush = QBrush(mixColor(button, mix, 0.2)); - } - onPen = QPen(Qt::NoPen); - onPen.setWidth(0); - - //focus and on state,edit mode - editBrush = option->palette.brush(QPalette::Active, QPalette::Base); - editPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), - 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //disable state - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - disablePen = QPen(Qt::NoPen); - disablePen.setWidth(0); - - comboBoxParameters.comboBoxDefaultBrush = defaultBrush; - comboBoxParameters.comboBoxHoverBrush = hoverBrush; - comboBoxParameters.comboBoxOnBrush = onBrush; - comboBoxParameters.comboBoxEditBrush = editBrush; - comboBoxParameters.comboBoxDisableBrush = disableBrush; - - comboBoxParameters.comboBoxDefaultPen = defaultPen; - comboBoxParameters.comboBoxHoverPen = hoverPen; - comboBoxParameters.comboBoxOnPen = onPen; - comboBoxParameters.comboBoxEditPen = editPen; - comboBoxParameters.comboBoxDisablePen = disablePen; -} - -void KDefaultStyleParameters::initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - listParameters.radius = 6; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush selectBrush; - QBrush disableBrush; - QPen textHoverPen = QPen(Qt::NoPen); - QPen textSelectPen = QPen(Qt::NoPen); - bool needTranslucent = false; - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - //default - defaultBrush = QBrush(Qt::transparent); - - //hover - hoverBrush = option->palette.brush(QPalette::Disabled, QPalette::Midlight); - - //select - selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); - - //disable - disableBrush = QBrush(Qt::transparent); - - const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option); - QPalette::ColorGroup cg = vi->state & QStyle::State_Enabled - ? QPalette::Normal : QPalette::Disabled; - if (cg == QPalette::Normal && !(vi->state & QStyle::State_Active)) - cg = QPalette::Inactive; - - if(needTranslucent) - { - QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); - hoverColor.setAlphaF(isDark ? 0.1 : 0.05); - hoverBrush.setColor(hoverColor); - - QColor selectColor = option->palette.color(QPalette::Active, QPalette::BrightText); - selectColor.setAlphaF(isDark ? 0.20 : 0.15); - selectBrush.setColor(selectColor); - - - textSelectPen = option->palette.color(cg, QPalette::Text); - textHoverPen = option->palette.color(cg, QPalette::BrightText); - } - else - { - textSelectPen = option->palette.color(cg, QPalette::HighlightedText); - textHoverPen = option->palette.color(cg, QPalette::Text); - } - - listParameters.listDefaultBrush = defaultBrush; - listParameters.listHoverBrush = hoverBrush; - listParameters.listSelectBrush = selectBrush; - listParameters.listDisableBrush = disableBrush; - listParameters.listTextHoverPen = textHoverPen; - listParameters.listTextSelectPen = textSelectPen; -} - -void KDefaultStyleParameters::initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - treeParameters.radius = 6; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush selectBrush; - QBrush disableBrush; - - QBrush branchDefaultBrush; - QBrush branchHoverBrush; - QBrush branchSelectBrush; - QBrush branchDisableBrush; - - - //default - defaultBrush = QBrush(Qt::transparent); - branchDefaultBrush = defaultBrush; - - //hover - hoverBrush = option->palette.brush(QPalette::Disabled, QPalette::Midlight); - branchHoverBrush = hoverBrush; - - //select - selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); - branchSelectBrush = selectBrush; - - //disable - disableBrush = QBrush(Qt::transparent); - branchDisableBrush = disableBrush; - - - treeParameters.treeDefaultBrush = defaultBrush; - treeParameters.treeHoverBrush = hoverBrush; - treeParameters.treeSelectBrush = selectBrush; - treeParameters.treeDisableBrush = disableBrush; - - treeParameters.treeBranchDefaultBrush = branchDefaultBrush; - treeParameters.treeBranchHoverBrush = branchHoverBrush; - treeParameters.treeBranchSelectBrush = branchSelectBrush; - treeParameters.treeBranchDisableBrush = branchDisableBrush; -} - -void KDefaultStyleParameters::initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - tableParameters.radius = 0; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush selectBrush; - QBrush disableBrush; - - - //default - defaultBrush = QBrush(Qt::transparent); - - //hover - hoverBrush = option->palette.brush(QPalette::Disabled, QPalette::Midlight); - - //select - selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); - - //disable - disableBrush = QBrush(Qt::transparent); - - - tableParameters.tableDefaultBrush = defaultBrush; - tableParameters.tableHoverBrush = hoverBrush; - tableParameters.tableSelectBrush = selectBrush; - tableParameters.tableDisableBrush = disableBrush; -} - -void KDefaultStyleParameters::initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - checkBoxParameters.radius = 4; - - QPen defaultPen; - QPen hoverPen; - QPen clickPen; - QPen disablePen; - QPen onDefaultPen; - QPen onHoverPen; - QPen onClickPen; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush clickBrush; - QBrush disableBrush; - QBrush onDefaultBrush; - QBrush onHoverBrush; - QBrush onClickBrush; - - bool needTranslucent = false; - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - //default - if (isDark) { - QColor col = option->palette.color(QPalette::Active, QPalette::BrightText); - col.setAlphaF(0.15); - defaultPen = QPen(col, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { - defaultPen = QPen(option->palette.brush(QPalette::Disabled, QPalette::ButtonText), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - defaultBrush = QBrush(option->palette.color(QPalette::Active, QPalette::Base).lighter(200)); - - //hover - hoverPen = defaultPen; - if (isDark) { - hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); - } else { - hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.05)); - } - - //click - clickPen = defaultPen; - if (isDark) { - clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.1)); - } else { - clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); - } - - - if(needTranslucent) - { - QColor defaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); - defaultColor.setAlphaF(isDark ? 0.04 : 0.05); - defaultBrush.setColor(defaultColor); - QColor defaultPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - defaultPenColor.setAlphaF(0.35); - defaultPen = QPen(QBrush(defaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - QColor hoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); - hoverColor.setAlphaF(isDark ? 0.10 : 0.10); - hoverBrush.setColor(hoverColor); - QColor hoverPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - hoverPenColor.setAlphaF(0.3); - hoverPen = QPen(QBrush(hoverPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - - QColor clickColor = option->palette.color(QPalette::Active, QPalette::BrightText); - clickColor.setAlphaF(isDark ? 0.20 : 0.16); - clickBrush.setColor(clickColor); - QColor clickPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - if(!isDark) - clickPenColor = option->palette.color(QPalette::Active, QPalette::Mid); - clickPenColor.setAlphaF(isDark ? 0.25 : 0.65); - clickPen = QPen(QBrush(clickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - } - - //disable - disablePen = defaultPen; - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - - //on default - onDefaultPen = QPen(Qt::NoPen); - onDefaultPen.setWidth(0); - onDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); - if(needTranslucent) - { - QColor onDefaultPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - onDefaultPenColor.setAlphaF(0.1); - onDefaultPen = QPen(QBrush(onDefaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - - //on hover - onHoverPen = QPen(Qt::NoPen); - onHoverPen.setWidth(0); - if (isDark) { - onHoverBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.2)); - } else { - onHoverBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.05)); - } - if(needTranslucent) - { - QColor onHoverPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - onHoverPenColor.setAlphaF(0.15); - onHoverPen = QPen(QBrush(onHoverPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - - //on click - onClickPen = QPen(Qt::NoPen); - onClickPen.setWidth(0); - if (isDark) { - onClickBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.05)); - } else { - onClickBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.2)); - } - if(needTranslucent) - { - QColor onClickPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - onClickPenColor.setAlphaF(0.1); - onClickPen = QPen(QBrush(onClickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - - checkBoxParameters.checkBoxDefaultPen = defaultPen; - checkBoxParameters.checkBoxHoverPen = hoverPen; - checkBoxParameters.checkBoxClickPen = clickPen; - checkBoxParameters.checkBoxDisablePen = disablePen; - checkBoxParameters.checkBoxOnDefaultPen = onDefaultPen; - checkBoxParameters.checkBoxOnHoverPen = onHoverPen; - checkBoxParameters.checkBoxOnClickPen = onClickPen; - - checkBoxParameters.checkBoxDefaultBrush = defaultBrush; - checkBoxParameters.checkBoxHoverBrush = hoverBrush; - checkBoxParameters.checkBoxClickBrush = clickBrush; - checkBoxParameters.checkBoxDisableBrush = disableBrush; - checkBoxParameters.checkBoxOnDefaultBrush = onDefaultBrush; - checkBoxParameters.checkBoxOnHoverBrush = onHoverBrush; - checkBoxParameters.checkBoxOnClickBrush = onClickBrush; -} - -void KDefaultStyleParameters::initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - radioButtonParameters.radius = 6; - - QPen defaultPen; - QPen hoverPen; - QPen clickPen; - QPen disablePen; - QPen onDefaultPen; - QPen onHoverPen; - QPen onClickPen; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush clickBrush; - QBrush disableBrush; - QBrush onDefaultBrush; - QBrush onHoverBrush; - QBrush onClickBrush; - - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - //default - if (isDark) { - QColor col = option->palette.color(QPalette::Active, QPalette::BrightText); - col.setAlphaF(0.15); - defaultPen = QPen(col, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { - defaultPen = QPen(option->palette.brush(QPalette::Disabled, QPalette::ButtonText), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - defaultBrush = QBrush(option->palette.color(QPalette::Active, QPalette::Base).lighter(200)); - - //hover - hoverPen = defaultPen; - if (isDark) { - hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); - } else { - hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.05)); - } - - //click - clickPen = defaultPen; - if (isDark) { - clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.1)); - } else { - clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); - } - - //disable - disablePen = defaultPen; - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - - //on default - onDefaultPen = QPen(Qt::NoPen); - onDefaultPen.setWidth(0); - onDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); - - //on hover - onHoverPen = QPen(Qt::NoPen); - onHoverPen.setWidth(0); - if (isDark) { - onHoverBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.2)); - } else { - onHoverBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.05)); - } - - //on click - onClickPen = QPen(Qt::NoPen); - onClickPen.setWidth(0); - if (isDark) { - onClickBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.05)); - } else { - onClickBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.2)); - } - - - //if set property - if (widget) { - if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { - defaultPen = widget->property("setDefaultPen").value<QPen>(); - } - if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { - hoverPen = widget->property("setHoverPen").value<QPen>(); - } - if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { - clickPen = widget->property("setClickPen").value<QPen>(); - } - if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { - disablePen = widget->property("setDisablePen").value<QPen>(); - } - if (widget->property("setOnDefaultPen").isValid() && widget->property("setOnDefaultPen").canConvert<QPen>()) { - onDefaultPen = widget->property("setOnDefaultPen").value<QPen>(); - } - if (widget->property("setOnHoverPen").isValid() && widget->property("setOnHoverPen").canConvert<QPen>()) { - onHoverPen = widget->property("setOnHoverPen").value<QPen>(); - } - if (widget->property("setOnClickPen").isValid() && widget->property("setOnClickPen").canConvert<QPen>()) { - onClickPen = widget->property("setOnClickPen").value<QPen>(); - } - if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { - defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); - } - if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { - hoverBrush = widget->property("setHoverBrush").value<QBrush>(); - } - if (widget->property("setClickBrush").isValid() && widget->property("setClickBrush").canConvert<QBrush>()) { - clickBrush = widget->property("setClickBrush").value<QBrush>(); - } - if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { - disableBrush = widget->property("setDisableBrush").value<QBrush>(); - } - if (widget->property("setOnDefaultBrush").isValid() && widget->property("setOnDefaultBrush").canConvert<QBrush>()) { - onDefaultBrush = widget->property("setOnDefaultBrush").value<QBrush>(); - } - if (widget->property("setOnHoverBrush").isValid() && widget->property("setOnHoverBrush").canConvert<QBrush>()) { - onHoverBrush = widget->property("setOnHoverBrush").value<QBrush>(); - } - if (widget->property("setOnClickBrush").isValid() && widget->property("setOnClickBrush").canConvert<QBrush>()) { - onClickBrush = widget->property("setOnClickBrush").value<QBrush>(); - } - } - - - radioButtonParameters.radioButtonDefaultPen = defaultPen; - radioButtonParameters.radioButtonHoverPen = hoverPen; - radioButtonParameters.radioButtonClickPen = clickPen; - radioButtonParameters.radioButtonDisablePen = disablePen; - radioButtonParameters.radioButtonOnDefaultPen = onDefaultPen; - radioButtonParameters.radioButtonOnHoverPen = onHoverPen; - radioButtonParameters.radioButtonOnClickPen = onClickPen; - - radioButtonParameters.radioButtonDefaultBrush = defaultBrush; - radioButtonParameters.radioButtonHoverBrush = hoverBrush; - radioButtonParameters.radioButtonClickBrush = clickBrush; - radioButtonParameters.radioButtonDisableBrush = disableBrush; - radioButtonParameters.radioButtonOnDefaultBrush = onDefaultBrush; - radioButtonParameters.radioButtonOnHoverBrush = onHoverBrush; - radioButtonParameters.radioButtonOnClickBrush = onClickBrush; -} - -void KDefaultStyleParameters::initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - QBrush handleDefaultBrush; - QBrush handleHoverBrush; - QBrush handleClickBrush; - QBrush handleDisableBrush; - - QBrush grooveValueDefaultBrush; - QBrush grooveValueHoverBrush; - QBrush grooveValueDisableBrush; - QBrush grooveUnvalueDefaultBrush; - QBrush grooveUnvalueHoverBrush; - QBrush grooveUnvalueDisableBrush; - - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - bool needTranslucent = false; - - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - //handle default - handleDefaultBrush = option->palette.color(QPalette::Active, QPalette::Highlight); - - //handle hover - if (isDark) { - handleHoverBrush = QBrush(mixColor(highlight, mix, 0.2)); - } else { - handleHoverBrush = QBrush(mixColor(highlight, mix, 0.05)); - } - - //handle click - if (isDark) { - handleClickBrush = QBrush(mixColor(highlight, mix, 0.05)); - } else { - handleClickBrush = QBrush(mixColor(highlight, mix, 0.2)); - } - - //handle disable - handleDisableBrush = option->palette.color(QPalette::Disabled, QPalette::ButtonText); - - //groove value default - if (isDark) { - grooveValueDefaultBrush = QBrush(mixColor(highlight, mix, 0.05)); - } else { - grooveValueDefaultBrush = QBrush(mixColor(highlight, mix, 0.2)); - } - - //groove value hover - grooveValueHoverBrush = grooveValueDefaultBrush; - - //groove value disable - grooveValueDisableBrush = handleDisableBrush; - - //groove unvalue default - grooveUnvalueDefaultBrush = option->palette.color(QPalette::Active, QPalette::Button); - if(needTranslucent) - { - QColor color = option->palette.color(QPalette::Active, QPalette::BrightText); - color.setAlphaF(0.1); - grooveUnvalueDefaultBrush.setColor(color); - } - - //groove unvalue hover - grooveUnvalueHoverBrush = grooveUnvalueDefaultBrush; - - //groove unvalue disable - grooveUnvalueDisableBrush = grooveUnvalueDefaultBrush; - - - sliderParameters.sliderHandleDefaultBrush = handleDefaultBrush; - sliderParameters.sliderHandleHoverBrush = handleHoverBrush; - sliderParameters.sliderHandleClickBrush = handleClickBrush; - sliderParameters.sliderHandleDisableBrush = handleDisableBrush; - - sliderParameters.sliderGrooveValueDefaultBrush = grooveValueDefaultBrush; - sliderParameters.sliderGrooveValueHoverBrush = grooveValueHoverBrush; - sliderParameters.sliderGrooveValueDisableBrush = grooveValueDisableBrush; - - sliderParameters.sliderGrooveUnvalueDefaultBrush = grooveUnvalueDefaultBrush; - sliderParameters.sliderGrooveUnvalueHoverBrush = grooveUnvalueHoverBrush; - sliderParameters.sliderGrooveUnvalueDisableBrush = grooveUnvalueDisableBrush; -} - -void KDefaultStyleParameters::initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - QBrush contentBrush; - QBrush grooveDefaultBrush; - QBrush grooveDisableBrush; - - bool needTranslucent = false; - - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option); - const bool vertical = pb->orientation == Qt::Vertical; - const bool inverted = pb->invertedAppearance; - - bool reverse = (!vertical && (pb->direction == Qt::RightToLeft)) || vertical; - if (inverted) - reverse = !reverse; - - //content - QColor startColor = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor endColor = option->palette.color(QPalette::Active, QPalette::Highlight).lighter(120); - QLinearGradient linearGradient; - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - if (vertical) { - if (reverse) { - linearGradient.setStart(pb->rect.bottomLeft()); - linearGradient.setFinalStop(pb->rect.topLeft()); - } else { - linearGradient.setStart(pb->rect.topLeft()); - linearGradient.setFinalStop(pb->rect.bottomLeft()); - } - } else { - if (reverse) { - linearGradient.setStart(pb->rect.topRight()); - linearGradient.setFinalStop(pb->rect.topLeft()); - } else { - linearGradient.setStart(pb->rect.topLeft()); - linearGradient.setFinalStop(pb->rect.topRight()); - } - } - contentBrush = QBrush(linearGradient); - - //groove default - grooveDefaultBrush = pb->palette.brush(QPalette::Active, QPalette::Button); - if(needTranslucent) - { - QColor grooveDefaultColor = pb->palette.color(QPalette::Active, QPalette::BrightText); - grooveDefaultColor.setAlphaF(0.10); - grooveDefaultBrush.setColor(grooveDefaultColor); - } - - //groove disable - grooveDisableBrush = pb->palette.brush(QPalette::Disabled, QPalette::Button); - - - progressBarParameters.radius = 6; - progressBarParameters.progressBarContentBrush = contentBrush; - progressBarParameters.progressBarGrooveDefaultBrush = grooveDefaultBrush; - progressBarParameters.progressBarGrooveDisableBrush = grooveDisableBrush; -} - -void KDefaultStyleParameters::initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int sliderRadius; - QBrush grooveDefaultBrush; - QBrush grooveInactiveBrush; - QBrush sliderDefaultBrush; - QBrush sliderHoverBrush; - QBrush sliderClickBrush; - QBrush sliderDisableBrush; - bool needTranslucent = false; - - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option); - - //radius - if (bar->orientation == Qt::Horizontal) { - sliderRadius = (bar->rect.height()) / 4; - } else { - sliderRadius = (bar->rect.width()) / 4; - } - - //groove default - grooveDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Base); - - //groove inactive - grooveInactiveBrush = option->palette.brush(QPalette::Inactive, QPalette::Base); - - //slider default - sliderDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - - //slider hover - if (isDark) { - sliderHoverBrush = QBrush(mixColor(sliderDefaultBrush.color(), mix, 0.2)); - } else { - sliderHoverBrush = QBrush(mixColor(sliderDefaultBrush.color(), mix, 0.05)); - } - - //slider click - if (isDark) { - sliderClickBrush = QBrush(mixColor(sliderDefaultBrush.color(), mix, 0.05)); - } else { - sliderClickBrush = QBrush(mixColor(sliderDefaultBrush.color(), mix, 0.2)); - } - - //slider disable - sliderDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - - - if(needTranslucent) - { - QColor grooveDefaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); - grooveDefaultColor.setAlphaF(isDark ? 0.08 : 0.06); - grooveDefaultBrush.setColor(grooveDefaultColor); - - QColor grooveInactiveColor = option->palette.color(QPalette::Active, QPalette::BrightText); - grooveInactiveColor.setAlphaF(isDark ? 0.08 : 0.06); - grooveInactiveBrush.setColor(grooveInactiveColor); - - QColor sliderDefaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); - sliderDefaultColor.setAlphaF(isDark ? 0.10 : 0.10); - sliderDefaultBrush.setColor(sliderDefaultColor); - - QColor sliderHoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); - sliderHoverColor.setAlphaF(isDark ? 0.20 : 0.18); - sliderHoverBrush.setColor(sliderHoverColor); - - QColor sliderClickColor = option->palette.color(QPalette::Active, QPalette::BrightText); - sliderClickColor.setAlphaF(isDark ? 0.30 : 0.28); - sliderClickBrush.setColor(sliderClickColor); - } - - - scrollBarParameters.radius = sliderRadius; - scrollBarParameters.scrollBarGrooveDefaultBrush = grooveDefaultBrush; - scrollBarParameters.scrollBarGrooveInactiveBrush = grooveInactiveBrush; - scrollBarParameters.scrollBarSliderDefaultBrush = sliderDefaultBrush; - scrollBarParameters.scrollBarSliderHoverBrush = sliderHoverBrush; - scrollBarParameters.scrollBarSliderClickBrush = sliderClickBrush; - scrollBarParameters.scrollBarSliderDisableBrush = sliderDisableBrush; -} - -void KDefaultStyleParameters::initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - QBrush backgroundBrush; - - //background - backgroundBrush = option->palette.color(QPalette::Active, QPalette::ToolTipBase); - - - toolTipParameters.radius = 6; - toolTipParameters.toolTipBackgroundBrush = backgroundBrush; -} - -void KDefaultStyleParameters::initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int tabradius = 6; - QBrush widgetBackgroundBrush; - QBrush tabBarBackgroundBrush; - QBrush tabBarDefaultBrush; - QBrush tabBarHoverBrush; - QBrush tabBarSelectBrush; - - //tab widget background - widgetBackgroundBrush = option->palette.brush(QPalette::Active, QPalette::Base); - - //tabbar background - tabBarBackgroundBrush = option->palette.brush(QPalette::Active, QPalette::Window); - - //tabbar default - tabBarDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Window); - - //tabbar hover - QColor hover_color = option->palette.color(QPalette::Active, QPalette::Window); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - tabBarHoverBrush = QBrush(mixColor(hover_color, mix, 0.1)); - - //tabbar select - tabBarSelectBrush = option->palette.brush(QPalette::Active, QPalette::Base); - - - if (widget && widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - tabradius = widget->property("setRadius").value<int>(); - } - - - tabWidgetParameters.radius = tabradius; - tabWidgetParameters.tabWidgetBackgroundBrush = widgetBackgroundBrush; - tabWidgetParameters.tabBarBackgroundBrush = tabBarBackgroundBrush; - tabWidgetParameters.tabBarDefaultBrush = tabBarDefaultBrush; - tabWidgetParameters.tabBarHoverBrush = tabBarHoverBrush; - tabWidgetParameters.tabBarSelectBrush = tabBarSelectBrush; -} - -void KDefaultStyleParameters::initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - - int frameradius = 8; - int itemradius = 6; - QPixmap framePixmap(option->rect.size()); - QBrush itemSelectBrush; - - - //frame Pixmap - framePixmap.fill(Qt::transparent); - if (qobject_cast<const QFrame*>(widget)) { - QPainter pixmapPainter(&framePixmap); - pixmapPainter.setPen(Qt::NoPen); - pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::Base).lighter(180)); - pixmapPainter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter.drawRoundedRect(option->rect, frameradius, frameradius); - } else { - int rander = 2; - - // Draw a black floor - QPainter pixmapPainter(&framePixmap); - pixmapPainter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter.setPen(Qt::transparent); - pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::BrightText)); - pixmapPainter.drawRoundedRect(option->rect.adjusted(+rander, +rander+6, -rander, -rander-6), frameradius, frameradius); - pixmapPainter.end(); - - // Blur the black background - QImage img = framePixmap.toImage(); - qt_blurImage(img, 4, false, false); - - // Dig out the center part, Shadow rendering - framePixmap = QPixmap::fromImage(img); - QPainter pixmapPainter2(&framePixmap); - pixmapPainter2.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter2.setCompositionMode(QPainter::CompositionMode_Clear); - pixmapPainter2.setPen(Qt::transparent); - pixmapPainter2.setBrush(Qt::transparent); - pixmapPainter2.drawRoundedRect(option->rect.adjusted(+rander, +rander+6, -rander, -rander-6), frameradius, frameradius); - pixmapPainter2.end(); - - //That's when I started drawing the frame floor - auto color = option->palette.color(QPalette::Base); - if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { - auto opacity = UKUIStyleSettings::globalInstance()->get("menuTransparency").toInt()/100.0; - color.setAlphaF(opacity); - } - if (qApp->property("blurEnable").isValid()) { - bool blurEnable = qApp->property("blurEnable").toBool(); - if (!blurEnable) { - color.setAlphaF(1); - } - } - if (widget) { - if (widget->property("useSystemStyleBlur").isValid() && !widget->property("useSystemStyleBlur").toBool()) { - color.setAlphaF(1); - } - } - //if blur effect is not supported, do not use transparent color. - if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind) || blackAppListWithBlurHelper().contains(qAppName())) { - color.setAlphaF(1); - } - - QPainterPath path; - QRegion region; - if (widget) { - region = widget->mask(); - } - if (region.isEmpty()) { - path.addRoundedRect(option->rect.adjusted(+rander, +rander+6, -rander, -rander-6), frameradius, frameradius); - } else { - path.addRegion(region); - } - - //draw blur background - QPainter pixmapPainter3(&framePixmap); - pixmapPainter3.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter3.setPen(Qt::transparent); - pixmapPainter3.setBrush(color); - pixmapPainter3.drawPath(path); - } - - //item select brush - itemSelectBrush = QBrush(option->palette.brush(QPalette::Active, QPalette::Highlight)); - - menuParameters.frameRadius = frameradius; - menuParameters.itemRadius = itemradius; - menuParameters.menuFramePixmap = framePixmap; - menuParameters.menuItemSelectBrush = itemSelectBrush; -} - - -//Classical widget theme -KClassicalStyleParameters::KClassicalStyleParameters(QObject *parent, bool isDark) : KAbstractStyleParameters(parent, isDark) -{ - radius = 0; - CheckBox_Radius = 0; - - initPalette(isDark); -} - -void KClassicalStyleParameters::initPalette(bool isDark) -{ - - QColor windowText_at(38, 38, 38), - windowText_iat(38, 38, 38), - windowText_dis(166, 166, 166), - button_at(230, 230, 230), - button_iat(230, 230, 230), - button_dis(233, 233, 233), - light_at(255, 255, 255), - light_iat(255, 255, 255), - light_dis(242, 242, 242), - midlight_at(217, 217, 217), - midlight_iat(217, 217, 217), - midlight_dis(230, 230, 230), - dark_at(77, 77, 77), - dark_iat(77, 77, 77), - dark_dis(64, 64, 64), - mid_at(115, 115, 115), - mid_iat(115, 115, 115), - mid_dis(102, 102, 102), - text_at(38, 38, 38), - text_iat(38, 38, 38), - text_dis(140, 140, 140), - brightText_at(89, 89, 89), - brightText_iat(89, 89, 89), - brightText_dis(77, 77, 77), - buttonText_at(38, 38, 38), - buttonText_iat(38, 38, 38), - buttonText_dis(179, 179, 179), - base_at(255, 255, 255), - base_iat(245, 245, 245), - base_dis(237, 237, 237), - window_at(245, 245, 245), - window_iat(237, 237, 237), - window_dis(230, 230, 230), - shadow_at(214, 214, 214), - shadow_iat(214, 214, 214), - shadow_dis(201, 201, 201), - highLight_at(55, 144, 250), - highLight_iat(55, 144, 250), - hightight_dis(233, 233, 233), - highLightText_at(255, 255, 255), - highLightText_iat(255, 255, 255), - highLightText_dis(179, 179, 179), - link_at(55, 144, 250), - link_iat(55, 144, 250), - link_dis(55, 144, 250), - linkVisited_at(114, 46, 209), - linkVisited_iat(114, 46, 209), - linkVisited_dis(114, 46, 209), - alternateBase_at(244, 245, 245), - noRale_at(240, 240, 240), - noRole_iat(240, 240, 240), - noRole_dis(217, 217, 217), - toolTipBase(255, 255, 255), - toolTipText(38, 38, 38), - placeholderText(38, 38, 38); - - if (isDark) { - windowText_at.setRgb(217, 217, 217); - windowText_iat.setRgb(217, 217, 217); - windowText_dis.setRgb(77, 77, 77); - button_at.setRgb(55, 55, 59); - button_iat.setRgb(55, 55, 59); - button_dis.setRgb(46, 46, 48); - midlight_at.setRgb(77, 77, 77); - midlight_iat.setRgb(77, 77, 77); - midlight_dis.setRgb(64, 64, 64); - dark_at.setRgb(38, 38, 38); - dark_iat.setRgb(38, 38, 38); - dark_dis.setRgb(26, 26, 26); - text_at.setRgb(217, 217, 217); - text_iat.setRgb(217, 217, 217); - text_dis.setRgb(77, 77, 77); - brightText_at.setRgb(255, 255, 255); - brightText_iat.setRgb(255, 255, 255); - brightText_dis.setRgb(77, 77, 77); - buttonText_at.setRgb(217, 217, 217); - buttonText_iat.setRgb(217, 217, 217); - buttonText_dis.setRgb(76, 76, 79); - base_at.setRgb(18, 18, 18); - base_iat.setRgb(28, 28, 28); - base_dis.setRgb(36, 36, 36); - window_at.setRgb(35, 36, 38); - window_iat.setRgb(26, 26, 26); - window_dis.setRgb(18, 18, 18); - hightight_dis.setRgb(46, 46, 48); - highLightText_dis.setRgb(77, 77, 77); - alternateBase_at.setRgb(38, 38, 38); - noRale_at.setRgb(51, 51, 51); - noRole_iat.setRgb(51, 51, 51); - noRole_dis.setRgb(60, 60, 64); - toolTipBase.setRgb(38, 38, 38); - toolTipText.setRgb(217, 217, 217); - placeholderText.setRgb(166, 166, 166); - } - - defaultPalette.setColor(QPalette::Active, QPalette::WindowText, windowText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::WindowText, windowText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::WindowText, windowText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Button, button_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Button, button_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Button, button_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Light, light_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Light, light_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Light, light_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Midlight, midlight_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Midlight, midlight_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Midlight, midlight_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Dark, dark_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Dark, dark_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Dark, dark_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Mid, mid_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Mid, mid_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Mid, mid_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Text, text_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Text, text_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Text, text_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::BrightText, brightText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::BrightText, brightText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::BrightText, brightText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::ButtonText, buttonText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::ButtonText, buttonText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::ButtonText, buttonText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Base, base_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Base, base_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Base, base_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Window, window_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Window, window_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Window, window_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Shadow, shadow_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Shadow, shadow_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Shadow, shadow_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Highlight, highLight_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Highlight, highLight_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Highlight, hightight_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::HighlightedText, highLightText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::HighlightedText, highLightText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::HighlightedText, highLightText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Link, link_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Link, link_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Link, link_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::LinkVisited, linkVisited_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::LinkVisited, linkVisited_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::LinkVisited, linkVisited_dis); - - defaultPalette.setColor(QPalette::AlternateBase, alternateBase_at); - - defaultPalette.setColor(QPalette::Active, QPalette::NoRole, noRale_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::NoRole, noRole_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::NoRole, noRole_dis); - - defaultPalette.setColor(QPalette::ToolTipBase, toolTipBase); - - defaultPalette.setColor(QPalette::ToolTipText, toolTipText); - -#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) - defaultPalette.setColor(QPalette::PlaceholderText, placeholderText); -#endif -} - -void KClassicalStyleParameters::initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - -} - -void KClassicalStyleParameters::initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - -} - -void KClassicalStyleParameters::initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - -} - -void KClassicalStyleParameters::initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout) -{ - -} - -void KClassicalStyleParameters::initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - -} - -void KClassicalStyleParameters::initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - -} - -void KClassicalStyleParameters::initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - -} - -void KClassicalStyleParameters::initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - -} - -void KClassicalStyleParameters::initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - -} - -void KClassicalStyleParameters::initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - -} - -void KClassicalStyleParameters::initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - -} - -void KClassicalStyleParameters::initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - -} - -void KClassicalStyleParameters::initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - -} - -void KClassicalStyleParameters::initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - -} - -void KClassicalStyleParameters::initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - -} - -void KClassicalStyleParameters::initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - -} - - -//fashion widget theme -KFashionStyleParameters::KFashionStyleParameters(QObject *parent, bool isDark) : KAbstractStyleParameters(parent, isDark) -{ - radius = 6; - - ColoseButtonColor = QColor(198, 42, 63); - - initPalette(isDark); -} - -void KFashionStyleParameters::initPalette(bool isDark) -{ - //ukui-light palette UKUI3.1 - QColor windowText_at(38, 38, 38), - windowText_iat(0, 0, 0, 255 * 0.55), - windowText_dis(0, 0, 0, 255 * 0.3), - button_at(230, 230, 230), - button_iat(230, 230, 230), - button_dis(233, 233, 233), - light_at(255, 255, 255), - light_iat(255, 255, 255), - light_dis(242, 242, 242), - midlight_at(218, 218, 218), - midlight_iat(218, 218, 218), - midlight_dis(230, 230, 230), - dark_at(77, 77, 77), - dark_iat(77, 77, 77), - dark_dis(64, 64, 64), - mid_at(115, 115, 115), - mid_iat(115, 115, 115), - mid_dis(102, 102, 102), - text_at(38, 38, 38), - text_iat(38, 38, 38), - text_dis(0, 0, 0, 255 * 0.3), - brightText_at(0, 0, 0), - brightText_iat(0, 0, 0), - brightText_dis(0, 0, 0), - buttonText_at(38, 38, 38), - buttonText_iat(38, 38, 38), - buttonText_dis(0, 0, 0, 255 * 0.3), - base_at(255, 255, 255), - base_iat(245, 245, 245), - base_dis(237, 237, 237), - window_at(245, 245, 245), - window_iat(237, 237, 237), - window_dis(230, 230, 230), - shadow_at(0, 0, 0, 255 * 0.16), - shadow_iat(0, 0, 0, 255 * 0.16), - shadow_dis(0, 0, 0, 255 * 0.21), -// shadow_at(214, 214, 214), -// shadow_iat(214, 214, 214), -// shadow_dis(201, 201, 201), - highLight_at(120, 115, 245), - highLight_iat(120, 115, 245), - highLight_dis(233, 233, 233), - highLightText_at(255, 255, 255), - highLightText_iat(255, 255, 255), - highLightText_dis(179, 179, 179), - link_at(120, 115, 245), - link_iat(120, 115, 245), - link_dis(120, 115, 245), - linkVisited_at(62, 118, 247), - linkVisited_iat(62, 118, 247), - linkVisited_dis(62, 118, 247), - alternateBase_at(245, 245, 245), - alternateBase_iat(245, 245, 245), - alternateBase_dis(245, 245, 245), - noRale_at(240, 240, 240), - noRole_iat(240, 240, 240), - noRole_dis(217, 217, 217), - toolTipBase_at(255, 255, 255), - toolTipBase_iat(255, 255, 255), - toolTipBase_dis(255, 255, 255), - toolTipText_at(38, 38, 38), - toolTipText_iat(38, 38, 38), - toolTipText_dis(38, 38, 38), - placeholderText_at(0, 0, 0, 255 * 0.35), - placeholderText_iat(0, 0, 0, 255 * 0.35), - placeholderText_dis(0, 0, 0, 255 * 0.3); - - //ukui-dark - if (isDark) { - windowText_at.setRgb(217, 217, 217); - windowText_iat.setRgb(255, 255, 255, 255 * 0.55); - windowText_dis.setRgb(255, 255, 255, 255 * 0.3); - button_at.setRgb(55, 55, 59); - button_iat.setRgb(55, 55, 59); - button_dis.setRgb(46, 46, 46); - light_at.setRgb(255, 255, 255); - light_iat.setRgb(255, 255, 255); - light_dis.setRgb(242, 242, 242); - midlight_at.setRgb(95, 95, 98); - midlight_iat.setRgb(95, 95, 98); - midlight_dis.setRgb(79, 79, 82); - dark_at.setRgb(38, 38, 38); - dark_iat.setRgb(38, 38, 38); - dark_dis.setRgb(26, 26, 26); - mid_at.setRgb(115, 115, 115); - mid_iat.setRgb(115, 115, 115); - mid_dis.setRgb(102, 102, 102); - text_at.setRgb(217, 217, 217); - text_iat.setRgb(217, 217, 217); - text_dis.setRgb(255, 255, 255, 255 * 0.3); - brightText_at.setRgb(255, 255, 255); - brightText_iat.setRgb(255, 255, 255); - brightText_dis.setRgb(255, 255, 255); - buttonText_at.setRgb(217, 217, 217); - buttonText_iat.setRgb(217, 217, 217); - buttonText_dis.setRgb(255, 255, 255, 255 * 0.3); - base_at.setRgb(29, 29, 29); - base_iat.setRgb(28, 28, 28); - base_dis.setRgb(36, 36, 36); - window_at.setRgb(35, 36, 38); - window_iat.setRgb(26, 26, 26); - window_dis.setRgb(18, 18, 18); - shadow_at.setRgb(0, 0, 0, 255 * 0.16); - shadow_iat.setRgb(0, 0, 0, 255 * 0.16); - shadow_dis.setRgb(0, 0, 0, 255 * 0.21); -// shadow_at.setRgb(214, 214, 214); -// shadow_iat.setRgb(214, 214, 214); -// shadow_dis.setRgb(201, 201, 201); - highLight_at.setRgb(120, 115, 245); - highLight_iat.setRgb(120, 115, 245); - highLight_dis.setRgb(46, 46, 46); - highLightText_at.setRgb(255, 255, 255); - highLightText_iat.setRgb(255, 255, 255); - highLightText_dis.setRgb(77, 77, 77); - link_at.setRgb(120, 115, 245); - link_iat.setRgb(120, 115, 245); - link_dis.setRgb(120, 115, 245); - linkVisited_at.setRgb(62, 118, 247); - linkVisited_iat.setRgb(62, 118, 247); - linkVisited_dis.setRgb(62, 118, 247); - alternateBase_at.setRgb(38, 38, 38); - alternateBase_iat.setRgb(38, 38, 38); - alternateBase_dis.setRgb(38, 38, 38); - noRale_at.setRgb(51, 51, 51); - noRole_iat.setRgb(51, 51, 51); - noRole_dis.setRgb(60, 60, 60); - toolTipBase_at.setRgb(38, 38, 38); - toolTipBase_iat.setRgb(38, 38, 38); - toolTipBase_dis.setRgb(38, 38, 38); - toolTipText_at.setRgb(217, 217, 217); - toolTipText_iat.setRgb(217, 217, 217); - toolTipText_dis.setRgb(217, 217, 217); - placeholderText_at.setRgb(255, 255, 255, 255 * 0.35); - placeholderText_iat.setRgb(255, 255, 255, 255 * 0.35); - placeholderText_dis.setRgb(255, 255, 255, 255 * 0.3); - } - - defaultPalette.setColor(QPalette::Active, QPalette::WindowText, windowText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::WindowText, windowText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::WindowText, windowText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Button, button_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Button, button_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Button, button_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Light, light_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Light, light_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Light, light_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Midlight, midlight_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Midlight, midlight_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Midlight, midlight_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Dark, dark_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Dark, dark_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Dark, dark_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Mid, mid_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Mid, mid_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Mid, mid_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Text, text_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Text, text_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Text, text_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::BrightText, brightText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::BrightText, brightText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::BrightText, brightText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::ButtonText, buttonText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::ButtonText, buttonText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::ButtonText, buttonText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Base, base_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Base, base_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Base, base_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Window, window_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Window, window_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Window, window_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Shadow, shadow_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Shadow, shadow_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Shadow, shadow_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Highlight, highLight_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Highlight, highLight_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Highlight, highLight_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::HighlightedText, highLightText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::HighlightedText, highLightText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::HighlightedText, highLightText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Link, link_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Link, link_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Link, link_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::LinkVisited, linkVisited_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::LinkVisited, linkVisited_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::LinkVisited, linkVisited_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::AlternateBase, alternateBase_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::AlternateBase, alternateBase_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::AlternateBase, alternateBase_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::NoRole, noRale_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::NoRole, noRole_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::NoRole, noRole_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::ToolTipBase, toolTipBase_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipBase, toolTipBase_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipBase, toolTipBase_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::ToolTipText, toolTipText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipText, toolTipText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipText, toolTipText_dis); - -#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) - defaultPalette.setColor(QPalette::Active, QPalette::PlaceholderText, placeholderText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::PlaceholderText, placeholderText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::PlaceholderText, placeholderText_dis); -#endif -} - -void KFashionStyleParameters::initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - pushButtonParameters.radius = 6; - - QBrush defaultBrush; - QBrush clickBrush; - QBrush hoverBrush; - QBrush disableBrush; - - QBrush checkBrush; - QBrush checkHoverBrush; - QBrush checkClickBrush; - QBrush checkDisableBrush; - - QPen focusPen; - - - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - - //hover - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - if (isDark) { - startColor = mixColor(highlight, QColor(Qt::white), 0.2); - endColor = mixColor(highlight, QColor(Qt::black), 0.05); - } else { - startColor = mixColor(highlight, QColor(Qt::white), 0.05); - endColor = mixColor(highlight, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - clickBrush = QBrush(mixColor(highlight, mix, 0.1)); - defaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - - checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); - checkHoverBrush = hoverBrush; - checkClickBrush = clickBrush; - checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); - - focusPen = QPen(QBrush(mixColor(highlight, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if (widget) { - bool isWindowButton = false; - bool isWindowColoseButton = false; - bool isImportant = false; - bool useButtonPalette = false; - bool needTranslucent = false; - - if (widget->property("isWindowButton").isValid()) { - if (widget->property("isWindowButton").toInt() == 0x01) { - isWindowButton = true; - } - if (widget->property("isWindowButton").toInt() == 0x02) { - isWindowColoseButton = true; - } - } - if (widget->property("isImportant").isValid()) { - isImportant = widget->property("isImportant").toBool(); - } - - if (widget->property("useButtonPalette").isValid()) { - useButtonPalette = widget->property("useButtonPalette").toBool(); - } - - if (widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - if (isWindowColoseButton) { - QColor ColoseButton = ColoseButtonColor; - - if (isDark) { - startColor = QColor(242, 116, 133); - endColor = QColor(221, 44, 68); - } else { - startColor = QColor(242, 82, 117); - endColor = QColor(221, 44, 68); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - //click - clickBrush = QBrush(ColoseButton); - - //focus - focusPen = QPen(QBrush(ColoseButton), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - } else if (isWindowButton && useTransparentButtonList().contains(qAppName())) { - if (isDark) { - mix.setAlphaF(0.28); - hoverBrush = QBrush(mix); - mix.setAlphaF(0.15); - clickBrush = QBrush(mix); - } else { - mix.setAlphaF(0.15); - hoverBrush = QBrush(mix); - mix.setAlphaF(0.28); - clickBrush = QBrush(mix); - } - } else if (useButtonPalette || isWindowButton) { - if(needTranslucent) - { - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Light); - endColor = option->palette.color(QPalette::Active, QPalette::Text); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } else { - startColor = option->palette.color(QPalette::Active, QPalette::Mid); - endColor = option->palette.color(QPalette::Active, QPalette::Dark); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - QColor clickColor = option->palette.color(QPalette::Active, QPalette::Dark); - if(isDark) - clickColor = option->palette.color(QPalette::Active, QPalette::Light); - clickColor.setAlphaF(isDark ? 0.30 : 0.30); - clickBrush.setColor(clickColor); - } - else{ - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - - //hover - if (isDark) { - startColor = mixColor(button, QColor(Qt::white), 0.2); - endColor = mixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = mixColor(button, QColor(Qt::black), 0.05); - endColor = mixColor(button, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - //click - clickBrush = QBrush(mixColor(button, mix, 0.2)); - } - } - - if (needTranslucent) { - defaultBrush = option->palette.brush(QPalette::Active, QPalette::Mid); - disableBrush = option->palette.brush(QPalette::Active, QPalette::Mid); - - if(isDark){ - defaultBrush = option->palette.brush(QPalette::Active, QPalette::Text); - disableBrush = option->palette.brush(QPalette::Active, QPalette::Text); - } - QColor defaultColor = defaultBrush.color(); - defaultColor.setAlphaF(0.15); - defaultBrush.setColor(defaultColor); - - QColor disableColor = disableBrush.color(); - disableColor.setAlphaF(0.1); - disableBrush.setColor(disableColor); - } - - if (isImportant) { - defaultBrush = highlight; - } - } - - pushButtonParameters.pushButtonDefaultBrush = defaultBrush; - pushButtonParameters.pushButtonClickBrush = clickBrush; - pushButtonParameters.pushButtonHoverBrush = hoverBrush; - pushButtonParameters.pushButtonDisableBrush = disableBrush; - pushButtonParameters.pushButtonCheckBrush = checkBrush; - pushButtonParameters.pushButtonCheckHoverBrush = checkHoverBrush; - pushButtonParameters.pushButtonCheckClickBrush = checkClickBrush; - pushButtonParameters.pushButtonCheckDisableBrush = checkDisableBrush; - pushButtonParameters.pushButtonFocusPen = focusPen; -} - -void KFashionStyleParameters::initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - toolButtonParameters.radius = 6; - - QBrush defaultBrush; - QBrush clickBrush; - QBrush hoverBrush; - QBrush disableBrush; - - QBrush checkBrush; - QBrush checkHoverBrush; - QBrush checkClickBrush; - QBrush checkDisableBrush; - - QPen focusPen; - - - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - - //hover - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - if (isDark) { - startColor = mixColor(highlight, QColor(Qt::white), 0.2); - endColor = mixColor(highlight, QColor(Qt::black), 0.05); - } else { - startColor = mixColor(highlight, QColor(Qt::white), 0.05); - endColor = mixColor(highlight, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - clickBrush = QBrush(mixColor(highlight, mix, 0.1)); - defaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - - checkBrush = option->palette.color(QPalette::Active, QPalette::Highlight); - checkHoverBrush = hoverBrush; - checkClickBrush = clickBrush; - checkDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::NoRole); - - focusPen = QPen(QBrush(mixColor(highlight, mix, 0.2)), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if (widget) { - bool isWindowButton = false; - bool isWindowColoseButton = false; - bool useButtonPalette = false; - bool needTranslucent = false; - - if (widget->property("isWindowButton").isValid()) { - if (widget->property("isWindowButton").toInt() == 0x01) { - isWindowButton = true; - } - if (widget->property("isWindowButton").toInt() == 0x02) { - isWindowColoseButton = true; - } - } - - if (widget->property("useButtonPalette").isValid()) { - useButtonPalette = widget->property("useButtonPalette").toBool(); - } - - if (widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - if (isWindowColoseButton) { - QColor ColoseButton = ColoseButtonColor; - if (isDark) { - startColor = QColor(242, 116, 133); - endColor = QColor(221, 44, 68); - } else { - startColor = QColor(242, 82, 117); - endColor = QColor(221, 44, 68); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - //click - clickBrush = QBrush(ColoseButton); - - //focus - focusPen = QPen(QBrush(ColoseButton), 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - } else if (isWindowButton && useTransparentButtonList().contains(qAppName())) { - if (isDark) { - mix.setAlphaF(0.28); - hoverBrush = QBrush(mix); - mix.setAlphaF(0.15); - clickBrush = QBrush(mix); - } else { - mix.setAlphaF(0.15); - hoverBrush = QBrush(mix); - mix.setAlphaF(0.28); - clickBrush = QBrush(mix); - } - } else if (useButtonPalette || isWindowButton) { - if(needTranslucent) - { - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Light); - endColor = option->palette.color(QPalette::Active, QPalette::Text); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } else { - startColor = option->palette.color(QPalette::Active, QPalette::Mid); - endColor = option->palette.color(QPalette::Active, QPalette::Dark); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - QColor clickColor = option->palette.color(QPalette::Active, QPalette::Dark); - if(isDark) - clickColor = option->palette.color(QPalette::Active, QPalette::Light); - clickColor.setAlphaF(isDark ? 0.30 : 0.30); - clickBrush.setColor(clickColor); - } else { - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - - //hover - if (isDark) { - startColor = mixColor(button, QColor(Qt::white), 0.2); - endColor = mixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = mixColor(button, QColor(Qt::black), 0.05); - endColor = mixColor(button, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - //click - clickBrush = QBrush(mixColor(button, mix, 0.2)); - } - } - - if (needTranslucent) { - defaultBrush = option->palette.brush(QPalette::Active, QPalette::Mid); - disableBrush = option->palette.brush(QPalette::Active, QPalette::Mid); - - if(isDark){ - defaultBrush = option->palette.brush(QPalette::Active, QPalette::Text); - disableBrush = option->palette.brush(QPalette::Active, QPalette::Text); - } - QColor defaultColor = defaultBrush.color(); - defaultColor.setAlphaF(0.15); - defaultBrush.setColor(defaultColor); - - QColor disableColor = disableBrush.color(); - disableColor.setAlphaF(0.1); - disableBrush.setColor(disableColor); - } - } - - toolButtonParameters.toolButtonDefaultBrush = defaultBrush; - toolButtonParameters.toolButtonClickBrush = clickBrush; - toolButtonParameters.toolButtonHoverBrush = hoverBrush; - toolButtonParameters.toolButtonDisableBrush = disableBrush; - toolButtonParameters.toolButtonCheckBrush = checkBrush; - toolButtonParameters.toolButtonCheckHoverBrush = checkHoverBrush; - toolButtonParameters.toolButtonCheckClickBrush = checkClickBrush; - toolButtonParameters.toolButtonCheckDisableBrush = checkDisableBrush; - toolButtonParameters.toolButtonFocusPen = focusPen; -} - -void KFashionStyleParameters::initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - lineEditParameters.radius = 6; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush focusBrush; - QBrush disableBrush; - - QPen defaultPen; - QPen hoverPen; - QPen focusPen; - QPen disablePen; - - bool needTranslucent = false; - - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - //default state - defaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - defaultPen = QPen(Qt::NoPen); - defaultPen.setWidth(0); - - //hover state - hoverBrush = defaultBrush; - hoverPen = defaultPen; - - //focus state - focusBrush = option->palette.brush(QPalette::Active, QPalette::Base); - focusPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), - 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //disable state - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - disablePen = QPen(Qt::NoPen); - disablePen.setWidth(0); - - if(needTranslucent) - { - QColor defaultColor = option->palette.color(QPalette::Active, QPalette::Mid); - if (isDark) - defaultColor = option->palette.color(QPalette::Active, QPalette::Text); - defaultColor.setAlphaF(isDark ? 0.1 : 0.15); - defaultBrush.setColor(defaultColor); - - QColor focusColor = option->palette.color(QPalette::Active, QPalette::Base); - focusColor.setAlphaF(isDark ? 0.45 : 0.65); - focusBrush.setColor(focusColor); - - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Light); - endColor = option->palette.color(QPalette::Active, QPalette::Text); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } else { - startColor = option->palette.color(QPalette::Active, QPalette::Mid); - endColor = option->palette.color(QPalette::Active, QPalette::Dark); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - } - - lineEditParameters.lineEditDefaultBrush = defaultBrush; - lineEditParameters.lineEditHoverBrush = hoverBrush; - lineEditParameters.lineEditFocusBrush = focusBrush; - lineEditParameters.lineEditDisableBrush = disableBrush; - - lineEditParameters.lineEditDefaultPen = defaultPen; - lineEditParameters.lineEditHoverPen = hoverPen; - lineEditParameters.lineEditFocusPen = focusPen; - lineEditParameters.lineEditDisablePen = disablePen; -} - -void KFashionStyleParameters::initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout) -{ - spinBoxParameters.radius = 6; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush focusBrush; - QBrush disableBrush; - - QPen defaultPen; - QPen hoverPen; - QPen focusPen; - QPen disablePen; - - QBrush upHoverBrush; - QBrush upFocusHoverBrush; - QBrush upClickBrush; - QBrush upDefaultBrush; - QBrush downHoverBrush; - QBrush downFocusHoverBrush; - QBrush downClickBrush; - QBrush downDefaultBrush; - - //default state - defaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - defaultPen = QPen(Qt::NoPen); - defaultPen.setWidth(0); - - //hover state - hoverPen = defaultPen; - if(isHorizonLayout) - hoverPen.setWidth(2); - {//hoverBrush - QColor startColor; - QColor endColor; - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Midlight); - endColor = option->palette.color(QPalette::Disabled, QPalette::NoRole); - startColor.setAlphaF(0.5); - endColor.setAlphaF(0.5); - } else { - startColor = option->palette.color(QPalette::Active, QPalette::Midlight); - endColor = mixColor(startColor, mix, 0.1); - startColor.setAlphaF(0.5); - endColor.setAlphaF(0.5); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - } - - //focus state - focusBrush = option->palette.brush(QPalette::Active, QPalette::Base); - focusPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), - 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //disable state - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - disablePen = QPen(Qt::NoPen); - disablePen.setWidth(0); - - if(isHorizonLayout) - { - upDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - downDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - } - else - { - upDefaultBrush = QBrush(Qt::NoBrush); - downDefaultBrush = QBrush(Qt::NoBrush); - } - - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - QColor startColor; - QColor endColor; - - QLinearGradient upLinearGradient; - upLinearGradient.setStart(option->rect.left(), option->rect.top()); - upLinearGradient.setFinalStop(option->rect.left(), option->rect.center().y()); - //up hover - if (isDark) { - startColor = mixColor(button, QColor(Qt::white), 0.2); - endColor = mixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = mixColor(button, QColor(Qt::black), 0.05); - endColor = mixColor(button, QColor(Qt::black), 0.2); - } - upLinearGradient.setColorAt(0, startColor); - upLinearGradient.setColorAt(1, endColor); - upHoverBrush = QBrush(upLinearGradient); - - //up focus hover - if (isDark) { - startColor = mixColor(highlight, QColor(Qt::white), 0.2); - endColor = mixColor(highlight, QColor(Qt::black), 0.05); - } else { - startColor = mixColor(highlight, QColor(Qt::white), 0.05); - endColor = mixColor(highlight, QColor(Qt::black), 0.2); - } - upLinearGradient.setColorAt(0, startColor); - upLinearGradient.setColorAt(1, endColor); - upFocusHoverBrush = QBrush(upLinearGradient); - - //up click - upClickBrush = QBrush(mixColor(highlight, mix, 0.1)); - - - QLinearGradient downLinearGradient; - downLinearGradient.setStart(option->rect.left(), option->rect.center().y()); - downLinearGradient.setFinalStop(option->rect.left(), option->rect.bottom()); - //down hover - if (isDark) { - startColor = mixColor(button, QColor(Qt::white), 0.2); - endColor = mixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = mixColor(button, QColor(Qt::black), 0.05); - endColor = mixColor(button, QColor(Qt::black), 0.2); - } - downLinearGradient.setColorAt(0, startColor); - downLinearGradient.setColorAt(1, endColor); - downHoverBrush = QBrush(downLinearGradient); - - //down focus hover - if (isDark) { - startColor = mixColor(highlight, QColor(Qt::white), 0.2); - endColor = mixColor(highlight, QColor(Qt::black), 0.05); - } else { - startColor = mixColor(highlight, QColor(Qt::white), 0.05); - endColor = mixColor(highlight, QColor(Qt::black), 0.2); - } - downLinearGradient.setColorAt(0, startColor); - downLinearGradient.setColorAt(1, endColor); - downFocusHoverBrush = QBrush(downLinearGradient); - - //down click - downClickBrush = QBrush(mixColor(highlight, mix, 0.1)); - - - - spinBoxParameters.spinBoxDefaultBrush = defaultBrush; - spinBoxParameters.spinBoxHoverBrush = hoverBrush; - spinBoxParameters.spinBoxFocusBrush = focusBrush; - spinBoxParameters.spinBoxDisableBrush = disableBrush; - - spinBoxParameters.spinBoxDefaultPen = defaultPen; - spinBoxParameters.spinBoxHoverPen = hoverPen; - spinBoxParameters.spinBoxFocusPen = focusPen; - spinBoxParameters.spinBoxDisablePen = disablePen; - - spinBoxParameters.spinBoxUpDefaultBrush = upDefaultBrush; - spinBoxParameters.spinBoxUpHoverBrush = upHoverBrush; - spinBoxParameters.spinBoxUpFocusHoverBrush = upFocusHoverBrush; - spinBoxParameters.spinBoxUpClickBrush = upClickBrush; - spinBoxParameters.spinBoxDownHoverBrush = downHoverBrush; - spinBoxParameters.spinBoxDownFocusHoverBrush = downFocusHoverBrush; - spinBoxParameters.spinBoxDownClickBrush = downClickBrush; - spinBoxParameters.spinBoxDownDefaultBrush = downDefaultBrush; -} - -void KFashionStyleParameters::initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - comboBoxParameters.radius = 6; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush onBrush; - QBrush editBrush; - QBrush disableBrush; - - QPen defaultPen; - QPen hoverPen; - QPen onPen; - QPen editPen; - QPen disablePen; - - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - //default state - defaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - defaultPen = QPen(Qt::NoPen); - defaultPen.setWidth(0); - - //hover state - if (isDark) { - hoverBrush = QBrush(mixColor(button, mix, 0.2)); - } else { - hoverBrush = QBrush(mixColor(button, mix, 0.05)); - } - hoverPen = QPen(Qt::NoPen); - hoverPen.setWidth(0); - - //on state - if (isDark) { - onBrush = QBrush(mixColor(button, mix, 0.05)); - } else { - onBrush = QBrush(mixColor(button, mix, 0.2)); - } - onPen = QPen(Qt::NoPen); - onPen.setWidth(0); - - //focus and on state,edit mode - editBrush = option->palette.brush(QPalette::Active, QPalette::Base); - editPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), - 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //disable state - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - disablePen = QPen(Qt::NoPen); - disablePen.setWidth(0); - - - comboBoxParameters.comboBoxDefaultBrush = defaultBrush; - comboBoxParameters.comboBoxHoverBrush = hoverBrush; - comboBoxParameters.comboBoxOnBrush = onBrush; - comboBoxParameters.comboBoxEditBrush = editBrush; - comboBoxParameters.comboBoxDisableBrush = disableBrush; - - comboBoxParameters.comboBoxDefaultPen = defaultPen; - comboBoxParameters.comboBoxHoverPen = hoverPen; - comboBoxParameters.comboBoxOnPen = onPen; - comboBoxParameters.comboBoxEditPen = editPen; - comboBoxParameters.comboBoxDisablePen = disablePen; -} - -void KFashionStyleParameters::initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - listParameters.radius = 6; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush selectBrush; - QBrush disableBrush; - QPen textHoverPen = QPen(Qt::NoPen); - QPen textSelectPen = QPen(Qt::NoPen); - bool needTranslucent = false; - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - //default - defaultBrush = QBrush(Qt::transparent); - - //hover - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - if (isDark) { - startColor = mixColor(button, QColor(Qt::white), 0.2); - endColor = mixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = mixColor(button, QColor(Qt::black), 0.05); - endColor = mixColor(button, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - //select - selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); - - //disable - disableBrush = QBrush(Qt::transparent); - - const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option); - QPalette::ColorGroup cg = vi->state & QStyle::State_Enabled - ? QPalette::Normal : QPalette::Disabled; - if (cg == QPalette::Normal && !(vi->state & QStyle::State_Active)) - cg = QPalette::Inactive; - - if(needTranslucent) - { - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Light); - endColor = option->palette.color(QPalette::Active, QPalette::Text); - startColor.setAlphaF(0.15); - endColor.setAlphaF(0.15); - } else { - startColor = option->palette.color(QPalette::Active, QPalette::Mid); - endColor = option->palette.color(QPalette::Active, QPalette::Dark); - startColor.setAlphaF(0.1); - endColor.setAlphaF(0.1); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - QColor selectColor = option->palette.color(QPalette::Active, QPalette::Dark); - if(isDark) - selectColor = option->palette.color(QPalette::Active, QPalette::Light); - selectColor.setAlphaF(isDark ? 0.20 : 0.25); - selectBrush.setColor(selectColor); - - textSelectPen = option->palette.color(cg, QPalette::Text); - textHoverPen = option->palette.color(cg, QPalette::BrightText); - } - else - { - textSelectPen = option->palette.color(cg, QPalette::HighlightedText); - textHoverPen = option->palette.color(cg, QPalette::Text); - } - - listParameters.listDefaultBrush = defaultBrush; - listParameters.listHoverBrush = hoverBrush; - listParameters.listSelectBrush = selectBrush; - listParameters.listDisableBrush = disableBrush; - listParameters.listTextHoverPen = textHoverPen; - listParameters.listTextSelectPen = textSelectPen; -} - -void KFashionStyleParameters::initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - treeParameters.radius = 6; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush selectBrush; - QBrush disableBrush; - - QBrush branchDefaultBrush; - QBrush branchHoverBrush; - QBrush branchSelectBrush; - QBrush branchDisableBrush; - - - //default - defaultBrush = QBrush(Qt::transparent); - branchDefaultBrush = defaultBrush; - - //hover - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - if (isDark) { - startColor = mixColor(button, QColor(Qt::white), 0.2); - endColor = mixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = mixColor(button, QColor(Qt::black), 0.05); - endColor = mixColor(button, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - branchHoverBrush = hoverBrush; - - //select - selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); - branchSelectBrush = selectBrush; - - //disable - disableBrush = QBrush(Qt::transparent); - branchDisableBrush = disableBrush; - - - treeParameters.treeDefaultBrush = defaultBrush; - treeParameters.treeHoverBrush = hoverBrush; - treeParameters.treeSelectBrush = selectBrush; - treeParameters.treeDisableBrush = disableBrush; - - treeParameters.treeBranchDefaultBrush = branchDefaultBrush; - treeParameters.treeBranchHoverBrush = branchHoverBrush; - treeParameters.treeBranchSelectBrush = branchSelectBrush; - treeParameters.treeBranchDisableBrush = branchDisableBrush; -} - -void KFashionStyleParameters::initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - tableParameters.radius = 0; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush selectBrush; - QBrush disableBrush; - - - //default - defaultBrush = QBrush(Qt::transparent); - - //hover - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - if (isDark) { - startColor = mixColor(button, QColor(Qt::white), 0.2); - endColor = mixColor(button, QColor(Qt::white), 0.05); - } else { - startColor = mixColor(button, QColor(Qt::black), 0.05); - endColor = mixColor(button, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - - //select - selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); - - //disable - disableBrush = QBrush(Qt::transparent); - - - tableParameters.tableDefaultBrush = defaultBrush; - tableParameters.tableHoverBrush = hoverBrush; - tableParameters.tableSelectBrush = selectBrush; - tableParameters.tableDisableBrush = disableBrush; -} - -void KFashionStyleParameters::initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - checkBoxParameters.radius = 4; - - QPen defaultPen; - QPen hoverPen; - QPen clickPen; - QPen disablePen; - QPen onDefaultPen; - QPen onHoverPen; - QPen onClickPen; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush clickBrush; - QBrush disableBrush; - QBrush onDefaultBrush; - QBrush onHoverBrush; - QBrush onClickBrush; - - bool needTranslucent = false; - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - //default - if (isDark) { - QColor col = option->palette.color(QPalette::Active, QPalette::BrightText); - col.setAlphaF(0.15); - defaultPen = QPen(col, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { - defaultPen = QPen(option->palette.brush(QPalette::Disabled, QPalette::ButtonText), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - defaultBrush = QBrush(option->palette.color(QPalette::Active, QPalette::Base).lighter(200)); - - //hover - hoverPen = defaultPen; - if (isDark) { - hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); - } else { - hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.05)); - } - - //click - clickPen = defaultPen; - if (isDark) { - clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.1)); - } else { - clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); - } - - if(needTranslucent) - { - QColor defaultColor = option->palette.color(QPalette::Active, QPalette::Mid); - if(isDark) - defaultColor = option->palette.color(QPalette::Active, QPalette::Text); - defaultColor.setAlphaF(isDark ? 0.15 : 0.20); - defaultBrush.setColor(defaultColor); - QColor defaultPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - defaultPenColor.setAlphaF(0.3); - defaultPen = QPen(QBrush(defaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - if (isDark) { - startColor = option->palette.color(QPalette::Active, QPalette::Light); - endColor = option->palette.color(QPalette::Active, QPalette::Text); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } else { - startColor = option->palette.color(QPalette::Active, QPalette::Mid); - endColor = option->palette.color(QPalette::Active, QPalette::Dark); - startColor.setAlphaF(0.2); - endColor.setAlphaF(0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - hoverBrush = QBrush(linearGradient); - hoverPen = defaultPen; - - - QColor clickColor = option->palette.color(QPalette::Active, QPalette::Dark); - if(isDark) - clickColor = option->palette.color(QPalette::Active, QPalette::Light); - clickColor.setAlphaF(0.30); - clickBrush.setColor(clickColor); - clickPen = defaultPen; - } - - //disable - disablePen = defaultPen; - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - - //on default - onDefaultPen = QPen(Qt::NoPen); - onDefaultPen.setWidth(0); - onDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); - if(needTranslucent) - { - QColor onDefaultPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - onDefaultPenColor.setAlphaF(0.1); - onDefaultPen = QPen(QBrush(onDefaultPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - - //on hover - onHoverPen = QPen(Qt::NoPen); - onHoverPen.setWidth(0); - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - if (isDark) { - startColor = mixColor(onDefaultBrush.color(), QColor(Qt::white), 0.2); - endColor = mixColor(onDefaultBrush.color(), QColor(Qt::black), 0.05); - } else { - startColor = mixColor(onDefaultBrush.color(), QColor(Qt::white), 0.05); - endColor = mixColor(onDefaultBrush.color(), QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - onHoverBrush = QBrush(linearGradient); - if(needTranslucent) - { - QColor onHoverPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - onHoverPenColor.setAlphaF(0.2); - onHoverPen = QPen(QBrush(onHoverPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - - //on click - onClickPen = QPen(Qt::NoPen); - onClickPen.setWidth(0); - onClickBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.1)); - if(needTranslucent) - { - QColor onClickPenColor = option->palette.color(QPalette::Active, QPalette::BrightText); - onClickPenColor.setAlphaF(0.2); - onClickPen = QPen(QBrush(onClickPenColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - - checkBoxParameters.checkBoxDefaultPen = defaultPen; - checkBoxParameters.checkBoxHoverPen = hoverPen; - checkBoxParameters.checkBoxClickPen = clickPen; - checkBoxParameters.checkBoxDisablePen = disablePen; - checkBoxParameters.checkBoxOnDefaultPen = onDefaultPen; - checkBoxParameters.checkBoxOnHoverPen = onHoverPen; - checkBoxParameters.checkBoxOnClickPen = onClickPen; - - checkBoxParameters.checkBoxDefaultBrush = defaultBrush; - checkBoxParameters.checkBoxHoverBrush = hoverBrush; - checkBoxParameters.checkBoxClickBrush = clickBrush; - checkBoxParameters.checkBoxDisableBrush = disableBrush; - checkBoxParameters.checkBoxOnDefaultBrush = onDefaultBrush; - checkBoxParameters.checkBoxOnHoverBrush = onHoverBrush; - checkBoxParameters.checkBoxOnClickBrush = onClickBrush; -} - -void KFashionStyleParameters::initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - radioButtonParameters.radius = 6; - - QPen defaultPen; - QPen hoverPen; - QPen clickPen; - QPen disablePen; - QPen onDefaultPen; - QPen onHoverPen; - QPen onClickPen; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush clickBrush; - QBrush disableBrush; - QBrush onDefaultBrush; - QBrush onHoverBrush; - QBrush onClickBrush; - - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - //default - if (isDark) { - QColor col = option->palette.color(QPalette::Active, QPalette::BrightText); - col.setAlphaF(0.15); - defaultPen = QPen(col, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { - defaultPen = QPen(option->palette.brush(QPalette::Disabled, QPalette::ButtonText), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - defaultBrush = QBrush(option->palette.color(QPalette::Active, QPalette::Base).lighter(200)); - - //hover - hoverPen = defaultPen; - if (isDark) { - hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); - } else { - hoverBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.05)); - } - - //click - clickPen = defaultPen; - if (isDark) { - clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.1)); - } else { - clickBrush = QBrush(mixColor(defaultBrush.color(), mix, 0.15)); - } - - //disable - disablePen = defaultPen; - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - - //on default - onDefaultPen = QPen(Qt::NoPen); - onDefaultPen.setWidth(0); - onDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); - - //on hover - onHoverPen = QPen(Qt::NoPen); - onHoverPen.setWidth(0); - if (isDark) { - onHoverBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.2)); - } else { - onHoverBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.05)); - } - - //on click - onClickPen = QPen(Qt::NoPen); - onClickPen.setWidth(0); - if (isDark) { - onClickBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.05)); - } else { - onClickBrush = QBrush(mixColor(onDefaultBrush.color(), mix, 0.2)); - } - - - //if set property - if (widget) { - if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { - defaultPen = widget->property("setDefaultPen").value<QPen>(); - } - if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { - hoverPen = widget->property("setHoverPen").value<QPen>(); - } - if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { - clickPen = widget->property("setClickPen").value<QPen>(); - } - if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { - disablePen = widget->property("setDisablePen").value<QPen>(); - } - if (widget->property("setOnDefaultPen").isValid() && widget->property("setOnDefaultPen").canConvert<QPen>()) { - onDefaultPen = widget->property("setOnDefaultPen").value<QPen>(); - } - if (widget->property("setOnHoverPen").isValid() && widget->property("setOnHoverPen").canConvert<QPen>()) { - onHoverPen = widget->property("setOnHoverPen").value<QPen>(); - } - if (widget->property("setOnClickPen").isValid() && widget->property("setOnClickPen").canConvert<QPen>()) { - onClickPen = widget->property("setOnClickPen").value<QPen>(); - } - if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { - defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); - } - if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { - hoverBrush = widget->property("setHoverBrush").value<QBrush>(); - } - if (widget->property("setClickBrush").isValid() && widget->property("setClickBrush").canConvert<QBrush>()) { - clickBrush = widget->property("setClickBrush").value<QBrush>(); - } - if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { - disableBrush = widget->property("setDisableBrush").value<QBrush>(); - } - if (widget->property("setOnDefaultBrush").isValid() && widget->property("setOnDefaultBrush").canConvert<QBrush>()) { - onDefaultBrush = widget->property("setOnDefaultBrush").value<QBrush>(); - } - if (widget->property("setOnHoverBrush").isValid() && widget->property("setOnHoverBrush").canConvert<QBrush>()) { - onHoverBrush = widget->property("setOnHoverBrush").value<QBrush>(); - } - if (widget->property("setOnClickBrush").isValid() && widget->property("setOnClickBrush").canConvert<QBrush>()) { - onClickBrush = widget->property("setOnClickBrush").value<QBrush>(); - } - } - - - radioButtonParameters.radioButtonDefaultPen = defaultPen; - radioButtonParameters.radioButtonHoverPen = hoverPen; - radioButtonParameters.radioButtonClickPen = clickPen; - radioButtonParameters.radioButtonDisablePen = disablePen; - radioButtonParameters.radioButtonOnDefaultPen = onDefaultPen; - radioButtonParameters.radioButtonOnHoverPen = onHoverPen; - radioButtonParameters.radioButtonOnClickPen = onClickPen; - - radioButtonParameters.radioButtonDefaultBrush = defaultBrush; - radioButtonParameters.radioButtonHoverBrush = hoverBrush; - radioButtonParameters.radioButtonClickBrush = clickBrush; - radioButtonParameters.radioButtonDisableBrush = disableBrush; - radioButtonParameters.radioButtonOnDefaultBrush = onDefaultBrush; - radioButtonParameters.radioButtonOnHoverBrush = onHoverBrush; - radioButtonParameters.radioButtonOnClickBrush = onClickBrush; -} - -void KFashionStyleParameters::initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - QBrush handleDefaultBrush; - QBrush handleHoverBrush; - QBrush handleClickBrush; - QBrush handleDisableBrush; - - QBrush grooveValueDefaultBrush; - QBrush grooveValueHoverBrush; - QBrush grooveValueDisableBrush; - QBrush grooveUnvalueDefaultBrush; - QBrush grooveUnvalueHoverBrush; - QBrush grooveUnvalueDisableBrush; - - bool needTranslucent = false; - - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option); - - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - //handle default - handleDefaultBrush = option->palette.color(QPalette::Active, QPalette::Highlight); - - //handle hover - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - if (slider->orientation == Qt::Vertical) { - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.topRight()); - } else { - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - } - - if (isDark) { - startColor = mixColor(highlight, QColor(Qt::white), 0.2); - endColor = mixColor(highlight, QColor(Qt::black), 0.05); - } else { - startColor = mixColor(highlight, QColor(Qt::white), 0.05); - endColor = mixColor(highlight, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - handleHoverBrush = QBrush(linearGradient); - - //handle click - handleClickBrush = QBrush(mixColor(highlight, mix, 0.1)); - - //handle disable - handleDisableBrush = option->palette.color(QPalette::Disabled, QPalette::ButtonText); - - //groove value default - if (isDark) { - grooveValueDefaultBrush = QBrush(mixColor(highlight, mix, 0.05)); - } else { - grooveValueDefaultBrush = QBrush(mixColor(highlight, mix, 0.2)); - } - - //groove value hover - grooveValueHoverBrush = grooveValueDefaultBrush; - - //groove value disable - grooveValueDisableBrush = handleDisableBrush; - - //groove unvalue default - grooveUnvalueDefaultBrush = option->palette.color(QPalette::Active, QPalette::Button); - if(needTranslucent) - { - QColor color = option->palette.color(QPalette::Active, QPalette::BrightText); - color.setAlphaF(0.1); - grooveUnvalueDefaultBrush.setColor(color); - } - - //groove unvalue hover - grooveUnvalueHoverBrush = grooveUnvalueDefaultBrush; - - //groove unvalue disable - grooveUnvalueDisableBrush = grooveUnvalueDefaultBrush; - - - sliderParameters.sliderHandleDefaultBrush = handleDefaultBrush; - sliderParameters.sliderHandleHoverBrush = handleHoverBrush; - sliderParameters.sliderHandleClickBrush = handleClickBrush; - sliderParameters.sliderHandleDisableBrush = handleDisableBrush; - - sliderParameters.sliderGrooveValueDefaultBrush = grooveValueDefaultBrush; - sliderParameters.sliderGrooveValueHoverBrush = grooveValueHoverBrush; - sliderParameters.sliderGrooveValueDisableBrush = grooveValueDisableBrush; - - sliderParameters.sliderGrooveUnvalueDefaultBrush = grooveUnvalueDefaultBrush; - sliderParameters.sliderGrooveUnvalueHoverBrush = grooveUnvalueHoverBrush; - sliderParameters.sliderGrooveUnvalueDisableBrush = grooveUnvalueDisableBrush; -} - -void KFashionStyleParameters::initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - QBrush contentBrush; - QBrush grooveDefaultBrush; - QBrush grooveDisableBrush; - - bool needTranslucent = false; - - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option); - const bool vertical = pb->orientation == Qt::Vertical; - const bool inverted = pb->invertedAppearance; - - bool reverse = (!vertical && (pb->direction == Qt::RightToLeft)) || vertical; - if (inverted) - reverse = !reverse; - - //content - QColor startColor = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor endColor = option->palette.color(QPalette::Active, QPalette::Highlight).lighter(120); - QLinearGradient linearGradient; - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - if (vertical) { - if (reverse) { - linearGradient.setStart(pb->rect.bottomLeft()); - linearGradient.setFinalStop(pb->rect.topLeft()); - } else { - linearGradient.setStart(pb->rect.topLeft()); - linearGradient.setFinalStop(pb->rect.bottomLeft()); - } - } else { - if (reverse) { - linearGradient.setStart(pb->rect.topRight()); - linearGradient.setFinalStop(pb->rect.topLeft()); - } else { - linearGradient.setStart(pb->rect.topLeft()); - linearGradient.setFinalStop(pb->rect.topRight()); - } - } - contentBrush = QBrush(linearGradient); - - //groove default - grooveDefaultBrush = pb->palette.brush(QPalette::Active, QPalette::Button); - if(needTranslucent) - { - QColor grooveDefaultColor = pb->palette.color(QPalette::Active, QPalette::BrightText); - grooveDefaultColor.setAlphaF(0.1); - grooveDefaultBrush.setColor(grooveDefaultColor); - } - - //groove disable - grooveDisableBrush = pb->palette.brush(QPalette::Disabled, QPalette::Button); - - - progressBarParameters.radius = 6; - progressBarParameters.progressBarContentBrush = contentBrush; - progressBarParameters.progressBarGrooveDefaultBrush = grooveDefaultBrush; - progressBarParameters.progressBarGrooveDisableBrush = grooveDisableBrush; -} - -void KFashionStyleParameters::initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int sliderRadius; - QBrush grooveDefaultBrush; - QBrush grooveInactiveBrush; - QBrush sliderDefaultBrush; - QBrush sliderHoverBrush; - QBrush sliderClickBrush; - QBrush sliderDisableBrush; - - bool needTranslucent = false; - - if (widget && widget->property("needTranslucent").isValid()) { - needTranslucent = widget->property("needTranslucent").toBool(); - } - - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option); - - //radius - if (bar->orientation == Qt::Horizontal) { - sliderRadius = (bar->rect.height()) / 4; - } else { - sliderRadius = (bar->rect.width()) / 4; - } - - //groove default - grooveDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Base); - - //groove inactive - grooveInactiveBrush = option->palette.brush(QPalette::Inactive, QPalette::Base); - - //slider default - sliderDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - - //slider hover - QColor startColor; - QColor endColor; - QLinearGradient linearGradient; - if (bar->orientation == Qt::Horizontal) { - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.bottomLeft()); - } else { - linearGradient.setStart(option->rect.topLeft()); - linearGradient.setFinalStop(option->rect.topRight()); - } - QColor color = option->palette.color(QPalette::Active, QPalette::Button); - if (isDark) { - startColor = mixColor(color, QColor(Qt::white), 0.2); - endColor = mixColor(color, QColor(Qt::white), 0.05); - } else { - startColor = mixColor(color, QColor(Qt::black), 0.05); - endColor = mixColor(color, QColor(Qt::black), 0.2); - } - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - sliderHoverBrush = QBrush(linearGradient); - - //slider click - sliderClickBrush = QBrush(mixColor(sliderDefaultBrush.color(), mix, 0.2)); - - //slider disable - sliderDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - - - if(needTranslucent) - { - QColor grooveDefaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); - grooveDefaultColor.setAlphaF(0.05); - grooveDefaultBrush = QBrush(grooveDefaultColor); - - QColor grooveInactiveColor = option->palette.color(QPalette::Active, QPalette::BrightText); - grooveInactiveColor.setAlphaF(0.05); - grooveInactiveBrush = QBrush(grooveInactiveColor); - - QColor sliderDefaultColor = option->palette.color(QPalette::Active, QPalette::BrightText); - sliderDefaultColor.setAlphaF(0.10); - sliderDefaultBrush = QBrush(sliderDefaultColor); - - QColor sliderHoverColor = option->palette.color(QPalette::Active, QPalette::BrightText); - sliderHoverColor.setAlphaF(0.2); - sliderHoverBrush = QBrush(sliderHoverColor); - - QColor sliderClickColor = option->palette.color(QPalette::Active, QPalette::BrightText); - sliderClickColor.setAlphaF(0.3); - sliderClickBrush = QBrush(sliderClickColor); - } - - - scrollBarParameters.radius = sliderRadius; - scrollBarParameters.scrollBarGrooveDefaultBrush = grooveDefaultBrush; - scrollBarParameters.scrollBarGrooveInactiveBrush = grooveInactiveBrush; - scrollBarParameters.scrollBarSliderDefaultBrush = sliderDefaultBrush; - scrollBarParameters.scrollBarSliderHoverBrush = sliderHoverBrush; - scrollBarParameters.scrollBarSliderClickBrush = sliderClickBrush; - scrollBarParameters.scrollBarSliderDisableBrush = sliderDisableBrush; -} - -void KFashionStyleParameters::initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - QBrush backgroundBrush; - - //background - backgroundBrush = option->palette.color(QPalette::Active, QPalette::ToolTipBase); - - - toolTipParameters.radius = 6; - toolTipParameters.toolTipBackgroundBrush = backgroundBrush; -} - -void KFashionStyleParameters::initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int tabradius = 6; - QBrush widgetBackgroundBrush; - QBrush tabBarBackgroundBrush; - QBrush tabBarDefaultBrush; - QBrush tabBarHoverBrush; - QBrush tabBarSelectBrush; - - //tab widget background - widgetBackgroundBrush = option->palette.brush(QPalette::Active, QPalette::Base); - - //tabbar background - tabBarBackgroundBrush = option->palette.brush(QPalette::Active, QPalette::Window); - - //tabbar default - tabBarDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Window); - - //tabbar hover - QColor hover_color = option->palette.color(QPalette::Active, QPalette::Window); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - tabBarHoverBrush = QBrush(mixColor(hover_color, mix, 0.1)); - - //tabbar select - tabBarSelectBrush = option->palette.brush(QPalette::Active, QPalette::Base); - - - if (widget && widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - tabradius = widget->property("setRadius").value<int>(); - } - - - tabWidgetParameters.radius = tabradius; - tabWidgetParameters.tabWidgetBackgroundBrush = widgetBackgroundBrush; - tabWidgetParameters.tabBarBackgroundBrush = tabBarBackgroundBrush; - tabWidgetParameters.tabBarDefaultBrush = tabBarDefaultBrush; - tabWidgetParameters.tabBarHoverBrush = tabBarHoverBrush; - tabWidgetParameters.tabBarSelectBrush = tabBarSelectBrush; -} - -void KFashionStyleParameters::initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int frameradius = 8; - int itemradius = 6; - QPixmap framePixmap(option->rect.size()); - QBrush itemSelectBrush; - - //frame Pixmap - framePixmap.fill(Qt::transparent); - QRect drawRect; - if (qobject_cast<const QFrame*>(widget)) { - //path has 1px blank on right and bottom - drawRect = option->rect.adjusted(0, 0, 1, 1); - - QPainterPath drawRectPath; - drawRectPath.moveTo(drawRect.left(), drawRect.top() + frameradius); - drawRectPath.arcTo(QRect(drawRect.left(), drawRect.top(), 2 * frameradius, 2 * frameradius), 180, -90); - drawRectPath.lineTo(drawRect.right() - frameradius, drawRect.top()); - drawRectPath.arcTo(QRect(drawRect.right() - 2 * frameradius, drawRect.top(), 2 * frameradius, 2 * frameradius), 90, -90); - drawRectPath.lineTo(drawRect.right(), drawRect.bottom() - 28); - drawRectPath.arcTo(QRect(drawRect.right() - 2 * 20, drawRect.bottom() - 2 * 28, 2 * 20, 2 * 28), 0, -90); - drawRectPath.lineTo(drawRect.left() + frameradius, drawRect.bottom()); - drawRectPath.arcTo(QRect(drawRect.left(), drawRect.bottom() - 2 * frameradius, 2 * frameradius, 2 * frameradius), -90, -90); - drawRectPath.lineTo(drawRect.left(), drawRect.top() + frameradius); - - QPainter pixmapPainter(&framePixmap); - pixmapPainter.setPen(Qt::NoPen); - pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::Base).lighter(180)); - pixmapPainter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter.drawPath(drawRectPath); - pixmapPainter.end(); - - QPainterPath drawRightBottomPath; - drawRightBottomPath.moveTo(drawRect.right(), drawRect.bottom() - 28); - drawRightBottomPath.arcTo(QRect(drawRect.right() - 2 * 20, drawRect.bottom() - 2 * 28, 2 * 20, 2 * 28), 0, -90); - drawRightBottomPath.lineTo(drawRect.right() - frameradius, drawRect.bottom()); - drawRightBottomPath.arcTo(QRect(drawRect.right() - 2 * frameradius, drawRect.bottom() - 2 * frameradius, 2 * frameradius, 2 * frameradius), -90, 90); - drawRightBottomPath.lineTo(drawRect.right(), drawRect.bottom() - 28); - - //draw right bottom corner - QColor startColor = option->palette.color(QPalette::Active, QPalette::Base).lighter(300); - QColor endColor = mixColor(startColor, QColor(Qt::black), 0.25); - QLinearGradient linearGradient; - QPainter pixmapPainter2(&framePixmap); - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - linearGradient.setStart(drawRect.right(), drawRect.bottom() - 28); - linearGradient.setFinalStop(drawRect.right(), drawRect.bottom()); - pixmapPainter2.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter2.setPen(Qt::transparent); - pixmapPainter2.setBrush(linearGradient); - pixmapPainter2.drawPath(drawRightBottomPath); - } else { - int rander = 2; - drawRect = option->rect.adjusted(+rander, +rander+6, -rander, -rander-6); - - // Draw a black floor - QPainter pixmapPainter(&framePixmap); - pixmapPainter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter.setPen(Qt::transparent); - pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::BrightText)); - pixmapPainter.drawRoundedRect(drawRect.adjusted(1, 1, -1, -1), frameradius, frameradius); - pixmapPainter.end(); - - // Blur the black background - QImage img = framePixmap.toImage(); - qt_blurImage(img, 4, false, false); - - // Dig out the center part, Shadow rendering - framePixmap = QPixmap::fromImage(img); - QPainter pixmapPainter2(&framePixmap); - pixmapPainter2.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter2.setCompositionMode(QPainter::CompositionMode_Clear); - pixmapPainter2.setPen(Qt::transparent); - pixmapPainter2.setBrush(Qt::transparent); - pixmapPainter2.drawRoundedRect(drawRect.adjusted(1, 1, -1, -1), frameradius, frameradius); - pixmapPainter2.end(); - - //That's when I started drawing the frame floor - QColor color = option->palette.color(QPalette::Base); - QColor startColor; - QColor endColor; - if (isDark) { - endColor = option->palette.color(QPalette::Active, QPalette::Base).lighter(300); - startColor = mixColor(endColor, QColor(Qt::white), 0.2); - } else { - startColor = option->palette.color(QPalette::Active, QPalette::Base).lighter(300); - endColor = mixColor(startColor, QColor(Qt::black), 0.2); - } - - if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { - auto opacity = UKUIStyleSettings::globalInstance()->get("menuTransparency").toInt()/100.0; - color.setAlphaF(opacity); - startColor.setAlphaF(opacity); - endColor.setAlphaF(opacity); - } - if (qApp->property("blurEnable").isValid()) { - bool blurEnable = qApp->property("blurEnable").toBool(); - if (!blurEnable) { - color.setAlphaF(1); - startColor.setAlphaF(1); - endColor.setAlphaF(1); - } - } - if (widget) { - if (widget->property("useSystemStyleBlur").isValid() && !widget->property("useSystemStyleBlur").toBool()) { - color.setAlphaF(1); - startColor.setAlphaF(1); - endColor.setAlphaF(1); - } - } - //if blur effect is not supported, do not use transparent color. - if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind) || blackAppListWithBlurHelper().contains(qAppName())) { - color.setAlphaF(1); - startColor.setAlphaF(1); - endColor.setAlphaF(1); - } - - QRegion region; - if (widget) { - region = widget->mask(); - } - - if (!region.isEmpty()) { - QPainterPath path; - path.addRegion(region); - - //draw blur background - QPainter pixmapPainter3(&framePixmap); - pixmapPainter3.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter3.setPen(Qt::transparent); - pixmapPainter3.setBrush(color); - pixmapPainter3.drawPath(path); - } else { - //path has 1px blank on right and bottom - drawRect.adjust(0, 0, 1, 1); - - QPainterPath drawRectPath; - drawRectPath.moveTo(drawRect.left(), drawRect.top() + frameradius); - drawRectPath.arcTo(QRect(drawRect.left(), drawRect.top(), 2 * frameradius, 2 * frameradius), 180, -90); - drawRectPath.lineTo(drawRect.right() - frameradius, drawRect.top()); - drawRectPath.arcTo(QRect(drawRect.right() - 2 * frameradius, drawRect.top(), 2 * frameradius, 2 * frameradius), 90, -90); - drawRectPath.lineTo(drawRect.right(), drawRect.bottom() - 28); - drawRectPath.arcTo(QRect(drawRect.right() - 2 * 20, drawRect.bottom() - 2 * 28, 2 * 20, 2 * 28), 0, -90); - drawRectPath.lineTo(drawRect.left() + frameradius, drawRect.bottom()); - drawRectPath.arcTo(QRect(drawRect.left(), drawRect.bottom() - 2 * frameradius, 2 * frameradius, 2 * frameradius), -90, -90); - drawRectPath.lineTo(drawRect.left(), drawRect.top() + frameradius); - - //draw blur background - QPainter pixmapPainter3(&framePixmap); - pixmapPainter3.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter3.setPen(Qt::transparent); - pixmapPainter3.setBrush(color); - pixmapPainter3.drawPath(drawRectPath); - pixmapPainter3.end(); - - QPainterPath drawRightBottomPath; - drawRightBottomPath.moveTo(drawRect.right(), drawRect.bottom() - 28); - drawRightBottomPath.arcTo(QRect(drawRect.right() - 2 * 20, drawRect.bottom() - 2 * 28, 2 * 20, 2 * 28), 0, -90); - drawRightBottomPath.lineTo(drawRect.right() - frameradius, drawRect.bottom()); - drawRightBottomPath.arcTo(QRect(drawRect.right() - 2 * frameradius, drawRect.bottom() - 2 * frameradius, 2 * frameradius, 2 * frameradius), -90, 90); - drawRightBottomPath.lineTo(drawRect.right(), drawRect.bottom() - 28); - - //draw right bottom corner - QLinearGradient linearGradient; - linearGradient.setColorAt(0, startColor); - linearGradient.setColorAt(1, endColor); - linearGradient.setStart(drawRect.right(), drawRect.bottom() - 28); - linearGradient.setFinalStop(drawRect.right(), drawRect.bottom()); - QPainter pixmapPainter4(&framePixmap); - pixmapPainter4.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter4.setPen(Qt::transparent); - pixmapPainter4.setBrush(linearGradient); - pixmapPainter4.drawPath(drawRightBottomPath); - } - } - - //item select brush - itemSelectBrush = QBrush(option->palette.brush(QPalette::Active, QPalette::Highlight)); - - - menuParameters.frameRadius = frameradius; - menuParameters.itemRadius = itemradius; - menuParameters.menuFramePixmap = framePixmap; - menuParameters.menuItemSelectBrush = itemSelectBrush; -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/kabstract-style-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/kabstract-style-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/kabstract-style-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/kabstract-style-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,311 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Lei Chen <leichen@kylinos.cn> - * - */ - -#ifndef KABSTRACTSTYLEPARAMETERS_H -#define KABSTRACTSTYLEPARAMETERS_H - -#include <QObject> -#include <QPalette> -#include <QStyleOption> - -#include "pushbutton-parameters.h" -#include "toolbutton-parameters.h" -#include "lineedit-parameters.h" -#include "spinbox-parameters.h" -#include "combobox-parameters.h" -#include "list-parameters.h" -#include "tree-parameters.h" -#include "table-parameters.h" -#include "checkbox-parameters.h" -#include "radiobutton-parameters.h" -#include "slider-parameters.h" -#include "progressbar-parameters.h" -#include "scrollbar-parameters.h" -#include "tooltip-parameters.h" -#include "tabwidget-parameters.h" -#include "menu-parameters.h" - - - -class KAbstractStyleParameters: public QObject -{ - Q_OBJECT -public: - KAbstractStyleParameters(QObject *parent, bool isDark); - - enum SpinBoxControlLayout { - Horizontal, - Vertical - }; - Q_ENUM(SpinBoxControlLayout) - - void updateParameters(bool isTabletMode); - - // radius - int radius = 6; - - // common - int SmallIcon_Size = 16; - int IconButton_Distance = 8; - - // button - int Button_MarginHeight = 0; - int ToolButton_MarginWidth = 8; - int Button_MarginWidth = 8; - int Button_IconSize = 16; - int Button_IndicatorSize = 16; - int Button_DefaultIndicatorSize = 0; - int Button_DefaultWidth = 96; - int Button_DefaultHeight = 36; - int Button_DefaultHeight_origin = 36; - int ToolButton_DefaultWidth = 60; - int IconButton_DefaultWidth = 36; - int IconButton_DefaultWidth_origin = 36; - QColor ColoseButtonColor; - - // menu - int Menu_MarginHeight = 4 + 8; - int Menu_Combobox_Popup_MarginHeight = 4; - int Menu_MarginWidth = 4 + 2; - int Menu_MarginPanelWidth = 0; - - // menu-item - int MenuItem_MarginHeight = 2; - int MenuItem_MarginWidth = 12 + 4; - int MenuItemSeparator_MarginHeight = 4; - int MenuItemSeparator_MarginHeight_origin = 4; - int MenuItemSeparator_MarginWidth = 4; - int MenuItem_DefaultHeight = 36; - int MenuItem_DefaultHeight_origin = 36; - int MenuItem_DefaultWidght = 152; - - // scrollbar - int ScroolBar_Width = 16; - int ScroolBar_Width_origin = 16; - int ScroolBar_Height = 68; - - // progressbar - int ProgressBar_DefaultLength = 388; - int ProgressBar_DefaultThick = 16; - - // slider - int Slider_DefaultLength = 94; - int Slider_DefaultLength_origin = 94; - int Slider_Length = 20; - int Slider_Length_origin = 20; - int Slider_GrooveLength = 4; - int Slider_GrooveLength_origin = 4; - int Slider_Margin = 2; - - // radiobutton - int ExclusiveIndicator_Width = 16; - int ExclusiveIndicator_Height = 16; - int RadioButtonLabel_Spacing = 8; - int RadioButton_DefaultHeight = 36; - int RadioButton_DefaultHeight_origin = 36; - - // checkbox - int Indicator_Width = 16; - int Indicator_Height = 16; - int CheckBox_DefaultHeight = 36; - int CheckBox_DefaultHeight_origin = 36; - int CheckBox_Radius = 4; - - // lineedit - int LineEdit_DefaultWidth = 160; - int LineEdit_DefaultWidth_origin = 160; - int LineEdit_DefaultHeight = 36; - int LineEdit_DefaultHeight_origin = 36; - - // combobox - int ComboBox_DefaultWidth = 160; - int ComboBox_DefaultHeight = 36; - int ComboBox_DefaultHeight_origin = 36; - int ComboBox_DefaultMenuItemHeight = 36; - int ComboBox_DefaultMenuItemHeight_original = 36; - int ComboBox_FrameWidth = 2; - int ComboBox_VMargin = 1; - - // spinbox - int SpinBox_DefaultWidth = 160; - int SpinBox_DefaultHeight = 36; - int SpinBox_DefaultHeight_origin = 36; - int SpinBox_FrameWidth = 2; - - // tabbar - int TabBar_DefaultMinWidth = 168; - int TabBar_DefaultMaxWidth = 248; - int TabBar_DefaultHeight = 40; - int TabBar_DefaultHeight_origin = 40; - int TabBar_ScrollButtonWidth = 16; - int TabBar_ScrollButtonOverlap = 2; - - // tooltip - int ToolTip_DefaultMargin = 8; - int ToolTip_Height = 36; - int ToolTip_Height_origin = 36; - - //viewitem FIX:Separate to list,tree and table after - int ViewItem_DefaultHeight = 36; - int ViewItem_DefaultHeight_origin = 36; - - //table - int Table_HeaderHeight = 36; - int Table_HeaderHeight_origin = 36; - - float m_scaleRatio4_3 = 1.0; - float m_scaleRatio3_2 = 1.0; - float m_scaleRatio2_1 = 1.0; - - int m_headerDefaultSectionSizeVertical = 36; - int m_headerDefaultSectionSizeVertical1_1 = 36; - int m_headerDefaultSectionSizeVertical4_3 = 48; - bool m_isTableMode = false; - bool m_isInitial = true; - - float m_scaleSliderDefaultLength = 1.0; - float m_ScaleComboBoxDefaultLength = 1.0; - float m_ScaleLineEditDefaultLength = 1.0; - float m_scaleTabBarHeight6_5 = 1.0; - - - QPalette defaultPalette; - - PushButtonParameters pushButtonParameters; - ToolButtonParameters toolButtonParameters; - LineEditParameters lineEditParameters; - SpinBoxParameters spinBoxParameters; - ComboBoxParameters comboBoxParameters; - ListParameters listParameters; - TreeParameters treeParameters; - TableParameters tableParameters; - CheckBoxParameters checkBoxParameters; - RadioButtonParameters radioButtonParameters; - SliderParameters sliderParameters; - ProgressBarParameters progressBarParameters; - ScrollBarParameters scrollBarParameters; - ToolTipParameters toolTipParameters; - TabWidgetParameters tabWidgetParameters; - MenuParameters menuParameters; - - - - QPalette setPalette(QPalette &palette); - int getSpinBoxControlLayout(); - - virtual void initPalette(bool isDark) = 0; - virtual void initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) = 0; - virtual void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - -private: - int m_spinBoxControlLayout = SpinBoxControlLayout::Vertical; -}; - - -class KDefaultStyleParameters : public KAbstractStyleParameters -{ -public: - KDefaultStyleParameters(QObject *parent, bool isDark); - - void initPalette(bool isDark) override; - void initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) override; - void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -}; - - -class KClassicalStyleParameters : public KAbstractStyleParameters -{ -public: - KClassicalStyleParameters(QObject *parent, bool isDark); - - void initPalette(bool isDark) override; - void initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) override; - void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -}; - - -class KFashionStyleParameters : public KAbstractStyleParameters -{ -public: - KFashionStyleParameters(QObject *parent, bool isDark); - - void initPalette(bool isDark) override; - void initPushButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initToolButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) override; - void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -}; -#endif // KABSTRACTSTYLEPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-style-ukui.json qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-style-ukui.json --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-style-ukui.json 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-style-ukui.json 1970-01-01 08:00:00.000000000 +0800 @@ -1,3 +0,0 @@ -{ - "Keys" : [ "ukui-light", "ukui-default", "ukui-dark" ] -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-style-ukui.pri qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-style-ukui.pri --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-style-ukui.pri 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-style-ukui.pri 1970-01-01 08:00:00.000000000 +0800 @@ -1,25 +0,0 @@ -INCLUDEPATH += $$PWD - -include(animations/animations.pri) -include(widget-parameters/widget-parameters.pri) - - -HEADERS += \ - $$PWD/ukui-style-parameters.h \ - $$PWD/qt5-ukui-style.h \ - $$PWD/shadow-helper.h \ - $$PWD/qt5-ukui-style-helper.h \ - $$PWD/breezeboxshadowrenderer.h -# $$PWD/readconfig.h \ -# $$PWD/themeinformation.h - - -SOURCES += \ - $$PWD/ukui-style-parameters.cpp \ - $$PWD/qt5-ukui-style.cpp \ - $$PWD/shadow-helper.cpp \ - $$PWD/view-helper.cpp \ - $$PWD/qt5-ukui-style-helper.cpp \ - $$PWD/breezeboxshadowrenderer.cpp -# $$PWD/readconfig.cpp -DISTFILES += $$PWD/themeconfig/UKUIClassical.json diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-style-ukui.pro qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-style-ukui.pro --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-style-ukui.pro 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-style-ukui.pro 1970-01-01 08:00:00.000000000 +0800 @@ -1,63 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2020-01-03T19:31:51 -# -#------------------------------------------------- - -QT += widgets widgets-private KWindowSystem gui gui-private x11extras dbus KWaylandClient - -TARGET = qt5-style-ukui -TEMPLATE = lib -CONFIG += plugin c++11 link_pkgconfig -PKGCONFIG += gsettings-qt - -include(../../libqt5-ukui-style/libqt5-ukui-style.pri) -include(animations/animations.pri) -include(widget-parameters/widget-parameters.pri) - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which has been marked as deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS -#DEFINES += QT_NO_DEBUG_OUTPUT -DEFINES += QT_MESSAGELOGCONTEXT - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -SOURCES += \ - ukui-style-parameters.cpp \ - #qt5-ukui-style-plugin.cpp \ - qt5-ukui-style.cpp \ - shadow-helper.cpp \ - qt5-ukui-style-helper.cpp \ - view-helper.cpp \ - ../common/blur-helper.cpp \ - ../common/gesture-helper.cpp \ - ../common/window-manager.cpp \ - ../qt5-config-style-ukui/readconfig.cpp \ - ../common/ukui-style-plugin.cpp - -HEADERS += \ - ukui-style-parameters.h \ - #qt5-ukui-style-plugin.h \ - qt5-ukui-style.h \ - shadow-helper.h \ - qt5-ukui-style-helper.h \ - ../common/blur-helper.h \ - ../common/gesture-helper.h \ - ../common/window-manager.h \ - ../qt5-config-style-ukui/readconfig.h \ - ../qt5-config-style-ukui/themeinformation.h \ - ../common/ukui-style-plugin.h - -DISTFILES += ../common/qt5-style-ukui.json \ - themeconfig/UKUIClassical.json - -unix { - target.path = $$[QT_INSTALL_PLUGINS]/styles - INSTALLS += target -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,203 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "qt5-ukui-style-helper.h" - -#include <QPainter> -#include <QStyleOption> -#include <QWidget> -#include <QPainterPath> - - - -static inline qreal mixQreal(qreal a, qreal b, qreal bias) -{ - return a + (b - a) * bias; -} - - - -const QRegion getRoundedRectRegion(const QRect &rect, qreal radius_x, qreal radius_y) -{ - QPainterPath path; - path.addRoundedRect(rect, radius_x, radius_y); - return path.toFillPolygon().toPolygon(); -} - - - -qreal calcRadial(const QStyleOptionSlider *dial, int position) -{ - int currentSliderPosition = position; - if (!dial->upsideDown) { - if (position == dial->minimum) - currentSliderPosition = dial->maximum; - else if (position == dial->maximum) - currentSliderPosition = dial->minimum; - else - currentSliderPosition = dial->maximum - position; - } - qreal a = 0; - if (dial->maximum == dial->minimum) - a = M_PI / 2; - else if (dial->dialWrapping) - a = M_PI * 3 / 2 - (currentSliderPosition - dial->minimum) * 2 * M_PI / (dial->maximum - dial->minimum); - else - a = (M_PI * 8 - (currentSliderPosition - dial->minimum) * 10 * M_PI / (dial->maximum - dial->minimum)) / 6; - return a; -} - - - -QPolygonF calcLines(const QStyleOptionSlider *dial, int offset) -{ - QPolygonF poly(0); - int width = dial->rect.width(); - int height = dial->rect.height(); - qreal r = qMin(width, height) / 2; - - qreal xc = width / 2; - qreal yc = height / 2; - const int ns = dial->tickInterval; - if (!ns) // Invalid values may be set by Qt Designer. - return poly; - int notches = (dial->maximum + ns - 1 - dial->minimum) / ns; - if (notches <= 0) - return poly; - if (dial->maximum < dial->minimum || dial->maximum - dial->minimum > 1000) { - int maximum = dial->minimum + 1000; - notches = (maximum + ns - 1 - dial->minimum) / ns; - } - - poly.resize(2 + 2 * notches); - int smallLineSize = offset / 2; - for (int i = 0; i <= notches; ++i) { - qreal angle = dial->dialWrapping ? M_PI * 3 / 2 - i * 2 * M_PI / notches - : (M_PI * 8 - i * 10 * M_PI / notches) / 6; - qreal s = qSin(angle); - qreal c = qCos(angle); - poly[2 * i] = QPointF(xc + (r + 0.5 - smallLineSize) * c, - yc - (r + 0.5 - smallLineSize) * s); - poly[2 * i + 1] = QPointF(xc + r * c, yc - r * s); - } - return poly; -} - - - -void tabLayout(const QStyleOptionTab *tab, const QWidget *widget, const QStyle *style, QRect *textRect, QRect *iconRect) -{ - Q_ASSERT(textRect); - Q_ASSERT(iconRect); - - QRect rect = tab->rect; - bool verticalTabs = tab->shape == QTabBar::RoundedEast || tab->shape == QTabBar::RoundedWest - || tab->shape == QTabBar::TriangularEast || tab->shape == QTabBar::TriangularWest; - - int iconExtent = style->pixelMetric(QStyle::PM_SmallIconSize); - if (verticalTabs) - rect.setRect(0, 0, rect.height(), rect.width()); - - int hpadding = style->pixelMetric(QStyle::PM_TabBarTabHSpace, tab, widget) / 2; - int vpadding = style->pixelMetric(QStyle::PM_TabBarTabVSpace, tab, widget) / 2; - - rect.adjust(hpadding, vpadding, -hpadding, -vpadding); - // left widget - if (!tab->leftButtonSize.isEmpty()) { - rect.setLeft(rect.left() + 8 + (verticalTabs ? tab->leftButtonSize.height() : tab->leftButtonSize.width())); - } - // right widget - if (!tab->rightButtonSize.isEmpty()) { - rect.setRight(rect.right() - 8 - (verticalTabs ? tab->rightButtonSize.height() : tab->rightButtonSize.width())); - } - // icon - if (!tab->icon.isNull()) { - QSize iconSize = tab->iconSize; - if (!iconSize.isValid()) { - iconSize = QSize(iconExtent, iconExtent); - } - QSize tabIconSize = tab->icon.actualSize(iconSize, - (tab->state & QStyle::State_Enabled) ? QIcon::Normal : QIcon::Disabled, - (tab->state & QStyle::State_Selected) ? QIcon::On : QIcon::Off); - // High-dpi icons do not need adjustment; make sure tabIconSize is not larger than iconSize - tabIconSize = QSize(qMin(tabIconSize.width(), iconSize.width()), qMin(tabIconSize.height(), iconSize.height())); - - *iconRect = QRect(rect.left(), rect.center().y() - tabIconSize.height() / 2, - tabIconSize.width(), tabIconSize.height()); - if (!verticalTabs) - *iconRect = style->visualRect(tab->direction, tab->rect, *iconRect); - rect.setLeft(rect.left() + tabIconSize.width() + 8); - } - if (!verticalTabs) - rect = style->visualRect(tab->direction, tab->rect, rect); - *textRect = rect; -} - - - -QColor mixColor(const QColor &c1, const QColor &c2, qreal bias) -{ - if (bias <= 0.0) { - return c1; - } - if (bias >= 1.0) { - return c2; - } - if (qIsNaN(bias)) { - return c1; - } - - qreal r = mixQreal(c1.redF(), c2.redF(), bias); - qreal g = mixQreal(c1.greenF(), c2.greenF(), bias); - qreal b = mixQreal(c1.blueF(), c2.blueF(), bias); - qreal a = mixQreal(c1.alphaF(), c2.alphaF(), bias); - - return QColor::fromRgbF(r, g, b, a); -} - - - -void drawArrow(const QStyle *style, const QStyleOptionToolButton *toolbutton, - const QRect &rect, QPainter *painter, const QWidget *widget) -{ - QStyle::PrimitiveElement pe; - switch (toolbutton->arrowType) { - case Qt::LeftArrow: - pe = QStyle::PE_IndicatorArrowLeft; - break; - case Qt::RightArrow: - pe = QStyle::PE_IndicatorArrowRight; - break; - case Qt::UpArrow: - pe = QStyle::PE_IndicatorArrowUp; - break; - - case Qt::DownArrow: - pe = QStyle::PE_IndicatorArrowDown; - break; - default: - return; - } - QStyleOption arrowOpt = *toolbutton; - arrowOpt.rect = rect; - style->drawPrimitive(pe, &arrowOpt, painter, widget); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-ukui-style-helper.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,36 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef QT5UKUISTYLEHELPER_H -#define QT5UKUISTYLEHELPER_H - -#include "qt5-ukui-style.h" -#include <QStyleOption> -#include <qmath.h> - -const QRegion getRoundedRectRegion(const QRect &rect, qreal radius_x, qreal radius_y); -qreal calcRadial(const QStyleOptionSlider *dial, int postion); -QPolygonF calcLines(const QStyleOptionSlider *dial, int offset); -void tabLayout(const QStyleOptionTab *tab, const QWidget *widget, const QStyle *style, QRect *textRect, QRect *iconRect); -QColor mixColor(const QColor &c1, const QColor &c2, qreal bias = 0.5); -void drawArrow(const QStyle *style, const QStyleOptionToolButton *toolbutton, const QRect &rect, QPainter *painter, const QWidget *widget = 0); -#endif // QT5UKUISTYLEHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,87 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "qt5-ukui-style-plugin.h" -#include "qt5-ukui-style.h" - -#include "black-list.h" -#include "ukui-style-settings.h" -#include "highlight-effect.h" - -#include <QApplication> -#include <QTimer> - -#include <QDebug> - -Qt5UKUIStylePlugin::Qt5UKUIStylePlugin(QObject *parent) : - QStylePlugin(parent) -{ -// if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { -// auto settings = UKUIStyleSettings::globalInstance(); -// QString inconTheme = settings->get("iconThemeName").toString(); -// if (inconTheme == "ukui-icon-theme-classical" || inconTheme == "ukui-classical") { -// HighLightEffect::setSymoblicColor(QColor(128, 128, 128, 255)); -// } - -// connect(settings, &QGSettings::changed, this, [=](const QString &key){ -// if (key == "iconThemeName") { -// QString inconTheme = settings->get("iconThemeName").toString(); -// if (inconTheme == "ukui-icon-theme-classical" || inconTheme == "ukui-classical") { -// HighLightEffect::setSymoblicColor(QColor(128, 128, 128, 255)); -// } else { -// HighLightEffect::setSymoblicColor(QColor(31, 32, 34, 192)); -// } -// } -// }); -// } -} - -QStyle *Qt5UKUIStylePlugin::create(const QString &key) -{ - if (blackList().contains(qAppName())) - return new Style; - //FIXME: - bool dark = false; - bool useDefault = false; - QString type = "default"; - - if (key == "ukui-light") { - dark = false; - useDefault = false; - } else if (key == "ukui-dark") { - dark = true; - useDefault = false; - } else { - useDefault = true; - } - - return new Qt5UKUIStyle(dark, useDefault); -} - -const QStringList Qt5UKUIStylePlugin::blackList() -{ - return blackAppList(); -} - -#if QT_VERSION < 0x050000 -Q_EXPORT_PLUGIN2(qt5-style-ukui, Qt5UKUIStylePlugin) -#endif // QT_VERSION < 0x050000 diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-ukui-style-plugin.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,52 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef QT5UKUISTYLEPLUGIN_H -#define QT5UKUISTYLEPLUGIN_H - -#include <QStylePlugin> - -#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) -#include<private/qfusionstyle_p.h> -#define Style QFusionStyle -#else -#define Style QProxyStyle -#endif - -class Qt5UKUIStylePlugin : public QStylePlugin -{ - Q_OBJECT -#if QT_VERSION >= 0x050000 - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QStyleFactoryInterface" FILE "qt5-style-ukui.json") -#endif // QT_VERSION >= 0x050000 - -public: - Qt5UKUIStylePlugin(QObject *parent = 0); - - QStyle *create(const QString &key) override; - - const QStringList blackList(); - -private: -}; - -#endif // QT5UKUISTYLEPLUGIN_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,7406 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "qt5-ukui-style.h" - -#include "qt5-ukui-style-helper.h" - -#include "ukui-style-settings.h" -#include "ukui-tabwidget-default-slide-animator.h" - -#include <QStyleOption> -#include <QWidget> -#include <QPainter> -#include <QPainterPath> - -#include <QPaintDevice> - -#include "animations/tab-widget-animation-helper.h" -#include "animations/scrollbar-animation-helper.h" -#include "animations/button-animation-helper.h" -#include "animations/button-animator.h" -#include "animations/box-animation-helper.h" -#include "animations/animator-iface.h" -#include "animations/animation-helper.h" -#include "animations/progressbar-animation-helper.h" -#include "animations/progressbar-animation.h" -#include "animations/radiobutton-animation-helper.h" -#include "animations/checkbox-animation-helper.h" -#include "animations/slider-animation-helper.h" -#include "animations/tree-animation-helper.h" -#include "shadow-helper.h" - - -#include "highlight-effect.h" - -#include "ukui-style-parameters.h" -#include "black-list.h" - -#include "blur-helper.h" -#include "gesture-helper.h" -#include "window-manager.h" -#include "application-style-settings.h" - -#include <QIcon> -#include <QStyleOptionViewItem> -#include <QAbstractItemView> -#include <QScrollBar> -#include <QTreeView> -#include <QListView> -#include <QMenu> -#include <QToolButton> -#include <QtPlatformHeaders/QXcbWindowFunctions> -#include <QComboBox> -#include <QPushButton> -#include <QSpinBox> -#include <QDoubleSpinBox> -#include <QTableView> -#include <QTableWidget> -#include <QTreeView> -#include <QTreeWidget> -#include <QListWidget> -#include <QHeaderView> -#include <QEvent> -#include <QDebug> -#include <QPixmapCache> -#include <QStyleOptionButton> -#include <QStyleOptionMenuItem> -#include <QLabel> -#include <QMessageBox> -#include <QLineEdit> -#include <QApplication> -#include <QToolTip> -#include <QRadioButton> -#include <QCheckBox> -#include <KWindowEffects> -#include <KWindowSystem> -#include <QDialogButtonBox> -#include <QLibrary> -#include <QProxyStyle> -#include <QStyleHints> - -#include <private/qlineedit_p.h> - -#include <QDBusInterface> -#include <QDBusMessage> -#include <QDBusConnection> -#include <QDBusReply> -#include <qdrawutil.h> - -#define DBUS_STATUS_MANAGER_IF "com.kylin.statusmanager.interface" - -#define COMMERCIAL_VERSION true -extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); - -//static QWindow *qt_getWindow(const QWidget *widget) -//{ -// return widget ? widget->window()->windowHandle() : 0; -//} - -#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) -Qt5UKUIStyle::Qt5UKUIStyle(QString name) : QFusionStyle() -#else -Qt5UKUIStyle::Qt5UKUIStyle(bool dark, bool useDefault, QString type) : QProxyStyle("fusion") -#endif -{ - auto settings = UKUIStyleSettings::globalInstance(); - if (settings) { - m_blink_cursor = settings->get("cursorBlink").toBool(); - m_blink_cursor_time = settings->get("cursorBlinkTime").toInt(); - qApp->styleHints()->setCursorFlashTime(m_blink_cursor_time); - - connect(settings, &QGSettings::changed, this, [=](const QString &key) { - if (key == "cursorBlink") { - m_blink_cursor = settings->get("cursorBlink").toBool(); - if (qApp->activeWindow()) { - qApp->activeWindow()->update(); - } - if (qApp->activeModalWidget()) { - qApp->activeModalWidget()->update(); - } - if (qApp->activePopupWidget()) { - qApp->activePopupWidget()->update(); - } - } - if (key == "cursorBlinkTime") { - m_blink_cursor_time = settings->get("cursorBlinkTime").toInt(); - qApp->styleHints()->setCursorFlashTime(m_blink_cursor_time); - } - }); - } else { - qWarning("org.ukui.style is null!"); - } - - m_blur_helper = new BlurHelper(this); - -// m_gesture_helper = new GestureHelper(this); - - m_window_manager = new WindowManager(this); - - m_app_style_settings = ApplicationStyleSettings::getInstance(); - if (m_app_style_settings) { - connect(m_app_style_settings, &ApplicationStyleSettings::colorStretageChanged, [=](const ApplicationStyleSettings::ColorStretagy &stretagy) { - ////todo implemet palette switch. - switch (stretagy) { - case ApplicationStyleSettings::System: { - break; - } - case ApplicationStyleSettings::Bright: { - break; - } - case ApplicationStyleSettings::Dark: { - break; - } - default: - break; - } - }); - } else { - qWarning("org.ukui.style is null!"); - } - - if (QGSettings::isSchemaInstalled("org.ukui.peripherals-mouse")) { - QGSettings *settings = new QGSettings("org.ukui.peripherals-mouse"); - if (settings->keys().contains("doubleClick")) { - int mouse_double_click_time = settings->get("doubleClick").toInt(); - if (mouse_double_click_time != qApp->doubleClickInterval()) { - qApp->setDoubleClickInterval(mouse_double_click_time); - } - connect(settings, &QGSettings::changed, qApp, [=] (const QString &key) { - if (key == "doubleClick") { - int mouse_double_click_time = settings->get("doubleClick").toInt(); - if (mouse_double_click_time != qApp->doubleClickInterval()) { - qApp->setDoubleClickInterval(mouse_double_click_time); - } - } - }); - } else { - qWarning("org.ukui.peripherals-mouse no doubleClick keys!"); - } - settings->deleteLater(); - settings = nullptr; - } else { - qWarning("org.ukui.peripherals-mouse is null!"); - } - - if (auto settings = UKUIStyleSettings::globalInstance()) { - m_widget_theme = settings->get("widgetThemeName").toString(); - m_style_name = settings->get("styleName").toString(); - } - - if (m_style_name == "ukui") { - m_style_name = "ukui-default"; - } else if (m_style_name == "ukui-black") { - m_style_name = "ukui-dark"; - } else if (m_style_name == "ukui-white") { - m_style_name = "ukui-light"; - } - - if (qApp->property("customStyleName").isValid()) { - if (qApp->property("customStyleName").toString() == "ukui-light") { - m_style_name = "ukui-light"; - } else if (qApp->property("customStyleName").toString() == "ukui-dark") { - m_style_name = "ukui-dark"; - } - } - - if (m_style_name == "ukui-default") { - m_default_palette = true; - } else if (m_style_name == "ukui-dark") { - m_drak_palette = true; - } - - m_tab_animation_helper = new TabWidgetAnimationHelper(this); - m_scrollbar_animation_helper = new ScrollBarAnimationHelper(this); - m_button_animation_helper = new ButtonAnimationHelper(this); - m_combobox_animation_helper = new BoxAnimationHelper(this); - m_animation_helper = new ProgressBarAnimationHelper(this); - m_shadow_helper = new ShadowHelper(this); - m_radiobutton_animation_helper = new RadioButtonAnimationHelper(this); - m_checkbox_animation_helper = new CheckBoxAnimationHelper(this); - m_slider_animation_helper = new SliderAnimationHelper(this); - m_tree_animation_helper = new TreeAnimationHelper(this); - - //dbus - m_statusManagerDBus = new QDBusInterface(DBUS_STATUS_MANAGER_IF, "/" ,DBUS_STATUS_MANAGER_IF,QDBusConnection::sessionBus(),this); - if (m_statusManagerDBus) { - QDBusReply<bool> message_a = m_statusManagerDBus->call("get_current_tabletmode"); - if (m_statusManagerDBus->isValid()) { - //平板模式切换 - connect(m_statusManagerDBus, SIGNAL(mode_change_signal(bool)), this, SLOT(updateTabletModeValue(bool))); - } - - if (message_a.isValid()) { - m_is_tablet_mode = message_a.value(); - } - else{ - m_statusManagerDBus->deleteLater(); - m_statusManagerDBus = nullptr; - } - } - - sp = new KClassicalStyleParameters(this, isUseDarkPalette()); - - qDebug() << "classical setproperty........" << sp->radiusProperty().maxRadius << sp->radiusProperty().normalRadius << sp->radiusProperty().minRadius; - setProperty("maxRadius", sp->radiusProperty().maxRadius); - setProperty("normalRadius", sp->radiusProperty().normalRadius); - setProperty("minRadius", sp->radiusProperty().minRadius); -} - -Qt5UKUIStyle::~Qt5UKUIStyle() -{ - if(m_blur_helper){ - m_blur_helper->deleteLater(); - m_blur_helper = nullptr; - } - if(m_window_manager){ - m_window_manager->deleteLater(); - m_window_manager = nullptr; - } - - if(m_tab_animation_helper){ - m_tab_animation_helper->deleteLater(); - m_tab_animation_helper = nullptr; - } - if(m_scrollbar_animation_helper){ - m_scrollbar_animation_helper->deleteLater(); - m_scrollbar_animation_helper = nullptr; - } - if(m_button_animation_helper){ - m_button_animation_helper->deleteLater(); - m_button_animation_helper = nullptr; - } - if(m_combobox_animation_helper){ - m_combobox_animation_helper->deleteLater(); - m_combobox_animation_helper = nullptr; - } - if(m_animation_helper){ - m_animation_helper->deleteLater(); - m_animation_helper = nullptr; - } - if(m_shadow_helper){ - m_shadow_helper->deleteLater(); - m_shadow_helper = nullptr; - } - if(m_statusManagerDBus){ - m_statusManagerDBus->deleteLater(); - m_statusManagerDBus = nullptr; - } - if(sp){ - sp->deleteLater(); - sp = nullptr; - } -} - -bool Qt5UKUIStyle::shouldBeTransparent(const QWidget *w) const -{ - bool should = false; - - if (w && w->inherits("QComboBoxPrivateContainer")) - return true; - - if (w && w->inherits("QTipLabel")) { - return true; - } - - return should; -} - - -bool Qt5UKUIStyle::eventFilter(QObject *obj, QEvent *e) -{ - /*! - \bug - There is a bug when use fusion as base style when in qt5 assistant's - HelperView. ScrollBar will not draw with our overrided function correctly, - and then it will trigger QEvent::StyleAnimationUpdate. by some how it will let - HelperView be hidden. - I eat this event to aviod this bug, but the scrollbar in HelperView still - display with old fusion style, and the animation will be ineffective. - - I don't know why HelperView didn't use our function drawing scrollbar but fusion, that - makes me stranged. - */ - if (e->type() == QEvent::StyleAnimationUpdate) { - return true; - } - -// //button animation cancel temporary -// if (qobject_cast<QPushButton *>(obj) || qobject_cast<QToolButton *>(obj)) { -// if (e->type() == QEvent::Hide) { -// if (QWidget *w = qobject_cast<QWidget *>(obj)) { -// auto animator = m_button_animation_helper->animator(w); -// if (animator) { -// animator->stopAnimator("SunKen"); -// animator->stopAnimator("MouseOver"); -// animator->setAnimatorCurrentTime("SunKen", 0); -// animator->setAnimatorCurrentTime("MouseOver", 0); -// } -// } -// } -// return false; -// } - if (obj != nullptr && obj->inherits("QTipLabel")) - { - auto label = qobject_cast<QLabel *>(obj); - if(label != nullptr && !(label->alignment() & Qt::AlignVCenter)){ - label->setAlignment(Qt::AlignVCenter); - } - } - - if (qobject_cast<QSlider *>(obj)) { - if (e->type() == QEvent::Wheel) { - if (QWidget *w = qobject_cast<QWidget *>(obj)) { - if (!w->hasFocus()) { - return true; - } - } - } - if(e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick){ - if(obj->property("animation").isValid() && !obj->property("animation").toBool()) - return false; - if(!sp->sliderParameters.animation) - return false; - - auto *slider = qobject_cast<QSlider *>(obj); - if(slider == nullptr || !slider->isEnabled()) - return false; - - auto animator = m_slider_animation_helper->animator(slider); - if(!animator) - return false; - - const bool horizontal = slider->orientation() == Qt::Horizontal; - -// qDebug() << "MouseButtonPress............"; - auto mousePressEvent = static_cast<QMouseEvent*>(e); -// if(mousePressEvent) -// qDebug() << "mousepressevent....." << mousePressEvent->pos() << mousePressEvent->localPos() << slider->geometry(); - - QStyleOptionSlider *opt = new QStyleOptionSlider(); - opt->init(slider); -// qDebug() << "pppppppp;;;;;;;;;:" << subControlRect(CC_Slider, opt, SC_SliderHandle, slider); - - QRect handleRect = sliderHandleRec(); - if(horizontal){ - if(mousePressEvent->pos().x() <= handleRect.x()){ - animator->setExtraProperty("addValue", false); - - } - else if(mousePressEvent->pos().x() >= handleRect.x() + handleRect.width()){ - animator->setExtraProperty("addValue", true); - } - else - return false; - } - else{ - if(mousePressEvent->pos().y() <= handleRect.y()){ - animator->setExtraProperty("addValue", true); - - } - else if(mousePressEvent->pos().y() >= handleRect.y() + handleRect.height()){ - animator->setExtraProperty("addValue", false); - } - else - return false; - } - - if(!animator->isRunning("move_position")){ - int startPosition = slider->value();//scrollbar->sliderPosition();//sliderPositionFromValue(bar->minimum, bar->maximum, scrollBar->value(), maxlen - sliderlen, bar->upsideDown); - if(startPosition <= slider->maximum() && startPosition >= slider->minimum()){ - if(animator->value("move_position") != 1.0){ - if(animator->getExtraProperty("addValue").isValid()){ -// qDebug() << "pagestep..." << slider->pageStep() << animator->getExtraProperty("addValue").toBool(); - int step = (animator->getExtraProperty("addValue").toBool() ? 1 : -1) * slider->pageStep(); -// qDebug() << "step............" << step; - animator->startAnimator("move_position"); - - int endPos = (startPosition + step) - (startPosition + step)%step; - if(!animator->getExtraProperty("addValue").toBool()) - endPos = (startPosition + step) + (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0); -// qDebug() << "endPos1111....." << endPos; - - if(animator->getExtraProperty("addValue").toBool()) - endPos = qMin(endPos, slider->maximum()); - else - endPos = qMax(endPos, slider->minimum()); -// qDebug() << "endPos....." << endPos; - animator->setExtraProperty("end_position", endPos); - animator->setExtraProperty("start_position", startPosition); - -// qApp->sendEvent(slider, e); - return true; - } - } - } - } - else - return true; - return false; - } - - } - - if(qobject_cast<QScrollBar*>(obj)){ - if(e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick){ - if(!sp->scrollBarParameters.animation) - return false; - - auto *scrollbar = qobject_cast<QScrollBar *>(obj); - if(scrollbar == nullptr || !scrollbar->isEnabled()) - return false; - - auto animator = m_scrollbar_animation_helper->animator(scrollbar); - if(!animator) - return false; - - const bool horizontal = scrollbar->orientation() == Qt::Horizontal; - - auto mousePressEvent = static_cast<QMouseEvent*>(e); - - if(horizontal){ - if(mousePressEvent->pos().x() <= scrollbarSliderRec().x()){ - animator->setExtraProperty("addValue", false); - - } - else if(mousePressEvent->pos().x() >= scrollbarSliderRec().x() + scrollbarSliderRec().width()){ - animator->setExtraProperty("addValue", true); - } - else - return false; - } - else{ - if(mousePressEvent->pos().y() <= scrollbarSliderRec().y()){ - animator->setExtraProperty("addValue", false); - - } - else if(mousePressEvent->pos().y() >= scrollbarSliderRec().y() + scrollbarSliderRec().height()){ - animator->setExtraProperty("addValue", true); - } - else - return false; - } - - if(!animator->isRunning("move_position")){ - int startPosition = scrollbar->value();//scrollbar->sliderPosition();//sliderPositionFromValue(bar->minimum, bar->maximum, scrollBar->value(), maxlen - sliderlen, bar->upsideDown); -// qDebug() << "startPosition......." << startPosition << scrollbar->value(); - if(startPosition <= scrollbar->maximum() && startPosition >= scrollbar->minimum()){ -// qDebug() << "CC_ScrollBar............" << animator->isRunning("move_position") << animator->currentAnimatorTime("move_position"); - if(animator->value("move_position") != 1.0){ - if(animator->getExtraProperty("addValue").isValid()){ -// qDebug() << "pagestep..." << scrollbar->pageStep() << animator->getExtraProperty("addValue").toBool(); - int step = (animator->getExtraProperty("addValue").toBool() ? 1 : -1) * scrollbar->pageStep(); -// qDebug() << "step............" << step; - animator->startAnimator("move_position"); - - int endPos = (startPosition + step) - (startPosition + step)%step; - if(!animator->getExtraProperty("addValue").toBool()) - endPos = (startPosition + step) + (((startPosition + step)%step > 0) ?(qAbs(step) - (startPosition + step)%step) : 0); -// qDebug() << "endPos1111....." << endPos; - - if(animator->getExtraProperty("addValue").toBool()) - endPos = qMin(endPos, scrollbar->maximum()); - else - endPos = qMax(endPos, scrollbar->minimum()); -// qDebug() << "endPos....." << endPos; - animator->setExtraProperty("end_position", endPos); - animator->setExtraProperty("start_position", startPosition); - -// qApp->sendEvent(scrollbar, e); - return true; - } - } - } - } - else - return true; - - return false; - } - } - - return false; -} - -/* - * Note there are some widgets can not be set as transparent one in polish. - * Because it has been created as a rgb window. - * - * To reslove this problem, we have to let attribute be setted more ahead. - * Some styleHint() methods are called in the early creation of a widget. - * So we can real set them as alpha widgets. - */ -int Qt5UKUIStyle::styleHint(QStyle::StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const -{ - realSetWindowSurfaceFormatAlpha(widget); - realSetMenuTypeToMenu(widget); - - switch (hint) { - case SH_ScrollBar_Transient: - return false; - case SH_ItemView_ShowDecorationSelected: - return true; - case SH_DialogButtonBox_ButtonsHaveIcons: - return int(true); - case SH_DialogButtons_DefaultButton: - return int(true); - case SH_UnderlineShortcut: - return true; - case SH_ComboBox_Popup: - return true; - case SH_ComboBox_AllowWheelScrolling: - return int(false); - case SH_ComboBox_PopupFrameStyle: - return QFrame::NoFrame | QFrame::Plain; - -// case SH_Button_FocusPolicy: -// return Qt::TabFocus; - - case SH_Header_ArrowAlignment: - return Qt::AlignRight | Qt::AlignVCenter; - - case SH_Table_GridLineColor: - return option ? option->palette.color(QPalette::Active, QPalette::Midlight).rgb() : 0; - - case SH_ItemView_ActivateItemOnSingleClick: - if(m_is_tablet_mode){ - if(widget) - { - if(widget->topLevelWidget()) - { - if(widget->topLevelWidget()->objectName() == QString::fromUtf8("KyNativeFileDialog")) - return false; - } - } - } - return m_is_tablet_mode; - - case SH_DialogButtonLayout: - return QDialogButtonBox::MacLayout; - - case SH_Menu_Scrollable: { - return 1; - } - case SH_BlinkCursorWhenTextSelected: { - return m_blink_cursor; - } - - default: - break; - } - return Style::styleHint(hint, option, widget, returnData); -} -void Qt5UKUIStyle::polish(QPalette &palette){ - palette = standardPalette(); - return Style::polish(palette); -} - -QPalette Qt5UKUIStyle::standardPalette() const -{ - auto palette = Style::standardPalette(); - sp->setPalette(palette); - - if (auto settings = UKUIStyleSettings::globalInstance()) { - QString themeColor = settings->get("themeColor").toString(); - setThemeColor(themeColor, palette); - } - - return palette; -} - - -bool Qt5UKUIStyle::isUseDarkPalette() const -{ - bool usedark = (!useDefaultPaletteList().contains(qAppName()) && (m_drak_palette || (m_default_palette && useDarkPaletteList().contains(qAppName())))); - - if (qAppName() == "ukui-screensaver-dialog") { - usedark = false; - } - - return usedark; -} - - - -QColor Qt5UKUIStyle::button_Click(const QStyleOption *option) const -{ - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - if (isUseDarkPalette()) { - return mixColor(button, mix, 0.05); - } - - return mixColor(button, mix, 0.2); -} - - -QColor Qt5UKUIStyle::button_Hover(const QStyleOption *option) const -{ - QColor button = option->palette.color(QPalette::Active, QPalette::Button); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - if (isUseDarkPalette()) { - return mixColor(button, mix, 0.2); - } - - return mixColor(button, mix, 0.05); -} - - -QColor Qt5UKUIStyle::closeButton_Click(const QStyleOption *option) const -{ - QColor button = sp->ColoseButtonColor; - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - if (isUseDarkPalette()) { - return mixColor(button, mix, 0.05); - } - - return mixColor(button, mix, 0.2); -} - - -QColor Qt5UKUIStyle::closeButton_Hover(const QStyleOption *option) const -{ - QColor button = sp->ColoseButtonColor; - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - if (isUseDarkPalette()) { - return mixColor(button, mix, 0.2); - } - - return mixColor(button, mix, 0.05); -} - - -QColor Qt5UKUIStyle::transparentButton_Click(const QStyleOption *option) const -{ - QColor button = option->palette.color(QPalette::Active, QPalette::BrightText); - - if (isUseDarkPalette()) { - button.setAlphaF(0.15); - } else { - button.setAlphaF(0.28); - } - - return button; -} - -QColor Qt5UKUIStyle::transparentButton_Hover(const QStyleOption *option) const -{ - QColor button = option->palette.color(QPalette::Active, QPalette::BrightText); - - if (isUseDarkPalette()) { - button.setAlphaF(0.28); - } else { - button.setAlphaF(0.15); - } - - return button; -} - - -QColor Qt5UKUIStyle::highLight_Click(const QStyleOption *option) const -{ - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - if (isUseDarkPalette()) { - return mixColor(highlight, mix, 0.05); - } - - return mixColor(highlight, mix, 0.2); -} - - - -QColor Qt5UKUIStyle::highLight_Hover(const QStyleOption *option) const -{ - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - - if (isUseDarkPalette()) { - return mixColor(highlight, mix, 0.2); - } - - return mixColor(highlight, mix, 0.05); -} - -void Qt5UKUIStyle::setThemeColor(QString themeColor, QPalette &palette) const -{ - if (themeColor == "default") { - - } else if (themeColor == "daybreakBlue") { - palette.setColor(QPalette::Active, QPalette::Highlight, QColor(55, 144, 250)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(55, 144, 250)); - } else if (themeColor == "jamPurple") { - palette.setColor(QPalette::Active, QPalette::Highlight, QColor(120, 115, 245)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(120, 115, 245)); - } else if (themeColor == "magenta") { - palette.setColor(QPalette::Active, QPalette::Highlight, QColor(235, 48, 150)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(235, 48, 150)); - } else if (themeColor == "sunRed") { - palette.setColor(QPalette::Active, QPalette::Highlight, QColor(243, 34, 45)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(243, 34, 45)); - } else if (themeColor == "sunsetOrange") { - palette.setColor(QPalette::Active, QPalette::Highlight, QColor(246, 140, 39)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(246, 140, 39)); - } else if (themeColor == "dustGold") { - palette.setColor(QPalette::Active, QPalette::Highlight, QColor(249, 197, 61)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(249, 197, 61)); - } else if (themeColor == "polarGreen") { - palette.setColor(QPalette::Active, QPalette::Highlight, QColor(82, 196, 41)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(82, 196, 41)); - } -} - -void Qt5UKUIStyle::updateTabletModeValue(bool isTabletMode) -{ - m_is_tablet_mode = isTabletMode; - sp->updateParameters(m_is_tablet_mode); - - qApp->setPalette(qGuiApp->palette()); - QEvent event(QEvent::ApplicationPaletteChange); - foreach (QWidget *widget, qApp->allWidgets()) { - qApp->sendEvent(widget, &event); - } -} - -QRect Qt5UKUIStyle::scrollbarSliderRec() -{ - return m_scrollBarSliderRec; -} - -void Qt5UKUIStyle::setScrollbarSliderRec(QRect rect) const -{ - if(m_scrollBarSliderRec != rect) - m_scrollBarSliderRec = rect; -} - -QRect Qt5UKUIStyle::sliderHandleRec() -{ - return m_sliderHandleRec; -} - -void Qt5UKUIStyle::setSliderHandleRec(QRect rect) const -{ - if(m_sliderHandleRec != rect) - m_sliderHandleRec = rect; -} - - -void Qt5UKUIStyle::polish(QWidget *widget) -{ - QLibrary gestureLib("libqt5-gesture-extensions"); - if (widget && gestureLib.load()) { - typedef void (*RegisterFun) (QWidget*, QObject*); - auto fun = (RegisterFun) gestureLib.resolve("registerWidget"); - fun(widget, widget); - } - - if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget->inherits("QMenu"))) { - if (widget->testAttribute(Qt::WA_TranslucentBackground) && widget->isTopLevel()) { - //FIXME: - #if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) - m_blur_helper->registerWidget(widget); - #endif - - /* - if (QString(widget->metaObject()->className())=="QMenu" || - widget->inherits("Peony::DirectoryViewMenu") || - widget->inherits("Peony::DesktopMenu")) { - m_blur_helper->registerWidget(widget); - } - */ - } - - if (widget->isWindow()) { - auto var = widget->property("useStyleWindowManager"); - - if (var.isNull()) { - m_window_manager->registerWidget(widget); - } else { - if (var.toBool()) { - m_window_manager->registerWidget(widget); - } - } - } - } - - if(!widget) - return; - - Style::polish(widget); - - realSetWindowSurfaceFormatAlpha(widget); - - m_shadow_helper->registerWidget(widget); - - if (qobject_cast<QTabWidget*>(widget)) { - //FIXME: unpolish, extensiable. - if (qAppName() != "ukui-sidebar") - m_tab_animation_helper->registerWidget(widget); - } - - if (qobject_cast<QScrollBar*>(widget)) { - //set scroll must have mouse_hover state - widget->setAttribute(Qt::WA_Hover); - - //cancel scroll right click menu - widget->setContextMenuPolicy(Qt::NoContextMenu); - m_scrollbar_animation_helper->registerWidget(widget); - } - - if (auto v = qobject_cast<QAbstractItemView *>(widget)) { - v->viewport()->setAttribute(Qt::WA_Hover); - //QCompleter BUG113969 -// v->setAttribute(Qt::WA_InputMethodEnabled); - } - - if(qobject_cast<QToolButton*>(widget)) - { -// m_button_animation_helper->registerWidget(widget); - } - - if(qobject_cast<QPushButton*>(widget)) - { -// m_button_animation_helper->registerWidget(widget); - } - - if(qobject_cast<QRadioButton*>(widget)) - { - m_radiobutton_animation_helper->registerWidget(widget); - } - - if(qobject_cast<QCheckBox*>(widget)) - { - m_checkbox_animation_helper->registerWidget(widget); - } - - if(qobject_cast<QSlider*>(widget)){ - m_slider_animation_helper->registerWidget(widget); -// auto slider = qobject_cast<QSlider*>(widget); -// connect(slider, &QSlider::valueChanged, this, [=](int value){ -// slide -// qDebug() << "slider valueChanged:" << value; -// }); - } - /*! - \todo QDateTimeEdit widget affected with calendarPopup() draw QComboBox style or QSpinBox style. - So temporarily haven't added the QDateTimeEdit animation and style. - */ - if(qobject_cast<QComboBox*>(widget)) - { - auto combobx = qobject_cast<QComboBox *>(widget); - m_combobox_animation_helper->registerWidget(widget); - m_button_animation_helper->registerWidget(widget); - combobx->view()->viewport()->setAutoFillBackground(false); - } - - if(qobject_cast<QSpinBox*>(widget)) - { - m_button_animation_helper->registerWidget(widget); - } - - if(qobject_cast<QDoubleSpinBox*>(widget)) - { - m_button_animation_helper->registerWidget(widget); - } - - if (widget && widget->inherits("QTipLabel")) { - auto label = qobject_cast<QLabel *>(widget); - label->setWordWrap(true); - label->setScaledContents(true); - if(sp->m_isTableMode){ - QFontMetrics fm = label->fontMetrics(); - int textHeight = fm.height(); - if(textHeight < sp->ToolTip_Height) - { - //PE_PanelTipLabel rec adjusted 8 - label->setMinimumHeight(sp->ToolTip_Height + 8); - } - } - } - - if (qobject_cast<QMessageBox *>(widget)) { - widget->setAutoFillBackground(true); - widget->setBackgroundRole(QPalette::Base); - } - - if (qobject_cast<QTabBar *>(widget)) { - auto tabBar = qobject_cast<QTabBar *>(widget); - if(tabBar->elideMode() == Qt::ElideNone) - tabBar->setElideMode(Qt::ElideRight); - } - - if (qobject_cast<QLineEdit *>(widget) || qobject_cast<QTabBar *>(widget)) { - widget->setAttribute(Qt::WA_Hover); - } - - if (qobject_cast<QLineEdit *>(widget)) { - //lineedit action use highlight effect - if (widget->findChild<QAction *>()) { - QStyleOption subOption; - subOption.state = State_None; - subOption.palette = sp->defaultPalette; - if (widget->isEnabled()) - subOption.state |= State_Enabled; - for (QAction *act : widget->findChildren<QAction *>()) { - act->setIcon(QIcon(HighLightEffect::ordinaryGeneratePixmap(act->icon().pixmap(16, 16), &subOption, widget, HighLightEffect::BothDefaultAndHighlit))); - } - } - } - - if(qobject_cast<QTableView*>(widget)) - { - auto tableView = qobject_cast<QTableView *>(widget); -// qDebug() << "header height:" << tableView->verticalHeader()->count(); - bool isInitial = true; - if (qApp->property("isInitial").isValid()) { - isInitial = qApp->property("isInitial").toBool(); - } - //模式切换时tablewidget中项高度变化 处理得还是有点问题 - for(int i = 0; i < tableView->verticalHeader()->count(); i++) - { -// qDebug() << "i........" << i << tableView->rowHeight(i) << sp->m_isTableMode << sp->m_scaleRatio4_3 << (tableView->rowHeight(i) / (4.0/3.0)) << tableView->rowHeight(i) * (4.0/3.0); - if(tableView->rowHeight(i) == sp->m_headerDefaultSectionSizeVertical1_1 || - tableView->rowHeight(i) == sp->m_headerDefaultSectionSizeVertical4_3) - tableView->setRowHeight(i, (isInitial ? tableView->rowHeight(i) : sp->m_headerDefaultSectionSizeVertical)); - // else //目前没办法用这个方式 因为这个polish可能被同时调用多次 导致高度被进行了多次调整 - // tableView->setRowHeight(i, (isInitial ? tableView->rowHeight(i) : (sp->m_isTableMode ? tableView->rowHeight(i) * 4.0/3.0 : tableView->rowHeight(i) * 3.0/4.0))); - - } - } - - if(widget != nullptr && widget->inherits("QListView")) - { - auto listview = qobject_cast<QListView *>(widget); -// qDebug() << "listview is null0000: " << (listview == nullptr); - if(listview != nullptr) - { - connect(listview->selectionModel(), &QItemSelectionModel::selectionChanged, [listview](const QItemSelection &selected, const QItemSelection &deselected){ - if(!selected.empty() && !deselected.empty()) - { - listview->repaint(); - -// int row = listview->currentIndex().row(); -// int column = listview->currentIndex().column(); -// if(listview->indexWidget(listview->model()->index(row, column)))//widget is null -// listview->indexWidget(listview->model()->index(row, column))->repaint(); - } - }); - } - } - - if(widget != nullptr && widget->inherits("QTreeView")){ - m_tree_animation_helper->registerWidget(widget); - if(qobject_cast<QTreeView *>(widget)->isAnimated() && !widget->property("animation").isValid()){ - widget->setProperty("animation", true); - } - if(widget->property("animation").isValid()){ - sp->treeParameters.animation = widget->property("animation").toBool(); - qobject_cast<QTreeView *>(widget)->setAnimated(sp->treeParameters.animation); - } - else - qobject_cast<QTreeView *>(widget)->setAnimated(sp->treeParameters.animation); - - - auto tree = qobject_cast<QTreeView*>(widget); - connect(tree, &QTreeView::expanded, this, [=](const QModelIndex &index){ - if(m_tree_animation_helper){ - auto treeview = qobject_cast<QTreeView *>(widget); - auto animator = m_tree_animation_helper->animator(treeview); - if(!animator) - return; - -// qDebug() <<"expanded index:" << index.internalId(); - - animator->setExtraProperty("expandItem", QString::number(index.internalId())); - - if(animator->isRunning("collaps")){ - animator->stopAnimator("collaps"); - animator->setAnimatorCurrentTime("collaps", 0); - } - if(!animator->isRunning("expand")){ - animator->startAnimator("expand"); - } - } - }, Qt::UniqueConnection); - connect(tree, &QTreeView::collapsed, this, [=](const QModelIndex &index){ - - if(m_tree_animation_helper){ - auto treeview = qobject_cast<QTreeView *>(widget); - auto animator = m_tree_animation_helper->animator(treeview); - if(!animator) - return; -// qDebug() <<"collapsed index:" << index.internalId(); - - animator->setExtraProperty("collapsItem", QString::number(index.internalId())); - - if(animator->isRunning("expand")){ - animator->stopAnimator("expand"); - animator->setAnimatorCurrentTime("expand", 0); - } - if(!animator->isRunning("collaps")){ - animator->startAnimator("collaps"); - } - } - }, Qt::UniqueConnection); - - } - - widget->installEventFilter(this); -} - -void Qt5UKUIStyle::unpolish(QWidget *widget) -{ - QLibrary gestureLib("libqt5-gesture-extensions"); - if (widget && gestureLib.load()) { - typedef void (*UnRegisterFun) (QWidget*, QObject*); - auto fun = (UnRegisterFun) gestureLib.resolve("unregisterWidget"); - fun(widget, widget); - } - if (qAppName() != "ukui-menu" || (qAppName() == "ukui-menu" && widget->inherits("QMenu"))) { - if (widget->testAttribute(Qt::WA_TranslucentBackground) && widget->isTopLevel()) { - #if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) - m_blur_helper->unregisterWidget(widget); - #endif - } - if (widget->isWindow()) { - auto var = widget->property("useStyleWindowManager"); - - if (var.isNull()) { - m_window_manager->unregisterWidget(widget); - } else { - if (var.toBool()) { - m_window_manager->unregisterWidget(widget); - } - } - } - } - - m_shadow_helper->unregisterWidget(widget); - - widget->removeEventFilter(this); - - if (widget && widget->inherits("QTipLabel")) { - auto label = qobject_cast<QLabel *>(widget); - label->setWordWrap(false); - } - - if (qobject_cast<QTabWidget*>(widget)) { - m_tab_animation_helper->unregisterWidget(widget); - } - - if (qobject_cast<QScrollBar*>(widget)) { - m_scrollbar_animation_helper->unregisterWidget(widget); - } - - if (auto v = qobject_cast<QAbstractItemView *>(widget)) { - v->viewport()->setAttribute(Qt::WA_Hover); - } - - if(qobject_cast<QToolButton*>(widget)) - { - m_button_animation_helper->unregisterWidget(widget); - } - - if(qobject_cast<QPushButton*>(widget)) - { - m_button_animation_helper->unregisterWidget(widget); - } - - if(qobject_cast<QComboBox*>(widget)) - { - m_combobox_animation_helper->unregisterWidget(widget); - m_button_animation_helper->unregisterWidget(widget); - } - - if(qobject_cast<QSpinBox*>(widget)) - { - m_button_animation_helper->unregisterWidget(widget); - } - - if(qobject_cast<QDoubleSpinBox*>(widget)) - { - m_button_animation_helper->unregisterWidget(widget); - } - - if(qobject_cast<QRadioButton*>(widget)) - { - m_radiobutton_animation_helper->unregisterWidget(widget); - } - - if(qobject_cast<QCheckBox*>(widget)) - { - m_checkbox_animation_helper->unregisterWidget(widget); - } - - if(qobject_cast<QSlider*>(widget)) - m_slider_animation_helper->unregisterWidget(widget); - - if (qobject_cast<QLineEdit *>(widget)) { - widget->setAttribute(Qt::WA_Hover, false); - } - - if(qobject_cast<QTreeView *>(widget)){ - m_tree_animation_helper->unregisterWidget(widget); - } - - Style::unpolish(widget); -} - -QIcon Qt5UKUIStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const -{ - if (QApplication::desktopSettingsAware() && !QIcon::themeName().isEmpty()) { - switch (standardIcon) { - case SP_FileDialogListView: - { - return QIcon::fromTheme(QLatin1String("view-list-symbolic")); - }break; - - case SP_FileDialogDetailedView: - { - return QIcon::fromTheme(QLatin1String("view-grid-symbolic")); - }break; - - case SP_ToolBarHorizontalExtensionButton: - { - //toolbar horizontal extension button icon - return QIcon::fromTheme(QLatin1String("ukui-end-symbolic")); - }break; - - case SP_LineEditClearButton: - { - //lineedit close button icon - return QIcon::fromTheme(QLatin1String("edit-clear-symbolic")); - }break; - - default: - break; - } - } - return Style::standardIcon(standardIcon, option, widget); -} - - - -static inline uint qt_intensity(uint r, uint g, uint b) -{ - // 30% red, 59% green, 11% blue - return (77 * r + 150 * g + 28 * b) / 255; -} - -/*! \reimp */ -QPixmap Qt5UKUIStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *option) const -{ - switch (iconMode) { - case QIcon::Disabled: { - QStyleOption tmp = *option; - tmp.state = State_Enabled; - QPixmap target = HighLightEffect::ordinaryGeneratePixmap(pixmap, &tmp); - -// //Fix me:QT original code - QImage im = target.toImage().convertToFormat(QImage::Format_ARGB32); - - // Create a colortable based on the background (black -> bg -> white) - QColor bg = option->palette.color(QPalette::Disabled, QPalette::ButtonText); - int red = bg.red(); - int green = bg.green(); - int blue = bg.blue(); - uchar reds[256], greens[256], blues[256]; - for (int i=0; i<128; ++i) { - reds[i] = uchar((red * (i<<1)) >> 8); - greens[i] = uchar((green * (i<<1)) >> 8); - blues[i] = uchar((blue * (i<<1)) >> 8); - } - for (int i=0; i<128; ++i) { - reds[i+128] = uchar(qMin(red + (i << 1), 255)); - greens[i+128] = uchar(qMin(green + (i << 1), 255)); - blues[i+128] = uchar(qMin(blue + (i << 1), 255)); - } - - int intensity = qt_intensity(red, green, blue); - const int factor = 191; - - // High intensity colors needs dark shifting in the color table, while - // low intensity colors needs light shifting. This is to increase the - // perceived contrast. - if ((red - factor > green && red - factor > blue) - || (green - factor > red && green - factor > blue) - || (blue - factor > red && blue - factor > green)) - intensity = qMin(255, intensity + 91); -// else if (intensity <= 128) -// intensity -= 51; - - bool isPixmapPureColor = HighLightEffect::isPixmapPureColor(pixmap); - for (int y=0; y<im.height(); ++y) { - QRgb *scanLine = (QRgb*)im.scanLine(y); - for (int x=0; x<im.width(); ++x) { - QRgb pixel = *scanLine; - // Calculate color table index, taking intensity adjustment - // and a magic offset into account. - uint ci = uint(qGray(pixel)/3 + (130 - intensity / 3)); - - int r = int(reds[ci]); - int g = int(greens[ci]); - int b = int(blues[ci]); - int a = qAlpha(pixel)/255.0 > 0.7 ? 0.7 * 255 : qAlpha(pixel); - if(isPixmapPureColor){ - r = qMax(int(reds[ci]), bg.red()); - g = qMax(int(greens[ci]), bg.green()); - b = qMax(int(blues[ci]), bg.blue()); - a = qAlpha(pixel); - } - *scanLine = qRgba(r, g, b, a); - ++scanLine; - } - } - - return QPixmap::fromImage(im); - - - //Fix me:set same color to text when set icon mode disable.But it has error in color icons. - -// QColor bg = option->palette.color(QPalette::Disabled, QPalette::WindowText); -// bg.setAlphaF(0.5); -// QPainter p(&target); -// p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); -// p.setCompositionMode(QPainter::CompositionMode_SourceIn); -// p.fillRect(target.rect(), bg); -// p.end(); - -// return target; - } - - default: - break; - } - - return Style::generatedIconPixmap(iconMode, pixmap, option); -} - - - -void Qt5UKUIStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const -{ - switch (element) { - case QStyle::PE_PanelMenu: - case QStyle::PE_FrameMenu: - { - sp->initMenuParameters(isUseDarkPalette(), option, widget); - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - painter->drawPixmap(option->rect, sp->menuParameters.menuFramePixmap, sp->menuParameters.menuFramePixmap.rect());; - painter->restore(); - return; - } - case PE_FrameFocusRect: { - if (qobject_cast<const QAbstractItemView *>(widget)) - return; - break; - } - - case PE_Frame:{ - painter->save(); - painter->setRenderHint(QPainter::Antialiasing); - painter->setPen(QPen(option->palette.color(QPalette::Active, QPalette::Midlight), 1)); - painter->setBrush(Qt::NoBrush); - painter->drawRect(option->rect); - painter->restore(); - return; - } - - case PE_PanelButtonCommand: - { - if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { -// auto animator = m_button_animation_helper->animator(widget); - const bool enable = button->state & State_Enabled; - const bool hover = button->state & State_MouseOver; - const bool sunken = button->state & State_Sunken; - const bool on = button->state & State_On; - const bool focus = button->state & State_HasFocus; - bool roundButton = false; - int width = 0; - QRect rect = option->rect; - - if (widget && widget->property("isRoundButton").isValid()) { - roundButton = widget->property("isRoundButton").toBool(); - } - - painter->save(); - if (!enable) { -// if (animator) { -// animator->stopAnimator("SunKen"); -// animator->stopAnimator("MouseOver"); -// } - - if (on) { - width = sp->pushButtonParameters.pushButtonCheckDisablePen.width(); - painter->setPen(sp->pushButtonParameters.pushButtonCheckDisablePen); - painter->setBrush(sp->pushButtonParameters.pushButtonCheckDisableBrush); - } - else if (button->features & QStyleOptionButton::Flat) { - width = 0; - painter->setPen(Qt::NoPen); - painter->setBrush(Qt::NoBrush); - } - else { - width = sp->pushButtonParameters.pushButtonDisablePen.width(); - painter->setPen(sp->pushButtonParameters.pushButtonDisablePen); - painter->setBrush(sp->pushButtonParameters.pushButtonDisableBrush); - } - } else { - if (on) { - if (sunken) { - width = sp->pushButtonParameters.pushButtonCheckClickPen.width(); - painter->setPen(sp->pushButtonParameters.pushButtonCheckClickPen); - painter->setBrush(sp->pushButtonParameters.pushButtonCheckClickBrush); - } else if (hover) { - width = sp->pushButtonParameters.pushButtonCheckHoverPen.width(); - painter->setPen(sp->pushButtonParameters.pushButtonCheckHoverPen); - painter->setBrush(sp->pushButtonParameters.pushButtonCheckHoverBrush); - } else { - width = sp->pushButtonParameters.pushButtonCheckPen.width(); - painter->setPen(sp->pushButtonParameters.pushButtonCheckPen); - painter->setBrush(sp->pushButtonParameters.pushButtonCheckBrush); - } - } else { - if (sunken) { - width = sp->pushButtonParameters.pushButtonClickPen.width(); - painter->setPen(sp->pushButtonParameters.pushButtonClickPen); - painter->setBrush(sp->pushButtonParameters.pushButtonClickBrush); - } else if (hover) { - width = sp->pushButtonParameters.pushButtonHoverPen.width(); - painter->setPen(sp->pushButtonParameters.pushButtonHoverPen); - painter->setBrush(sp->pushButtonParameters.pushButtonHoverBrush); - } else { - if (button->features & QStyleOptionButton::Flat) { - width = 0; - painter->setPen(Qt::NoPen); - painter->setBrush(Qt::NoBrush); - } else { - width = sp->pushButtonParameters.pushButtonDefaultPen.width(); - painter->setPen(sp->pushButtonParameters.pushButtonDefaultPen); - painter->setBrush(sp->pushButtonParameters.pushButtonDefaultBrush); - } - - //focus - if (focus && focusStateActiveList().contains(qAppName())) { - width = sp->pushButtonParameters.pushButtonFocusPen.width(); - painter->setPen(sp->pushButtonParameters.pushButtonFocusPen); - } - } - } - } - - if(sp->pushButtonParameters.radius != 0) - painter->setRenderHint(QPainter::Antialiasing, true); - if (roundButton) { - painter->setRenderHint(QPainter::Antialiasing, true); - painter->drawEllipse(rect.adjusted(width, width, -width, -width)); - } else { - if(width == 1 && sp->pushButtonParameters.radius != 0){ - painter->translate(0.5, 0.5); - } - painter->drawRoundedRect(rect.adjusted(width, width, -width, -width), sp->pushButtonParameters.radius, sp->pushButtonParameters.radius); - } - painter->restore(); - return; - -// //button animation cancel temporary -// if (sunken || on || animator->isRunning("SunKen") || animator->value("SunKen") == 1.0) { -// double opacity = animator->value("SunKen").toDouble(); -// if (sunken || on) { -// if (opacity == 0.0) { -// animator->setAnimatorDirectionForward("SunKen", true); -// animator->startAnimator("SunKen"); -// } -// } else { -// if (opacity == 1.0) { -// animator->setAnimatorDirectionForward("SunKen",false); -// animator->startAnimator("SunKen"); -// } -// } - -// QColor hoverColor, sunkenColor; -// painter->save(); -// painter->setPen(Qt::NoPen); -// if (isWindowColoseButton) { -// hoverColor = closeButton_Hover(option); -// sunkenColor = closeButton_Click(option); -// } else if (isWindowButton && useTransparentButtonList().contains(qAppName())) { -// hoverColor = transparentButton_Hover(option); -// sunkenColor = transparentButton_Click(option); -// } else { -// if (isImportant) { -// hoverColor = highLight_Hover(option); -// sunkenColor = highLight_Click(option); -// } else if (useButtonPalette || isWindowButton) { -// hoverColor = button_Hover(option); -// sunkenColor = button_Click(option); -// } else { -// hoverColor = highLight_Hover(option); -// sunkenColor = highLight_Click(option); -// } -// } -// painter->setBrush(mixColor(hoverColor, sunkenColor, opacity)); -// painter->setRenderHint(QPainter::Antialiasing, true); -// painter->drawRoundedRect(option->rect, sp->radius, sp->radius); -// painter->restore(); -// return; -// } - -// if (hover || animator->isRunning("MouseOver") -// || animator->currentAnimatorTime("MouseOver") == animator->totalAnimationDuration("MouseOver")) { -// double opacity = animator->value("MouseOver").toDouble(); -// if (hover) { -// animator->setAnimatorDirectionForward("MouseOver",true); -// if (opacity == 0.0) { -// animator->startAnimator("MouseOver"); -// } -// } else { -// animator->setAnimatorDirectionForward("MouseOver",false); -// if (opacity == 1.0) { -// animator->startAnimator("MouseOver"); -// } -// } - -// painter->save(); -// painter->setPen(Qt::NoPen); -// painter->setOpacity(opacity); -// if (isWindowColoseButton) { -// painter->setBrush(closeButton_Hover(option)); -// } else if (isWindowButton && useTransparentButtonList().contains(qAppName())) { -// QColor color = transparentButton_Hover(option); -// painter->setBrush(color); -// } else { -// if (isImportant) { -// painter->setBrush(highLight_Hover(option)); -// } else if (useButtonPalette || isWindowButton) { -// painter->setBrush(button_Hover(option)); -// } else { -// painter->setBrush(highLight_Hover(option)); -// } -// } -// painter->setRenderHint(QPainter::Antialiasing, true); -// painter->drawRoundedRect(option->rect, sp->radius, sp->radius); -// painter->restore(); -// return; -// } - -// //button inactive state -// if ((button->state & QStyle::State_Enabled) && !(button->state & QStyle::State_Active)) { -// painter->save(); -// painter->setPen(Qt::NoPen); -// painter->setBrush(Qt::red); -// painter->setRenderHint(QPainter::Antialiasing, true); -// painter->drawRoundedRect(option->rect, sp->radius, sp->radius); -// painter->restore(); -// } -// return; - } - break; - } - - case PE_PanelTipLabel://UKUI Tip style: Open ground glass - { - if (widget && widget->isEnabled()) { - sp->initToolTipParameters(isUseDarkPalette(), option, widget); - if (!KWindowSystem::compositingActive()) { - QColor co = option->palette.color(QPalette::BrightText); - co.setAlphaF(0.15); - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - painter->setPen(co); - painter->setBrush(sp->toolTipParameters.toolTipBackgroundBrush.color()); - painter->drawRect(option->rect); - painter->restore(); - return; - } - - QStyleOption opt = *option; - - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - QPainterPath rectPath; - rectPath.addRoundedRect(option->rect.adjusted(+4, +4, -4, -4), sp->toolTipParameters.radius, sp->toolTipParameters.radius); - - // Draw a black floor - QPixmap pixmap(option->rect.size()); - pixmap.fill(Qt::transparent); - QPainter pixmapPainter(&pixmap); - pixmapPainter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter.setPen(Qt::transparent); - pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::BrightText)); - pixmapPainter.drawPath(rectPath); - pixmapPainter.end(); - - // Blur the black background - QImage img = pixmap.toImage(); - qt_blurImage(img, 4, false, false); - - // Dig out the center part - pixmap = QPixmap::fromImage(img); - QPainter pixmapPainter2(&pixmap); - pixmapPainter2.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter2.setCompositionMode(QPainter::CompositionMode_Clear); - pixmapPainter2.setPen(Qt::transparent); - pixmapPainter2.setBrush(Qt::transparent); - pixmapPainter2.drawPath(rectPath); - pixmapPainter2.end(); - - //This is the beginning of drawing the bottom of the prompt box - auto color = sp->toolTipParameters.toolTipBackgroundBrush.color(); - if (UKUIStyleSettings::isSchemaInstalled("org.ukui.style")) { - auto opacity = UKUIStyleSettings::globalInstance()->get("menuTransparency").toInt()/100.0; - color.setAlphaF(opacity); - } - - if (qApp->property("blurEnable").isValid()) { - bool blurEnable = qApp->property("blurEnable").toBool(); - if (!blurEnable) { - color.setAlphaF(1); - } - } - - //if blur effect is not supported, do not use transparent color. - if (!KWindowEffects::isEffectAvailable(KWindowEffects::BlurBehind) || blackAppListWithBlurHelper().contains(qAppName())) { - color.setAlphaF(1); - } - - QPainterPath path; - auto region = widget->mask(); - if (region.isEmpty()) { - path.addRoundedRect(opt.rect.adjusted(+4, +4, -4, -4), sp->toolTipParameters.radius, sp->toolTipParameters.radius); - } else { - path.addRegion(region); - } - - //draw blur background - QPainter pixmapPainter3(&pixmap); - pixmapPainter3.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter3.setPen(Qt::transparent); - pixmapPainter3.setBrush(color); - pixmapPainter3.drawPath(path); - pixmapPainter3.end(); - - painter->drawPixmap(option->rect, pixmap, pixmap.rect()); - - painter->restore(); - return; - } - break; - } - - case PE_FrameStatusBar://UKUI Status style - { - painter->save(); - painter->setRenderHint(QPainter::Antialiasing,true); - painter->setPen(Qt::NoPen); - painter->setBrush(option->palette.color(QPalette::Dark)); - painter->drawRect(option->rect); - painter->restore(); - return; - } - - case PE_IndicatorButtonDropDown: //UKUI IndicatorButton style - { - painter->save(); - painter->setRenderHint(QPainter::Antialiasing,true); - painter->setPen(Qt::NoPen); - if(widget && widget->isEnabled()){ - if (option->state & State_MouseOver) { - painter->setBrush(option->palette.color(QPalette::Highlight)); - painter->drawRoundedRect(option->rect.left()-4,option->rect.y(),option->rect.width()+4,option->rect.height(), sp->radius, sp->radius); - } - } - painter->restore(); - return; - } - - case PE_PanelButtonTool: - { - sp->initToolButtonPanelParameters(isUseDarkPalette(), option, widget); -// auto animator = m_button_animation_helper->animator(widget); - - const bool enable = option->state & State_Enabled; - const bool raise = option->state & State_AutoRaise; - const bool sunken = option->state & State_Sunken; - const bool hover = option->state & State_MouseOver; - const bool on = option->state & State_On; - const bool focus = option->state & State_HasFocus; - bool roundButton = false; - int width = 0; - QRect rect = option->rect; - - if (widget && widget->property("isRoundButton").isValid()) { - roundButton = widget->property("isRoundButton").toBool(); - } - - painter->save(); - if (!enable) { -// if (animator) { -// animator->stopAnimator("SunKen"); -// animator->stopAnimator("MouseOver"); -// } - - if (on) { - width = sp->toolButtonParameters.toolButtonCheckDisablePen.width(); - painter->setPen(sp->toolButtonParameters.toolButtonCheckDisablePen); - painter->setBrush(sp->toolButtonParameters.toolButtonCheckDisableBrush); - } - else if (raise) { - width = 0; - painter->setPen(Qt::NoPen); - painter->setBrush(Qt::NoBrush); - } - else { - width = sp->toolButtonParameters.toolButtonDisablePen.width(); - painter->setPen(sp->toolButtonParameters.toolButtonDisablePen); - painter->setBrush(sp->toolButtonParameters.toolButtonDisableBrush); - } - } else { - if (on) { - if (sunken) { - width = sp->toolButtonParameters.toolButtonCheckClickPen.width(); - painter->setPen(sp->toolButtonParameters.toolButtonCheckClickPen); - painter->setBrush(sp->toolButtonParameters.toolButtonCheckClickBrush); - } else if (hover) { - width = sp->toolButtonParameters.toolButtonCheckHoverPen.width(); - painter->setPen(sp->toolButtonParameters.toolButtonCheckHoverPen); - painter->setBrush(sp->toolButtonParameters.toolButtonCheckHoverBrush); - } else { - width = sp->toolButtonParameters.toolButtonCheckPen.width(); - painter->setPen(sp->toolButtonParameters.toolButtonCheckPen); - painter->setBrush(sp->toolButtonParameters.toolButtonCheckBrush); - } - } else { - if (sunken) { - width = sp->toolButtonParameters.toolButtonClickPen.width(); - painter->setPen(sp->toolButtonParameters.toolButtonClickPen); - painter->setBrush(sp->toolButtonParameters.toolButtonClickBrush); - } else if (hover) { - width = sp->toolButtonParameters.toolButtonHoverPen.width(); - painter->setPen(sp->toolButtonParameters.toolButtonHoverPen); - painter->setBrush(sp->toolButtonParameters.toolButtonHoverBrush); - } else { - if (raise) { - width = 0; - painter->setPen(Qt::NoPen); - painter->setBrush(Qt::NoBrush); - } else { - width = sp->toolButtonParameters.toolButtonDefaultPen.width(); - painter->setPen(sp->toolButtonParameters.toolButtonDefaultPen); - painter->setBrush(sp->toolButtonParameters.toolButtonDefaultBrush); - } - - //focus - if (focus && focusStateActiveList().contains(qAppName())) { - width = sp->toolButtonParameters.toolButtonFocusPen.width(); - painter->setPen(sp->toolButtonParameters.toolButtonFocusPen); - } - } - } - } - - if(sp->toolButtonParameters.radius != 0) - painter->setRenderHint(QPainter::Antialiasing, true); - if (roundButton) { - painter->setRenderHint(QPainter::Antialiasing, true); - painter->drawEllipse(rect.adjusted(width, width, -width, -width)); - } else { - if(width == 1 && sp->toolButtonParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->drawRoundedRect(rect.adjusted(width, width, -width, -width), sp->toolButtonParameters.radius, sp->toolButtonParameters.radius); - } - painter->restore(); - return; - - -// if (sunken || on || animator->isRunning("SunKen") -// || animator->currentAnimatorTime("SunKen") == animator->totalAnimationDuration("SunKen")) { -// double opacity = animator->value("SunKen").toDouble(); -// if (sunken || on) { -// if (opacity == 0.0) { -// animator->setAnimatorDirectionForward("SunKen", true); -// animator->startAnimator("SunKen"); -// } -// } else { -// if (animator->currentAnimatorTime("SunKen") == animator->totalAnimationDuration("SunKen")) { -// animator->setAnimatorDirectionForward("SunKen", false); -// animator->startAnimator("SunKen"); -// } -// } -// QColor hoverColor, sunkenColor; -// painter->save(); -// painter->setPen(Qt::NoPen); -// if (isWindowButton && useTransparentButtonList().contains(qAppName())) { -// hoverColor = transparentButton_Hover(option); -// sunkenColor = transparentButton_Click(option); -// } else if (isWindowColoseButton) { -// hoverColor = closeButton_Hover(option); -// sunkenColor = closeButton_Click(option); -// } else if (isWindowButton || useButtonPalette){ -// hoverColor = button_Hover(option); -// sunkenColor = button_Click(option); -// } else { -// hoverColor = highLight_Hover(option); -// sunkenColor = highLight_Click(option); -// } -// painter->setBrush(mixColor(hoverColor, sunkenColor, opacity)); -// painter->setRenderHint(QPainter::Antialiasing, true); -// painter->drawRoundedRect(option->rect, sp->radius, sp->radius); -// painter->restore(); -// return; -// } - -// if (hover || animator->isRunning("MouseOver") -// || animator->currentAnimatorTime("MouseOver") == animator->totalAnimationDuration("MouseOver")) { -// double opacity = animator->value("MouseOver").toDouble(); -// if (hover) { -// animator->setAnimatorDirectionForward("MouseOver", true); -// if(opacity == 0.0) { -// animator->startAnimator("MouseOver"); -// } -// } else { -// animator->setAnimatorDirectionForward("MouseOver", false); -// if (opacity == 1.0) { -// animator->startAnimator("MouseOver"); -// } -// } -// painter->save(); -// painter->setPen(Qt::NoPen); -// painter->setOpacity(opacity); -// if (isWindowButton && useTransparentButtonList().contains(qAppName())) { -// QColor color = transparentButton_Hover(option); -// painter->setBrush(color); -// } else if (isWindowColoseButton) { -// painter->setBrush(closeButton_Hover(option)); -// } else if (isWindowButton || useButtonPalette){ -// painter->setBrush(button_Hover(option)); -// } else { -// painter->setBrush(highLight_Hover(option)); -// } -// painter->setRenderHint(QPainter::Antialiasing, true); -// painter->drawRoundedRect(option->rect, sp->radius, sp->radius); -// painter->restore(); -// return; -// } -// return; - } - - case PE_IndicatorTabClose: - { - QIcon icon = QIcon::fromTheme("window-close-symbolic"); - QColor color = sp->Indicator_IconDefault; - if (option->state & (State_On | State_Sunken)) { - color = sp->Indicator_IconSunken; - } - else if (option->state & (State_MouseOver)) { - color = sp->Indicator_IconHover; - } - if (!icon.isNull()) { - int iconSize = proxy()->pixelMetric(QStyle::PM_SmallIconSize, option, widget); - QPixmap pixmap = icon.pixmap(QSize(iconSize, iconSize), QIcon::Normal, QIcon::On); - pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - painter->save(); - drawColorPixmap(painter, color, pixmap); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - proxy()->drawItemPixmap(painter, option->rect, Qt::AlignCenter, pixmap); - painter->restore(); - } - return; - } - - case PE_FrameTabBarBase: - { - if (const QStyleOptionTabBarBase *tbb = qstyleoption_cast<const QStyleOptionTabBarBase *>(option)) { - painter->save(); - painter->setPen(Qt::NoPen); - painter->setBrush(sp->tabWidgetParameters.tabBarBackgroundBrush); - painter->drawRect(tbb->tabBarRect); - painter->restore(); - return; - } - break; - } - - case PE_FrameTabWidget: { - if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(option)) { - sp->initTabWidgetParameters(isUseDarkPalette(), option, widget); - painter->save(); - painter->setPen(Qt::NoPen); - painter->setBrush(sp->tabWidgetParameters.tabWidgetBackgroundBrush); - painter->drawRect(twf->rect); - painter->restore(); - return; - } - break; - } - - case PE_FrameGroupBox: //UKUI GroupBox style: - { - /* - * Remove the style of the bounding box according to the design - */ - //painter->save(); - //painter->setRenderHint(QPainter::Antialiasing,true); - //painter->setPen(option->palette.color(QPalette::Base)); - //painter->setBrush(option->palette.color(QPalette::Base)); - //painter->drawRoundedRect(option->rect,4,4); - //painter->restore(); - return; - } - - case PE_PanelLineEdit://UKUI Text edit style - { - if (widget) { -// if (widget->findChild<QAction *>()) { -// QStyleOption subOption = *option; -// for (QAction *act : widget->findChildren<QAction *>()) { -// act->setIcon(QIcon(HighLightEffect::ordinaryGeneratePixmap(act->icon().pixmap(16, 16), &subOption, widget, HighLightEffect::BothDefaultAndHighlit))); -// } -// } -// if (QAction *clearAction = widget->findChild<QAction *>(QLatin1String("_q_qlineeditclearaction"))) { -// QStyleOption subOption = *option; -// QColor color = subOption.palette.color(QPalette::Text); -// color.setAlphaF(1.0); -// subOption.palette.setColor(QPalette::Text, color); -// clearAction->setIcon(QIcon(HighLightEffect::ordinaryGeneratePixmap(clearAction->icon().pixmap(16, 16), &subOption, widget, HighLightEffect::BothDefaultAndHighlit))); -// } - } - - // Conflict with qspinbox and so on, The widget text cannot use this style - if (widget) { - if (widget->parentWidget()) - if (widget->parentWidget()->inherits("QDoubleSpinBox") || widget->parentWidget()->inherits("QSpinBox") - || widget->parentWidget()->inherits("QComboBox") || widget->parentWidget()->inherits("QDateTimeEdit")) - { - return; - } - } - - if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(option)) { - sp->initLineEditParameters(isUseDarkPalette(), option, widget); - const bool enable = f->state & State_Enabled; - const bool hover = f->state & State_MouseOver; - const bool focus = f->state & State_HasFocus; - int width = 0; - - if (!enable) { - width = sp->lineEditParameters.lineEditDisablePen.width(); - painter->save(); - if(sp->lineEditParameters.radius != 0) - painter->setRenderHint(QPainter::Antialiasing, true); - if(width == 1 && sp->lineEditParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->setPen(sp->lineEditParameters.lineEditDisablePen); - painter->setBrush(sp->lineEditParameters.lineEditDisableBrush); - painter->drawRoundedRect(option->rect.adjusted(width, width, -width, -width), - sp->lineEditParameters.radius, sp->lineEditParameters.radius); - painter->restore(); - return; - } - -// //read only mode -// if (f->state & State_ReadOnly) { -// painter->save(); -// painter->setRenderHint(QPainter::Antialiasing, true); -// painter->setPen(Qt::NoPen); -// painter->setBrush(f->palette.brush(QPalette::Active, QPalette::Button)); -// painter->drawRoundedRect(option->rect, sp->radius, sp->radius); -// painter->restore(); -// return; -// } - - painter->save(); - if(sp->lineEditParameters.radius != 0) - painter->setRenderHint(QPainter::Antialiasing, true); - if (focus) { - width = sp->lineEditParameters.lineEditFocusPen.width(); - painter->setPen(sp->lineEditParameters.lineEditFocusPen); - painter->setBrush(sp->lineEditParameters.lineEditFocusBrush); - painter->drawRoundedRect(option->rect.adjusted(width/2, width/2, -1 * width/2, -1 * width/2), - sp->lineEditParameters.radius, sp->lineEditParameters.radius); - painter->restore(); - } else if (hover) { - width = sp->lineEditParameters.lineEditHoverPen.width(); - painter->setPen(sp->lineEditParameters.lineEditHoverPen); - painter->setBrush(sp->lineEditParameters.lineEditHoverBrush); - } else { - width = sp->lineEditParameters.lineEditDefaultPen.width(); - painter->setPen(sp->lineEditParameters.lineEditDefaultPen); - painter->setBrush(sp->lineEditParameters.lineEditDefaultBrush); - } - if(width == 1 && sp->lineEditParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->drawRoundedRect(option->rect.adjusted(width, width, -width, -width), - sp->lineEditParameters.radius, sp->lineEditParameters.radius); - - painter->restore(); - - return; - } - break; - } - - case PE_IndicatorArrowUp: - { - QIcon icon = QIcon::fromTheme("ukui-up-symbolic"); - if(sp->m_isTableMode){ - if(qobject_cast<const QSpinBox *>(widget)) - { - icon = QIcon::fromTheme("list-add-symbolic"); - } - else if(qobject_cast<const QDoubleSpinBox *>(widget)) - { - icon = QIcon::fromTheme("list-add-symbolic"); - } - } - - if(!icon.isNull()) { - int indWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); - int indHight = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); - QSize iconsize(indWidth, indHight); - QRect drawRect(option->rect.topLeft(), iconsize); - drawRect.moveCenter(option->rect.center()); - const bool enable(option->state & State_Enabled); - QIcon::Mode mode = enable ? QIcon::Normal : QIcon::Disabled; - QPixmap pixmap = icon.pixmap(iconsize, mode, QIcon::Off); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); - QPixmap target; - if(widget != nullptr && (widget->inherits("QDoubleSpinBox") || widget->inherits("QSpinBox")) && !sp->spinBoxParameters.spinBoxUpIconHightPixMap) - target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - else if(!sp->indicatorIconHoverNeedHighLight) - target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - else - target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - painter->drawPixmap(drawRect, target); - painter->restore(); - return; - } - break; - } - - case PE_IndicatorArrowDown: - { - double rotate = 0.0; - bool startAnimation = false; - if(auto treeview = qobject_cast<const QTreeView *>(widget)){ - if(!m_tree_animation_helper) - break; - 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()){ - rotate = animator->value("expand").toDouble(); - - if(animator->value("expand").toDouble() == 1){ - animator->setAnimatorCurrentTime("expand", 0); - animator->stopAnimator("expand"); - } - startAnimation = true; -// qDebug() << "PE_IndicatorArrowDown expand...." << rotate; - } - } - } - QIcon icon = QIcon::fromTheme("ukui-down-symbolic"); - if(sp->m_isTableMode){ - if(qobject_cast<const QSpinBox *>(widget)) - { - icon = QIcon::fromTheme("list-remove-symbolic"); - } - else if(qobject_cast<const QDoubleSpinBox *>(widget)) - { - icon = QIcon::fromTheme("list-remove-symbolic"); - } - } - - if(!icon.isNull()) { - int indWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); - int indHight = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); - QSize iconsize(indWidth, indHight); - QRect drawRect(option->rect.topLeft(), iconsize); - drawRect.moveCenter(option->rect.center()); - const bool enable(option->state & State_Enabled); - QIcon::Mode mode = enable ? QIcon::Normal : QIcon::Disabled; - QPixmap pixmap = icon.pixmap(iconsize, mode, QIcon::Off); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); - QPixmap target; - if(widget != nullptr && (widget->inherits("QDoubleSpinBox") || widget->inherits("QSpinBox")) && !sp->spinBoxParameters.spinBoxUpIconHightPixMap) - target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - else if(!sp->indicatorIconHoverNeedHighLight) - target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - else - target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - if(startAnimation){ - QMatrix matrix; - int i = 90.0 * (rotate - 1.0); - matrix.rotate(i); - - target = target.scaled(iconsize.width(), iconsize.height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); -// painter->rotate(i); - auto pix = target.transformed(matrix); - QRect rect = QRect(drawRect.x() - (pix.rect().width() - drawRect.width()) / 2, drawRect.y() - (pix.rect().height() - drawRect.height()) / 2, - pix.rect().width(), pix.rect().height()); - pix = pix.scaled(rect.width(), rect.height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); - painter->drawPixmap(rect, pix); - } - else - painter->drawPixmap(drawRect, target); - painter->restore(); - return; - } - break; - } - - case PE_IndicatorArrowRight: - { - double rotate = 0.0; - bool startAnimation = false; - if(auto treeview = qobject_cast<const QTreeView *>(widget)){ - if(!m_tree_animation_helper) - break; - auto animator = m_tree_animation_helper->animator(treeview); - if(animator){ - if(animator && animator->isRunning("collaps") && - QString::number(treeview->indexAt(option->rect.center()).internalId()) == animator->getExtraProperty("collapsItem").toString()){ - rotate = animator->value("collaps").toDouble(); - if(animator->value("collaps").toDouble() == 1){ - animator->setAnimatorCurrentTime("collaps", 0); - animator->stopAnimator("collaps"); - } - startAnimation = true; -// qDebug() << "PE_IndicatorArrowRight expand...." << rotate; - } - } - } - QIcon icon = QIcon::fromTheme("ukui-end-symbolic"); - if(widget && widget->parent() && widget->parentWidget()->inherits("QTabBar") && - sp->getTabBarIndicatorLayout() != UKUIStyleParameters::TabBarIndicatorLayout::TabBarIndicator_Horizontal) - icon = QIcon::fromTheme("ukui-down-symbolic"); - - if(!icon.isNull()) { - int indWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); - int indHight = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); - QSize iconsize(indWidth, indHight); - QRect drawRect(option->rect.topLeft(), iconsize); - drawRect.moveCenter(option->rect.center()); - const bool enable(option->state & State_Enabled); - QIcon::Mode mode = enable ? QIcon::Normal : QIcon::Disabled; - QPixmap pixmap = icon.pixmap(iconsize, mode, QIcon::Off); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); - QPixmap target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); - if(widget && !widget->inherits("QMenu") && !sp->indicatorIconHoverNeedHighLight) - target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - if(startAnimation){ - QMatrix matrix; - int i = 90.0 * (1.0 - rotate); -// qDebug() << "PE_IndicatorArrowRight i........." << i; - matrix.rotate(i); - - target = target.scaled(iconsize.width(), iconsize.height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); -// painter->rotate(i); - auto pix = target.transformed(matrix); - QRect rect = QRect(drawRect.x() - (pix.rect().width() - drawRect.width()) / 2, drawRect.y() - (pix.rect().height() - drawRect.height()) / 2, - pix.rect().width(), pix.rect().height()); - pix = pix.scaled(rect.width(), rect.height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); - painter->drawPixmap(rect, pix); - } - else - painter->drawPixmap(drawRect, target); - painter->restore(); - return; - } - break; - } - - case PE_IndicatorArrowLeft: - { - QIcon icon = QIcon::fromTheme("ukui-start-symbolic"); - if(widget && widget->parent() && widget->parentWidget()->inherits("QTabBar") && - sp->getTabBarIndicatorLayout() != UKUIStyleParameters::TabBarIndicatorLayout::TabBarIndicator_Horizontal) - icon = QIcon::fromTheme("ukui-up-symbolic"); - - if(!icon.isNull()) { - int indWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); - int indHight = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); - QSize iconsize(indWidth, indHight); - QRect drawRect(option->rect.topLeft(), iconsize); - drawRect.moveCenter(option->rect.center()); - const bool enable(option->state & State_Enabled); - QIcon::Mode mode = enable ? QIcon::Normal : QIcon::Disabled; - QPixmap pixmap = icon.pixmap(iconsize, mode, QIcon::Off); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); - QPixmap target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); - if(!sp->indicatorIconHoverNeedHighLight) - target = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - painter->drawPixmap(drawRect, target); - painter->restore(); - return; - } - break; - } - - case PE_IndicatorRadioButton: - { - if (const QStyleOptionButton* radiobutton = qstyleoption_cast<const QStyleOptionButton*>(option)) { - sp->initRadioButtonParameters(isUseDarkPalette(), option, widget); - - QRectF rect = radiobutton->rect.adjusted(1, 1, -1, -1); - bool enable = radiobutton->state & State_Enabled; - bool mouseOver = radiobutton->state & State_MouseOver; - bool sunKen = radiobutton->state & State_Sunken; - bool on = radiobutton->state & State_On; - - painter->save(); - painter->setRenderHint(QPainter::Antialiasing, true); - - auto animator = m_radiobutton_animation_helper->animator(widget); - - if (enable && sp->radioButtonParameters.animation && - animator != nullptr && animator->isRunning("SunKenOn")) { - float value = animator->value("SunKenOn").toFloat(); - QColor clickColor = sp->radioButtonParameters.radioButtonClickBrush.color(); - QColor onDefaultPenColor = mouseOver ? sp->radioButtonParameters.radioButtonOnHoverPen.color() : - sp->radioButtonParameters.radioButtonOnDefaultPen.color(); - QColor onDefaultColor = mouseOver ? sp->radioButtonParameters.radioButtonOnHoverBrush.color() : - sp->radioButtonParameters.radioButtonOnDefaultBrush.color(); - QColor frameColor = mouseOver ? sp->radioButtonParameters.radioButtonHoverPen.color() : - sp->radioButtonParameters.radioButtonDefaultPen.color(); - QBrush brush(QColor(clickColor.red() + value * (onDefaultColor.red() - clickColor.red()), - clickColor.green() + value * (onDefaultColor.green() - clickColor.green()), - clickColor.blue() + value * (onDefaultColor.blue() - clickColor.blue()))); - QBrush frameBrush(QColor(frameColor.red() + value * (onDefaultPenColor.red() - frameColor.red()), - frameColor.green() + value * (onDefaultPenColor.green() - frameColor.green()), - frameColor.blue() + value * (onDefaultPenColor.blue() - frameColor.blue()))); - QColor penColor = frameBrush.color(); -// qDebug()<<"onDefaultPenColor......." << onDefaultPenColor.red() << onDefaultPenColor.green() << onDefaultPenColor.blue() << onDefaultPenColor.alphaF(); - penColor.setAlphaF(onDefaultPenColor.alphaF()); - painter->setPen(QPen(QBrush(penColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); - - painter->setBrush(brush); - painter->drawEllipse(rect); - painter->restore(); - painter->save(); - - QRectF childRect(rect.x(), rect.y(), value * 1.0 * ( sp->radioButtonParameters.childrenRadius), value * 1.0 * ( sp->radioButtonParameters.childrenRadius)); - childRect.moveCenter(rect.center()); - painter->setPen(Qt::NoPen); - painter->setRenderHint(QPainter::Antialiasing); - painter->setBrush(sp->radioButtonParameters.radioButtonChildrenOnDefaultBrush); - painter->drawEllipse(childRect); - painter->restore(); - return; - } - else if (enable && sp->radioButtonParameters.animation && - animator != nullptr && animator->isRunning("Off")) { - float value = animator->value("Off").toFloat(); -// qDebug() << "off SunKenOn value......" << qobject_cast<const QRadioButton *>(widget)->text() << value; - QPen pen = sp->radioButtonParameters.radioButtonDefaultPen; - pen.color().setAlphaF(sp->radioButtonParameters.radioButtonDefaultPen.color().alphaF() * (1.0 - value)); - painter->setPen(pen); - QColor defaultColor = sp->radioButtonParameters.radioButtonDefaultBrush.color(); - QColor onDefaultColor = sp->radioButtonParameters.radioButtonOnDefaultBrush.color(); - QBrush brush(QColor(defaultColor.red() + value * (onDefaultColor.red() - defaultColor.red()), - defaultColor.green() + value * (onDefaultColor.green() - defaultColor.green()), - defaultColor.blue() + value * (onDefaultColor.blue() - defaultColor.blue()))); - - painter->setBrush(brush); - painter->drawEllipse(rect); - QRectF childRect(rect.x(), rect.y(), ( sp->radioButtonParameters.childrenRadius) * (value) * 1.0, (value) * 1.0 * ( sp->radioButtonParameters.childrenRadius)); - childRect.moveCenter(rect.center()); - painter->setPen(Qt::NoPen); - painter->setRenderHint(QPainter::Antialiasing); - painter->setBrush(sp->radioButtonParameters.radioButtonChildrenOnDefaultBrush); - painter->drawEllipse(childRect); - painter->restore(); - return; - } - - if (enable) { - if (on) { - if (animator != nullptr) { - if (sp->radioButtonParameters.animation && !animator->isRunning("SunKenOn") ) { - // qDebug() << "SunKenOn time....:" << qobject_cast<const QRadioButton *>(widget)->text() << animator->currentAnimatorTime("SunKenOn"); - if(animator->currentAnimatorTime("SunKenOn") == 0){ - animator->startAnimator("SunKenOn"); - animator->setAnimatorCurrentTime("Off", 0); -// qDebug() << "startAnimator SunKenOn......" << qobject_cast<const QRadioButton *>(widget)->text() << animator->currentAnimatorTime("Off"); - painter->setPen(sp->radioButtonParameters.radioButtonDefaultPen); - painter->setBrush(sp->radioButtonParameters.radioButtonDefaultBrush); - painter->drawEllipse(rect); - painter->restore(); - return; - } - } - } - if (sunKen) { - painter->setPen(sp->radioButtonParameters.radioButtonOnClickPen); - painter->setBrush(sp->radioButtonParameters.radioButtonOnClickBrush); - } else if (mouseOver) { - painter->setPen(sp->radioButtonParameters.radioButtonOnHoverPen); - painter->setBrush(sp->radioButtonParameters.radioButtonOnHoverBrush); - } else { - painter->setPen(sp->radioButtonParameters.radioButtonOnDefaultPen); - painter->setBrush(sp->radioButtonParameters.radioButtonOnDefaultBrush); - } - painter->drawEllipse(rect); - painter->restore(); - painter->save(); - QRectF childRect(rect.x(), rect.y(), sp->radioButtonParameters.childrenRadius, sp->radioButtonParameters.childrenRadius); - childRect.moveCenter(rect.center()); - painter->setPen(Qt::NoPen); - painter->setRenderHint(QPainter::Antialiasing); - painter->setBrush(sp->radioButtonParameters.radioButtonChildrenOnDefaultBrush); - painter->drawEllipse(childRect); - - painter->restore(); - return; - } else { - if (sp->radioButtonParameters.animation && animator != nullptr) { - if (!animator->isRunning("Off") && animator->currentAnimatorTime("SunKenOn") > 0 && animator->currentAnimatorTime("Off") == 0) { - animator->startAnimator("Off"); - animator->setAnimatorCurrentTime("SunKenOn", 0); - painter->restore(); - return; - } - } - if (sunKen) { - painter->setPen(sp->radioButtonParameters.radioButtonClickPen); - painter->setBrush(sp->radioButtonParameters.radioButtonClickBrush); - } else if (mouseOver) { - painter->setPen(sp->radioButtonParameters.radioButtonHoverPen); - painter->setBrush(sp->radioButtonParameters.radioButtonHoverBrush); - } else { - painter->setPen(sp->radioButtonParameters.radioButtonDefaultPen); - painter->setBrush(sp->radioButtonParameters.radioButtonDefaultBrush); - } - painter->drawEllipse(rect); - } - } else { - painter->setPen(sp->radioButtonParameters.radioButtonDisablePen); - painter->setBrush(sp->radioButtonParameters.radioButtonDisableBrush); - painter->drawEllipse(rect); - - if (on) { - QRectF childRect(rect.x(), rect.y(), sp->radioButtonParameters.childrenRadius, sp->radioButtonParameters.childrenRadius); - childRect.moveCenter(rect.center()); - painter->setPen(Qt::NoPen); - painter->setBrush(sp->radioButtonParameters.radioButtonChildrenOnDisableBrush); - painter->drawEllipse(childRect); - } - } - painter->restore(); - return; - } - break; - } - - case PE_IndicatorCheckBox: - { - if (const QStyleOptionButton *checkbox = qstyleoption_cast<const QStyleOptionButton*>(option)) { - sp->initCheckBoxParameters(isUseDarkPalette(), option, widget); - bool enable = checkbox->state & State_Enabled; - bool mouseOver = checkbox->state & State_MouseOver; - bool sunKen = checkbox->state & State_Sunken; - bool on = checkbox->state & State_On; - bool noChange = checkbox->state & State_NoChange; - - QRectF rect = checkbox->rect; - QRectF pathrect = rect.adjusted(1, 1, -1, -1); - double width = pathrect.width(); - double heigth = pathrect.height(); - int margin = 0; - - QPainterPath path; - painter->save(); - painter->setClipRect(rect); - if(sp->checkBoxParameters.radius != 0) - painter->setRenderHint(QPainter::Antialiasing); - - auto animator = m_checkbox_animation_helper->animator(widget); - if (sp->checkBoxParameters.animation && animator != nullptr) { - if(animator->isRunning("OnBase")) - { - float value = animator->value("OnBase").toFloat(); -// qDebug() << "onBase.....value:" << value; - margin = sp->checkBoxParameters.checkBoxDefaultPen.width(); - - QColor onDefaultColor = mouseOver ? (!sp->checkBoxParameters.onHoverBrushIslinearGradient ? - sp->checkBoxParameters.checkBoxOnHoverBrush.color() : - sp->checkBoxParameters.checkBoxOnDefaultBrush.color()) : - sp->checkBoxParameters.checkBoxOnDefaultBrush.color(); - QColor clickColor = sp->checkBoxParameters.checkBoxClickBrush.color(); - QColor frameColor = sp->checkBoxParameters.checkBoxHoverPen.color(); - QColor onDefaultPenColor = mouseOver ? sp->checkBoxParameters.checkBoxOnHoverPen.color() : sp->checkBoxParameters.checkBoxOnDefaultPen.color(); - QBrush brush(QColor(clickColor.red() + value * (onDefaultColor.red() - clickColor.red()), - clickColor.green() + value * (onDefaultColor.green() - clickColor.green()), - clickColor.blue() + value * (onDefaultColor.blue() - clickColor.blue()))); - QBrush frameBrush(QColor(frameColor.red() + value * (onDefaultPenColor.red() - frameColor.red()), - frameColor.green() + value * (onDefaultPenColor.green() - frameColor.green()), - frameColor.blue() + value * (onDefaultPenColor.blue() - frameColor.blue()))); - - QColor penColor = frameBrush.color(); - penColor.setAlphaF(frameColor.alphaF()); - painter->setPen(QPen(QBrush(penColor), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));//sp->checkBoxParameters.checkBoxDefaultPen); - painter->setBrush(brush); - if(painter->pen().width() == 1 && sp->checkBoxParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), sp->checkBoxParameters.radius, sp->checkBoxParameters.radius); - painter->restore(); - painter->save(); - } - else if (animator->isRunning("OnScale")) { - margin = sp->checkBoxParameters.checkBoxOnDefaultPen.width(); - painter->setBrush(mouseOver ? sp->checkBoxParameters.checkBoxOnHoverBrush : sp->checkBoxParameters.checkBoxOnDefaultBrush); - painter->setPen(mouseOver ? sp->checkBoxParameters.checkBoxOnHoverPen.color() : sp->checkBoxParameters.checkBoxOnDefaultPen.color()); - if(painter->pen().width() == 1 && sp->checkBoxParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), sp->checkBoxParameters.radius, sp->checkBoxParameters.radius); - painter->restore(); - painter->save(); - } - } - - - if (animator != nullptr) { - if(sp->checkBoxParameters.animation && animator->isRunning("OnOpacity")) - { - float value = animator->value("OnOpacity").toFloat(); - -// qDebug() << "OnOpacity.....value00000:" << value; - if (on) { - QBrush brush = sp->checkBoxParameters.checkBoxContentPen.brush(); - QColor color = brush.color(); - color.setAlphaF(value); - brush.setColor(color); - painter->setPen(QPen(brush, 1.5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); - } else if (noChange) { - QBrush brush = sp->checkBoxParameters.checkBoxContentPen.brush(); - QColor color = brush.color(); - color.setAlphaF(value); - brush.setColor(color); - painter->setPen(QPen(brush, 2)); - } - } - else{ - if (on) { - painter->setPen(QPen(sp->checkBoxParameters.checkBoxContentPen.brush(), 1.5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); - } else if (noChange) { - painter->setPen(QPen(sp->checkBoxParameters.checkBoxContentPen.brush(), 2)); - } - } - } - - if (sp->checkBoxParameters.animation && animator != nullptr && animator->isRunning("OnScale")) { - float value = animator->value("OnScale").toFloat(); - if (on) { - path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.top() + heigth / 2); - path.lineTo(pathrect.left() + width * 0.45, pathrect.bottom() - heigth / 3 - (1.0 - value) * heigth /8); - path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0, pathrect.top() + heigth / 3 + (1.0 - value) * heigth /6); - animator->setExtraProperty("nochange", false); - } else if (noChange) { - path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.center().y() - 0.5); - path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0 , pathrect.center().y() - 0.5); - animator->setExtraProperty("nochange", true); - } - painter->setBrush(Qt::NoBrush); - painter->drawPath(path); - painter->restore(); - return; - } - - if(path.isEmpty()) - { - if (on) { - path.moveTo(pathrect.left() + width / 4, pathrect.top() + heigth / 2); - path.lineTo(pathrect.left() + width * 0.45, pathrect.bottom() - heigth / 3); - path.lineTo(pathrect.right() - width / 4, pathrect.top() + heigth / 3); - if(animator != nullptr) - animator->setExtraProperty("nochange", false); - } else if (noChange) { - path.moveTo(pathrect.left() + width / 4, pathrect.center().y()); - path.lineTo(pathrect.right() - width / 4, pathrect.center().y()); - if(animator != nullptr) - animator->setExtraProperty("nochange", true); - } - } - - if (sp->checkBoxParameters.animation && animator != nullptr && animator->isRunning("Off")) { - float value = animator->value("Off").toFloat(); -// qDebug() << "Off.....value:" << value; - - margin = sp->checkBoxParameters.checkBoxDefaultPen.width(); - QPen pen = mouseOver ? sp->checkBoxParameters.checkBoxHoverPen : sp->checkBoxParameters.checkBoxDefaultPen; - pen.color().setAlphaF(sp->checkBoxParameters.checkBoxDefaultPen.color().alphaF() * (1.0 - value)); - painter->setPen(pen); - QColor defaultColor = mouseOver ? sp->checkBoxParameters.checkBoxHoverBrush.color() : sp->checkBoxParameters.checkBoxDefaultBrush.color(); - QColor onDefaultColor = sp->checkBoxParameters.checkBoxOnDefaultBrush.color(); - QBrush brush(QColor(defaultColor.red() + value * (onDefaultColor.red() - defaultColor.red()), - defaultColor.green() + value * (onDefaultColor.green() - defaultColor.green()), - defaultColor.blue() + value * (onDefaultColor.blue() - defaultColor.blue()))); - // qDebug() << "sunkenon brush...." << brush.color().red() << brush.color().green() << brush.color().blue(); - painter->setBrush(brush); - if(painter->pen().width() == 1 && sp->checkBoxParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), sp->checkBoxParameters.radius, sp->checkBoxParameters.radius); - painter->restore(); - painter->save(); - bool _nochange = animator->getExtraProperty("noChange").toBool(); -// qDebug() << "_nochange.........." << _nochange; - if (!_nochange) { -// qDebug() << "off ......on,,,,,,,,,,,"; - path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.top() + heigth / 2); - path.lineTo(pathrect.left() + width * 0.45, pathrect.bottom() - heigth / 3 - (1.0 - value) * heigth /8); - path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0, pathrect.top() + heigth / 3 + (1.0 - value) * heigth /6); - - QBrush brush = sp->checkBoxParameters.checkBoxContentPen.brush(); - QColor color = brush.color(); - color.setAlphaF(value); - brush.setColor(color); - painter->setPen(QPen(brush, 1.5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); - painter->setRenderHint(QPainter::Antialiasing, true); - - } else if (_nochange) { -// qDebug() << "off ......noChange,,,,,,,,,,,"; - - path.moveTo(pathrect.left() + width / 2 - 0.4 * width/4.0 - value * 0.6 * width /4.0, pathrect.center().y()); - path.lineTo(pathrect.right() - width / 4 - (1.0 - value) * 0.6 * width /4.0 , pathrect.center().y()); - - QBrush brush = sp->checkBoxParameters.checkBoxContentPen.brush(); - QColor color = brush.color(); - color.setAlphaF(value); - brush.setColor(color); - painter->setPen(QPen(brush, 2)); - } - - painter->setBrush(Qt::NoBrush); - painter->drawPath(path); - painter->restore(); - return; - } - - if (enable) { - if (on | noChange) { - if(sp->checkBoxParameters.animation && animator != nullptr) - { - if(!animator->isRunning("OnBase") && animator->currentAnimatorTime("OnBase") == 0) - { - animator->startAnimator("OnBase"); - } - if(!animator->isRunning("OnOpacity") && animator->currentAnimatorTime("OnOpacity") == 0) - { - animator->startAnimator("OnOpacity"); - } - if(!animator->isRunning("OnScale") && animator->currentAnimatorTime("OnScale") == 0) - { - animator->startAnimator("OnScale"); - margin = sp->checkBoxParameters.checkBoxDefaultPen.width(); - painter->setPen(sp->checkBoxParameters.checkBoxClickPen); - painter->setBrush(sp->checkBoxParameters.checkBoxClickBrush); - -// qDebug() << "start onscale............"; -// painter->setPen(sp->checkBoxParameters.checkBoxDefaultPen); -// painter->setBrush(Qt::yellow);//sp->checkBoxParameters.checkBoxHoverPen); - if(painter->pen().width() == 1 && sp->checkBoxParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), sp->checkBoxParameters.radius, sp->checkBoxParameters.radius); - painter->restore(); - animator->setAnimatorCurrentTime("Off", 0); - animator->setExtraProperty("nochange", false); - return; - } - } - if (sunKen) { - margin = sp->checkBoxParameters.checkBoxOnClickPen.width(); - painter->setPen(sp->checkBoxParameters.checkBoxOnClickPen); - painter->setBrush(sp->checkBoxParameters.checkBoxOnClickBrush); - } else if (mouseOver) { - margin = sp->checkBoxParameters.checkBoxOnHoverPen.width(); - painter->setPen(sp->checkBoxParameters.checkBoxOnHoverPen); - painter->setBrush(sp->checkBoxParameters.checkBoxOnHoverBrush); - } else { - margin = sp->checkBoxParameters.checkBoxOnDefaultPen.width(); - painter->setPen(sp->checkBoxParameters.checkBoxOnDefaultPen); - painter->setBrush(sp->checkBoxParameters.checkBoxOnDefaultBrush); - } - if(painter->pen().width() == 1 && sp->checkBoxParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), - sp->checkBoxParameters.radius, sp->checkBoxParameters.radius); - painter->restore(); - painter->save(); - //draw path - if (on) { - painter->setPen(QPen(sp->checkBoxParameters.checkBoxPathBrush, 1.5, - Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); - painter->setRenderHint(QPainter::Antialiasing, true); - } else if (noChange) { - painter->setPen(QPen(sp->checkBoxParameters.checkBoxPathBrush, 2)); - } - painter->setBrush(Qt::NoBrush); - painter->drawPath(path); - } else { - if (animator != nullptr) { - if(sp->checkBoxParameters.animation && !animator->isRunning("Off") && - animator->currentAnimatorTime("Off") == 0 && - animator->currentAnimatorTime("OnScale") > 0 && - animator->currentAnimatorTime("OnOpacity") > 0 && - animator->currentAnimatorTime("OnBase") > 0) { - animator->startAnimator("Off"); - animator->setAnimatorCurrentTime("OnScale", 0); - animator->setAnimatorCurrentTime("OnOpacity", 0); - animator->setAnimatorCurrentTime("OnBase", 0); - painter->restore(); - return; - } - } - if (sunKen) { - margin = sp->checkBoxParameters.checkBoxClickPen.width(); - painter->setPen(sp->checkBoxParameters.checkBoxClickPen); - painter->setBrush(sp->checkBoxParameters.checkBoxClickBrush); - } else if (mouseOver) { - margin = sp->checkBoxParameters.checkBoxHoverPen.width(); - painter->setPen(sp->checkBoxParameters.checkBoxHoverPen); - painter->setBrush(sp->checkBoxParameters.checkBoxHoverBrush); - } else { - margin = sp->checkBoxParameters.checkBoxDefaultPen.width(); - painter->setPen(sp->checkBoxParameters.checkBoxDefaultPen); - painter->setBrush(sp->checkBoxParameters.checkBoxDefaultBrush); - } - if(painter->pen().width() == 1 && sp->checkBoxParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), - sp->checkBoxParameters.radius, sp->checkBoxParameters.radius); - } - } else { - margin = sp->checkBoxParameters.checkBoxDisablePen.width(); - painter->setPen(sp->checkBoxParameters.checkBoxDisablePen); - painter->setBrush(sp->checkBoxParameters.checkBoxDisableBrush); - if(painter->pen().width() == 1 && sp->checkBoxParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->drawRoundedRect(rect.adjusted(margin, margin, -margin, -margin), - sp->checkBoxParameters.radius, sp->checkBoxParameters.radius); - painter->restore(); - painter->save(); - if (on | noChange) { - if (on) { - painter->setPen(QPen(checkbox->palette.brush(QPalette::Disabled, QPalette::ButtonText), 1.5, - Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); - } else if (noChange) { - painter->setPen(QPen(checkbox->palette.brush(QPalette::Disabled, QPalette::ButtonText), 2)); - } - painter->setBrush(Qt::NoBrush); - painter->drawPath(path); - } - } - painter->restore(); - return; - } - break; - } - - case PE_IndicatorTabTearLeft: - return; - - case PE_IndicatorTabTearRight: - return; - - case PE_PanelScrollAreaCorner: - { - painter->save(); - painter->setPen(Qt::NoPen); - painter->setBrush(option->palette.brush(QPalette::Active, QPalette::Base)); - painter->drawRect(option->rect); - painter->restore(); - return; - } - - case PE_IndicatorHeaderArrow: - { - if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) { - if (header->sortIndicator == QStyleOptionHeader::SortDown) - return proxy()->drawPrimitive(PE_IndicatorArrowDown, header, painter, widget); - if (header->sortIndicator == QStyleOptionHeader::SortUp) - return proxy()->drawPrimitive(PE_IndicatorArrowUp, header, painter, widget); - } - break; - } - - case PE_PanelItemViewRow: - { - if (const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option)) { - QPalette::ColorGroup cg = (widget ? widget->isEnabled() : (vi->state & QStyle::State_Enabled)) - ? QPalette::Normal : QPalette::Disabled; - if (cg == QPalette::Normal && !(vi->state & QStyle::State_Active)) - cg = QPalette::Inactive; - - int Radius = 0;//sp->radius; - bool isTree = false; - - if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) { - isTree = true; - } - - if (isTree) { - if (proxy()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, option, widget)) { - if (vi->features & QStyleOptionViewItem::Alternate) { - painter->save(); - painter->setPen(Qt::NoPen); - painter->setBrush(vi->palette.brush(cg, QPalette::AlternateBase)); - painter->drawRect(vi->rect); - painter->restore(); - } - } - } else if (vi->features & QStyleOptionViewItem::Alternate) { - painter->save(); - painter->setPen(Qt::NoPen); - painter->setBrush(vi->palette.brush(cg, QPalette::AlternateBase)); - painter->drawRoundedRect(vi->rect, Radius, Radius); - painter->restore(); - } - return; - } - break; - } - - case PE_PanelItemViewItem: - { - if (const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option)) { - bool isIconMode = false; - const bool enable = vi->state & State_Enabled; - const bool select = vi->state & State_Selected; - const bool hover = vi->state & State_MouseOver; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush selectBrush; - QBrush disableBrush; - QPen hoverPen = Qt::NoPen; - QPen selectPen = Qt::NoPen; - QPainterPath path; - QPainterPath borderPath0; - QPainterPath borderPath1; - QPainterPath borderPath2; - - bool isList = false; - bool isTable = false; - bool isTree = false; - if(qobject_cast<const QListView *>(widget) || qobject_cast<const QListWidget *>(widget)) - isList = true; - if(qobject_cast<const QTableView *>(widget) || qobject_cast<const QTableWidget *>(widget)) - isTable = true; - if(qobject_cast<const QTreeView *>(widget) || qobject_cast<const QTreeView *>(widget)) - isTree = true; - - if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) { - sp->initTreeParameters(isUseDarkPalette(), option, widget); - - defaultBrush = sp->treeParameters.treeDefaultBrush; - hoverBrush = sp->treeParameters.treeHoverBrush; - selectBrush = sp->treeParameters.treeSelectBrush; - disableBrush = sp->treeParameters.treeDisableBrush; - hoverPen = sp->treeParameters.treeHoverPen; - selectPen = sp->treeParameters.treeSelectPen; - - int borderWidth = hoverPen.width(); - - if (vi->viewItemPosition == QStyleOptionViewItem::Beginning) { - if(vi->rect.left() == 0) { - QRect rect = vi->rect.adjusted(0, 0, 1, 1); - path.moveTo(rect.left(), rect.top() + sp->treeParameters.radius); - path.arcTo(rect.left(), rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 180, -90); - path.lineTo(rect.right(), rect.top()); - path.lineTo(rect.right(), rect.bottom()); - path.lineTo(rect.left() + sp->treeParameters.radius, rect.bottom()); - path.arcTo(rect.left(), rect.bottom() - 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, -90, -90); - path.lineTo(rect.left(), rect.top() + sp->treeParameters.radius); - - - borderPath0.moveTo(rect.left(), rect.top() + sp->treeParameters.radius); - borderPath0.arcTo(rect.left(), rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 180, -90); - borderPath0.lineTo(rect.right() + borderWidth, rect.top()); - borderPath1.moveTo(rect.right() + borderWidth, rect.bottom() - 1); - borderPath1.lineTo(rect.left() + sp->treeParameters.radius, rect.bottom() - 1); - borderPath1.arcTo(rect.left(), rect.bottom() - 1 - 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, -90, -90); - borderPath1.lineTo(rect.left(), rect.top() + sp->treeParameters.radius); - } else { - path.addRect(vi->rect); - - borderPath0.moveTo(vi->rect.left(), vi->rect.top()); - borderPath0.lineTo(vi->rect.right() + borderWidth, vi->rect.top()); - borderPath1.moveTo(vi->rect.right() + borderWidth, vi->rect.bottom()); - borderPath1.lineTo(vi->rect.left(), vi->rect.bottom()); - } - } else if (vi->viewItemPosition == QStyleOptionViewItem::Middle) { - path.addRect(option->rect); - - borderPath0.moveTo(option->rect.left(), option->rect.top()); - borderPath0.lineTo(option->rect.right() + borderWidth, option->rect.top()); - borderPath1.moveTo(option->rect.left(), option->rect.bottom()); - borderPath1.lineTo(option->rect.right() + borderWidth, option->rect.bottom()); - - } else if (vi->viewItemPosition == QStyleOptionViewItem::End) { - QRect rect = vi->rect.adjusted(0, 0, 1, 1); - path.moveTo(rect.left(), rect.top()); - path.lineTo(rect.right() - sp->treeParameters.radius, rect.top()); - path.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 90, -90); - path.lineTo(rect.right(), rect.bottom() - 2 * sp->treeParameters.radius); - path.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.bottom() - 2 * sp->treeParameters.radius, - 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 0, -90); - path.lineTo(rect.left(), rect.bottom()); - path.lineTo(rect.left(), rect.top()); - - borderPath0.moveTo(rect.left(), rect.top()); - borderPath0.lineTo(rect.right() - sp->treeParameters.radius, rect.top()); - borderPath0.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 90, -90); - borderPath2.moveTo(rect.right(), rect.top() + sp->treeParameters.radius); - borderPath2.lineTo(rect.right(), rect.bottom() -1 - 2 * sp->treeParameters.radius); - borderPath1.moveTo(rect.right(), rect.bottom() -1 - 2 * sp->treeParameters.radius); - borderPath1.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.bottom() - 1 - 2 * sp->treeParameters.radius, - 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 0, -90); - borderPath1.lineTo(rect.left(), rect.bottom() - 1); - - - } else if (vi->viewItemPosition == QStyleOptionViewItem::OnlyOne) { - if(vi->rect.left() == 0) { - path.addRoundedRect(vi->rect, sp->treeParameters.radius, sp->treeParameters.radius); - - borderPath0.addRoundedRect(vi->rect, sp->treeParameters.radius, sp->treeParameters.radius); - } else { - QRect rect = vi->rect.adjusted(0, 0, 1, 1); - path.moveTo(rect.left(), rect.top()); - path.lineTo(rect.right() - sp->treeParameters.radius, rect.top()); - path.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 90, -90); - path.lineTo(rect.right(), rect.bottom() - 2 * sp->treeParameters.radius); - path.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.bottom() - 2 * sp->treeParameters.radius, - 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 0, -90); - path.lineTo(rect.left(), rect.bottom()); - path.lineTo(rect.left(), rect.top()); - - borderPath0.moveTo(rect.left(), rect.top()); - borderPath0.lineTo(rect.right() - sp->treeParameters.radius, rect.top()); - borderPath0.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 90, -90); - borderPath2.moveTo(rect.right(), rect.top() + sp->treeParameters.radius); - borderPath2.lineTo(rect.right(), rect.bottom() -1 - 2 * sp->treeParameters.radius); - borderPath1.moveTo(rect.right(), rect.bottom() -1 - 2 * sp->treeParameters.radius); - borderPath1.arcTo(rect.right() - 2 * sp->treeParameters.radius, rect.bottom() - 1 - 2 * sp->treeParameters.radius, - 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 0, -90); - borderPath1.lineTo(rect.left(), rect.bottom() - 1); - - - } - } else { - path.addRect(vi->rect); - } - } else if(qobject_cast<const QListView *>(widget) || qobject_cast<const QListWidget *>(widget)){ - sp->initListParameters(isUseDarkPalette(), option, widget); - - defaultBrush = sp->listParameters.listDefaultBrush; - hoverBrush = sp->listParameters.listHoverBrush; - selectBrush = sp->listParameters.listSelectBrush; - disableBrush = sp->listParameters.listDisableBrush; - hoverPen = sp->listParameters.listHoverPen; - selectPen = sp->listParameters.listSelectPen; - - auto *listView = qobject_cast<const QListView *>(widget); - if(select && listView != nullptr){ - - if(listView == nullptr){ - path.addRoundedRect(vi->rect, sp->listParameters.radius, sp->listParameters.radius); - return; - } - int currentIndex = vi->index.row(); - int allNum = listView->model()->rowCount(); - - bool begin = false; - bool end = false; - bool mid = false; - bool onlyOne = false; - if(allNum == 1) - { - onlyOne = true; - } - else{ - QList<QModelIndex> selectList = listView->selectionModel()->selectedIndexes(); - QList<int> selectIndexList; - foreach (QModelIndex index, selectList) { - int i = index.row(); - selectIndexList.append(i); - } - if(selectIndexList.contains(currentIndex - 1) && selectIndexList.contains(currentIndex +1) && selectIndexList.contains(currentIndex)) - mid = true; - else if(selectIndexList.contains(currentIndex - 1)) - end = true; - else if(selectIndexList.contains(currentIndex +1)) - begin = true; - } - - if(begin){ - QRect rect = vi->rect; - path.moveTo(rect.left(), rect.bottom() + 1); - path.lineTo(rect.left(), rect.top() + sp->listParameters.radius); - path.arcTo(rect.left(), rect.top(), 2 * sp->listParameters.radius, 2 * sp->listParameters.radius, 180, -90); - path.lineTo(rect.right() - sp->listParameters.radius, rect.top()); - path.arcTo(rect.right() - 2 * sp->listParameters.radius, rect.top(), 2 * sp->listParameters.radius, 2 * sp->listParameters.radius, 90, -90); - path.lineTo(rect.right(), rect.bottom() +1); - path.lineTo(rect.left(), rect.bottom() + 1); - } - else if(mid){ - QRect rect = vi->rect; - path.moveTo(rect.left(), rect.bottom() + 1); - path.lineTo(rect.left(), rect.top()); - path.lineTo(rect.right(), rect.top()); - path.lineTo(rect.right(), rect.bottom() +1); - path.lineTo(rect.left(), rect.bottom() + 1); - } - else if(end) - { - QRect rect = vi->rect; - path.moveTo(rect.left(), rect.top()); - path.lineTo(rect.right(), rect.top()); - path.lineTo(rect.right(), rect.bottom() - sp->listParameters.radius); - path.arcTo(rect.right() - 2 * sp->listParameters.radius, rect.bottom() - 2 * sp->listParameters.radius, - 2 * sp->listParameters.radius, 2 * sp->listParameters.radius, 0, -90); - path.lineTo(rect.left() + sp->listParameters.radius, rect.bottom()); - path.arcTo(rect.left(), rect.bottom() - 2 * sp->listParameters.radius, 2 * sp->listParameters.radius, 2 * sp->listParameters.radius, -90, -90); - path.lineTo(rect.left(), rect.top()); - } - else - { - path.addRoundedRect(vi->rect, sp->listParameters.radius, sp->listParameters.radius); - } - } - else{ - path.addRoundedRect(vi->rect, sp->listParameters.radius, sp->listParameters.radius); - } - } else if(qobject_cast<const QTableView *>(widget) || qobject_cast<const QTableWidget *>(widget)){ - sp->initTableParameters(isUseDarkPalette(), option, widget); - - defaultBrush = sp->tableParameters.tableDefaultBrush; - hoverBrush = sp->tableParameters.tableHoverBrush; - selectBrush = sp->tableParameters.tableSelectBrush; - disableBrush = sp->tableParameters.tableDisableBrush; - hoverPen = sp->tableParameters.tableHoverPen; - selectPen = sp->tableParameters.tableSelectPen; - path.addRoundedRect(vi->rect, sp->tableParameters.radius, sp->tableParameters.radius); - } - else { - path.addRect(vi->rect); - defaultBrush = QBrush(Qt::transparent); - hoverBrush = option->palette.brush(QPalette::Disabled, QPalette::Midlight); - selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); - disableBrush = QBrush(Qt::transparent); - } - - if ((vi->decorationPosition == QStyleOptionViewItem::Top) || (vi->decorationPosition == QStyleOptionViewItem::Bottom)) - isIconMode = true; - - if (isIconMode) { - QRect iconRect = proxy()->subElementRect(SE_ItemViewItemDecoration, option, widget); - QRect textRect = proxy()->subElementRect(SE_ItemViewItemText, option, widget); - int iconMode_Radius = sp->radius; - - if (!enable) - return; - - if (select) { - if (iconRect.isValid() && textRect.isValid()) { - int Margin_Height = 2; - const int Margin = proxy()->pixelMetric(QStyle::PM_FocusFrameHMargin, option, widget); - iconRect.setRect(option->rect.x(), option->rect.y(), option->rect.width(), iconRect.height() + Margin + Margin_Height); - textRect.setRect(option->rect.x(), iconRect.bottom() + 1, option->rect.width(), option->rect.height() - iconRect.height()); - QPainterPath iconPath, textPath; - iconPath.moveTo(iconRect.x(), iconRect.y() + iconMode_Radius); - iconPath.arcTo(iconRect.x(), iconRect.y(), iconMode_Radius * 2, iconMode_Radius * 2, 180, -90); - iconPath.lineTo(iconRect.right() + 1 - iconMode_Radius, iconRect.y()); - iconPath.arcTo(iconRect.right() + 1 - iconMode_Radius * 2, iconRect.y(), iconMode_Radius * 2, iconMode_Radius * 2, - 90, -90); - iconPath.lineTo(iconRect.right() + 1, iconRect.bottom() + 1); - iconPath.lineTo(iconRect.left(), iconRect.bottom() + 1); - iconPath.lineTo(iconRect.left(), iconRect.top() + iconMode_Radius); - - textPath.moveTo(textRect.x(), textRect.y()); - textPath.lineTo(textRect.right() + 1, textRect.y()); - textPath.lineTo(textRect.right() + 1, textRect.bottom() + 1 - iconMode_Radius); - textPath.arcTo(textRect.right() + 1 - iconMode_Radius * 2, textRect.bottom() + 1 - iconMode_Radius * 2, iconMode_Radius * 2, iconMode_Radius * 2, - 0, -90); - textPath.lineTo(textRect.left() + iconMode_Radius, textRect.bottom() + 1); - textPath.arcTo(textRect.left(), textRect.bottom() + 1 - iconMode_Radius * 2, iconMode_Radius * 2, iconMode_Radius * 2, - 270, -90); - textPath.lineTo(textRect.left(), textRect.top()); - - painter->save(); - painter->setPen(Qt::NoPen); - painter->setRenderHint(QPainter::Antialiasing, true); - QColor c = vi->palette.color(QPalette::BrightText); - c.setAlphaF(isUseDarkPalette() ? 0.20 : 0.10); - painter->setBrush(QBrush(c));//(vi->palette.brush(QPalette::Active, QPalette::Button)); - painter->drawPath(iconPath); - painter->setBrush(vi->palette.brush(QPalette::Active, QPalette::Highlight)); - painter->drawPath(textPath); - painter->restore(); - } else { - painter->save(); - painter->setPen(Qt::NoPen); - painter->setRenderHint(QPainter::Antialiasing, true); - painter->setBrush(vi->palette.brush(QPalette::Active, QPalette::Highlight)); - painter->drawRoundedRect(option->rect, iconMode_Radius, iconMode_Radius); - painter->restore(); - } - } else { - painter->save(); - painter->setPen(Qt::NoPen); - painter->setRenderHint(QPainter::Antialiasing, true); - if (hover) { - QColor c = option->palette.color(QPalette::BrightText); - c.setAlphaF(isUseDarkPalette() ? 0.15 : 0.05); - painter->setBrush(QBrush(c));//(button_Hover(option)); - painter->drawRoundedRect(option->rect, iconMode_Radius, iconMode_Radius); - } - else if (vi->backgroundBrush.style() != Qt::NoBrush) { - QPointF oldBO = painter->brushOrigin(); - painter->setBrushOrigin(vi->rect.topLeft()); - painter->setBrush(vi->backgroundBrush); - painter->drawRoundedRect(vi->rect, iconMode_Radius, iconMode_Radius); - painter->setBrushOrigin(oldBO); - } - - painter->restore(); - } - } else { - if (vi->backgroundBrush.style() != Qt::NoBrush) { - QPointF oldBO = painter->brushOrigin(); - painter->setBrushOrigin(vi->rect.topLeft()); - painter->fillRect(vi->rect, vi->backgroundBrush); - painter->setBrushOrigin(oldBO); - } - painter->save(); - - painter->setRenderHint(QPainter::Antialiasing, true); - if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) - painter->setRenderHint(QPainter::Antialiasing, false); - - painter->setPen(Qt::NoPen); - - if (!enable) { - painter->setBrush(disableBrush); - } else if (select) { - painter->setBrush(selectBrush); - } else if (hover) { - painter->setBrush(hoverBrush); - } else { - painter->setBrush(defaultBrush); - } - painter->drawPath(path); - painter->restore(); - - painter->save(); - painter->setRenderHint(QPainter::Antialiasing, true); - painter->setPen(Qt::NoPen); - painter->setBrush(Qt::NoBrush); - - if (enable && select) { - painter->setPen(selectPen); - if(isTree){ - if(painter->pen().width() == 1) - painter->translate(0, 0.5); - - if(!borderPath0.isEmpty()){ - painter->drawPath(borderPath0); - } - if(!borderPath1.isEmpty()){ - painter->drawPath(borderPath1); - } - if(!borderPath2.isEmpty()){ - if(painter->pen().width() == 1) - painter->translate(-0.5, 0); - painter->drawPath(borderPath2); - } - } - else - painter->drawPath(path); - } else if (enable && hover) { - painter->setPen(hoverPen); - if(isTree){ - if(painter->pen().width() == 1) - painter->translate(0, 0.5); - - if(!borderPath0.isEmpty()){ - painter->drawPath(borderPath0); - } - if(!borderPath1.isEmpty()){ - painter->drawPath(borderPath1); - } - if(!borderPath2.isEmpty()){ - if(painter->pen().width() == 1) - painter->translate(-0.5, 0); - painter->drawPath(borderPath2); - } - - } - else - painter->drawPath(path); - } - painter->restore(); - } - if (vi->state & State_HasFocus) { - - } - return; - } - break; - } - - case PE_IndicatorBranch: - { - if (auto tree = qobject_cast<const QTreeView *>(widget)) { - bool isHover = option->state & State_MouseOver; - bool isSelected = option->state & State_Selected; - bool enable = option->state & State_Enabled; - QBrush brush; - QPen hoverPen = Qt::NoPen; - QPen selectPen = Qt::NoPen; - QPainterPath borderPath0; - QPainterPath borderPath1; - - sp->initTreeParameters(isUseDarkPalette(), option, widget); - - hoverPen = sp->treeParameters.treeHoverPen; - selectPen = sp->treeParameters.treeSelectPen; - - if (!enable) { - brush = sp->treeParameters.treeBranchDisableBrush; - } else if (isSelected) { - brush = sp->treeParameters.treeBranchSelectBrush; - } else if (isHover) { - brush = sp->treeParameters.treeBranchHoverBrush; - } else { - brush = sp->treeParameters.treeBranchDefaultBrush; - } - - QPainterPath path; - if (option->rect.left() == 0) { - //raund radius at beginning - QRect rect = option->rect.adjusted(0, 0, 1, 1); - path.moveTo(rect.left(), rect.top() + sp->treeParameters.radius); - path.arcTo(rect.left(), rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 180, -90); - path.lineTo(rect.right(), rect.top()); - path.lineTo(rect.right(), rect.bottom()); - path.lineTo(rect.left() + sp->treeParameters.radius, rect.bottom()); - path.arcTo(rect.left(), rect.bottom() - 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, -90, -90); - path.lineTo(rect.left(), rect.top() + sp->treeParameters.radius); - - borderPath0.moveTo(rect.left(), rect.top() + sp->treeParameters.radius); - borderPath0.arcTo(rect.left(), rect.top(), 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 180, -90); - borderPath0.lineTo(rect.right(), rect.top()); - borderPath0.moveTo(rect.right(), rect.bottom() - 1); - borderPath0.lineTo(rect.left() + sp->treeParameters.radius, rect.bottom() - 1); - borderPath1.moveTo(rect.left() + sp->treeParameters.radius, rect.bottom() - 1); - borderPath1.arcTo(rect.left(), rect.bottom() - 1 - 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, 2 * sp->treeParameters.radius, -90, -90); - borderPath1.lineTo(rect.left(), rect.top() + sp->treeParameters.radius); - } else { - path.addRect(option->rect); - QRect rect = option->rect.adjusted(0, 0, 1, 1); - - borderPath0.moveTo(rect.left(), rect.top()); - borderPath0.lineTo(rect.right(), rect.top()); - borderPath1.moveTo(rect.right(), rect.bottom() - 1); - borderPath1.lineTo(rect.left(), rect.bottom() - 1); - } - - painter->save(); - painter->setRenderHint(QPainter::Antialiasing, true); - QPoint oldBO = painter->brushOrigin(); - if(isHover && tree->verticalScrollMode() == QAbstractItemView::ScrollPerPixel){ - painter->setBrushOrigin(QPoint(0,0)); - } - painter->setPen(Qt::NoPen); - painter->setBrush(brush); - painter->drawPath(path); - painter->setBrushOrigin(oldBO); - painter->restore(); - - painter->save(); - if(sp->treeParameters.radius != 0) - painter->setRenderHint(QPainter::Antialiasing, true); - painter->setPen(Qt::NoPen); - painter->setBrush(Qt::NoBrush); - - - if (enable && isSelected) { - painter->setPen(selectPen); - } else if (enable && isHover) { - painter->setPen(hoverPen); - } - - if(painter->pen().width() == 1 && sp->treeParameters.radius != 0) - painter->translate(0.5, 0.5); - - if(!borderPath0.isEmpty()){ - painter->drawPath(borderPath0); - } - if(!borderPath1.isEmpty()){ - painter->drawPath(borderPath1); - } - - painter->restore(); - - return Style::drawPrimitive(PE_IndicatorBranch, option, painter, widget); - - } - -// if (!(option->state & State_Children)) { -// return; -// } -// QStyleOption subOption = *option; -// if (proxy()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, option, widget)) -// subOption.state = option->state; -// else -// subOption.state = option->state & State_Enabled ? State_Enabled : State_None; - -// if (option->state & State_Open) { -// proxy()->drawPrimitive(PE_IndicatorArrowDown, &subOption, painter, widget); -// } else { -// const bool reverse = (option->direction == Qt::RightToLeft); -// proxy()->drawPrimitive(reverse ? PE_IndicatorArrowLeft : PE_IndicatorArrowRight, &subOption, painter, widget); -// } -// return; - } break; - - - case PE_IndicatorViewItemCheck: - return proxy()->drawPrimitive(PE_IndicatorCheckBox, option, painter, widget); - - case PE_IndicatorItemViewItemDrop: - { - QRect rect = option->rect; - int Radius = 4; - painter->save(); - painter->setClipRect(rect); - if(Radius != 0) - painter->setRenderHint(QPainter::Antialiasing, true); - if(painter->pen().width() == 1 && Radius != 0) - painter->translate(0.5, 0.5); - painter->setPen(option->palette.color(QPalette::Active, QPalette::Highlight)); - painter->setBrush(Qt::NoBrush); - if (option->rect.height() == 0) - painter->drawLine(rect.topLeft(), rect.topRight()); - else - painter->drawRoundedRect(rect, Radius, Radius); - painter->restore(); - return; - } - - default: - break; - } - - return Style::drawPrimitive(element, option, painter, widget); -} - -void Qt5UKUIStyle::drawComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const -{ - switch (control) { - case CC_ScrollBar: { - if (const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option)) { - sp->initScrollBarParameters(isUseDarkPalette(), option, widget); - if (widget && widget->property("drawScrollBarGroove").isValid() && (!widget->property("drawScrollBarGroove").toBool())) { - /*const bool active = bar->state & State_Active; - QColor color; - if (active) { - color = sp->scrollBarParameters.scrollBarGrooveDefaultBrush.color(); - auto animator = m_scrollbar_animation_helper->animator(widget); - if (animator) { - const bool mouseOver = bar->state & State_MouseOver; - if(sp->scrollBarParameters.animation) { - //hover color animation - animator->setAnimatorDirectionForward("bg_width", mouseOver); - - if (mouseOver) { - if (!animator->isRunning("bg_width") && animator->currentAnimatorTime("bg_width") == 0) { - animator->startAnimator("bg_width"); - } - } else { - if (!animator->isRunning("bg_width") && animator->currentAnimatorTime("bg_width") > 0) { - animator->startAnimator("bg_width"); - } - } - if(animator->isRunning("bg_width") || mouseOver){ - qreal ratio = animator->value("bg_width").toReal(); - color.setAlphaF(sp->scrollBarParameters.scrollBarGrooveDefaultBrush.color().alphaF() * ratio); - QRect rect = bar->rect; - const bool horizontal = bar->orientation == Qt::Horizontal; - if(horizontal){ - rect = QRect(bar->rect.x(), (bar->rect.y() + bar->rect.height() * (1 - ratio)), bar->rect.width(), bar->rect.height() * ratio); - } - else{ - rect = QRect((bar->rect.x() + bar->rect.width() * (1 - ratio)), bar->rect.top(), bar->rect.width() * ratio, bar->rect.height()); - } - painter->save(); - painter->setPen(Qt::NoPen); - painter->setBrush(color); - painter->drawRect(rect); - painter->restore(); - } - } - } - }*/ - } else { - const bool active = bar->state & State_Active; - painter->save(); - painter->setPen(Qt::NoPen); - if (active) { - painter->setBrush(sp->scrollBarParameters.scrollBarGrooveDefaultBrush); - } else { - painter->setBrush(sp->scrollBarParameters.scrollBarGrooveInactiveBrush); - } - painter->drawRect(bar->rect); - painter->restore(); - } - -// if (!(bar->activeSubControls & SC_ScrollBarSlider)) { -// newScrollbar.state &= ~(State_Sunken | State_MouseOver); -// } - - QStyleOptionSlider newScrollbar = *bar; - newScrollbar.rect = proxy()->subControlRect(control, option, SC_ScrollBarSlider, widget); - proxy()->drawControl(CE_ScrollBarSlider, &newScrollbar, painter, widget); - - if (sp->ScrooBar_ShowLine && widget && ((widget->property("drawScrollBarGroove").isValid() && - widget->property("drawScrollBarGroove").toBool()) || !widget->property("drawScrollBarGroove").isValid())) { - if (bar->subControls & SC_ScrollBarSubLine) { - QStyleOptionSlider subline = *bar; - subline.rect = proxy()->subControlRect(control, option, SC_ScrollBarSubLine, widget); - proxy()->drawControl(CE_ScrollBarSubLine, &subline, painter, widget); - } - if (bar->subControls & SC_ScrollBarAddLine) { - QStyleOptionSlider addline = *bar; - addline.rect = proxy()->subControlRect(control, option, SC_ScrollBarAddLine, widget); - proxy()->drawControl(CE_ScrollBarAddLine, &addline, painter, widget); - } - - } - return; - } - break; - } - - case CC_Slider: - { - if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) { - sp->initSliderParameters(isUseDarkPalette(), option, widget); - QRect groove = proxy()->subControlRect(CC_Slider, option, SC_SliderGroove, widget); - QRect handle = proxy()->subControlRect(CC_Slider, option, SC_SliderHandle, widget); - const bool horizontal = slider->orientation == Qt::Horizontal; - const bool enable = slider->state & State_Enabled; - const bool hover = slider->state & State_MouseOver; - const bool suken = slider->state & State_Sunken; - if (slider->subControls & SC_SliderGroove) { - if (horizontal) { - groove.setHeight(sp->Slider_GrooveLength); - groove.setWidth(groove.width() - 2 * sp->Slider_Margin); - } else { - groove.setWidth(sp->Slider_GrooveLength); - groove.setHeight(groove.height() - 2 * sp->Slider_Margin); - } - groove.moveTo((option->rect.width() - groove.width()) / 2, (option->rect.height() - groove.height()) /2); -// groove.moveCenter(option->rect.center()); - - QBrush sBrush, gBrush; - QRect sRect, gRect; - if (horizontal) { - if (slider->upsideDown) { - sRect.setLeft(handle.center().x()); - sRect.setTop(groove.top()); - sRect.setRight(groove.right() - 1); - sRect.setBottom(groove.bottom()); - gRect.setLeft(groove.left() + 1); - gRect.setTop(groove.top()); - gRect.setRight(handle.center().x()); - gRect.setBottom(groove.bottom()); - } else { - gRect.setLeft(handle.center().x()); - gRect.setTop(groove.top()); - gRect.setRight(groove.right() - 1); - gRect.setBottom(groove.bottom()); - sRect.setLeft(groove.left() + 1); - sRect.setTop(groove.top()); - sRect.setRight(handle.center().x()); - sRect.setBottom(groove.bottom()); - } - } else { - if (slider->upsideDown) { - gRect.setLeft(groove.left()); - gRect.setTop(groove.top() + 1); - gRect.setRight(groove.right()); - gRect.setBottom(handle.center().y()); - sRect.setLeft(groove.left()); - sRect.setTop(handle.center().y()); - sRect.setRight(groove.right()); - sRect.setBottom(groove.bottom() - 1); - } else { - sRect.setLeft(groove.left()); - sRect.setTop(groove.top() + 1); - sRect.setRight(groove.right()); - sRect.setBottom(handle.center().y()); - gRect.setLeft(groove.left()); - gRect.setTop(handle.center().y()); - gRect.setRight(groove.right()); - gRect.setBottom(groove.bottom() - 1); - } - } - - if (!enable) { - sBrush = sp->sliderParameters.sliderGrooveValueDisableBrush; - gBrush = sp->sliderParameters.sliderGrooveUnvalueDisableBrush; - } else if (hover) { - sBrush = sp->sliderParameters.sliderGrooveValueHoverBrush; - gBrush = sp->sliderParameters.sliderGrooveUnvalueHoverBrush; - } else { - sBrush = sp->sliderParameters.sliderGrooveValueDefaultBrush; - gBrush = sp->sliderParameters.sliderGrooveUnvalueDefaultBrush; - } - - painter->save(); - painter->setPen(sp->sliderParameters.sliderGroovePen); - if(sp->sliderParameters.sliderGrooveRadius != 0) - painter->setRenderHint(QPainter::Antialiasing, true); - if(painter->pen().width() == 1 && sp->sliderParameters.sliderGrooveRadius != 0) - painter->translate(0.5, 0.5); - painter->setBrush(sBrush); - painter->drawRoundedRect(sRect, sp->sliderParameters.sliderGrooveRadius, sp->sliderParameters.sliderGrooveRadius); - painter->setBrush(gBrush); - painter->drawRoundedRect(gRect, sp->sliderParameters.sliderGrooveRadius, sp->sliderParameters.sliderGrooveRadius); - painter->restore(); - } - - if (slider->subControls & SC_SliderTickmarks) { - int tick = 4; - int interval = slider->tickInterval; - if (interval < 1) - interval = slider->pageStep; - if (interval >= 1) { - int v = slider->minimum; - int len = proxy()->pixelMetric(PM_SliderLength, slider, widget); - const int thickSpace = 2; - painter->save(); - painter->setPen(option->palette.color(QPalette::Disabled, QPalette::NoRole)); - painter->setBrush(Qt::NoBrush); - while (v <= slider->maximum) { - int pos = sliderPositionFromValue(slider->minimum, slider->maximum, v, proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), - slider->upsideDown) + len / 2; - pos = pos + sp->Slider_Margin; - if (horizontal) { - if (slider->tickPosition & QSlider::TicksAbove) - painter->drawLine(pos, handle.top() - thickSpace, pos, handle.top() - thickSpace + tick); - if (slider->tickPosition & QSlider::TicksBelow) - painter->drawLine(pos, handle.bottom() + thickSpace - tick, pos, handle.bottom() + thickSpace); - } else { - if (slider->tickPosition & QSlider::TicksAbove) - painter->drawLine(handle.left() - thickSpace, pos, handle.left() - thickSpace + tick, pos); - if (slider->tickPosition & QSlider::TicksBelow) - painter->drawLine(handle.right() + thickSpace, pos, handle.right() + thickSpace - tick, pos); - } - v += interval; - } - painter->restore(); - } - } - - if (slider->subControls & SC_SliderHandle) { - //we need to reinit our brush because it has QGradient without use option rect - QStyleOptionSlider handleOption = *slider; - if(horizontal) - handle.setY((option->rect.height() - handle.height()) / 2); - else - handle.setX((option->rect.width() - handle.width()) / 2); - handleOption.rect = handle; - setSliderHandleRec(handleOption.rect); - - sp->initSliderParameters(isUseDarkPalette(), &handleOption, widget); - - QBrush hBrush; - QPen hPen; - if (!enable) { - hBrush = sp->sliderParameters.sliderHandleDisableBrush; - hPen = sp->sliderParameters.sliderHandleDisablePen; - } else if (suken) { - hBrush = sp->sliderParameters.sliderHandleClickBrush; - hPen = sp->sliderParameters.sliderHandleClickPen; - } else if (hover) { - hBrush = sp->sliderParameters.sliderHandleHoverBrush; - hPen = sp->sliderParameters.sliderHandleHoverPen; - } else { - hBrush = sp->sliderParameters.sliderHandleDefaultBrush; - hPen = sp->sliderParameters.sliderHandleDefaultPen; - } - - painter->save(); - painter->setRenderHint(QPainter::Antialiasing, true); - if(painter->pen().width() == 1) - painter->translate(0.5, 0.5); - painter->setPen(hPen); - painter->setBrush(hBrush); - painter->drawPath(sp->sliderParameters.sliderHandlePath); - painter->restore(); - } - return; - } - break; - } - - case CC_ComboBox: - { - if (const QStyleOptionComboBox *comboBox = qstyleoption_cast<const QStyleOptionComboBox *>(option)) { - sp->initComboBoxParameters(isUseDarkPalette(), option, widget); - const bool enable = comboBox->state & State_Enabled; - const bool on = comboBox->state & State_On; - const bool hover = comboBox->state & State_MouseOver; - int width = 0; - - painter->save(); - if(sp->comboBoxParameters.radius != 0) - painter->setRenderHint(QPainter::Antialiasing, true); - if (!enable) { - width = sp->comboBoxParameters.comboBoxDisablePen.width(); - painter->setPen(sp->comboBoxParameters.comboBoxDisablePen); - painter->setBrush(sp->comboBoxParameters.comboBoxDisableBrush); - } else { - if (comboBox->editable) { - if (comboBox->state & (State_HasFocus | State_On)) { - width = sp->comboBoxParameters.comboBoxEditPen.width(); - painter->setPen(sp->comboBoxParameters.comboBoxEditPen); - painter->setBrush(sp->comboBoxParameters.comboBoxEditBrush); - } else { - width = sp->comboBoxParameters.comboBoxDefaultPen.width(); - painter->setPen(sp->comboBoxParameters.comboBoxDefaultPen); - painter->setBrush(sp->comboBoxParameters.comboBoxDefaultBrush); - } - } else { - if (on) { - width = sp->comboBoxParameters.comboBoxOnPen.width(); - painter->setPen(sp->comboBoxParameters.comboBoxOnPen); - painter->setBrush(sp->comboBoxParameters.comboBoxOnBrush); - } else if (hover) { - width = sp->comboBoxParameters.comboBoxHoverPen.width(); - painter->setPen(sp->comboBoxParameters.comboBoxHoverPen); - painter->setBrush(sp->comboBoxParameters.comboBoxHoverBrush); - } else { - width = sp->comboBoxParameters.comboBoxDefaultPen.width(); - painter->setPen(sp->comboBoxParameters.comboBoxDefaultPen); - painter->setBrush(sp->comboBoxParameters.comboBoxDefaultBrush); - } - } - } - if(width == 1 && sp->comboBoxParameters.radius != 0) - painter->translate(0.5, 0.5); - - painter->drawRoundedRect(option->rect.adjusted(width, width, -width, -width), sp->comboBoxParameters.radius, sp->comboBoxParameters.radius); - painter->restore(); - return; - } - break; - } - - case CC_SpinBox: - { - if (const QStyleOptionSpinBox *sb = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) { - bool isHorizontalLayout = (sp->getSpinBoxControlLayout() == UKUIStyleParameters::SpinBoxControlLayout::Horizontal); - sp->initSpinBoxParameters(isUseDarkPalette(), option, widget, isHorizontalLayout); - bool enable = sb->state & State_Enabled; - bool up = sb->activeSubControls == SC_SpinBoxUp; - bool down = sb->activeSubControls == SC_SpinBoxDown; - bool hover = sb->state & State_MouseOver; - bool focus = sb->state & State_HasFocus; - bool sunken = sb->state & State_Sunken; - int width = 0; - QRect upRect = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxUp, widget); - QRect downRect = proxy()->subControlRect(CC_SpinBox, sb, SC_SpinBoxDown, widget); - - QStyleOption upOption, downOption; - upOption.rect = upRect; - downOption.rect = downRect; - bool hasBorder = false; - - painter->save(); - if(sp->spinBoxParameters.radius != 0) - painter->setRenderHint(QPainter::Antialiasing, true); - - if(isHorizontalLayout)//xc mode - { - if (!enable) { - upOption.state = State_None; - downOption.state = State_None; - painter->setPen(sp->spinBoxParameters.spinBoxDisablePen); - painter->setBrush(sp->spinBoxParameters.spinBoxDisableBrush); - hasBorder = false; -// if(painter->pen().width() == 1) -// painter->translate(0.5, 0.5); - painter->drawRect(option->rect.adjusted(sp->SpinBox_DefaultHeight, 0, -sp->SpinBox_DefaultHeight, -1)); - painter->restore(); - } - else - { - if (focus) { - int width = sp->spinBoxParameters.spinBoxFocusPen.width(); - hasBorder = true; - painter->setPen(sp->spinBoxParameters.spinBoxFocusPen); - painter->setBrush(sp->spinBoxParameters.spinBoxFocusBrush); - if(painter->pen().width() == 1 && sp->spinBoxParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->drawRoundedRect(option->rect.adjusted(width, width, -width, -width), - sp->spinBoxParameters.radius, sp->spinBoxParameters.radius); - - painter->restore(); - } else if (hover) { - painter->setPen(sp->spinBoxParameters.spinBoxHoverPen); - painter->setBrush(sp->spinBoxParameters.spinBoxHoverBrush); -// if(painter->pen().width() == 1) -// painter->translate(0.5, 0.5); - painter->drawRect(option->rect.adjusted(sp->SpinBox_DefaultHeight, 0, -sp->SpinBox_DefaultHeight, -1)); - painter->restore(); - } - else { - hasBorder = false; - painter->setPen(sp->spinBoxParameters.spinBoxDefaultPen); - painter->setBrush(sp->spinBoxParameters.spinBoxDefaultBrush); - if(painter->pen().width() == 1 && sp->spinBoxParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->drawRect(option->rect.adjusted(sp->SpinBox_DefaultHeight, 0, -sp->SpinBox_DefaultHeight, -1)); - painter->restore(); - } - } - - painter->save(); - painter->setPen(Qt::NoPen); - painter->setBrush(Qt::NoBrush); - int lineWidth = hasBorder ? 2 : 0; - int radius= sp->spinBoxParameters.radius; - if (sb->subControls & (SC_SpinBoxUp | SC_SpinBoxDown)) { - QPainterPath upPath; - - upPath.moveTo(upRect.left() + 2, upRect.top() + lineWidth + (hasBorder ? 1 : 0)); - upPath.lineTo(upRect.right() + 1 - radius - lineWidth, upRect.top() + lineWidth + (hasBorder ? 1 : 0)); - upPath.arcTo(upRect.right() + 1 - 2 * radius - lineWidth, upRect.top() + lineWidth + (hasBorder ? 1 : 0), radius * 2, radius * 2, 90, -90); - upPath.lineTo(upRect.right() + 1 - lineWidth, upRect.bottom() - lineWidth - radius); - upPath.arcTo(upRect.right() + 1 - 2 * radius - lineWidth, upRect.bottom() - lineWidth - 2 * radius, radius * 2, radius * 2, 0, -90); - upPath.lineTo(upRect.left() + 2, upRect.bottom() - lineWidth); - upPath.lineTo(upRect.left() + 2, upRect.top() + lineWidth + (hasBorder ? 1 : 0)); - - if (sb->stepEnabled & QAbstractSpinBox::StepUpEnabled) { - upOption.state |= State_Enabled; - if (up && enable) { - if (focus) { - if(sunken) - painter->setBrush(sp->spinBoxParameters.spinBoxUpClickBrush); - else - painter->setBrush(sp->spinBoxParameters.spinBoxUpHoverBrush); - - upOption.state |= State_MouseOver; - } else { - painter->setBrush(sp->spinBoxParameters.spinBoxUpHoverBrush); - } - - if (option->state & State_Sunken) { - painter->setBrush(sp->spinBoxParameters.spinBoxUpClickBrush); - upOption.state |= State_Sunken; - } - painter->drawPath(upPath); - } - else { - if(enable) - { - painter->setBrush(sp->spinBoxParameters.spinBoxUpDefaultBrush); - } - else - { - painter->setBrush(sp->spinBoxParameters.spinBoxDisableBrush); - } - painter->drawPath(upPath); - } - } else { - if(enable) - { - painter->setBrush(sp->spinBoxParameters.spinBoxUpDefaultBrush); - } - else - { - painter->setBrush(sp->spinBoxParameters.spinBoxUpDefaultBrush); - } - painter->drawPath(upPath); - - upOption.state = State_None; - } - painter->restore(); - - QPainterPath downPath; - painter->save(); - painter->setPen(Qt::NoPen); - painter->setBrush(Qt::NoBrush); - - downPath.moveTo(downRect.left() + 1 + radius + lineWidth, downRect.top() + lineWidth + (hasBorder ? 1 : 0)); - downPath.arcTo(downRect.left() + 1 + lineWidth, downRect.top() + lineWidth + (hasBorder ? 1 : 0), radius * 2, radius * 2, 90, 90); - downPath.lineTo(downRect.left() + 1 + lineWidth, downRect.bottom() - lineWidth - radius); - downPath.arcTo(downRect.left() + 1 + lineWidth, downRect.bottom() - lineWidth - 2 * radius, radius * 2, radius * 2, 180, 90); - downPath.lineTo(downRect.right(), downRect.bottom() - lineWidth); - downPath.lineTo(downRect.right(), downRect.top() + lineWidth + (hasBorder ? 1 : 0)); - downPath.lineTo(downRect.left() + 1 + radius, downRect.top() + lineWidth + (hasBorder ? 1 : 0)); - - if (sb->stepEnabled & QAbstractSpinBox::StepDownEnabled) { - downOption.state |= State_Enabled; - if (down && enable) { - if (focus) { - if(sunken) - painter->setBrush(sp->spinBoxParameters.spinBoxDownClickBrush); - else - painter->setBrush(sp->spinBoxParameters.spinBoxDownHoverBrush); - downOption.state |= State_MouseOver; - } else { - painter->setBrush(sp->spinBoxParameters.spinBoxDownHoverBrush); - } - - if (option->state & State_Sunken) { - painter->setBrush(sp->spinBoxParameters.spinBoxDownClickBrush); - downOption.state |= State_Sunken; - } - painter->drawPath(downPath); - } - else { - if(enable) - { - painter->setBrush(sp->spinBoxParameters.spinBoxDownDefaultBrush); - } - else - { - painter->setBrush(sp->spinBoxParameters.spinBoxDisableBrush); - } - painter->drawPath(downPath); - } - } - else { - if(enable) - { - painter->setBrush(sp->spinBoxParameters.spinBoxDownDefaultBrush); - } - else - { - painter->setBrush(sp->spinBoxParameters.spinBoxDisableBrush); - } - painter->drawPath(downPath); - - downOption.state = State_None; - } - painter->restore(); - - if (!enable) { - upOption.state = State_None; - downOption.state = State_None; - } - - if (sb->buttonSymbols == QAbstractSpinBox::PlusMinus) { - - } else if (sb->buttonSymbols == QAbstractSpinBox::UpDownArrows) { - proxy()->drawPrimitive(PE_IndicatorArrowUp, &upOption, painter, widget); - proxy()->drawPrimitive(PE_IndicatorArrowDown, &downOption, painter, widget); - } - } - } - else{//pc mode - if (!enable) { - width = sp->spinBoxParameters.spinBoxDisablePen.width(); - painter->setPen(sp->spinBoxParameters.spinBoxDisablePen); - painter->setBrush(sp->spinBoxParameters.spinBoxDisableBrush); - } else { - if (focus) { - width = sp->spinBoxParameters.spinBoxFocusPen.width(); - painter->setPen(sp->spinBoxParameters.spinBoxFocusPen); - painter->setBrush(sp->spinBoxParameters.spinBoxFocusBrush); - } else if (hover) { - width = sp->spinBoxParameters.spinBoxHoverPen.width(); - painter->setPen(sp->spinBoxParameters.spinBoxHoverPen); - painter->setBrush(sp->spinBoxParameters.spinBoxHoverBrush); - } else { - width = sp->spinBoxParameters.spinBoxDefaultPen.width(); - painter->setPen(sp->spinBoxParameters.spinBoxDefaultPen); - painter->setBrush(sp->spinBoxParameters.spinBoxDefaultBrush); - } - } - - if(painter->pen().width() == 1 && sp->spinBoxParameters.radius != 0) - painter->translate(0.5, 0.5); - - painter->drawRoundedRect(option->rect.adjusted(width, width, -width, -width), - sp->spinBoxParameters.radius, sp->spinBoxParameters.radius); - painter->restore(); - - - //up and down button - if (sb->subControls & (SC_SpinBoxUp | SC_SpinBoxDown)) { - - //up button - if (sb->stepEnabled & QAbstractSpinBox::StepUpEnabled) { - QPainterPath upPath; - - painter->save(); - if(sp->spinBoxParameters.radius != 0) - painter->setRenderHint(QPainter::Antialiasing, true); - if (!enable) { - upOption.state = State_None; - painter->setPen(sp->spinBoxParameters.spinBoxUpDisablePen); - painter->setBrush(sp->spinBoxParameters.spinBoxUpDisableBrush); - } else { - upOption.state |= State_Enabled; - - if (up) { - if (option->state & State_Sunken) { - upOption.state |= State_Sunken; - painter->setPen(sp->spinBoxParameters.spinBoxUpClickPen); - painter->setBrush(sp->spinBoxParameters.spinBoxUpClickBrush); - } else { - if (focus) { - upOption.state |= State_MouseOver; - painter->setPen(sp->spinBoxParameters.spinBoxUpFocusHoverPen); - painter->setBrush(sp->spinBoxParameters.spinBoxUpFocusHoverBrush); - } else { - painter->setPen(sp->spinBoxParameters.spinBoxUpHoverPen); - painter->setBrush(sp->spinBoxParameters.spinBoxUpHoverBrush); - } - } - } else { - painter->setPen(sp->spinBoxParameters.spinBoxUpDefaultPen); - painter->setBrush(sp->spinBoxParameters.spinBoxUpDefaultBrush); - } - } - upRect.adjust(0, width, 1 - width, 1); - upPath.moveTo(upRect.left(), upRect.top() + sp->spinBoxParameters.radius); - upPath.arcTo(upRect.left(), upRect.top(), sp->spinBoxParameters.radius * 2, sp->spinBoxParameters.radius * 2, 180, -90); - upPath.lineTo(upRect.right() - sp->spinBoxParameters.radius, upRect.top()); - upPath.arcTo(upRect.right() - 2 * sp->spinBoxParameters.radius, upRect.top(), sp->spinBoxParameters.radius * 2, - sp->spinBoxParameters.radius * 2, 90, -90); - upPath.lineTo(upRect.right(), upRect.bottom()); - upPath.lineTo(upRect.left(), upRect.bottom()); - upPath.lineTo(upRect.left(), upRect.top() + sp->spinBoxParameters.radius); - - if(painter->pen().width() == 1 && sp->spinBoxParameters.radius != 0) - painter->translate(0.5, 0.5); - - painter->drawPath(upPath); -// painter->drawRect(upRect); - painter->restore(); - } else { - upOption.state = State_None; - } - - //down button - if (sb->stepEnabled & QAbstractSpinBox::StepDownEnabled) { - QPainterPath downPath; - - painter->save(); - if(sp->spinBoxParameters.radius != 0) - painter->setRenderHint(QPainter::Antialiasing, true); - if (!enable) { - downOption.state = State_None; - painter->setPen(sp->spinBoxParameters.spinBoxDownDisablePen); - painter->setBrush(sp->spinBoxParameters.spinBoxDownDisableBrush); - } else { - downOption.state |= State_Enabled; - - if (down) { - if (option->state & State_Sunken) { - downOption.state |= State_Sunken; - painter->setPen(sp->spinBoxParameters.spinBoxDownClickPen); - painter->setBrush(sp->spinBoxParameters.spinBoxDownClickBrush); - } else { - if (focus) { - downOption.state |= State_MouseOver; - painter->setPen(sp->spinBoxParameters.spinBoxDownFocusHoverPen); - painter->setBrush(sp->spinBoxParameters.spinBoxDownFocusHoverBrush); - } else { - painter->setPen(sp->spinBoxParameters.spinBoxDownHoverPen); - painter->setBrush(sp->spinBoxParameters.spinBoxDownHoverBrush); - } - } - } else { - painter->setPen(sp->spinBoxParameters.spinBoxDownDefaultPen); - painter->setBrush(sp->spinBoxParameters.spinBoxDownDefaultBrush); - } - } - downRect.adjust(0, 0, 1 - width, 1 - width); - downPath.moveTo(downRect.left(), downRect.bottom() - sp->spinBoxParameters.radius); - downPath.arcTo(downRect.left(), downRect.bottom() - sp->spinBoxParameters.radius * 2, sp->spinBoxParameters.radius * 2, - sp->spinBoxParameters.radius * 2, 180, 90); - downPath.lineTo(downRect.right() - sp->spinBoxParameters.radius, downRect.bottom()); - downPath.arcTo(downRect.right() - sp->spinBoxParameters.radius * 2, downRect.bottom() - sp->spinBoxParameters.radius * 2, - sp->spinBoxParameters.radius * 2, sp->spinBoxParameters.radius * 2, 270, 90); - downPath.lineTo(downRect.right(), downRect.top()); - downPath.lineTo(downRect.left(), downRect.top()); - downPath.lineTo(downRect.left(), downRect.bottom() - sp->spinBoxParameters.radius); - - if(painter->pen().width() == 1 && sp->spinBoxParameters.radius != 0) - painter->translate(0.5, 0.5); - - painter->drawPath(downPath); -// painter->drawRect(downRect); - painter->restore(); - } else { - downOption.state = State_None; - } - - if (!enable) { - upOption.state = State_None; - downOption.state = State_None; - } - - if (sb->buttonSymbols == QAbstractSpinBox::PlusMinus) { - - } else if (sb->buttonSymbols == QAbstractSpinBox::UpDownArrows) { - proxy()->drawPrimitive(PE_IndicatorArrowUp, &upOption, painter, widget); - proxy()->drawPrimitive(PE_IndicatorArrowDown, &downOption, painter, widget); - } - } - } -// painter->restore(); - return; - } - break; - - } - - case CC_Dial: - { - if (const QStyleOptionSlider *dial = qstyleoption_cast<const QStyleOptionSlider *>(option)) { - const bool enable = dial->state & State_Enabled; - int tickOffset = 8; - const int width = option->rect.width(); - const int height = option->rect.height(); - qreal r = qMin(dial->rect.width(), dial->rect.height()) / 2; - qreal r_ = r - tickOffset; - qreal dx = dial->rect.x() + (width - 2 * r_) / 2; - qreal dy = dial->rect.y() + (height - 2 * r_) / 2; - QRectF br(dial->rect.x() + dx, dial->rect.y() + dy, r_ * 2, r_ * 2); - painter->save(); - painter->setRenderHint(QPainter::Antialiasing, true); - painter->setPen(Qt::NoPen); - painter->setBrush(dial->palette.color(enable ? QPalette::Active : QPalette::Disabled, QPalette::Button)); - painter->drawEllipse(br); - painter->restore(); - - int tickHandle = 4; - int handleLength = 8; - QRectF circleRect(br.adjusted(tickHandle + handleLength, tickHandle + handleLength, - -(tickHandle + handleLength), -(tickHandle + handleLength))); - - QColor highLight = enable ? dial->palette.color(QPalette::Active, QPalette::Highlight) - : dial->palette.color(QPalette::Disabled, QPalette::ButtonText); - QColor groove_color = isUseDarkPalette() ? QColor(38, 38, 38) : QColor(191, 191, 191); - qreal fist = calcRadial(dial, dial->minimum); - qreal dp = calcRadial(dial, dial->sliderPosition); - qreal end = calcRadial(dial, dial->maximum); - QPen pen(groove_color, handleLength, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - painter->save(); - painter->setPen(pen); - painter->setBrush(Qt::NoBrush); - painter->setRenderHint(QPainter::Antialiasing, true); - painter->drawArc(circleRect, fist * 16 * 180 / M_PI, (end - fist) * 16 * 180 / M_PI); - pen.setColor(highLight); - painter->setPen(pen); - painter->drawArc(circleRect, fist * 16 * 180 / M_PI, (dp - fist) * 16 * 180 / M_PI); - painter->restore(); - - qreal xc = dial->rect.width() / 2; - qreal yc = dial->rect.height() / 2; - painter->save(); - painter->setRenderHint(QPainter::Antialiasing, true); - painter->setPen(QPen(dial->palette.color(enable ? QPalette::Active : QPalette::Disabled, QPalette::Base), - 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); - painter->setBrush(Qt::NoBrush); - painter->drawLine(QPointF(xc + (r_ - 8 - 2) * qCos(dp), yc - (r_ - 8 - 2) * qSin(dp)), - QPointF(xc + (r_ - 8 - 2 - 4) * qCos(dp), yc - (r_ - 8 - 2 - 4) * qSin(dp))); - painter->restore(); - - if (dial->subControls & SC_DialTickmarks) { - painter->save(); - painter->setRenderHint(QPainter::Antialiasing, true); - QPen pen(dial->palette.color(enable ? QPalette::Active : QPalette::Disabled, QPalette::WindowText), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - painter->setPen(pen); - if(painter->pen().width() == 1) - painter->translate(0.5, 0.5); - painter->drawLines(calcLines(dial, tickOffset)); - painter->restore(); - } - return; - } - break; - } - - case CC_ToolButton: - { - if (qstyleoption_cast<const QStyleOptionToolButton *>(option)) { - proxy()->drawPrimitive(PE_PanelButtonTool, option, painter, widget); - proxy()->drawControl(CE_ToolButtonLabel, option, painter, widget); - - return; - } - break; - } - - case CC_GroupBox: //UKUI GroupBox style - { - painter->save(); - if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(option)) { - // Draw frame - QRect textRect = proxy()->subControlRect(CC_GroupBox, option, SC_GroupBoxLabel, widget); - QRect checkBoxRect = proxy()->subControlRect(CC_GroupBox, option, SC_GroupBoxCheckBox, widget); - //新加 - QRect groupContents = proxy()->subControlRect(CC_GroupBox, option, SC_GroupBoxContents, widget); - - if (groupBox->subControls & QStyle::SC_GroupBoxFrame) { - QStyleOptionFrame frame; - frame.QStyleOption::operator=(*groupBox); - frame.features = groupBox->features; - frame.lineWidth = groupBox->lineWidth; - frame.midLineWidth = groupBox->midLineWidth; - frame.rect = proxy()->subControlRect(CC_GroupBox, option, SC_GroupBoxFrame, widget); - proxy()->drawPrimitive(PE_FrameGroupBox, &frame, painter, widget); - } - - // Draw title - if ((groupBox->subControls & QStyle::SC_GroupBoxLabel) && !groupBox->text.isEmpty()) { - // groupBox->textColor gets the incorrect palette here - painter->setPen(QPen(option->palette.windowText(), 1)); - int alignment = int(groupBox->textAlignment); - if (!proxy()->styleHint(QStyle::SH_UnderlineShortcut, option, widget)) - alignment |= Qt::TextHideMnemonic; - - proxy()->drawItemText(painter, textRect, Qt::TextShowMnemonic | Qt::AlignLeft | alignment, - groupBox->palette, groupBox->state & State_Enabled, groupBox->text, QPalette::NoRole); - - if (groupBox->state & State_HasFocus) { - QStyleOptionFocusRect fropt; - fropt.QStyleOption::operator=(*groupBox); - fropt.rect = textRect.adjusted(-2, -1, 2, 1); - proxy()->drawPrimitive(PE_FrameFocusRect, &fropt, painter, widget); - } - painter->save(); - painter->setRenderHint(QPainter::Antialiasing,true); - painter->setPen(Qt::NoPen); - painter->setBrush(option->palette.color(QPalette::Base)); - painter->drawRoundedRect(groupContents, sp->radius, sp->radius); - painter->restore(); - - } - - // Draw checkbox - if (groupBox->subControls & SC_GroupBoxCheckBox) { - QStyleOptionButton box; - box.QStyleOption::operator=(*groupBox); - box.rect = checkBoxRect; - proxy()->drawPrimitive(PE_IndicatorCheckBox, &box, painter, widget); - } - } - painter->restore(); - return; - break; - - } - - default: return Style::drawComplexControl(control, option, painter, widget); - } -} - -void Qt5UKUIStyle::drawControl(QStyle::ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const -{ - switch (element) { - case CE_ScrollBarSlider: - { - auto animator = m_scrollbar_animation_helper->animator(widget); - if (!animator) { - return Style::drawControl(element, option, painter, widget); - } - - if (const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option)) { - const bool enable = bar->state & State_Enabled; - const bool sunKen = bar->state & State_Sunken; - const bool mouseOver = bar->state & State_MouseOver; - const bool horizontal = (bar->orientation == Qt::Horizontal); - QRect rect = bar->rect; - QRect drawRect; - - painter->save(); - painter->setPen(Qt::NoPen); - painter->setRenderHint(QPainter::Antialiasing, true); - - - if(sp->scrollBarParameters.animation == true) { - qreal len; - if(sp->scrollBarParameters.grooveWidthAnimation){ - //width animation - animator->setAnimatorDirectionForward("groove_width", mouseOver); - if (mouseOver) { - if (!animator->isRunning("groove_width") && animator->currentAnimatorTime("groove_width") == 0) { - animator->startAnimator("groove_width"); - } - } else { - if (!animator->isRunning("groove_width") && animator->currentAnimatorTime("groove_width") > 0) { - animator->startAnimator("groove_width"); - } - } - len = animator->value("groove_width").toReal() * 4 * sp->m_scaleRatio2_1 + 4; - } - else - len = sp->ScroolBar_Width; - if (horizontal) { - drawRect.setRect(rect.x(), rect.y() + (rect.height() - len) / 2, rect.width(), len); - } else { - drawRect.setRect(rect.x() + (rect.width() - len) / 2, rect.y(), len, rect.height()); - } - }else { - drawRect = bar->rect; - } - - setScrollbarSliderRec(QRect(drawRect.x(), drawRect.y(), drawRect.width(), drawRect.height())); - - //hover color animation -// animator->setAnimatorDirectionForward("slider_opacity", mouseOver); -// if (mouseOver) { -// if (!animator->isRunning("slider_opacity") && animator->currentAnimatorTime("slider_opacity") == 0) { -// animator->startAnimator("slider_opacity"); -// } -// } else { -// if (!animator->isRunning("slider_opacity") && animator->currentAnimatorTime("slider_opacity") > 0) { -// animator->startAnimator("slider_opacity"); -// } -// } -// qreal m_opacity = animator->value("slider_opacity").toReal(); - -// //click color animation -// animator->setAnimatorDirectionForward("additional_opacity", sunKen); -// if (sunKen) { -// if (animator->currentAnimatorTime("additional_opacity") == 0) { -// animator->startAnimator("additional_opacity"); -// } -// } else { -// if (animator->currentAnimatorTime("additional_opacity") > 0) { -// animator->startAnimator("additional_opacity"); -// } -// } -// qreal s_opacity = animator->value("additional_opacity").toReal(); -// if (isUseDarkPalette()) { -// painter->setBrush(mixColor(sp->scrollBarParameters.scrollBarSliderDefaultBrush.color(), -// bar->palette.color(QPalette::Active, QPalette::WindowText), m_opacity + (0.1 - s_opacity))); -// } else { -// painter->setBrush(mixColor(sp->scrollBarParameters.scrollBarSliderDefaultBrush.color(), -// bar->palette.color(QPalette::Active, QPalette::WindowText), m_opacity + s_opacity)); -// } - - QBrush brush; - if (!enable){ - brush = sp->scrollBarParameters.scrollBarSliderDisableBrush; - } - else if (sunKen && ((bar->activeSubControls & SC_ScrollBarSlider) || - (bar->activeSubControls & SC_ScrollBarAddPage) || - (bar->activeSubControls & SC_ScrollBarSubPage))){ - - brush = sp->scrollBarParameters.scrollBarSliderClickBrush; - } - else if(mouseOver && ((bar->activeSubControls & SC_ScrollBarSlider) || - (bar->activeSubControls & SC_ScrollBarAddPage) || - (bar->activeSubControls & SC_ScrollBarSubPage))){ - - brush = sp->scrollBarParameters.scrollBarSliderHoverBrush; - } - /*else if (animator->isRunning("slider_opacity")) {//fashion style hoverbrush is QLinearGradient - painter->setOpacity(0.5 * m_opacity); - QColor hColor = sp->scrollBarParameters.scrollBarSliderHoverBrush.color(); - QColor dColor = sp->scrollBarParameters.scrollBarSliderDefaultBrush.color(); - - color.setRed(dColor.red() + (hColor.red() - dColor.red()) * m_opacity); - color.setBlue(dColor.blue() + (hColor.blue() - dColor.blue()) * m_opacity); - color.setGreen(dColor.green() + (hColor.green() - dColor.green()) * m_opacity); - color.setAlphaF(dColor.alphaF() + (hColor.alphaF() - dColor.alphaF()) * m_opacity); - }*/ - else { - brush = sp->scrollBarParameters.scrollBarSliderDefaultBrush; - } - painter->setBrush(brush); - painter->drawRoundedRect(drawRect, sp->scrollBarParameters.radius, sp->scrollBarParameters.radius); - painter->restore(); - return; - } - break; - } - - case CE_ScrollBarAddLine: { - if (const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option)) { - const bool active = bar->state & State_Active; - painter->save(); - painter->setPen(Qt::NoPen); - if (active) { - painter->setBrush(sp->scrollBarParameters.scrollBarGrooveDefaultBrush); - } else { - painter->setBrush(sp->scrollBarParameters.scrollBarGrooveInactiveBrush); - } - painter->drawRect(bar->rect); - painter->restore(); - painter->save(); - - QColor color = sp->Indicator_IconDefault; - if(bar->sliderValue == bar->maximum || !(bar->state & State_Enabled)) - color = sp->Indicator_IconDisable; - else if((bar->activeSubControls & SC_ScrollBarAddLine) && option->state & State_Enabled){ - if (option->state & (State_On | State_Sunken)) { - color = sp->Indicator_IconSunken; - } - else if (option->state & State_MouseOver) { - color = sp->Indicator_IconHover; - } - } - QIcon icon = QIcon::fromTheme("ukui-start-symbolic"); - - const bool horizontal = (bar->orientation == Qt::Horizontal); - if(horizontal) - icon = QIcon::fromTheme(bar->direction == Qt::LeftToRight ? "ukui-end-symbolic" : "ukui-start-symbolic"); - else - icon = QIcon::fromTheme(bar->direction == Qt::LeftToRight ? "ukui-down-symbolic" : "ukui-up-symbolic"); - - if (!icon.isNull()) { - int iconSize = proxy()->pixelMetric(QStyle::PM_SmallIconSize, option, widget); - QPixmap pixmap = icon.pixmap(QSize(iconSize, iconSize), QIcon::Normal, QIcon::On); - - if(!sp->indicatorIconHoverNeedHighLight) - pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - else - pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); - painter->save(); - drawColorPixmap(painter, color, pixmap); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - proxy()->drawItemPixmap(painter, option->rect, Qt::AlignCenter, pixmap); - painter->restore(); - } - } - painter->restore(); - return; - } - - case CE_ScrollBarSubLine: { - if (const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option)) { - const bool active = bar->state & State_Active; - painter->save(); - painter->setPen(Qt::NoPen); - if (active) { - painter->setBrush(sp->scrollBarParameters.scrollBarGrooveDefaultBrush); - } else { - painter->setBrush(sp->scrollBarParameters.scrollBarGrooveInactiveBrush); - } - painter->drawRect(bar->rect); - painter->restore(); - painter->save(); - QColor color = sp->Indicator_IconDefault; - if(bar->sliderValue == bar->minimum || !(bar->state & State_Enabled)) - color = sp->Indicator_IconDisable; - else if((bar->activeSubControls & SC_ScrollBarSubLine) && option->state & State_Enabled){ - if (option->state & (State_On | State_Sunken)) { - color = sp->Indicator_IconSunken; - } - else if (option->state & State_MouseOver) { - color = sp->Indicator_IconHover; - } - } - - QIcon icon = QIcon::fromTheme("ukui-start-symbolic"); - - const bool horizontal = (bar->orientation == Qt::Horizontal); - if(horizontal) - icon = QIcon::fromTheme(bar->direction == Qt::LeftToRight ? "ukui-start-symbolic": "ukui-end-symbolic"); - else - icon = QIcon::fromTheme(bar->direction == Qt::LeftToRight ? "ukui-up-symbolic" : "ukui-down-symbolic"); - - if (!icon.isNull()) { - int iconSize = proxy()->pixelMetric(QStyle::PM_SmallIconSize, option, widget); - QPixmap pixmap = icon.pixmap(QSize(iconSize, iconSize), QIcon::Normal, QIcon::On); - - if(!sp->indicatorIconHoverNeedHighLight) - pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - else - pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); - painter->save(); - drawColorPixmap(painter, color, pixmap); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - proxy()->drawItemPixmap(painter, option->rect, Qt::AlignCenter, pixmap); - painter->restore(); - } - } - painter->restore(); - return; - } - - case CE_PushButton: - { - if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { - proxy()->drawControl(CE_PushButtonBevel, option, painter, widget); - QStyleOptionButton subopt = *button; - subopt.rect = proxy()->subElementRect(SE_PushButtonContents, option, widget); - proxy()->drawControl(CE_PushButtonLabel, &subopt, painter, widget); - return; - } - break; - } - - case CE_PushButtonBevel: - { - sp->initPushButtonBevelParameters(isUseDarkPalette(), option, widget); - proxy()->drawPrimitive(PE_PanelButtonCommand, option, painter, widget); - return; - } - - case CE_PushButtonLabel: - { - if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { - sp->initPushButtonLabelParameters(isUseDarkPalette(), option, widget); - const bool enable = button->state & State_Enabled; - const bool text = !button->text.isEmpty(); - const bool icon = !button->icon.isNull(); - - bool isImportant = false; - if (widget && widget->property("isImportant").isValid()) { - isImportant = widget->property("isImportant").toBool(); - } - - QRect drawRect = button->rect; - int spacing = 8; - QStyleOption sub = *option; - if (!sp->pushButtonParameters.iconHoverClickHighlight) { - sub.state = enable ? State_Enabled : State_None; - } else { - sub.state = option->state; - if (isImportant && !(button->features & QStyleOptionButton::Flat)) { - sub.state = option->state | State_On; - } - } - - if (button->features & QStyleOptionButton::HasMenu) { - QRect arrowRect; - int indicator = proxy()->pixelMetric(PM_MenuButtonIndicator, option, widget); - arrowRect.setRect(drawRect.right() - indicator, drawRect.top() + (drawRect.height() - indicator) / 2, indicator, indicator); - arrowRect = visualRect(option->direction, option->rect, arrowRect); - if (!text && !icon) { - spacing = 0; - } - drawRect.setWidth(drawRect.width() - indicator - spacing); - drawRect = visualRect(button->direction, button->rect, drawRect); - sub.rect = arrowRect; - proxy()->drawPrimitive(PE_IndicatorArrowDown, &sub, painter, widget); - } - - int tf = Qt::AlignCenter; - if (proxy()->styleHint(SH_UnderlineShortcut, button, widget)) { - tf |= Qt::TextShowMnemonic; - } - QPixmap pixmap; - if (icon) { - QIcon::Mode mode = button->state & State_Enabled ? QIcon::Normal : QIcon::Disabled; - if (mode == QIcon::Normal && button->state & State_HasFocus) { - mode = QIcon::Active; - } - QIcon::State state = QIcon::Off; - if (button->state & State_On) { - state = QIcon::On; - } - pixmap = button->icon.pixmap(button->iconSize, mode, state); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, button); - } - - QFontMetrics fm = button->fontMetrics; - int textWidth = fm.boundingRect(option->rect, tf, button->text).width() + 2; - int iconWidth = icon ? button->iconSize.width() : 0; - QRect iconRect, textRect; - if (icon && text) { - int width = textWidth + spacing + iconWidth; - if (width > drawRect.width()) { - width = drawRect.width(); - textWidth = width - spacing - iconWidth; - } - textRect.setRect(drawRect.x(), drawRect.y(), width, drawRect.height()); - textRect.moveCenter(drawRect.center()); - iconRect.setRect(textRect.left(), textRect.top(), iconWidth, textRect.height()); - textRect.setRect(iconRect.right() + spacing + 1, textRect.y(), textWidth, textRect.height()); - iconRect = visualRect(option->direction, drawRect, iconRect); - textRect = visualRect(option->direction, drawRect, textRect); - } else if (icon) { - iconRect = drawRect; - } else if (text) { - textRect = drawRect; - } - - if (iconRect.isValid()) { - if (widget && !widget->property("useIconHighlightEffect").isValid()) { - if (!sp->pushButtonParameters.iconHoverClickHighlight) { - pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, &sub, widget); - } else { - pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, &sub, widget); - } - } else { - pixmap = HighLightEffect::generatePixmap(pixmap, &sub, widget); - } - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - /* - * Use pushbutton own highlighteffect rule. Do not use ukui drawItemPixmap - */ -// proxy()->drawItemPixmap(painter, iconRect, Qt::AlignCenter, pixmap); - QStyle::drawItemPixmap(painter, iconRect, Qt::AlignCenter, pixmap); - painter->restore(); - } - - if (textRect.isValid()) { - if (enable) { - if (sp->pushButtonParameters.textHoverClickHighlight) { - proxy()->drawItemText(painter, textRect, tf, button->palette, true, button->text, QPalette::HighlightedText); - } else { - proxy()->drawItemText(painter, textRect, tf, button->palette, true, button->text, QPalette::Text); - } - } else { - proxy()->drawItemText(painter, textRect, tf, button->palette, false, button->text, QPalette::Text); - } - } - return; - } - break; - } - - case CE_ToolButtonLabel: - { - if (const QStyleOptionToolButton *tb = qstyleoption_cast<const QStyleOptionToolButton *>(option)) { - sp->initToolButtonLabelParameters(isUseDarkPalette(), option, widget); - const bool text = !tb->text.isEmpty(); - const bool icon = !tb->icon.isNull(); - const bool arrow = tb->features & QStyleOptionToolButton::MenuButtonPopup; - const bool ha = tb->features & QStyleOptionToolButton::Arrow; - const bool enable = tb->state & State_Enabled; - QFontMetrics fm = tb->fontMetrics; - int Margin_Height = sp->Button_MarginHeight; - int ToolButton_MarginWidth = sp->ToolButton_MarginWidth; - int Button_MarginWidth = proxy()->pixelMetric(PM_ButtonMargin, option, widget); - - int iconWidth = (icon || ha) ? tb->iconSize.width() : 0; - int spacing = 8; - QRect textRect, iconRect, arrowRect; - QRect drawRect = tb->rect; - - QStyleOption sub = *option; - if (!sp->toolButtonParameters.iconHoverClickHighlight) { - sub.state = enable ? State_Enabled : State_None; - } else { - sub.state = option->state; - } - - if (arrow) { - int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, option, widget); - drawRect.adjust(ToolButton_MarginWidth, Margin_Height, -ToolButton_MarginWidth, -Margin_Height); - arrowRect.setRect(drawRect.right() - mbi + 1, drawRect.y(), mbi, drawRect.height()); - drawRect.adjust(0, 0, - (mbi + spacing), 0); - arrowRect = visualRect(option->direction, option->rect, arrowRect); - drawRect = visualRect(option->direction, option->rect, drawRect); - sub.rect = arrowRect; - proxy()->drawPrimitive(PE_IndicatorArrowDown, &sub, painter, widget); - } else { - if (tb->toolButtonStyle == Qt::ToolButtonTextOnly) { - drawRect.adjust(Button_MarginWidth, 0, -Button_MarginWidth, 0); - } else if (tb->toolButtonStyle == Qt::ToolButtonIconOnly){ - drawRect.adjust(0, Margin_Height, 0, -Margin_Height); - } else { - drawRect.adjust(ToolButton_MarginWidth, Margin_Height, -ToolButton_MarginWidth, -Margin_Height); - } - - } - - int alignment = Qt::AlignCenter; - if (proxy()->styleHint(SH_UnderlineShortcut, option, widget)) - alignment |= Qt::TextShowMnemonic; - int textDis = fm.boundingRect(option->rect, alignment, tb->text).width() + 2; - QPixmap pixmap; - if (icon) { - QIcon::State state = tb->state & State_On ? QIcon::On : QIcon::Off; - QIcon::Mode mode; - if (!enable) - mode = QIcon::Disabled; - else if ((tb->state & State_MouseOver) && (tb->state & State_AutoRaise)) - mode = QIcon::Active; - else - mode = QIcon::Normal; - pixmap = tb->icon.pixmap(tb->iconSize, mode, state); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, tb); - } - - if (tb->toolButtonStyle == Qt::ToolButtonTextOnly && text) { - textRect = drawRect; - } else if (tb->toolButtonStyle == Qt::ToolButtonIconOnly) { - if (icon || ha) { - iconRect = drawRect; - } else if (text) { - textRect = drawRect; - } - } else if (tb->toolButtonStyle == Qt::ToolButtonTextBesideIcon) { - if (text) { - int width = iconWidth + spacing + textDis; - if (width > drawRect.width()) { - width = drawRect.width(); - textDis = drawRect.width() - iconWidth - spacing; - } - textRect.setRect(drawRect.x(), drawRect.y(), width, drawRect.height()); - textRect.moveCenter(drawRect.center()); - iconRect.setRect(textRect.x(), textRect.y(), iconWidth, textRect.height()); - textRect.setRect(iconRect.right() + spacing + 1, textRect.y(), textDis, textRect.height()); - iconRect = visualRect(option->direction, drawRect, iconRect); - textRect = visualRect(option->direction, drawRect, textRect); - } else { - iconRect = drawRect; - } - } else if (tb->toolButtonStyle == Qt::ToolButtonTextUnderIcon) { - if (text) { - textDis = qMax(iconWidth, textDis); - int height = fm.size(Qt::TextShowMnemonic, tb->text).height() + spacing + iconWidth; - if (textDis > drawRect.width()) - textDis = drawRect.width(); - textRect.setRect(drawRect.x(), drawRect.y(), textDis, height); - textRect.moveCenter(drawRect.center()); - iconRect.setRect(textRect.x(), textRect.y(), textDis, iconWidth); - textRect.setRect(textRect.x(), iconRect.bottom() + spacing + 1, textDis, fm.size(Qt::TextShowMnemonic, tb->text).height()); - } else { - iconRect = drawRect; - } - } - - if (textRect.isValid()) { - if (enable) { - if (sp->toolButtonParameters.textHoverClickHighlight) { - proxy()->drawItemText(painter, textRect, alignment, tb->palette, true, tb->text, QPalette::HighlightedText); - } else { - proxy()->drawItemText(painter, textRect, alignment, tb->palette, true, tb->text, QPalette::Text); - } - } else { - proxy()->drawItemText(painter, textRect, alignment, tb->palette, false, tb->text, QPalette::Text); - } - } - - if (iconRect.isValid()) { - sub.rect = iconRect; - switch (tb->arrowType) { - case Qt::UpArrow: - { - proxy()->drawPrimitive(PE_IndicatorArrowUp, &sub, painter, widget); - return; - } - case Qt::DownArrow: - { - proxy()->drawPrimitive(PE_IndicatorArrowDown, &sub, painter, widget); - return; - } - case Qt::LeftArrow: - { - proxy()->drawPrimitive(PE_IndicatorArrowLeft, &sub, painter, widget); - return; - } - case Qt::RightArrow: - { - proxy()->drawPrimitive(PE_IndicatorArrowRight, &sub, painter, widget); - return; - } - default: - break; - } - - if (widget && !widget->property("useIconHighlightEffect").isValid()) { - if (!sp->toolButtonParameters.iconHoverClickHighlight) { - pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, &sub, widget); - } else { - pixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, &sub, widget); - } - } else { - pixmap = HighLightEffect::generatePixmap(pixmap, &sub, widget); - } - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - /* - * Use toolbutton own highlighteffect rule. Do not use ukui drawItemPixmap - */ -// proxy()->drawItemPixmap(painter, iconRect, Qt::AlignCenter, pixmap); - QStyle::drawItemPixmap(painter, iconRect, Qt::AlignCenter, pixmap); - painter->restore(); - } - return; - } - break; - } - - case CE_TabBarTab: - { - if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { - proxy()->drawControl(CE_TabBarTabShape, tab, painter, widget); - proxy()->drawControl(CE_TabBarTabLabel, tab, painter, widget); - return; - } - break; - } - - case CE_TabBarTabShape: - { - if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { - sp->initTabWidgetParameters(isUseDarkPalette(), option, widget); - bool selected = tab->state & State_Selected; - bool hover = tab->state & State_MouseOver; - bool click = tab->state & (State_On | State_Sunken); - QRect drawRect = option->rect; - QTransform rotMatrix; - bool flip = false; - painter->save(); - painter->setPen(Qt::NoPen); -// painter->setRenderHint(QPainter::Antialiasing, true); - - switch (tab->shape) { - case QTabBar::RoundedNorth: - break; - case QTabBar::RoundedSouth: - { - rotMatrix.rotate(180); - rotMatrix.translate(0, -tab->rect.height() + 1); - rotMatrix.scale(-1, 1); - painter->setTransform(rotMatrix, true); - break; - } - case QTabBar::RoundedWest: - { - flip = true; - rotMatrix.rotate(180 + 90); - rotMatrix.scale(-1, 1); - painter->setTransform(rotMatrix, true); - break; - } - case QTabBar::RoundedEast: - { - flip = true; - rotMatrix.rotate(90); - rotMatrix.translate(0, - tab->rect.width() + 1); - painter->setTransform(rotMatrix); - break; - } - default: - painter->restore(); - QCommonStyle::drawControl(element, tab, painter, widget); - return; - } - - if (flip) { - drawRect.adjust(0, 0, 1, 0); - QRect tmp = drawRect; - drawRect = QRect(tmp.y(), tmp.x(), tmp.height(), tmp.width()); - } else { - drawRect.adjust(0, 0, 0, 1); - } - -// bool rtlHorTabs = (tab->direction == Qt::RightToLeft -// && (tab->shape == QTabBar::RoundedNorth || tab->shape == QTabBar::RoundedSouth)); -// bool fisttab = ((!rtlHorTabs && tab->position == QStyleOptionTab::Beginning) -// || (rtlHorTabs && tab->position == QStyleOptionTab::End)); -// bool lastTab = ((!rtlHorTabs && tab->position == QStyleOptionTab::End) -// || (rtlHorTabs && tab->position == QStyleOptionTab::Beginning)); -// bool onlyOne = tab->position == QStyleOptionTab::OnlyOneTab; - - int tabOverlap = proxy()->pixelMetric(PM_TabBarTabOverlap, option, widget); - int TabBarTab_Radius = sp->tabWidgetParameters.radius; - int moveWidth = 0; - if(widget != NULL && qobject_cast<const QTabBar*>(widget)){ - const auto *tabbar = qobject_cast<const QTabBar*>(widget); - moveWidth = (tabbar->tabAt(QPoint(drawRect.x(),drawRect.y())) == tabbar->count() - 1) ? 1 : 0; - } - QPainterPath path; - QPainterPath penPath; - QPainterPath linePath; - - int penWidth = sp->tabWidgetParameters.tabBarPen.width(); - - if (selected) { - drawRect.adjust(0, 0, tabOverlap, 0); - path.moveTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); - path.arcTo(QRect(drawRect.left(), drawRect.top(), TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, 90); - path.lineTo(drawRect.left(), drawRect.bottom() - TabBarTab_Radius); - path.arcTo(QRect(drawRect.left() - TabBarTab_Radius * 2, drawRect.bottom() - TabBarTab_Radius * 2, - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, -90); - path.lineTo(drawRect.right() + TabBarTab_Radius, drawRect.bottom()); - path.arcTo(QRect(drawRect.right(), drawRect.bottom() - TabBarTab_Radius * 2, - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 270, -90); - path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); - path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.top(), - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); - path.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); - -// penPath.moveTo(drawRect.left(), drawRect.bottom() - penWidth); -// penPath.lineTo(drawRect.left(), drawRect.top()); -// penPath.lineTo(drawRect.right() - 1, drawRect.top()); -// penPath.lineTo(drawRect.right() - 1, drawRect.bottom() - penWidth); -// penPath.lineTo(drawRect.left, drawRect.bottom() - penWidth); - -// linePath.moveTo(drawRect.left() + 1, drawRect.bottom() - 1); -// linePath.lineTo(drawRect.right() - 2, drawRect.bottom() - 1); - } else { - if (widget != NULL && qobject_cast<const QTabBar*>(widget)) { - const auto *tabbar = qobject_cast<const QTabBar*>(widget); - int select_index = tabbar->currentIndex(); - int now_index = tabbar->tabAt(QPoint(drawRect.x(),drawRect.y())); - int tab_count = tabbar->count(); - - if (select_index - now_index == 1) { - //select rect left - drawRect.adjust(0, sp->TabBar_DefaultHeight_aug, tabOverlap, 0); - if (now_index == 0) { - path.moveTo(drawRect.left(), drawRect.top() + TabBarTab_Radius); - path.lineTo(drawRect.left(), drawRect.bottom()); - path.lineTo(drawRect.right() - TabBarTab_Radius, drawRect.bottom()); - path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.bottom() - TabBarTab_Radius * 2, - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 270, 90); - path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); - path.arcTo(QRect(drawRect.right(), drawRect.top(), - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, -90); - path.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); - path.arcTo(QRect(drawRect.left(), drawRect.top(), - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, 90); - -// penPath.moveTo(drawRect.left(), drawRect.bottom()); -// penPath.lineTo(drawRect.left(), drawRect.top()); -// penPath.lineTo(drawRect.right(), drawRect.top()); - -// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); -// linePath.lineTo(drawRect.right(), drawRect.bottom() - 1); - } else { - path.moveTo(drawRect.left(), drawRect.top()); - path.lineTo(drawRect.left(), drawRect.bottom()); - path.lineTo(drawRect.right() - TabBarTab_Radius, drawRect.bottom()); - path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.bottom() - TabBarTab_Radius * 2, - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 270, 90); - path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); - path.arcTo(QRect(drawRect.right(), drawRect.top(), - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, -90); - path.lineTo(drawRect.left(), drawRect.top()); - -// penPath.moveTo(drawRect.left(), drawRect.bottom()); -// penPath.lineTo(drawRect.left(), drawRect.top()); -// penPath.lineTo(drawRect.right(), drawRect.top()); - -// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); -// linePath.lineTo(drawRect.right(), drawRect.bottom() - 1); - } - } else if(select_index - now_index == -1) { - //select rect right - drawRect.adjust(0, sp->TabBar_DefaultHeight_aug, tabOverlap, 0); - if (now_index == tab_count - 1) { - path.moveTo(drawRect.right(), drawRect.bottom()); - path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); - path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.top(), - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); - path.lineTo(drawRect.left() - TabBarTab_Radius, drawRect.top()); - path.arcTo(QRect(drawRect.left() - TabBarTab_Radius * 2, drawRect.top(), - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, -90); - path.lineTo(drawRect.left(), drawRect.bottom() - TabBarTab_Radius); - path.arcTo(QRect(drawRect.left(), drawRect.bottom() - TabBarTab_Radius * 2, - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, 90); - path.lineTo(drawRect.right(), drawRect.bottom()); - -// penPath.moveTo(drawRect.right() - moveWidth, drawRect.bottom()); -// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top()); -// penPath.lineTo(drawRect.left() - TabBarTab_Radius, drawRect.top()); - -// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); -// linePath.lineTo(drawRect.right(), drawRect.bottom() - 1); - } else { - path.moveTo(drawRect.right(), drawRect.bottom()); - path.lineTo(drawRect.right(), drawRect.top()); - path.lineTo(drawRect.left() - TabBarTab_Radius, drawRect.top()); - path.arcTo(QRect(drawRect.left() - TabBarTab_Radius * 2, drawRect.top(), TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, -90); - path.lineTo(drawRect.left(), drawRect.bottom() - TabBarTab_Radius); - path.arcTo(QRect(drawRect.left(), drawRect.bottom() - TabBarTab_Radius * 2, - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 180, 90); - path.lineTo(drawRect.right(), drawRect.bottom()); - -// penPath.moveTo(drawRect.right() - 1, drawRect.bottom()); -// penPath.lineTo(drawRect.right() - 1, drawRect.top()); -// penPath.lineTo(drawRect.left(), drawRect.top()); - -// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); -// linePath.lineTo(drawRect.right() - 1, drawRect.bottom() - 1); - } - } else { - if (now_index == 0) { - drawRect.adjust(0, sp->TabBar_DefaultHeight_aug, tabOverlap, 0); - path.moveTo(drawRect.left(), drawRect.top() + TabBarTab_Radius); - path.lineTo(drawRect.left(), drawRect.bottom()); - path.lineTo(drawRect.right(), drawRect.bottom()); - path.lineTo(drawRect.right(), drawRect.top()); - path.lineTo(drawRect.left() + TabBarTab_Radius, drawRect.top()); - path.arcTo(QRect(drawRect.left(), drawRect.top(), - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 90, 90); - -// penPath.moveTo(drawRect.left(), drawRect.bottom()); -// penPath.lineTo(drawRect.left(), drawRect.top()); -// penPath.lineTo(drawRect.right(), drawRect.top()); - -// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); -// linePath.lineTo(drawRect.right(), drawRect.bottom() - 1); - } else if (now_index == tab_count - 1) { - drawRect.adjust(0, sp->TabBar_DefaultHeight_aug, tabOverlap, 0); - path.moveTo(drawRect.right(), drawRect.bottom()); - path.lineTo(drawRect.right(), drawRect.top() + TabBarTab_Radius); - path.arcTo(QRect(drawRect.right() - TabBarTab_Radius * 2, drawRect.top(), - TabBarTab_Radius * 2, TabBarTab_Radius * 2), 0, 90); - path.lineTo(drawRect.left(), drawRect.top()); - path.lineTo(drawRect.left(), drawRect.bottom()); - path.lineTo(drawRect.right(), drawRect.bottom()); - -// penPath.moveTo(drawRect.right() - moveWidth, drawRect.bottom()); -// penPath.lineTo(drawRect.right() - moveWidth, drawRect.top()); -// penPath.lineTo(drawRect.left(), drawRect.top()); - -// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); -// linePath.lineTo(drawRect.right() - moveWidth, drawRect.bottom() - 1); - } else { - drawRect.adjust(0, sp->TabBar_DefaultHeight_aug, 0, 0); - - path.addRect(drawRect); - -// if(now_index > select_index){ -// penPath.moveTo(drawRect.right(), drawRect.bottom()); -// penPath.lineTo(drawRect.right(), drawRect.top()); -// penPath.lineTo(drawRect.left(), drawRect.top()); -// } -// else if(now_index < select_index){ -// penPath.moveTo(drawRect.left(), drawRect.bottom()); -// penPath.lineTo(drawRect.left(), drawRect.top()); -// penPath.lineTo(drawRect.right(), drawRect.top()); -// } -// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); -// linePath.lineTo(drawRect.right(), drawRect.bottom() - 1); - } - } - } else { - path.addRect(drawRect); - } - } - - drawRect.adjust(0, 0, -1, 0); - penPath.moveTo(drawRect.left(), drawRect.bottom() - penWidth); - penPath.lineTo(drawRect.left(), drawRect.top()); - penPath.lineTo(drawRect.right(), drawRect.top()); - penPath.lineTo(drawRect.right(), drawRect.bottom() - penWidth); - penPath.lineTo(drawRect.left(), drawRect.bottom() - penWidth); - - -// if(qobject_cast<const QTabBar*>(widget)->count() == 1){ -// penPath.moveTo(drawRect.left(), drawRect.bottom()); -// penPath.lineTo(drawRect.left(), drawRect.top()); -// penPath.lineTo(drawRect.right(), drawRect.top()); -// penPath.lineTo(drawRect.right(), drawRect.bottom()); - -// linePath.moveTo(drawRect.left(), drawRect.bottom() - 1); -// linePath.lineTo(drawRect.right(), drawRect.bottom() - 1); -// } - - if(click) { - painter->setBrush(sp->tabWidgetParameters.tabBarClickBrush); - } - else if (selected) { - painter->setBrush(sp->tabWidgetParameters.tabBarSelectBrush); - } else if (hover) { - painter->setBrush(sp->tabWidgetParameters.tabBarHoverBrush); - } else{ - painter->setBrush(sp->tabWidgetParameters.tabBarDefaultBrush); - } - - painter->drawPath(path); - painter->restore(); - - if(!sp->TabBar_BorderLine || penWidth == 0) - return; - painter->save(); - - painter->setPen(sp->tabWidgetParameters.tabBarPen); - painter->setBrush(Qt::NoBrush); - if(!penPath.isEmpty()) - painter->drawPath(penPath); - painter->restore(); - return; - painter->save(); - if(!hover && !click && selected){ - painter->setPen( QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Midlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); - } - else{ - painter->setPen(sp->tabWidgetParameters.tabBarPen); - } - painter->setBrush(Qt::NoBrush); - painter->setRenderHint(QPainter::Antialiasing, true); - if(painter->pen().width() == 1) - painter->translate(0.5, 0.5); - painter->drawPath(linePath); - painter->restore(); - return; - } - break; - } - - case CE_TabBarTabLabel: - { - if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { - int iconSize = proxy()->pixelMetric(PM_SmallIconSize, option, widget); - bool verticalTabs = tab->shape == QTabBar::RoundedEast || tab->shape == QTabBar::RoundedWest - || tab->shape == QTabBar::TriangularEast || tab->shape == QTabBar::TriangularWest; - bool useSeparateLine = true; - uint alignment = Qt::AlignLeft | Qt::AlignVCenter; - if (proxy()->styleHint(SH_UnderlineShortcut, option, widget)) - alignment |= Qt::TextShowMnemonic; - else - alignment |= Qt::TextHideMnemonic; - - QRect drawRect = tab->rect; - QRect iconRect; - QRect textRect = proxy()->subElementRect(SE_TabBarTabText, option, widget); - tabLayout(tab, widget, proxy(), &textRect, &iconRect); - - if (widget && widget->property("useTabbarSeparateLine").isValid() && (!widget->property("useTabbarSeparateLine").toBool())){ - useSeparateLine = false; - } - - if (widget != NULL && qobject_cast<const QTabBar*>(widget)) { - const auto *tabbar = qobject_cast<const QTabBar*>(widget); - int now_index = tabbar->tabAt(QPoint(drawRect.x(),drawRect.y())); - int tab_count = tabbar->count(); - if(now_index == tab_count - 1) - useSeparateLine = false; - } - - painter->save(); - if (verticalTabs) { - int newX, newY, newRot; - if (tab->shape == QTabBar::RoundedEast || tab->shape == QTabBar::TriangularEast) { - newX = drawRect.width() + drawRect.x(); - newY = drawRect.y(); - newRot = 90; - } else { - newX = drawRect.x(); - newY = drawRect.y() + drawRect.height(); - newRot = -90; - } - QTransform m; - m.translate(newX, newY); - m.rotate(newRot); - painter->setTransform(m, true); - } - - if (!tab->icon.isNull()) { - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - QIcon::Mode mode = (tab->state & State_Enabled) ? QIcon::Normal : QIcon::Disabled; - QPixmap pixmap = tab->icon.pixmap(widget ? widget->window()->windowHandle() : 0, tab->iconSize, - mode, (tab->state & State_Selected) ? QIcon::On : QIcon::Off); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); - QPixmap drawPixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - painter->drawPixmap(iconRect.x(), iconRect.y(), drawPixmap); - painter->restore(); - } - - proxy()->drawItemText(painter, textRect, alignment, tab->palette, tab->state & State_Enabled, tab->text, QPalette::ButtonText); - painter->restore(); - - //draw separate line - if (useSeparateLine && sp->TabBar_SplitLine) { - if (true/*!(tab->state & State_Selected) && !(tab->state & State_MouseOver)*/) { - int dis = ((verticalTabs ? drawRect.width() : drawRect.height()) - iconSize) / 2; - painter->save(); - painter->resetTransform(); - painter->setPen(tab->palette.color(QPalette::Active, QPalette::Midlight)); - painter->setBrush(Qt::NoBrush); - if (verticalTabs) { - if (tab->shape == QTabBar::RoundedEast || tab->shape == QTabBar::TriangularEast) { - painter->drawLine(drawRect.x() + dis, drawRect.bottom(), drawRect.right() - dis, drawRect.bottom()); - } else { - painter->drawLine(drawRect.x() + dis, drawRect.top(), drawRect.right() - dis, drawRect.top()); - } - } else if (tab->direction == Qt::RightToLeft) { - painter->drawLine(drawRect.x(), drawRect.top() + dis, drawRect.x(), drawRect.bottom() - dis); - } else { - painter->drawLine(drawRect.right(), drawRect.top() + dis, drawRect.right(), drawRect.bottom() - dis); - } - painter->restore(); - } - } - - return; - } - break; - } - - case CE_ComboBoxLabel: - { - if (const QStyleOptionComboBox *comboBox = qstyleoption_cast<const QStyleOptionComboBox *>(option)) { - QRect arrowRect = proxy()->subControlRect(CC_ComboBox, comboBox, SC_ComboBoxArrow, widget); - QRect editRect = proxy()->subControlRect(CC_ComboBox, comboBox, SC_ComboBoxEditField, widget); - - QStyleOption arrow = *option; - arrow.state = option->state & State_Enabled ? State_Enabled : State_None; - arrow.rect = arrowRect; - proxy()->drawPrimitive(PE_IndicatorArrowDown, &arrow, painter, widget); - - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - if (!comboBox->currentIcon.isNull()) { - QIcon::Mode mode = comboBox->state & State_Enabled ? QIcon::Normal : QIcon::Disabled; - QPixmap pixmap = comboBox->currentIcon.pixmap(comboBox->iconSize, mode); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); - QRect iconRect; - if (comboBox->direction == Qt::RightToLeft) { - iconRect.setRect(editRect.right() - comboBox->iconSize.width(), editRect.y(), comboBox->iconSize.width(), editRect.height()); - editRect.setRect(editRect.x(), editRect.y(), editRect.width() - iconRect.width() - 8, editRect.height()); - } else { - iconRect.setRect(editRect.x(), editRect.y(), comboBox->iconSize.width(), editRect.height()); - editRect.setRect(editRect.x() + iconRect.width() + 8, editRect.y(), editRect.width() - iconRect.width() - 8, editRect.height()); - } - pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - proxy()->drawItemPixmap(painter, iconRect, Qt::AlignCenter, pixmap); - } - - if (!comboBox->currentText.isEmpty() && !comboBox->editable) { - proxy()->drawItemText(painter, editRect, visualAlignment(option->direction, Qt::AlignLeft | Qt::AlignVCenter), - option->palette, option->state & State_Enabled, comboBox->currentText); - } - painter->restore(); - return; - } - break; - } - - case CE_MenuScroller:{ - if(widget == nullptr) - return; - else - return Style::drawControl(element, option, painter, widget); - } - - case CE_RadioButton: - { - if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { - QStyleOptionButton subopt = *button; - subopt.rect = proxy()->subElementRect(SE_RadioButtonIndicator, option, widget); - proxy()->drawPrimitive(PE_IndicatorRadioButton, &subopt, painter, widget); - subopt.rect = proxy()->subElementRect(SE_RadioButtonContents, option, widget); - proxy()->drawControl(CE_RadioButtonLabel, &subopt, painter, widget); - return; - } - break; - } - - case CE_CheckBox: - { - if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { - QStyleOptionButton subopt = *button; - subopt.rect = proxy()->subElementRect(SE_CheckBoxIndicator, option, widget); - proxy()->drawPrimitive(PE_IndicatorCheckBox, &subopt, painter, widget); - subopt.rect = proxy()->subElementRect(SE_CheckBoxContents, option, widget); - proxy()->drawControl(CE_CheckBoxLabel, &subopt, painter, widget); - return; - } - break; - } - - case CE_RadioButtonLabel: - case CE_CheckBoxLabel: - { - if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { - uint alignment = visualAlignment(button->direction, Qt::AlignLeft | Qt::AlignVCenter); - const bool enable = button->state & State_Enabled; - - if (!proxy()->styleHint(SH_UnderlineShortcut, button, widget)) - alignment |= Qt::TextHideMnemonic; - QPixmap pixmap; - QRect textRect = button->rect; - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - if (!button->icon.isNull()) { - QIcon::Mode mode = enable ? QIcon::Normal : QIcon::Disabled; - pixmap = button->icon.pixmap(button->iconSize, mode); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, button); - pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, button, widget); - proxy()->drawItemPixmap(painter, button->rect, alignment, pixmap); - if (button->direction == Qt::RightToLeft) - textRect.setRight(textRect.right() - button->iconSize.width() - sp->IconButton_Distance); - else - textRect.setLeft(textRect.left() + button->iconSize.width() + sp->IconButton_Distance); - } - if (!button->text.isEmpty()){ - proxy()->drawItemText(painter, textRect, alignment | Qt::TextShowMnemonic, - button->palette, button->state & State_Enabled, button->text, QPalette::WindowText); - } - painter->restore(); - return; - } - break; - } - - case CE_SizeGrip: - { - /* - * Style is not required here, as required by design - */ - return; - - }break; - - - //Drawing of single menu item of menu bar - case CE_MenuBarItem: - { - - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - if (const QStyleOptionMenuItem *mbi = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) - { - QStyleOptionMenuItem item = *mbi; - item.rect = mbi->rect.adjusted(0, 1, 0, -3); - painter->fillRect(option->rect, option->palette.window()); - - uint alignment = Qt::AlignCenter | Qt::TextShowMnemonic | Qt::TextDontClip| Qt::TextSingleLine; - - if (!proxy()->styleHint(SH_UnderlineShortcut, mbi, widget)) - alignment |= Qt::TextHideMnemonic; - - QPixmap pix = mbi->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize, option, widget), QIcon::Normal); - if (!pix.isNull()) { - pix = HighLightEffect::ordinaryGeneratePixmap(pix, mbi, widget); - proxy()->drawItemPixmap(painter,mbi->rect, alignment, pix); - } else - proxy()->drawItemText(painter, mbi->rect, alignment, mbi->palette, mbi->state & State_Enabled, - mbi->text, QPalette::ButtonText); - - bool act = (mbi->state & State_Selected) && ((mbi->state & State_Sunken) | (mbi->state & State_HasFocus)); - bool dis = !(mbi->state & State_Enabled); - - - QRect r = option->rect; - //when hover、click and other state, begin to draw style - if (act) { - painter->setBrush(option->palette.highlight().color()); - painter->setPen(Qt::NoPen); - painter->drawRoundedRect(r.adjusted(0, 0, -1, -1),4,4); - - QPalette::ColorRole textRole = dis ? QPalette::Text : QPalette::HighlightedText; - uint alignment = Qt::AlignCenter | Qt::TextShowMnemonic | Qt::TextDontClip | Qt::TextSingleLine; - if (!Style::styleHint(SH_UnderlineShortcut, mbi, widget)) - alignment |= Qt::TextHideMnemonic; - proxy()->drawItemText(painter, item.rect, alignment, mbi->palette, mbi->state & State_Enabled, mbi->text, textRole); - } else { - - } - } - painter->restore(); - - return; - break; - - } - - - - case CE_MenuItem: - { - if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) { - const bool enable(menuItem->state & State_Enabled); - if (menuItem->menuItemType == QStyleOptionMenuItem::EmptyArea) { - return; - } - sp->initMenuParameters(isUseDarkPalette(), option, widget); - - QRect drawRect = menuItem->rect; - if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) { - painter->save(); - QColor SepColor = menuItem->palette.color(QPalette::Active, QPalette::BrightText); - SepColor.setAlphaF(0.1); - painter->setPen(QPen(SepColor, 1, Qt::SolidLine, Qt::RoundCap)); - painter->setBrush(Qt::NoBrush); - painter->drawLine(QPointF(drawRect.left() + sp->MenuItemSeparator_MarginWidth, drawRect.center().y()), - QPointF(drawRect.right() - sp->MenuItemSeparator_MarginWidth, drawRect.center().y())); - painter->restore(); - return; - } - - const bool sunken(menuItem->state & State_Sunken); - const bool selected(menuItem->state & State_Selected); - const bool layout(menuItem->direction == Qt::LeftToRight); - bool isComboBox = qobject_cast<const QComboBox*>(widget); - - //if it's comobobox popup, set combobox popup size rect - if (isComboBox) { - int MenuItem_HMargin = proxy()->pixelMetric(PM_MenuHMargin, option, widget); - drawRect.adjust(MenuItem_HMargin, sp->ComboBox_VMargin, -MenuItem_HMargin, -1 * sp->ComboBox_VMargin); - } - - if (enable && (selected | sunken)) { - painter->save(); - painter->setRenderHint(QPainter::Antialiasing); - painter->setPen(Qt::NoPen); - painter->setBrush(sp->menuParameters.menuItemSelectBrush); - painter->drawRoundedRect(drawRect, sp->menuParameters.itemRadius, sp->menuParameters.itemRadius); - painter->restore(); - } - - int MenuItem_Spacing = sp->MenuItem_Spacing; - int MenuItem_HMargin = sp->MenuContent_HMargin; - //去除item边框 - drawRect = drawRect.adjusted(MenuItem_HMargin, sp->MenuItem_MarginHeight, -MenuItem_HMargin, -sp->MenuItem_MarginHeight); - - //Checkable items draw - if (menuItem->menuHasCheckableItems) { - const bool checked = menuItem->checked; - if (menuItem->checkType == QStyleOptionMenuItem::Exclusive) { - if (checked) { -// QStyleOptionButton radioOption; -// radioOption.QStyleOption::operator=(*option); -// radioOption.rect = drawRect; -// radioOption.state |= State_On; -// radioOption.rect = proxy()->subElementRect(SE_RadioButtonIndicator, &radioOption, widget); -// proxy()->drawPrimitive(PE_IndicatorRadioButton, &radioOption, painter, widget); - int iconWidth = proxy()->pixelMetric(PM_SmallIconSize, option, widget); - QIcon icon = QIcon::fromTheme("object-select-symbolic"); - QIcon::Mode mode = enable ? QIcon::Active : QIcon::Disabled; - QPixmap pixmap = icon.pixmap(iconWidth, iconWidth, mode , QIcon::On); - QPixmap drawPixmap; - drawPixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); - - QRect iconRect(drawRect.x(), drawRect.y() + (drawRect.height() - iconWidth) / 2, iconWidth, iconWidth); - iconRect = visualRect(menuItem->direction, drawRect, iconRect); - painter->save(); - painter->setPen(Qt::NoPen); - painter->setBrush(Qt::NoBrush); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - painter->drawPixmap(iconRect, drawPixmap); - painter->restore(); - } - } else if (menuItem->checkType == QStyleOptionMenuItem::NonExclusive) { - if (checked) { - int iconWidth = proxy()->pixelMetric(PM_SmallIconSize, option, widget); - QIcon icon = QIcon::fromTheme("object-select-symbolic"); - QIcon::Mode mode = enable ? (selected ? QIcon::Active : QIcon::Normal) : QIcon::Disabled; - QPixmap pixmap = icon.pixmap(iconWidth, iconWidth, mode , QIcon::On); - QPixmap drawPixmap; - drawPixmap = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); - - QRect iconRect(drawRect.x(), drawRect.y() + (drawRect.height() - iconWidth) / 2, iconWidth, iconWidth); - iconRect = visualRect(menuItem->direction, drawRect, iconRect); - painter->save(); - painter->setPen(Qt::NoPen); - painter->setBrush(Qt::NoBrush); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - painter->drawPixmap(iconRect, drawPixmap); - painter->restore(); - } - } - } - - - bool hasIcon = false; - if(isComboBox) - { - auto *comboBox = qobject_cast<const QComboBox*>(widget); - int column = comboBox->count(); - for(int i = 0; i < column; i++) - { - if(!comboBox->itemIcon(i).isNull()){ - hasIcon = true; - break; - } - } - } - else if(menuItem->maxIconWidth != 0) - hasIcon = true; - -// if(qobject_cast<const QMenu*>(widget)) -// { -// auto *menu = qobject_cast<const QMenu*>(widget); -// int column = menu->actions().length(); -// for(int i = 0; i < column; i++) -// { -// if(!menu->actions().at(i)->icon().isNull()) -// { -// hasIcon = true; -// } -// } -// } - - if (menuItem->menuHasCheckableItems || hasIcon) { - int iconWidth = proxy()->pixelMetric(PM_SmallIconSize, option, widget); - int w = (menuItem->menuHasCheckableItems ? iconWidth : 0) + - (hasIcon ? iconWidth : 0) + - ((menuItem->menuHasCheckableItems && hasIcon) ? MenuItem_Spacing : 0); - drawRect = visualRect(menuItem->direction, drawRect, drawRect.adjusted(w + MenuItem_Spacing, 0, 0, 0)); - } else { - drawRect = drawRect.adjusted(4, 0, -4, -0);//去除item边框 - } - - - if (menuItem->menuItemType == QStyleOptionMenuItem::SubMenu) { - int indWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); - int indHight = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); - QRect indRect(drawRect.right() - indWidth, drawRect.y() + (drawRect.height() - indHight)/2, indWidth, indHight);//箭头绘制是居中的,绘制会有写误差。 - indRect = visualRect(menuItem->direction, drawRect, indRect); - QStyleOption indOption = *option; - if (selected) - indOption.state |= State_MouseOver; - indOption.rect = indRect; - proxy()->drawPrimitive(layout ? PE_IndicatorArrowRight : PE_IndicatorArrowLeft, &indOption, painter, widget); - drawRect = visualRect(menuItem->direction, drawRect, drawRect.adjusted(0, 0, -(indWidth + MenuItem_Spacing), 0)); - } - - if (hasIcon) { - int smallIconSize = proxy()->pixelMetric(PM_SmallIconSize, option, widget); - QSize iconSize(smallIconSize, smallIconSize); - QIcon::Mode mode = enable ? (selected ? QIcon::Active : QIcon::Normal) : QIcon::Disabled; - QIcon::State state = menuItem->checked ? QIcon::On : QIcon::Off; - QPixmap pixmap = menuItem->icon.pixmap(iconSize, mode, state); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); - QPixmap target; - target = HighLightEffect::bothOrdinaryAndHoverGeneratePixmap(pixmap, option, widget); - - int recX = drawRect.x() - (MenuItem_Spacing + smallIconSize); - QRect iconRect(recX, drawRect.y() + (drawRect.height() - smallIconSize)/2, smallIconSize, smallIconSize); - iconRect = visualRect(menuItem->direction, drawRect, iconRect); - painter->save(); - painter->setPen(menuItem->palette.color(QPalette::Active, QPalette::Text)); - painter->setBrush(Qt::NoBrush); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - painter->drawPixmap(iconRect, target); - painter->restore(); - } - //text - if (!menuItem->text.isEmpty()) { - QString text = menuItem->text; - painter->save(); - if (enable) { - if (selected | sunken) { - painter->setPen(sp->menuParameters.menuTextHoverPen); - } else { - painter->setPen(menuItem->palette.color(QPalette::Active, QPalette::Text)); - } - } else { - painter->setPen(menuItem->palette.color(QPalette::Disabled, QPalette::Text)); - } - painter->setBrush(Qt::NoBrush); - - int text_flags = Qt::AlignVCenter | Qt::TextDontClip | Qt::TextSingleLine; - if (proxy()->styleHint(SH_UnderlineShortcut, option, widget)) - text_flags |= Qt::TextShowMnemonic; - int textToDraw_flags = text_flags; - int t = menuItem->text.indexOf(QLatin1Char('\t')); - if (t >=0) { - const QString textToDraw = menuItem->text.mid(t + 1); - text = menuItem->text.left(t); - if (layout) - textToDraw_flags |= Qt::AlignRight; - else - textToDraw_flags |= Qt::AlignLeft; - painter->drawText(drawRect, textToDraw_flags, textToDraw); - } - - QFont font = menuItem->font; - font.setPointSizeF(QFontInfo(menuItem->font).pointSizeF()); - if (menuItem->menuItemType == QStyleOptionMenuItem::DefaultItem) - font.setBold(true); - painter->setFont(font); - - if (layout) - text_flags |= Qt::AlignLeft; - else - text_flags |= Qt::AlignRight; - - QFontMetrics metrics(font); - QString elidedText = metrics.elidedText(text, Qt::ElideRight, drawRect.width()); - - painter->drawText(drawRect, text_flags, elidedText); - painter->restore(); - } - return; - } - break; - } - - - - // Draw UKUI ToolBoxTab Style - case CE_ToolBoxTab: - if (const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(option)) { - proxy()->drawControl(CE_ToolBoxTabShape, tb, painter, widget); - proxy()->drawControl(CE_ToolBoxTabLabel, tb, painter, widget); - return; - } - break; - - case CE_ToolBoxTabShape: - if (const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(option)) { - painter->save(); - painter->setPen(Qt::NoPen); - if(widget->isEnabled()){ - painter->setBrush(tb->palette.button().color()); - if(option->state & State_MouseOver) - { - painter->setBrush(tb->palette.button().color().darker(110)); - if(option->state & State_Sunken) - painter->setBrush(tb->palette.button().color().darker(110)); - } - } - else { - painter->setBrush(tb->palette.color(QPalette::Disabled,QPalette::Button)); - } - - if (tb->direction != Qt::RightToLeft || tb->direction != Qt::RightToLeft) { - painter->drawRoundedRect(option->rect,4,4); - } - painter->restore(); - return; - } break; - - case CE_ToolBoxTabLabel: - if (const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(option)) { - bool enabled = tb->state & State_Enabled; - bool selected = tb->state & State_Selected; - int iconExtent = proxy()->pixelMetric(QStyle::PM_SmallIconSize, tb, widget); - QPixmap pm = tb->icon.pixmap(widget ? widget->window()->windowHandle() : 0, QSize(iconExtent, iconExtent),enabled ? QIcon::Normal : QIcon::Disabled); - - QRect cr = subElementRect(QStyle::SE_ToolBoxTabContents, tb, widget); - QRect tr, ir; - int ih = 0; - if (pm.isNull()) { - tr = cr; - tr.adjust(4, 0, -8, 0); - } else { - int iw = pm.width() / pm.devicePixelRatio() + 4; - ih = pm.height()/ pm.devicePixelRatio(); - ir = QRect(cr.left() + 4, cr.top(), iw + 2, ih); - tr = QRect(ir.right(), cr.top(), cr.width() - ir.right() - 4, cr.height()); - } - - if (selected && proxy()->styleHint(QStyle::SH_ToolBox_SelectedPageTitleBold, tb, widget)) { - QFont f(painter->font()); - f.setBold(true); - painter->setFont(f); - } - - QString txt = tb->fontMetrics.elidedText(tb->text, Qt::ElideRight, tr.width()); - - if (ih) { - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - painter->drawPixmap(ir.left(), (tb->rect.height() - ih) / 2, pm); - painter->restore(); - } - - int alignment = Qt::AlignCenter | Qt::AlignVCenter | Qt::TextShowMnemonic; - if (!proxy()->styleHint(QStyle::SH_UnderlineShortcut, tb, widget)) - alignment |= Qt::TextHideMnemonic; - - // painter->drawText(option->rect,tb->text, QTextOption(Qt::AlignCenter)); - proxy()->drawItemText(painter, tr, alignment, tb->palette, enabled, txt, QPalette::ButtonText); - - if (!txt.isEmpty() && option->state & State_HasFocus) { - QStyleOptionFocusRect opt; - opt.rect = tr; - opt.palette = tb->palette; - opt.state = QStyle::State_None; - proxy()->drawPrimitive(QStyle::PE_FrameFocusRect, &opt, painter, widget); - } - return; - } break; - - case CE_ProgressBar: - { - if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { - QStyleOptionProgressBar subOption = *pb; - subOption.rect = proxy()->subElementRect(SE_ProgressBarGroove, pb, widget); - proxy()->drawControl(CE_ProgressBarGroove, &subOption, painter, widget); - subOption.rect = proxy()->subElementRect(SE_ProgressBarContents, pb, widget); - proxy()->drawControl(CE_ProgressBarContents, &subOption, painter, widget); - if (pb->textVisible) { - subOption.rect = proxy()->subElementRect(SE_ProgressBarLabel, pb, widget); - proxy()->drawControl(CE_ProgressBarLabel, &subOption, painter, widget); - } - return; - } - break; - } - - case CE_ProgressBarGroove: - { - sp->initProgressBarParameters(isUseDarkPalette(), option, widget); - const bool enable = option->state & State_Enabled; - int width = 0; - - painter->save(); - if(sp->progressBarParameters.radius != 0) - painter->setRenderHint(QPainter::Antialiasing, true); - if (!enable) { - width = sp->progressBarParameters.progressBarGrooveDisablePen.width(); - painter->setPen(sp->progressBarParameters.progressBarGrooveDisablePen); - painter->setBrush(sp->progressBarParameters.progressBarGrooveDisableBrush); - } else { - width = sp->progressBarParameters.progressBarGrooveDefaultPen.width(); - painter->setPen(sp->progressBarParameters.progressBarGrooveDefaultPen); - painter->setBrush(sp->progressBarParameters.progressBarGrooveDefaultBrush); - } - if(width == 1 && sp->progressBarParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->drawRoundedRect(option->rect.adjusted(width, width, -width, -width), sp->progressBarParameters.radius, sp->progressBarParameters.radius); - painter->restore(); - return; - } - - case CE_ProgressBarContents: - { - if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { - sp->initProgressBarParameters(isUseDarkPalette(), pb, widget); - - QBrush brush = sp->progressBarParameters.progressBarContentBrush; - - const bool vertical = pb->orientation == Qt::Vertical; - const bool inverted = pb->invertedAppearance; - - bool reverse = (!vertical && (pb->direction == Qt::RightToLeft)) || vertical; - if (inverted) - reverse = !reverse; - - QColor progressBarContentHightColor = sp->progressBarParameters.progressBarContentHightColor; - QColor progressBarContentMidLightColor = sp->progressBarParameters.progressBarContentMidLightColor; - - QLinearGradient linearGradient; - if (QVariantAnimation *animation = m_animation_helper->animation(option->styleObject)) { - if(animation->state() == QAbstractAnimation::Running){ - bool forward = animation->direction() == QAbstractAnimation::Forward; - if(!forward) - reverse = !reverse; - - linearGradient.setColorAt(0, progressBarContentMidLightColor); - linearGradient.setColorAt(1, progressBarContentHightColor); - - if (vertical) { - if (reverse) { - linearGradient.setStart(pb->rect.bottomLeft()); - linearGradient.setFinalStop(pb->rect.topLeft()); - } else { - linearGradient.setStart(pb->rect.topLeft()); - linearGradient.setFinalStop(pb->rect.bottomLeft()); - } - } else { - if (reverse) { - linearGradient.setStart(pb->rect.topRight()); - linearGradient.setFinalStop(pb->rect.topLeft()); - } else { - linearGradient.setStart(pb->rect.topLeft()); - linearGradient.setFinalStop(pb->rect.topRight()); - } - } - - brush = QBrush(linearGradient); - } - } - - - int width = sp->progressBarParameters.progressBarContentPen.width(); - painter->save(); - if(sp->progressBarParameters.radius != 0) - painter->setRenderHint(QPainter::Antialiasing, true); - if(width == 1 && sp->progressBarParameters.radius != 0) - painter->translate(0.5, 0.5); - painter->setPen(sp->progressBarParameters.progressBarContentPen); - painter->setBrush(brush); - painter->drawRoundedRect(pb->rect.adjusted(width, width, -width, -width), sp->progressBarParameters.radius, sp->progressBarParameters.radius); - painter->restore(); - return; - } - break; - } - - case CE_ProgressBarLabel: - { - if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { - if (pb->textVisible) { - const auto progress = qMax(pb->progress, pb->minimum); - const bool vertical = pb->orientation == Qt::Vertical; - const bool inverted = pb->invertedAppearance; - const bool indeterminate = (pb->minimum == 0 && pb->maximum == 0); - - int maxWidth = vertical ? pb->rect.height() : pb->rect.width(); - const auto totalSteps = qMax(Q_INT64_C(1), qint64(pb->maximum) - pb->minimum); - const auto progressSteps = qint64(progress) - pb->minimum; - const auto progressBarWidth = progressSteps * maxWidth / totalSteps; - int len = indeterminate ? maxWidth : progressBarWidth; - - bool reverse = (!vertical && (pb->direction == Qt::RightToLeft)) || vertical; - if (inverted) - reverse = !reverse; - - painter->save(); - painter->setBrush(Qt::NoBrush); - QRect rect = pb->rect; - if (pb->orientation == Qt::Vertical) { - rect.setRect(rect.y(), rect.x(), rect.height(), rect.width()); - QTransform m; - m.rotate(90); - m.translate(0, -rect.height()); - painter->setTransform(m, true); - } - QRect textRect(rect.x(), rect.y(), pb->fontMetrics.horizontalAdvance(pb->text), rect.height()); - textRect.moveCenter(rect.center()); - if (len <= textRect.left()) { - painter->setPen(pb->palette.color(QPalette::Active, QPalette::WindowText)); - painter->drawText(textRect, pb->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); - } else if (len >= textRect.right()) { - painter->setPen(pb->palette.color(QPalette::Active, QPalette::HighlightedText)); - painter->drawText(textRect, pb->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); - } else { - QRect leftRect(textRect.x(), textRect.y(), len - textRect.left(), textRect.height()); - QRect rightRect(leftRect.right() + 1, textRect.y(), textRect.right() + 1 - len, textRect.height()); - if (reverse) { - leftRect.setRect(textRect.left(), textRect.top(), maxWidth - len - textRect.left(), textRect.height()); - rightRect.setRect(leftRect.right() + 1, textRect.top(), textRect.width() - leftRect.width(), textRect.height()); - painter->setPen(pb->palette.color(QPalette::Active, QPalette::HighlightedText)); - painter->setClipRect(rightRect); - painter->drawText(textRect, pb->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); - painter->setPen(pb->palette.color(QPalette::Active, QPalette::WindowText)); - painter->setClipRect(leftRect); - painter->drawText(textRect, pb->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); - } else { - painter->setPen(pb->palette.color(QPalette::Active, QPalette::WindowText)); - painter->setClipRect(rightRect); - painter->drawText(textRect, pb->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); - painter->setPen(pb->palette.color(QPalette::Active, QPalette::HighlightedText)); - painter->setClipRect(leftRect); - painter->drawText(textRect, pb->text, QTextOption(Qt::AlignAbsolute | Qt::AlignHCenter | Qt::AlignVCenter)); - } - } - painter->resetTransform(); - painter->restore(); - } - return; - } - break; - } - - case CE_Header: - { - if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) { - QRegion clipRegion = painter->clipRegion(); - painter->setClipRect(option->rect); - proxy()->drawControl(CE_HeaderSection, option, painter, widget); - QStyleOptionHeader subopt = *header; - subopt.rect = proxy()->subElementRect(SE_HeaderLabel, header, widget); - if (subopt.rect.isValid()) - proxy()->drawControl(CE_HeaderLabel, &subopt, painter, widget); - if (header->sortIndicator != QStyleOptionHeader::None) { - subopt.rect = proxy()->subElementRect(SE_HeaderArrow, option, widget); - proxy()->drawPrimitive(PE_IndicatorHeaderArrow, &subopt, painter, widget); - } - painter->setClipRegion(clipRegion); - return; - } - break; - } - - case CE_HeaderSection: - { - if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) { - const bool enable = header->state & State_Enabled; - painter->save(); - painter->setPen(Qt::NoPen); - painter->setBrush(header->palette.brush(enable ? QPalette::Active : QPalette::Disabled, QPalette::Base)); - painter->drawRect(header->rect); - painter->restore(); - painter->save(); - QColor color = header->palette.color(QPalette::Active, isUseDarkPalette() ? QPalette::Midlight : QPalette::Shadow); - painter->setPen(color); - painter->setBrush(Qt::NoBrush); - if (header->orientation == Qt::Horizontal) { -// int iconSize = proxy()->pixelMetric(PM_SmallIconSize); -// int dis = (header->rect.height() - iconSize) / 2 - 1; - int dis = (header->rect.height() / 2) / 2; - if (header->position != QStyleOptionHeader::End && header->position != QStyleOptionHeader::OnlyOneSection) { - if (header->direction == Qt::LeftToRight) { - painter->drawLine(header->rect.right(), header->rect.top() + dis, header->rect.right(), header->rect.bottom() - dis); - } else { - painter->drawLine(header->rect.left(), header->rect.top() + dis, header->rect.left(), header->rect.bottom() - dis); - } - } - painter->drawLine(header->rect.left(), header->rect.bottom(), header->rect.right(), header->rect.bottom()); - } - painter->restore(); - return; - } - break; - } - - case CE_HeaderLabel: - { - if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) { - QRect rect = header->rect; - QRect textRect = header->rect; - int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, option, widget); - textRect.adjust(margin, 0, -margin, -0); - - int iconSize = proxy()->pixelMetric(PM_SmallIconSize); - if (!header->icon.isNull()) { - QIcon::Mode mode = header->state & State_Enabled ? QIcon::Normal : QIcon::Disabled; - QPixmap pixmap = header->icon.pixmap(iconSize, iconSize, mode); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, option); - pixmap = HighLightEffect::ordinaryGeneratePixmap(pixmap, option, widget); - QRect iconRect(textRect.x(), textRect.y() + (textRect.height() - iconSize) / 2, iconSize, iconSize); - textRect.setRect(iconRect.right() + 1 + 8, textRect.y(), textRect.width() - iconRect.width() - 8, textRect.height()); - iconRect = visualRect(header->direction, rect, iconRect); - textRect = visualRect(header->direction, rect, textRect); - painter->save(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - painter->drawPixmap(iconRect, pixmap); - painter->restore(); - } - - if (header->state & QStyle::State_On || header->state & QStyle::State_Sunken) { - QFont font = painter->font(); - font.setBold(true); - painter->setFont(font); - } - - proxy()->drawItemText(painter, textRect, header->textAlignment | Qt::AlignVCenter, header->palette, - (header->state & State_Enabled), header->text, QPalette::ButtonText); - return; - } - break; - } - - case CE_HeaderEmptyArea: - { - const bool enable = option->state & State_Enabled; - painter->save(); - painter->setPen(Qt::NoPen); - painter->setBrush(option->palette.brush(enable ? QPalette::Active : QPalette::Disabled, QPalette::Base)); - painter->drawRect(option->rect); - painter->restore(); - return; - } - - case CE_ItemViewItem: - { - if (const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option)) { - painter->save(); - if (painter->clipPath().isEmpty()) - painter->setClipRect(option->rect); - - QRect checkRect = proxy()->subElementRect(SE_ItemViewItemCheckIndicator, option, widget); - QRect iconRect = proxy()->subElementRect(SE_ItemViewItemDecoration, option, widget); - QRect textRect = proxy()->subElementRect(SE_ItemViewItemText, option, widget); - - proxy()->drawPrimitive(PE_PanelItemViewItem, option, painter, widget); - - if (vi->features & QStyleOptionViewItem::HasCheckIndicator) { - QStyleOptionButton option; - option.rect = checkRect; - option.state = vi->state & ~QStyle::State_HasFocus; - option.palette = vi->palette; - - switch (vi->checkState) { - case Qt::Unchecked: - option.state |= QStyle::State_Off; - break; - case Qt::PartiallyChecked: - option.state |= QStyle::State_NoChange; - break; - case Qt::Checked: - option.state |= QStyle::State_On; - break; - } - proxy()->drawPrimitive(QStyle::PE_IndicatorViewItemCheck, &option, painter, widget); - } - - if (!vi->icon.isNull()) { - QIcon::Mode mode = QIcon::Normal; - if (!(vi->state & QStyle::State_Enabled)) - mode = QIcon::Disabled; -// else if (vi->state & QStyle::State_Selected) -// mode = QIcon::Selected; - QIcon::State state = vi->state & QStyle::State_Open ? QIcon::On : QIcon::Off; - QPixmap pixmap = vi->icon.pixmap(vi->decorationSize, mode, state); - pixmap = proxy()->generatedIconPixmap(mode, pixmap, vi); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - proxy()->drawItemPixmap(painter, iconRect, vi->decorationAlignment, HighLightEffect::ordinaryGeneratePixmap(pixmap, vi, widget)); - } - - - - QPen ViewItemHover; - QPen ViewItemSelect; - if (qobject_cast<const QTreeView*>(widget) || qobject_cast<const QTreeWidget*>(widget)) { - ViewItemHover = sp->treeParameters.treeTextHoverPen; - ViewItemSelect = sp->treeParameters.treeTextSelectPen; - } else if(qobject_cast<const QListView *>(widget) || qobject_cast<const QListWidget *>(widget)){ - ViewItemHover = sp->listParameters.listTextHoverPen; - ViewItemSelect = sp->listParameters.listTextSelectPen; - } else if(qobject_cast<const QTableView *>(widget) || qobject_cast<const QTableWidget *>(widget)){ - ViewItemHover = sp->tableParameters.tableTextHoverPen; - ViewItemSelect = sp->tableParameters.tableTextSelectPen; - } - else { - - } - - - if (!vi->text.isEmpty()) { - QPalette::ColorGroup cg = vi->state & QStyle::State_Enabled - ? QPalette::Normal : QPalette::Disabled; - if (cg == QPalette::Normal && !(vi->state & QStyle::State_Active)) - cg = QPalette::Inactive; - - if (((vi->decorationPosition == QStyleOptionViewItem::Top) || (vi->decorationPosition == QStyleOptionViewItem::Bottom)) - && !(vi->state & State_Selected) && (vi->state & QStyle::State_Enabled)) { - painter->setPen(vi->palette.color(cg, QPalette::Text)); - } - else if ((vi->state & (QStyle::State_Selected)) && (vi->state & QStyle::State_Enabled)) { - painter->setPen(ViewItemSelect); - } - else if ((vi->state & (QStyle::State_MouseOver)) && (vi->state & QStyle::State_Enabled)) - { - painter->setPen(ViewItemHover); - } - else { - painter->setPen(vi->palette.color(cg, QPalette::Text)); - } - - if (vi->state & QStyle::State_Editing) { - painter->setPen(vi->palette.color(cg, QPalette::Text)); - painter->drawRect(textRect.adjusted(0, 0, -1, -1)); - } - viewItemDrawText(painter, vi, textRect); - - } - painter->restore(); - return; - } - break; - } - - case CE_ShapedFrame: - if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(option)) { - painter->save(); - int frameShape = f->frameShape; - int frameShadow = QFrame::Plain; - if (f->state & QStyle::State_Sunken) { - frameShadow = QFrame::Sunken; - } else if (f->state & QStyle::State_Raised) { - frameShadow = QFrame::Raised; - } - - int lw = f->lineWidth; - int mlw = f->midLineWidth; - - switch (frameShape) { - case QFrame::HLine: - case QFrame::VLine: { - QPoint p1, p2; - if (frameShape == QFrame::HLine) { - p1 = QPoint(option->rect.x(), option->rect.y() + option->rect.height() / 2); - p2 = QPoint(option->rect.x() + option->rect.width(), p1.y()); - } else { - p1 = QPoint(option->rect.x() + option->rect.width() / 2, option->rect.y()); - p2 = QPoint(p1.x(), p1.y() + option->rect.height()); - } - if (frameShadow == QFrame::Plain) { - QPen oldPen = painter->pen(); - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - painter->setPen(QPen(QBrush(f->palette.color(QPalette::Active, QPalette::NoRole)), lw)); - painter->drawLine(p1, p2); - painter->setPen(oldPen); - } else { - qDrawShadeLine(painter, p1, p2, f->palette, frameShadow == QFrame::Sunken, lw, mlw); - } - painter->restore(); - break; - } - case QFrame::WinPanel: - case QFrame::Panel: - case QFrame::StyledPanel: - case QFrame::Box: - default: - painter->restore(); - Style::drawControl(element, option, painter, widget); - break; - } - } - break; - default: - return Style::drawControl(element, option, painter, widget); - } -} - -int Qt5UKUIStyle::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, const QWidget *widget) const -{ - switch (metric) { - case PM_ScrollBarExtent: - return sp->ScroolBar_Width; - case PM_ScrollBarSliderMin: - return sp->ScroolBar_Height; - case PM_MaximumDragDistance: - return -1; - - case PM_MenuPanelWidth: - return sp->Menu_MarginPanelWidth; - case PM_MenuHMargin: - { - if (qobject_cast<const QComboBox*>(widget)) { - return sp->Menu_Combobox_Popup_MarginWidth; - } - return sp->Menu_MarginWidth; - } - case PM_MenuVMargin: - { - if (qobject_cast<const QComboBox*>(widget)) { - return sp->Menu_Combobox_Popup_MarginHeight; - } - return sp->Menu_MarginHeight; - } - case PM_SubMenuOverlap: - return 8; - - case PM_SliderThickness: - return sp->Slider_Thickness; - case PM_SliderControlThickness: - case PM_SliderLength: - return sp->Slider_Length; - case PM_SliderTickmarkOffset: - return 5; - case PM_SliderSpaceAvailable: - { - if (const QStyleOptionSlider *sl = qstyleoption_cast<const QStyleOptionSlider *>(option)) { - if (sl->orientation == Qt::Horizontal) - return sl->rect.width() - proxy()->pixelMetric(PM_SliderLength, option, widget) - 2 * sp->Slider_Margin; - else - return sl->rect.height() - proxy()->pixelMetric(PM_SliderLength, option, widget)- 2 * sp->Slider_Margin; - } else { - return 0; - } - break; - } - - case PM_SmallIconSize: - return sp->SmallIcon_Size; - - case PM_MenuScrollerHeight: - if(widget == nullptr) - return 0; - else - return Style::pixelMetric(metric, option, widget); - - case PM_DefaultFrameWidth://qframe margin 边距 - if (qstyleoption_cast<const QStyleOptionToolButton *>(option)) { - return 4; - } - return 2; - - case PM_MenuBarItemSpacing:return 16; - case PM_MenuBarVMargin:return 4; - case PM_ToolTipLabelFrameWidth: - return sp->ToolTip_DefaultMargin; - - case PM_LayoutLeftMargin: - case PM_LayoutTopMargin: - case PM_LayoutRightMargin: - case PM_LayoutBottomMargin: - return 8; - case PM_LayoutHorizontalSpacing: - case PM_LayoutVerticalSpacing: - return 8; - case PM_ToolBarFrameWidth: - case PM_ToolBarItemMargin: - return 0; - case PM_ToolBarItemSpacing: - return 4; - - case PM_MessageBoxIconSize: - return 24; - - case PM_TabCloseIndicatorWidth: - case PM_TabCloseIndicatorHeight: - return 20; - - case PM_TabBarTabHSpace: - return 8 * 2; - case PM_TabBarTabVSpace: - return 4 * 2; - - case PM_TabBarTabOverlap: - return 1; - - case PM_TabBarScrollButtonWidth: - return sp->TabBar_ScrollButtonWidth; - - case PM_TabBar_ScrollButtonOverlap: - return sp->TabBar_ScrollButtonOverlap; - - case PM_TabBarIconSize: - return 16; - - case PM_TabBarTabShiftVertical: - return 0; - case PM_TabBarTabShiftHorizontal: - return 0; - - case PM_TabBarBaseHeight: - return 2; - - case PM_TabBarBaseOverlap: - return 0; - - case PM_ExclusiveIndicatorWidth: - return sp->ExclusiveIndicator_Width; - case PM_ExclusiveIndicatorHeight: - return sp->ExclusiveIndicator_Height; - case PM_RadioButtonLabelSpacing: - return sp->RadioButtonLabel_Spacing; - case PM_IndicatorWidth: - return sp->Indicator_Width; - case PM_IndicatorHeight: - return sp->Indicator_Height; - - case PM_ButtonIconSize: - return sp->Button_IconSize; - case PM_ButtonMargin: - return sp->Button_MarginWidth; - case PM_MenuButtonIndicator: - return sp->Button_IndicatorSize; - case PM_ButtonDefaultIndicator: - return sp->Button_DefaultIndicatorSize; - - case PM_ComboBoxFrameWidth: - return sp->ComboBox_FrameWidth; - - case PM_SpinBoxFrameWidth: - return sp->SpinBox_FrameWidth; - - case PM_ProgressBarChunkWidth: - return 9; - - case PM_HeaderMargin: - return 2; - case PM_HeaderMarkSize: - return 16; - case PM_ScrollView_ScrollBarOverlap: - return 0; - - case PM_ListViewIconSize: - return 16; - case PM_IconViewIconSize: - return 32; - case PM_FocusFrameHMargin: - return 4; - - case PM_TreeViewIndentation: - return 20; - case PM_HeaderDefaultSectionSizeVertical:{ - return sp->m_headerDefaultSectionSizeVertical; - } - default: - break; - } - return Style::pixelMetric(metric, option, widget); -} - -QRect Qt5UKUIStyle::subControlRect(QStyle::ComplexControl control, const QStyleOptionComplex *option, QStyle::SubControl subControl, const QWidget *widget) const -{ - switch (control) { - case CC_ScrollBar: - { - if (const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option)) { - const QRect rect = bar->rect; - int lineLength = 0; - int distance = 4; - if (sp->ScrooBar_ShowLine && widget && ((widget->property("drawScrollBarGroove").isValid() && - widget->property("drawScrollBarGroove").toBool()) || !widget->property("drawScrollBarGroove").isValid())) - { - lineLength = sp->ScroolBar_LineLength; - distance = 0; - } - const bool horizontal = bar->orientation == Qt::Horizontal; - int maxlen = (horizontal ? rect.width() : rect.height()) - distance - 2 * lineLength; - int sliderlen = 0; - if (bar->maximum != bar->minimum) { - uint range = bar->maximum - bar->minimum; - sliderlen = (qint64(bar->pageStep) * maxlen) / (range + bar->pageStep); - - int slidermin = proxy()->pixelMetric(PM_ScrollBarSliderMin, bar, widget); - if (sliderlen < slidermin || range > INT_MAX / 2) - sliderlen = slidermin; - if (sliderlen > maxlen) - sliderlen = maxlen; - } else { - sliderlen = maxlen; - } - - auto animator = m_scrollbar_animation_helper->animator(widget); - if (animator && sp->scrollBarParameters.animation) { -// qDebug() << "bar value..." << bar->sliderValue << bar->sliderPosition; - if(animator->isRunning("move_position") || - (animator->getExtraProperty("start_position").toInt() != - animator->getExtraProperty("end_position").toInt() && - bar->sliderValue != animator->getExtraProperty("end_position").toInt())){ - ///|| (animator->value("move_position").toReal() > animator->animatorStartValue("move_position").toReal() && - /// animator->value("move_position").toReal() <= animator->animatorEndValue("move_position").toReal())){ - if(const QScrollBar* scrollbar = qobject_cast<const QScrollBar *>(widget)){ - QScrollBar *sbar = const_cast<QScrollBar *>(scrollbar); - if(sbar){ - int startValue = animator->getExtraProperty("start_position").toInt(); - int endValue = animator->getExtraProperty("end_position").toInt(); - int v = startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal(); -// qDebug() << "v...................." << v << startValue << endValue; - if(v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)) - sbar->setValue(v); - } - } - } - } - - int sliderstart = lineLength + sliderPositionFromValue(bar->minimum, bar->maximum, bar->sliderPosition, maxlen - sliderlen, bar->upsideDown) + distance / 2; - switch (subControl) { - case SC_ScrollBarSubLine: - { - if(!sp->ScrooBar_ShowLine) - return QRect(); - if (horizontal) - return QRect(0, 0, lineLength, rect.height()); - else - return QRect(0, 0, rect.width(), lineLength); - } - case SC_ScrollBarAddLine: - { - if(!sp->ScrooBar_ShowLine) - return QRect(); - if (horizontal) - return QRect(rect.right() - lineLength, 0, lineLength, rect.height()); - else - return QRect(0, rect.bottom() - lineLength, rect.width(), lineLength); - } - case SC_ScrollBarFirst: - case SC_ScrollBarLast: - return QRect(); - - case SC_ScrollBarSubPage: - { - if (horizontal) - return QRect(lineLength, 0, sliderstart - lineLength, rect.height()); - else - return QRect(0, lineLength, rect.width(), sliderstart - lineLength); - } - - case SC_ScrollBarAddPage: - { - if (horizontal) - return QRect(sliderstart + sliderlen, 0, rect.width() - sliderstart - sliderlen - lineLength, rect.height()); - else - return QRect(0, sliderstart + sliderlen, rect.width(), rect.height() - sliderstart - sliderlen - lineLength); - } - - - case SC_ScrollBarSlider: - { - if(!animator->isRunning("move_position") && animator->currentAnimatorTime("move_position") != 0){ -// qDebug() << "stop animator time........."; - animator->setAnimatorCurrentTime("move_position", 0); - animator->setExtraProperty("end_position", 0); - animator->setExtraProperty("start_position", 0); - } - if (horizontal) - return QRect(sliderstart, 0, sliderlen, rect.height()); - else - return QRect(0, sliderstart, rect.width(), sliderlen); - } - - case SC_ScrollBarGroove: - { - if (horizontal) - return QRect(rect.x() + lineLength, rect.y(), rect.width() - 2 * lineLength, rect.height()); - else - return QRect(rect.x(), rect.y() + lineLength, rect.width(), rect.height() - 2 * lineLength); - } - - default: - break; - } - } - break; - } - - case CC_Slider: - { - if (const QStyleOptionSlider* slider = qstyleoption_cast<const QStyleOptionSlider*>(option)) { - QRect rect = option->rect; - const bool horizontal(slider->orientation == Qt::Horizontal); - const int thickSpace = 2; - if (horizontal) { - if (slider->tickPosition & QSlider::TicksAbove) - rect.adjust(0, thickSpace, 0, 0); - if (slider->tickPosition & QSlider::TicksBelow) - rect.adjust(0, 0, 0, -thickSpace); - } else { - if (slider->tickPosition & QSlider::TicksAbove) - rect.adjust(thickSpace, 0, 0, 0); - if (slider->tickPosition & QSlider::TicksBelow) - rect.adjust(0, 0, -thickSpace, 0); - } - - switch (subControl) { - case SC_SliderHandle: - { - auto animator = m_slider_animation_helper->animator(widget); - - if (slider && animator && sp->sliderParameters.animation){ - if(animator->isRunning("move_position") || - (animator->getExtraProperty("start_position").toInt() != - animator->getExtraProperty("end_position").toInt() && - slider->sliderValue != animator->getExtraProperty("end_position").toInt())) { - auto sliderBar = qobject_cast<const QAbstractSlider *>(widget); -// qDebug() << "value......." << subControl << slider->sliderValue << animator->getExtraProperty("start_position").toInt(); -// qDebug() << "isrunning............." << animator->isRunning("move_position"); -// qDebug() << "CC_Slider.....:" << animator->isRunning("move_position") << animator->value("move_position").toReal(); -// qDebug() << "value:.........." << animator->value("move_position").toReal(); - - QAbstractSlider *sbar = const_cast<QAbstractSlider *>(sliderBar); - if(sbar){ - int startValue = animator->getExtraProperty("start_position").toInt(); - int endValue = animator->getExtraProperty("end_position").toInt(); -// qDebug() << "startvalue:" << startValue << "endvalue:" << endValue -// << animator->getExtraProperty("start_position").toInt() -// << animator->getExtraProperty("end_position").toInt(); - int v = startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal(); - if(v >= qMin(startValue, endValue) && v <= qMax(startValue, endValue)) - sbar->setValue(startValue + (endValue - startValue) * 1.0 * animator->value("move_position").toReal()); - } - } - } - - - if (animator && sp->sliderParameters.animation) { - if(!animator->isRunning("move_position") && animator->currentAnimatorTime("move_position") != 0){ - animator->setAnimatorCurrentTime("move_position", 0); - animator->setExtraProperty("end_position", 0); - animator->setExtraProperty("start_position", 0); -// qDebug() << "setAnimatorCurrentTime0000000000000000" << animator->getExtraProperty("start_position").toInt() << animator->getExtraProperty("end_position").toInt(); - } - } - - QRect handleRect = option->rect; - int handleThickness = proxy()->pixelMetric(PM_SliderThickness, option, widget); - int handleLength = proxy()->pixelMetric(PM_SliderLength, option, widget); - if(horizontal) - handleRect.setSize(QSize(handleLength, handleThickness)); - else - handleRect.setSize(QSize(handleThickness, handleLength)); - handleRect.moveCenter(rect.center()); - int sliderPos = sliderPositionFromValue(slider->minimum, slider->maximum, slider->sliderValue, - proxy()->pixelMetric(PM_SliderSpaceAvailable, option, widget), slider->upsideDown); - if (horizontal) { - handleRect.moveLeft(sliderPos + sp->Slider_Margin); - } else { - handleRect.moveTop((sliderPos + sp->Slider_Margin)); - } - return visualRect(slider->direction, slider->rect, handleRect); - } - - case SC_SliderGroove: - { - QRect grooveRect = rect; - return grooveRect; - } - - case SC_SliderTickmarks: - break; - - default: - break; - } - } - break; - } - - case CC_ToolButton: - { - if (const QStyleOptionToolButton *tb = qstyleoption_cast<const QStyleOptionToolButton *>(option)) { - int mbi = proxy()->pixelMetric(PM_MenuButtonIndicator, tb, widget); - QRect rect = tb->rect; - switch (subControl) { - case SC_ToolButton: - { - if ((tb->features & (QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay)) - == QStyleOptionToolButton::MenuButtonPopup) - rect.adjust(0, 0, - (mbi + sp->ToolButton_MarginWidth), 0); - break; - } - case SC_ToolButtonMenu: - { - if ((tb->features & (QStyleOptionToolButton::MenuButtonPopup | QStyleOptionToolButton::PopupDelay)) - == QStyleOptionToolButton::MenuButtonPopup) - rect.adjust(rect.width() - (mbi + sp->ToolButton_MarginWidth), 0, 0, 0); - break; - } - default: - break; - } - rect = visualRect(tb->direction, tb->rect, rect); - return rect; - } - break; - } - - case CC_ComboBox: - { - if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(option)) { - int comboBox_Margin = proxy()->pixelMetric(PM_ComboBoxFrameWidth, option, widget); - int comboBox_MarginWidth = 8; - int indicator = proxy()->pixelMetric(PM_MenuButtonIndicator, option, widget); - QRect rect = option->rect.adjusted(comboBox_MarginWidth, comboBox_Margin, -comboBox_MarginWidth, -comboBox_Margin); - - switch (subControl) { - case SC_ComboBoxArrow: - { - QRect arrowRect(rect.right() - indicator, rect.top(), indicator, rect.height()); - return visualRect(option->direction, rect, arrowRect); - } - - case SC_ComboBoxEditField: - { - QRect textRect = option->rect; - if (cb->editable) { - textRect.setRect(rect.left() - 2, rect.top(), rect.width() - indicator - 4, rect.height()); - - } else { - textRect.setRect(rect.left(), rect.top(), rect.width() - indicator - 8, rect.height()); - } - - return visualRect(option->direction, option->rect, textRect); - } - - case SC_ComboBoxListBoxPopup: - { - return option->rect.adjusted(0, 0, 0, 4); - } - - default: - break; - } - } - break; - } - - case CC_SpinBox: - { - if (const QStyleOptionSpinBox *sb = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) { - int center = sb->rect.height() / 2; - const int fw = sb->frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth, sb, widget) : 0; - int buttonWidth = 32; - bool isHorizonLayout = (sp->getSpinBoxControlLayout() == UKUIStyleParameters::SpinBoxControlLayout::Horizontal); - if(isHorizonLayout) - { - center = sb->rect.height(); - buttonWidth = sp->SpinBox_DefaultHeight; - } - QRect rect = option->rect; - switch (subControl) { - case SC_SpinBoxUp: - { - if (sb->buttonSymbols == QAbstractSpinBox::NoButtons) - return QRect(); - if(isHorizonLayout) - rect = QRect(rect.right() - buttonWidth, rect.top(), buttonWidth, center); - else{ - rect = QRect(rect.right() - buttonWidth + 1, rect.top(), buttonWidth, center); - } - - break; - } - case SC_SpinBoxDown: - { - if (sb->buttonSymbols == QAbstractSpinBox::NoButtons) - return QRect(); - if(sp->getSpinBoxControlLayout() == UKUIStyleParameters::SpinBoxControlLayout::Vertical) - rect = QRect(rect.right() - buttonWidth + 1, rect.top() + center, buttonWidth, center); - else - rect = QRect(rect.left(), rect.top(), buttonWidth, center); - break; - } - case SC_SpinBoxEditField: - { - if (sb->buttonSymbols == QAbstractSpinBox::NoButtons) { - rect = rect.adjusted(fw, 0, -fw, 0); - } else { - if(sp->getSpinBoxControlLayout() == UKUIStyleParameters::SpinBoxControlLayout::Vertical) - rect = rect.adjusted(fw, 0, -(fw + buttonWidth), 0); - else - rect = rect.adjusted(buttonWidth, 0, -(fw + buttonWidth), 0); - } - break; - } - case SC_SpinBoxFrame: - if(!isHorizonLayout) - rect = sb->rect; - else - rect = sb->rect.adjusted(buttonWidth, 0, -(fw + buttonWidth), 0); - - default: - break; - } - - return visualRect(sb->direction, sb->rect, rect); - } - } - - default: - break; - } - - return Style::subControlRect(control, option, subControl, widget); -} - -QRect Qt5UKUIStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const -{ - switch (element) { - case SE_TabBarScrollLeftButton: - { - const bool verticalTabs = option->rect.width() < option->rect.height(); - const int buttonWidth = qMax(proxy()->pixelMetric(QStyle::PM_TabBarScrollButtonWidth, 0, widget), QApplication::globalStrut().width()); - const int lap = proxy()->pixelMetric(QStyle::PM_TabBar_ScrollButtonOverlap, 0, widget); - - if(sp->getTabBarIndicatorLayout() != UKUIStyleParameters::TabBarIndicatorLayout::TabBarIndicator_Horizontal){ - QRect rect = QStyle::visualRect(option->direction, option->rect, - QRect(option->rect.right() - buttonWidth, option->rect.top() + 2, - buttonWidth, (option->rect.height() - 4) / 2)); - return rect; - } - - QRect rect = verticalTabs ? QRect(-lap, option->rect.height() - (buttonWidth * 2), option->rect.width() + 2 * lap, buttonWidth) - : QStyle::visualRect(option->direction, option->rect, - QRect(option->rect.left(), option->rect.top(), - buttonWidth, option->rect.height())); - return rect; - } - - case SE_TabBarScrollRightButton: - { - const bool verticalTabs = option->rect.width() < option->rect.height(); - const int lap = proxy()->pixelMetric(QStyle::PM_TabBar_ScrollButtonOverlap, 0, widget); - const int buttonWidth = qMax(proxy()->pixelMetric(QStyle::PM_TabBarScrollButtonWidth, 0, widget), QApplication::globalStrut().width()); - - if(sp->getTabBarIndicatorLayout() != UKUIStyleParameters::TabBarIndicatorLayout::TabBarIndicator_Horizontal){ - QRect rect = QStyle::visualRect(option->direction, option->rect, - QRect(option->rect.right() - buttonWidth, option->rect.top() + (option->rect.height()) / 2, - buttonWidth, (option->rect.height() - 4) / 2)); - return rect; - } - - QRect rect = verticalTabs ? QRect(-lap, option->rect.height() - buttonWidth, option->rect.width() + 2 * lap, buttonWidth) - : QStyle::visualRect(option->direction, option->rect, - QRect(option->rect.right() - buttonWidth - lap, option->rect.top() + lap, - buttonWidth, option->rect.height() - 2 * lap)); - return rect; - } - - case SE_TabBarTabLeftButton: - { - if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { - int hpadding = proxy()->pixelMetric(QStyle::PM_TabBarTabHSpace, option, widget) / 2; - QRect buttonRect(QPoint(0, 0), tab->leftButtonSize); - switch (tab->shape) { - case QTabBar::RoundedNorth: - case QTabBar::RoundedSouth: - case QTabBar::TriangularNorth: - case QTabBar::TriangularSouth: - { - buttonRect.moveTop((tab->rect.height() - buttonRect.height()) / 2); - buttonRect.moveLeft(tab->rect.left() + hpadding); - buttonRect = visualRect(tab->direction, tab->rect, buttonRect); - break; - } - case QTabBar::RoundedWest: - case QTabBar::TriangularWest: - { - buttonRect.moveLeft((tab->rect.width() - buttonRect.width()) / 2); - buttonRect.moveBottom(tab->rect.bottom() - hpadding); - break; - } - case QTabBar::RoundedEast: - case QTabBar::TriangularEast: - { - buttonRect.moveLeft((tab->rect.width() - buttonRect.width()) / 2); - buttonRect.moveTop(tab->rect.top() + hpadding); - break; - } - default: - break; - } - return buttonRect; - } - break; - } - - case SE_TabBarTabRightButton: - { - if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { - int hpadding = proxy()->pixelMetric(QStyle::PM_TabBarTabHSpace, option, widget) / 2; - QRect buttonRect(QPoint(0, 0), tab->rightButtonSize); - switch (tab->shape) { - case QTabBar::RoundedNorth: - case QTabBar::RoundedSouth: - case QTabBar::TriangularNorth: - case QTabBar::TriangularSouth: - { - buttonRect.moveTop((tab->rect.height() - buttonRect.height()) / 2); - buttonRect.moveRight(tab->rect.right() - hpadding); - buttonRect = visualRect(tab->direction, tab->rect, buttonRect); - break; - } - case QTabBar::RoundedWest: - case QTabBar::TriangularWest: - { - buttonRect.moveLeft((tab->rect.width() - buttonRect.width()) / 2); - buttonRect.moveTop(tab->rect.top() + hpadding); - break; - } - case QTabBar::RoundedEast: - case QTabBar::TriangularEast: - { - buttonRect.moveLeft((tab->rect.width() - buttonRect.width()) / 2); - buttonRect.moveBottom(tab->rect.bottom() - hpadding); - break; - } - default: - break; - } - return buttonRect; - } - break; - } - - case SE_TabBarTabText: - { - if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { - QRect rect = tab->rect; - QRect iconRect = tab->rect; - tabLayout(tab, widget, proxy(), &rect, &iconRect); - return rect; - } - break; - } - - case SE_TabWidgetTabPane: - { - if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(option)) { - int overlap = proxy()->pixelMetric(PM_TabBarBaseOverlap, option, widget); - if (twf->lineWidth == 0) - overlap = 0; - const QSize tabBarSize(twf->tabBarSize - QSize(overlap, overlap)); - QRect rect(twf->rect); - switch (twf->shape) { - case QTabBar::RoundedNorth: - case QTabBar::TriangularNorth: - rect.adjust(0, tabBarSize.height(), 0, 0); - break; - - case QTabBar::RoundedSouth: - case QTabBar::TriangularSouth: - rect.adjust(0, 0, 0, -tabBarSize.height()); - break; - - case QTabBar::RoundedEast: - case QTabBar::TriangularEast: - rect.adjust(0, 0, -tabBarSize.width(), 0); - break; - - case QTabBar::RoundedWest: - case QTabBar::TriangularWest: - rect.adjust(tabBarSize.width(), 0, 0, 0); - break; - - default: - break; - } - return rect; - } - break; - } - - case SE_TabWidgetTabContents: - { - if (qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(option)) { - const QRect rect = proxy()->subElementRect(SE_TabWidgetTabPane, option, widget); - int TabWidget_Margin = 0; - return rect.adjusted(TabWidget_Margin, TabWidget_Margin, -TabWidget_Margin, -TabWidget_Margin); - } - break; - } - - case SE_TabWidgetTabBar: - { - if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(option)) { - QRect rect = QRect(QPoint(0, 0), twf->tabBarSize); - const uint alingMask = Qt::AlignLeft | Qt::AlignRight | Qt::AlignHCenter; - switch (twf->shape) { - case QTabBar::RoundedNorth: - case QTabBar::TriangularNorth: - case QTabBar::RoundedSouth: - case QTabBar::TriangularSouth: - { - rect.setWidth(qMin(rect.width(), twf->rect.width() - twf->leftCornerWidgetSize.width() - twf->rightCornerWidgetSize.width())); - switch (proxy()->styleHint(SH_TabBar_Alignment, twf, widget) & alingMask) { - case Qt::AlignLeft: - { - rect.moveLeft(twf->leftCornerWidgetSize.width()); - break; - } - case Qt::AlignHCenter: - { - rect.moveLeft((twf->rect.size() - twf->leftCornerWidgetSize - twf->rightCornerWidgetSize - twf->tabBarSize).width() / 2); - break; - } - case Qt::AlignRight: - { - rect.moveLeft(twf->rect.width() - twf->tabBarSize.width() - twf->rightCornerWidgetSize.width()); - break; - } - default: - break; - } - rect = visualRect(twf->direction, twf->rect, rect); - switch (twf->shape) { - case QTabBar::RoundedSouth: - case QTabBar::TriangularSouth: - { - rect.moveTop(twf->rect.height() - twf->tabBarSize.height()); - } - default: - break; - } - return rect; - } - - case QTabBar::RoundedEast: - case QTabBar::TriangularEast: - { - rect.setHeight(qMin(rect.height(), twf->rect.height())); - switch (proxy()->styleHint(SH_TabBar_Alignment, twf, widget) & alingMask) { - case Qt::AlignLeft: - { - rect.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width(), 0)); - break; - } - case Qt::AlignHCenter: - { - rect.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width(), (twf->rect.height() - twf->tabBarSize.height()) / 2)); - break; - } - case Qt::AlignRight: - { - rect.moveTopLeft(QPoint(twf->rect.width() - twf->tabBarSize.width(), twf->rect.height() - twf->tabBarSize.height())); - break; - } - default: - break; - } - return rect; - } - - case QTabBar::RoundedWest: - case QTabBar::TriangularWest: - { - rect.setHeight(qMin(rect.height(), twf->rect.height())); - switch (proxy()->styleHint(SH_TabBar_Alignment, twf, widget) & alingMask) { - case Qt::AlignLeft: - { - rect.moveTop(0); - break; - } - case Qt::AlignHCenter: - { - rect.moveTop((twf->rect.height() - twf->tabBarSize.height()) / 2); - break; - } - case Qt::AlignRight: - { - rect.moveTop(twf->rect.height() - twf->tabBarSize.height()); - break; - } - default: - break; - } - return rect; - } - default: - break; - } - } - break; - } - - case SE_TabWidgetLeftCorner: - { - if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(option)) { - QRect paneRect = proxy()->subElementRect(SE_TabWidgetTabPane, twf, widget); - QRect rect; - switch (twf->shape) { - case QTabBar::RoundedNorth: - case QTabBar::TriangularNorth: - rect = QRect(QPoint(paneRect.x(), paneRect.y() - twf->leftCornerWidgetSize.height()), twf->leftCornerWidgetSize); - break; - case QTabBar::RoundedSouth: - case QTabBar::TriangularSouth: - rect = QRect(QPoint(paneRect.x(), paneRect.height()), twf->leftCornerWidgetSize); - break; - default: - break; - } - rect = visualRect(twf->direction, twf->rect, rect); - return rect; - } - break; - } - - case SE_TabWidgetRightCorner: - { - if (const QStyleOptionTabWidgetFrame *twf = qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(option)) { - QRect paneRect = proxy()->subElementRect(SE_TabWidgetTabPane, twf, widget); - QRect rect; - switch (twf->shape) { - case QTabBar::RoundedNorth: - case QTabBar::TriangularNorth: - rect = QRect(QPoint(paneRect.width() - twf->rightCornerWidgetSize.width(), - paneRect.y() - twf->rightCornerWidgetSize.height()), twf->rightCornerWidgetSize); - break; - case QTabBar::RoundedSouth: - case QTabBar::TriangularSouth: - rect = QRect(QPoint(paneRect.width() - twf->rightCornerWidgetSize.width(), - paneRect.height()), twf->rightCornerWidgetSize); - break; - default: - break; - } - rect = visualRect(twf->direction, twf->rect, rect); - return rect; - } - break; - } - - case SE_RadioButtonIndicator: - { - QRect rect; - int h = proxy()->pixelMetric(PM_ExclusiveIndicatorHeight, option, widget); - rect.setRect(option->rect.x(), option->rect.y() + ((option->rect.height() - h) / 2), - proxy()->pixelMetric(PM_ExclusiveIndicatorWidth, option, widget), h); - rect = visualRect(option->direction, option->rect, rect); - return rect; - } - - case SE_RadioButtonContents: - { - int radioWidth = proxy()->pixelMetric(PM_ExclusiveIndicatorWidth, option, widget); - int spacing = proxy()->pixelMetric(PM_RadioButtonLabelSpacing, option, widget); - return visualRect(option->direction, option->rect, option->rect.adjusted(radioWidth + spacing, 0, 0, 0)); - } - - case SE_CheckBoxIndicator: - { - QRect rect; - int h = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); - rect.setRect(option->rect.x() + 1, option->rect.y() + ((option->rect.height() - h) / 2), - proxy()->pixelMetric(PM_IndicatorWidth, option, widget), h); - rect = visualRect(option->direction, option->rect, rect); - return rect; - } - - case SE_CheckBoxContents: - { - int radioWidth = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); - int spacing = proxy()->pixelMetric(PM_RadioButtonLabelSpacing, option, widget); - return visualRect(option->direction, option->rect, option->rect.adjusted(radioWidth + spacing, 0, 0, 0)); - } - - case SE_PushButtonContents: - { - if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { - const bool icon = !button->icon.isNull(); - const bool text = !button->text.isEmpty(); - QRect rect = option->rect; - int Button_MarginWidth = proxy()->pixelMetric(PM_ButtonMargin, option, widget); - if (text && !icon && !(button->features & QStyleOptionButton::HasMenu)) { - rect.adjust(Button_MarginWidth, 0, -Button_MarginWidth, 0); - } else if (!text && icon && !(button->features & QStyleOptionButton::HasMenu)) { - - } else { - rect.adjust(sp->ToolButton_MarginWidth, sp->Button_MarginHeight, -sp->ToolButton_MarginWidth, -sp->Button_MarginHeight); - } - if (button->features & (QStyleOptionButton::AutoDefaultButton | QStyleOptionButton::DefaultButton)) { - int dbw = proxy()->pixelMetric(PM_ButtonDefaultIndicator, option, widget); - rect.adjust(dbw, dbw, -dbw, -dbw); - } - return rect; - } - break; - } - - case SE_LineEditContents: - { - if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(option)) { - bool clear = false; - if (widget) { - if (qobject_cast<QComboBox *>(widget->parent())) - { - return option->rect; - } - if (widget->findChild<QAction *>(QLatin1String("_q_qlineeditclearaction"))) - clear = true; - } - - QRect rect = f->rect; - if (clear) { - rect.adjust(f->lineWidth + 4, f->lineWidth, 0, -f->lineWidth); - rect = visualRect(option->direction, option->rect, rect); - } else { - rect.adjust(f->lineWidth + 4, f->lineWidth, -(f->lineWidth + 4), -f->lineWidth); - } - - return rect; - } - break; - } - - case SE_ProgressBarGroove: - case SE_ProgressBarLabel: - { - if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { - return pb->rect; - } - break; - } - - case SE_ProgressBarContents: - { - if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { - const auto progress = qMax(pb->progress, pb->minimum); // workaround for bug in QProgressBar - const bool vertical = pb->orientation == Qt::Vertical; - const bool inverted = pb->invertedAppearance; - const bool indeterminate = (pb->minimum == 0 && pb->maximum == 0); - - int maxWidth = vertical ? pb->rect.height() : pb->rect.width(); - const auto totalSteps = qMax(Q_INT64_C(1), qint64(pb->maximum) - pb->minimum); - const auto progressSteps = qint64(progress) - pb->minimum; - const auto progressBarWidth = progressSteps * maxWidth / totalSteps; - int len = indeterminate ? maxWidth : progressBarWidth; - - bool reverse = (!vertical && (pb->direction == Qt::RightToLeft)) || vertical; - if (inverted) - reverse = !reverse; - - int diff = 0; - if (indeterminate) { - len = 56; - double currentValue = 0; - if (QVariantAnimation *animation = m_animation_helper->animation(option->styleObject)) { - currentValue = animation->currentValue().toDouble(); - int barLength = pb->rect.width(); - if(vertical) - barLength = pb->rect.height(); - double speed = 0.5; - if (animation->currentTime() == 0) { - animation->setDirection(QAbstractAnimation::Forward); - animation->setDuration(500 + barLength * speed); - animation->start(); - } else if (animation->currentTime() == animation->totalDuration()) { - animation->setDirection(QAbstractAnimation::Backward); - animation->setDuration(500 + barLength * speed); - animation->start(); - } - } else { - m_animation_helper->startAnimation(new ProgressBarAnimation(option->styleObject)); - } - diff = currentValue * (maxWidth - len); - } else { - m_animation_helper->stopAnimation(option->styleObject); - } - - QRect rect = proxy()->subElementRect(SE_ProgressBarGroove, pb, widget); - QRect progressRect; - if (vertical) { - if (reverse) { - progressRect.setRect(rect.left(), rect.bottom() + 1 - len - diff, rect.width(), len); - } else { - progressRect.setRect(rect.x(), rect.top() + diff, rect.width(), len); - } - } else { - if (reverse) { - progressRect.setRect(rect.right() + 1 - len - diff, rect.top(), len, rect.height()); - } else { - progressRect.setRect(rect.x() + diff, rect.y(), len, rect.height()); - } - } - - return progressRect; - } - break; - } - - case SE_HeaderLabel: - { - if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) { - QRect rect = header->rect; - int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, option, widget); - int Header_MarginWidth = 8; - rect.adjust(Header_MarginWidth - margin, margin, -Header_MarginWidth + margin, -margin); - if (header->sortIndicator != QStyleOptionHeader::None && header->state & State_Horizontal) { - int arrowSize = proxy()->pixelMetric(QStyle::PM_HeaderMarkSize, option, widget); - rect.adjust(0, 0, -arrowSize - Header_MarginWidth, 0); - } - return visualRect(option->direction, header->rect, rect); - } - break; - } - - case SE_HeaderArrow: - { - if (qstyleoption_cast<const QStyleOptionHeader *>(option)) { - int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, option, widget); - int Header_MarginWidth = 8; - int arrowSize = proxy()->pixelMetric(QStyle::PM_HeaderMarkSize, option, widget); - QRect rect = option->rect.adjusted(Header_MarginWidth, margin, -Header_MarginWidth, -margin); - QRect arrowRect(rect.right() + 1 - arrowSize, rect.y() + (rect.height() - arrowSize) / 2, arrowSize, arrowSize); - return visualRect(option->direction, rect, arrowRect); - } - break; - } - - case SE_ItemViewItemCheckIndicator: - if (!qstyleoption_cast<const QStyleOptionViewItem *>(option)) { - return proxy()->subElementRect(SE_CheckBoxIndicator, option, widget); - } - Q_FALLTHROUGH(); - - case SE_ItemViewItemDecoration: - case SE_ItemViewItemText: - case SE_ItemViewItemFocusRect: - { - if (const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option)) { - QRect checkRect, decorationRect, displayRect; - viewItemLayout(vi, &checkRect, &decorationRect, &displayRect, false); - if (element == SE_ViewItemCheckIndicator) - return checkRect; - else if (element == SE_ItemViewItemDecoration) - return decorationRect; - else if (element == SE_ItemViewItemText || element == SE_ItemViewItemFocusRect){ -// displayRect.setHeight(sp->ViewItem_DefaultHeight * m_scaleRatio4_3); - return displayRect; - } - } - break; - } - - case SE_TreeViewDisclosureItem: - return option->rect; - - default: - break; - } - - return Style::subElementRect(element,option,widget); -} - - -// change control Qsize -QSize Qt5UKUIStyle::sizeFromContents(ContentsType ct, const QStyleOption *option, - const QSize &size, const QWidget *widget) const -{ - QSize newSize = size; - switch (ct) { - case CT_MenuItem: { - if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) { - bool isComboBox = qobject_cast<const QComboBox*>(widget); - int w = newSize.width(); - int MenuItem_Spacing = 8; - if (menuItem->text.contains(QLatin1Char('\t'))) { - w += 20; - } - - switch (menuItem->menuItemType) { - case QStyleOptionMenuItem::SubMenu: - case QStyleOptionMenuItem::Normal: - case QStyleOptionMenuItem::DefaultItem: - { - //Combobox popup menu item - if (isComboBox) { - newSize.setHeight(menuItem->fontMetrics.height()); - } - - bool hasIcon = false; - if(isComboBox) - { - auto *comboBox = qobject_cast<const QComboBox*>(widget); - int column = comboBox->count(); - for(int i = 0; i < column; i++) - { - if(!comboBox->itemIcon(i).isNull()){ - hasIcon = true; - break; - } - } - } - else if(menuItem->maxIconWidth != 0) - { - hasIcon = true; - } - - if (menuItem->menuHasCheckableItems || hasIcon) { - int iconWidth = proxy()->pixelMetric(QStyle::PM_SmallIconSize, option, widget); - w += ((hasIcon && menuItem->menuHasCheckableItems) ? 2 : 1) * (iconWidth + MenuItem_Spacing); - newSize.setHeight(qMax(iconWidth, newSize.height())); - } else { - w += 8; - } - - if(!isComboBox) - w += proxy()->pixelMetric(PM_IndicatorWidth, option, widget) + MenuItem_Spacing; - newSize.setHeight(qMax(newSize.height(), proxy()->pixelMetric(PM_IndicatorHeight, option, widget))); - - int MenuItem_HMargin = 12 + 4; - // int MenuItem_VMargin = 3; - w += MenuItem_HMargin; - newSize.setWidth(qMax(w, 152)); - - - newSize.setWidth(qMax(w + sp->MenuItem_MarginWidth, sp->MenuItem_DefaultWidght)); - newSize.setHeight(qMax(newSize.height() + sp->MenuItem_MarginHeight * 2, - sp->MenuItem_DefaultHeight + (isComboBox ? (2 * sp->ComboBox_VMargin) : 0))); - - - if (widget) { - if(newSize.width() > widget->maximumWidth()) { - //Fix me:size no more than max size.At least set size 1.BUG 133590 ,support application to set fix width - newSize.setWidth((widget->maximumWidth() - 20 > 1)?widget->maximumWidth() - 20 : 1); - } - } - - return newSize; - } - - case QStyleOptionMenuItem::Separator: - { - newSize.setHeight(sp->MenuItemSeparator_MarginHeight * 2 + 1); - return newSize; - } - - default: - break; - } - return newSize; - } - break; - } - - case CT_LineEdit: - { - if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(option)) { - newSize += QSize(f->lineWidth * 2 + 8, f->lineWidth * 2); - newSize.setWidth(qMax(newSize.width(), sp->LineEdit_DefaultWidth)); - newSize.setHeight(qMax(newSize.height(), sp->LineEdit_DefaultHeight)); - return newSize; - } - break; - } - - case CT_TabBarTab: - { - int padding = 0; - if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(option)) { - if (!tab->icon.isNull()) - padding += 4; - - if (!tab->leftButtonSize.isEmpty() || !tab->rightButtonSize.isEmpty()) - padding += 4; - - if (tab->shape == QTabBar::RoundedWest || tab->shape == QTabBar::RoundedEast - || tab->shape == QTabBar::TriangularWest || tab->shape == QTabBar::TriangularEast) { - newSize.setWidth(qMax(newSize.width(), sp->TabBar_DefaultHeight)); - - newSize.setHeight(qMax(newSize.height() + padding, sp->TabBar_DefaultMinWidth)); - newSize.setHeight(qMin(newSize.height(), sp->TabBar_DefaultMaxWidth)); - } else { - newSize.setHeight(qMax(newSize.height(), sp->TabBar_DefaultHeight)); - - newSize.setWidth(qMax(newSize.width() + padding, sp->TabBar_DefaultMinWidth)); - newSize.setWidth(qMin(newSize.width(), sp->TabBar_DefaultMaxWidth)); - } - - if (qobject_cast<const QTabBar*>(widget)) { - //set height between min and max - newSize.setHeight(qMax(newSize.height(), widget->minimumHeight())); - newSize.setHeight(qMin(newSize.height(), widget->maximumHeight())); - } - return newSize; - } - break; - } - - case CT_RadioButton: - { - if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { - int w = proxy()->pixelMetric(PM_ExclusiveIndicatorWidth, option, widget); - int h = proxy()->pixelMetric(PM_ExclusiveIndicatorHeight, option, widget); - int spacing = proxy()->pixelMetric(PM_RadioButtonLabelSpacing, option, widget); - if (!button->icon.isNull()) - spacing += 4; - newSize.setWidth(newSize.width() + w + spacing); - newSize.setHeight(qMax(qMax(newSize.height(), h), sp->RadioButton_DefaultHeight)); - return newSize; - } - break; - } - - case CT_CheckBox: - { - if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { - int w = proxy()->pixelMetric(PM_IndicatorWidth, option, widget); - int h = proxy()->pixelMetric(PM_IndicatorHeight, option, widget); - int spacing = proxy()->pixelMetric(PM_RadioButtonLabelSpacing, option, widget); - if (!button->icon.isNull()) - spacing += 4; - newSize.setWidth(newSize.width() + w + spacing); - newSize.setHeight(qMax(qMax(newSize.height(), h), sp->CheckBox_DefaultHeight)); - return newSize; - } - break; - } - - case CT_ToolButton: - { - if (const QStyleOptionToolButton *tb = qstyleoption_cast<const QStyleOptionToolButton *>(option)) { - const bool icon = !tb->icon.isNull(); - const bool text = !tb->text.isEmpty(); - int w = size.width(); - int h = size.height(); - int Button_MarginWidth = proxy()->pixelMetric(PM_ButtonMargin, option, widget); - if (tb->toolButtonStyle == Qt::ToolButtonTextOnly && !(tb->features & QStyleOptionToolButton::MenuButtonPopup)) { - w += Button_MarginWidth * 2; - } else { - w += sp->ToolButton_MarginWidth * 2; - } - h += sp->Button_MarginHeight * 2; - - if (tb->toolButtonStyle != Qt::ToolButtonIconOnly) { - QFontMetrics fm = tb->fontMetrics; - w -= fm.horizontalAdvance(QLatin1Char(' ')) * 2; - if (tb->toolButtonStyle == Qt::ToolButtonTextBesideIcon) { - if (text && icon) - w += 4; - else - w -= 4; - } else if (tb->toolButtonStyle == Qt::ToolButtonTextUnderIcon) { - if (text && icon) - h += 4; - else - h -= 4; - } - } - if (tb->features & QStyleOptionToolButton::MenuButtonPopup) { - w += 8; - newSize.setWidth(qMax(w, sp->ToolButton_DefaultWidth)); - } else { - newSize.setWidth(qMax(w, sp->IconButton_DefaultWidth)); - } - newSize.setHeight(h > sp->Button_DefaultHeight ? h : sp->Button_DefaultHeight); - return newSize; - } - break; - } - - case CT_PushButton: - { - if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) { - const bool icon = !button->icon.isNull(); - const bool text = !button->text.isEmpty(); - int w = size.width(); - int h = size.height(); - int Button_MarginWidth = proxy()->pixelMetric(PM_ButtonMargin, option, widget); - if (text && !icon && !(button->features & QStyleOptionButton::HasMenu)) { - w += Button_MarginWidth * 2; - } else { - w += sp->ToolButton_MarginWidth * 2; - } - h += sp->Button_MarginHeight * 2; - - int spacing = 0; - if (text && icon) - spacing += 4; - if (!text && icon) - spacing -= 4; - if (button->features & QStyleOptionButton::HasMenu) { - if (icon || text) - spacing += 8; - } - w += spacing; - if (button->features & (QStyleOptionButton::AutoDefaultButton | QStyleOptionButton::DefaultButton)) { - int dbw = proxy()->pixelMetric(PM_ButtonDefaultIndicator, option, widget) * 2; - w += dbw; - h += dbw; - } - - newSize.setWidth(w > sp->Button_DefaultWidth ? w : sp->Button_DefaultWidth); - newSize.setHeight(h > sp->Button_DefaultHeight ? h : sp->Button_DefaultHeight); - return newSize; - } - break; - } - - case CT_ComboBox: - { - if (const QStyleOptionComboBox *comboBox = qstyleoption_cast<const QStyleOptionComboBox *>(option)) { - QSize newSize = size; - int indicator = proxy()->pixelMetric(PM_MenuButtonIndicator, option, widget); - int comboBox_Margin = proxy()->pixelMetric(PM_ComboBoxFrameWidth, option, widget); - int comboBox_MarginWidth = 8 + 8 + 8 + 8; - bool hasIcon = false; - if(qobject_cast<const QComboBox*>(widget)) - { - auto *box = qobject_cast<const QComboBox*>(widget); - for(int i = 0; i < box->count(); i++) - { - if(!box->itemIcon(i).isNull()) - { - hasIcon = true; - break; - } - } - } - if(hasIcon) - { - int iconWidth = proxy()->pixelMetric(PM_SmallIconSize, option, widget); - comboBox_MarginWidth += 8 + iconWidth; - } - - newSize.setWidth(qMax(newSize.width() + indicator + comboBox_MarginWidth, sp->ComboBox_DefaultWidth)); - newSize.setHeight(qMax(newSize.height() + comboBox_Margin * 2, sp->ComboBox_DefaultHeight)); - - return newSize; - } - break; - } - - case CT_SpinBox: - { - if (const QStyleOptionSpinBox *sb = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) { - const int buttonWidth = (sb->subControls & (QStyle::SC_SpinBoxUp | QStyle::SC_SpinBoxDown)) != 0 ? 32 : 0; - const int fw = sb->frame ? proxy()->pixelMetric(PM_SpinBoxFrameWidth, sb, widget) : 0; - newSize += QSize(buttonWidth + 2 * fw, 0); - newSize.setWidth(qMax(newSize.width(), sp->SpinBox_DefaultWidth)); - newSize.setHeight(qMax(newSize.height(), sp->SpinBox_DefaultHeight)); - return newSize; - } - break; - } - - case CT_ProgressBar: - { - if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option)) { - if (pb->orientation == Qt::Vertical) { - newSize.setWidth(qMax(newSize.width() - 8, sp->ProgressBar_DefaultThick)); - newSize.setHeight(qMax(newSize.height(), sp->ProgressBar_DefaultLength)); - } else { - newSize.setWidth(qMax(newSize.width(), sp->ProgressBar_DefaultLength)); - newSize.setHeight(qMax(newSize.height() - 8, sp->ProgressBar_DefaultThick)); - } - return newSize; - } - break; - } - - case CT_Slider: - { - if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) { - const bool horizontal(slider->orientation == Qt::Horizontal); - if (horizontal) { - newSize.setHeight(newSize.height() + 2 * sp->Slider_Margin); - newSize.setWidth(qMax(newSize.width(), sp->Slider_DefaultLength)); - } else { - newSize.setWidth(newSize.width() + 2 * sp->Slider_Margin); - newSize.setHeight(qMax(newSize.height(), sp->Slider_DefaultLength)); - } - return newSize; - } - break; - } - - case CT_HeaderSection: - { - if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) { - const bool horizontal(header->orientation == Qt::Horizontal); - const bool text(!header->text.isEmpty()); - const bool icon(!header->icon.isNull()); - int w = header->fontMetrics.size(Qt::TextShowMnemonic, header->text).width(); - int h = header->fontMetrics.size(Qt::TextShowMnemonic, header->text).height(); - int Header_MarginWidth = 8; - int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, option, widget); - - if (icon) { - int iconSize = proxy()->pixelMetric(QStyle::PM_SmallIconSize, option, widget); - w += iconSize; - h = qMax(iconSize, h); - if (text) - w += 8; - } - if (/*horizontal && */header->sortIndicator != QStyleOptionHeader::None) { - int arrowSize = proxy()->pixelMetric(QStyle::PM_HeaderMarkSize, option, widget); - w += arrowSize; - h = qMax(arrowSize, h); - if (text || icon) - w += 8; - } - h += margin * 2; - w += Header_MarginWidth * 2; - newSize.setWidth(w); - newSize.setHeight(qMax(h, sp->Table_HeaderHeight)); - return newSize; - } - break; - } - - case CT_ItemViewItem: - { - if (const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option)) { - QRect decorationRect, displayRect, checkRect; - viewItemLayout(vi, &checkRect, &decorationRect, &displayRect, true); - newSize = (decorationRect | displayRect | checkRect).size(); - - int Margin_Width = 2; - int Margin_Height = 0; - newSize.setWidth(newSize.width() + Margin_Width * 2); - newSize.setHeight(newSize.height() + Margin_Height * 2); - newSize.setHeight(qMax(newSize.height(), sp->ViewItem_DefaultHeight)); - - return newSize; - } - break; - } - - default: - break; - } - - return QFusionStyle::sizeFromContents(ct, option, size, widget); -} - - -QPixmap Qt5UKUIStyle::drawColorPixmap(QPainter *painter, QColor color, QPixmap &pixmap) const -{ - QPainter p(&pixmap); - p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - p.setCompositionMode(QPainter::CompositionMode_SourceIn); - p.fillRect(pixmap.rect(), color); - p.end(); - - return pixmap; -} - -void Qt5UKUIStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const -{ - qreal scale = pixmap.devicePixelRatio(); - QRect aligned = alignedRect(QApplication::layoutDirection(), QFlag(alignment), pixmap.size() / scale, rect); - QRect inter = aligned.intersected(rect); - - QPixmap target = pixmap; - - auto device = painter->device(); - auto widget = dynamic_cast<QWidget *>(device); - if (widget) { - if (HighLightEffect::isWidgetIconUseHighlightEffect(widget)) { - QStyleOption opt; - opt.initFrom(widget); - target = HighLightEffect::generatePixmap(pixmap, &opt, widget); - } - } - - painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - painter->drawPixmap(inter.x(), inter.y(), target, inter.x() - aligned.x(), inter.y() - aligned.y(), inter.width() * scale, inter.height() *scale); -} - - - -void Qt5UKUIStyle::realSetWindowSurfaceFormatAlpha(const QWidget *widget) const -{ - if (!widget) - return; - - if (widget->testAttribute(Qt::WA_WState_Created)) - return; - - if (qobject_cast<const QMenu *>(widget)) { - const_cast<QWidget *>(widget)->setAttribute(Qt::WA_TranslucentBackground); - } - - if (shouldBeTransparent(widget)) - const_cast<QWidget *>(widget)->setAttribute(Qt::WA_TranslucentBackground); -} - -void Qt5UKUIStyle::realSetMenuTypeToMenu(const QWidget *widget) const -{ - if (auto menu = qobject_cast<const QMenu *>(widget)) { - if (menu->testAttribute(Qt::WA_X11NetWmWindowTypeMenu) - || !menu->windowHandle()) - return; - - int wmWindowType = 0; - if (menu->testAttribute(Qt::WA_X11NetWmWindowTypeDropDownMenu)) - wmWindowType |= QXcbWindowFunctions::DropDownMenu; - if (menu->testAttribute(Qt::WA_X11NetWmWindowTypePopupMenu)) - wmWindowType |= QXcbWindowFunctions::PopupMenu; - if (wmWindowType == 0) return; - QXcbWindowFunctions::setWmWindowType(menu->windowHandle(), - static_cast<QXcbWindowFunctions::WmWindowType>(wmWindowType)); - } -} - - - -QRect Qt5UKUIStyle::centerRect(const QRect &rect, int width, int height) const -{ return QRect(rect.left() + (rect.width() - width)/2, rect.top() + (rect.height() - height)/2, width, height); } - diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-ukui-style.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-ukui-style.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/qt5-ukui-style.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/qt5-ukui-style.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,206 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef QT5UKUISTYLE_H -#define QT5UKUISTYLE_H - -#include <QProxyStyle> - - -class TabWidgetAnimationHelper; -class ScrollBarAnimationHelper; -class ButtonAnimationHelper; -class BoxAnimationHelper; -class ProgressBarAnimationHelper; -class ShadowHelper; -class RadioButtonAnimationHelper; -class CheckBoxAnimationHelper; -class SliderAnimationHelper; -class TreeAnimationHelper; - -class QStyleOptionViewItem; -class QDBusInterface; -class UKUIStyleParameters; - -#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) -#include <private/qfusionstyle_p.h> -#define Style QFusionStyle -#else -#define Style QProxyStyle -#endif - -#include <QFontMetrics> -#include <QStyleOption> -#include <private/qtextengine_p.h> -#include <qmath.h> -#include <QGSettings> - -class BlurHelper; -class GestureHelper; -class WindowManager; - -class ApplicationStyleSettings; - -/*! - * \brief The Qt5UKUIStyle class - * \details - * This class provide the default ukui style in UKUI desktop enviroment. - */ -class Qt5UKUIStyle : public Style -{ - Q_OBJECT -public: - explicit Qt5UKUIStyle(QString name); - - ~Qt5UKUIStyle(); - - bool shouldBeTransparent(const QWidget *w) const; - - //debuger - bool eventFilter(QObject *obj, QEvent *e); - - int styleHint(StyleHint hint, - const QStyleOption *option, - const QWidget *widget, - QStyleHintReturn *returnData) const; - - void polish(QWidget *widget); - void unpolish(QWidget *widget); - void polish(QPalette& palette) ; - - QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = nullptr, - const QWidget *widget = nullptr) const override; - - QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *option) const override; - - QPalette standardPalette() const; - - void drawPrimitive(QStyle::PrimitiveElement element, - const QStyleOption *option, - QPainter *painter, - const QWidget *widget = nullptr) const; - - void drawComplexControl(QStyle::ComplexControl control, - const QStyleOptionComplex *option, - QPainter *painter, - const QWidget *widget = nullptr) const; - - void drawControl(QStyle::ControlElement element, - const QStyleOption *option, - QPainter *painter, - const QWidget *widget = nullptr) const; - - int pixelMetric(QStyle::PixelMetric metric, - const QStyleOption *option = nullptr, - const QWidget *widget = nullptr) const; - - QRect subControlRect(QStyle::ComplexControl control, - const QStyleOptionComplex *option, - QStyle::SubControl subControl, - const QWidget *widget = nullptr) const; - - void drawItemPixmap(QPainter *painter, - const QRect &rect, - int alignment, - const QPixmap &pixmap) const; - - QRect subElementRect(SubElement element, - const QStyleOption *option, - const QWidget *widget = nullptr) const; - QSize sizeFromContents(ContentsType ct, const QStyleOption *option, - const QSize &size, const QWidget *widget) const; - - - QPixmap drawColorPixmap(QPainter *p, QColor color, QPixmap &pixmap) const; -protected: - - void realSetWindowSurfaceFormatAlpha(const QWidget *widget) const; - void realSetMenuTypeToMenu(const QWidget *widget) const; - QRect centerRect(const QRect &rect, int width, int height) const; - -private: - TabWidgetAnimationHelper *m_tab_animation_helper = nullptr; - ScrollBarAnimationHelper *m_scrollbar_animation_helper = nullptr; - ButtonAnimationHelper* m_button_animation_helper = nullptr; - BoxAnimationHelper* m_combobox_animation_helper = nullptr; - ShadowHelper *m_shadow_helper = nullptr; - ProgressBarAnimationHelper *m_animation_helper = nullptr; - RadioButtonAnimationHelper *m_radiobutton_animation_helper = nullptr; - CheckBoxAnimationHelper *m_checkbox_animation_helper = nullptr; - SliderAnimationHelper *m_slider_animation_helper = nullptr; - TreeAnimationHelper *m_tree_animation_helper = nullptr; - - bool m_drak_palette = false; - bool m_default_palette = false; - QString m_widget_theme = "ukui-default"; - QString m_style_name = "ukui-default"; - - bool m_is_tablet_mode = false; - QDBusInterface *m_statusManagerDBus = nullptr; - - // UKUIStyleParameters - UKUIStyleParameters *sp = nullptr; - - mutable QRect m_scrollBarSliderRec; - mutable QRect m_sliderHandleRec; - - BlurHelper *m_blur_helper = nullptr; - GestureHelper *m_gesture_helper = nullptr; - WindowManager *m_window_manager = nullptr; - - ApplicationStyleSettings *m_app_style_settings = nullptr; - - bool m_blink_cursor = true; - int m_blink_cursor_time = 1200; - - - bool isUseDarkPalette() const; - - QColor button_Click(const QStyleOption *option) const; - QColor button_Hover(const QStyleOption *option) const; - QColor closeButton_Click(const QStyleOption *option) const; - QColor closeButton_Hover(const QStyleOption *option) const; - QColor transparentButton_Click(const QStyleOption *option) const; - QColor transparentButton_Hover(const QStyleOption *option) const; - QColor highLight_Click(const QStyleOption *option) const; - QColor highLight_Hover(const QStyleOption *option) const; - - void setThemeColor(QString themeColor, QPalette &palette) const; - - // view - QString calculateElidedText(const QString &text, const QTextOption &textOption, - const QFont &font, const QRect &textRect, const Qt::Alignment valign, - Qt::TextElideMode textElideMode, int flags, - bool lastVisibleLineShouldBeElided, QPointF *paintStartPosition) const; - void viewItemDrawText(QPainter *painter, const QStyleOptionViewItem *option, const QRect &rect) const; - void viewItemLayout(const QStyleOptionViewItem *option, QRect *checkRect, QRect *pixmapRect, QRect *textRect, bool sizehint) const; - QSize viewItemSize(const QStyleOptionViewItem *option, int role) const; - -private Q_SLOTS: - void updateTabletModeValue(bool isTabletMode); - QRect scrollbarSliderRec(); - void setScrollbarSliderRec(QRect rect) const; - QRect sliderHandleRec(); - void setSliderHandleRec(QRect rect) const; -}; - -#endif // QT5UKUISTYLE_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/shadow-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/shadow-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/shadow-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/shadow-helper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,387 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#include "shadow-helper.h" - -#include <QPainter> -#include <QPainterPath> -#include <QPoint> -#include <QImage> - -#include <QWidget> -#include <QVector4D> -#include <QMargins> - -#include <QX11Info> - -#include <QApplication> - -#include <QDebug> - -#define INNERRECT_WIDTH 1 - -extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); - -ShadowHelper::ShadowHelper(QObject *parent) : QObject(parent) -{ - -} - -ShadowHelper::~ShadowHelper() -{ - m_shadows.clear(); -} - -bool ShadowHelper::isWidgetNeedDecoShadow(const QWidget *widget) -{ - if (!widget) - return false; - - auto value = widget->property("useCustomShadow"); - if (!value.isValid()) { - if (widget->inherits("QComboBoxPrivateContainer")) { - return true; - } - } else { - return value.toBool(); - } - - return false; -} - -void ShadowHelper::registerWidget(QWidget *widget) -{ - widget->removeEventFilter(this); - - bool needCreateShadowInstantly = false; - if (isWidgetNeedDecoShadow(widget)) { - widget->installEventFilter(this); - needCreateShadowInstantly = true; - } else { - if (widget && widget->inherits("QComboBoxPrivateContainer")) { - widget->installEventFilter(this); - needCreateShadowInstantly = true; - } - } - if (!widget->isVisible()) { - needCreateShadowInstantly = false; - } - if(widget && widget->inherits("QMenu")){ - needCreateShadowInstantly = true; - } - - if (needCreateShadowInstantly) { - auto shadowColor = widget->palette().text().color(); - - int shadowBorder = widget->property("customShadowWidth").toInt(); - bool ok = false; - qreal darkness = widget->property("customShadowDarkness").toReal(&ok); - if (!ok) { - darkness = 1.0; - } - QVector4D radius = qvariant_cast<QVector4D>(widget->property("customShadowRadius")); - QVector4D margins = qvariant_cast<QVector4D>(widget->property("customShadowMargins")); - - if (auto tmp = m_shadows.value(widget)) { - if (tmp->isCreated()) { - m_shadows.remove(widget); - tmp->destroy(); - tmp->deleteLater(); - } - } - - auto shadow = getShadow(shadowColor, shadowBorder, darkness, radius.x(), radius.y(), radius.z(), radius.w()); - shadow->setPadding(QMargins(margins.x(), margins.y(), margins.z(), margins.w())); - shadow->setWindow(widget->windowHandle()); - shadow->create(); - - //qInfo()<<"try set custom shadow"<<shadowBorder<<darkness<<radius<<margins; - - m_shadows.insert(widget, shadow); - - connect(widget, &QWidget::destroyed, this, [=](){ - if (auto shadowToBeDelete = m_shadows.value(widget)) { - if (shadowToBeDelete->isCreated()) - shadowToBeDelete->destroy(); - shadowToBeDelete->deleteLater(); - m_shadows.remove(widget); - } - }); - } -} - -void ShadowHelper::unregisterWidget(const QWidget *widget) -{ - if (m_shadows.contains(widget)) { - auto shadow = m_shadows.value(widget); - if (shadow->isCreated()) - shadow->destroy(); - shadow->deleteLater(); - m_shadows.remove(widget); - } -} - -QPixmap ShadowHelper::getShadowPixmap(QColor color, /*ShadowHelper::State state,*/ int shadow_border, qreal darkness, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight) -{ - int maxTopRadius = qMax(borderRadiusTopLeft, borderRadiusTopRight); - int maxBottomRadius = qMax(borderRadiusBottomLeft, borderRadiusBottomRight); - int maxRadius = qMax(maxTopRadius, maxBottomRadius); - maxRadius = qMax(12, maxRadius); - QPixmap pix(QSize(2 * maxRadius + 2 * shadow_border + INNERRECT_WIDTH, 2 * maxRadius + 2 * shadow_border + INNERRECT_WIDTH)); - pix.fill(Qt::transparent); - - int squareWidth = 2 * maxRadius + INNERRECT_WIDTH; - - QPainterPath windowRelativePath; - windowRelativePath.setFillRule(Qt::WindingFill); - QPoint currentPos; - - // move to top left arc start point - windowRelativePath.moveTo(borderRadiusTopLeft, 0); - // top left arc - auto topLeftBorderRadiusRect = QRect(0, 0, 2 * borderRadiusTopLeft, 2 * borderRadiusTopLeft); - windowRelativePath.arcTo(topLeftBorderRadiusRect, 90, 90); - // move to bottom left arc start point - currentPos = QPoint(0, maxRadius + INNERRECT_WIDTH + maxRadius - borderRadiusBottomLeft); - //windowRelativePath.moveTo(currentPos); - // bottom left arc - auto bottomLeftRect = QRect(0, currentPos.y() - borderRadiusBottomLeft, 2 * borderRadiusBottomLeft, 2 * borderRadiusBottomLeft); - windowRelativePath.arcTo(bottomLeftRect, 180, 90); - // move to bottom right arc start point - currentPos = QPoint(2 * maxRadius + INNERRECT_WIDTH - borderRadiusBottomRight, 2 * maxRadius + INNERRECT_WIDTH); - //windowRelativePath.moveTo(currentPos); - // bottom right arc - auto bottomRightRect = QRect(currentPos.x() - borderRadiusBottomRight, currentPos.y() - 2 * borderRadiusBottomRight, 2 * borderRadiusBottomRight, 2 * borderRadiusBottomRight); - windowRelativePath.arcTo(bottomRightRect, 270, 90); - // move to top right arc start point - currentPos = QPoint(2 * maxRadius + INNERRECT_WIDTH, borderRadiusTopRight); - //windowRelativePath.moveTo(currentPos); - // top right arc - auto topRightRect = QRect(squareWidth - 2 * borderRadiusTopRight, 0, 2 * borderRadiusTopRight, 2 * borderRadiusTopRight); - windowRelativePath.arcTo(topRightRect, 0, 90); - - QPainter painter(&pix); - painter.save(); - painter.translate(shadow_border, shadow_border); - painter.fillPath(windowRelativePath, QColor(26,26,26)); - painter.restore(); - - QImage rawImg = pix.toImage(); - qt_blurImage(rawImg, shadow_border, true, true); - - QPixmap target = QPixmap::fromImage(rawImg); - QPainter painter2(&target); - painter2.save(); - painter2.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - painter2.translate(shadow_border, shadow_border); - painter2.setCompositionMode(QPainter::CompositionMode_Clear); - painter2.fillPath(windowRelativePath, Qt::transparent); - painter2.restore(); - painter2.end(); - - // handle darkness - QImage newImg = target.toImage(); - for (int x = 0; x < newImg.width(); x++) { - for (int y = 0; y < newImg.height(); y++) { - auto color = newImg.pixelColor(x, y); - if (color.alpha() == 0) - continue; - color.setAlphaF(darkness * color.alphaF()); - newImg.setPixelColor(x, y, color); - } - } - - QPixmap darkerTarget = QPixmap::fromImage(newImg); - painter2.begin(&darkerTarget); - - auto borderPath = caculateRelativePainterPath(borderRadiusTopLeft + 0.5, borderRadiusTopRight + 0.5, borderRadiusBottomLeft + 0.5, borderRadiusBottomRight + 0.5); - painter2.setCompositionMode(QPainter::CompositionMode_DestinationOver); - painter2.setRenderHint(QPainter::HighQualityAntialiasing); - QColor borderColor = color; - borderColor.setAlphaF(0.05); - painter2.setPen(borderColor); - painter2.setBrush(Qt::NoBrush); - painter2.translate(shadow_border, shadow_border); - painter2.translate(-0.5, -0.5); - painter2.drawPath(borderPath); - - return darkerTarget; -} - -QPainterPath ShadowHelper::caculateRelativePainterPath(qreal borderRadiusTopLeft, qreal borderRadiusTopRight, qreal borderRadiusBottomLeft, qreal borderRadiusBottomRight) -{ - qreal maxTopRadius = qMax(borderRadiusTopLeft, borderRadiusTopRight); - qreal maxBottomRadius = qMax(borderRadiusBottomLeft, borderRadiusBottomRight); - qreal maxRadius = qMax(maxTopRadius, maxBottomRadius); - maxRadius = qMax(12.0, maxRadius); - - qreal squareWidth = 2 * maxRadius + INNERRECT_WIDTH; - - QPainterPath windowRelativePath; - windowRelativePath.setFillRule(Qt::WindingFill); - QPointF currentPos; - - // move to top left arc start point - windowRelativePath.moveTo(borderRadiusTopLeft, 0); - // top left arc - auto topLeftBorderRadiusRect = QRectF(0, 0, 2 * borderRadiusTopLeft, 2 * borderRadiusTopLeft); - windowRelativePath.arcTo(topLeftBorderRadiusRect, 90, 90); - // move to bottom left arc start point - currentPos = QPointF(0, maxRadius + INNERRECT_WIDTH + maxRadius - borderRadiusBottomLeft); - //windowRelativePath.moveTo(currentPos); - // bottom left arc - auto bottomLeftRect = QRectF(0, currentPos.y() - borderRadiusBottomLeft, 2 * borderRadiusBottomLeft, 2 * borderRadiusBottomLeft); - windowRelativePath.arcTo(bottomLeftRect, 180, 90); - // move to bottom right arc start point - currentPos = QPointF(2 * maxRadius + INNERRECT_WIDTH - borderRadiusBottomRight, 2 * maxRadius + INNERRECT_WIDTH); - //windowRelativePath.moveTo(currentPos); - // bottom right arc - auto bottomRightRect = QRectF(currentPos.x() - borderRadiusBottomRight, currentPos.y() - 2 * borderRadiusBottomRight, 2 * borderRadiusBottomRight, 2 * borderRadiusBottomRight); - windowRelativePath.arcTo(bottomRightRect, 270, 90); - // move to top right arc start point - currentPos = QPointF(2 * maxRadius + INNERRECT_WIDTH, borderRadiusTopRight); - //windowRelativePath.moveTo(currentPos); - // top right arc - auto topRightRect = QRectF(squareWidth - 2 * borderRadiusTopRight, 0, 2 * borderRadiusTopRight, 2 * borderRadiusTopRight); - windowRelativePath.arcTo(topRightRect, 0, 90); - - return windowRelativePath; -} - -KWindowShadow *ShadowHelper::getShadow(QColor color, int shadow_border, qreal darkness, int borderRadiusTopLeft, int borderRadiusTopRight, int borderRadiusBottomLeft, int borderRadiusBottomRight) -{ - QPixmap shadowPixmap = getShadowPixmap(color, shadow_border, darkness, borderRadiusTopLeft, borderRadiusTopRight, borderRadiusBottomLeft, borderRadiusBottomRight); - qreal maxTopRadius = qMax(borderRadiusTopLeft, borderRadiusTopRight); - qreal maxBottomRadius = qMax(borderRadiusBottomLeft, borderRadiusBottomRight); - int maxRadius = qMax(maxTopRadius, maxBottomRadius); - maxRadius = qMax(12, maxRadius); - - QPixmap topLeftPixmap = shadowPixmap.copy(0, 0, maxRadius + shadow_border, maxRadius + shadow_border); - QPixmap topPixmap = shadowPixmap.copy(maxRadius + shadow_border, 0, INNERRECT_WIDTH, maxRadius + shadow_border); - QPixmap topRightPixmap = shadowPixmap.copy(maxRadius + shadow_border + INNERRECT_WIDTH, 0, maxRadius + shadow_border, maxRadius + shadow_border); - QPixmap leftPixmap = shadowPixmap.copy(0, maxRadius + shadow_border, maxRadius + shadow_border, INNERRECT_WIDTH); - QPixmap rightPixmap = shadowPixmap.copy(maxRadius + shadow_border + INNERRECT_WIDTH, maxRadius + shadow_border, maxRadius + shadow_border, INNERRECT_WIDTH); - QPixmap bottomLeftPixmap = shadowPixmap.copy(0, maxRadius + shadow_border + INNERRECT_WIDTH, maxRadius + shadow_border, maxRadius + shadow_border); - QPixmap bottomPixmap = shadowPixmap.copy(maxRadius + shadow_border, maxRadius + shadow_border + INNERRECT_WIDTH, INNERRECT_WIDTH, maxRadius + shadow_border); - QPixmap bottomRightPixmap = shadowPixmap.copy(maxRadius + shadow_border + INNERRECT_WIDTH, maxRadius + shadow_border + INNERRECT_WIDTH, maxRadius + shadow_border, maxRadius + shadow_border); - - KWindowShadow *shadow = new KWindowShadow; - KWindowShadowTile::Ptr topLeftTile = KWindowShadowTile::Ptr::create(); - topLeftTile.get()->setImage(topLeftPixmap.toImage()); - shadow->setTopLeftTile(topLeftTile); - KWindowShadowTile::Ptr topTile = KWindowShadowTile::Ptr::create(); - topTile.get()->setImage(topPixmap.toImage()); - shadow->setTopTile(topTile); - KWindowShadowTile::Ptr topRightTile = KWindowShadowTile::Ptr::create(); - topRightTile.get()->setImage(topRightPixmap.toImage()); - shadow->setTopRightTile(topRightTile); - KWindowShadowTile::Ptr leftTile = KWindowShadowTile::Ptr::create(); - leftTile.get()->setImage(leftPixmap.toImage()); - shadow->setLeftTile(leftTile); - KWindowShadowTile::Ptr rightTile = KWindowShadowTile::Ptr::create(); - rightTile.get()->setImage(rightPixmap.toImage()); - shadow->setRightTile(rightTile); - KWindowShadowTile::Ptr bottomLeftTile = KWindowShadowTile::Ptr::create(); - bottomLeftTile.get()->setImage(bottomLeftPixmap.toImage()); - shadow->setBottomLeftTile(bottomLeftTile); - KWindowShadowTile::Ptr bottomTile = KWindowShadowTile::Ptr::create(); - bottomTile.get()->setImage(bottomPixmap.toImage()); - shadow->setBottomTile(bottomTile); - KWindowShadowTile::Ptr bottomRightTile = KWindowShadowTile::Ptr::create(); - bottomRightTile.get()->setImage(bottomRightPixmap.toImage()); - shadow->setBottomRightTile(bottomRightTile); - - return shadow; -} - -bool ShadowHelper::eventFilter(QObject *watched, QEvent *event) -{ - if (watched->isWidgetType()) { - auto widget = qobject_cast<QWidget *>(watched); - if (QX11Info::isPlatformX11() && event->type() == QEvent::Show) { - if (watched->property("useCustomShadow").toBool() && widget->isTopLevel()) { - auto shadowColor = widget->palette().text().color(); - - int shadowBorder = widget->property("customShadowWidth").toInt(); - bool ok = false; - qreal darkness = widget->property("customShadowDarkness").toReal(&ok); - if (!ok) { - darkness = 1.0; - } - QVector4D radius = qvariant_cast<QVector4D>(widget->property("customShadowRadius")); - QVector4D margins = qvariant_cast<QVector4D>(widget->property("customShadowMargins")); - - if (auto tmp = m_shadows.value(widget)) { - if (tmp->isCreated()) - return false; - } - - auto shadow = getShadow(shadowColor, shadowBorder, darkness, radius.x(), radius.y(), radius.z(), radius.w()); - shadow->setPadding(QMargins(margins.x(), margins.y(), margins.z(), margins.w())); - shadow->setWindow(widget->windowHandle()); - shadow->create(); - - //qInfo()<<"try set custom shadow"<<shadowBorder<<darkness<<radius<<margins; - - m_shadows.insert(widget, shadow); - - connect(widget, &QWidget::destroyed, this, [=](){ - if (auto shadowToBeDelete = m_shadows.value(widget)) { - if (shadowToBeDelete->isCreated()) - shadowToBeDelete->destroy(); - shadowToBeDelete->deleteLater(); - m_shadows.remove(widget); - } - }); - } else { - if (!widget->testAttribute(Qt::WA_WState_Created) && !widget->isTopLevel()) - return false; - - if (auto tmp = m_shadows.value(widget)) { - if (tmp->isCreated()) - tmp->destroy(); - tmp->deleteLater(); - m_shadows.remove(widget); - } - - auto shadowColor = widget->palette().text().color(); - - auto shadow = getShadow(shadowColor, 15, 0.5, 10, 10, 10, 10); - shadow->setPadding(QMargins(15, 15, 15, 15)); - shadow->setWindow(widget->windowHandle()); - shadow->create(); - m_shadows.insert(widget, shadow); - - connect(widget, &QWidget::destroyed, this, [=](){ - if (auto shadowToBeDelete = m_shadows.value(widget)) { - if (shadowToBeDelete->isCreated()) - shadowToBeDelete->destroy(); - shadowToBeDelete->deleteLater(); - m_shadows.remove(widget); - } - }); - } - } - } - - return false; -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/shadow-helper.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/shadow-helper.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/shadow-helper.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/shadow-helper.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,74 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef SHADOWHELPER_H -#define SHADOWHELPER_H - -#include <QMap> -#include <QSharedPointer> -#include <QPixmap> - -#include <KWindowShadow> -#include <KWindowShadowTile> -//#include "breezeboxshadowrenderer.h" - -class ShadowHelper : public QObject -{ - Q_OBJECT -public: - explicit ShadowHelper(QObject *parent = nullptr); - ~ShadowHelper(); - - bool isWidgetNeedDecoShadow(const QWidget *widget); - - void registerWidget(QWidget *widget); - void unregisterWidget(const QWidget *widget); - - QPixmap getShadowPixmap(/*State state,*/ - QColor color, - int shadow_border, - qreal darkness, - int borderRadiusTopLeft = 0, - int borderRadiusTopRight = 0, - int borderRadiusBottomLeft = 0, - int borderRadiusBottomRight = 0); - - QPainterPath caculateRelativePainterPath(qreal borderRadiusTopLeft = 0, - qreal borderRadiusTopRight = 0, - qreal borderRadiusBottomLeft = 0, - qreal borderRadiusBottomRight = 0); - - - KWindowShadow *getShadow(QColor color, int shadow_border, - qreal darkness, - int borderRadiusTopLeft = 0, - int borderRadiusTopRight = 0, - int borderRadiusBottomLeft = 0, - int borderRadiusBottomRight = 0); - - bool eventFilter(QObject *watched, QEvent *event) override; - -private: - QMap<const QWidget *, KWindowShadow *> m_shadows; -}; - -#endif // SHADOWHELPER_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/themeconfig/UKUIClassical.json qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/themeconfig/UKUIClassical.json --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/themeconfig/UKUIClassical.json 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/themeconfig/UKUIClassical.json 1970-01-01 08:00:00.000000000 +0800 @@ -1,7 +0,0 @@ -{ - "Radius":{ - "Max_Radius" : {"value": "0", "type": "int"}, - "Normal_Radius" : {"value": "0", "type": "int"}, - "Min_Radius" : {"value": "0", "type": "int"} - } -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/ukui-style-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,2495 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Lei Chen <leichen@kylinos.cn> - * - */ - - -#include <QPushButton> -#include <QToolButton> -#include <QApplication> -#include <QPainter> -#include <KWindowEffects> -#include <QPainterPath> -#include <QDebug> -#include <QObject> -#include <QGSettings> -#include <QDBusMessage> -#include <QDBusArgument> -#include <QDBusConnection> -#include <QFile> -#include <QStyle> -#include <QStandardPaths> - -#include "ukui-style-settings.h" -#include "ukui-style-parameters.h" -#include "black-list.h" - -#include "themeinformation.h" -#include "readconfig.h" - -extern QColor mixColor(const QColor &c1, const QColor &c2, qreal bias); -extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); - -UKUIStyleParameters::UKUIStyleParameters(QObject *parent, bool isDark) -{ - QDBusMessage message = QDBusMessage::createMethodCall("com.kylin.statusmanager.interface", - "/", - "com.kylin.statusmanager.interface", - "get_current_tabletmode"); - QDBusMessage ret = QDBusConnection::sessionBus().call(message); - if (ret.type() != QDBusMessage::ReplyMessage) - { - //从返回参数获取返回值 - qDebug() << "complex type failed!"; - } - else - { - m_isTableMode = ret.arguments()[0].value<bool>(); - } - - updateParameters(m_isTableMode); - auto settings = UKUIStyleSettings::globalInstance(); - auto styleName = settings->get("styleName").toString(); - - initRadius(); -} - -QPalette UKUIStyleParameters::setPalette(QPalette &palette) -{ - palette.setColor(QPalette::Active, QPalette::WindowText, defaultPalette.color(QPalette::Active, QPalette::WindowText)); - palette.setColor(QPalette::Inactive, QPalette::WindowText, defaultPalette.color(QPalette::Inactive, QPalette::WindowText)); - palette.setColor(QPalette::Disabled, QPalette::WindowText, defaultPalette.color(QPalette::Disabled, QPalette::WindowText)); - - palette.setColor(QPalette::Active, QPalette::Button, defaultPalette.color(QPalette::Active, QPalette::Button)); - palette.setColor(QPalette::Inactive, QPalette::Button, defaultPalette.color(QPalette::Inactive, QPalette::Button)); - palette.setColor(QPalette::Disabled, QPalette::Button, defaultPalette.color(QPalette::Disabled, QPalette::Button)); - - palette.setColor(QPalette::Active, QPalette::Light, defaultPalette.color(QPalette::Active, QPalette::Light)); - palette.setColor(QPalette::Inactive, QPalette::Light, defaultPalette.color(QPalette::Inactive, QPalette::Light)); - palette.setColor(QPalette::Disabled, QPalette::Light, defaultPalette.color(QPalette::Disabled, QPalette::Light)); - - palette.setColor(QPalette::Active, QPalette::Midlight, defaultPalette.color(QPalette::Active, QPalette::Midlight)); - palette.setColor(QPalette::Inactive, QPalette::Midlight, defaultPalette.color(QPalette::Inactive, QPalette::Midlight)); - palette.setColor(QPalette::Disabled, QPalette::Midlight, defaultPalette.color(QPalette::Disabled, QPalette::Midlight)); - - palette.setColor(QPalette::Active, QPalette::Dark, defaultPalette.color(QPalette::Active, QPalette::Dark)); - palette.setColor(QPalette::Inactive, QPalette::Dark, defaultPalette.color(QPalette::Inactive, QPalette::Dark)); - palette.setColor(QPalette::Disabled, QPalette::Dark, defaultPalette.color(QPalette::Disabled, QPalette::Dark)); - - palette.setColor(QPalette::Active, QPalette::Mid, defaultPalette.color(QPalette::Active, QPalette::Mid)); - palette.setColor(QPalette::Inactive, QPalette::Mid, defaultPalette.color(QPalette::Inactive, QPalette::Mid)); - palette.setColor(QPalette::Disabled, QPalette::Mid, defaultPalette.color(QPalette::Disabled, QPalette::Mid)); - - palette.setColor(QPalette::Active, QPalette::Text, defaultPalette.color(QPalette::Active, QPalette::Text)); - palette.setColor(QPalette::Inactive, QPalette::Text, defaultPalette.color(QPalette::Inactive, QPalette::Text)); - palette.setColor(QPalette::Disabled, QPalette::Text, defaultPalette.color(QPalette::Disabled, QPalette::Text)); - - palette.setColor(QPalette::Active, QPalette::BrightText, defaultPalette.color(QPalette::Active, QPalette::BrightText)); - palette.setColor(QPalette::Inactive, QPalette::BrightText, defaultPalette.color(QPalette::Inactive, QPalette::BrightText)); - palette.setColor(QPalette::Disabled, QPalette::BrightText, defaultPalette.color(QPalette::Disabled, QPalette::BrightText)); - - palette.setColor(QPalette::Active, QPalette::ButtonText, defaultPalette.color(QPalette::Active, QPalette::ButtonText)); - palette.setColor(QPalette::Inactive, QPalette::ButtonText, defaultPalette.color(QPalette::Inactive, QPalette::ButtonText)); - palette.setColor(QPalette::Disabled, QPalette::ButtonText, defaultPalette.color(QPalette::Disabled, QPalette::ButtonText)); - - palette.setColor(QPalette::Active, QPalette::Base, defaultPalette.color(QPalette::Active, QPalette::Base)); - palette.setColor(QPalette::Inactive, QPalette::Base, defaultPalette.color(QPalette::Inactive, QPalette::Base)); - palette.setColor(QPalette::Disabled, QPalette::Base, defaultPalette.color(QPalette::Disabled, QPalette::Base)); - - palette.setColor(QPalette::Active, QPalette::Window, defaultPalette.color(QPalette::Active, QPalette::Window)); - palette.setColor(QPalette::Inactive, QPalette::Window, defaultPalette.color(QPalette::Inactive, QPalette::Window)); - palette.setColor(QPalette::Disabled, QPalette::Window, defaultPalette.color(QPalette::Disabled, QPalette::Window)); - - palette.setColor(QPalette::Active, QPalette::Shadow, defaultPalette.color(QPalette::Active, QPalette::Shadow)); - palette.setColor(QPalette::Inactive, QPalette::Shadow, defaultPalette.color(QPalette::Inactive, QPalette::Shadow)); - palette.setColor(QPalette::Disabled, QPalette::Shadow, defaultPalette.color(QPalette::Disabled, QPalette::Shadow)); - - palette.setColor(QPalette::Active, QPalette::Highlight, defaultPalette.color(QPalette::Active, QPalette::Highlight)); - palette.setColor(QPalette::Inactive, QPalette::Highlight, defaultPalette.color(QPalette::Inactive, QPalette::Highlight)); - palette.setColor(QPalette::Disabled, QPalette::Highlight, defaultPalette.color(QPalette::Disabled, QPalette::Highlight)); - - palette.setColor(QPalette::Active, QPalette::HighlightedText, defaultPalette.color(QPalette::Active, QPalette::HighlightedText)); - palette.setColor(QPalette::Inactive, QPalette::HighlightedText, defaultPalette.color(QPalette::Inactive, QPalette::HighlightedText)); - palette.setColor(QPalette::Disabled, QPalette::HighlightedText, defaultPalette.color(QPalette::Disabled, QPalette::HighlightedText)); - - palette.setColor(QPalette::Active, QPalette::Link, defaultPalette.color(QPalette::Active, QPalette::Link)); - palette.setColor(QPalette::Inactive, QPalette::Link, defaultPalette.color(QPalette::Inactive, QPalette::Link)); - palette.setColor(QPalette::Disabled, QPalette::Link, defaultPalette.color(QPalette::Disabled, QPalette::Link)); - - palette.setColor(QPalette::Active, QPalette::LinkVisited, defaultPalette.color(QPalette::Active, QPalette::LinkVisited)); - palette.setColor(QPalette::Inactive, QPalette::LinkVisited, defaultPalette.color(QPalette::Inactive, QPalette::LinkVisited)); - palette.setColor(QPalette::Disabled, QPalette::LinkVisited, defaultPalette.color(QPalette::Disabled, QPalette::LinkVisited)); - - palette.setColor(QPalette::Active, QPalette::AlternateBase, defaultPalette.color(QPalette::Active, QPalette::AlternateBase)); - palette.setColor(QPalette::Inactive, QPalette::AlternateBase, defaultPalette.color(QPalette::Inactive, QPalette::AlternateBase)); - palette.setColor(QPalette::Disabled, QPalette::AlternateBase, defaultPalette.color(QPalette::Disabled, QPalette::AlternateBase)); - - palette.setColor(QPalette::Active, QPalette::NoRole, defaultPalette.color(QPalette::Active, QPalette::NoRole)); - palette.setColor(QPalette::Inactive, QPalette::NoRole, defaultPalette.color(QPalette::Inactive, QPalette::NoRole)); - palette.setColor(QPalette::Disabled, QPalette::NoRole, defaultPalette.color(QPalette::Disabled, QPalette::NoRole)); - - palette.setColor(QPalette::Active, QPalette::ToolTipBase, defaultPalette.color(QPalette::Active, QPalette::ToolTipBase)); - palette.setColor(QPalette::Inactive, QPalette::ToolTipBase, defaultPalette.color(QPalette::Inactive, QPalette::ToolTipBase)); - palette.setColor(QPalette::Disabled, QPalette::ToolTipBase, defaultPalette.color(QPalette::Disabled, QPalette::ToolTipBase)); - - palette.setColor(QPalette::Active, QPalette::ToolTipText, defaultPalette.color(QPalette::Active, QPalette::ToolTipText)); - palette.setColor(QPalette::Inactive, QPalette::ToolTipText, defaultPalette.color(QPalette::Inactive, QPalette::ToolTipText)); - palette.setColor(QPalette::Disabled, QPalette::ToolTipText, defaultPalette.color(QPalette::Disabled, QPalette::ToolTipText)); - -#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) - palette.setColor(QPalette::Active, QPalette::PlaceholderText, defaultPalette.color(QPalette::Active, QPalette::PlaceholderText)); - palette.setColor(QPalette::Inactive, QPalette::PlaceholderText, defaultPalette.color(QPalette::Inactive, QPalette::PlaceholderText)); - palette.setColor(QPalette::Disabled, QPalette::PlaceholderText, defaultPalette.color(QPalette::Disabled, QPalette::PlaceholderText)); -#endif - - return palette; -} - -int UKUIStyleParameters::getSpinBoxControlLayout() -{ - return m_spinBoxControlLayout; -} - -int UKUIStyleParameters::getTabBarIndicatorLayout() -{ - return m_tabBarIndicatorLayout; -} - -void UKUIStyleParameters::setTabBarIndicatorLayout(TabBarIndicatorLayout layout) -{ - m_tabBarIndicatorLayout = layout; -} - -void UKUIStyleParameters::updateParameters(bool isTabletMode) -{ - if(isTabletMode){//styleName == "ukui-dark"){// - m_scaleRatio4_3 = (4 * 1.0) / 3.0; - m_scaleRatio3_2 = (3 * 1.0) / 2.0; - m_scaleRatio2_1 = (2 * 1.0) / 1.0; - m_scaleSliderDefaultLength = (241 * 1.0) / (94 * 1.0); - m_ScaleComboBoxDefaultLength = (49 * 1.0) / (40 * 1.0); - m_ScaleLineEditDefaultLength = (49 * 1.0) / (40 * 1.0); - m_scaleTabBarHeight6_5 = (6 *1.0) / (5 * 1.0); - - m_isTableMode = true; - m_spinBoxControlLayout = SpinBoxControlLayout::Horizontal; - m_headerDefaultSectionSizeVertical = m_headerDefaultSectionSizeVertical4_3; - } - else{ - m_scaleRatio4_3 = 1.0; - m_scaleRatio3_2 = 1.0; - m_scaleRatio2_1 = 1.0; - m_scaleSliderDefaultLength = 1.0; - m_ScaleComboBoxDefaultLength = 1.0; - m_ScaleLineEditDefaultLength = 1.0; - m_scaleTabBarHeight6_5 = 1.0; - - m_isTableMode = false; - m_spinBoxControlLayout = SpinBoxControlLayout::Vertical; - m_headerDefaultSectionSizeVertical = m_headerDefaultSectionSizeVertical1_1; - } - - ComboBox_DefaultMenuItemHeight = ComboBox_DefaultMenuItemHeight_original * m_scaleRatio4_3; - MenuItem_DefaultHeight = MenuItem_DefaultHeight_origin * m_scaleRatio4_3; - MenuItemSeparator_MarginHeight = MenuItemSeparator_MarginHeight_origin * m_scaleRatio4_3; - LineEdit_DefaultHeight = LineEdit_DefaultHeight_origin * m_scaleRatio4_3; - IconButton_DefaultWidth = IconButton_DefaultWidth_origin * m_scaleRatio4_3; - Button_DefaultHeight = Button_DefaultHeight_origin * m_scaleRatio4_3; - SpinBox_DefaultHeight = SpinBox_DefaultHeight_origin * m_scaleRatio4_3; - ComboBox_DefaultHeight = ComboBox_DefaultHeight_origin * m_scaleRatio4_3; - RadioButton_DefaultHeight = RadioButton_DefaultHeight_origin * m_scaleRatio4_3; - CheckBox_DefaultHeight = CheckBox_DefaultHeight_origin * m_scaleRatio4_3; - Table_HeaderHeight = Table_HeaderHeight_origin * m_scaleRatio4_3; - ScroolBar_Width = ScroolBar_Width_origin * m_scaleRatio3_2; - Slider_Length = Slider_Length_origin * m_scaleRatio2_1; - Slider_Thickness = Slider_Thickness_origin * m_scaleRatio2_1; - Slider_GrooveLength = Slider_GrooveLength_origin * m_scaleRatio2_1; - Slider_DefaultLength = Slider_DefaultLength_origin * m_scaleSliderDefaultLength; - LineEdit_DefaultWidth = LineEdit_DefaultWidth_origin * m_ScaleLineEditDefaultLength; - TabBar_DefaultHeight = TabBar_DefaultHeight_origin * m_scaleTabBarHeight6_5; - ViewItem_DefaultHeight = ViewItem_DefaultHeight_origin * m_scaleRatio4_3; - ToolTip_Height = ToolTip_Height_origin * m_scaleRatio4_3; - qDebug() << "updateParameters......... "; -} - -QColor UKUIStyleParameters::lanhuHSLToQtHsl(int h, int s, int l, int a) -{ - QColor c; - c.setHsl(h, s * 255.0 /100.0, l * 255.0 /100.0, a); - return c; -} - -QColor UKUIStyleParameters::adjustColor(const QColor c, int hRange, int sRange, int lRange, int aRange) -{ -// qDebug() << "22222" << c.red() << c.green() << c.blue() << -// c.hslHue() << c.hslSaturationF() << c.lightnessF() << -// hRange << sRange << lRange; - QColor cc; - int s, l, a; - - if((c.hslSaturationF() + sRange * 1.0 / 100.0) > 1){ - qWarning() << "adjustColor s out of range1"; - s = 255; - } - else if((c.hslSaturationF() + sRange * 1.0 / 100.0) < 0){ - qWarning() << "adjustColor s out of range0"; - s = 0; - } - else - s = (c.hslSaturationF() + sRange * 1.0 / 100.0) *255.0; - - if((c.lightnessF() + lRange * 1.0 / 100.0) > 0.97){//根据设计稿寻光色彩识别 l应<=0.97 - qWarning() << "adjustColor l out of range1" << c.lightnessF() << lRange << (c.lightnessF() + lRange * 1.0 / 100.0); - l = 255.0 * 0.97; - } - else if((c.lightnessF() + lRange * 1.0 / 100.0) < 0.15){//根据设计稿上l最小取的均值 - qWarning() << "adjustColor l out of range0"; - l = 0.15 * 255.0; - } - else - l = (c.lightnessF() + lRange * 1.0 / 100.0) *255.0; - - if((c.alphaF() + aRange * 1.0 / 100.0) > 1){ - qWarning() << "adjustColor a out of range1"; - a = 255; - } - else if((c.alphaF() + aRange * 1.0 / 100.0) < 0){ - qWarning() << "adjustColor a out of range0"; - a = 0; - } - else - a = (c.alphaF() + aRange * 1.0 / 100.0) *255.0; - cc.setHsl(c.hslHue() + hRange, s, l, a); -// qDebug() << "33333" << c.hslHue() + hRange << (c.hslSaturationF() + sRange * 1.0 / 100.0) *255.0 << -// (c.lightnessF() + lRange * 1.0 / 100.0) * 255.0 << -// (c.alphaF() + aRange * 1.0 / 100.0) * 255.0; - - return cc; -} - -QColor UKUIStyleParameters::adjustH(const QColor c, int range) -{ - QColor cc; - cc.setHsl(c.hslHue() + range, c.hslSaturation(), c.lightness(), c.alpha()); - return cc; -} - -QColor UKUIStyleParameters::adjustS(const QColor c, int range) -{ - QColor cc; - int s; - - if((c.hslSaturationF() + range * 1.0 / 100.0) > 1){ - qWarning() << "adjustS s out of range1"; - s = 255; - } - else if((c.hslSaturationF() + range * 1.0 / 100.0) < 0){ - qWarning() << "adjustS s out of range0"; - s = 0; - } - else - s = (c.hslSaturationF() + range * 1.0 / 100.0) *255.0; - cc.setHsl(c.hslHue(), s, c.lightness(), c.alpha()); - return cc; -} - -QColor UKUIStyleParameters::adjustL(const QColor c, int range) -{ - QColor cc; - int l; - - if((c.lightnessF() + range * 1.0 / 100.0) > 0.97){ - qWarning() << "adjustL l out of range1"; - l = 255.0 * 0.97; - } - else if((c.lightnessF() + range * 1.0 / 100.0) < 0.15){ - qWarning() << "adjustL l out of range0" << c.lightnessF() << range << (c.lightnessF() + range * 1.0 / 100.0); - l = 255.0 * 0.15; - } - else - l = (c.lightnessF() + range * 1.0 / 100.0) *255.0; - - cc.setHsl(c.hslHue(), c.hslSaturation(), l, c.alpha()); - return cc; -} - -QColor UKUIStyleParameters::adjustA(const QColor c, int range) -{ - QColor cc; - int a; - if((c.alphaF() + range * 1.0 / 100.0) > 1){ - qWarning() << "adjustA a out of range1"; - a = 255; - } - else if((c.alphaF() + range * 1.0 / 100.0) < 0){ - qWarning() << "adjustA a out of range0"; - a = 0; - } - else - a = (c.alphaF() + range * 1.0 / 100.0) *255.0; - - - cc.setHsl(c.hslHue(), c.hslSaturation(), c.lightness(), a); - return cc; -} - -QColor UKUIStyleParameters::highlightClick(bool isDark, QPalette p) -{ - if(isDark){ - return adjustColor(p.color(QPalette::Active, QPalette::Highlight), 0, -25, -34);//hightlight->210,72%,71% 210,47%,37% - } - return adjustColor(p.color(QPalette::Active, QPalette::Highlight), 3, 10, 31);//hightlight->209,87%,57% 212,97%,88% -} - -QColor UKUIStyleParameters::highlightHover(bool isDark, QPalette p) -{ - if(isDark){ - return adjustColor(p.color(QPalette::Active, QPalette::Highlight), 0, -26, -40);//210,46%,31% - } - return adjustColor(p.color(QPalette::Active, QPalette::Highlight), 4, 2, 36);//213,89%,93% -} - -QColor UKUIStyleParameters::buttonDarkClick(bool isDark, QPalette p) -{ - if(isDark){ - return adjustColor(p.color(QPalette::Disabled, QPalette::ButtonText), 0, 1, 5); - } - return QColor(); -} - -void UKUIStyleParameters::normalButtonColor(bool isDark, QPalette p, QPen &defaultPen, QBrush &defaultBrush, QPen &hoverPen, - QBrush &hoverBrush, QPen &clickPen, QBrush &clickBrush, QPen &disablePen, QBrush &disableBrush) -{ - //default - if(isDark){ - defaultPen = QPen(QBrush(adjustColor(p.color(QPalette::Active, QPalette::Button), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else - defaultPen = QPen(QBrush(adjustColor(p.color(QPalette::Active, QPalette::Button), 0, 0, -25)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - defaultBrush = p.brush(QPalette::Active, QPalette::Button); - - //hover - if (isDark) { - //hightlight->210,72%,71% 210,67%,56% - hoverPen = QPen(QBrush(adjustColor(p.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { - //hightlight->209,87%,57% 213,73%,72% - hoverPen = QPen(QBrush(adjustColor(p.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - hoverBrush = QBrush(highlightHover(isDark, p)); - - - //click - if (isDark) { - //hightlight->210,72%,71% - clickPen = QPen(p.brush(QPalette::Active, QPalette::Highlight), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { - //hightlight->209,87%,57% 214,66%,60% - clickPen = QPen(QBrush(adjustColor(p.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - clickBrush = QBrush(highlightClick(isDark, p)); - - //disable - if (isDark) { - disablePen = QPen(QBrush(adjustL(p.color(QPalette::Disabled, QPalette::Button), 18)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - disableBrush = p.brush(QPalette::Disabled, QPalette::Button); - - } else { - disablePen = QPen(p.brush(QPalette::Disabled, QPalette::Button), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - disableBrush = p.brush(QPalette::Inactive, QPalette::Button); - } -} - -void UKUIStyleParameters::initRadius() -{ - qDebug() << "homelocation:" << QStandardPaths::writableLocation(QStandardPaths::HomeLocation); - QString cfgPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + - HomeCFGColorPath + "UKUIClassical.json"; - if(!QFile::exists(cfgPath)){ - cfgPath = UsrRadiusPath; - cfgPath += "UKUIClassical.json"; - } - - if (!QFile(cfgPath).exists()) { - qDebug() << "cfgPath:" << cfgPath << "is not exists"; - return; - } - qDebug() << "cfgPath......" << cfgPath; - if (m_readCfg == nullptr) { - m_readCfg = new ReadThemeConfig(cfgPath); - } - m_radiusStruct = m_readCfg->getRadiusStruct(UKUI_Radius); - radius = m_radiusStruct.normalRadius; - qDebug() << "classical min:" << m_radiusStruct.minRadius << "normal:" << m_radiusStruct.normalRadius << "max:" << m_radiusStruct.maxRadius; -} - -UKUIRadiusInformation::UKUIRadiusStruct UKUIStyleParameters::radiusProperty() -{ - return m_radiusStruct; -} - -//Classical widget theme -KClassicalStyleParameters::KClassicalStyleParameters(QObject *parent, bool isDark) : UKUIStyleParameters(parent, isDark) -{ - radius = 0; - MenuItem_Spacing = 8; - MenuItem_HMargin = 0; - MenuContent_HMargin = 8; - Menu_MarginWidth = 2; - Menu_Combobox_Popup_MarginWidth = 0; - CheckBox_Radius = 0; - Menu_Combobox_Popup_MarginHeight = 4; - ComboBox_VMargin = 1; - TabBar_ScrollButtonOverlap = 0; - indicatorIconHoverNeedHighLight = false; - ScrooBar_ShowLine = true; - TabBar_SplitLine = true; - TabBar_DefaultHeight_aug = 0; - TabBar_DefaultHeight = 42; - TabBar_ScrollButtonWidth = 32; - - initPalette(isDark); - setTabBarIndicatorLayout(TabBarIndicatorLayout::TabBarIndicator_Vertical); - - if(isDark){ - Indicator_IconDefault = defaultPalette.color(QPalette::Active, QPalette::ButtonText); - Indicator_IconHover = defaultPalette.color(QPalette::Active, QPalette::ButtonText); - Indicator_IconSunken = defaultPalette.color(QPalette::Active, QPalette::ButtonText); - Indicator_IconDisable = defaultPalette.color(QPalette::Disabled, QPalette::ButtonText); - } - else{ - Indicator_IconDefault = defaultPalette.color(QPalette::Active, QPalette::ButtonText); - Indicator_IconHover = defaultPalette.color(QPalette::Active, QPalette::ButtonText); - Indicator_IconSunken = defaultPalette.color(QPalette::Active, QPalette::ButtonText); - Indicator_IconDisable = defaultPalette.color(QPalette::Disabled, QPalette::ButtonText); - } -} - -void KClassicalStyleParameters::initPalette(bool isDark) -{ - QColor windowText_at = lanhuHSLToQtHsl(0, 0, 15), - windowText_iat = lanhuHSLToQtHsl(0, 0, 15), - windowText_dis = lanhuHSLToQtHsl(0, 0, 65), - button_at = lanhuHSLToQtHsl(0, 0, 98), - button_iat = lanhuHSLToQtHsl(0, 0, 98), - button_dis = lanhuHSLToQtHsl(0, 0, 85), - light_at = lanhuHSLToQtHsl(0, 0, 100), - light_iat = lanhuHSLToQtHsl(0, 0, 100), - light_dis = lanhuHSLToQtHsl(0, 0, 95), - midlight_at = lanhuHSLToQtHsl(0, 0, 67), - midlight_iat = lanhuHSLToQtHsl(0, 0, 67), - midlight_dis = lanhuHSLToQtHsl(0, 0, 90), - dark_at = lanhuHSLToQtHsl(0, 0, 30), - dark_iat = lanhuHSLToQtHsl(0, 0, 30), - dark_dis = lanhuHSLToQtHsl(0, 0, 25), - mid_at = lanhuHSLToQtHsl(0, 0, 45), - mid_iat = lanhuHSLToQtHsl(0, 0, 45), - mid_dis = lanhuHSLToQtHsl(0, 0, 40), - text_at = lanhuHSLToQtHsl(0, 0, 15), - text_iat = lanhuHSLToQtHsl(0, 0, 15), - text_dis = lanhuHSLToQtHsl(0, 0, 55), - brightText_at = lanhuHSLToQtHsl(0, 0, 35), - brightText_iat = lanhuHSLToQtHsl(0, 0, 35), - brightText_dis = lanhuHSLToQtHsl(0, 0, 30), - buttonText_at = lanhuHSLToQtHsl(0, 0, 15), - buttonText_iat = lanhuHSLToQtHsl(0, 0, 15), - buttonText_dis = lanhuHSLToQtHsl(0, 0, 70), - base_at = lanhuHSLToQtHsl(0, 0, 100), - base_iat = lanhuHSLToQtHsl(0, 0, 96), - base_dis = lanhuHSLToQtHsl(0, 0, 93), - window_at = lanhuHSLToQtHsl(0, 0, 96), - window_iat = lanhuHSLToQtHsl(0, 0, 93), - window_dis = lanhuHSLToQtHsl(0, 0, 90), - shadow_at = lanhuHSLToQtHsl(0, 0, 0, 0.16 * 255), - shadow_iat = lanhuHSLToQtHsl(0, 0, 0, 0.16 * 255), - shadow_dis = lanhuHSLToQtHsl(0, 0, 0, 0.21 * 255), - highLight_at = lanhuHSLToQtHsl(209, 87, 57), - highLight_iat = lanhuHSLToQtHsl(213, 73, 72), - highLight_dis = lanhuHSLToQtHsl(0, 0, 85), - highLightText_at = lanhuHSLToQtHsl(0, 0, 100), - highLightText_iat = lanhuHSLToQtHsl(0, 0, 100), - highLightText_dis = lanhuHSLToQtHsl(0, 0, 70), - link_at = lanhuHSLToQtHsl(213, 70, 51), - link_iat = lanhuHSLToQtHsl(213, 70, 51), - link_dis = lanhuHSLToQtHsl(213, 70, 51), - linkVisited_at = lanhuHSLToQtHsl(285, 46, 55), - linkVisited_iat = lanhuHSLToQtHsl(285, 46, 55), - linkVisited_dis = lanhuHSLToQtHsl(285, 46, 55), - alternateBase_at = lanhuHSLToQtHsl(180, 5, 96), - alternateBase_iat = lanhuHSLToQtHsl(180, 5, 96), - alternateBase_dis = lanhuHSLToQtHsl(180, 5, 96), - noRole_at = lanhuHSLToQtHsl(0, 0, 94), - noRole_iat = lanhuHSLToQtHsl(0, 0, 94), - noRole_dis = lanhuHSLToQtHsl(0, 0, 85), - toolTipBase_at = lanhuHSLToQtHsl(0, 0, 100), - toolTipBase_iat = lanhuHSLToQtHsl(0, 0, 100), - toolTipBase_dis = lanhuHSLToQtHsl(0, 0, 100), - toolTipText_at = lanhuHSLToQtHsl(0, 0, 15), - toolTipText_iat = lanhuHSLToQtHsl(0, 0, 15), - toolTipText_dis = lanhuHSLToQtHsl(0, 0, 15), - placeholderText_at = lanhuHSLToQtHsl(0, 0, 0, 0.35 * 255), - placeholderText_iat = lanhuHSLToQtHsl(0, 0, 0, 0.35 * 255), - placeholderText_dis = lanhuHSLToQtHsl(0, 0, 0, 0.35 * 255); - - if (isDark) { - windowText_at = lanhuHSLToQtHsl(0, 0, 85), - windowText_iat = lanhuHSLToQtHsl(0, 0, 85), - windowText_dis = lanhuHSLToQtHsl(0, 0, 30), - button_at = lanhuHSLToQtHsl(0, 0, 27), - button_iat = lanhuHSLToQtHsl(0, 0, 27), - button_dis = lanhuHSLToQtHsl(0, 0, 17), - light_at = lanhuHSLToQtHsl(0, 0, 100), - light_iat = lanhuHSLToQtHsl(0, 0, 100), - light_dis = lanhuHSLToQtHsl(0, 0, 95), - midlight_at = lanhuHSLToQtHsl(0, 0, 30), - midlight_iat = lanhuHSLToQtHsl(0, 0, 30), - midlight_dis = lanhuHSLToQtHsl(0, 0, 25), - dark_at = lanhuHSLToQtHsl(0, 0, 15), - dark_iat = lanhuHSLToQtHsl(0, 0, 15), - dark_dis = lanhuHSLToQtHsl(0, 0, 10), - mid_at = lanhuHSLToQtHsl(0, 0, 45), - mid_iat = lanhuHSLToQtHsl(0, 0, 45), - mid_dis = lanhuHSLToQtHsl(0, 0, 40), - text_at = lanhuHSLToQtHsl(0, 0, 85), - text_iat = lanhuHSLToQtHsl(0, 0, 85), - text_dis = lanhuHSLToQtHsl(0, 0, 30), - brightText_at = lanhuHSLToQtHsl(0, 0, 100), - brightText_iat = lanhuHSLToQtHsl(0, 0, 100), - brightText_dis = lanhuHSLToQtHsl(0, 0, 30), - buttonText_at = lanhuHSLToQtHsl(0, 0, 85), - buttonText_iat = lanhuHSLToQtHsl(0, 0, 85), - buttonText_dis = lanhuHSLToQtHsl(240, 2, 30), - base_at = lanhuHSLToQtHsl(0, 0, 7), - base_iat = lanhuHSLToQtHsl(0, 0, 11), - base_dis = lanhuHSLToQtHsl(0, 0, 14), - window_at = lanhuHSLToQtHsl(220, 4, 14), - window_iat = lanhuHSLToQtHsl(0, 0, 13), - window_dis = lanhuHSLToQtHsl(0, 0, 7), - shadow_at = lanhuHSLToQtHsl(0, 0, 0, 0.16 * 255), - shadow_iat = lanhuHSLToQtHsl(0, 0, 0, 0.16 * 255), - shadow_dis = lanhuHSLToQtHsl(0, 0, 0, 0.21 * 255), - highLight_at = lanhuHSLToQtHsl(210, 72, 71), - highLight_iat = lanhuHSLToQtHsl(210, 67, 56), - highLight_dis = lanhuHSLToQtHsl(0, 0, 17), - highLightText_at = lanhuHSLToQtHsl(0, 0, 100), - highLightText_iat = lanhuHSLToQtHsl(0, 0, 100), - highLightText_dis = lanhuHSLToQtHsl(0, 0, 30), - link_at = lanhuHSLToQtHsl(213, 70, 51), - link_iat = lanhuHSLToQtHsl(213, 70, 51), - link_dis = lanhuHSLToQtHsl(213, 70, 51), - linkVisited_at = lanhuHSLToQtHsl(285, 46, 55), - linkVisited_iat = lanhuHSLToQtHsl(285, 46, 55), - linkVisited_dis = lanhuHSLToQtHsl(285, 46, 55), - alternateBase_at = lanhuHSLToQtHsl(0, 0, 15), - alternateBase_iat = lanhuHSLToQtHsl(0, 0, 15), - alternateBase_dis = lanhuHSLToQtHsl(0, 0, 15), - noRole_at = lanhuHSLToQtHsl(0, 0, 20), - noRole_iat = lanhuHSLToQtHsl(0, 0, 20), - noRole_dis = lanhuHSLToQtHsl(240, 3, 24), - toolTipBase_at = lanhuHSLToQtHsl(0, 0, 15), - toolTipBase_iat = lanhuHSLToQtHsl(0, 0, 15), - toolTipBase_dis = lanhuHSLToQtHsl(0, 0, 15), - toolTipText_at = lanhuHSLToQtHsl(0, 0, 85), - toolTipText_iat = lanhuHSLToQtHsl(0, 0, 85), - toolTipText_dis = lanhuHSLToQtHsl(0, 0, 85), - placeholderText_at = lanhuHSLToQtHsl(0, 0, 100, 0.35 * 255), - placeholderText_iat = lanhuHSLToQtHsl(0, 0, 100, 0.35 * 255), - placeholderText_dis = lanhuHSLToQtHsl(0, 0, 100, 0.35 * 255); - } - - defaultPalette.setColor(QPalette::Active, QPalette::WindowText, windowText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::WindowText, windowText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::WindowText, windowText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Button, button_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Button, button_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Button, button_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Light, light_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Light, light_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Light, light_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Midlight, midlight_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Midlight, midlight_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Midlight, midlight_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Dark, dark_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Dark, dark_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Dark, dark_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Mid, mid_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Mid, mid_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Mid, mid_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Text, text_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Text, text_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Text, text_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::BrightText, brightText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::BrightText, brightText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::BrightText, brightText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::ButtonText, buttonText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::ButtonText, buttonText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::ButtonText, buttonText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Base, base_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Base, base_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Base, base_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Window, window_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Window, window_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Window, window_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Shadow, shadow_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Shadow, shadow_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Shadow, shadow_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Highlight, highLight_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Highlight, highLight_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Highlight, highLight_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::HighlightedText, highLightText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::HighlightedText, highLightText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::HighlightedText, highLightText_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::Link, link_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::Link, link_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::Link, link_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::LinkVisited, linkVisited_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::LinkVisited, linkVisited_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::LinkVisited, linkVisited_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::AlternateBase, alternateBase_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::AlternateBase, alternateBase_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::AlternateBase, alternateBase_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::NoRole, noRole_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::NoRole, noRole_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::NoRole, noRole_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::ToolTipBase, toolTipBase_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipBase, toolTipBase_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipBase, toolTipBase_dis); - - defaultPalette.setColor(QPalette::Active, QPalette::ToolTipText, toolTipText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::ToolTipText, toolTipText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::ToolTipText, toolTipText_dis); - -#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0)) - defaultPalette.setColor(QPalette::Active, QPalette::PlaceholderText, placeholderText_at); - defaultPalette.setColor(QPalette::Inactive, QPalette::PlaceholderText, placeholderText_iat); - defaultPalette.setColor(QPalette::Disabled, QPalette::PlaceholderText, placeholderText_dis); -#endif - ColoseButtonColor = lanhuHSLToQtHsl(0, 0, 85); - -} - -void KClassicalStyleParameters::initPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int radius = radiusProperty().normalRadius; - QBrush defaultBrush; - QBrush hoverBrush; - QBrush clickBrush; - QBrush disableBrush; - QBrush checkBrush; - QBrush checkHoverBrush; - QBrush checkClickBrush; - QBrush checkDisableBrush; - - QPen defaultPen; - QPen hoverPen; - QPen clickPen; - QPen disablePen; - QPen checkPen; - QPen checkHoverPen; - QPen checkClickPen; - QPen checkDisablePen; - QPen focusPen; - - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); - //check - checkPen = defaultPen; - checkHoverPen = hoverPen; - checkClickPen = clickPen; - checkDisablePen = disablePen; - checkBrush = defaultBrush; - checkHoverBrush = hoverBrush; - checkClickBrush = clickBrush; - checkDisableBrush = disableBrush; - - //focus - focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if (qobject_cast<const QPushButton *>(widget)) { - bool isWindowColoseButton = false; - - if (widget->property("isWindowButton").isValid()) { - if (widget->property("isWindowButton").toInt() == 0x02) { - isWindowColoseButton = true; - } - } - - if (isWindowColoseButton) { - hoverPen = QPen(QBrush(QColor(207, 20, 34)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - hoverBrush = QBrush(QColor(244, 78, 80)); - - clickPen = QPen(QBrush(QColor(161, 0, 12)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - clickBrush = QBrush(QColor(207, 20, 34)); - } - } - - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); - } - if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { - defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); - } - if (widget->property("setClickBrush").isValid() && widget->property("setClickBrush").canConvert<QBrush>()) { - clickBrush = widget->property("setClickBrush").value<QBrush>(); - } - if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { - hoverBrush = widget->property("setHoverBrush").value<QBrush>(); - } - if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { - disableBrush = widget->property("setDisableBrush").value<QBrush>(); - } - if (widget->property("setCheckBrush").isValid() && widget->property("setCheckBrush").canConvert<QBrush>()) { - checkBrush = widget->property("setCheckBrush").value<QBrush>(); - } - if (widget->property("setCheckHoverBrush").isValid() && widget->property("setCheckHoverBrush").canConvert<QBrush>()) { - checkHoverBrush = widget->property("setCheckHoverBrush").value<QBrush>(); - } - if (widget->property("setCheckClickBrush").isValid() && widget->property("setCheckClickBrush").canConvert<QBrush>()) { - checkClickBrush = widget->property("setCheckClickBrush").value<QBrush>(); - } - if (widget->property("setCheckDisableBrush").isValid() && widget->property("setCheckDisableBrush").canConvert<QBrush>()) { - checkDisableBrush = widget->property("setCheckDisableBrush").value<QBrush>(); - } - if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { - defaultPen = widget->property("setDefaultPen").value<QPen>(); - } - if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { - clickPen = widget->property("setClickPen").value<QPen>(); - } - if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { - hoverPen = widget->property("setHoverPen").value<QPen>(); - } - if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { - disablePen = widget->property("setDisablePen").value<QPen>(); - } - if (widget->property("setCheckPen").isValid() && widget->property("setCheckPen").canConvert<QPen>()) { - checkPen = widget->property("setCheckPen").value<QPen>(); - } - if (widget->property("setCheckHoverPen").isValid() && widget->property("setCheckHoverPen").canConvert<QPen>()) { - checkHoverPen = widget->property("setCheckHoverPen").value<QPen>(); - } - if (widget->property("setCheckClickPen").isValid() && widget->property("setCheckClickPen").canConvert<QPen>()) { - checkClickPen = widget->property("setCheckClickPen").value<QPen>(); - } - if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { - checkDisablePen = widget->property("setDisablePen").value<QPen>(); - } - if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { - focusPen = widget->property("setFocusPen").value<QPen>(); - } - } - - pushButtonParameters.radius = radius; - pushButtonParameters.pushButtonDefaultBrush = defaultBrush; - pushButtonParameters.pushButtonClickBrush = clickBrush; - pushButtonParameters.pushButtonHoverBrush = hoverBrush; - pushButtonParameters.pushButtonDisableBrush = disableBrush; - pushButtonParameters.pushButtonCheckBrush = checkBrush; - pushButtonParameters.pushButtonCheckHoverBrush = checkHoverBrush; - pushButtonParameters.pushButtonCheckClickBrush = checkClickBrush; - pushButtonParameters.pushButtonCheckDisableBrush = checkDisableBrush; - pushButtonParameters.pushButtonDefaultPen = defaultPen; - pushButtonParameters.pushButtonClickPen = clickPen; - pushButtonParameters.pushButtonHoverPen = hoverPen; - pushButtonParameters.pushButtonDisablePen = disablePen; - pushButtonParameters.pushButtonCheckPen = checkPen; - pushButtonParameters.pushButtonCheckHoverPen = checkHoverPen; - pushButtonParameters.pushButtonCheckClickPen = checkClickPen; - pushButtonParameters.pushButtonCheckDisablePen = checkDisablePen; - pushButtonParameters.pushButtonFocusPen = focusPen; -} - -void KClassicalStyleParameters::initPushButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - bool iconHighlight = false; - bool textHighlight = false; - - const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option); - bool isWindowCloseButton = false; - - if (qobject_cast<const QPushButton *>(widget)) { - if (widget->property("isWindowButton").isValid()) { - if (widget->property("isWindowButton").toInt() == 0x02) { - isWindowCloseButton = true; - } - } - } - - //icon - if ((isWindowCloseButton) && !(button->state & QStyle::State_On)) { - iconHighlight = true; - } - - //text - if (isWindowCloseButton && (button->state & (QStyle::State_MouseOver | QStyle::State_Sunken | QStyle::State_On))) { - textHighlight = true; - } else { - textHighlight = false; - } - - if(widget){ - if (widget->property("setIconHoverClickHighlight").isValid() && widget->property("setIconHoverClickHighlight").canConvert<bool>()) { - iconHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); - } - if (widget->property("setTextHoverClickHighlight").isValid() && widget->property("setTextHoverClickHighlight").canConvert<bool>()) { - textHighlight = widget->property("setTextHoverClickHighlight").value<bool>(); - } - } - - pushButtonParameters.iconHoverClickHighlight = iconHighlight; - pushButtonParameters.textHoverClickHighlight = textHighlight; -} - -void KClassicalStyleParameters::initToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int radius = radiusProperty().normalRadius; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush clickBrush; - QBrush disableBrush; - QBrush checkBrush; - QBrush checkHoverBrush; - QBrush checkClickBrush; - QBrush checkDisableBrush; - - QPen defaultPen; - QPen hoverPen; - QPen clickPen; - QPen disablePen; - QPen checkPen; - QPen checkHoverPen; - QPen checkClickPen; - QPen checkDisablePen; - QPen focusPen; - - - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); - //check - checkPen = defaultPen; - checkHoverPen = hoverPen; - checkClickPen = clickPen; - checkDisablePen = disablePen; - checkBrush = defaultBrush; - checkHoverBrush = hoverBrush; - checkClickBrush = clickBrush; - checkDisableBrush = disableBrush; - - //focus - focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if (qobject_cast<const QPushButton *>(widget)) { - bool isWindowColoseButton = false; - - if (widget->property("isWindowButton").isValid()) { - if (widget->property("isWindowButton").toInt() == 0x02) { - isWindowColoseButton = true; - } - } - - if (isWindowColoseButton) { - hoverPen = QPen(QBrush(QColor(207, 20, 34)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - hoverBrush = QBrush(QColor(244, 78, 80)); - - clickPen = QPen(QBrush(QColor(161, 0, 12)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - clickBrush = QBrush(QColor(207, 20, 34)); - } - } - - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); - } - if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { - defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); - } - if (widget->property("setClickBrush").isValid() && widget->property("setClickBrush").canConvert<QBrush>()) { - clickBrush = widget->property("setClickBrush").value<QBrush>(); - } - if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { - hoverBrush = widget->property("setHoverBrush").value<QBrush>(); - } - if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { - disableBrush = widget->property("setDisableBrush").value<QBrush>(); - } - if (widget->property("setCheckBrush").isValid() && widget->property("setCheckBrush").canConvert<QBrush>()) { - checkBrush = widget->property("setCheckBrush").value<QBrush>(); - } - if (widget->property("setCheckHoverBrush").isValid() && widget->property("setCheckHoverBrush").canConvert<QBrush>()) { - checkHoverBrush = widget->property("setCheckHoverBrush").value<QBrush>(); - } - if (widget->property("setCheckClickBrush").isValid() && widget->property("setCheckClickBrush").canConvert<QBrush>()) { - checkClickBrush = widget->property("setCheckClickBrush").value<QBrush>(); - } - if (widget->property("setCheckDisableBrush").isValid() && widget->property("setCheckDisableBrush").canConvert<QBrush>()) { - checkDisableBrush = widget->property("setCheckDisableBrush").value<QBrush>(); - } - if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { - defaultPen = widget->property("setDefaultPen").value<QPen>(); - } - if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { - clickPen = widget->property("setDefaultPen").value<QPen>(); - } - if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { - hoverPen = widget->property("setClickPen").value<QPen>(); - } - if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { - disablePen = widget->property("setHoverPen").value<QPen>(); - } - if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { - checkPen = widget->property("setDisablePen").value<QPen>(); - } - if (widget->property("setCheckHoverPen").isValid() && widget->property("setCheckHoverPen").canConvert<QPen>()) { - checkHoverPen = widget->property("setCheckHoverPen").value<QPen>(); - } - if (widget->property("setCheckClickPen").isValid() && widget->property("setCheckClickPen").canConvert<QPen>()) { - checkClickPen = widget->property("setCheckClickPen").value<QPen>(); - } - if (widget->property("setCheckDisablePen").isValid() && widget->property("setCheckDisablePen").canConvert<QPen>()) { - checkDisablePen = widget->property("setCheckDisablePen").value<QPen>(); - } - if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { - focusPen = widget->property("setFocusPen").value<QPen>(); - } - } - - toolButtonParameters.radius = radius; - toolButtonParameters.toolButtonDefaultBrush = defaultBrush; - toolButtonParameters.toolButtonClickBrush = clickBrush; - toolButtonParameters.toolButtonHoverBrush = hoverBrush; - toolButtonParameters.toolButtonDisableBrush = disableBrush; - toolButtonParameters.toolButtonCheckBrush = checkBrush; - toolButtonParameters.toolButtonCheckHoverBrush = checkHoverBrush; - toolButtonParameters.toolButtonCheckClickBrush = checkClickBrush; - toolButtonParameters.toolButtonCheckDisableBrush = checkDisableBrush; - toolButtonParameters.toolButtonDefaultPen = defaultPen; - toolButtonParameters.toolButtonClickPen = clickPen; - toolButtonParameters.toolButtonHoverPen = hoverPen; - toolButtonParameters.toolButtonDisablePen = disablePen; - toolButtonParameters.toolButtonCheckPen = checkPen; - toolButtonParameters.toolButtonCheckHoverPen = checkHoverPen; - toolButtonParameters.toolButtonCheckClickPen = checkClickPen; - toolButtonParameters.toolButtonCheckDisablePen = checkDisablePen; - toolButtonParameters.toolButtonFocusPen = focusPen; -} - -void KClassicalStyleParameters::initToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - bool iconHighlight = false; - bool textHighlight = false; - -// const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option); - - if(widget){ - if (widget->property("setIconHoverClickHighlight").isValid() && widget->property("setIconHoverClickHighlight").canConvert<bool>()) { - iconHighlight = widget->property("setIconHoverClickHighlight").value<bool>(); - } - if (widget->property("setTextHoverClickHighlight").isValid() && widget->property("setTextHoverClickHighlight").canConvert<bool>()) { - iconHighlight = widget->property("setTextHoverClickHighlight").value<bool>(); - } - } - - toolButtonParameters.iconHoverClickHighlight = iconHighlight; - toolButtonParameters.textHoverClickHighlight = textHighlight; -} - -void KClassicalStyleParameters::initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int radius = radiusProperty().normalRadius; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush focusBrush; - QBrush disableBrush; - - QPen defaultPen; - QPen hoverPen; - QPen focusPen; - QPen disablePen; - - //default state - defaultBrush = option->palette.brush(QPalette::Active, QPalette::Base); - if(isDark){ - defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else - defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //hover state - hoverBrush = defaultBrush; - hoverPen = defaultPen; - - //focus state - focusBrush = defaultBrush; - focusPen = QPen(option->palette.brush(QPalette::Inactive, QPalette::Highlight), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //disable state - if (isDark) { - disablePen = QPen(QBrush(adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), 18)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - - } else { - disablePen = QPen(option->palette.brush(QPalette::Disabled, QPalette::Button), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - disableBrush = option->palette.brush(QPalette::Inactive, QPalette::Button); - } - - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); - } - if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { - defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); - } - if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { - hoverBrush = widget->property("setHoverBrush").value<QBrush>(); - } - if (widget->property("setFocusBrush").isValid() && widget->property("setFocusBrush").canConvert<QBrush>()) { - focusBrush = widget->property("setFocusBrush").value<QBrush>(); - } - if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { - disableBrush = widget->property("setDisableBrush").value<QBrush>(); - } - if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { - defaultPen = widget->property("setDefaultPen").value<QPen>(); - } - if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { - hoverPen = widget->property("setHoverPen").value<QPen>(); - } - if (widget->property("setFocusPen").isValid() && widget->property("setFocusPen").canConvert<QPen>()) { - focusPen = widget->property("setFocusPen").value<QPen>(); - } - if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { - disablePen = widget->property("setDisablePen").value<QPen>(); - } - } - lineEditParameters.radius = radius; - lineEditParameters.lineEditDefaultBrush = defaultBrush; - lineEditParameters.lineEditHoverBrush = hoverBrush; - lineEditParameters.lineEditFocusBrush = focusBrush; - lineEditParameters.lineEditDisableBrush = disableBrush; - - lineEditParameters.lineEditDefaultPen = defaultPen; - lineEditParameters.lineEditHoverPen = hoverPen; - lineEditParameters.lineEditFocusPen = focusPen; - lineEditParameters.lineEditDisablePen = disablePen; -} - -void KClassicalStyleParameters::initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout) -{ - spinBoxParameters.radius = radiusProperty().normalRadius; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush focusBrush; - QBrush disableBrush; - - QPen defaultPen; - QPen hoverPen; - QPen focusPen; - QPen disablePen; - - QBrush upDefaultBrush; - QBrush upHoverBrush; - QBrush upFocusHoverBrush; - QBrush upClickBrush; - QBrush upDisableBrush; - QBrush downDefaultBrush; - QBrush downHoverBrush; - QBrush downFocusHoverBrush; - QBrush downClickBrush; - QBrush downDisableBrush; - - QPen upDefaultPen; - QPen upHoverPen; - QPen upFocusHoverPen; - QPen upClickPen; - QPen upDisablePen; - QPen downDefaultPen; - QPen downHoverPen; - QPen downFocusHoverPen; - QPen downClickPen; - QPen downDisablePen; - - - //default state - defaultBrush = option->palette.brush(QPalette::Active, QPalette::Base); - if(isDark) - defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else - defaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //hover state - hoverBrush = defaultBrush; - hoverPen = defaultPen; - - //focus state - focusBrush = defaultBrush; - focusPen = QPen(option->palette.color(QPalette::Active, QPalette::Highlight), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //disable state - if (isDark) { - disablePen = QPen(QBrush(adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), 18)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - disableBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - - } else { - disablePen = QPen(option->palette.brush(QPalette::Disabled, QPalette::Button), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - disableBrush = option->palette.brush(QPalette::Inactive, QPalette::Button); - } - - - //up default - if(isDark) - upDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else - upDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - upDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - - //up hover - if (isDark) { - upHoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { - upHoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - upHoverBrush = QBrush(highlightHover(isDark, option->palette)); - - //up focus hover - upFocusHoverBrush = upHoverBrush; - upFocusHoverPen = upHoverPen; - - //up click - if (isDark) { - upClickPen = QPen(option->palette.brush(QPalette::Active, QPalette::Highlight), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } else { - upClickPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - upClickBrush = QBrush(highlightClick(isDark, option->palette)); - - //up disable - upDisableBrush = disableBrush; - upDisablePen = disablePen; - - //down default - downDefaultBrush = upDefaultBrush; - downDefaultPen = upDefaultPen; - - //down hover - downHoverBrush = upHoverBrush; - downHoverPen = upHoverPen; - - //down focus hover - downFocusHoverPen = upFocusHoverPen; - downFocusHoverBrush = upFocusHoverBrush; - - //down click - downClickBrush = upClickBrush; - downClickPen = upClickPen; - - //down disable - downDisableBrush = upDisableBrush; - downDisablePen = upDisablePen; - - - spinBoxParameters.spinBoxDefaultBrush = defaultBrush; - spinBoxParameters.spinBoxHoverBrush = hoverBrush; - spinBoxParameters.spinBoxFocusBrush = focusBrush; - spinBoxParameters.spinBoxDisableBrush = disableBrush; - - spinBoxParameters.spinBoxDefaultPen = defaultPen; - spinBoxParameters.spinBoxHoverPen = hoverPen; - spinBoxParameters.spinBoxFocusPen = focusPen; - spinBoxParameters.spinBoxDisablePen = disablePen; - - spinBoxParameters.spinBoxUpDefaultBrush = upDefaultBrush; - spinBoxParameters.spinBoxUpHoverBrush = upHoverBrush; - spinBoxParameters.spinBoxUpFocusHoverBrush = upFocusHoverBrush; - spinBoxParameters.spinBoxUpClickBrush = upClickBrush; - spinBoxParameters.spinBoxUpDisableBrush = upDisableBrush; - - spinBoxParameters.spinBoxDownDefaultBrush = downDefaultBrush; - spinBoxParameters.spinBoxDownHoverBrush = downHoverBrush; - spinBoxParameters.spinBoxDownFocusHoverBrush = downFocusHoverBrush; - spinBoxParameters.spinBoxDownClickBrush = downClickBrush; - spinBoxParameters.spinBoxDownDisableBrush = downDisableBrush; - - spinBoxParameters.spinBoxUpDefaultPen = upDefaultPen; - spinBoxParameters.spinBoxUpHoverPen = upHoverPen; - spinBoxParameters.spinBoxUpFocusHoverPen = upFocusHoverPen; - spinBoxParameters.spinBoxUpClickPen = upClickPen; - spinBoxParameters.spinBoxUpDisablePen = upDisablePen; - - spinBoxParameters.spinBoxDownDefaultPen = downDefaultPen; - spinBoxParameters.spinBoxDownHoverPen = downHoverPen; - spinBoxParameters.spinBoxDownFocusHoverPen = downFocusHoverPen; - spinBoxParameters.spinBoxDownClickPen = downClickPen; - spinBoxParameters.spinBoxDownDisablePen = downDisablePen; - - spinBoxParameters.spinBoxUpIconHightPixMap = false; - spinBoxParameters.spinBoxDownIconHightPixMap = false; -} - -void KClassicalStyleParameters::initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int radius = radiusProperty().normalRadius; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush onBrush; - QBrush editBrush; - QBrush disableBrush; - - QPen defaultPen; - QPen hoverPen; - QPen onPen; - QPen editPen; - QPen disablePen; - - - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - onPen, onBrush, disablePen, disableBrush); - - //edit - editBrush = onBrush; - editPen = onPen; - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); - } - if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { - defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); - } - if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { - hoverBrush = widget->property("setHoverBrush").value<QBrush>(); - } - if (widget->property("setOnBrush").isValid() && widget->property("setOnBrush").canConvert<QBrush>()) { - onBrush = widget->property("setOnBrush").value<QBrush>(); - } - if (widget->property("setBoxEditBrush").isValid() && widget->property("setBoxEditBrush").canConvert<QBrush>()) { - editBrush = widget->property("setBoxEditBrush").value<QBrush>(); - } - if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { - disableBrush = widget->property("setDisableBrush").value<QBrush>(); - } - if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { - defaultPen = widget->property("setDefaultPen").value<QPen>(); - } - if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { - hoverPen = widget->property("setHoverPen").value<QPen>(); - } - if (widget->property("setOnPen").isValid() && widget->property("setOnPen").canConvert<QPen>()) { - onPen = widget->property("setOnPen").value<QPen>(); - } - if (widget->property("setEditPen").isValid() && widget->property("setEditPen").canConvert<QPen>()) { - editPen = widget->property("setEditPen").value<QPen>(); - } - if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { - disablePen = widget->property("setDisablePen").value<QPen>(); - } - } - - comboBoxParameters.radius = radius; - - comboBoxParameters.comboBoxDefaultBrush = defaultBrush; - comboBoxParameters.comboBoxHoverBrush = hoverBrush; - comboBoxParameters.comboBoxOnBrush = onBrush; - comboBoxParameters.comboBoxEditBrush = editBrush; - comboBoxParameters.comboBoxDisableBrush = disableBrush; - - comboBoxParameters.comboBoxDefaultPen = defaultPen; - comboBoxParameters.comboBoxHoverPen = hoverPen; - comboBoxParameters.comboBoxOnPen = onPen; - comboBoxParameters.comboBoxEditPen = editPen; - comboBoxParameters.comboBoxDisablePen = disablePen; -} - -void KClassicalStyleParameters::initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int radius = radiusProperty().normalRadius; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush selectBrush; - QBrush disableBrush; - QPen hoverPen ; - QPen selectPen ; - QPen textHoverPen ; - QPen textSelectPen ; - - //default - defaultBrush = QBrush(Qt::transparent); - - //hover - //hoverBrush = option->palette.brush(QPalette::Disabled, QPalette::Midlight); - hoverBrush = QBrush(highlightHover(isDark, option->palette)); - textHoverPen = option->palette.color(QPalette::Normal, QPalette::Text); - - //select - //selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); - selectBrush = QBrush(highlightClick(isDark, option->palette)); - textSelectPen = option->palette.color(QPalette::Normal, QPalette::Text); - - if(isDark) - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - if(isDark) - - selectPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else - selectPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - - //disable - disableBrush = QBrush(Qt::transparent); - - const QStyleOptionViewItem *vi = qstyleoption_cast<const QStyleOptionViewItem *>(option); - QPalette::ColorGroup cg = vi->state & QStyle::State_Enabled - ? QPalette::Normal : QPalette::Disabled; - if (cg == QPalette::Normal && !(vi->state & QStyle::State_Active)) - cg = QPalette::Inactive; - - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); - } - if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { - defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); - } - if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { - hoverBrush = widget->property("setHoverBrush").value<QBrush>(); - } - if (widget->property("setSelectBrush").isValid() && widget->property("setSelectBrush").canConvert<QBrush>()) { - selectBrush = widget->property("setSelectBrush").value<QBrush>(); - } - if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { - disableBrush = widget->property("setDisableBrush").value<QBrush>(); - } - if (widget->property("setTextHoverPen").isValid() && widget->property("setTextHoverPen").canConvert<QPen>()) { - textHoverPen = widget->property("setTextHoverPen").value<QPen>(); - } - if (widget->property("setTextSelectPen").isValid() && widget->property("setTextSelectPen").canConvert<QPen>()) { - textSelectPen = widget->property("setTextSelectPen").value<QPen>(); - } - } - - listParameters.radius = radius; - listParameters.listDefaultBrush = defaultBrush; - listParameters.listHoverBrush = hoverBrush; - listParameters.listSelectBrush = selectBrush; - listParameters.listHoverPen = hoverPen; - listParameters.listSelectPen = selectPen; - listParameters.listDisableBrush = disableBrush; - listParameters.listTextHoverPen = textHoverPen; - listParameters.listTextSelectPen = textSelectPen; - -} - -void KClassicalStyleParameters::initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int radius = radiusProperty().normalRadius; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush selectBrush; - QBrush disableBrush; - QPen hoverPen; - QPen selectPen; - - QBrush branchDefaultBrush; - QBrush branchHoverBrush; - QBrush branchSelectBrush; - QBrush branchDisableBrush; - QPen textHoverPen; - QPen textSelectPen; - - //default - defaultBrush = QBrush(Qt::transparent); - branchDefaultBrush = defaultBrush; - - //hover - //hoverBrush = option->palette.brush(QPalette::Disabled, QPalette::Midlight); - hoverBrush = QBrush(highlightHover(isDark, option->palette)); - branchHoverBrush = hoverBrush; - textHoverPen = option->palette.color(QPalette::Normal, QPalette::Text); - - //select - //selectBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); - selectBrush = QBrush(highlightClick(isDark, option->palette)); - branchSelectBrush = selectBrush; - textSelectPen = option->palette.color(QPalette::Normal, QPalette::Text); - - if(isDark) - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - if(isDark) - - selectPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else - selectPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //disable - disableBrush = QBrush(Qt::transparent); - branchDisableBrush = disableBrush; - - if(widget->property("animation").isValid()) - treeParameters.animation = widget->property("animation").toBool(); - - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); - } - if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { - defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); - } - if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { - hoverBrush = widget->property("setHoverBrush").value<QBrush>(); - } - if (widget->property("setSelectBrush").isValid() && widget->property("setSelectBrush").canConvert<QBrush>()) { - selectBrush = widget->property("setSelectBrush").value<QBrush>(); - } - if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { - disableBrush = widget->property("setDisableBrush").value<QBrush>(); - } - if (widget->property("setBranchDefaultBrush").isValid() && widget->property("setBranchDefaultBrush").canConvert<QBrush>()) { - branchDefaultBrush = widget->property("setBranchDefaultBrush").value<QBrush>(); - } - if (widget->property("setBranchHoverBrush").isValid() && widget->property("setBranchHoverBrush").canConvert<QBrush>()) { - branchHoverBrush = widget->property("setBranchHoverBrush").value<QBrush>(); - } - if (widget->property("setBranchSelectBrush").isValid() && widget->property("setBranchSelectBrush").canConvert<QBrush>()) { - branchSelectBrush = widget->property("setBranchSelectBrush").value<QBrush>(); - } - if (widget->property("setBranchDisableBrush").isValid() && widget->property("setBranchDisableBrush").canConvert<QBrush>()) { - branchDisableBrush = widget->property("setBranchDisableBrush").value<QBrush>(); - } - if (widget->property("setTextHoverPen").isValid() && widget->property("setTextHoverPen").canConvert<QPen>()) { - textHoverPen = widget->property("setTextHoverPen").value<QPen>(); - } - if (widget->property("setTextSelectPen").isValid() && widget->property("setTextSelectPen").canConvert<QPen>()) { - textSelectPen = widget->property("setTextSelectPen").value<QPen>(); - } - } - - treeParameters.radius = radius; - treeParameters.treeDefaultBrush = defaultBrush; - treeParameters.treeHoverBrush = hoverBrush; - treeParameters.treeSelectBrush = selectBrush; - treeParameters.treeDisableBrush = disableBrush; - - treeParameters.treeHoverPen = hoverPen; - treeParameters.treeSelectPen = selectPen; - - treeParameters.treeBranchDefaultBrush = branchDefaultBrush; - treeParameters.treeBranchHoverBrush = branchHoverBrush; - treeParameters.treeBranchSelectBrush = branchSelectBrush; - treeParameters.treeBranchDisableBrush = branchDisableBrush; - - treeParameters.treeTextHoverPen = textHoverPen; - treeParameters.treeTextSelectPen = textSelectPen; -} - -void KClassicalStyleParameters::initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int radius = radiusProperty().normalRadius; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush selectBrush; - QBrush disableBrush; - QPen hoverPen; - QPen selectPen; - QPen textHoverPen; - QPen textSelectPen; - - - //default - defaultBrush = QBrush(Qt::transparent); - - //hover - hoverBrush = QBrush(highlightHover(isDark, option->palette)); - textHoverPen = option->palette.color(QPalette::Normal, QPalette::Text); - - //select - selectBrush = QBrush(highlightClick(isDark, option->palette)); - textSelectPen = option->palette.color(QPalette::Normal, QPalette::Text); - - if(isDark) - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else - hoverPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - if(isDark) - - selectPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else - selectPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - - //disable - disableBrush = QBrush(Qt::transparent); - - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); - } - if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { - defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); - } - if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { - hoverBrush = widget->property("setHoverBrush").value<QBrush>(); - } - if (widget->property("setSelectBrush").isValid() && widget->property("setSelectBrush").canConvert<QBrush>()) { - selectBrush = widget->property("setSelectBrush").value<QBrush>(); - } - if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { - disableBrush = widget->property("setDisableBrush").value<QBrush>(); - } - if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { - hoverPen = widget->property("setHoverPen").value<QPen>(); - } - if (widget->property("setSelectPen").isValid() && widget->property("setSelectPen").canConvert<QPen>()) { - selectPen = widget->property("setSelectPen").value<QPen>(); - } - if (widget->property("setTextHoverPen").isValid() && widget->property("setTextHoverPen").canConvert<QPen>()) { - textHoverPen = widget->property("setTextHoverPen").value<QPen>(); - } - if (widget->property("setTextSelectPen").isValid() && widget->property("setTextSelectPen").canConvert<QPen>()) { - textSelectPen = widget->property("setTextSelectPen").value<QPen>(); - } - } - - tableParameters.radius = radius; - - tableParameters.tableDefaultBrush = defaultBrush; - tableParameters.tableHoverBrush = hoverBrush; - tableParameters.tableSelectBrush = selectBrush; - tableParameters.tableDisableBrush = disableBrush; - tableParameters.tableHoverPen = hoverPen; - tableParameters.tableSelectPen = selectPen; - tableParameters.tableTextHoverPen = textHoverPen; - tableParameters.tableTextSelectPen = textSelectPen; - -} - -void KClassicalStyleParameters::initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int radius = radiusProperty().minRadius; - - QPen defaultPen; - QPen hoverPen; - QPen clickPen; - QPen disablePen; - QPen onDefaultPen; - QPen onHoverPen; - QPen onClickPen; - QPen contentPen; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush clickBrush; - QBrush disableBrush; - QBrush onDefaultBrush; - QBrush onHoverBrush; - QBrush onClickBrush; - QBrush pathBrush; - QBrush pathDisableBrush; - - bool onHoverBrushIslinearGradient = false; - - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); - - //on default - onDefaultPen = defaultPen; - onDefaultBrush = defaultBrush; - - //on hover - onHoverPen = hoverPen; - onHoverBrush = hoverBrush; - - //on click - onClickPen = clickPen; - onClickBrush = clickBrush; - - //path - pathBrush = option->palette.brush(QPalette::Active, QPalette::Text); - pathDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::ButtonText); - - if(widget->property("animation").isValid()) - checkBoxParameters.animation = widget->property("animation").toBool(); - - checkBoxParameters.checkBoxContentPen = QPen(QBrush(option->palette.brush(QPalette::Active, QPalette::ButtonText)), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); - } - if (widget->property("setContentPen").isValid() && widget->property("setContentPen").canConvert<QPen>()) { - contentPen = widget->property("setContentPen").value<QPen>(); - } - if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { - defaultPen = widget->property("setDefaultPen").value<QPen>(); - } - if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { - hoverPen = widget->property("setHoverPen").value<QPen>(); - } - if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { - clickPen = widget->property("setClickPen").value<QPen>(); - } - if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { - disablePen = widget->property("setDisablePen").value<QPen>(); - } - if (widget->property("setOnDefaultPen").isValid() && widget->property("setOnDefaultPen").canConvert<QPen>()) { - onDefaultPen = widget->property("setOnDefaultPen").value<QPen>(); - } - if (widget->property("setOnHoverPen").isValid() && widget->property("setOnHoverPen").canConvert<QPen>()) { - onHoverPen = widget->property("setOnHoverPen").value<QPen>(); - } - if (widget->property("setOnClickPen").isValid() && widget->property("setOnClickPen").canConvert<QPen>()) { - onClickPen = widget->property("setOnClickPen").value<QPen>(); - } - if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { - defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); - } - if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { - hoverBrush = widget->property("setHoverBrush").value<QBrush>(); - } - if (widget->property("setClickBrush").isValid() && widget->property("setClickBrush").canConvert<QBrush>()) { - clickBrush = widget->property("setClickBrush").value<QBrush>(); - } - if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { - disableBrush = widget->property("setDisableBrush").value<QBrush>(); - } - if (widget->property("setOnDefaultBrush").isValid() && widget->property("setOnDefaultBrush").canConvert<QBrush>()) { - onDefaultBrush = widget->property("setOnDefaultBrush").value<QBrush>(); - } - if (widget->property("setOnHoverBrush").isValid() && widget->property("setOnHoverBrush").canConvert<QBrush>()) { - onHoverBrush = widget->property("setOnHoverBrush").value<QBrush>(); - } - if (widget->property("setOnClickBrush").isValid() && widget->property("setOnClickBrush").canConvert<QBrush>()) { - onClickBrush = widget->property("setOnClickBrush").value<QBrush>(); - } - if (widget->property("setPathBrush").isValid() && widget->property("setPathBrush").canConvert<QBrush>()) { - pathBrush = widget->property("setPathBrush").value<QBrush>(); - } - if (widget->property("setPathDisableBrush").isValid() && widget->property("setPathDisableBrush").canConvert<QBrush>()) { - pathDisableBrush = widget->property("setPathDisableBrush").value<QBrush>(); - } - if (widget->property("setOnHoverBrushIslinearGradient").isValid() && widget->property("setOnHoverBrushIslinearGradient").canConvert<bool>()) { - onHoverBrushIslinearGradient = widget->property("setOnHoverBrushIslinearGradient").value<bool>(); - } - } - - checkBoxParameters.radius = radius; - checkBoxParameters.checkBoxContentPen = contentPen; - checkBoxParameters.checkBoxDefaultPen = defaultPen; - checkBoxParameters.checkBoxHoverPen = hoverPen; - checkBoxParameters.checkBoxClickPen = clickPen; - checkBoxParameters.checkBoxDisablePen = disablePen; - checkBoxParameters.checkBoxOnDefaultPen = onDefaultPen; - checkBoxParameters.checkBoxOnHoverPen = onHoverPen; - checkBoxParameters.checkBoxOnClickPen = onClickPen; - - checkBoxParameters.checkBoxDefaultBrush = defaultBrush; - checkBoxParameters.checkBoxHoverBrush = hoverBrush; - checkBoxParameters.checkBoxClickBrush = clickBrush; - checkBoxParameters.checkBoxDisableBrush = disableBrush; - checkBoxParameters.checkBoxOnDefaultBrush = onDefaultBrush; - checkBoxParameters.checkBoxOnHoverBrush = onHoverBrush; - checkBoxParameters.checkBoxOnClickBrush = onClickBrush; - checkBoxParameters.checkBoxPathBrush = pathBrush; - checkBoxParameters.checkBoxPathDisableBrush = pathDisableBrush; - - checkBoxParameters.onHoverBrushIslinearGradient = onHoverBrushIslinearGradient; -} - -void KClassicalStyleParameters::initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - radioButtonParameters.radius = radiusProperty().normalRadius; - radioButtonParameters.childrenRadius = (qstyleoption_cast<const QStyleOptionButton*>(option)->rect.adjusted(1, 1, -1, -1).width()) / 2; - - QPen defaultPen; - QPen hoverPen; - QPen clickPen; - QPen disablePen; - QPen onDefaultPen; - QPen onHoverPen; - QPen onClickPen; - - QBrush defaultBrush; - QBrush hoverBrush; - QBrush clickBrush; - QBrush disableBrush; - QBrush onDefaultBrush; - QBrush onHoverBrush; - QBrush onClickBrush; - QBrush childrenOnDefaultBrush; - QBrush childrenOnHoverBrush; - QBrush childrenOnClickBrush; - QBrush childrenOnDisableBrush; - - normalButtonColor(isDark, option->palette, defaultPen, defaultBrush, hoverPen, hoverBrush, - clickPen, clickBrush, disablePen, disableBrush); - - //on default - onDefaultPen = defaultPen; - onDefaultBrush = defaultBrush; - - //on hover - onHoverPen = hoverPen; - onHoverBrush = hoverBrush; - - - //on click - onClickPen = clickPen; - onClickBrush = clickBrush; - - if(isDark) - childrenOnDefaultBrush = option->palette.brush(QPalette::Active, QPalette::BrightText); - else - childrenOnDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Text); - - childrenOnHoverBrush = childrenOnDefaultBrush; - childrenOnClickBrush = childrenOnDefaultBrush; - childrenOnDisableBrush = childrenOnDefaultBrush; - if(isDark) - childrenOnDisableBrush = option->palette.brush(QPalette::Disabled, QPalette::ButtonText); - else - childrenOnDisableBrush = QBrush(adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), -15)); - - //if set property - if (widget) { - if (widget->property("setDefaultPen").isValid() && widget->property("setDefaultPen").canConvert<QPen>()) { - defaultPen = widget->property("setDefaultPen").value<QPen>(); - } - if (widget->property("setHoverPen").isValid() && widget->property("setHoverPen").canConvert<QPen>()) { - hoverPen = widget->property("setHoverPen").value<QPen>(); - } - if (widget->property("setClickPen").isValid() && widget->property("setClickPen").canConvert<QPen>()) { - clickPen = widget->property("setClickPen").value<QPen>(); - } - if (widget->property("setDisablePen").isValid() && widget->property("setDisablePen").canConvert<QPen>()) { - disablePen = widget->property("setDisablePen").value<QPen>(); - } - if (widget->property("setOnDefaultPen").isValid() && widget->property("setOnDefaultPen").canConvert<QPen>()) { - onDefaultPen = widget->property("setOnDefaultPen").value<QPen>(); - } - if (widget->property("setOnHoverPen").isValid() && widget->property("setOnHoverPen").canConvert<QPen>()) { - onHoverPen = widget->property("setOnHoverPen").value<QPen>(); - } - if (widget->property("setOnClickPen").isValid() && widget->property("setOnClickPen").canConvert<QPen>()) { - onClickPen = widget->property("setOnClickPen").value<QPen>(); - } - if (widget->property("setDefaultBrush").isValid() && widget->property("setDefaultBrush").canConvert<QBrush>()) { - defaultBrush = widget->property("setDefaultBrush").value<QBrush>(); - } - if (widget->property("setHoverBrush").isValid() && widget->property("setHoverBrush").canConvert<QBrush>()) { - hoverBrush = widget->property("setHoverBrush").value<QBrush>(); - } - if (widget->property("setClickBrush").isValid() && widget->property("setClickBrush").canConvert<QBrush>()) { - clickBrush = widget->property("setClickBrush").value<QBrush>(); - } - if (widget->property("setDisableBrush").isValid() && widget->property("setDisableBrush").canConvert<QBrush>()) { - disableBrush = widget->property("setDisableBrush").value<QBrush>(); - } - if (widget->property("setOnDefaultBrush").isValid() && widget->property("setOnDefaultBrush").canConvert<QBrush>()) { - onDefaultBrush = widget->property("setOnDefaultBrush").value<QBrush>(); - } - if (widget->property("setOnHoverBrush").isValid() && widget->property("setOnHoverBrush").canConvert<QBrush>()) { - onHoverBrush = widget->property("setOnHoverBrush").value<QBrush>(); - } - if (widget->property("setOnClickBrush").isValid() && widget->property("setOnClickBrush").canConvert<QBrush>()) { - onClickBrush = widget->property("setOnClickBrush").value<QBrush>(); - } - } - - if(widget->property("animation").isValid()) - radioButtonParameters.animation = widget->property("animation").toBool(); - - radioButtonParameters.radioButtonDefaultPen = defaultPen; - radioButtonParameters.radioButtonHoverPen = hoverPen; - radioButtonParameters.radioButtonClickPen = clickPen; - radioButtonParameters.radioButtonDisablePen = disablePen; - radioButtonParameters.radioButtonOnDefaultPen = onDefaultPen; - radioButtonParameters.radioButtonOnHoverPen = onHoverPen; - radioButtonParameters.radioButtonOnClickPen = onClickPen; - - radioButtonParameters.radioButtonDefaultBrush = defaultBrush; - radioButtonParameters.radioButtonHoverBrush = hoverBrush; - radioButtonParameters.radioButtonClickBrush = clickBrush; - radioButtonParameters.radioButtonDisableBrush = disableBrush; - radioButtonParameters.radioButtonOnDefaultBrush = onDefaultBrush; - radioButtonParameters.radioButtonOnHoverBrush = onHoverBrush; - radioButtonParameters.radioButtonOnClickBrush = onClickBrush; - - radioButtonParameters.radioButtonChildrenOnDefaultBrush = childrenOnDefaultBrush; - radioButtonParameters.radioButtonChildrenOnHoverBrush = childrenOnHoverBrush; - radioButtonParameters.radioButtonChildrenOnClickBrush = childrenOnClickBrush; - radioButtonParameters.radioButtonChildrenOnDisableBrush = childrenOnDisableBrush; -} - -void KClassicalStyleParameters::initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int grooveRadius = radiusProperty().normalRadius; - - QBrush handleDefaultBrush; - QBrush handleHoverBrush; - QBrush handleClickBrush; - QBrush handleDisableBrush; - - QBrush grooveValueDefaultBrush; - QBrush grooveValueHoverBrush; - QBrush grooveValueDisableBrush; - QBrush grooveUnvalueDefaultBrush; - QBrush grooveUnvalueHoverBrush; - QBrush grooveUnvalueDisableBrush; - QPainterPath handlePath; - QPen handleDefaultPen; - QPen handleHoverPen; - QPen handleClickPen; - QPen handleDisablePen; - QPen sliderGroovePen; - QColor highlight = option->palette.color(QPalette::Active, QPalette::Highlight); - QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option); - const bool horizontal = slider->orientation == Qt::Horizontal; - bool needTranslucent = false; - - //handle default - - if (isDark) { - handleDefaultBrush = option->palette.color(QPalette::Active, QPalette::Button); - handleDefaultPen = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15); - } else { - handleDefaultBrush = option->palette.color(QPalette::Active, QPalette::Button); - handleDefaultPen = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 5, -21, 3); - } - handleDefaultPen.setWidth(1); - - //handle hover - handleHoverPen = handleDefaultPen; - handleHoverPen.setWidth(1); - handleHoverBrush = highlightHover(isDark, option->palette); - - - //handle click - handleClickPen = handleDefaultPen; - handleHoverPen.setWidth(1); - handleClickBrush = highlightClick(isDark, option->palette); - - //handle disable - if(isDark) - { - handleDisablePen = adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), 18); - } - else - handleDisablePen = adjustL(option->palette.color(QPalette::Disabled, QPalette::Button), -12); - handleDisablePen.setWidth(1); - if(isDark) - handleDisableBrush = option->palette.color(QPalette::Disabled, QPalette::ButtonText); - else - handleDisableBrush = option->palette.color(QPalette::Active, QPalette::Button); - - //groove value default - if (isDark) { - grooveValueDefaultBrush = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15); - } else { - grooveValueDefaultBrush = option->palette.color(QPalette::Active, QPalette::Highlight); - } - - //groove value hover - grooveValueHoverBrush = grooveValueDefaultBrush; - - //groove value disable - if(isDark) - grooveValueDisableBrush = option->palette.color(QPalette::Disabled, QPalette::ButtonText); - else - grooveValueDisableBrush = option->palette.color(QPalette::Disabled, QPalette::Button); - - //groove unvalue default - if(isDark) - grooveUnvalueDefaultBrush = option->palette.color(QPalette::Disabled, QPalette::Button); - else - grooveUnvalueDefaultBrush = option->palette.color(QPalette::Active, QPalette::Button); - - //groove unvalue hover - grooveUnvalueHoverBrush = grooveUnvalueDefaultBrush; - - //groove unvalue disable - grooveUnvalueDisableBrush = grooveUnvalueDefaultBrush; - - - if(isDark){ - sliderGroovePen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else - sliderGroovePen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - - QRect handleRect = option->rect; - - if(horizontal){ - handlePath.moveTo(handleRect.left(), handleRect.top()); - handlePath.lineTo(handleRect.left(), handleRect.top() + (2 * (handleRect.height())/3)); - handlePath.lineTo(handleRect.center().x(), handleRect.bottom()); - handlePath.lineTo(handleRect.right(), handleRect.top() + (2 * (handleRect.height())/3)); - handlePath.lineTo(handleRect.right(), handleRect.top()); - handlePath.lineTo(handleRect.left(), handleRect.top()); - - }else { - handlePath.moveTo(handleRect.right(),handleRect.top()); - handlePath.lineTo(handleRect.right() - (2 * (handleRect.width())/3) , handleRect.top()); - handlePath.lineTo(handleRect.left(), handleRect.center().y() ); - handlePath.lineTo(handleRect.right() - (2 * (handleRect.width())/3), handleRect.bottom()); - handlePath.lineTo(handleRect.right(), handleRect.bottom()); - handlePath.lineTo(handleRect.right(),handleRect.top()); - } - - qDebug() << "sloder animation 00000000000" << widget->property("animation").isValid(); - if(widget->property("animation").isValid()){ - sliderParameters.animation = widget->property("animation").toBool(); - qDebug() << "slider animation11111" << widget->property("animation").toBool(); - } - - if(widget){ - if (widget->property("setGrooveRadius").isValid() && widget->property("setGrooveRadius").canConvert<int>()) { - grooveRadius = widget->property("setGrooveRadius").value<int>(); - } - if (widget->property("setHandleDefaultBrush").isValid() && widget->property("setHandleDefaultBrush").canConvert<QBrush>()) { - handleDefaultBrush = widget->property("setHandleDefaultBrush").value<QBrush>(); - } - if (widget->property("setHandleHoverBrush").isValid() && widget->property("setHandleHoverBrush").canConvert<QBrush>()) { - handleHoverBrush = widget->property("setHandleHoverBrush").value<QBrush>(); - } - if (widget->property("setHandleClickBrush").isValid() && widget->property("setHandleClickBrush").canConvert<QBrush>()) { - handleClickBrush = widget->property("setHandleClickBrush").value<QBrush>(); - } - if (widget->property("setHandleDisableBrush").isValid() && widget->property("setHandleDisableBrush").canConvert<QBrush>()) { - handleDisableBrush = widget->property("setHandleDisableBrush").value<QBrush>(); - } - if (widget->property("setGrooveValueDefaultBrush").isValid() && widget->property("setGrooveValueDefaultBrush").canConvert<QBrush>()) { - grooveValueDefaultBrush = widget->property("setGrooveValueDefaultBrush").value<QBrush>(); - } - if (widget->property("setGrooveValueHoverBrush").isValid() && widget->property("setGrooveValueHoverBrush").canConvert<QBrush>()) { - grooveValueHoverBrush = widget->property("setGrooveValueHoverBrush").value<QBrush>(); - } - if (widget->property("setGrooveValueDisableBrush").isValid() && widget->property("setGrooveValueDisableBrush").canConvert<QBrush>()) { - grooveValueDisableBrush = widget->property("setGrooveValueDisableBrush").value<QBrush>(); - } - if (widget->property("setGrooveUnvalueDefaultBrush").isValid() && widget->property("setGrooveUnvalueDefaultBrush").canConvert<QBrush>()) { - grooveUnvalueDefaultBrush = widget->property("setGrooveUnvalueDefaultBrush").value<QBrush>(); - } - if (widget->property("setGrooveUnvalueHoverBrush").isValid() && widget->property("setGrooveUnvalueHoverBrush").canConvert<QBrush>()) { - grooveUnvalueHoverBrush = widget->property("setGrooveUnvalueHoverBrush").value<QBrush>(); - } - if (widget->property("setGrooveUnvalueDisableBrush").isValid() && widget->property("setGrooveUnvalueDisableBrush").canConvert<QBrush>()) { - grooveUnvalueDisableBrush = widget->property("setGrooveUnvalueDisableBrush").value<QBrush>(); - } - } - - sliderParameters.sliderHandleDefaultBrush = handleDefaultBrush; - sliderParameters.sliderHandleHoverBrush = handleHoverBrush; - sliderParameters.sliderHandleClickBrush = handleClickBrush; - sliderParameters.sliderHandleDisableBrush = handleDisableBrush; - - sliderParameters.sliderGrooveValueDefaultBrush = grooveValueDefaultBrush; - sliderParameters.sliderGrooveValueHoverBrush = grooveValueHoverBrush; - sliderParameters.sliderGrooveValueDisableBrush = grooveValueDisableBrush; - - sliderParameters.sliderGrooveUnvalueDefaultBrush = grooveUnvalueDefaultBrush; - sliderParameters.sliderGrooveUnvalueHoverBrush = grooveUnvalueHoverBrush; - sliderParameters.sliderGrooveUnvalueDisableBrush = grooveUnvalueDisableBrush; - sliderParameters.sliderHandlePath = handlePath; - - sliderParameters.sliderHandleDefaultPen = handleDefaultPen; - sliderParameters.sliderHandleHoverPen = handleHoverPen; - sliderParameters.sliderHandleClickPen = handleClickPen; - sliderParameters.sliderHandleDisablePen = handleDisablePen; - sliderParameters.sliderGroovePen = sliderGroovePen; - - Slider_Thickness = 18; - Slider_Length = 9; - Slider_GrooveLength = 6; - sliderParameters.sliderGrooveRadius = grooveRadius; -} - - -void KClassicalStyleParameters::initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int radius = radiusProperty().normalRadius; - QPen contentPen; - QPen grooveDefaultPen; - QPen grooveDisablePen; - - QBrush contentBrush; - QBrush grooveDefaultBrush; - QBrush grooveDisableBrush; - - - const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(option); - - //content - if(isDark) - contentBrush = QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), -1, 15, -14)); - else - contentBrush = option->palette.brush(QPalette::Active, QPalette::Highlight); - contentPen = Qt::NoPen; - - //groove default - grooveDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - if(isDark){ - grooveDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, 8)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else - grooveDefaultPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Button), 0, 0, -25)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - //groove disable - grooveDisablePen = grooveDefaultPen; - grooveDisableBrush = pb->palette.brush(QPalette::Disabled, QPalette::Button); - - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); - } - if (widget->property("setContentPen").isValid() && widget->property("setContentPen").canConvert<QPen>()) { - contentPen = widget->property("setContentPen").value<QPen>(); - } - if (widget->property("setGrooveDefaultPen").isValid() && widget->property("setGrooveDefaultPen").canConvert<QPen>()) { - grooveDefaultPen = widget->property("setGrooveDefaultPen").value<QPen>(); - } - if (widget->property("setGrooveDisablePen").isValid() && widget->property("setGrooveDisablePen").canConvert<QPen>()) { - grooveDisablePen = widget->property("setGrooveDisablePen").value<QPen>(); - } - if (widget->property("setContentBrush").isValid() && widget->property("setContentBrush").canConvert<QBrush>()) { - contentBrush = widget->property("setContentBrush").value<QBrush>(); - } - if (widget->property("setGrooveDefaultBrush").isValid() && widget->property("setGrooveDefaultBrush").canConvert<QBrush>()) { - grooveDefaultBrush = widget->property("setGrooveDefaultBrush").value<QBrush>(); - } - if (widget->property("setGrooveDisableBrush").isValid() && widget->property("setGrooveDisableBrush").canConvert<QBrush>()) { - grooveDisableBrush = widget->property("setGrooveDisableBrush").value<QBrush>(); - } - } - - - progressBarParameters.radius = radius; - progressBarParameters.progressBarContentPen = contentPen; - progressBarParameters.progressBarGrooveDefaultPen = grooveDefaultPen; - progressBarParameters.progressBarGrooveDisablePen = grooveDisablePen; - - progressBarParameters.progressBarContentBrush = contentBrush; - progressBarParameters.progressBarGrooveDefaultBrush = grooveDefaultBrush; - progressBarParameters.progressBarGrooveDisableBrush = grooveDisableBrush; - - progressBarParameters.progressBarContentHightColor = contentBrush.color(); - progressBarParameters.progressBarContentMidLightColor = contentBrush.color(); -} - -void KClassicalStyleParameters::initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int sliderRadius; - QBrush grooveDefaultBrush; - QBrush grooveInactiveBrush; - QBrush sliderDefaultBrush; - QBrush sliderHoverBrush; - QBrush sliderClickBrush; - QBrush sliderDisableBrush; - if(widget->property("animation").isValid()) - scrollBarParameters.animation = widget->property("animation").toBool(); - - const QStyleOptionSlider *bar = qstyleoption_cast<const QStyleOptionSlider *>(option); - - //radius - if (bar->orientation == Qt::Horizontal) { - sliderRadius = radiusProperty().normalRadius; - } else { - sliderRadius = radiusProperty().normalRadius; - } - - //groove default - if (isDark) { - grooveDefaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - }else { - grooveDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - } - - //groove inactive - grooveInactiveBrush = option->palette.brush(QPalette::Inactive, QPalette::Base); - - //slider default - if (isDark) { - sliderDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - }else { - sliderDefaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - } - //slider hover - if (isDark) { - sliderHoverBrush = buttonDarkClick(isDark, option->palette); - } else { - sliderHoverBrush = option->palette.brush(QPalette::Active, QPalette::Midlight); - } - - //slider click - if (isDark) { - sliderClickBrush = adjustL(option->palette.color(QPalette::Active, QPalette::Button), 13); - sliderDisableBrush = option->palette.color(QPalette::Disabled, QPalette::Midlight); - } else { - sliderClickBrush = adjustL(option->palette.color(QPalette::Active, QPalette::Button), -45); - sliderDisableBrush = option->palette.color(QPalette::Disabled, QPalette::Midlight); - } - - - scrollBarParameters.grooveWidthAnimation = false; - scrollBarParameters.radius = sliderRadius; - ScroolBar_LineLength = 16; - ScroolBar_Height= 24; - scrollBarParameters.scrollBarGrooveDefaultBrush = grooveDefaultBrush; - scrollBarParameters.scrollBarGrooveInactiveBrush = grooveDefaultBrush; - scrollBarParameters.scrollBarSliderDefaultBrush = sliderDefaultBrush; - scrollBarParameters.scrollBarSliderHoverBrush = sliderHoverBrush; - scrollBarParameters.scrollBarSliderClickBrush = sliderClickBrush; - scrollBarParameters.scrollBarSliderDisableBrush = sliderDisableBrush; -} - -void KClassicalStyleParameters::initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int radius = radiusProperty().normalRadius; - QBrush backgroundBrush; - - if(isDark) { - //background - backgroundBrush = option->palette.color(QPalette::Active, QPalette::Window); - } else { - //background - backgroundBrush = option->palette.color(QPalette::Active, QPalette::Base); - } - - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - radius = widget->property("setRadius").value<int>(); - } - if (widget->property("setBackgroundBrush").isValid() && widget->property("setBackgroundBrush").canConvert<QBrush>()) { - backgroundBrush = widget->property("setBackgroundBrush").value<QBrush>(); - } - } - - toolTipParameters.radius = radius; - toolTipParameters.toolTipBackgroundBrush = backgroundBrush; - -} - -void KClassicalStyleParameters::initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int tabradius = radiusProperty().normalRadius; - TabBar_BorderLine = true; - QBrush widgetBackgroundBrush; - QBrush tabBarBackgroundBrush; - QBrush tabBarDefaultBrush; - QBrush tabBarHoverBrush; - QBrush tabBarClickBrush; - QBrush tabBarSelectBrush; - QPen tabBarPen; - - bool selected = option->state & QStyle::State_Selected; - bool hover = option->state & QStyle::State_MouseOver; - bool click = option->state & (QStyle::State_On | QStyle::State_Sunken); - - if (isDark) { - //tab widget background - widgetBackgroundBrush = option->palette.brush(QPalette::Active, QPalette::Base); - - //tabbar background - tabBarBackgroundBrush = Qt::NoBrush;//option->palette.brush(QPalette::Active, QPalette::Midlight); - - //tabbar default - tabBarDefaultBrush = option->palette.brush(QPalette::Disabled, QPalette::Button); - - //tabbar hover - // QColor hover_color = option->palette.color(QPalette::Active, QPalette::Window); - // QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - //tabBarHoverBrush = QBrush(mixColor(hover_color, mix, 0.1)); - tabBarHoverBrush = highlightHover(isDark, option->palette); - - //tabbar select - //tabBarSelectBrush = option->palette.brush(QPalette::Active, QPalette::Base); - tabBarSelectBrush= widgetBackgroundBrush; - - tabBarClickBrush = highlightClick(isDark, option->palette); - -// tabBarPen = QPen(QBrush(adjustL(option->palette.color(QPalette::Active, QPalette::Midlight), 5)), -// 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - tabBarPen = QPen(QBrush(Qt::NoBrush), 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - if(click) - tabBarPen = QPen(QBrush(option->palette.color(QPalette::Active, QPalette::Highlight)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - else if(hover && !selected) - tabBarPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 0, -5, -15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - - }else { - //tab widget background - widgetBackgroundBrush = option->palette.brush(QPalette::Active, QPalette::Base); - - //tabbar background - tabBarBackgroundBrush = Qt::NoBrush;//option->palette.brush(QPalette::Disabled, QPalette::Light); - - //tabbar default - tabBarDefaultBrush = option->palette.brush(QPalette::Active, QPalette::Button); - - //tabbar hover - // QColor hover_color = option->palette.color(QPalette::Active, QPalette::Window); - // QColor mix = option->palette.color(QPalette::Active, QPalette::BrightText); - //tabBarHoverBrush = QBrush(mixColor(hover_color, mix, 0.1)); - tabBarHoverBrush = highlightHover(isDark, option->palette); - - //tabbar select - //tabBarSelectBrush = option->palette.brush(QPalette::Active, QPalette::Base); - tabBarSelectBrush = widgetBackgroundBrush; - - tabBarClickBrush =highlightClick(isDark, option->palette); - - if(click){ - tabBarPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 1, -21, 3)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else if(hover && !selected){ - tabBarPen = QPen(QBrush(adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -14, 15)), - 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - } - else{ - tabBarPen = QPen(QBrush(Qt::NoBrush), 0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); - - } - } -// if (widget && widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { -// tabradius = widget->property("setRadius").value<int>(); -// } - - if(widget){ - if (widget->property("setRadius").isValid() && widget->property("setRadius").canConvert<int>()) { - tabradius = widget->property("setRadius").value<int>(); - } - if (widget->property("setWidgetBackgroundBrush").isValid() && widget->property("setWidgetBackgroundBrush").canConvert<QBrush>()) { - widgetBackgroundBrush = widget->property("setWidgetBackgroundBrush").value<QBrush>(); - } - if (widget->property("setTabBarBackgroundBrush").isValid() && widget->property("setTabBarBackgroundBrush").canConvert<QBrush>()) { - tabBarBackgroundBrush = widget->property("setTabBarBackgroundBrush").value<QBrush>(); - } - if (widget->property("setTabBarDefaultBrush").isValid() && widget->property("setTabBarDefaultBrush").canConvert<QBrush>()) { - tabBarDefaultBrush = widget->property("setTabBarDefaultBrush").value<QBrush>(); - } - if (widget->property("setTabBarHoverBrush").isValid() && widget->property("setTabBarHoverBrush").canConvert<QBrush>()) { - tabBarHoverBrush = widget->property("setTabBarHoverBrush").value<QBrush>(); - } - if (widget->property("setTabBarClickBrush").isValid() && widget->property("setTabBarClickBrush").canConvert<QBrush>()) { - tabBarClickBrush = widget->property("setTabBarClickBrush").value<QBrush>(); - } - if (widget->property("setTabBarSelectBrush").isValid() && widget->property("setTabBarSelectBrush").canConvert<QBrush>()) { - tabBarSelectBrush = widget->property("setTabBarSelectBrush").value<QBrush>(); - } - if (widget->property("setTabBarPen").isValid() && widget->property("setTabBarPen").canConvert<QPen>()) { - tabBarPen = widget->property("setTabBarPen").value<QPen>(); - } - } - - tabWidgetParameters.radius = tabradius; - tabWidgetParameters.tabWidgetBackgroundBrush = widgetBackgroundBrush; - tabWidgetParameters.tabBarBackgroundBrush = tabBarBackgroundBrush; - tabWidgetParameters.tabBarDefaultBrush = tabBarDefaultBrush; - tabWidgetParameters.tabBarHoverBrush = tabBarHoverBrush; - tabWidgetParameters.tabBarClickBrush = tabBarClickBrush; - tabWidgetParameters.tabBarSelectBrush = tabBarSelectBrush; - tabWidgetParameters.tabBarPen = tabBarPen; -} - -void KClassicalStyleParameters::initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) -{ - int frameradius = radiusProperty().normalRadius; - int itemradius = radiusProperty().normalRadius; - QPixmap framePixmap(option->rect.size()); - QBrush itemSelectBrush; - QPen menuHoverPen; - if(isDark) - menuHoverPen = option->palette.color(QPalette::Normal, QPalette::Light); - else - menuHoverPen = option->palette.color(QPalette::Active, QPalette::HighlightedText); - - //frame Pixmap - framePixmap.fill(Qt::transparent); - if (qobject_cast<const QFrame*>(widget)) { - QPainter pixmapPainter(&framePixmap); - pixmapPainter.setPen(Qt::NoPen); - if(isDark) - pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::NoRole)); - else - pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::Base)); - - pixmapPainter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter.drawRect(option->rect); - } else { - int rander = 2; - - // Draw a black floor - QPainter pixmapPainter(&framePixmap); - pixmapPainter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter.setPen(Qt::transparent); - pixmapPainter.setBrush(option->palette.color(QPalette::Active, QPalette::BrightText)); - pixmapPainter.drawRoundedRect(option->rect.adjusted(+rander, +rander+6, -rander, -rander-6), frameradius, frameradius); - pixmapPainter.end(); - - // Blur the black background - QImage img = framePixmap.toImage(); - qt_blurImage(img, 4, false, false); - - // Dig out the center part, Shadow rendering - framePixmap = QPixmap::fromImage(img); - - QPainter pixmapPainter2(&framePixmap); - pixmapPainter2.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter2.setCompositionMode(QPainter::CompositionMode_Clear); - pixmapPainter2.setPen(Qt::transparent); - pixmapPainter2.setBrush(Qt::transparent); - pixmapPainter2.drawRoundedRect(option->rect.adjusted(+rander, +rander+6, -rander, -rander-6), frameradius, frameradius); - pixmapPainter2.end(); - - //That's when I started drawing the frame floor - auto color = option->palette.color(QPalette::Base); - color.setAlphaF(1); - - QPainterPath path; - QRegion region; - if (widget) { - region = widget->mask(); - } - if (region.isEmpty()) { - path.addRoundedRect(option->rect.adjusted(+rander, +rander+6, -rander, -rander-6), frameradius, frameradius); - } else { - path.addRegion(region); - } - - //draw blur background - QPainter pixmapPainter3(&framePixmap); - pixmapPainter3.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - pixmapPainter3.setPen(Qt::transparent); - pixmapPainter3.setBrush(color); - pixmapPainter3.drawPath(path); - } - - - if(isDark) - itemSelectBrush = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 3, 23, -11); - else{ - itemSelectBrush = adjustColor(option->palette.color(QPalette::Active, QPalette::Highlight), 4, -17, -6); - } - - if(widget){ - if (widget->property("setFrameRadius").isValid() && widget->property("setFrameRadius").canConvert<int>()) { - frameradius = widget->property("setFrameRadius").value<int>(); - } - if (widget->property("setItemRadius").isValid() && widget->property("setItemRadius").canConvert<int>()) { - itemradius = widget->property("setItemRadius").value<int>(); - } - if (widget->property("setFramePixmap").isValid() && widget->property("setFramePixmap").canConvert<QPixmap>()) { - framePixmap = widget->property("setFramePixmap").value<QPixmap>(); - } - if (widget->property("setItemSelectBrush").isValid() && widget->property("setItemSelectBrush").canConvert<QBrush>()) { - itemSelectBrush = widget->property("setItemSelectBrush").value<QBrush>(); - } - if (widget->property("setTextHoverPen").isValid() && widget->property("setTextHoverPen").canConvert<QPen>()) { - menuHoverPen = widget->property("setTextHoverPen").value<QPen>(); - } - } - - menuParameters.frameRadius = frameradius; - menuParameters.itemRadius = itemradius; - menuParameters.menuFramePixmap = framePixmap; - menuParameters.menuItemSelectBrush = itemSelectBrush; - - menuParameters.menuTextHoverPen = menuHoverPen; - -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/ukui-style-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/ukui-style-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/ukui-style-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/ukui-style-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,339 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Lei Chen <leichen@kylinos.cn> - * - */ - -#ifndef UKUISTYLEPARAMETERS_H -#define UKUISTYLEPARAMETERS_H - -#include <QObject> -#include <QPalette> -#include <QStyleOption> - -#include "pushbutton-parameters.h" -#include "toolbutton-parameters.h" -#include "lineedit-parameters.h" -#include "spinbox-parameters.h" -#include "combobox-parameters.h" -#include "list-parameters.h" -#include "tree-parameters.h" -#include "table-parameters.h" -#include "checkbox-parameters.h" -#include "radiobutton-parameters.h" -#include "slider-parameters.h" -#include "progressbar-parameters.h" -#include "scrollbar-parameters.h" -#include "tooltip-parameters.h" -#include "tabwidget-parameters.h" -#include "menu-parameters.h" -#include "../readconfig.h" - -class UKUIStyleParameters: public QObject -{ - Q_OBJECT -public: - UKUIStyleParameters(QObject *parent, bool isDark); - - enum SpinBoxControlLayout { - Horizontal, - Vertical - }; - Q_ENUM(SpinBoxControlLayout) - - enum TabBarIndicatorLayout { - TabBarIndicator_Horizontal, - TabBarIndicator_Vertical - }; - Q_ENUM(TabBarIndicatorLayout) - - void updateParameters(bool isTabletMode); - - ~UKUIStyleParameters(){} - // radius - int radius = 6; - - // common - int SmallIcon_Size = 16; - int IconButton_Distance = 8; - - // button - int Button_MarginHeight = 0; - int ToolButton_MarginWidth = 8; - int Button_MarginWidth = 8; - int Button_IconSize = 16; - int Button_IndicatorSize = 16; - int Button_DefaultIndicatorSize = 0; - int Button_DefaultWidth = 96; - int Button_DefaultHeight = 36; - int Button_DefaultHeight_origin = 36; - int ToolButton_DefaultWidth = 60; - int IconButton_DefaultWidth = 36; - int IconButton_DefaultWidth_origin = 36; - - QColor DarkColoseButtonColor = QColor(242, 116, 133); - - QColor LightColoseButtonColor = QColor(242, 82, 117); - QColor EndColoseButtonColor = QColor(221, 44, 68); - - QColor ColoseButtonColor = QColor(198, 42, 63); - - QColor Indicator_IconDefault; - QColor Indicator_IconHover; - QColor Indicator_IconSunken; - QColor Indicator_IconDisable; - - // menu - int Menu_MarginHeight = 4 + 8; - int Menu_Combobox_Popup_MarginHeight = 4; - int Menu_MarginWidth = 4 + 2; - int Menu_Combobox_Popup_MarginWidth = 4 + 2; - int Menu_MarginPanelWidth = 0; - int MenuItem_Spacing = 8; - int MenuItem_HMargin = 8; - int MenuContent_HMargin = 8; - - // menu-item - int MenuItem_MarginHeight = 2; - int MenuItem_MarginWidth = 12 + 4; - int MenuItemSeparator_MarginHeight = 4; - int MenuItemSeparator_MarginHeight_origin = 4; - int MenuItemSeparator_MarginWidth = 4; - int MenuItem_DefaultHeight = 36; - int MenuItem_DefaultHeight_origin = 36; - int MenuItem_DefaultWidght = 152; - - // scrollbar - int ScroolBar_Width = 16; - int ScroolBar_Width_origin = 16; - int ScroolBar_Height = 68; - int ScroolBar_LineLength = 16; - bool ScrooBar_ShowLine = false; - - // progressbar - int ProgressBar_DefaultLength = 388; - int ProgressBar_DefaultThick = 16; - - // slider - int Slider_DefaultLength = 94; - int Slider_DefaultLength_origin = 94; - int Slider_Length = 20; - int Slider_Length_origin = 20; - int Slider_Thickness = 20; - int Slider_Thickness_origin = 20; - - int Slider_GrooveLength = 4; - int Slider_GrooveLength_origin = 4; - int Slider_Margin = 2; - - // radiobutton - int ExclusiveIndicator_Width = 16; - int ExclusiveIndicator_Height = 16; - int RadioButtonLabel_Spacing = 8; - int RadioButton_DefaultHeight = 36; - int RadioButton_DefaultHeight_origin = 36; - - // checkbox - int Indicator_Width = 16; - int Indicator_Height = 16; - int CheckBox_DefaultHeight = 36; - int CheckBox_DefaultHeight_origin = 36; - int CheckBox_Radius = 4; - - // lineedit - int LineEdit_DefaultWidth = 160; - int LineEdit_DefaultWidth_origin = 160; - int LineEdit_DefaultHeight = 36; - int LineEdit_DefaultHeight_origin = 36; - - // combobox - int ComboBox_DefaultWidth = 160; - int ComboBox_DefaultHeight = 36; - int ComboBox_DefaultHeight_origin = 36; - int ComboBox_DefaultMenuItemHeight = 36; - int ComboBox_DefaultMenuItemHeight_original = 36; - int ComboBox_FrameWidth = 2; - int ComboBox_VMargin = 1; - - // spinbox - int SpinBox_DefaultWidth = 160; - int SpinBox_DefaultHeight = 36; - int SpinBox_DefaultHeight_origin = 36; - int SpinBox_FrameWidth = 2; - - // tabbar - int TabBar_DefaultMinWidth = 168; - int TabBar_DefaultMaxWidth = 248; - int TabBar_DefaultHeight = 40; - int TabBar_DefaultHeight_origin = 40; - int TabBar_DefaultHeight_aug = 0; - int TabBar_ScrollButtonWidth = 16; - int TabBar_ScrollButtonOverlap = 2; - bool TabBar_SplitLine = true; - bool TabBar_BorderLine = false; - - // tooltip - int ToolTip_DefaultMargin = 8; - int ToolTip_Height = 36; - int ToolTip_Height_origin = 36; - - //viewitem FIX:Separate to list,tree and table after - int ViewItem_DefaultHeight = 36; - int ViewItem_DefaultHeight_origin = 36; - - //table - int Table_HeaderHeight = 36; - int Table_HeaderHeight_origin = 36; - - float m_scaleRatio4_3 = 1.0; - float m_scaleRatio3_2 = 1.0; - float m_scaleRatio2_1 = 1.0; - - int m_headerDefaultSectionSizeVertical = 36; - int m_headerDefaultSectionSizeVertical1_1 = 36; - int m_headerDefaultSectionSizeVertical4_3 = 48; - bool m_isTableMode = false; - bool m_isInitial = true; - - float m_scaleSliderDefaultLength = 1.0; - float m_ScaleComboBoxDefaultLength = 1.0; - float m_ScaleLineEditDefaultLength = 1.0; - float m_scaleTabBarHeight6_5 = 1.0; - - bool indicatorIconHoverNeedHighLight = true; - - QPalette defaultPalette; - - PushButtonParameters pushButtonParameters; - ToolButtonParameters toolButtonParameters; - LineEditParameters lineEditParameters; - SpinBoxParameters spinBoxParameters; - ComboBoxParameters comboBoxParameters; - ListParameters listParameters; - TreeParameters treeParameters; - TableParameters tableParameters; - CheckBoxParameters checkBoxParameters; - RadioButtonParameters radioButtonParameters; - SliderParameters sliderParameters; - ProgressBarParameters progressBarParameters; - ScrollBarParameters scrollBarParameters; - ToolTipParameters toolTipParameters; - TabWidgetParameters tabWidgetParameters; - MenuParameters menuParameters; - - QPalette setPalette(QPalette &palette); - int getSpinBoxControlLayout(); - int getTabBarIndicatorLayout(); - void setTabBarIndicatorLayout(TabBarIndicatorLayout layout); - - virtual void initPalette(bool isDark) = 0; - - //pushbutton - virtual void initPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initPushButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - - //toolbutton - virtual void initToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - virtual void initToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - - virtual void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - - virtual void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) = 0; - - virtual void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - - virtual void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - - virtual void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - - virtual void initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - - virtual void initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - - virtual void initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - - virtual void initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - - virtual void initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - - virtual void initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - - virtual void initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - - virtual void initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - - virtual void initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) = 0; - - virtual QColor lanhuHSLToQtHsl(int h, int s, int l, int a = 255); - virtual QColor adjustColor(const QColor c, int hRange = 0, int sRange = 0, int lRange = 0, int aRange = 0); - virtual QColor adjustH(const QColor c, int range); - virtual QColor adjustS(const QColor c, int range); - virtual QColor adjustL(const QColor c, int range); - virtual QColor adjustA(const QColor c, int range); - virtual QColor highlightClick(bool isDark, QPalette p); - virtual QColor highlightHover(bool isDark, QPalette p); - virtual QColor buttonDarkClick(bool isDark, QPalette p); - virtual void normalButtonColor(bool isDark, QPalette p, QPen &defaultPen, QBrush &defaultBrush, QPen &hoverPen, QBrush &hoverBrush, - QPen &clickPen, QBrush &clickBrush, QPen &disablePen, QBrush &disableBrush); - - void initRadius(); - UKUIRadiusInformation::UKUIRadiusStruct radiusProperty(); -private: - int m_spinBoxControlLayout = SpinBoxControlLayout::Vertical; - int m_tabBarIndicatorLayout = TabBarIndicatorLayout::TabBarIndicator_Horizontal; - UKUIRadiusInformation::UKUIRadiusStruct m_radiusStruct; - ReadThemeConfig *m_readCfg = nullptr; - -}; - - -class KClassicalStyleParameters : public UKUIStyleParameters -{ - Q_OBJECT -public: - KClassicalStyleParameters(QObject *parent, bool isDark); - ~KClassicalStyleParameters(){} - - void initPalette(bool isDark) override; - - //pushbutton - void initPushButtonBevelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initPushButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - - //toolbutton - void initToolButtonPanelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initToolButtonLabelParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - - void initLineEditParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initSpinBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget, bool isHorizonLayout = false) override; - void initComboBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initListParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initTreeParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initTableParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initCheckBoxParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initRadioButtonParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initSliderParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initProgressBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initScrollBarParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initToolTipParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initTabWidgetParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; - void initMenuParameters(bool isDark, const QStyleOption *option, const QWidget *widget) override; -}; - -#endif // UKUISTYLEPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/view-helper.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/view-helper.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/view-helper.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/view-helper.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,362 +0,0 @@ -#include "qt5-ukui-style.h" -#include <QListView> -#include <QTreeView> - - -static QSizeF viewItemTextLayout(QTextLayout &textLayout, int lineWidth, int maxHeight = -1, int *lastVisibleLine = nullptr) -{ - if (lastVisibleLine) - *lastVisibleLine = -1; - qreal height = 0; - qreal widthUsed = 0; - textLayout.beginLayout(); - int i = 0; - while (true) { - QTextLine line = textLayout.createLine(); - if (!line.isValid()) - break; - line.setLineWidth(lineWidth); - line.setPosition(QPointF(0, height)); - height += line.height(); - widthUsed = qMax(widthUsed, line.naturalTextWidth()); - // we assume that the height of the next line is the same as the current one - if (maxHeight > 0 && lastVisibleLine && height + line.height() > maxHeight) { - const QTextLine nextLine = textLayout.createLine(); - *lastVisibleLine = nextLine.isValid() ? i : -1; - break; - } - ++i; - } - textLayout.endLayout(); - return QSizeF(widthUsed, height); -} - -QString Qt5UKUIStyle::calculateElidedText(const QString &text, const QTextOption &textOption, - const QFont &font, const QRect &textRect, const Qt::Alignment valign, - Qt::TextElideMode textElideMode, int flags, - bool lastVisibleLineShouldBeElided, QPointF *paintStartPosition) const -{ - QTextLayout textLayout(text, font); - textLayout.setTextOption(textOption); - - // In AlignVCenter mode when more than one line is displayed and the height only allows - // some of the lines it makes no sense to display those. From a users perspective it makes - // more sense to see the start of the text instead something inbetween. - const bool vAlignmentOptimization = paintStartPosition && valign.testFlag(Qt::AlignVCenter); - - int lastVisibleLine = -1; - viewItemTextLayout(textLayout, textRect.width(), vAlignmentOptimization ? textRect.height() : -1, &lastVisibleLine); - - const QRectF boundingRect = textLayout.boundingRect(); - // don't care about LTR/RTL here, only need the height - const QRect layoutRect = QStyle::alignedRect(Qt::LayoutDirectionAuto, valign, - boundingRect.size().toSize(), textRect); - - if (paintStartPosition) - *paintStartPosition = QPointF(textRect.x(), layoutRect.top()); - - QString ret; - qreal height = 0; - const int lineCount = textLayout.lineCount(); - for (int i = 0; i < lineCount; ++i) { - const QTextLine line = textLayout.lineAt(i); - height += line.height(); - - // above visible rect - if (height + layoutRect.top() <= textRect.top()) { - if (paintStartPosition) - paintStartPosition->ry() += line.height(); - continue; - } - - const int start = line.textStart(); - const int length = line.textLength(); - const bool drawElided = line.naturalTextWidth() > textRect.width(); - bool elideLastVisibleLine = lastVisibleLine == i; - if (!drawElided && i + 1 < lineCount && lastVisibleLineShouldBeElided) { - const QTextLine nextLine = textLayout.lineAt(i + 1); - const int nextHeight = height + nextLine.height() / 2; - // elide when less than the next half line is visible - if (nextHeight + layoutRect.top() > textRect.height() + textRect.top()) - elideLastVisibleLine = true; - } - - QString text = textLayout.text().mid(start, length); - if (drawElided || elideLastVisibleLine) { - if (elideLastVisibleLine) { - if (text.endsWith(QChar::LineSeparator)) - text.chop(1); - text += QChar(0x2026); - } - const QStackTextEngine engine(text, font); - ret += engine.elidedText(textElideMode, textRect.width(), flags); - - // no newline for the last line (last visible or real) - // sometimes drawElided is true but no eliding is done so the text ends - // with QChar::LineSeparator - don't add another one. This happened with - // arabic text in the testcase for QTBUG-72805 - if (i < lineCount - 1 && - !ret.endsWith(QChar::LineSeparator)) - ret += QChar::LineSeparator; - } else { - ret += text; - } - - // below visible text, can stop - if ((height + layoutRect.top() >= textRect.bottom()) || - (lastVisibleLine >= 0 && lastVisibleLine == i)) - break; - } - return ret; -} - - - -void Qt5UKUIStyle::viewItemDrawText(QPainter *painter, const QStyleOptionViewItem *option, const QRect &rect) const -{ - const QWidget *widget = option->widget; - const int textMargin = proxy()->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, widget) + 1; - - QRect textRect = rect.adjusted(textMargin, 0, -textMargin, 0); // remove width padding - const bool wrapText = option->features & QStyleOptionViewItem::WrapText; - QTextOption textOption; - textOption.setWrapMode(wrapText ? QTextOption::WordWrap : QTextOption::ManualWrap); - //FIX ME,bug106749::QTablewidget text cannot be aligned, forced changed it wrap mode to wrapanywhere - if(wrapText && (widget->inherits("QTableWidget") || widget->inherits("QTableView"))) - { - textOption.setWrapMode(QTextOption::WrapAnywhere); - } - textOption.setTextDirection(option->direction); - textOption.setAlignment(QStyle::visualAlignment(option->direction, option->displayAlignment)); - - QPointF paintPosition; - const QString newText = calculateElidedText(option->text, textOption, - option->font, textRect, option->displayAlignment, - option->textElideMode, 0, - true, &paintPosition); - - QTextLayout textLayout(newText, option->font); - textLayout.setTextOption(textOption); - viewItemTextLayout(textLayout, textRect.width()); - textLayout.draw(painter, paintPosition); -} - - - -void Qt5UKUIStyle::viewItemLayout(const QStyleOptionViewItem *option, QRect *checkRect, QRect *pixmapRect, QRect *textRect, bool sizehint) const -{ - Q_ASSERT(checkRect && pixmapRect && textRect); - *pixmapRect = QRect(QPoint(0, 0), viewItemSize(option, Qt::DecorationRole)); - *textRect = QRect(QPoint(0, 0), viewItemSize(option, Qt::DisplayRole)); - *checkRect = QRect(QPoint(0, 0), viewItemSize(option, Qt::CheckStateRole)); - - int Margin_Width = 2; - int Margin_Height = 0; - - const QWidget *widget = option->widget; - const bool hasCheck = checkRect->isValid(); - const bool hasPixmap = pixmapRect->isValid(); - const bool hasText = textRect->isValid(); - const bool hasMargin = (hasText | hasPixmap | hasCheck); - const int frameHMargin = hasMargin ? - proxy()->pixelMetric(QStyle::PM_FocusFrameHMargin, option, widget) + 1 : 0; - const int textMargin = hasText ? frameHMargin : 0; - const int pixmapMargin = hasPixmap ? frameHMargin : 0; - const int checkMargin = hasCheck ? frameHMargin : 0; - const int x = option->rect.left() + Margin_Width; - const int y = option->rect.top() + Margin_Height; - int w, h; - - if (textRect->height() == 0 && (!hasPixmap || !sizehint)) { - //if there is no text, we still want to have a decent height for the item sizeHint and the editor size - textRect->setHeight(option->fontMetrics.height()); - } - - QSize pm(0, 0); - if (hasPixmap) { - pm = pixmapRect->size(); - pm.rwidth() += 2 * pixmapMargin; - } - if (sizehint) { - h = qMax(checkRect->height(), qMax(textRect->height(), pm.height())); - if (option->decorationPosition == QStyleOptionViewItem::Left || option->decorationPosition == QStyleOptionViewItem::Right) { - w = textRect->width() + pm.width(); - } else { - w = qMax(textRect->width(), pm.width()); - } - } else { - w = option->rect.width() - Margin_Width * 2; - h = option->rect.height() - Margin_Height * 2; - } - - int cw = 0; - QRect check; - if (hasCheck) { - cw = checkRect->width() + 2 * checkMargin; - if (sizehint) w += cw; - if (option->direction == Qt::RightToLeft) { - check.setRect(x + w - cw, y, cw, h); - } else { - check.setRect(x, y, cw, h); - } - } - - QRect display; - QRect decoration; - switch (option->decorationPosition) { - case QStyleOptionViewItem::Top: - { - h = sizehint ? textRect->height() : h - pm.height() - pixmapMargin; - - if (option->direction == Qt::RightToLeft) { - decoration.setRect(x, y, w - cw, pm.height()); - display.setRect(x, y + pm.height() + pixmapMargin, w - cw, h); - } else { - decoration.setRect(x + cw, y, w - cw, pm.height()); - display.setRect(x + cw, y + pm.height() + pixmapMargin, w - cw, h); - } - break; - } - case QStyleOptionViewItem::Bottom: - { - h = sizehint ? textRect->height() + textMargin + pm.height() : h; - - if (option->direction == Qt::RightToLeft) { - display.setRect(x, y, w - cw, textRect->height()); - decoration.setRect(x, y + textRect->height() + textMargin, w - cw, h - textRect->height() - textMargin); - } else { - display.setRect(x + cw, y, w - cw, textRect->height()); - decoration.setRect(x + cw, y + textRect->height() + textMargin, w - cw, h - textRect->height() - textMargin); - } - break; - } - case QStyleOptionViewItem::Left: - { - if (option->direction == Qt::LeftToRight) { - decoration.setRect(x + cw, y, pm.width(), h); - display.setRect(decoration.right() + 1, y, w - pm.width() - cw, h); - } else { - display.setRect(x, y, w - pm.width() - cw, h); - decoration.setRect(display.right() + 1, y, pm.width(), h); - } - break; - } - case QStyleOptionViewItem::Right: - { - if (option->direction == Qt::LeftToRight) { - display.setRect(x + cw, y, w - pm.width() - cw, h); - decoration.setRect(display.right() + 1, y, pm.width(), h); - } else { - decoration.setRect(x, y, pm.width(), h); - display.setRect(decoration.right() + 1, y, w - pm.width() - cw, h); - } - break; - } - - default: - { - qWarning("doLayout: decoration position is invalid"); - decoration = *pixmapRect; - break; - } - } - - if (!sizehint) { // we only need to do the internal layout if we are going to paint - *checkRect = QStyle::alignedRect(option->direction, Qt::AlignCenter, - checkRect->size(), check); - *pixmapRect = QStyle::alignedRect(option->direction, option->decorationAlignment, - pixmapRect->size(), decoration); - // the text takes up all available space, unless the decoration is not shown as selected - if (option->showDecorationSelected) - *textRect = display; - else - *textRect = QStyle::alignedRect(option->direction, option->displayAlignment, - textRect->size().boundedTo(display.size()), display); - } else { - *checkRect = check; - *pixmapRect = decoration; - *textRect = display; - } -} - - - -QSize Qt5UKUIStyle::viewItemSize(const QStyleOptionViewItem *option, int role) const -{ - const QWidget *widget = option->widget; - switch (role) { - case Qt::CheckStateRole: - { - if (option->features & QStyleOptionViewItem::HasCheckIndicator) - return QSize(proxy()->pixelMetric(QStyle::PM_IndicatorWidth, option, widget), - proxy()->pixelMetric(QStyle::PM_IndicatorHeight, option, widget)); - break; - } - - case Qt::DisplayRole: - { - if (option->features & QStyleOptionViewItem::HasDisplay) { - QTextOption textOption; - textOption.setWrapMode(QTextOption::WordWrap); - QTextLayout textLayout(option->text, option->font); - textLayout.setTextOption(textOption); - const bool wrapText = option->features & QStyleOptionViewItem::WrapText; - const int textMargin = proxy()->pixelMetric(QStyle::PM_FocusFrameHMargin, option, widget) + 1; - QRect bounds = option->rect; - switch (option->decorationPosition) { - case QStyleOptionViewItem::Left: - case QStyleOptionViewItem::Right: { - if (wrapText && bounds.isValid()) { - int width = bounds.width() - 2 * textMargin; - if (option->features & QStyleOptionViewItem::HasDecoration) - width -= option->decorationSize.width() + 2 * textMargin; - bounds.setWidth(width); - } else - bounds.setWidth(QFIXED_MAX); - break; - } - case QStyleOptionViewItem::Top: - case QStyleOptionViewItem::Bottom: - if (wrapText) - bounds.setWidth(bounds.isValid() ? bounds.width() - 2 * textMargin : option->decorationSize.width()); - else - bounds.setWidth(QFIXED_MAX); - break; - default: - break; - } - - if (wrapText && option->features & QStyleOptionViewItem::HasCheckIndicator) - bounds.setWidth(bounds.width() - proxy()->pixelMetric(QStyle::PM_IndicatorWidth) - 2 * textMargin); - - const int lineWidth = bounds.width(); - const QSizeF size = viewItemTextLayout(textLayout, lineWidth); - return QSize(qCeil(size.width()) + 2 * textMargin, qCeil(size.height())); - } - break; - } - - case Qt::DecorationRole: - { - if (option->features & QStyleOptionViewItem::HasDecoration) { - if(widget){ - if(qobject_cast<const QListView *>(widget)){ - QSize size = qobject_cast<const QListView *>(widget)->iconSize(); - return QSize(qMax(option->decorationSize.width(), size.width()), - qMax(option->decorationSize.height(), size.height())); - } - if(qobject_cast<const QTreeView *>(widget)){ - QSize size = qobject_cast<const QTreeView *>(widget)->iconSize(); - return QSize(qMax(option->decorationSize.width(), size.width()), - qMax(option->decorationSize.height(), size.height())); - } - } - return option->decorationSize; - } - break; - } - default: - break; - } - return QSize(0, 0); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,54 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#include "checkbox-parameters.h" - -CheckBoxParameters::CheckBoxParameters() -{ - radius = 0; - - checkBoxDefaultBrush = QBrush(Qt::NoBrush); - checkBoxHoverBrush = QBrush(Qt::NoBrush); - checkBoxClickBrush = QBrush(Qt::NoBrush); - checkBoxDisableBrush = QBrush(Qt::NoBrush); - checkBoxOnDefaultBrush = QBrush(Qt::NoBrush); - checkBoxOnHoverBrush = QBrush(Qt::NoBrush); - checkBoxOnClickBrush = QBrush(Qt::NoBrush); - checkBoxPathBrush = QBrush(Qt::NoBrush); - checkBoxPathDisableBrush = QBrush(Qt::NoBrush); - - checkBoxDefaultPen = QPen(Qt::NoPen); - checkBoxHoverPen = QPen(Qt::NoPen); - checkBoxClickPen = QPen(Qt::NoPen); - checkBoxDisablePen = QPen(Qt::NoPen); - checkBoxOnDefaultPen = QPen(Qt::NoPen); - checkBoxOnHoverPen = QPen(Qt::NoPen); - checkBoxOnClickPen = QPen(Qt::NoPen); - checkBoxDefaultPen.setWidth(0); - checkBoxHoverPen.setWidth(0); - checkBoxClickPen.setWidth(0); - checkBoxDisablePen.setWidth(0); - checkBoxOnDefaultPen.setWidth(0); - checkBoxOnHoverPen.setWidth(0); - checkBoxOnClickPen.setWidth(0); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/checkbox-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,60 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#ifndef CHECKBOXPARAMETERS_H -#define CHECKBOXPARAMETERS_H - -#include <QBrush> -#include <QPen> - -class CheckBoxParameters -{ -public: - CheckBoxParameters(); - ~CheckBoxParameters(){} -//private: - int radius; - - QBrush checkBoxDefaultBrush; - QBrush checkBoxHoverBrush; - QBrush checkBoxClickBrush; - QBrush checkBoxDisableBrush; - QBrush checkBoxOnDefaultBrush; - QBrush checkBoxOnHoverBrush; - QBrush checkBoxOnClickBrush; - QBrush checkBoxPathBrush; - QBrush checkBoxPathDisableBrush; - - QPen checkBoxDefaultPen; - QPen checkBoxHoverPen; - QPen checkBoxClickPen; - QPen checkBoxDisablePen; - QPen checkBoxOnDefaultPen; - QPen checkBoxOnHoverPen; - QPen checkBoxOnClickPen; - QPen checkBoxContentPen; - bool animation = true; - bool onHoverBrushIslinearGradient = false; -}; - -#endif // CHECKBOXPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,22 +0,0 @@ -#include "combobox-parameters.h" - -ComboBoxParameters::ComboBoxParameters() -{ - radius = 0; - comboBoxDefaultBrush = QBrush(Qt::NoBrush); - comboBoxHoverBrush = QBrush(Qt::NoBrush); - comboBoxOnBrush = QBrush(Qt::NoBrush); - comboBoxEditBrush = QBrush(Qt::NoBrush); - comboBoxDisableBrush = QBrush(Qt::NoBrush); - - comboBoxDefaultPen = QPen(Qt::NoPen); - comboBoxHoverPen = QPen(Qt::NoPen); - comboBoxOnPen = QPen(Qt::NoPen); - comboBoxEditPen = QPen(Qt::NoPen); - comboBoxDisablePen = QPen(Qt::NoPen); - comboBoxDefaultPen.setWidth(0); - comboBoxHoverPen.setWidth(0); - comboBoxOnPen.setWidth(0); - comboBoxEditPen.setWidth(0); - comboBoxDisablePen.setWidth(0); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/combobox-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,51 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - -#ifndef COMBOBOXPARAMETERS_H -#define COMBOBOXPARAMETERS_H - -#include <QBrush> -#include <QPen> - -class ComboBoxParameters -{ -public: - ComboBoxParameters(); - ~ComboBoxParameters(){} - - -//private: - int radius; - QBrush comboBoxDefaultBrush; - QBrush comboBoxHoverBrush; - QBrush comboBoxOnBrush; - QBrush comboBoxEditBrush; - QBrush comboBoxDisableBrush; - - QPen comboBoxDefaultPen; - QPen comboBoxHoverPen; - QPen comboBoxOnPen; - QPen comboBoxEditPen; - QPen comboBoxDisablePen; -}; - -#endif // COMBOBOXPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,42 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - -#include "lineedit-parameters.h" - -LineEditParameters::LineEditParameters() -{ - radius = 0; - - lineEditDefaultBrush = QBrush(Qt::NoBrush); - lineEditHoverBrush = QBrush(Qt::NoBrush); - lineEditFocusBrush = QBrush(Qt::NoBrush); - lineEditDisableBrush = QBrush(Qt::NoBrush); - - lineEditDefaultPen = QPen(Qt::NoPen); - lineEditHoverPen = QPen(Qt::NoPen); - lineEditFocusPen = QPen(Qt::NoPen); - lineEditDisablePen = QPen(Qt::NoPen); - lineEditDefaultPen.setWidth(0); - lineEditHoverPen.setWidth(0); - lineEditFocusPen.setWidth(0); - lineEditDisablePen.setWidth(0); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/lineedit-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,51 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#ifndef LINEEDITPARAMETERS_H -#define LINEEDITPARAMETERS_H - - -#include <QBrush> -#include <QPen> - -class LineEditParameters -{ -public: - LineEditParameters(); - ~LineEditParameters(){} - -//private: - int radius; - - QBrush lineEditDefaultBrush; - QBrush lineEditHoverBrush; - QBrush lineEditFocusBrush; - QBrush lineEditDisableBrush; - - QPen lineEditDefaultPen; - QPen lineEditHoverPen; - QPen lineEditFocusPen; - QPen lineEditDisablePen; -}; - -#endif // LINEEDITPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,36 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - -#include "list-parameters.h" - -ListParameters::ListParameters() -{ - listDefaultBrush = QBrush(Qt::NoBrush); - listHoverBrush = QBrush(Qt::NoBrush); - listSelectBrush = QBrush(Qt::NoBrush); - listDisableBrush = QBrush(Qt::NoBrush); - listTextHoverPen = QPen(Qt::NoPen); - listTextSelectPen = QPen(Qt::NoPen); - listHoverPen = QPen(Qt::NoPen); - listSelectPen = QPen(Qt::NoPen); - -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/list-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,50 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#ifndef LISTPARAMETERS_H -#define LISTPARAMETERS_H - -#include <QBrush> -#include <QPen> - -class ListParameters -{ -public: - ListParameters(); - ~ListParameters(){} - -//private: - int radius; - - QBrush listDefaultBrush; - QBrush listHoverBrush; - QBrush listSelectBrush; - QBrush listDisableBrush; - QPen listTextHoverPen; - QPen listTextSelectPen; - QPen listHoverPen; - QPen listSelectPen; - -}; - -#endif // LISTPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,32 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#include "menu-parameters.h" - -MenuParameters::MenuParameters() -{ - menuItemSelectBrush = QBrush(Qt::NoBrush); - - menuTextHoverPen = QPen(Qt::NoPen); - -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/menu-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,47 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#ifndef MENUPARAMETERS_H -#define MENUPARAMETERS_H - -#include <QPixmap> -#include <QBrush> -#include <QPen> - -class MenuParameters -{ -public: - MenuParameters(); - ~MenuParameters(){} - - int frameRadius; - int itemRadius; - - QBrush menuItemSelectBrush; - - QPixmap menuFramePixmap; - - QPen menuTextHoverPen; -}; - -#endif // MENUPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,40 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#include "progressbar-parameters.h" - -ProgressBarParameters::ProgressBarParameters() -{ - radius = 0; - - progressBarContentBrush = QBrush(Qt::NoBrush); - progressBarGrooveDefaultBrush = QBrush(Qt::NoBrush); - progressBarGrooveDisableBrush = QBrush(Qt::NoBrush); - - progressBarContentPen = QPen(Qt::NoPen); - progressBarGrooveDefaultPen = QPen(Qt::NoPen); - progressBarGrooveDisablePen = QPen(Qt::NoPen); - progressBarContentPen.setWidth(0); - progressBarGrooveDefaultPen.setWidth(0); - progressBarGrooveDisablePen.setWidth(0); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/progressbar-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,50 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#ifndef PROGRESSBARPARAMETERS_H -#define PROGRESSBARPARAMETERS_H - -#include <QBrush> -#include <QPen> - -class ProgressBarParameters -{ -public: - ProgressBarParameters(); - ~ProgressBarParameters(){} - -//private: - int radius; - - QBrush progressBarContentBrush; - QBrush progressBarGrooveDefaultBrush; - QBrush progressBarGrooveDisableBrush; - QColor progressBarContentMidLightColor; - QColor progressBarContentHightColor; - - QPen progressBarContentPen; - QPen progressBarGrooveDefaultPen; - QPen progressBarGrooveDisablePen; -}; - -#endif // PROGRESSBARPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,59 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <xibowen@kylinos.cn> - * - */ - -#include "pushbutton-parameters.h" - -PushButtonParameters::PushButtonParameters() -{ - radius = 0; - - iconHoverClickHighlight = false; - textHoverClickHighlight = false; - - pushButtonDefaultBrush = QBrush(Qt::NoBrush); - pushButtonHoverBrush = QBrush(Qt::NoBrush); - pushButtonClickBrush = QBrush(Qt::NoBrush); - pushButtonDisableBrush = QBrush(Qt::NoBrush); - pushButtonCheckBrush = QBrush(Qt::NoBrush); - pushButtonCheckHoverBrush = QBrush(Qt::NoBrush); - pushButtonCheckClickBrush = QBrush(Qt::NoBrush); - pushButtonCheckDisableBrush = QBrush(Qt::NoBrush); - - pushButtonDefaultPen = QPen(Qt::NoPen); - pushButtonHoverPen = QPen(Qt::NoPen); - pushButtonClickPen = QPen(Qt::NoPen); - pushButtonDisablePen = QPen(Qt::NoPen); - pushButtonCheckPen = QPen(Qt::NoPen); - pushButtonCheckHoverPen = QPen(Qt::NoPen); - pushButtonCheckClickPen = QPen(Qt::NoPen); - pushButtonCheckDisablePen = QPen(Qt::NoPen); - pushButtonFocusPen = QPen(Qt::NoPen); - pushButtonDefaultPen.setWidth(0); - pushButtonHoverPen.setWidth(0); - pushButtonClickPen.setWidth(0); - pushButtonDisablePen.setWidth(0); - pushButtonCheckPen.setWidth(0); - pushButtonCheckHoverPen.setWidth(0); - pushButtonCheckClickPen.setWidth(0); - pushButtonCheckDisablePen.setWidth(0); - pushButtonFocusPen.setWidth(0); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/pushbutton-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,72 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - - -#ifndef PUSHBUTTONPARAMETERS_H -#define PUSHBUTTONPARAMETERS_H - -#include <QBrush> -#include <QPen> - -class PushButtonParameters -{ -public: - PushButtonParameters(); - ~PushButtonParameters(){} - -//private: - int radius; - - bool iconHoverClickHighlight; - bool textHoverClickHighlight; - - QBrush pushButtonDefaultBrush; - QBrush pushButtonHoverBrush; - QBrush pushButtonClickBrush; - QBrush pushButtonDisableBrush; - QBrush pushButtonCheckBrush; - QBrush pushButtonCheckHoverBrush; - QBrush pushButtonCheckClickBrush; - QBrush pushButtonCheckDisableBrush; - - QPen pushButtonDefaultPen; - QPen pushButtonHoverPen; - QPen pushButtonClickPen; - QPen pushButtonDisablePen; - QPen pushButtonCheckPen; - QPen pushButtonCheckHoverPen; - QPen pushButtonCheckClickPen; - QPen pushButtonCheckDisablePen; - QPen pushButtonFocusPen; - - -// QColor PushButtonInactiveColor; - -// QColor PushButtonTextDefaultColor; -// QColor PushButtonTextHoverColor; -// QColor PushButtonTextClickColor; -// QColor PushButtonTextInactiveColor; -// QColor PushButtonTextDisableColor; -}; - -#endif // PUSHBUTTONPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,28 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - -#include "radiobutton-parameters.h" - -RadioButtonParameters::RadioButtonParameters() -{ - -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/radiobutton-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,61 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - -#ifndef RADIOBUTTONPARAMETERS_H -#define RADIOBUTTONPARAMETERS_H - -#include <QBrush> -#include <QPen> - -class RadioButtonParameters -{ -public: - RadioButtonParameters(); - ~RadioButtonParameters(){} - -//private: - int radius; - int childrenRadius; - - QBrush radioButtonDefaultBrush; - QBrush radioButtonHoverBrush; - QBrush radioButtonClickBrush; - QBrush radioButtonDisableBrush; - QBrush radioButtonOnDefaultBrush; - QBrush radioButtonOnHoverBrush; - QBrush radioButtonOnClickBrush; - QBrush radioButtonChildrenOnDefaultBrush; - QBrush radioButtonChildrenOnHoverBrush; - QBrush radioButtonChildrenOnClickBrush; - QBrush radioButtonChildrenOnDisableBrush; - - QPen radioButtonDefaultPen; - QPen radioButtonHoverPen; - QPen radioButtonClickPen; - QPen radioButtonDisablePen; - QPen radioButtonOnDefaultPen; - QPen radioButtonOnHoverPen; - QPen radioButtonOnClickPen; - bool animation = true; -}; - -#endif // RADIOBUTTONPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,29 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#include "scrollbar-parameters.h" - -ScrollBarParameters::ScrollBarParameters() -{ - animation = true; -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/scrollbar-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,49 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#ifndef SCROLLBARPARAMETERS_H -#define SCROLLBARPARAMETERS_H - -#include <QBrush> - -class ScrollBarParameters -{ -public: - ScrollBarParameters(); - ~ScrollBarParameters(){} - -//private: - int radius; - bool grooveWidthAnimation = true; - QBrush scrollBarGrooveDefaultBrush; - QBrush scrollBarGrooveInactiveBrush; - - QBrush scrollBarSliderDefaultBrush; - QBrush scrollBarSliderHoverBrush; - QBrush scrollBarSliderClickBrush; - QBrush scrollBarSliderDisableBrush; - bool animation = true; - -}; - -#endif // SCROLLBARPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,49 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#include "slider-parameters.h" - - -SliderParameters::SliderParameters() -{ - - sliderHandleDefaultPen = QPen(Qt::NoPen); - sliderHandleHoverPen = QPen(Qt::NoPen);; - sliderHandleClickPen = QPen(Qt::NoPen);; - sliderHandleDisablePen = QPen(Qt::NoPen);; - - sliderHandleDefaultBrush = QBrush(Qt::NoBrush); - sliderHandleHoverBrush = QBrush(Qt::NoBrush); - sliderHandleClickBrush = QBrush(Qt::NoBrush); - sliderHandleDisableBrush = QBrush(Qt::NoBrush); - - sliderGrooveValueDefaultBrush = QBrush(Qt::NoBrush); - sliderGrooveValueHoverBrush = QBrush(Qt::NoBrush); - sliderGrooveValueDisableBrush = QBrush(Qt::NoBrush); - - sliderGrooveUnvalueDefaultBrush = QBrush(Qt::NoBrush); - sliderGrooveUnvalueHoverBrush = QBrush(Qt::NoBrush); - sliderGrooveUnvalueDisableBrush = QBrush(Qt::NoBrush); - - animation = true; -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/slider-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,64 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#ifndef SLIDERPARAMETERS_H -#define SLIDERPARAMETERS_H - -#include <QBrush> -#include <QPainterPath> -#include <QPen> - -class SliderParameters -{ -public: - SliderParameters(); - ~SliderParameters(){} - -//private: -// int radius; - QBrush sliderHandleDefaultBrush; - QBrush sliderHandleHoverBrush; - QBrush sliderHandleClickBrush; - QBrush sliderHandleDisableBrush; - - QBrush sliderGrooveValueDefaultBrush; - QBrush sliderGrooveValueHoverBrush; - QBrush sliderGrooveValueDisableBrush; - - QBrush sliderGrooveUnvalueDefaultBrush; - QBrush sliderGrooveUnvalueHoverBrush; - QBrush sliderGrooveUnvalueDisableBrush; - - QPen sliderHandleDefaultPen = Qt::NoPen; - QPen sliderHandleHoverPen = Qt::NoPen; - QPen sliderHandleClickPen = Qt::NoPen; - QPen sliderHandleDisablePen = Qt::NoPen; - QPen sliderGroovePen = Qt::NoPen; - QPainterPath sliderHandlePath; - - bool animation = true; - - int sliderGrooveRadius = 2; -}; - -#endif // SLIDERPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,76 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#include "spinbox-parameters.h" - -SpinBoxParameters::SpinBoxParameters() -{ - radius = 0; - - spinBoxDefaultBrush = QBrush(Qt::NoBrush); - spinBoxHoverBrush = QBrush(Qt::NoBrush); - spinBoxFocusBrush = QBrush(Qt::NoBrush); - spinBoxDisableBrush = QBrush(Qt::NoBrush); - spinBoxDefaultPen = QPen(Qt::NoPen); - spinBoxHoverPen = QPen(Qt::NoPen); - spinBoxFocusPen = QPen(Qt::NoPen); - spinBoxDisablePen = QPen(Qt::NoPen); - spinBoxDefaultPen.setWidth(0); - spinBoxHoverPen.setWidth(0); - spinBoxFocusPen.setWidth(0); - spinBoxDisablePen.setWidth(0); - - //up button - spinBoxUpDefaultBrush = QBrush(Qt::NoBrush); - spinBoxUpHoverBrush = QBrush(Qt::NoBrush); - spinBoxUpFocusHoverBrush = QBrush(Qt::NoBrush); - spinBoxUpClickBrush = QBrush(Qt::NoBrush); - spinBoxUpDisableBrush = QBrush(Qt::NoBrush); - spinBoxUpDefaultPen = QPen(Qt::NoPen); - spinBoxUpHoverPen = QPen(Qt::NoPen); - spinBoxUpFocusHoverPen = QPen(Qt::NoPen); - spinBoxUpClickPen = QPen(Qt::NoPen); - spinBoxUpDisablePen = QPen(Qt::NoPen); - spinBoxUpDefaultPen.setWidth(0); - spinBoxUpHoverPen.setWidth(0); - spinBoxUpFocusHoverPen.setWidth(0); - spinBoxUpClickPen.setWidth(0); - spinBoxUpDisablePen.setWidth(0); - - //down button - spinBoxDownDefaultBrush = QBrush(Qt::NoBrush); - spinBoxDownHoverBrush = QBrush(Qt::NoBrush); - spinBoxDownFocusHoverBrush = QBrush(Qt::NoBrush); - spinBoxDownClickBrush = QBrush(Qt::NoBrush); - spinBoxDownDisableBrush = QBrush(Qt::NoBrush); - spinBoxDownDefaultPen = QPen(Qt::NoPen); - spinBoxDownHoverPen = QPen(Qt::NoPen); - spinBoxDownFocusHoverPen = QPen(Qt::NoPen); - spinBoxDownClickPen = QPen(Qt::NoPen); - spinBoxDownDisablePen = QPen(Qt::NoPen); - spinBoxDownDefaultPen.setWidth(0); - spinBoxDownHoverPen.setWidth(0); - spinBoxDownFocusHoverPen.setWidth(0); - spinBoxDownClickPen.setWidth(0); - spinBoxDownDisablePen.setWidth(0); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/spinbox-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,77 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#ifndef SPINBOXPARAMETERS_H -#define SPINBOXPARAMETERS_H - -#include <QBrush> -#include <QPen> - - -class SpinBoxParameters -{ -public: - SpinBoxParameters(); - ~SpinBoxParameters(){} - -//private: - int radius; - - QBrush spinBoxDefaultBrush; - QBrush spinBoxHoverBrush; - QBrush spinBoxFocusBrush; - QBrush spinBoxDisableBrush; - QPen spinBoxDefaultPen; - QPen spinBoxHoverPen; - QPen spinBoxFocusPen; - QPen spinBoxDisablePen; - - //up button - QBrush spinBoxUpDefaultBrush; - QBrush spinBoxUpHoverBrush; - QBrush spinBoxUpFocusHoverBrush; - QBrush spinBoxUpClickBrush; - QBrush spinBoxUpDisableBrush; - QPen spinBoxUpDefaultPen; - QPen spinBoxUpHoverPen; - QPen spinBoxUpFocusHoverPen; - QPen spinBoxUpClickPen; - QPen spinBoxUpDisablePen; - - //down button - QBrush spinBoxDownDefaultBrush; - QBrush spinBoxDownHoverBrush; - QBrush spinBoxDownFocusHoverBrush; - QBrush spinBoxDownClickBrush; - QBrush spinBoxDownDisableBrush; - QPen spinBoxDownDefaultPen; - QPen spinBoxDownHoverPen; - QPen spinBoxDownFocusHoverPen; - QPen spinBoxDownClickPen; - QPen spinBoxDownDisablePen; - - bool spinBoxUpIconHightPixMap = true; - bool spinBoxDownIconHightPixMap = true; -}; - -#endif // SPINBOXPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,36 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - -#include "table-parameters.h" - -TableParameters::TableParameters() -{ - tableTextHoverPen = QPen(Qt::NoPen); - tableTextSelectPen = QPen(Qt::NoPen); - tableDefaultBrush = QBrush(Qt::NoBrush); - tableHoverBrush = QBrush(Qt::NoBrush); - tableSelectBrush = QBrush(Qt::NoBrush); - tableDisableBrush = QBrush(Qt::NoBrush); - tableHoverPen = QPen(Qt::NoPen); - tableSelectPen = QPen(Qt::NoPen); - -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/table-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,49 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - -#ifndef TABLEPARAMETERS_H -#define TABLEPARAMETERS_H - -#include <QBrush> -#include <QPen> - - -class TableParameters -{ -public: - TableParameters(); - ~TableParameters(){} - -//private: - int radius; - - QBrush tableDefaultBrush; - QBrush tableHoverBrush; - QBrush tableSelectBrush; - QBrush tableDisableBrush; - QPen tableHoverPen; - QPen tableSelectPen; - QPen tableTextHoverPen; - QPen tableTextSelectPen; -}; - -#endif // TABLEPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,29 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <xibowen@kylinos.cn> - * - */ - - -#include "tabwidget-parameters.h" - -TabWidgetParameters::TabWidgetParameters() -{ - -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/tabwidget-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,49 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <xibowen@kylinos.cn> - * - */ - - -#ifndef TABWIDGETPARAMETERS_H -#define TABWIDGETPARAMETERS_H - -#include <QBrush> -#include <QPen> - -class TabWidgetParameters -{ -public: - TabWidgetParameters(); - ~TabWidgetParameters(){} - -//private: - int radius; - - QBrush tabWidgetBackgroundBrush; - QBrush tabBarBackgroundBrush; - QBrush tabBarDefaultBrush; - QBrush tabBarHoverBrush; - QBrush tabBarClickBrush; - QBrush tabBarSelectBrush; - QPen tabBarPen = Qt::NoPen; - -}; - -#endif // TABWIDGETPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,59 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <xibowen@kylinos.cn> - * - */ - -#include "toolbutton-parameters.h" - -ToolButtonParameters::ToolButtonParameters() -{ - radius = 0; - - iconHoverClickHighlight = false; - textHoverClickHighlight = false; - - toolButtonDefaultBrush = QBrush(Qt::NoBrush); - toolButtonHoverBrush = QBrush(Qt::NoBrush); - toolButtonClickBrush = QBrush(Qt::NoBrush); - toolButtonDisableBrush = QBrush(Qt::NoBrush); - toolButtonCheckBrush = QBrush(Qt::NoBrush); - toolButtonCheckHoverBrush = QBrush(Qt::NoBrush); - toolButtonCheckClickBrush = QBrush(Qt::NoBrush); - toolButtonCheckDisableBrush = QBrush(Qt::NoBrush); - - toolButtonDefaultPen = QPen(Qt::NoPen); - toolButtonHoverPen = QPen(Qt::NoPen); - toolButtonClickPen = QPen(Qt::NoPen); - toolButtonDisablePen = QPen(Qt::NoPen); - toolButtonCheckPen = QPen(Qt::NoPen); - toolButtonCheckHoverPen = QPen(Qt::NoPen); - toolButtonCheckClickPen = QPen(Qt::NoPen); - toolButtonCheckDisablePen = QPen(Qt::NoPen); - toolButtonFocusPen = QPen(Qt::NoPen); - toolButtonDefaultPen.setWidth(0); - toolButtonHoverPen.setWidth(0); - toolButtonClickPen.setWidth(0); - toolButtonDisablePen.setWidth(0); - toolButtonCheckPen.setWidth(0); - toolButtonCheckHoverPen.setWidth(0); - toolButtonCheckClickPen.setWidth(0); - toolButtonCheckDisablePen.setWidth(0); - toolButtonFocusPen.setWidth(0); -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/toolbutton-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,61 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#ifndef TOOLBUTTONPARAMETERS_H -#define TOOLBUTTONPARAMETERS_H - -#include <QBrush> -#include <QPen> - -class ToolButtonParameters -{ -public: - ToolButtonParameters(); - ~ToolButtonParameters(){} -//private: - int radius; - - bool iconHoverClickHighlight; - bool textHoverClickHighlight; - - QBrush toolButtonDefaultBrush; - QBrush toolButtonHoverBrush; - QBrush toolButtonClickBrush; - QBrush toolButtonDisableBrush; - QBrush toolButtonCheckBrush; - QBrush toolButtonCheckHoverBrush; - QBrush toolButtonCheckClickBrush; - QBrush toolButtonCheckDisableBrush; - - QPen toolButtonDefaultPen; - QPen toolButtonHoverPen; - QPen toolButtonClickPen; - QPen toolButtonDisablePen; - QPen toolButtonCheckPen; - QPen toolButtonCheckHoverPen; - QPen toolButtonCheckClickPen; - QPen toolButtonCheckDisablePen; - QPen toolButtonFocusPen; -}; - -#endif // TOOLBUTTONPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,29 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#include "tooltip-parameters.h" - -ToolTipParameters::ToolTipParameters() -{ - -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/tooltip-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,41 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - - -#ifndef TOOLTIPPARAMETERS_H -#define TOOLTIPPARAMETERS_H - -#include <QBrush> - -class ToolTipParameters -{ -public: - ToolTipParameters(); - ~ToolTipParameters(){} - -//private: - int radius; - - QBrush toolTipBackgroundBrush; -}; - -#endif // TOOLTIPPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.cpp 1970-01-01 08:00:00.000000000 +0800 @@ -1,41 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - -#include "tree-parameters.h" - -TreeParameters::TreeParameters() -{ - treeTextHoverPen = QPen(Qt::NoPen); - treeTextSelectPen = QPen(Qt::NoPen); - treeDefaultBrush = QBrush(Qt::NoBrush); - treeHoverBrush = QBrush(Qt::NoBrush); - treeSelectBrush = QBrush(Qt::NoBrush); - treeDisableBrush = QBrush(Qt::NoBrush); - treeHoverPen = QPen(Qt::NoPen); - treeSelectPen = QPen(Qt::NoPen); - - treeBranchDefaultBrush = QBrush(Qt::NoBrush); - treeBranchHoverBrush = QBrush(Qt::NoBrush); - treeBranchSelectBrush = QBrush(Qt::NoBrush); - treeBranchDisableBrush = QBrush(Qt::NoBrush); - -} diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/tree-parameters.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,57 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Xibowen <lanyue@kylinos.cn> - * - */ - -#ifndef TREEPARAMETERS_H -#define TREEPARAMETERS_H - -#include <QBrush> -#include <QPen> - -class TreeParameters -{ -public: - TreeParameters(); - ~TreeParameters(){} - -//private: - int radius; - - QBrush treeDefaultBrush; - QBrush treeHoverBrush; - QBrush treeSelectBrush; - QBrush treeDisableBrush; - QPen treeHoverPen; - QPen treeSelectPen; - - QBrush treeBranchDefaultBrush; - QBrush treeBranchHoverBrush; - QBrush treeBranchSelectBrush; - QBrush treeBranchDisableBrush; - QPen treeTextHoverPen; - QPen treeTextSelectPen; - - bool indicatorIconHoverNeedHighLight = true; - bool animation = true; - -}; - -#endif // TREEPARAMETERS_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/widget-parameters.pri qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/widget-parameters.pri --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/qt5-style-ukui/widget-parameters/widget-parameters.pri 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/qt5-style-ukui/widget-parameters/widget-parameters.pri 1970-01-01 08:00:00.000000000 +0800 @@ -1,39 +0,0 @@ -INCLUDEPATH += $$PWD - -HEADERS += \ - $$PWD/checkbox-parameters.h \ - $$PWD/combobox-parameters.h \ - $$PWD/lineedit-parameters.h \ - $$PWD/list-parameters.h \ - $$PWD/menu-parameters.h \ - $$PWD/progressbar-parameters.h \ - $$PWD/pushbutton-parameters.h \ - $$PWD/radiobutton-parameters.h \ - $$PWD/scrollbar-parameters.h \ - $$PWD/slider-parameters.h \ - $$PWD/spinbox-parameters.h \ - $$PWD/table-parameters.h \ - $$PWD/tabwidget-parameters.h \ - $$PWD/toolbutton-parameters.h \ - $$PWD/tooltip-parameters.h \ - $$PWD/tree-parameters.h - -SOURCES += \ - $$PWD/checkbox-parameters.cpp \ - $$PWD/combobox-parameters.cpp \ - $$PWD/lineedit-parameters.cpp \ - $$PWD/list-parameters.cpp \ - $$PWD/menu-parameters.cpp \ - $$PWD/progressbar-parameters.cpp \ - $$PWD/pushbutton-parameters.cpp \ - $$PWD/radiobutton-parameters.cpp \ - $$PWD/scrollbar-parameters.cpp \ - $$PWD/slider-parameters.cpp \ - $$PWD/spinbox-parameters.cpp \ - $$PWD/table-parameters.cpp \ - $$PWD/tabwidget-parameters.cpp \ - $$PWD/toolbutton-parameters.cpp \ - $$PWD/tooltip-parameters.cpp \ - $$PWD/tree-parameters.cpp - - diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/readconfig.cpp qt5-ukui-platformtheme-4.10.0.1/ukui-styles/readconfig.cpp --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/readconfig.cpp 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/readconfig.cpp 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: Jing Tan <tanjing@kylinos.cn> * */ @@ -26,1172 +26,1609 @@ #include <QString> #include <QStringList> #include <QStandardPaths> +#include <QGSettings> #include <QMetaEnum> +#include <QCoreApplication> +#include <QBrush> +#include <QPainter> +#include "platformthemedebug.h" + +#define ThemeConfigPath "/usr/share/config/globaltheme/token/" +#define DefaultConfigName "kdefault-light.css" + +using namespace UKUIGlobalDTConfig; + +GlobalDTConfigPrivate::GlobalDTConfigPrivate() +{ + { + windowTextActive = QBrush(Qt::NoBrush); + windowTextInactive = QBrush(Qt::NoBrush); + windowTextDisable = QBrush(Qt::NoBrush); + buttonActive = QBrush(Qt::NoBrush); + buttonInactive = QBrush(Qt::NoBrush); + buttonDisable = QBrush(Qt::NoBrush); + lightActive = QBrush(Qt::NoBrush); + lightInactive = QBrush(Qt::NoBrush); + lightDisable = QBrush(Qt::NoBrush); + midlightActive = QBrush(Qt::NoBrush); + midlightInactive = QBrush(Qt::NoBrush); + midlightDisable = QBrush(Qt::NoBrush); + darkActive = QBrush(Qt::NoBrush); + darkInactive = QBrush(Qt::NoBrush); + darkDisable = QBrush(Qt::NoBrush); + midActive = QBrush(Qt::NoBrush); + midInactive = QBrush(Qt::NoBrush); + midDisable = QBrush(Qt::NoBrush); + textActive = QBrush(Qt::NoBrush); + textInactive = QBrush(Qt::NoBrush); + textDisable = QBrush(Qt::NoBrush); + brightTextActive = QBrush(Qt::NoBrush); + brightTextInactive = QBrush(Qt::NoBrush); + brightTextDisable = QBrush(Qt::NoBrush); + buttonTextActive = QBrush(Qt::NoBrush); + buttonTextInactive = QBrush(Qt::NoBrush); + buttonTextDisable = QBrush(Qt::NoBrush); + baseActive = QBrush(Qt::NoBrush); + baseInactive = QBrush(Qt::NoBrush); + baseDisable = QBrush(Qt::NoBrush); + windowActive = QBrush(Qt::NoBrush); + windowInactive = QBrush(Qt::NoBrush); + windowDisable = QBrush(Qt::NoBrush); + shadowActive = QBrush(Qt::NoBrush); + shadowInactive = QBrush(Qt::NoBrush); + shadowDisable = QBrush(Qt::NoBrush); + highLightActive = QBrush(Qt::NoBrush); + highLightInactive = QBrush(Qt::NoBrush); + highLightDisable = QBrush(Qt::NoBrush); + highLightedTextActive = QBrush(Qt::NoBrush); + highLightedTextInactive = QBrush(Qt::NoBrush); + highLightedTextDisable = QBrush(Qt::NoBrush); + linkActive = QBrush(Qt::NoBrush); + linkInactive = QBrush(Qt::NoBrush); + linkDisable = QBrush(Qt::NoBrush); + linkVisitedActive = QBrush(Qt::NoBrush); + linkVisitedInactive = QBrush(Qt::NoBrush); + linkVisitedDisable = QBrush(Qt::NoBrush); + alternateBaseActive = QBrush(Qt::NoBrush); + alternateBaseInactive = QBrush(Qt::NoBrush); + alternateBaseDisable = QBrush(Qt::NoBrush); + noRoleActive = QBrush(Qt::NoBrush); + noRoleInactive = QBrush(Qt::NoBrush); + noRoleDisable = QBrush(Qt::NoBrush); + toolTipBaseActive = QBrush(Qt::NoBrush); + toolTipBaseInactive = QBrush(Qt::NoBrush); + toolTipBaseDisable = QBrush(Qt::NoBrush); + toolTipTextActive = QBrush(Qt::NoBrush); + toolTipTextInactive = QBrush(Qt::NoBrush); + toolTipTextDisable = QBrush(Qt::NoBrush); + placeholderTextActive = QBrush(Qt::NoBrush); + placeholderTextInactive = QBrush(Qt::NoBrush); + placeholderTextDisable = QBrush(Qt::NoBrush); + + kComponentNormal = QBrush(Qt::NoBrush); + kLineBrandDisable = QBrush(Qt::NoBrush); + kFontWhiteSecondary = QBrush(Qt::NoBrush); + kGray12 = QBrush(Qt::NoBrush); + kContainSecondaryAlpphaNormal = QBrush(Qt::NoBrush); + kGray16 = QBrush(Qt::NoBrush); + kBrand1 = QBrush(Qt::NoBrush); + kLineComponentNormal = QBrush(Qt::NoBrush); + kLineBrandClick = QBrush(Qt::NoBrush); + kGray3 = QBrush(Qt::NoBrush); + kGray0 = QBrush(Qt::NoBrush); + kLineDisable = QBrush(Qt::NoBrush); + kGrayAlpha2 = QBrush(Qt::NoBrush); + kGrayAlpha0 = QBrush(Qt::NoBrush); + kBrand2 = QBrush(Qt::NoBrush); + kLineNormal = QBrush(Qt::NoBrush); + kGrayAlpha5 = QBrush(Qt::NoBrush); + kGrayAlpha12 = QBrush(Qt::NoBrush); + kErrorClick = QBrush(Qt::NoBrush); + kLineWindowActive = QBrush(Qt::NoBrush); + kComponentAlphaClick = QBrush(Qt::NoBrush); + kBrand3 = QBrush(Qt::NoBrush); + kSuccessNormal = QBrush(Qt::NoBrush); + kGrayAlpha1 = QBrush(Qt::NoBrush); + kFontWhiteSecondaryDisable = QBrush(Qt::NoBrush); + kGray4 = QBrush(Qt::NoBrush); + kContainClick = QBrush(Qt::NoBrush); + kGray8 = QBrush(Qt::NoBrush); + kGrayAlpha4 = QBrush(Qt::NoBrush); + kModalmask = QBrush(Qt::NoBrush); + kLineBrandNormal = QBrush(Qt::NoBrush); + kBrand5 = QBrush(Qt::NoBrush); + kGray10 = QBrush(Qt::NoBrush); + kWarningNormal = QBrush(Qt::NoBrush); + kGray9 = QBrush(Qt::NoBrush); + kGray1 = QBrush(Qt::NoBrush); + kGray14 = QBrush(Qt::NoBrush); + kLineComponentClick = QBrush(Qt::NoBrush); + kWhite = QBrush(Qt::NoBrush); + kGray7 = QBrush(Qt::NoBrush); + kBrandFocus = QBrush(Qt::NoBrush); + kGrayAlpha9 = QBrush(Qt::NoBrush); + kGrayAlpha10 = QBrush(Qt::NoBrush); + kGrayAlpha6 = QBrush(Qt::NoBrush); + kContainHover = QBrush(Qt::NoBrush); + kLineComponentDisable = QBrush(Qt::NoBrush); + kFontWhite = QBrush(Qt::NoBrush); + kGrayAlpha11 = QBrush(Qt::NoBrush); + kGray6 = QBrush(Qt::NoBrush); + kFontWhiteDisable = QBrush(Qt::NoBrush); + kComponentDisable = QBrush(Qt::NoBrush); + kBlack = QBrush(Qt::NoBrush); + kComponentAlphaDisable = QBrush(Qt::NoBrush); + kFontSecondaryDisable = QBrush(Qt::NoBrush); + kGrayAlpha8 = QBrush(Qt::NoBrush); + kFontPrimaryDisable = QBrush(Qt::NoBrush); + kGray5 = QBrush(Qt::NoBrush); + kFontSecondary = QBrush(Qt::NoBrush); + kErrorNormal = QBrush(Qt::NoBrush); + kComponentHover = QBrush(Qt::NoBrush); + kComponentAlphaHover = QBrush(Qt::NoBrush); + kGrayAlpha3 = QBrush(Qt::NoBrush); + kGray13 = QBrush(Qt::NoBrush); + kGray11 = QBrush(Qt::NoBrush); + kErrorHover = QBrush(Qt::NoBrush); + kContainGeneralNormal = QBrush(Qt::NoBrush); + kComponentAlphaNormal = QBrush(Qt::NoBrush); + kGray15 = QBrush(Qt::NoBrush); + kBrand7 = QBrush(Qt::NoBrush); + kGrayAlpha7 = QBrush(Qt::NoBrush); + kLineBrandHover = QBrush(Qt::NoBrush); + kGrayAlpha13 = QBrush(Qt::NoBrush); + kLineComponentHover = QBrush(Qt::NoBrush); + kBrand6 = QBrush(Qt::NoBrush); + kGray17 = QBrush(Qt::NoBrush); + kComponentClick = QBrush(Qt::NoBrush); + kBrandClick = QBrush(Qt::NoBrush); + kFontStrong = QBrush(Qt::NoBrush); + kLineWindow = QBrush(Qt::NoBrush); + kGray2 = QBrush(Qt::NoBrush); + kBrand4 = QBrush(Qt::NoBrush); + kContainSecondaryNormal = QBrush(Qt::NoBrush); + kBrandHover = QBrush(Qt::NoBrush); + kFontPrimary = QBrush(Qt::NoBrush); + kBrandNormal = QBrush(Qt::NoBrush); + } + if (QGSettings::isSchemaInstalled("org.ukui.style")) { + QGSettings *settings = new QGSettings("org.ukui.style"); + + QString styleName = settings->get("styleName").toString(); + if (styleName == "ukui-light" || styleName == "ukui-white") { + m_lightMode = "light"; + } else if (styleName == "ukui-dark" || styleName == "ukui-black") { + m_lightMode = "dark"; + } + + m_widgetThemeName = settings->get("widgetThemeName").toString(); + } + + QString path = ThemeConfigPath; + //dt config + m_ukui_dt_path = (QFile::exists(path + "k" + m_widgetThemeName + "-" + m_lightMode + ".css")) ? + path + "k" + m_widgetThemeName + "-" + m_lightMode + ".css" : + path + "k" + m_widgetThemeName + ".css"; + + m_ukui_dt_loadConfig = this->load(m_ukui_dt_path); -ReadConfig::ReadConfig(const QString &cfg) + initUKUIGlobalThemeParameters(); +} + +GlobalDTConfigPrivate::~GlobalDTConfigPrivate() { } -ReadConfig::~ReadConfig() +QColor GlobalDTConfigPrivate::composeColor(QColor foreColor, QColor backColor) { + qreal alphaF = foreColor.alphaF() * 1.0 + 1.0 *backColor.alphaF() * (1 - foreColor.alphaF()); + qreal red = (foreColor.red() * foreColor.alphaF() * 1.0+ backColor.red() * backColor.alphaF() *(1 - foreColor.alphaF()))/(alphaF * 1.0); + qreal green = (foreColor.green() * foreColor.alphaF() * 1.0 + backColor.green() * backColor.alphaF() *(1 - foreColor.alphaF()))/(alphaF * 1.0); + qreal blue = (foreColor.blue() * foreColor.alphaF() * 1.0 + backColor.blue() * backColor.alphaF() *(1 - foreColor.alphaF()))/(alphaF * 1.0); + QColor color; + color.setRed(red); + color.setGreen(green); + color.setBlue(blue); + color.setAlphaF(alphaF); + return color; } -bool ReadConfig::load(const QString &cfg) +QColor GlobalDTConfigPrivate::mixColor(QList<QColor> colorList) { + //bottom color is the last one on the list. + QColor color = colorList.takeLast(); + + foreach (QColor c, colorList) { + color = composeColor(c, color); + } + + return color; +} + +bool GlobalDTConfigPrivate::load(const QString &cfg) +{ + qDebug() << "loadddd...." << cfg; if (!QFile::exists(cfg)) { - qWarning("ReadConfig load file not exists!"); + qWarning() << "TMPReadConfig load file not exists!" << cfg; return false; } QFile file(cfg); if(!file.open(QIODevice::ReadOnly)) { - qWarning("ReadConfig load file Error!"); + qWarning() << "TMPReadConfig load file Error!" << cfg; return false; } - QByteArray jsonData = file.readAll(); + QByteArray configData = file.readAll(); file.close(); - QJsonParseError error; - QJsonDocument jdoc = QJsonDocument::fromJson(jsonData, &error); - if (error.error != QJsonParseError::NoError) { - qWarning("QJsonDocument fromJson error!"); - return false; - } m_cfgPath = cfg; - cDebug << "m_cfgPath..." << m_cfgPath; - m_cfgJsonObj = jdoc.object(); + m_dt_configData = configData; return true; } -QVariant ReadConfig::getValue(const QString key_1, const QString key_2, const QString key_3, const QString key_4, const QString key_5) const +QColor GlobalDTConfigPrivate::stringToColor(QString s) const { - QJsonObject obj; - if (!key_1.isEmpty() && key_2.isEmpty()) { - return getValue(key_1, m_cfgJsonObj); - } + QColor c = Qt::NoBrush; - if (!key_1.isEmpty() && !key_2.isEmpty()) { - obj = getJsonObjectValue(key_1, m_cfgJsonObj); + QStringList list = s.split(","); + if (list.length() >= 3) { + c.setRed(list[0].toInt()); + c.setGreen(list[1].toInt()); + c.setBlue(list[2].toInt()); + if (list.length() == 4) { + QStringList alphaList = QString(list[3]).split("*"); + if (alphaList.length() == 2) { + if (alphaList[0].toFloat() == 255.0) + c.setAlphaF(alphaList[1].toFloat()); + else if (alphaList[1].toFloat() == 255.0) + c.setAlphaF(alphaList[0].toFloat()); + else + c.setAlphaF(alphaList[0].toFloat() * alphaList[1].toFloat() / 255.0); + + } else if (alphaList.length() == 1) { + if(alphaList[0].toFloat() <= 1.0) + c.setAlphaF(alphaList[0].toFloat()); + else + c.setAlphaF(alphaList[0].toFloat()/255.0); + } else + c.setAlphaF(1.0); + } + } else if (list.length() == 1 && list[0].startsWith("#")) { + c = list[0]; } - if(!key_2.isEmpty()) { - if(key_3.isEmpty()) - return getValue(key_2, obj); - else - obj = getJsonObjectValue(key_2, obj); + return c; +} + +inline bool GlobalDTConfigPrivate::getColorValue(QBrush &dtBrush, const QString key) +{ + if (m_dt_configData.isEmpty()) { + cDebug << "get fills array isempty!"; + return false; } - if (!key_3.isEmpty()) { - if (key_4.isEmpty()) - return getValue(key_3, obj); - else - obj = getJsonObjectValue(key_3, obj); + if (!m_dt_configData.contains("--" + key + ":")) { + cDebug << "Unvalid key!" << key; + return false; } - if (!key_4.isEmpty()) { - if(key_5.isEmpty()) - return getValue(key_4, obj); - else - obj = getJsonObjectValue(key_4, obj); + int start_index, end_index; + QString colorStr; + + start_index = m_dt_configData.indexOf("--" + key + ":"); + if (start_index == -1) { + cDebug <<"Config file format error! Has no key" << key; + return false; } - if(!key_5.isEmpty()) - return getValue(key_5, obj); - return QVariant(); -} + start_index += QString("--" + key).length(); + end_index = m_dt_configData.indexOf(";", start_index); + colorStr = m_dt_configData.mid(start_index, end_index - start_index + 1); + + if (colorStr.contains(": var(")) { + //quote key + start_index = colorStr.indexOf(": var(--"); + if (start_index == -1) { + qWarning() << "Config file format error! type var" << key; + return false; + } + start_index += QString(": var(--").length(); + end_index = colorStr.indexOf(")", start_index); + getColorValue(dtBrush, colorStr.mid(start_index, end_index - start_index).toLower()); + } else if (colorStr.contains(": rgba(")) { + //solidcolor + start_index = colorStr.indexOf(": rgba("); + if (start_index == -1) { + qWarning() << "Config file format error! type rgba" << key; + return false; + } + start_index += QString(": rgba(").length(); + end_index = colorStr.indexOf(")", start_index); -QVariant ReadConfig::getValue(const QString key, QJsonObject obj) const -{ - QVariant r; + dtBrush = QBrush(stringToColor(colorStr.mid(start_index, end_index - start_index))); - if (key.isEmpty() || obj.isEmpty() || !obj.contains(key)) { - cWarning << "key or QJsonObject unvalue!" << key << obj.isEmpty() << obj.contains(key); - return QVariant(); - } + if (key == "kfont-primary") { + qDebug()<<"parse kfont-primary"<<colorStr.mid(start_index, end_index - start_index); + } - r = obj.value(key); - if (!r.isValid()) { - cWarning << "getValue key:" << key << "error!"; - return QVariant(); - } - return r; -} + } else if (colorStr.contains(": linear-gradient(0deg, ")) { + //mix solidcolor + start_index = colorStr.indexOf(": linear-gradient(0deg, "); + if (start_index == -1) { + qWarning() << "Config file format error! type linear-gradient 0deg" << key; + return false; + } -QJsonObject ReadConfig::getJsonObjectValue(const QString key, QJsonObject obj) const -{ - QJsonObject o; - if (key.isEmpty() || obj.isEmpty() || !obj.contains(key)) { - cWarning << "key or QJsonObject unvalue!"; - return o; - } + start_index += QString(": linear-gradient(0deg, ").length(); + end_index = colorStr.indexOf(";", start_index); + colorStr = colorStr.mid(start_index, end_index - start_index); + + QStringList sList = colorStr.split("rgba"); + QList<QColor> listColor; + QColor solidColor; + QStringList colorList; + for(int i = 0; i < sList.length(); i++) { + QString s = sList[i]; + if(!s.isEmpty()){ + int sIndex = s.indexOf("("); + int eIndex = s.indexOf(")"); + s = s.mid(sIndex + 1, eIndex - sIndex - 1); + if(!colorList.contains(s)) + colorList.append(s); + } + } - QJsonValue v = obj.value(key); -// cDebug << "getJsonObjectValue:" << key << v; - if (!v.isObject()) { - cWarning << "getValue QJsonValue to QJsonObject error!"; - return o; - } - o = v.toObject(); + for (int i = 0; i < colorList.length(); i++) { + QString s = colorList[i]; - return o; -} + QColor color = stringToColor(s); + if(!listColor.contains(color)) + listColor.append(color); + } -bool ReadConfig::getColorValue(QColor &c, const QString key_1, const QString key_2, const QString key_3, const QString key_4, const QString key_5) const -{ - QJsonObject obj = getValue(key_1, key_2, key_3, key_4, key_5).toJsonObject(); - if (obj.isEmpty()) { - cDebug << "getvalue isempty!" << key_1 << key_2 << key_3 << key_4 << key_5; - return false; - } - if (obj.value(Obj_Type) != Obj_Color_Type && obj.value(Obj_Type) != Obj_PaletteRole_Type) { - cDebug << "get color value type error!" << obj.value(Obj_Type).toString() << key_1 << key_2 << key_3 << key_4 << key_5 << obj.value(Obj_Type); - return false; - } - if(obj.value(Obj_Value).toString().isEmpty()){ - cDebug << "obj" << Obj_Value << "key isempty!"; + solidColor = mixColor(listColor); + dtBrush = QBrush(solidColor); + } else if (colorStr.contains(": linear-gradient(180deg, ")) { + //gradient + start_index = colorStr.indexOf(": linear-gradient(180deg, "); + if (start_index == -1) { + qWarning() << "Config file format error! type linear-gradient 180deg" << key; + return false; + } + + start_index += QString(": linear-gradient(180deg, ").length(); + end_index = colorStr.indexOf(";", start_index); + colorStr = colorStr.mid(start_index, end_index - start_index); + + QStringList sList = colorStr.split("rgba"); + QList<QColor> startListColor; + QList<QColor> endListColor; + + QColor backColor; + QColor startColor; + QColor endColor; + QLinearGradient gradient; + + QString sbackColor = sList.takeLast(); + sbackColor = sbackColor.mid(sbackColor.indexOf("(") + 1, sbackColor.indexOf(")") - sbackColor.indexOf("(") - 1); + backColor = stringToColor(sbackColor); + for(int i = 0; i < sList.length(); i++) { + QString s = sList[i]; + if (s.isEmpty()) + continue; + + int sIndex = s.indexOf("("); + int eIndex = s.indexOf(")"); + s = s.mid(sIndex + 1, eIndex - sIndex - 1); + if (i <= sList.length() / 2) + startListColor.append(stringToColor(s)); + else + endListColor.append(stringToColor(s)); + } + + startListColor.append(backColor); + endListColor.append(backColor); + + startColor = mixColor(startListColor); + endColor = mixColor(endListColor); + + gradient.setColorAt(0, startColor); + gradient.setColorAt(1, endColor); + + dtBrush = QBrush(gradient); + } else { + cDebug << "Config file format error! " << key << "colorStr" << colorStr; return false; } - if(obj.value(Obj_Type) == Obj_PaletteRole_Type) - c = stringToPaletteColor(obj.value(Obj_Value).toString()); - else - c = stringToColor(obj.value(Obj_Value).toString()); + return true; } -bool ReadConfig::getColorValue(QBrush &brush, const QString key_1, const QString key_2, const QString key_3, const QString key_4, const QString key_5) const + +inline bool GlobalDTConfigPrivate::getValue(int &value, const QString key) const { - QJsonObject obj = getValue(key_1, key_2, key_3, key_4, key_5).toJsonObject(); - if (obj.isEmpty()) { - cDebug << "getvalue isempty!" << key_1 << key_2 << key_3 << key_4 << key_5; + if (m_dt_configData.isEmpty()) { + cDebug << "get fills array isempty!"; return false; } - if (obj.value(Obj_Type) != Obj_Color_Type && obj.value(Obj_Type) != Obj_PaletteRole_Type) { - cDebug << "get color value type error!" << obj.value(Obj_Type).toString() << key_1 << key_2 << key_3 << key_4 << key_5 << obj.value(Obj_Type); + + if (!m_dt_configData.contains(key)) { + cDebug << "Unvalid key!"; return false; } - if(obj.value(Obj_Value).toString().isEmpty()){ - cDebug << "obj" << Obj_Value << "key isempty!"; + + int start_index = m_dt_configData.indexOf("--" + key + ": "); + if (start_index == -1) { + cDebug << "Config file format error!"; return false; } - if(obj.value(Obj_Type) == Obj_PaletteRole_Type) - brush = stringToPaletteColor(obj.value(Obj_Value).toString()); - else - brush = stringToColor(obj.value(Obj_Value).toString()); + start_index += QString("--" + key + ": ").length(); + int end_index = m_dt_configData.indexOf("px", start_index); + + value = m_dt_configData.mid(start_index, end_index - start_index).toInt(); + return true; } -bool ReadConfig::getGradientValue(QList<QColor> &cl, const QString key_1, const QString key_2, const QString key_3, const QString key_4, const QString key_5) const +void GlobalDTConfigPrivate::initUKUIGlobalThemeParameters() { - QJsonObject obj = getValue(key_1, key_2, key_3, key_4, key_5).toJsonObject(); - if (obj.isEmpty()) { - cDebug << "getvalue isempty!" << key_1 << key_2 << key_3 << key_4 << key_5; - return false; + qDebug() << "initUKUIGlobalThemeParameters......" << m_ukui_dt_loadConfig; + if (m_ukui_dt_loadConfig) { + + //default palette + getColorValue(windowTextActive , "windowtext-active"); + getColorValue(windowTextInactive , "windowtext-inactive"); + getColorValue(windowTextDisable , "windowtext-disable"); + getColorValue(buttonActive , "button-active"); + getColorValue(buttonInactive , "button-inactive"); + getColorValue(buttonDisable , "button-disable"); + getColorValue(lightActive , "light-active"); + getColorValue(lightInactive , "light-inactive"); + getColorValue(lightDisable , "light-disable"); + getColorValue(midlightActive , "midlight-active"); + getColorValue(midlightInactive , "midlight-inactive"); + getColorValue(midlightDisable , "midlight-disable"); + getColorValue(darkActive , "dark-active"); + getColorValue(darkInactive , "dark-inactive"); + getColorValue(darkDisable , "dark-disable"); + getColorValue(midActive , "mid-active"); + getColorValue(midInactive , "mid-inactive"); + getColorValue(midDisable , "mid-disable"); + getColorValue(textActive , "text-active"); + getColorValue(textInactive , "text-inactive"); + getColorValue(textDisable , "text-disable"); + getColorValue(brightTextActive , "brighttext-active"); + getColorValue(brightTextInactive , "brighttext-inactive"); + getColorValue(brightTextDisable , "brighttext-disable"); + getColorValue(buttonTextActive , "buttontext-active"); + getColorValue(buttonTextInactive , "buttontext-inactive"); + getColorValue(buttonTextDisable , "buttontext-disable"); + getColorValue(baseActive , "base-active"); + getColorValue(baseInactive , "base-inactive"); + getColorValue(baseDisable , "base-disable"); + getColorValue(windowActive , "window-active"); + getColorValue(windowInactive , "window-inactive"); + getColorValue(windowDisable , "window-disable"); + getColorValue(shadowActive , "shadow-active"); + getColorValue(shadowInactive , "shadow-inactive"); + getColorValue(shadowDisable , "shadow-disable"); + getColorValue(highLightActive , "highlight-active"); + getColorValue(highLightInactive , "highlight-inactive"); + getColorValue(highLightDisable , "highlight-disable"); + getColorValue(highLightedTextActive , "highlightedtext-active"); + getColorValue(highLightedTextInactive , "highlightedtext-inactive"); + getColorValue(highLightedTextDisable , "highlightedtext-disable"); + getColorValue(linkActive , "link-active"); + getColorValue(linkInactive , "link-inactive"); + getColorValue(linkDisable , "link-disable"); + getColorValue(linkVisitedActive , "linkvisited-active"); + getColorValue(linkVisitedInactive , "linkvisited-inactive"); + getColorValue(linkVisitedDisable , "linkvisited-disable"); + getColorValue(alternateBaseActive , "alternatebase-active"); + getColorValue(alternateBaseInactive , "alternatebase-inactive"); + getColorValue(alternateBaseDisable , "alternatebase-disable"); + getColorValue(noRoleActive , "norole-active"); + getColorValue(noRoleInactive , "norole-inactive"); + getColorValue(noRoleDisable , "norole-disable"); + getColorValue(toolTipBaseActive , "tooltipbase-active"); + getColorValue(toolTipBaseInactive , "tooltipbase-inactive"); + getColorValue(toolTipBaseDisable , "tooltipbase-disable"); + getColorValue(toolTipTextActive , "tooltiptext-active"); + getColorValue(toolTipTextInactive , "tooltiptext-inactive"); + getColorValue(toolTipTextDisable , "tooltiptext-disable"); + getColorValue(placeholderTextActive , "placeholdertext-active"); + getColorValue(placeholderTextInactive , "placeholdertext-inactive"); + getColorValue(placeholderTextDisable , "placeholdertext-disable"); + + //custom palette + getColorValue(kBlack , "kblack"); + getColorValue(kBrand1 , "kbrand1"); + getColorValue(kBrand2 , "kbrand2"); + getColorValue(kBrand3 , "kbrand3"); + getColorValue(kBrand4 , "kbrand4"); + getColorValue(kBrand5 , "kbrand5"); + getColorValue(kBrand6 , "kbrand6"); + getColorValue(kBrand7 , "kbrand7"); + getColorValue(kBrandClick , "kbrand-click"); + getColorValue(kBrandFocus , "kbrand-focus"); + getColorValue(kBrandHover , "kbrand-hover"); + getColorValue(kBrandNormal , "kbrand-normal"); + getColorValue(kComponentAlphaClick , "kcomponent-alpha-click"); + getColorValue(kComponentAlphaDisable , "kcomponent-alpha-disable"); + getColorValue(kComponentAlphaHover , "kcomponent-alpha-hover"); + getColorValue(kComponentAlphaNormal , "kcomponent-alpha-normal"); + getColorValue(kComponentClick , "kcomponent-click"); + getColorValue(kComponentDisable , "kcomponent-disable"); + getColorValue(kComponentHover , "kcomponent-hover"); + getColorValue(kComponentNormal , "kcomponent-normal"); + getColorValue(kContainClick , "kcontain-click"); + getColorValue(kContainHover , "kcontain-hover"); + getColorValue(kContainGeneralNormal , "kcontain-general-normal"); + getColorValue(kContainSecondaryAlpphaNormal , "kcontain-secondary-alpha-normal"); + getColorValue(kContainSecondaryNormal , "kcontain-secondary-normal"); + getColorValue(kErrorClick , "kerror-click"); + getColorValue(kErrorHover , "kerror-hover"); + getColorValue(kErrorNormal , "kerror-normal"); + getColorValue(kFontPrimary , "kfont-primary"); + getColorValue(kFontPrimaryDisable , "kfont-primary-disable"); + getColorValue(kFontSecondary , "kfont-secondary"); + getColorValue(kFontSecondaryDisable , "kfont-secondary-disable"); + getColorValue(kFontStrong , "kfont-strong"); + getColorValue(kFontWhite , "kfont-white"); + getColorValue(kFontWhiteDisable , "kfont-white-disable"); + getColorValue(kFontWhiteSecondary , "kfont-white-secondary"); + getColorValue(kFontWhiteSecondaryDisable , "kfont-white-secondary-disable"); + getColorValue(kGray0 , "kgray-0"); + getColorValue(kGray1 , "kgray-1"); + getColorValue(kGray2 , "kgray-2"); + getColorValue(kGray3 , "kgray-3"); + getColorValue(kGray4 , "kgray-4"); + getColorValue(kGray5 , "kgray-5"); + getColorValue(kGray6 , "kgray-6"); + getColorValue(kGray7 , "kgray-7"); + getColorValue(kGray8 , "kgray-8"); + getColorValue(kGray9 , "kgray-9"); + getColorValue(kGray10 , "kgray-10"); + getColorValue(kGray11 , "kgray-11"); + getColorValue(kGray12 , "kgray-12"); + getColorValue(kGray13 , "kgray-13"); + getColorValue(kGray14 , "kgray-14"); + getColorValue(kGray15 , "kgray-15"); + getColorValue(kGray16 , "kgray-16"); + getColorValue(kGray17 , "kgray-17"); + getColorValue(kGrayAlpha0 , "kgray-alpha0"); + getColorValue(kGrayAlpha1 , "kgray-alpha1"); + getColorValue(kGrayAlpha2 , "kgray-alpha2"); + getColorValue(kGrayAlpha3 , "kgray-alpha3"); + getColorValue(kGrayAlpha4 , "kgray-alpha4"); + getColorValue(kGrayAlpha5 , "kgray-alpha5"); + getColorValue(kGrayAlpha6 , "kgray-alpha6"); + getColorValue(kGrayAlpha7 , "kgray-alpha7"); + getColorValue(kGrayAlpha8 , "kgray-alpha8"); + getColorValue(kGrayAlpha9 , "kgray-alpha9"); + getColorValue(kGrayAlpha10 , "kgray-alpha10"); + getColorValue(kGrayAlpha11 , "kgray-alpha11"); + getColorValue(kGrayAlpha12 , "kgray-alpha12"); + getColorValue(kGrayAlpha13 , "kgray-alpha13"); + getColorValue(kLineBrandClick , "kline-brand-click"); + getColorValue(kLineBrandDisable , "kline-brand-disable"); + getColorValue(kLineBrandHover , "kline-brand-hover"); + getColorValue(kLineBrandNormal , "kline-brand-normal"); + getColorValue(kLineComponentClick , "kline-component-click"); + getColorValue(kLineComponentDisable , "kline-component-disable"); + getColorValue(kLineComponentHover , "kline-component-hover"); + getColorValue(kLineComponentNormal , "kline-component-normal"); + getColorValue(kLineDisable , "kline-disable"); + getColorValue(kLineNormal , "kline-normal"); + getColorValue(kLineWindow , "kline-window"); + getColorValue(kLineWindowActive , "kline-window-active"); + getColorValue(kModalmask , "kmodalmask"); + getColorValue(kSuccessNormal , "ksuccess-normal"); + getColorValue(kWarningNormal , "kwarning-normal"); + getColorValue(kWhite , "kwhite"); + + //line and margin + getValue(normalline , "normalline"); + getValue(focusline , "focusline"); + getValue(tokenGap4 , "token-gap-4"); + getValue(tokenGap8 , "token-gap-8"); + getValue(tokenGap16 , "token-gap-16"); + getValue(tokenGap24 , "token-gap-24"); + getValue(tokenGap40 , "token-gap-40"); + + //radius + getValue(kradiusMin , "kradius-min"); + getValue(kradiusMenu , "kradius-menu"); + getValue(kradiusNormal , "kradius-normal"); + getValue(kradiusWindow , "kradius-window"); } - if(obj.value(Obj_Value).toString().isEmpty()){ - cDebug << "obj" << Obj_Value << "key isempty!"; - return false; + + + //default palette + qApp->setProperty("windowtext-active", windowTextActive); + qApp->setProperty("windowtext-inactive", windowTextInactive); + qApp->setProperty("windowtext-disable", windowTextDisable); + qApp->setProperty("button-active", buttonActive); + qApp->setProperty("button-inactive", buttonInactive); + qApp->setProperty("button-disable", buttonDisable); + qApp->setProperty("light-active", lightActive); + qApp->setProperty("light-inactive", lightInactive); + qApp->setProperty("light-disable", lightDisable); + qApp->setProperty("midlight-active", midlightActive); + qApp->setProperty("midlight-inactive", midlightInactive); + qApp->setProperty("midlight-disable", midlightDisable); + qApp->setProperty("dark-active", darkActive); + qApp->setProperty("dark-inactive", darkInactive); + qApp->setProperty("dark-disable", darkDisable); + qApp->setProperty("mid-active", midActive); + qApp->setProperty("mid-inactive", midInactive); + qApp->setProperty("mid-disable", midDisable); + qApp->setProperty("text-active", textActive); + qApp->setProperty("text-inactive", textInactive); + qApp->setProperty("text-disable", textDisable); + qApp->setProperty("brighttext-active", brightTextActive); + qApp->setProperty("brighttext-inactive", brightTextInactive); + qApp->setProperty("brighttext-disable", brightTextDisable); + qApp->setProperty("buttontext-active", buttonTextActive); + qApp->setProperty("buttontext-inactive", buttonTextInactive); + qApp->setProperty("buttontext-disable", buttonTextDisable); + qApp->setProperty("base-active", baseActive); + qApp->setProperty("base-inactive", baseInactive); + qApp->setProperty("base-disable", baseDisable); + qApp->setProperty("window-active", windowActive); + qApp->setProperty("window-inactive", windowInactive); + qApp->setProperty("window-disable", windowDisable); + qApp->setProperty("shadow-active", shadowActive); + qApp->setProperty("shadow-inactive", shadowInactive); + qApp->setProperty("shadow-disable", shadowDisable); + qApp->setProperty("highlight-active", highLightActive); + qApp->setProperty("highlight-inactive", highLightInactive); + qApp->setProperty("highlight-disable", highLightDisable); + qApp->setProperty("highlightedtext-active", highLightedTextActive); + qApp->setProperty("highlightedtext-inactive", highLightedTextInactive); + qApp->setProperty("highlightedtext-disable", highLightedTextDisable); + qApp->setProperty("link-active", linkActive); + qApp->setProperty("link-inactive", linkInactive); + qApp->setProperty("link-disable", linkDisable); + qApp->setProperty("linkvisited-active", linkVisitedActive); + qApp->setProperty("linkvisited-inactive", linkVisitedInactive); + qApp->setProperty("linkvisited-disable", linkVisitedDisable); + qApp->setProperty("alternatebase-active", alternateBaseActive); + qApp->setProperty("alternatebase-inactive", alternateBaseInactive); + qApp->setProperty("alternatebase-disable", alternateBaseDisable); + qApp->setProperty("norole-active", noRoleActive); + qApp->setProperty("norole-inactive", noRoleInactive); + qApp->setProperty("norole-disable", noRoleDisable); + qApp->setProperty("tooltipbase-active", toolTipBaseActive); + qApp->setProperty("tooltipbase-inactive", toolTipBaseInactive); + qApp->setProperty("tooltipbase-disable", toolTipBaseDisable); + qApp->setProperty("tooltiptext-active", toolTipTextActive); + qApp->setProperty("tooltiptext-inactive", toolTipTextInactive); + qApp->setProperty("tooltiptext-disable", toolTipTextDisable); + qApp->setProperty("placeholdertext-active", placeholderTextActive); + qApp->setProperty("placeholdertext-inactive", placeholderTextInactive); + qApp->setProperty("placeholdertext-disable", placeholderTextDisable); + + //custom palette + qApp->setProperty("kblack", kBlack); + qApp->setProperty("kbrand1", kBrand1); + qApp->setProperty("kbrand2", kBrand2); + qApp->setProperty("kbrand3", kBrand3); + qApp->setProperty("kbrand4", kBrand4); + qApp->setProperty("kbrand5", kBrand5); + qApp->setProperty("kbrand6", kBrand6); + qApp->setProperty("kbrand7", kBrand7); + qApp->setProperty("kbrand-click", kBrandClick); + qApp->setProperty("kbrand-focus", kBrandFocus); + qApp->setProperty("kbrand-hover", kBrandHover); + qApp->setProperty("kbrand-normal", kBrandNormal); + qApp->setProperty("kcomponent-alpha-click", kComponentAlphaClick); + qApp->setProperty("kcomponent-alpha-disable", kComponentAlphaDisable); + qApp->setProperty("kcomponent-alpha-hover", kComponentAlphaHover); + qApp->setProperty("kcomponent-alpha-normal", kComponentAlphaNormal); + qApp->setProperty("kcomponent-click", kComponentClick); + qApp->setProperty("kcomponent-disable", kComponentDisable); + qApp->setProperty("kcomponent-hover", kComponentHover); + qApp->setProperty("kcomponent-normal", kComponentNormal); + qApp->setProperty("kcontain-click", kContainClick); + qApp->setProperty("kcontain-hover", kContainHover); + qApp->setProperty("kcontain-general-normal", kContainGeneralNormal); + qApp->setProperty("kcontain-secondary-alpha-normal", kContainSecondaryAlpphaNormal); + qApp->setProperty("kcontain-secondary-normal", kContainSecondaryNormal); + qApp->setProperty("kerror-click", kErrorClick); + qApp->setProperty("kerror-hover", kErrorHover); + qApp->setProperty("kerror-normal", kErrorNormal); + qApp->setProperty("kfont-primary", kFontPrimary); + qApp->setProperty("kfont-primary-disable", kFontPrimaryDisable); + qApp->setProperty("kfont-secondary", kFontSecondary); + qApp->setProperty("kfont-secondary-disable", kFontSecondaryDisable); + qApp->setProperty("kfont-strong", kFontStrong); + qApp->setProperty("kfont-white", kFontWhite); + qApp->setProperty("kfont-white-disable", kFontWhiteDisable); + qApp->setProperty("kfont-white-secondary", kFontWhiteSecondary); + qApp->setProperty("kfont-white-secondary-disable", kFontWhiteSecondaryDisable); + qApp->setProperty("kgray-0", kGray0); + qApp->setProperty("kgray-1", kGray1); + qApp->setProperty("kgray-2", kGray2); + qApp->setProperty("kgray-3", kGray3); + qApp->setProperty("kgray-4", kGray4); + qApp->setProperty("kgray-5", kGray5); + qApp->setProperty("kgray-6", kGray6); + qApp->setProperty("kgray-7", kGray7); + qApp->setProperty("kgray-8", kGray8); + qApp->setProperty("kgray-9", kGray9); + qApp->setProperty("kgray-10", kGray10); + qApp->setProperty("kgray-11", kGray11); + qApp->setProperty("kgray-12", kGray12); + qApp->setProperty("kgray-13", kGray13); + qApp->setProperty("kgray-14", kGray14); + qApp->setProperty("kgray-15", kGray15); + qApp->setProperty("kgray-16", kGray16); + qApp->setProperty("kgray-17", kGray17); + qApp->setProperty("kgray-alpha0", kGrayAlpha0); + qApp->setProperty("kgray-alpha1", kGrayAlpha1); + qApp->setProperty("kgray-alpha2", kGrayAlpha2); + qApp->setProperty("kgray-alpha3", kGrayAlpha3); + qApp->setProperty("kgray-alpha4", kGrayAlpha4); + qApp->setProperty("kgray-alpha5", kGrayAlpha5); + qApp->setProperty("kgray-alpha6", kGrayAlpha6); + qApp->setProperty("kgray-alpha7", kGrayAlpha7); + qApp->setProperty("kgray-alpha8", kGrayAlpha8); + qApp->setProperty("kgray-alpha9", kGrayAlpha9); + qApp->setProperty("kgray-alpha10", kGrayAlpha10); + qApp->setProperty("kgray-alpha11", kGrayAlpha11); + qApp->setProperty("kgray-alpha12", kGrayAlpha12); + qApp->setProperty("kgray-alpha13", kGrayAlpha13); + qApp->setProperty("kline-brand-click", kLineBrandClick); + qApp->setProperty("kline-brand-disable", kLineBrandDisable); + qApp->setProperty("kline-brand-hover", kLineBrandHover); + qApp->setProperty("kline-brand-normal", kLineBrandNormal); + qApp->setProperty("kline-component-click", kLineComponentClick); + qApp->setProperty("kline-component-disable", kLineComponentDisable); + qApp->setProperty("kline-component-hover", kLineComponentHover); + qApp->setProperty("kline-component-normal", kLineComponentNormal); + qApp->setProperty("kline-disable", kLineDisable); + qApp->setProperty("kline-normal", kLineNormal); + qApp->setProperty("kline-window", kLineWindow); + qApp->setProperty("kline-window-active", kLineWindowActive); + qApp->setProperty("kmodalmask", kModalmask); + qApp->setProperty("ksuccess-normal", kSuccessNormal); + qApp->setProperty("kwarning-normal", kWarningNormal); + qApp->setProperty("kwhite", kWhite); + + + //line and margin + qApp->setProperty("normalline", normalline); + qApp->setProperty("focusline", focusline); + qApp->setProperty("token-gap-4", tokenGap4); + qApp->setProperty("token-gap-8", tokenGap8); + qApp->setProperty("token-gap-16", tokenGap16); + qApp->setProperty("token-gap-24", tokenGap24); + qApp->setProperty("token-gap-40", tokenGap40); + + //radius + qApp->setProperty("kradius-min", kradiusMin); + qApp->setProperty("kradius-menu", kradiusMenu); + qApp->setProperty("kradius-normal", kradiusNormal); + qApp->setProperty("kradius-window", kradiusWindow); +} + +GlobalDTConfig::GlobalDTConfig() : d(new GlobalDTConfigPrivate()) +{ + if (QGSettings::isSchemaInstalled("org.ukui.style")) { + auto *settings = new QGSettings("org.ukui.style"); + connect(settings, &QGSettings::changed, this, [=](const QString &key) { + if (key == "styleName" || key == "widgetThemeName" || key == "themeColor" || + key == "style-name" || key == "widget-theme-name" || key == "theme-color") { + emit tokenChanged(); + } + }); } - if (obj.value(Obj_Type) != Obj_Gradient_Type) { - cDebug << "get color value type error!" << obj.value(Obj_Type).toString() << key_1 << key_2 << key_3 << key_4 << key_5 << obj.value(Obj_Type); - return false; +} + +GlobalDTConfig::~GlobalDTConfig() +{ + if (d) { + delete d; + d = nullptr; } - stringToGradient(cl, obj.value(Obj_Value).toString()); - return true; +} +QBrush GlobalDTConfig::windowTextActive() const +{ + return d->windowTextActive; } -QString ReadConfig::getType(const QString key_1, const QString key_2, const QString key_3, const QString key_4, const QString key_5) const +QBrush GlobalDTConfig::windowTextInactive() const { - QJsonObject obj = getValue(key_1, key_2, key_3, key_4, key_5).toJsonObject(); - if (obj.isEmpty()) { - cDebug << "getvalue isempty!" << key_1 << key_2 << key_3 << key_4 << key_5; - return ""; - } - return obj.value(Obj_Type).toString(); + return d->windowTextInactive; } -QColor ReadConfig::stringToColor(QString s) const +QBrush GlobalDTConfig::windowTextDisable() const { - QColor c = Qt::NoBrush; + return d->windowTextDisable; +} - QStringList list = s.split(","); - if (list.length() >= 3) { - c.setRed(list[0].toInt()); - c.setGreen(list[1].toInt()); - c.setBlue(list[2].toInt()); - if (list.length() == 4) { - QStringList alphaList = QString(list[3]).split("*"); - if (alphaList.length() == 2) { - if (alphaList[0].toFloat() == 255.0) - c.setAlphaF(alphaList[1].toFloat()); - else if (alphaList[1].toFloat() == 255.0) - c.setAlphaF(alphaList[0].toFloat()); - else - c.setAlphaF(alphaList[0].toFloat() * alphaList[1].toFloat() / 255.0); +QBrush GlobalDTConfig::buttonActive() const +{ + return d->buttonActive; +} - } else if (alphaList.length() == 1) { - if(alphaList[0].toFloat() <= 1.0) - c.setAlphaF(alphaList[0].toFloat()); - else - c.setAlphaF(alphaList[0].toFloat()/255.0); - } else - c.setAlphaF(1.0); - } - } else if (list.length() == 1 && list[0].startsWith("#")) { - c = list[0]; - } +QBrush GlobalDTConfig::buttonInactive() const +{ + return d->buttonInactive; +} - return c; +QBrush GlobalDTConfig::buttonDisable() const +{ + return d->buttonDisable; } -QColor ReadConfig::stringToPaletteColor(QString s) const +QBrush GlobalDTConfig::lightActive() const { - QColor c = Qt::NoBrush; - QMetaEnum metaEnum = QMetaEnum::fromType<UKUIPaletteRole::PaletteRole>(); - QByteArray ba=s.toLatin1(); - const char * c_scence=ba.data(); - //qDebug()<<c_scence; - - switch (metaEnum.keyToValue(c_scence)) { - case UKUIPaletteRole::WindowText_at: - c = m_platte.color(QPalette::Active, QPalette::WindowText); - break; - case UKUIPaletteRole::WindowText_iat: - c = m_platte.color(QPalette::Inactive, QPalette::WindowText); - break; - case UKUIPaletteRole::WindowText_dis: - c = m_platte.color(QPalette::Disabled, QPalette::WindowText); - break; - case UKUIPaletteRole::Button_at: - c = m_platte.color(QPalette::Active, QPalette::Button); - break; - case UKUIPaletteRole::Button_iat: - c = m_platte.color(QPalette::Inactive, QPalette::Button); - break; - case UKUIPaletteRole::Button_dis: - c = m_platte.color(QPalette::Disabled, QPalette::Button); - break; - case UKUIPaletteRole::Light_at: - c = m_platte.color(QPalette::Active, QPalette::Light); - break; - case UKUIPaletteRole::Light_iat: - c = m_platte.color(QPalette::Inactive, QPalette::Light); - break; - case UKUIPaletteRole::Light_dis: - c = m_platte.color(QPalette::Disabled, QPalette::Light); - break; - case UKUIPaletteRole::Midlight_at: - c = m_platte.color(QPalette::Active, QPalette::Midlight); - break; - case UKUIPaletteRole::Midlight_iat: - c = m_platte.color(QPalette::Inactive, QPalette::Midlight); - break; - case UKUIPaletteRole::Midlight_dis: - c = m_platte.color(QPalette::Disabled, QPalette::Midlight); - break; - case UKUIPaletteRole::Dark_at: - c = m_platte.color(QPalette::Active, QPalette::Dark); - break; - case UKUIPaletteRole::Dark_iat: - c = m_platte.color(QPalette::Inactive, QPalette::Dark); - break; - case UKUIPaletteRole::Dark_dis: - c = m_platte.color(QPalette::Disabled, QPalette::Dark); - break; - case UKUIPaletteRole::Mid_at: - c = m_platte.color(QPalette::Active, QPalette::Mid); - break; - case UKUIPaletteRole::Mid_iat: - c = m_platte.color(QPalette::Inactive, QPalette::Mid); - break; - case UKUIPaletteRole::Mid_dis: - c = m_platte.color(QPalette::Disabled, QPalette::Mid); - break; - case UKUIPaletteRole::Text_at: - c = m_platte.color(QPalette::Active, QPalette::Text); - break; - case UKUIPaletteRole::Text_iat: - c = m_platte.color(QPalette::Inactive, QPalette::Text); - break; - case UKUIPaletteRole::Text_dis: - c = m_platte.color(QPalette::Disabled, QPalette::Text); - break; - case UKUIPaletteRole::BrightText_at: - c = m_platte.color(QPalette::Active, QPalette::BrightText); - break; - case UKUIPaletteRole::BrightText_iat: - c = m_platte.color(QPalette::Inactive, QPalette::BrightText); - break; - case UKUIPaletteRole::BrightText_dis: - c = m_platte.color(QPalette::Disabled, QPalette::BrightText); - break; - case UKUIPaletteRole::ButtonText_at: - c = m_platte.color(QPalette::Active, QPalette::ButtonText); - break; - case UKUIPaletteRole::ButtonText_iat: - c = m_platte.color(QPalette::Inactive, QPalette::ButtonText); - break; - case UKUIPaletteRole::ButtonText_dis: - c = m_platte.color(QPalette::Disabled, QPalette::ButtonText); - break; - case UKUIPaletteRole::Base_at: - c = m_platte.color(QPalette::Active, QPalette::Base); - break; - case UKUIPaletteRole::Base_iat: - c = m_platte.color(QPalette::Inactive, QPalette::Base); - break; - case UKUIPaletteRole::Base_dis: - c = m_platte.color(QPalette::Disabled, QPalette::Base); - break; - case UKUIPaletteRole::Window_at: - c = m_platte.color(QPalette::Active, QPalette::Window); - break; - case UKUIPaletteRole::Window_iat: - c = m_platte.color(QPalette::Inactive, QPalette::Window); - break; - case UKUIPaletteRole::Window_dis: - c = m_platte.color(QPalette::Disabled, QPalette::Window); - break; - case UKUIPaletteRole::Shadow_at: - c = m_platte.color(QPalette::Active, QPalette::Shadow); - break; - case UKUIPaletteRole::Shadow_iat: - c = m_platte.color(QPalette::Inactive, QPalette::Shadow); - break; - case UKUIPaletteRole::Shadow_dis: - c = m_platte.color(QPalette::Disabled, QPalette::Shadow); - break; - case UKUIPaletteRole::HighLight_at: - c = m_platte.color(QPalette::Active, QPalette::Highlight); - break; - case UKUIPaletteRole::HighLight_iat: - c = m_platte.color(QPalette::Inactive, QPalette::Highlight); - break; - case UKUIPaletteRole::HighLight_dis: - c = m_platte.color(QPalette::Disabled, QPalette::Highlight); - break; - case UKUIPaletteRole::HighLightText_at: - c = m_platte.color(QPalette::Active, QPalette::HighlightedText); - break; - case UKUIPaletteRole::HighLightText_iat: - c = m_platte.color(QPalette::Inactive, QPalette::HighlightedText); - break; - case UKUIPaletteRole::HighLightText_dis: - c = m_platte.color(QPalette::Disabled, QPalette::HighlightedText); - break; - case UKUIPaletteRole::Link_at: - c = m_platte.color(QPalette::Active, QPalette::Link); - break; - case UKUIPaletteRole::Link_iat: - c = m_platte.color(QPalette::Inactive, QPalette::Link); - break; - case UKUIPaletteRole::Link_dis: - c = m_platte.color(QPalette::Disabled, QPalette::Link); - break; - case UKUIPaletteRole::LinkVisited_at: - c = m_platte.color(QPalette::Active, QPalette::LinkVisited); - break; - case UKUIPaletteRole::LinkVisited_iat: - c = m_platte.color(QPalette::Inactive, QPalette::LinkVisited); - break; - case UKUIPaletteRole::LinkVisited_dis: - c = m_platte.color(QPalette::Disabled, QPalette::LinkVisited); - break; - case UKUIPaletteRole::AlternateBase_at: - c = m_platte.color(QPalette::Active, QPalette::AlternateBase); - break; - case UKUIPaletteRole::AlternateBase_iat: - c = m_platte.color(QPalette::Inactive, QPalette::AlternateBase); - break; - case UKUIPaletteRole::AlternateBase_dis: - c = m_platte.color(QPalette::Disabled, QPalette::AlternateBase); - break; - case UKUIPaletteRole::NoRole_at: - c = m_platte.color(QPalette::Active, QPalette::NoRole); - break; - case UKUIPaletteRole::NoRole_iat: - c = m_platte.color(QPalette::Inactive, QPalette::NoRole); - break; - case UKUIPaletteRole::NoRole_dis: - c = m_platte.color(QPalette::Disabled, QPalette::NoRole); - break; - case UKUIPaletteRole::ToolTipBase_at: - c = m_platte.color(QPalette::Active, QPalette::ToolTipBase); - break; - case UKUIPaletteRole::ToolTipBase_iat: - c = m_platte.color(QPalette::Inactive, QPalette::ToolTipBase); - break; - case UKUIPaletteRole::ToolTipBase_dis: - c = m_platte.color(QPalette::Disabled, QPalette::ToolTipBase); - break; - case UKUIPaletteRole::ToolTipText_at: - c = m_platte.color(QPalette::Active, QPalette::ToolTipText); - break; - case UKUIPaletteRole::ToolTipText_iat: - c = m_platte.color(QPalette::Inactive, QPalette::ToolTipText); - break; - case UKUIPaletteRole::ToolTipText_dis: - c = m_platte.color(QPalette::Disabled, QPalette::ToolTipText); - break; - case UKUIPaletteRole::PlaceholderText_at: - c = m_platte.color(QPalette::Active, QPalette::PlaceholderText); - break; - case UKUIPaletteRole::PlaceholderText_iat: - c = m_platte.color(QPalette::Inactive, QPalette::PlaceholderText); - break; - case UKUIPaletteRole::PlaceholderText_dis: - c = m_platte.color(QPalette::Disabled, QPalette::PlaceholderText); - break; + return d->lightActive; +} - default: - break; - } +QBrush GlobalDTConfig::lightInactive() const +{ + return d->lightInactive; +} - return c; +QBrush GlobalDTConfig::lightDisable() const +{ + return d->lightDisable; } -void ReadConfig::stringToGradient(QList<QColor> &cl, QString s) const +QBrush GlobalDTConfig::midlightActive() const { - QStringList list = s.split("~"); + return d->midlightActive; +} - if(list.length() == 2) - foreach (QString s, list) { - cl.append(stringToColor(s)); - } +QBrush GlobalDTConfig::midlightInactive() const +{ + return d->midlightInactive; } -bool ReadConfig::setValue(QString key, QVariant value) +QBrush GlobalDTConfig::midlightDisable() const { - QString cfg = m_cfgPath; - if (!QFile::exists(cfg)) { - cWarning << "ReadConfig setValue file not exists!"; - return false; - } + return d->midlightDisable; +} - QFile file(cfg); - if(!file.open(QIODevice::ReadWrite)) { - cWarning << "ReadConfig setValue file Error!"; - return false; - } +QBrush GlobalDTConfig::darkActive() const +{ + return d->darkActive; +} - QByteArray jsonData = file.readAll(); - QJsonParseError error; - QJsonDocument jdoc = QJsonDocument::fromJson(jsonData, &error); - if (error.error != QJsonParseError::NoError) { - cWarning << "QJsonDocument fromJson error!"; - return false; - } - QJsonObject obj = jdoc.object(); - if(obj.contains(key)){ - obj[key] = value.toString(); - } - QJsonDocument jdc; - jdc.setObject(obj); - file.write(jdc.toJson()); - file.close(); +QBrush GlobalDTConfig::darkInactive() const +{ + return d->darkInactive; } -void ReadConfig::widgetPalette(const QPalette platte) +QBrush GlobalDTConfig::darkDisable() const { - m_platte = platte; + return d->darkDisable; } +QBrush GlobalDTConfig::midActive() const +{ + return d->midActive; +} -ReadThemeConfig::ReadThemeConfig(QString colorCfgPath, bool isDark): - m_colorCfgPath(colorCfgPath), - m_themeIsDark(isDark) +QBrush GlobalDTConfig::midInactive() const { - if (m_colorCfgPath.isEmpty()) { - QString path = ColorPath; - m_colorCfgPath = path + "UKUIConfigDefault.json"; - } - m_readConfig = new ReadConfig(m_colorCfgPath); - m_loadConfig = m_readConfig->load(m_colorCfgPath); - if(!m_loadConfig){ - m_readConfig->deleteLater(); - m_readConfig = nullptr; - } - m_theme = m_themeIsDark ? UKUIDarkTheme : UKUILightTheme; + return d->midInactive; +} +QBrush GlobalDTConfig::midDisable() const +{ + return d->midDisable; } -ReadThemeConfig::~ReadThemeConfig() +QBrush GlobalDTConfig::textActive() const { - if (m_readConfig) { - m_readConfig->deleteLater(); - m_readConfig = nullptr; - } + return d->textActive; } -UKUIColorTheme::PaletteColorCfg ReadThemeConfig::paletteColorCfg() +QBrush GlobalDTConfig::textInactive() const { - if(!m_loadConfig) - return m_paletteColorCfg; + return d->textInactive; +} - m_readConfig->getColorValue(m_paletteColorCfg.windowText_at , m_theme, UKUIPalette, c_windowText_at); - m_readConfig->getColorValue(m_paletteColorCfg.windowText_iat , m_theme, UKUIPalette, c_windowText_iat); - m_readConfig->getColorValue(m_paletteColorCfg.windowText_dis , m_theme, UKUIPalette, c_windowText_dis); - m_readConfig->getColorValue(m_paletteColorCfg.button_at , m_theme, UKUIPalette, c_button_at); - m_readConfig->getColorValue(m_paletteColorCfg.button_iat , m_theme, UKUIPalette, c_button_iat); - m_readConfig->getColorValue(m_paletteColorCfg.button_dis , m_theme, UKUIPalette, c_button_dis); - m_readConfig->getColorValue(m_paletteColorCfg.light_at , m_theme, UKUIPalette, c_light_at); - m_readConfig->getColorValue(m_paletteColorCfg.light_iat , m_theme, UKUIPalette, c_light_iat); - m_readConfig->getColorValue(m_paletteColorCfg.light_dis , m_theme, UKUIPalette, c_light_dis); - m_readConfig->getColorValue(m_paletteColorCfg.midlight_at , m_theme, UKUIPalette, c_midlight_at); - m_readConfig->getColorValue(m_paletteColorCfg.midlight_iat , m_theme, UKUIPalette, c_midlight_iat); - m_readConfig->getColorValue(m_paletteColorCfg.midlight_dis , m_theme, UKUIPalette, c_midlight_dis); - m_readConfig->getColorValue(m_paletteColorCfg.dark_at , m_theme, UKUIPalette, c_dark_at); - m_readConfig->getColorValue(m_paletteColorCfg.dark_iat , m_theme, UKUIPalette, c_dark_iat); - m_readConfig->getColorValue(m_paletteColorCfg.dark_dis , m_theme, UKUIPalette, c_dark_dis); - m_readConfig->getColorValue(m_paletteColorCfg.mid_at , m_theme, UKUIPalette, c_mid_at); - m_readConfig->getColorValue(m_paletteColorCfg.mid_iat , m_theme, UKUIPalette, c_mid_iat); - m_readConfig->getColorValue(m_paletteColorCfg.mid_dis , m_theme, UKUIPalette, c_mid_dis); - m_readConfig->getColorValue(m_paletteColorCfg.text_at , m_theme, UKUIPalette, c_text_at); - m_readConfig->getColorValue(m_paletteColorCfg.text_iat , m_theme, UKUIPalette, c_text_iat); - m_readConfig->getColorValue(m_paletteColorCfg.text_dis , m_theme, UKUIPalette, c_text_dis); - m_readConfig->getColorValue(m_paletteColorCfg.brightText_at , m_theme, UKUIPalette, c_brightText_at); - m_readConfig->getColorValue(m_paletteColorCfg.brightText_iat , m_theme, UKUIPalette, c_brightText_iat); - m_readConfig->getColorValue(m_paletteColorCfg.brightText_dis , m_theme, UKUIPalette, c_brightText_dis); - m_readConfig->getColorValue(m_paletteColorCfg.buttonText_at , m_theme, UKUIPalette, c_buttonText_at); - m_readConfig->getColorValue(m_paletteColorCfg.buttonText_iat , m_theme, UKUIPalette, c_buttonText_iat); - m_readConfig->getColorValue(m_paletteColorCfg.buttonText_dis , m_theme, UKUIPalette, c_buttonText_dis); - m_readConfig->getColorValue(m_paletteColorCfg.base_at , m_theme, UKUIPalette, c_base_at); - m_readConfig->getColorValue(m_paletteColorCfg.base_iat , m_theme, UKUIPalette, c_base_iat); - m_readConfig->getColorValue(m_paletteColorCfg.base_dis , m_theme, UKUIPalette, c_base_dis); - m_readConfig->getColorValue(m_paletteColorCfg.window_at , m_theme, UKUIPalette, c_window_at); - m_readConfig->getColorValue(m_paletteColorCfg.window_iat , m_theme, UKUIPalette, c_window_iat); - m_readConfig->getColorValue(m_paletteColorCfg.window_dis , m_theme, UKUIPalette, c_window_dis); - m_readConfig->getColorValue(m_paletteColorCfg.shadow_at , m_theme, UKUIPalette, c_shadow_at); - m_readConfig->getColorValue(m_paletteColorCfg.shadow_iat , m_theme, UKUIPalette, c_shadow_iat); - m_readConfig->getColorValue(m_paletteColorCfg.shadow_dis , m_theme, UKUIPalette, c_shadow_dis); - m_readConfig->getColorValue(m_paletteColorCfg.highLight_at , m_theme, UKUIPalette, c_highLight_at); - m_readConfig->getColorValue(m_paletteColorCfg.highLight_iat , m_theme, UKUIPalette, c_highLight_iat); - m_readConfig->getColorValue(m_paletteColorCfg.highLight_dis , m_theme, UKUIPalette, c_highLight_dis); - m_readConfig->getColorValue(m_paletteColorCfg.highLightText_at , m_theme, UKUIPalette, c_highLightText_at); - m_readConfig->getColorValue(m_paletteColorCfg.highLightText_iat , m_theme, UKUIPalette, c_highLightText_iat); - m_readConfig->getColorValue(m_paletteColorCfg.highLightText_dis , m_theme, UKUIPalette, c_highLightText_dis); - m_readConfig->getColorValue(m_paletteColorCfg.link_at , m_theme, UKUIPalette, c_link_at); - m_readConfig->getColorValue(m_paletteColorCfg.link_iat , m_theme, UKUIPalette, c_link_iat); - m_readConfig->getColorValue(m_paletteColorCfg.link_dis , m_theme, UKUIPalette, c_link_dis); - m_readConfig->getColorValue(m_paletteColorCfg.linkVisited_at , m_theme, UKUIPalette, c_linkVisited_at); - m_readConfig->getColorValue(m_paletteColorCfg.linkVisited_iat , m_theme, UKUIPalette, c_linkVisited_iat); - m_readConfig->getColorValue(m_paletteColorCfg.linkVisited_dis , m_theme, UKUIPalette, c_linkVisited_dis); - m_readConfig->getColorValue(m_paletteColorCfg.alternateBase_at , m_theme, UKUIPalette, c_alternateBase_at); - m_readConfig->getColorValue(m_paletteColorCfg.alternateBase_iat , m_theme, UKUIPalette, c_alternateBase_iat); - m_readConfig->getColorValue(m_paletteColorCfg.alternateBase_dis , m_theme, UKUIPalette, c_alternateBase_dis); - m_readConfig->getColorValue(m_paletteColorCfg.noRole_at , m_theme, UKUIPalette, c_noRole_at); - m_readConfig->getColorValue(m_paletteColorCfg.noRole_iat , m_theme, UKUIPalette, c_noRole_iat); - m_readConfig->getColorValue(m_paletteColorCfg.noRole_dis , m_theme, UKUIPalette, c_noRole_dis); - m_readConfig->getColorValue(m_paletteColorCfg.toolTipBase_at , m_theme, UKUIPalette, c_toolTipBase_at); - m_readConfig->getColorValue(m_paletteColorCfg.toolTipBase_iat , m_theme, UKUIPalette, c_toolTipBase_iat); - m_readConfig->getColorValue(m_paletteColorCfg.toolTipBase_dis , m_theme, UKUIPalette, c_toolTipBase_dis); - m_readConfig->getColorValue(m_paletteColorCfg.toolTipText_at , m_theme, UKUIPalette, c_toolTipText_at); - m_readConfig->getColorValue(m_paletteColorCfg.toolTipText_iat , m_theme, UKUIPalette, c_toolTipText_iat); - m_readConfig->getColorValue(m_paletteColorCfg.toolTipText_dis , m_theme, UKUIPalette, c_toolTipText_dis); - m_readConfig->getColorValue(m_paletteColorCfg.placeholderText_at , m_theme, UKUIPalette, c_placeholderText_at); - m_readConfig->getColorValue(m_paletteColorCfg.placeholderText_iat, m_theme, UKUIPalette, c_placeholderText_iat); - m_readConfig->getColorValue(m_paletteColorCfg.placeholderText_dis, m_theme, UKUIPalette, c_placeholderText_dis); - return m_paletteColorCfg; -} - -UKUIColorTheme::ButtonColorCfg ReadThemeConfig::buttonColorCfg(const QPalette palette, QString property) -{ - if(!m_loadConfig) - return m_buttonColorCfg; - - m_readConfig->widgetPalette(palette); - UKUIColorTheme::ButtonColorCfg buttonCfg; - m_readConfig->getColorValue(buttonCfg.defaultBrush, m_theme, UKUIPushButton, property, C_Button_DefaultBrush); - m_readConfig->getColorValue(buttonCfg.clickBrush , m_theme, UKUIPushButton, property, C_Button_ClickBrush); - m_readConfig->getColorValue(buttonCfg.disableBrush, m_theme, UKUIPushButton, property, C_Button_DisableBrush); - - buttonCfg.hoverType = m_readConfig->getType(m_theme, UKUIPushButton, property, C_Button_HoverBrush); - if(buttonCfg.hoverType == Obj_Gradient_Type){ - buttonCfg.hoverGradientList.clear(); - m_readConfig->getGradientValue(buttonCfg.hoverGradientList , m_theme, UKUIPushButton, property, C_Button_HoverBrush); - } - else{ - m_readConfig->getColorValue(buttonCfg.hoverBrush , m_theme, UKUIPushButton, property, C_Button_HoverBrush); - } +QBrush GlobalDTConfig::textDisable() const +{ + return d->textDisable; +} - m_readConfig->getColorValue(buttonCfg.defaultPen , m_theme, UKUIPushButton, property, C_Button_DefaultPen ); - m_readConfig->getColorValue(buttonCfg.hoverPen , m_theme, UKUIPushButton, property, C_Button_HoverPen ); - m_readConfig->getColorValue(buttonCfg.clickPen , m_theme, UKUIPushButton, property, C_Button_ClickPen ); - m_readConfig->getColorValue(buttonCfg.disablePen , m_theme, UKUIPushButton, property, C_Button_DisablePen ); - m_readConfig->getColorValue(buttonCfg.focusPen , m_theme, UKUIPushButton, property, C_Button_FocusPen ); - m_readConfig->getColorValue(buttonCfg.textColor , m_theme, UKUIPushButton, property, C_Button_TextColor ); - m_readConfig->getColorValue(buttonCfg.textHoverColor , m_theme, UKUIPushButton, property, C_Button_TextHoverColor ); - - m_buttonColorCfg = buttonCfg; - return m_buttonColorCfg; -} - -UKUIColorTheme::ToolButtonColorCfg ReadThemeConfig::toolButtonColorCfg(const QPalette palette, QString property) -{ - if(!m_loadConfig) - return m_toolButtonColorCfg; - - m_readConfig->widgetPalette(palette); - UKUIColorTheme::ToolButtonColorCfg tbcfg; - m_readConfig->getColorValue(tbcfg.defaultBrush, m_theme, UKUIToolButton, property, C_Button_DefaultBrush); - m_readConfig->getColorValue(tbcfg.clickBrush , m_theme, UKUIToolButton, property, C_Button_ClickBrush); - m_readConfig->getColorValue(tbcfg.disableBrush, m_theme, UKUIToolButton, property, C_Button_DisableBrush); - - tbcfg.hoverType = m_readConfig->getType(m_theme, UKUIToolButton, property, C_Button_HoverBrush); - if(tbcfg.hoverType == Obj_Gradient_Type){ - tbcfg.hoverGradientList.clear(); - m_readConfig->getGradientValue(tbcfg.hoverGradientList , m_theme, UKUIToolButton, property, C_Button_HoverBrush); - } - else{ - m_readConfig->getColorValue(tbcfg.hoverBrush , m_theme, UKUIToolButton, property, C_Button_HoverBrush); - } +QBrush GlobalDTConfig::brightTextActive() const +{ + return d->brightTextActive; +} - m_readConfig->getColorValue(tbcfg.defaultPen , m_theme, UKUIToolButton, property, C_Button_DefaultPen ); - m_readConfig->getColorValue(tbcfg.hoverPen , m_theme, UKUIToolButton, property, C_Button_HoverPen ); - m_readConfig->getColorValue(tbcfg.clickPen , m_theme, UKUIToolButton, property, C_Button_ClickPen ); - m_readConfig->getColorValue(tbcfg.disablePen , m_theme, UKUIToolButton, property, C_Button_DisablePen ); - m_readConfig->getColorValue(tbcfg.focusPen , m_theme, UKUIToolButton, property, C_Button_FocusPen ); - m_readConfig->getColorValue(tbcfg.textColor , m_theme, UKUIToolButton, property, C_Button_TextColor ); - m_readConfig->getColorValue(tbcfg.textHoverColor , m_theme, UKUIToolButton, property, C_Button_TextHoverColor ); - - m_toolButtonColorCfg = tbcfg; - return m_toolButtonColorCfg; -} - -UKUIColorTheme::CheckBoxColorCfg ReadThemeConfig::checkBoxColorCfg(const QPalette palette, QString property) -{ - if(!m_loadConfig) - return m_checkBoxColorCfg; - - m_readConfig->widgetPalette(palette); - m_readConfig->getColorValue(m_checkBoxColorCfg.defaultPen , m_theme, UKUICheckBox, property, C_CheckBox_DefaultPen); - m_readConfig->getColorValue(m_checkBoxColorCfg.hoverPen , m_theme, UKUICheckBox, property, C_CheckBox_HoverPen); - m_readConfig->getColorValue(m_checkBoxColorCfg.clickPen , m_theme, UKUICheckBox, property, C_CheckBox_ClickPen); - m_readConfig->getColorValue(m_checkBoxColorCfg.disablePen , m_theme, UKUICheckBox, property, C_CheckBox_DisablePen); - m_readConfig->getColorValue(m_checkBoxColorCfg.onDefaultPen , m_theme, UKUICheckBox, property, C_CheckBox_OnDefaultPen); - m_readConfig->getColorValue(m_checkBoxColorCfg.onHoverPen , m_theme, UKUICheckBox, property, C_CheckBox_OnHoverPen); - m_readConfig->getColorValue(m_checkBoxColorCfg.onClickPen , m_theme, UKUICheckBox, property, C_CheckBox_OnClickPen); - m_readConfig->getColorValue(m_checkBoxColorCfg.contentPen , m_theme, UKUICheckBox, property, C_CheckBox_ContentPen); - - m_readConfig->getColorValue(m_checkBoxColorCfg.defaultBrush , m_theme, UKUICheckBox, property, C_CheckBox_DefaultBrush); - m_readConfig->getColorValue(m_checkBoxColorCfg.clickBrush , m_theme, UKUICheckBox, property, C_CheckBox_ClickBrush); - m_readConfig->getColorValue(m_checkBoxColorCfg.disableBrush , m_theme, UKUICheckBox, property, C_CheckBox_DisableBrush); - m_readConfig->getColorValue(m_checkBoxColorCfg.onDefaultBrush , m_theme, UKUICheckBox, property, C_CheckBox_OnDefaultBrush); - m_readConfig->getColorValue(m_checkBoxColorCfg.pathBrush , m_theme, UKUICheckBox, property, C_CheckBox_PathBrush); - m_readConfig->getColorValue(m_checkBoxColorCfg.pathDisableBrush, m_theme, UKUICheckBox, property, C_CheckBox_PathDisableBrush); - - m_checkBoxColorCfg.hoverType = m_readConfig->getType(m_theme, UKUICheckBox, property, C_CheckBox_HoverBrush); - m_checkBoxColorCfg.onHoverType = m_readConfig->getType(m_theme, UKUICheckBox, property, C_CheckBox_OnHoverBrush); - m_checkBoxColorCfg.onClickType = m_readConfig->getType(m_theme, UKUICheckBox, property, C_CheckBox_OnClickBrush); - - if(m_checkBoxColorCfg.hoverType == Obj_Gradient_Type){ - m_checkBoxColorCfg.hoverGradientList.clear(); - m_readConfig->getGradientValue(m_checkBoxColorCfg.hoverGradientList , m_theme, UKUICheckBox, property, C_CheckBox_HoverBrush); - } - else{ - m_readConfig->getColorValue(m_checkBoxColorCfg.hoverBrush, m_theme, UKUICheckBox, property, C_CheckBox_HoverBrush); - } - if(m_checkBoxColorCfg.onHoverType == Obj_Gradient_Type){ - m_checkBoxColorCfg.onHoverGradientList.clear(); - m_readConfig->getGradientValue(m_checkBoxColorCfg.onHoverGradientList , m_theme, UKUICheckBox, property, C_CheckBox_OnHoverBrush); - } - else{ - m_readConfig->getColorValue(m_checkBoxColorCfg.onHoverBrush, m_theme, UKUICheckBox, property, C_CheckBox_OnHoverBrush); - } - if(m_checkBoxColorCfg.onClickType == Obj_Gradient_Type){ - m_checkBoxColorCfg.onClickGradientList.clear(); - m_readConfig->getGradientValue(m_checkBoxColorCfg.onClickGradientList , m_theme, UKUICheckBox, property, C_CheckBox_OnClickBrush); - } - else{ - m_readConfig->getColorValue(m_checkBoxColorCfg.onClickBrush, m_theme, UKUICheckBox, property, C_CheckBox_OnClickBrush); - } +QBrush GlobalDTConfig::brightTextInactive() const +{ + return d->brightTextInactive; +} - return m_checkBoxColorCfg; +QBrush GlobalDTConfig::brightTextDisable() const +{ + return d->brightTextDisable; } -UKUIColorTheme::RadioButtonColorCfg ReadThemeConfig::radioButtonColorCfg(const QPalette palette, QString property) +QBrush GlobalDTConfig::buttonTextActive() const { - if(!m_loadConfig) - return m_radioButtonColorCfg; + return d->buttonTextActive; +} - m_readConfig->widgetPalette(palette); - m_readConfig->getColorValue(m_radioButtonColorCfg.defaultPen , m_theme, UKUIRadioButton, property, C_RadioButton_DefaultPen); - m_readConfig->getColorValue(m_radioButtonColorCfg.hoverPen , m_theme, UKUIRadioButton, property, C_RadioButton_HoverPen); - m_readConfig->getColorValue(m_radioButtonColorCfg.clickPen , m_theme, UKUIRadioButton, property, C_RadioButton_ClickPen); - m_readConfig->getColorValue(m_radioButtonColorCfg.disablePen , m_theme, UKUIRadioButton, property, C_RadioButton_DisablePen); - m_readConfig->getColorValue(m_radioButtonColorCfg.onDefaultPen , m_theme, UKUIRadioButton, property, C_RadioButton_OnDefaultPen); - m_readConfig->getColorValue(m_radioButtonColorCfg.onHoverPen , m_theme, UKUIRadioButton, property, C_RadioButton_OnHoverPen); - m_readConfig->getColorValue(m_radioButtonColorCfg.onClickPen , m_theme, UKUIRadioButton, property, C_RadioButton_OnClickPen); - - m_readConfig->getColorValue(m_radioButtonColorCfg.defaultBrush , m_theme, UKUIRadioButton, property, C_RadioButton_DefaultBrush); - m_readConfig->getColorValue(m_radioButtonColorCfg.hoverBrush , m_theme, UKUIRadioButton, property, C_RadioButton_HoverBrush); - m_readConfig->getColorValue(m_radioButtonColorCfg.clickBrush , m_theme, UKUIRadioButton, property, C_RadioButton_ClickBrush); - m_readConfig->getColorValue(m_radioButtonColorCfg.disableBrush , m_theme, UKUIRadioButton, property, C_RadioButton_DisableBrush); - m_readConfig->getColorValue(m_radioButtonColorCfg.onDefaultBrush , m_theme, UKUIRadioButton, property, C_RadioButton_OnDefaultBrush); - m_readConfig->getColorValue(m_radioButtonColorCfg.onClickBrush , m_theme, UKUIRadioButton, property, C_RadioButton_OnClickBrush); - m_readConfig->getColorValue(m_radioButtonColorCfg.childrenOnDefaultBrush, m_theme, UKUIRadioButton, property, C_RadioButton_ChildrenOnDefaultBrush); - m_readConfig->getColorValue(m_radioButtonColorCfg.childrenOnHoverBrush , m_theme, UKUIRadioButton, property, C_RadioButton_ChildrenOnHoverBrush); - m_readConfig->getColorValue(m_radioButtonColorCfg.childrenOnClickBrush , m_theme, UKUIRadioButton, property, C_RadioButton_ChildrenOnClickBrush); - m_readConfig->getColorValue(m_radioButtonColorCfg.childrenOnDisableBrush, m_theme, UKUIRadioButton, property, C_RadioButton_ChildrenOnDisableBrush); - - m_radioButtonColorCfg.onHoverType = m_readConfig->getType(m_theme, UKUIRadioButton, property, C_RadioButton_OnHoverBrush); - if(m_radioButtonColorCfg.onHoverType == Obj_Gradient_Type){ - m_radioButtonColorCfg.onHoverGradientList.clear(); - m_readConfig->getGradientValue(m_radioButtonColorCfg.onHoverGradientList , m_theme, UKUIRadioButton, property, C_RadioButton_OnHoverBrush); - } - else{ - m_readConfig->getColorValue(m_radioButtonColorCfg.onHoverBrush, m_theme, UKUIRadioButton, property, C_RadioButton_OnHoverBrush); - } +QBrush GlobalDTConfig::buttonTextInactive() const +{ + return d->buttonTextInactive; +} - return m_radioButtonColorCfg; +QBrush GlobalDTConfig::buttonTextDisable() const +{ + return d->buttonTextDisable; } -UKUIColorTheme::LineEditColorCfg ReadThemeConfig::lineEditColorCfg(const QPalette palette, QString property) +QBrush GlobalDTConfig::baseActive() const { - if(!m_loadConfig) - return m_lineEditColorCfg; + return d->baseActive; +} - m_readConfig->widgetPalette(palette); - m_readConfig->getColorValue(m_lineEditColorCfg.defaultPen , m_theme, UKUILineEdit, property, C_LineEdit_DefaultPen); - m_readConfig->getColorValue(m_lineEditColorCfg.hoverPen , m_theme, UKUILineEdit, property, C_LineEdit_HoverPen); - m_readConfig->getColorValue(m_lineEditColorCfg.focusPen , m_theme, UKUILineEdit, property, C_LineEdit_FocusPen); - m_readConfig->getColorValue(m_lineEditColorCfg.disablePen , m_theme, UKUILineEdit, property, C_LineEdit_DisablePen); +QBrush GlobalDTConfig::baseInactive() const +{ + return d->baseInactive; +} - m_readConfig->getColorValue(m_lineEditColorCfg.defaultBrush, m_theme, UKUILineEdit, property, C_LineEdit_DefaultBrush); - m_readConfig->getColorValue(m_lineEditColorCfg.focusBrush , m_theme, UKUILineEdit, property, C_LineEdit_FocusBrush); - m_readConfig->getColorValue(m_lineEditColorCfg.disableBrush, m_theme, UKUILineEdit, property, C_LineEdit_DisableBrush); +QBrush GlobalDTConfig::baseDisable() const +{ + return d->baseDisable; +} - m_lineEditColorCfg.hoverType = m_readConfig->getType(m_theme, UKUILineEdit, property, C_LineEdit_HoverBrush); - if(m_lineEditColorCfg.hoverType == Obj_Gradient_Type){ - m_lineEditColorCfg.hoverGradientList.clear(); - m_readConfig->getGradientValue(m_lineEditColorCfg.hoverGradientList , m_theme, UKUILineEdit, property, C_LineEdit_HoverBrush); - } - else{ - m_readConfig->getColorValue(m_lineEditColorCfg.hoverBrush, m_theme, UKUILineEdit, property, C_LineEdit_HoverBrush); - } +QBrush GlobalDTConfig::windowActive() const +{ + return d->windowActive; +} - return m_lineEditColorCfg; +QBrush GlobalDTConfig::windowInactive() const +{ + return d->windowInactive; } -UKUIColorTheme::ComboBoxColorCfg ReadThemeConfig::comboBoxColorCfg(const QPalette palette, QString property) +QBrush GlobalDTConfig::windowDisable() const { - if(!m_loadConfig) - return m_comboBoxColorCfg; + return d->windowDisable; +} - m_readConfig->widgetPalette(palette); - m_readConfig->getColorValue(m_comboBoxColorCfg.defaultPen , m_theme, UKUIComboBox, property, C_ComboBox_DefaultPen); - m_readConfig->getColorValue(m_comboBoxColorCfg.hoverPen , m_theme, UKUIComboBox, property, C_ComboBox_HoverPen); - m_readConfig->getColorValue(m_comboBoxColorCfg.onPen , m_theme, UKUIComboBox, property, C_ComboBox_OnPen); - m_readConfig->getColorValue(m_comboBoxColorCfg.editPen , m_theme, UKUIComboBox, property, C_ComboBox_EditPen); - m_readConfig->getColorValue(m_comboBoxColorCfg.disablePen , m_theme, UKUIComboBox, property, C_ComboBox_DisablePen); - - m_readConfig->getColorValue(m_comboBoxColorCfg.defaultBrush, m_theme, UKUIComboBox, property, C_ComboBox_DefaultBrush); - m_readConfig->getColorValue(m_comboBoxColorCfg.hoverBrush , m_theme, UKUIComboBox, property, C_ComboBox_HoverBrush); - m_readConfig->getColorValue(m_comboBoxColorCfg.onBrush , m_theme, UKUIComboBox, property, C_ComboBox_OnBrush); - m_readConfig->getColorValue(m_comboBoxColorCfg.editBrush , m_theme, UKUIComboBox, property, C_ComboBox_EditBrush); - m_readConfig->getColorValue(m_comboBoxColorCfg.disableBrush, m_theme, UKUIComboBox, property, C_ComboBox_DisableBrush); - return m_comboBoxColorCfg; -} - -UKUIColorTheme::SpinBoxColorCfg ReadThemeConfig::spinBoxColorCfg(const QPalette palette, QString property, QString layout) -{ - if(!m_loadConfig) - return m_spinBoxColorCfg; - - m_readConfig->widgetPalette(palette); - m_readConfig->getColorValue(m_spinBoxColorCfg.defaultPen , m_theme, UKUISpinBox, property, layout, C_SpinBox_DefaultPen); - m_readConfig->getColorValue(m_spinBoxColorCfg.hoverPen , m_theme, UKUISpinBox, property, layout, C_SpinBox_HoverPen); - m_readConfig->getColorValue(m_spinBoxColorCfg.focusPen , m_theme, UKUISpinBox, property, layout, C_SpinBox_FocusPen); - m_readConfig->getColorValue(m_spinBoxColorCfg.disablePen , m_theme, UKUISpinBox, property, layout, C_SpinBox_DisablePen); - - m_readConfig->getColorValue(m_spinBoxColorCfg.defaultBrush , m_theme, UKUISpinBox, property, layout, C_SpinBox_DefaultBrush); - m_readConfig->getColorValue(m_spinBoxColorCfg.focusBrush , m_theme, UKUISpinBox, property, layout, C_SpinBox_FocusBrush); - m_readConfig->getColorValue(m_spinBoxColorCfg.disableBrush , m_theme, UKUISpinBox, property, layout, C_SpinBox_DisableBrush); - m_readConfig->getColorValue(m_spinBoxColorCfg.upClickBrush , m_theme, UKUISpinBox, property, layout, C_SpinBox_UpClickBrush ); - m_readConfig->getColorValue(m_spinBoxColorCfg.upDefaultBrush , m_theme, UKUISpinBox, property, layout, C_SpinBox_UpDefaultBrush ); - m_readConfig->getColorValue(m_spinBoxColorCfg.downClickBrush , m_theme, UKUISpinBox, property, layout, C_SpinBox_DownClickBrush ); - m_readConfig->getColorValue(m_spinBoxColorCfg.downDefaultBrush , m_theme, UKUISpinBox, property, layout, C_SpinBox_DownDefaultBrush ); - - m_spinBoxColorCfg.hoverType = m_readConfig->getType(m_theme, UKUISpinBox, property, layout, C_SpinBox_HoverBrush); - m_spinBoxColorCfg.upHoverBrushType = m_readConfig->getType(m_theme, UKUISpinBox, property, layout, C_SpinBox_UpHoverBrush); - m_spinBoxColorCfg.upFocusHoverBrushType = m_readConfig->getType(m_theme, UKUISpinBox, property, layout, C_SpinBox_UpFocusHoverBrush); - m_spinBoxColorCfg.downHoverBrushType = m_readConfig->getType(m_theme, UKUISpinBox, property, layout, C_SpinBox_DownHoverBrush); - m_spinBoxColorCfg.downFocusHoverBrushType = m_readConfig->getType(m_theme, UKUISpinBox, property, layout, C_SpinBox_DownFocusHoverBrush); - - if(m_spinBoxColorCfg.hoverType == Obj_Gradient_Type){ - m_spinBoxColorCfg.hoverGradientList.clear(); - m_readConfig->getGradientValue(m_spinBoxColorCfg.hoverGradientList , m_theme, UKUISpinBox, property, layout, C_SpinBox_HoverBrush); - } - else { - m_readConfig->getColorValue(m_spinBoxColorCfg.hoverBrush, m_theme, UKUISpinBox, property, layout, C_SpinBox_HoverBrush); - } +QBrush GlobalDTConfig::shadowActive() const +{ + return d->shadowActive; +} - if(m_spinBoxColorCfg.upHoverBrushType == Obj_Gradient_Type){ - m_spinBoxColorCfg.upHoverBrushGradientList.clear(); - m_readConfig->getGradientValue(m_spinBoxColorCfg.upHoverBrushGradientList , m_theme, UKUISpinBox, property, layout, C_SpinBox_UpHoverBrush); - } - else{ - m_readConfig->getColorValue(m_spinBoxColorCfg.upHoverBrush, m_theme, UKUISpinBox, property, layout, C_SpinBox_UpHoverBrush); - } +QBrush GlobalDTConfig::shadowInactive() const +{ + return d->shadowInactive; +} - if(m_spinBoxColorCfg.upFocusHoverBrushType == Obj_Gradient_Type){ - m_spinBoxColorCfg.upFocusHoverBrushGradientList.clear(); - m_readConfig->getGradientValue(m_spinBoxColorCfg.upFocusHoverBrushGradientList , m_theme, UKUISpinBox, property, layout, C_SpinBox_UpFocusHoverBrush); - } - else{ - m_readConfig->getColorValue(m_spinBoxColorCfg.upFocusHoverBrush, m_theme, UKUISpinBox, property, layout, C_SpinBox_UpFocusHoverBrush); - } +QBrush GlobalDTConfig::shadowDisable() const +{ + return d->shadowDisable; +} - if(m_spinBoxColorCfg.downHoverBrushType == Obj_Gradient_Type){ - m_spinBoxColorCfg.downHoverBrushGradientList.clear(); - m_readConfig->getGradientValue(m_spinBoxColorCfg.downHoverBrushGradientList , m_theme, UKUISpinBox, property, layout, C_SpinBox_DownHoverBrush); - } - else{ - m_readConfig->getColorValue(m_spinBoxColorCfg.downHoverBrush, m_theme, UKUISpinBox, property, layout, C_SpinBox_DownHoverBrush); - } +QBrush GlobalDTConfig::highLightActive() const +{ + return d->highLightActive; +} - if(m_spinBoxColorCfg.downFocusHoverBrushType == Obj_Gradient_Type){ - m_spinBoxColorCfg.downFocusHoverBrushGradientList.clear(); - m_readConfig->getGradientValue(m_spinBoxColorCfg.downFocusHoverBrushGradientList , m_theme, UKUISpinBox, property, layout, C_SpinBox_DownFocusHoverBrush); - } - else{ - m_readConfig->getColorValue(m_spinBoxColorCfg.downFocusHoverBrush, m_theme, UKUISpinBox, property, layout, C_SpinBox_DownFocusHoverBrush); - } +QBrush GlobalDTConfig::highLightInactive() const +{ + return d->highLightInactive; +} - m_readConfig->getColorValue(m_spinBoxColorCfg.upDefaultPen , m_theme, UKUISpinBox, property, layout, C_SpinBox_UpDefaultPen ); - m_readConfig->getColorValue(m_spinBoxColorCfg.upHoverPen , m_theme, UKUISpinBox, property, layout, C_SpinBox_UpHoverPen ); - m_readConfig->getColorValue(m_spinBoxColorCfg.upDisablePen , m_theme, UKUISpinBox, property, layout, C_SpinBox_UpDisablePen ); - m_readConfig->getColorValue(m_spinBoxColorCfg.upClickPen , m_theme, UKUISpinBox, property, layout, C_SpinBox_UpClickPen ); - m_readConfig->getColorValue(m_spinBoxColorCfg.upFocusPen , m_theme, UKUISpinBox, property, layout, C_SpinBox_UpFocusPen ); - - m_readConfig->getColorValue(m_spinBoxColorCfg.downDefaultPen , m_theme, UKUISpinBox, property, layout, C_SpinBox_DownDefaultPen ); - m_readConfig->getColorValue(m_spinBoxColorCfg.downHoverPen , m_theme, UKUISpinBox, property, layout, C_SpinBox_DownHoverPen ); - m_readConfig->getColorValue(m_spinBoxColorCfg.downDisablePen , m_theme, UKUISpinBox, property, layout, C_SpinBox_DownDisablePen ); - m_readConfig->getColorValue(m_spinBoxColorCfg.downClickPen , m_theme, UKUISpinBox, property, layout, C_SpinBox_DownClickPen ); - m_readConfig->getColorValue(m_spinBoxColorCfg.downFocusPen , m_theme, UKUISpinBox, property, layout, C_SpinBox_DownFocusPen ); - - return m_spinBoxColorCfg; -} - -UKUIColorTheme::TableColorCfg ReadThemeConfig::tableColorCfg(const QPalette palette, QString property) -{ - if(!m_loadConfig) - return m_tableColorCfg; - - m_readConfig->getColorValue(m_tableColorCfg.defaultBrush ,m_theme, UKUITable, property, C_Table_DefaultBrush); - m_readConfig->getColorValue(m_tableColorCfg.selectBrush ,m_theme, UKUITable, property, C_Table_SelectBrush); - m_readConfig->getColorValue(m_tableColorCfg.disableBrush ,m_theme, UKUITable, property, C_Table_DisableBrush); - - m_readConfig->getColorValue(m_tableColorCfg.hoverPen ,m_theme, UKUITable, property, C_Table_HoverPen); - m_readConfig->getColorValue(m_tableColorCfg.selectPen ,m_theme, UKUITable, property, C_Table_SelectPen); - m_readConfig->getColorValue(m_tableColorCfg.textHoverPen ,m_theme, UKUITable, property, C_Table_TextHoverPen); - m_readConfig->getColorValue(m_tableColorCfg.textSelectPen ,m_theme, UKUITable, property, C_Table_TextSelectPen); - - m_tableColorCfg.hoverType = m_readConfig->getType(m_theme, UKUITable, property, C_Table_HoverBrush); - if(m_tableColorCfg.hoverType == Obj_Gradient_Type){ - m_tableColorCfg.hoverGradientList.clear(); - m_readConfig->getGradientValue(m_tableColorCfg.hoverGradientList , m_theme, UKUITable, property, C_Table_HoverBrush); - } - else if(m_tableColorCfg.hoverType == Obj_Color_Type){ - m_readConfig->getColorValue(m_tableColorCfg.hoverBrush, m_theme, UKUITable, property, C_Table_HoverBrush); - } - return m_tableColorCfg; +QBrush GlobalDTConfig::highLightDisable() const +{ + return d->highLightDisable; } -UKUIColorTheme::ListViewColorCfg ReadThemeConfig::listViewColorCfg(const QPalette palette, QString property) +QBrush GlobalDTConfig::highLightedTextActive() const { - if(!m_loadConfig) - return m_listViewColorCfg; + return d->highLightedTextActive; +} - m_readConfig->widgetPalette(palette); - m_readConfig->getColorValue(m_listViewColorCfg.defaultBrush , m_theme, UKUIListView, property, C_ListView_DefaultBrush); - m_readConfig->getColorValue(m_listViewColorCfg.selectBrush , m_theme, UKUIListView, property, C_ListView_SelectBrush); - m_readConfig->getColorValue(m_listViewColorCfg.disableBrush , m_theme, UKUIListView, property, C_ListView_DisableBrush); +QBrush GlobalDTConfig::highLightedTextInactive() const +{ + return d->highLightedTextInactive; +} - m_readConfig->getColorValue(m_listViewColorCfg.textHoverPen , m_theme, UKUIListView, property, C_ListView_TextHoverPen); - m_readConfig->getColorValue(m_listViewColorCfg.textSelectPen, m_theme, UKUIListView, property, C_ListView_TextSelectPen); +QBrush GlobalDTConfig::highLightedTextDisable() const +{ + return d->highLightedTextDisable; +} +QBrush GlobalDTConfig::linkActive() const +{ + return d->linkActive; +} - m_listViewColorCfg.hoverType = m_readConfig->getType(m_theme, UKUIListView, property, C_ListView_HoverBrush); - if(m_listViewColorCfg.hoverType == Obj_Gradient_Type){ - m_listViewColorCfg.hoverGradientList.clear(); - m_readConfig->getGradientValue(m_listViewColorCfg.hoverGradientList , m_theme, UKUIListView, property, C_ListView_HoverBrush); - } - else{ - m_readConfig->getColorValue(m_listViewColorCfg.hoverBrush, m_theme, UKUIListView, property, C_ListView_HoverBrush); - } +QBrush GlobalDTConfig::linkInactive() const +{ + return d->linkInactive; +} - m_readConfig->getColorValue(m_listViewColorCfg.hoverPen , m_theme, UKUIListView, property, C_ListView_HoverPen); - m_readConfig->getColorValue(m_listViewColorCfg.selectPen, m_theme, UKUIListView, property, C_ListView_SelectPen); +QBrush GlobalDTConfig::linkDisable() const +{ + return d->linkDisable; +} - return m_listViewColorCfg; +QBrush GlobalDTConfig::linkVisitedActive() const +{ + return d->linkVisitedActive; } -UKUIColorTheme::TreeViewColorCfg ReadThemeConfig::treeViewColorCfg(const QPalette palette, QString property) +QBrush GlobalDTConfig::linkVisitedInactive() const { - if(!m_loadConfig) - return m_treeViewColorCfg; + return d->linkVisitedInactive; +} - m_readConfig->widgetPalette(palette); - m_readConfig->getColorValue(m_treeViewColorCfg.defaultBrush , m_theme, UKUITreeView, property, C_TreeView_DefaultBrush); - m_readConfig->getColorValue(m_treeViewColorCfg.selectBrush , m_theme, UKUITreeView, property, C_TreeView_SelectBrush); - m_readConfig->getColorValue(m_treeViewColorCfg.disableBrush , m_theme, UKUITreeView, property, C_TreeView_DisableBrush); - m_readConfig->getColorValue(m_treeViewColorCfg.branchDefaultBrush, m_theme, UKUITreeView, property, C_TreeView_BranchDefaultBrush); - m_readConfig->getColorValue(m_treeViewColorCfg.branchSelectBrush , m_theme, UKUITreeView, property, C_TreeView_BranchSelectBrush); - m_readConfig->getColorValue(m_treeViewColorCfg.branchDisableBrush, m_theme, UKUITreeView, property, C_TreeView_BranchDisableBrush); +QBrush GlobalDTConfig::linkVisitedDisable() const +{ + return d->linkVisitedDisable; +} - m_readConfig->getColorValue(m_treeViewColorCfg.textHoverPen , m_theme, UKUITreeView, property, C_TreeView_TextHoverPen); - m_readConfig->getColorValue(m_treeViewColorCfg.textSelectPen , m_theme, UKUITreeView, property, C_TreeView_TextSelectPen); +QBrush GlobalDTConfig::alternateBaseActive() const +{ + return d->alternateBaseActive; +} +QBrush GlobalDTConfig::alternateBaseInactive() const +{ + return d->alternateBaseInactive; +} - m_treeViewColorCfg.hoverType = m_readConfig->getType(m_theme, UKUITreeView, property, C_TreeView_HoverBrush); - if(m_treeViewColorCfg.hoverType == Obj_Gradient_Type){ - m_treeViewColorCfg.hoverGradientList.clear(); - m_readConfig->getGradientValue(m_treeViewColorCfg.hoverGradientList , m_theme, UKUITreeView, property, C_TreeView_HoverBrush); - } - else{ - m_readConfig->getColorValue(m_treeViewColorCfg.hoverBrush, m_theme, UKUITreeView, property, C_TreeView_HoverBrush); - } - m_treeViewColorCfg.branchHoverType = m_readConfig->getType(m_theme, UKUITreeView, property, C_TreeView_BranchHoverBrush); - if(m_treeViewColorCfg.branchHoverType == Obj_Gradient_Type){ - m_treeViewColorCfg.branchHoverGradientList.clear(); - m_readConfig->getGradientValue(m_treeViewColorCfg.branchHoverGradientList , m_theme, UKUITreeView, property, C_TreeView_BranchHoverBrush); - } - else{ - m_readConfig->getColorValue(m_treeViewColorCfg.branchHoverBrush, m_theme, UKUITreeView, property, C_TreeView_BranchHoverBrush); - } - m_readConfig->getColorValue(m_treeViewColorCfg.hoverPen , m_theme, UKUITreeView, property, C_TreeView_HoverPen); - m_readConfig->getColorValue(m_treeViewColorCfg.selectPen, m_theme, UKUITreeView, property, C_TreeView_SelectPen); - m_readConfig->getColorValue(m_treeViewColorCfg.branchhoverPen , m_theme, UKUITreeView, property, C_TreeView_BranchHoverPen); - m_readConfig->getColorValue(m_treeViewColorCfg.branchselectPen, m_theme, UKUITreeView, property, C_TreeView_BranchSelectPen); - - return m_treeViewColorCfg; -} - -UKUIColorTheme::SliderBarColorCfg ReadThemeConfig::sliderBarColorCfg(const QPalette palette, QString property) -{ - if(!m_loadConfig) - return m_sliderBarColorCfg; - - m_readConfig->widgetPalette(palette); - m_readConfig->getColorValue(m_sliderBarColorCfg.handleDefaultBrush , m_theme, UKUISliderBar, property, C_SliderBar_HandleDefaultBrush ); - m_readConfig->getColorValue(m_sliderBarColorCfg.handleClickBrush , m_theme, UKUISliderBar, property, C_SliderBar_HandleClickBrush ); - m_readConfig->getColorValue(m_sliderBarColorCfg.handleDisableBrush , m_theme, UKUISliderBar, property, C_SliderBar_HandleDisableBrush ); - m_readConfig->getColorValue(m_sliderBarColorCfg.grooveValueDefaultBrush , m_theme, UKUISliderBar, property, C_SliderBar_GrooveValueDefaultBrush ); - m_readConfig->getColorValue(m_sliderBarColorCfg.grooveValueHoverBrush , m_theme, UKUISliderBar, property, C_SliderBar_GrooveValueHoverBrush ); - m_readConfig->getColorValue(m_sliderBarColorCfg.grooveValueDisableBrush , m_theme, UKUISliderBar, property, C_SliderBar_GrooveValueDisableBrush ); - m_readConfig->getColorValue(m_sliderBarColorCfg.grooveUnvalueDefaultBrush, m_theme, UKUISliderBar, property, C_SliderBar_GrooveUnvalueDefaultBrush); - m_readConfig->getColorValue(m_sliderBarColorCfg.grooveUnvalueHoverBrush , m_theme, UKUISliderBar, property, C_SliderBar_GrooveUnvalueHoverBrush ); - m_readConfig->getColorValue(m_sliderBarColorCfg.grooveUnvalueDisableBrush, m_theme, UKUISliderBar, property, C_SliderBar_GrooveUnvalueDisableBrush); - m_readConfig->getColorValue(m_sliderBarColorCfg.handleDefaultPen, m_theme, UKUISliderBar, property, C_SliderBar_HandleDefaultPen); - m_readConfig->getColorValue(m_sliderBarColorCfg.handleHoverPen , m_theme, UKUISliderBar, property, C_SliderBar_HandleHoverPen ); - m_readConfig->getColorValue(m_sliderBarColorCfg.handleClickPen , m_theme, UKUISliderBar, property, C_SliderBar_HandleClickPen ); - m_readConfig->getColorValue(m_sliderBarColorCfg.handleDisablePen, m_theme, UKUISliderBar, property, C_SliderBar_HandleDisablePen); - m_readConfig->getColorValue(m_sliderBarColorCfg.sliderGroovePen , m_theme, UKUISliderBar, property, C_SliderBar_SliderGroovePen ); - - m_sliderBarColorCfg.handleHoverType = m_readConfig->getType(m_theme, UKUISliderBar, property, C_SliderBar_HandleHoverBrush); - if(m_sliderBarColorCfg.handleHoverType == Obj_Gradient_Type){ - m_sliderBarColorCfg.handleHoverGradientList.clear(); - m_readConfig->getGradientValue(m_sliderBarColorCfg.handleHoverGradientList , m_theme, UKUISliderBar, property, C_SliderBar_HandleHoverBrush); - } - else { - m_readConfig->getColorValue(m_sliderBarColorCfg.handleHoverBrush, m_theme, UKUISliderBar, property, C_SliderBar_HandleHoverBrush); - } +QBrush GlobalDTConfig::alternateBaseDisable() const +{ + return d->alternateBaseDisable; +} - return m_sliderBarColorCfg; +QBrush GlobalDTConfig::noRoleActive() const +{ + return d->noRoleActive; } -UKUIColorTheme::ProgressBarColorCfg ReadThemeConfig::progressBarColorCfg(const QPalette palette, QString property) +QBrush GlobalDTConfig::noRoleInactive() const { - if(!m_loadConfig) - return m_progressBarColorCfg; + return d->noRoleInactive; +} - m_readConfig->widgetPalette(palette); - m_readConfig->getColorValue(m_progressBarColorCfg.contentStartColor , m_theme, UKUIProgressBar, property, C_ProgressBar_ContentStartColor ); - m_readConfig->getColorValue(m_progressBarColorCfg.contentEndColor , m_theme, UKUIProgressBar, property, C_ProgressBar_ContentEndColor ); - m_readConfig->getColorValue(m_progressBarColorCfg.contentBrush , m_theme, UKUIProgressBar, property, C_ProgressBar_ContentBrush ); - m_readConfig->getColorValue(m_progressBarColorCfg.grooveDefaultBrush, m_theme, UKUIProgressBar, property, C_ProgressBar_GrooveDefaultBrush); - m_readConfig->getColorValue(m_progressBarColorCfg.grooveDisableBrush, m_theme, UKUIProgressBar, property, C_ProgressBar_GrooveDisableBrush); +QBrush GlobalDTConfig::noRoleDisable() const +{ + return d->noRoleDisable; +} - m_readConfig->getColorValue(m_progressBarColorCfg.contentPen , m_theme, UKUIProgressBar, property, C_ProgressBar_ContentPen ); - m_readConfig->getColorValue(m_progressBarColorCfg.grooveDefaultPen, m_theme, UKUIProgressBar, property, C_ProgressBar_GrooveDefaultPen); - m_readConfig->getColorValue(m_progressBarColorCfg.grooveDisablePen, m_theme, UKUIProgressBar, property, C_ProgressBar_GrooveDisablePen); +QBrush GlobalDTConfig::toolTipBaseActive() const +{ + return d->toolTipBaseActive; +} - return m_progressBarColorCfg; +QBrush GlobalDTConfig::toolTipBaseInactive() const +{ + return d->toolTipBaseInactive; } -UKUIColorTheme::ToolTipColorCfg ReadThemeConfig::toolTipColorCfg(const QPalette palette, QString property) +QBrush GlobalDTConfig::toolTipBaseDisable() const { - if(!m_loadConfig) - return m_toolTipColorCfg; + return d->toolTipBaseDisable; +} - m_readConfig->getColorValue(m_toolTipColorCfg.backgroundBrush, m_theme, UKUIToolTip, property, C_ToolTip_BackgroundBrush); - m_readConfig->getColorValue(m_toolTipColorCfg.backgroundPen, m_theme, UKUIToolTip, property, C_ToolTip_BackgroundPen); - return m_toolTipColorCfg; +QBrush GlobalDTConfig::toolTipTextActive() const +{ + return d->toolTipTextActive; } -UKUIColorTheme::ScrollBarColorCfg ReadThemeConfig::scrollBarColorCfg(const QPalette palette, QString property) +QBrush GlobalDTConfig::toolTipTextInactive() const { - if(!m_loadConfig) - return m_scrollBarColorCfg; + return d->toolTipTextInactive; +} - m_readConfig->widgetPalette(palette); - m_readConfig->getColorValue(m_scrollBarColorCfg.grooveDefaultBrush , m_theme, UKUIScrollBar, property, C_ScrollBar_GrooveDefaultBrush ); - m_readConfig->getColorValue(m_scrollBarColorCfg.grooveInactiveBrush, m_theme, UKUIScrollBar, property, C_ScrollBar_GrooveInactiveBrush ); - m_readConfig->getColorValue(m_scrollBarColorCfg.sliderDefaultBrush , m_theme, UKUIScrollBar, property, C_ScrollBar_SliderDefaultBrush ); - m_readConfig->getColorValue(m_scrollBarColorCfg.sliderClickBrush , m_theme, UKUIScrollBar, property, C_ScrollBar_SliderClickBrush ); - m_readConfig->getColorValue(m_scrollBarColorCfg.sliderDisableBrush , m_theme, UKUIScrollBar, property, C_ScrollBar_SliderDisableBrush ); +QBrush GlobalDTConfig::toolTipTextDisable() const +{ + return d->toolTipTextDisable; +} - m_scrollBarColorCfg.sliderHoverType = m_readConfig->getType(m_theme, UKUIScrollBar, property, C_ScrollBar_SliderHoverBrush); - if(m_scrollBarColorCfg.sliderHoverType == Obj_Gradient_Type){ - m_scrollBarColorCfg.sliderHoverGradientList.clear(); - m_readConfig->getGradientValue(m_scrollBarColorCfg.sliderHoverGradientList , m_theme, UKUIScrollBar, property, C_ScrollBar_SliderHoverBrush); - } - else if(m_scrollBarColorCfg.sliderHoverType == Obj_Color_Type){ - m_readConfig->getColorValue(m_scrollBarColorCfg.sliderHoverBrush, m_theme, UKUIScrollBar, property, C_ScrollBar_SliderHoverBrush); - } - return m_scrollBarColorCfg; +QBrush GlobalDTConfig::placeholderTextActive() const +{ + return d->placeholderTextActive; } -UKUIColorTheme::TabWidgetColorCfg ReadThemeConfig::tabWidgetColorCfg(const QPalette palette, QString property) +QBrush GlobalDTConfig::placeholderTextInactive() const { - if(!m_loadConfig) - return m_tabWidgetColorCfg; + return d->placeholderTextInactive; +} - m_readConfig->widgetPalette(palette); - m_readConfig->getColorValue(m_tabWidgetColorCfg.widgetBackgroundBrush, m_theme, UKUITabWidget, property, C_TabWidget_WidgetBackgroundBrush); - m_readConfig->getColorValue(m_tabWidgetColorCfg.tabBarBackgroundBrush, m_theme, UKUITabWidget, property, C_TabWidget_TabBarBackgroundBrush); - m_readConfig->getColorValue(m_tabWidgetColorCfg.tabBarDefaultBrush , m_theme, UKUITabWidget, property, C_TabWidget_TabBarDefaultBrush ); - m_readConfig->getColorValue(m_tabWidgetColorCfg.tabBarSelectBrush , m_theme, UKUITabWidget, property, C_TabWidget_TabBarSelectBrush ); - m_readConfig->getColorValue(m_tabWidgetColorCfg.tabBarClickBrush , m_theme, UKUITabWidget, property, C_TabWidget_TabBarClickBrush ); - m_readConfig->getColorValue(m_tabWidgetColorCfg.tabBarHoverPen , m_theme, UKUITabWidget, property, C_TabWidget_TabBarHoverPen ); - m_readConfig->getColorValue(m_tabWidgetColorCfg.tabBarClickPen , m_theme, UKUITabWidget, property, C_TabWidget_TabBarClickPen ); - - m_tabWidgetColorCfg.tabBarHoverType = m_readConfig->getType(m_theme, UKUITabWidget, property, C_TabWidget_TabBarHoverBrush); - if(m_tabWidgetColorCfg.tabBarHoverType == Obj_Gradient_Type){ - m_tabWidgetColorCfg.tabBarHoverGradientList.clear(); - m_readConfig->getGradientValue(m_tabWidgetColorCfg.tabBarHoverGradientList , m_theme, UKUITabWidget, property, C_TabWidget_TabBarHoverBrush); - } - else{ - m_readConfig->getColorValue(m_tabWidgetColorCfg.tabBarHoverBrush, m_theme, UKUITabWidget, property, C_TabWidget_TabBarHoverBrush); - } +QBrush GlobalDTConfig::placeholderTextDisable() const +{ + return d->placeholderTextDisable; +} - return m_tabWidgetColorCfg; +QBrush GlobalDTConfig::kComponentNormal() const +{ + return d->kComponentNormal; } -UKUIColorTheme::MenuColorCfg ReadThemeConfig::menuColorCfg(QString property) +QBrush GlobalDTConfig::kLineBrandDisable() const { - if(!m_loadConfig) - return m_menuColorCfg; + return d->kLineBrandDisable; +} - m_readConfig->getColorValue(m_menuColorCfg.menuBackgroundBrush, m_theme, UKUIMenu, property, C_Menu_MenuBackgroundBrush); - m_readConfig->getColorValue(m_menuColorCfg.menuBackgroundPen, m_theme, UKUIMenu, property, C_Menu_MenuBackgroundPen); - m_readConfig->getColorValue(m_menuColorCfg.menuItemSelectBrush, m_theme, UKUIMenu, property, C_Menu_MenuItemSelectBrush); - m_readConfig->getColorValue(m_menuColorCfg.menuTextHoverPen , m_theme, UKUIMenu, property, C_Menu_MenuTextHoverPen ); +QBrush GlobalDTConfig::kFontWhiteSecondary() const +{ + return d->kFontWhiteSecondary; +} - return m_menuColorCfg; +QBrush GlobalDTConfig::kGray12() const +{ + return d->kGray12; } +QBrush GlobalDTConfig::kContainSecondaryAlpphaNormal() const +{ + return d->kContainSecondaryAlpphaNormal; +} -bool ReadThemeConfig::setRadius(QString key, int r) +QBrush GlobalDTConfig::kGray16() const { - if(!m_loadConfig) - return false; - m_readConfig->setValue(key, r); + return d->kGray16; } -void ReadThemeConfig::getRadius(QString key, int &r) +QBrush GlobalDTConfig::kBrand1() const { - if(!m_loadConfig) - return; - QJsonObject obj = m_readConfig->getValue(UKUI_Radius, key).toJsonObject(); - if (obj.isEmpty()) { - cWarning << "getRadius isempty!" << key; - return; - } - if (obj.value(Obj_Type) != Obj_Int_Type) { - cWarning << "get radius value type error!" << obj.value(Obj_Type).toString() << key; - return; - } - if(obj.value(Obj_Value).toString().isEmpty()){ - cWarning << "obj" << Obj_Value << "key isempty!"; - return; - } - r = QString(obj.value(Obj_Value).toString()).toInt(); - return; + return d->kBrand1; +} + +QBrush GlobalDTConfig::kLineComponentNormal() const +{ + return d->kLineComponentNormal; } -UKUIRadiusInformation::UKUIRadiusStruct ReadThemeConfig::getRadiusStruct(QString key) +QBrush GlobalDTConfig::kLineBrandClick() const { - if(!m_loadConfig) - return m_radiusStruct; + return d->kLineBrandClick; +} - getRadius(Max_Radius, m_radiusStruct.maxRadius); - getRadius(Normal_Radius, m_radiusStruct.normalRadius); - getRadius(Min_Radius, m_radiusStruct.minRadius); - return m_radiusStruct; +QBrush GlobalDTConfig::kGray3() const +{ + return d->kGray3; } -QString ReadThemeConfig::getColorValueAdjustRules() +QBrush GlobalDTConfig::kGray0() const { - if(!m_loadConfig) - return ""; - if(m_readConfig->getValue(ColorAdjustRules).toString().isEmpty()) - return ""; - return m_readConfig->getValue(ColorAdjustRules).toString(); + return d->kGray0; } +QBrush GlobalDTConfig::kLineDisable() const +{ + return d->kLineDisable; +} -/* -RadiusConfig::RadiusConfig(QString cfgPath): - m_cfgPath(cfgPath) +QBrush GlobalDTConfig::kGrayAlpha2() const { - if (m_cfgPath.isEmpty()) { - QString path = UsrRadiusPath; - m_cfgPath = path + "UKUIConfigDefault.json"; - } - m_readConfig = new ReadConfig(m_cfgPath); - m_loadConfig = m_readConfig->load(m_cfgPath); - cDebug << "m_cfgPath:" << m_cfgPath << "m_loadConfig:" << m_loadConfig; - - if(!m_loadConfig){ - m_readConfig->deleteLater(); - m_readConfig = nullptr; - } + return d->kGrayAlpha2; } -RadiusConfig::~RadiusConfig() +QBrush GlobalDTConfig::kGrayAlpha0() const { + return d->kGrayAlpha0; +} +QBrush GlobalDTConfig::kBrand2() const +{ + return d->kBrand2; } -bool RadiusConfig::setRadius(QString key, int r) +QBrush GlobalDTConfig::kLineNormal() const { - if(!m_loadConfig) - return false; - m_readConfig->setValue(key, r); + return d->kLineNormal; } -void RadiusConfig::getRadius(QString key, int &r) +QBrush GlobalDTConfig::kGrayAlpha5() const { - if(!m_loadConfig) - return; - QJsonObject obj = m_readConfig->getValue(UKUI_Radius, key).toJsonObject(); - if (obj.isEmpty()) { - cDebug << "getRadius isempty!" << key; - return; - } - if (obj.value(Obj_Type) != Obj_Int_Type) { - cDebug << "get radius value type error!" << obj.value(Obj_Type).toString() << key; - return; - } - if(obj.value(Obj_Value).toString().isEmpty()){ - cDebug << "obj" << Obj_Value << "key isempty!"; - return; - } - r = QString(obj.value(Obj_Value).toString()).toInt(); - return; + return d->kGrayAlpha5; +} + +QBrush GlobalDTConfig::kGrayAlpha12() const +{ + return d->kGrayAlpha12; +} + +QBrush GlobalDTConfig::kErrorClick() const +{ + return d->kErrorClick; +} + +QBrush GlobalDTConfig::kLineWindowActive() const +{ + return d->kLineWindowActive; +} + +QBrush GlobalDTConfig::kComponentAlphaClick() const +{ + return d->kComponentAlphaClick; +} + +QBrush GlobalDTConfig::kBrand3() const +{ + return d->kBrand3; +} + +QBrush GlobalDTConfig::kSuccessNormal() const +{ + return d->kSuccessNormal; +} + +QBrush GlobalDTConfig::kGrayAlpha1() const +{ + return d->kGrayAlpha1; +} + +QBrush GlobalDTConfig::kFontWhiteSecondaryDisable() const +{ + return d->kFontWhiteSecondaryDisable; +} + +QBrush GlobalDTConfig::kGray4() const +{ + return d->kGray4; +} + +QBrush GlobalDTConfig::kContainClick() const +{ + return d->kContainClick; +} + +QBrush GlobalDTConfig::kGray8() const +{ + return d->kGray8; +} + +QBrush GlobalDTConfig::kGrayAlpha4() const +{ + return d->kGrayAlpha4; } -*/ + +QBrush GlobalDTConfig::kModalmask() const +{ + return d->kModalmask; +} + +QBrush GlobalDTConfig::kLineBrandNormal() const +{ + return d->kLineBrandNormal; +} + +QBrush GlobalDTConfig::kBrand5() const +{ + return d->kBrand5; +} + +QBrush GlobalDTConfig::kGray10() const +{ + return d->kGray10; +} + +QBrush GlobalDTConfig::kWarningNormal() const +{ + return d->kWarningNormal; +} + +QBrush GlobalDTConfig::kGray9() const +{ + return d->kGray9; +} + +QBrush GlobalDTConfig::kGray1() const +{ + return d->kGray1; +} + +QBrush GlobalDTConfig::kGray14() const +{ + return d->kGray14; +} + +QBrush GlobalDTConfig::kLineComponentClick() const +{ + return d->kLineComponentClick; +} + +QBrush GlobalDTConfig::kWhite() const +{ + return d->kWhite; +} + +QBrush GlobalDTConfig::kGray7() const +{ + return d->kGray7; +} + +QBrush GlobalDTConfig::kBrandFocus() const +{ + return d->kBrandFocus; +} + +QBrush GlobalDTConfig::kGrayAlpha9() const +{ + return d->kGrayAlpha9; +} + +QBrush GlobalDTConfig::kGrayAlpha10() const +{ + return d->kGrayAlpha10; +} + +QBrush GlobalDTConfig::kGrayAlpha6() const +{ + return d->kGrayAlpha6; +} + +QBrush GlobalDTConfig::kContainHover() const +{ + return d->kContainHover; +} + +QBrush GlobalDTConfig::kLineComponentDisable() const +{ + return d->kLineComponentDisable; +} + +QBrush GlobalDTConfig::kFontWhite() const +{ + return d->kFontWhite; +} + +QBrush GlobalDTConfig::kGrayAlpha11() const +{ + return d->kGrayAlpha11; +} + +QBrush GlobalDTConfig::kGray6() const +{ + return d->kGray6; +} + +QBrush GlobalDTConfig::kFontWhiteDisable() const +{ + return d->kFontWhiteDisable; +} + +QBrush GlobalDTConfig::kComponentDisable() const +{ + return d->kComponentDisable; +} + +QBrush GlobalDTConfig::kBlack() const +{ + return d->kBlack; +} + +QBrush GlobalDTConfig::kComponentAlphaDisable() const +{ + return d->kComponentAlphaDisable; +} + +QBrush GlobalDTConfig::kFontSecondaryDisable() const +{ + return d->kFontSecondaryDisable; +} + +QBrush GlobalDTConfig::kGrayAlpha8() const +{ + return d->kGrayAlpha8; +} + +QBrush GlobalDTConfig::kFontPrimaryDisable() const +{ + return d->kFontPrimaryDisable; +} + +QBrush GlobalDTConfig::kGray5() const +{ + return d->kGray5; +} + +QBrush GlobalDTConfig::kFontSecondary() const +{ + return d->kFontSecondary; +} + +QBrush GlobalDTConfig::kErrorNormal() const +{ + return d->kErrorNormal; +} + +QBrush GlobalDTConfig::kComponentHover() const +{ + return d->kComponentHover; +} + +QBrush GlobalDTConfig::kComponentAlphaHover() const +{ + return d->kComponentAlphaHover; +} + +QBrush GlobalDTConfig::kGrayAlpha3() const +{ + return d->kGrayAlpha3; +} + +QBrush GlobalDTConfig::kGray13() const +{ + return d->kGray13; +} + +QBrush GlobalDTConfig::kGray11() const +{ + return d->kGray11; +} + +QBrush GlobalDTConfig::kErrorHover() const +{ + return d->kErrorHover; +} + +QBrush GlobalDTConfig::kContainGeneralNormal() const +{ + return d->kContainGeneralNormal; +} + +QBrush GlobalDTConfig::kComponentAlphaNormal() const +{ + return d->kComponentAlphaNormal; +} + +QBrush GlobalDTConfig::kGray15() const +{ + return d->kGray15; +} + +QBrush GlobalDTConfig::kBrand7() const +{ + return d->kBrand7; +} + +QBrush GlobalDTConfig::kGrayAlpha7() const +{ + return d->kGrayAlpha7; +} + +QBrush GlobalDTConfig::kLineBrandHover() const +{ + return d->kLineBrandHover; +} + +QBrush GlobalDTConfig::kGrayAlpha13() const +{ + return d->kGrayAlpha13; +} + +QBrush GlobalDTConfig::kLineComponentHover() const +{ + return d->kLineComponentHover; +} + +QBrush GlobalDTConfig::kBrand6() const +{ + return d->kBrand6; +} + +QBrush GlobalDTConfig::kGray17() const +{ + return d->kGray17; +} + +QBrush GlobalDTConfig::kComponentClick() const +{ + return d->kComponentClick; +} + +QBrush GlobalDTConfig::kBrandClick() const +{ + return d->kBrandClick; +} + +QBrush GlobalDTConfig::kFontStrong() const +{ + return d->kFontStrong; +} + +QBrush GlobalDTConfig::kLineWindow() const +{ + return d->kLineWindow; +} + +QBrush GlobalDTConfig::kGray2() const +{ + return d->kGray2; +} + +QBrush GlobalDTConfig::kBrand4() const +{ + return d->kBrand4; +} + +QBrush GlobalDTConfig::kContainSecondaryNormal() const +{ + return d->kContainSecondaryNormal; +} + +QBrush GlobalDTConfig::kBrandHover() const +{ + return d->kBrandHover; +} + +QBrush GlobalDTConfig::kFontPrimary() const +{ + return d->kFontPrimary; +} + +QBrush GlobalDTConfig::kBrandNormal() const +{ + return d->kBrandNormal; +} + +int GlobalDTConfig::normalline() const +{ + return d->normalline; +} + +int GlobalDTConfig::focusline() const +{ + return d->focusline; +} + +int GlobalDTConfig::tokenGap4() const +{ + return d->tokenGap4; +} + +int GlobalDTConfig::tokenGap8() const +{ + return d->tokenGap8; +} + +int GlobalDTConfig::tokenGap16() const +{ + return d->tokenGap16; +} + +int GlobalDTConfig::tokenGap24() const +{ + return d->tokenGap24; +} + +int GlobalDTConfig::tokenGap40() const +{ + return d->tokenGap40; +} + +int GlobalDTConfig::kradiusMin() const +{ + return d->kradiusMin; +} + +int GlobalDTConfig::kradiusMenu() const +{ + return d->kradiusMenu; +} + +int GlobalDTConfig::kradiusNormal() const +{ + return d->kradiusNormal; +} + +int GlobalDTConfig::kradiusWindow() const +{ + return d->kradiusWindow; +} + + diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/readconfig.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/readconfig.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/readconfig.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/readconfig.h 2024-12-20 09:22:49.000000000 +0800 @@ -1,7 +1,7 @@ /* * Qt5-UKUI's Library * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. + * Copyright (C) 2023, KylinSoft Co., Ltd. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this library. If not, see <https://www.gnu.org/licenses/>. * - * Authors: Yue Lan <lanyue@kylinos.cn> + * Authors: Jing Tan <tanjing@kylinos.cn> * */ @@ -24,196 +24,555 @@ #define READCONFIG_H #include <QObject> -#include <QSettings> #include <QColor> -#include <QJsonDocument> -#include <QJsonObject> #include <QPalette> -#include "themeinformation.h" +#include <QtQuick/QQuickItem> +#include <QMetaType> -//#define UKUIStyle_Debug -//#define UKUIStyle_Warning +namespace UKUIGlobalDTConfig { -class Debug +class GlobalDTConfigPrivate { - public: + explicit GlobalDTConfigPrivate(); + ~GlobalDTConfigPrivate(); -template<typename T> - -Debug & operator <<(const T&){return *this;} - -}; -inline Debug debug(){return Debug();} - - -#ifdef UKUIStyle_Debug - -# define cDebug qDebug() << "UKUIStyle input:" - -#else - -# define cDebug Debug() - -#endif - -class Warning - -{ - -public: - -template<typename T> - -Warning & operator <<(const T&){return *this;} - -}; -inline Warning warning(){return Warning();} - -#ifdef UKUIStyle_Warning - -# define cWarning qWarning() << "UKUIStyle input:" - -#else - -# define cWarning Warning() - -#endif - - -class ReadConfig : public QObject -{ - Q_OBJECT - -public: - ReadConfig(const QString &cfg); - ~ReadConfig(); + inline bool getColorValue(QBrush &dtBrush, const QString key); + inline bool getValue(int &value, const QString key) const; + inline QColor stringToColor(QString s) const; + inline QColor mixColor(QList<QColor> colorList); + inline QColor composeColor(QColor foreColor, QColor backColor); bool load(const QString &cfg); + void initUKUIGlobalThemeParameters(); - QVariant getValue(const QString key_1, const QString key_2 = "", const QString key_3 = "", const QString key_4 = "", const QString key_5 = "") const; - - QVariant getValue(const QString key, QJsonObject obj) const; - - QJsonObject getJsonObjectValue(const QString key, QJsonObject obj) const; - - bool getColorValue(QColor &color, const QString key_1, const QString key_2 = "", const QString key_3 = "", const QString key_4 = "", const QString key_5 = "") const; - - bool getColorValue(QBrush &brush, const QString key_1, const QString key_2 = "", const QString key_3 = "", const QString key_4 = "", const QString key_5 = "") const; - bool getGradientValue(QList<QColor> &cl, const QString key_1, const QString key_2 = "", const QString key_3 = "", const QString key_4 = "", const QString key_5 = "") const; + //qt palette + QBrush windowTextActive ; + QBrush windowTextInactive ; + QBrush windowTextDisable ; + QBrush buttonActive ; + QBrush buttonInactive ; + QBrush buttonDisable ; + QBrush lightActive ; + QBrush lightInactive ; + QBrush lightDisable ; + QBrush midlightActive ; + QBrush midlightInactive ; + QBrush midlightDisable ; + QBrush darkActive ; + QBrush darkInactive ; + QBrush darkDisable ; + QBrush midActive ; + QBrush midInactive ; + QBrush midDisable ; + QBrush textActive ; + QBrush textInactive ; + QBrush textDisable ; + QBrush brightTextActive ; + QBrush brightTextInactive ; + QBrush brightTextDisable ; + QBrush buttonTextActive ; + QBrush buttonTextInactive ; + QBrush buttonTextDisable ; + QBrush baseActive ; + QBrush baseInactive ; + QBrush baseDisable ; + QBrush windowActive ; + QBrush windowInactive ; + QBrush windowDisable ; + QBrush shadowActive ; + QBrush shadowInactive ; + QBrush shadowDisable ; + QBrush highLightActive ; + QBrush highLightInactive ; + QBrush highLightDisable ; + QBrush highLightedTextActive ; + QBrush highLightedTextInactive ; + QBrush highLightedTextDisable ; + QBrush linkActive ; + QBrush linkInactive ; + QBrush linkDisable ; + QBrush linkVisitedActive ; + QBrush linkVisitedInactive ; + QBrush linkVisitedDisable ; + QBrush alternateBaseActive ; + QBrush alternateBaseInactive ; + QBrush alternateBaseDisable ; + QBrush noRoleActive ; + QBrush noRoleInactive ; + QBrush noRoleDisable ; + QBrush toolTipBaseActive ; + QBrush toolTipBaseInactive ; + QBrush toolTipBaseDisable ; + QBrush toolTipTextActive ; + QBrush toolTipTextInactive ; + QBrush toolTipTextDisable ; + QBrush placeholderTextActive ; + QBrush placeholderTextInactive ; + QBrush placeholderTextDisable ; + + //custom palette + QBrush kComponentNormal ; + QBrush kLineBrandDisable ; + QBrush kFontWhiteSecondary ; + QBrush kGray12 ; + QBrush kContainSecondaryAlpphaNormal ; + QBrush kGray16 ; + QBrush kBrand1 ; + QBrush kLineComponentNormal ; + QBrush kLineBrandClick ; + QBrush kGray3 ; + QBrush kGray0 ; + QBrush kLineDisable ; + QBrush kGrayAlpha2 ; + QBrush kGrayAlpha0 ; + QBrush kBrand2 ; + QBrush kLineNormal ; + QBrush kGrayAlpha5 ; + QBrush kGrayAlpha12 ; + QBrush kErrorClick ; + QBrush kLineWindowActive ; + QBrush kComponentAlphaClick ; + QBrush kBrand3 ; + QBrush kSuccessNormal ; + QBrush kGrayAlpha1 ; + QBrush kFontWhiteSecondaryDisable ; + QBrush kGray4 ; + QBrush kContainClick ; + QBrush kGray8 ; + QBrush kGrayAlpha4 ; + QBrush kModalmask ; + QBrush kLineBrandNormal ; + QBrush kBrand5 ; + QBrush kGray10 ; + QBrush kWarningNormal ; + QBrush kGray9 ; + QBrush kGray1 ; + QBrush kGray14 ; + QBrush kLineComponentClick ; + QBrush kWhite ; + QBrush kGray7 ; + QBrush kBrandFocus ; + QBrush kGrayAlpha9 ; + QBrush kGrayAlpha10 ; + QBrush kGrayAlpha6 ; + QBrush kContainHover ; + QBrush kLineComponentDisable ; + QBrush kFontWhite ; + QBrush kGrayAlpha11 ; + QBrush kGray6 ; + QBrush kFontWhiteDisable ; + QBrush kComponentDisable ; + QBrush kBlack ; + QBrush kComponentAlphaDisable ; + QBrush kFontSecondaryDisable ; + QBrush kGrayAlpha8 ; + QBrush kFontPrimaryDisable ; + QBrush kGray5 ; + QBrush kFontSecondary ; + QBrush kErrorNormal ; + QBrush kComponentHover ; + QBrush kComponentAlphaHover ; + QBrush kGrayAlpha3 ; + QBrush kGray13 ; + QBrush kGray11 ; + QBrush kErrorHover ; + QBrush kContainGeneralNormal ; + QBrush kComponentAlphaNormal ; + QBrush kGray15 ; + QBrush kBrand7 ; + QBrush kGrayAlpha7 ; + QBrush kLineBrandHover ; + QBrush kGrayAlpha13 ; + QBrush kLineComponentHover ; + QBrush kBrand6 ; + QBrush kGray17 ; + QBrush kComponentClick ; + QBrush kBrandClick ; + QBrush kFontStrong ; + QBrush kLineWindow ; + QBrush kGray2 ; + QBrush kBrand4 ; + QBrush kContainSecondaryNormal ; + QBrush kBrandHover ; + QBrush kFontPrimary ; + QBrush kBrandNormal ; + + //line and margin + int normalline = 1; + int focusline = 2; + int tokenGap4 = 4; + int tokenGap8 = 8; + int tokenGap16 = 16; + int tokenGap24 = 40; + int tokenGap40 = 24; + + //radius + int kradiusMin = 4; + int kradiusMenu = 8; + int kradiusNormal = 6; + int kradiusWindow = 12; - QString getType(const QString key_1, const QString key_2 = "", const QString key_3 = "", const QString key_4 = "", const QString key_5 = "") const; - - QColor stringToColor(QString s) const; - - QColor stringToPaletteColor(QString s) const; - - void stringToGradient(QList<QColor> &cl, QString s) const; - - bool setValue(QString key, QVariant value); - - void widgetPalette(const QPalette platte); -private: - QJsonObject m_cfgJsonObj; + bool m_ukui_dt_loadConfig = false; QString m_cfgPath; - QPalette m_platte; + QString m_widgetThemeName = "default"; + QString m_lightMode = "light"; + QString m_ukui_dt_path; + QString m_dt_configData; }; -class ReadThemeConfig : public QObject +class GlobalDTConfig : public QObject { Q_OBJECT -public: - ReadThemeConfig(QString colorCfgPath, bool isDark = true); - ~ReadThemeConfig(); - - UKUIColorTheme::PaletteColorCfg paletteColorCfg(); - - UKUIColorTheme::ButtonColorCfg buttonColorCfg(const QPalette palette, QString property = C_Button_DefaultPushButton); - - UKUIColorTheme::ToolButtonColorCfg toolButtonColorCfg(const QPalette palette, QString property = C_Button_DefaultToolButton); - - UKUIColorTheme::CheckBoxColorCfg checkBoxColorCfg(const QPalette palette, QString property = C_CheckBox_Default); - - UKUIColorTheme::RadioButtonColorCfg radioButtonColorCfg(const QPalette palette, QString property = C_RadioButton_Default); - - UKUIColorTheme::LineEditColorCfg lineEditColorCfg(const QPalette palette, QString property = C_LineEdit_Default); - - UKUIColorTheme::ComboBoxColorCfg comboBoxColorCfg(const QPalette palette, QString property = C_ComboBox_Default); - - UKUIColorTheme::SpinBoxColorCfg spinBoxColorCfg(const QPalette palette, QString property = C_SpinBox_Default, QString layout = C_SpinBox_DefaultLayout); - - UKUIColorTheme::TableColorCfg tableColorCfg(const QPalette palette, QString property = C_Table_Default); - - UKUIColorTheme::ListViewColorCfg listViewColorCfg(const QPalette palette, QString property = C_ListView_Default); - UKUIColorTheme::TreeViewColorCfg treeViewColorCfg(const QPalette palette, QString property = C_TreeView_Default); + //QT palette + Q_PROPERTY(QBrush windowTextActive READ windowTextActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush windowTextInactive READ windowTextInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush windowTextDisable READ windowTextDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush buttonActive READ buttonActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush buttonInactive READ buttonInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush buttonDisable READ buttonDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush lightActive READ lightActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush lightInactive READ lightInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush lightDisable READ lightDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush midlightActive READ midlightActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush midlightInactive READ midlightInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush midlightDisable READ midlightDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush darkActive READ darkActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush darkInactive READ darkInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush darkDisable READ darkDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush midActive READ midActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush midInactive READ midInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush midDisable READ midDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush textActive READ textActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush textInactive READ textInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush textDisable READ textDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush brightTextActive READ brightTextActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush brightTextInactive READ brightTextInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush brightTextDisable READ brightTextDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush buttonTextActive READ buttonTextActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush buttonTextInactive READ buttonTextInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush buttonTextDisable READ buttonTextDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush baseActive READ baseActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush baseInactive READ baseInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush baseDisable READ baseDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush windowActive READ windowActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush windowInactive READ windowInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush windowDisable READ windowDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush shadowActive READ shadowActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush shadowInactive READ shadowInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush shadowDisable READ shadowDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush highLightActive READ highLightActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush highLightInactive READ highLightInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush highLightDisable READ highLightDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush highLightedTextActive READ highLightedTextActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush highLightedTextInactive READ highLightedTextInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush highLightedTextDisable READ highLightedTextDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush linkActive READ linkActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush linkInactive READ linkInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush linkDisable READ linkDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush linkVisitedActive READ linkVisitedActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush linkVisitedInactive READ linkVisitedInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush linkVisitedDisable READ linkVisitedDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush alternateBaseActive READ alternateBaseActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush alternateBaseInactive READ alternateBaseInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush alternateBaseDisable READ alternateBaseDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush noRoleActive READ noRoleActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush noRoleInactive READ noRoleInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush noRoleDisable READ noRoleDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush toolTipBaseActive READ toolTipBaseActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush toolTipBaseInactive READ toolTipBaseInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush toolTipBaseDisable READ toolTipBaseDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush toolTipTextActive READ toolTipTextActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush toolTipTextInactive READ toolTipTextInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush toolTipTextDisable READ toolTipTextDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush placeholderTextActive READ placeholderTextActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush placeholderTextInactive READ placeholderTextInactive NOTIFY tokenChanged) + Q_PROPERTY(QBrush placeholderTextDisable READ placeholderTextDisable NOTIFY tokenChanged) + + //custom palette + Q_PROPERTY(QBrush kBlack READ kBlack NOTIFY tokenChanged) + Q_PROPERTY(QBrush kBrand1 READ kBrand1 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kBrand2 READ kBrand2 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kBrand3 READ kBrand3 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kBrand4 READ kBrand4 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kBrand5 READ kBrand5 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kBrand6 READ kBrand6 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kBrand7 READ kBrand7 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kBrandClick READ kBrandClick NOTIFY tokenChanged) + Q_PROPERTY(QBrush kBrandFocus READ kBrandFocus NOTIFY tokenChanged) + Q_PROPERTY(QBrush kBrandHover READ kBrandHover NOTIFY tokenChanged) + Q_PROPERTY(QBrush kBrandNormal READ kBrandNormal NOTIFY tokenChanged) + Q_PROPERTY(QBrush kComponentAlphaClick READ kComponentAlphaClick NOTIFY tokenChanged) + Q_PROPERTY(QBrush kComponentAlphaDisable READ kComponentAlphaDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush kComponentAlphaHover READ kComponentAlphaHover NOTIFY tokenChanged) + Q_PROPERTY(QBrush kComponentAlphaNormal READ kComponentAlphaNormal NOTIFY tokenChanged) + Q_PROPERTY(QBrush kComponentClick READ kComponentClick NOTIFY tokenChanged) + Q_PROPERTY(QBrush kComponentDisable READ kComponentDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush kComponentHover READ kComponentHover NOTIFY tokenChanged) + Q_PROPERTY(QBrush kComponentNormal READ kComponentNormal NOTIFY tokenChanged) + Q_PROPERTY(QBrush kContainClick READ kContainClick NOTIFY tokenChanged) + Q_PROPERTY(QBrush kContainHover READ kContainHover NOTIFY tokenChanged) + Q_PROPERTY(QBrush kContainGeneralNormal READ kContainGeneralNormal NOTIFY tokenChanged) + Q_PROPERTY(QBrush kContainSecondaryAlpphaNormal READ kContainSecondaryAlpphaNormal NOTIFY tokenChanged) + Q_PROPERTY(QBrush kContainSecondaryNormal READ kContainSecondaryNormal NOTIFY tokenChanged) + Q_PROPERTY(QBrush kErrorClick READ kErrorClick NOTIFY tokenChanged) + Q_PROPERTY(QBrush kErrorHover READ kErrorHover NOTIFY tokenChanged) + Q_PROPERTY(QBrush kErrorNormal READ kErrorNormal NOTIFY tokenChanged) + Q_PROPERTY(QBrush kFontPrimary READ kFontPrimary NOTIFY tokenChanged) + Q_PROPERTY(QBrush kFontPrimaryDisable READ kFontPrimaryDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush kFontSecondary READ kFontSecondary NOTIFY tokenChanged) + Q_PROPERTY(QBrush kFontSecondaryDisable READ kFontSecondaryDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush kFontStrong READ kFontStrong NOTIFY tokenChanged) + Q_PROPERTY(QBrush kFontWhite READ kFontWhite NOTIFY tokenChanged) + Q_PROPERTY(QBrush kFontWhiteDisable READ kFontWhiteDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush kFontWhiteSecondary READ kFontWhiteSecondary NOTIFY tokenChanged) + Q_PROPERTY(QBrush kFontWhiteSecondaryDisable READ kFontWhiteSecondaryDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray0 READ kGray0 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray1 READ kGray1 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray2 READ kGray2 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray3 READ kGray3 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray4 READ kGray4 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray5 READ kGray5 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray6 READ kGray6 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray7 READ kGray7 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray8 READ kGray8 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray9 READ kGray9 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray10 READ kGray10 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray11 READ kGray11 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray12 READ kGray12 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray13 READ kGray13 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray14 READ kGray14 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray15 READ kGray15 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray16 READ kGray16 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGray17 READ kGray17 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGrayAlpha0 READ kGrayAlpha0 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGrayAlpha1 READ kGrayAlpha1 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGrayAlpha2 READ kGrayAlpha2 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGrayAlpha3 READ kGrayAlpha3 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGrayAlpha4 READ kGrayAlpha4 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGrayAlpha5 READ kGrayAlpha5 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGrayAlpha6 READ kGrayAlpha6 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGrayAlpha7 READ kGrayAlpha7 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGrayAlpha8 READ kGrayAlpha8 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGrayAlpha9 READ kGrayAlpha9 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGrayAlpha10 READ kGrayAlpha10 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGrayAlpha11 READ kGrayAlpha11 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGrayAlpha12 READ kGrayAlpha12 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kGrayAlpha13 READ kGrayAlpha13 NOTIFY tokenChanged) + Q_PROPERTY(QBrush kLineBrandClick READ kLineBrandClick NOTIFY tokenChanged) + Q_PROPERTY(QBrush kLineBrandDisable READ kLineBrandDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush kLineBrandHover READ kLineBrandHover NOTIFY tokenChanged) + Q_PROPERTY(QBrush kLineBrandNormal READ kLineBrandNormal NOTIFY tokenChanged) + Q_PROPERTY(QBrush kLineComponentClick READ kLineComponentClick NOTIFY tokenChanged) + Q_PROPERTY(QBrush kLineComponentDisable READ kLineComponentDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush kLineComponentHover READ kLineComponentHover NOTIFY tokenChanged) + Q_PROPERTY(QBrush kLineComponentNormal READ kLineComponentNormal NOTIFY tokenChanged) + Q_PROPERTY(QBrush kLineDisable READ kLineDisable NOTIFY tokenChanged) + Q_PROPERTY(QBrush kLineNormal READ kLineNormal NOTIFY tokenChanged) + Q_PROPERTY(QBrush kLineWindow READ kLineWindow NOTIFY tokenChanged) + Q_PROPERTY(QBrush kLineWindowActive READ kLineWindowActive NOTIFY tokenChanged) + Q_PROPERTY(QBrush kModalmask READ kModalmask NOTIFY tokenChanged) + Q_PROPERTY(QBrush kSuccessNormal READ kSuccessNormal NOTIFY tokenChanged) + Q_PROPERTY(QBrush kWarningNormal READ kWarningNormal NOTIFY tokenChanged) + Q_PROPERTY(QBrush kWhite READ kWhite NOTIFY tokenChanged) + + //line and margin + Q_PROPERTY(int normalline READ normalline NOTIFY tokenChanged) + Q_PROPERTY(int focusline READ focusline NOTIFY tokenChanged) + Q_PROPERTY(int tokenGap4 READ tokenGap4 NOTIFY tokenChanged) + Q_PROPERTY(int tokenGap8 READ tokenGap8 NOTIFY tokenChanged) + Q_PROPERTY(int tokenGap16 READ tokenGap16 NOTIFY tokenChanged) + Q_PROPERTY(int tokenGap24 READ tokenGap24 NOTIFY tokenChanged) + Q_PROPERTY(int tokenGap40 READ tokenGap40 NOTIFY tokenChanged) + + //radius + Q_PROPERTY(int kradiusMin READ kradiusMin NOTIFY tokenChanged) + Q_PROPERTY(int kradiusMenu READ kradiusMenu NOTIFY tokenChanged) + Q_PROPERTY(int kradiusNormal READ kradiusNormal NOTIFY tokenChanged) + Q_PROPERTY(int kradiusWindow READ kradiusWindow NOTIFY tokenChanged) - UKUIColorTheme::SliderBarColorCfg sliderBarColorCfg(const QPalette palette, QString property = C_SliderBar_Default); - - UKUIColorTheme::ProgressBarColorCfg progressBarColorCfg(const QPalette palette, QString property = C_ProgressBar_Default); - - UKUIColorTheme::ToolTipColorCfg toolTipColorCfg(const QPalette palette, QString property = C_ToolTip_Default); - - UKUIColorTheme::ScrollBarColorCfg scrollBarColorCfg(const QPalette palette, QString property = C_ScrollBar_Default); - - UKUIColorTheme::TabWidgetColorCfg tabWidgetColorCfg(const QPalette palette, QString property = C_TabWidget_Default); - - UKUIColorTheme::MenuColorCfg menuColorCfg(QString property = C_Menu_Default); - - bool setRadius(QString key, int r); - - void getRadius(QString key, int &r); +public: + explicit GlobalDTConfig(); + ~GlobalDTConfig(); - UKUIRadiusInformation::UKUIRadiusStruct getRadiusStruct(QString key); + //QT palette + QBrush windowTextActive() const; + QBrush windowTextInactive() const; + QBrush windowTextDisable() const; + QBrush buttonActive() const; + QBrush buttonInactive() const; + QBrush buttonDisable() const; + QBrush lightActive() const; + QBrush lightInactive() const; + QBrush lightDisable() const; + QBrush midlightActive() const; + QBrush midlightInactive() const; + QBrush midlightDisable() const; + QBrush darkActive() const; + QBrush darkInactive() const; + QBrush darkDisable() const; + QBrush midActive() const; + QBrush midInactive() const; + QBrush midDisable() const; + QBrush textActive() const; + QBrush textInactive() const; + QBrush textDisable() const; + QBrush brightTextActive() const; + QBrush brightTextInactive() const; + QBrush brightTextDisable() const; + QBrush buttonTextActive() const; + QBrush buttonTextInactive() const; + QBrush buttonTextDisable() const; + QBrush baseActive() const; + QBrush baseInactive() const; + QBrush baseDisable() const; + QBrush windowActive() const; + QBrush windowInactive() const; + QBrush windowDisable() const; + QBrush shadowActive() const; + QBrush shadowInactive() const; + QBrush shadowDisable() const; + QBrush highLightActive() const; + QBrush highLightInactive() const; + QBrush highLightDisable() const; + QBrush highLightedTextActive() const; + QBrush highLightedTextInactive() const; + QBrush highLightedTextDisable() const; + QBrush linkActive() const; + QBrush linkInactive() const; + QBrush linkDisable() const; + QBrush linkVisitedActive() const; + QBrush linkVisitedInactive() const; + QBrush linkVisitedDisable() const; + QBrush alternateBaseActive() const; + QBrush alternateBaseInactive() const; + QBrush alternateBaseDisable() const; + QBrush noRoleActive() const; + QBrush noRoleInactive() const; + QBrush noRoleDisable() const; + QBrush toolTipBaseActive() const; + QBrush toolTipBaseInactive() const; + QBrush toolTipBaseDisable() const; + QBrush toolTipTextActive() const; + QBrush toolTipTextInactive() const; + QBrush toolTipTextDisable() const; + QBrush placeholderTextActive() const; + QBrush placeholderTextInactive() const; + QBrush placeholderTextDisable() const; + + //custompalette + QBrush kBlack() const; + QBrush kBrand1() const; + QBrush kBrand2() const; + QBrush kBrand3() const; + QBrush kBrand4() const; + QBrush kBrand5() const; + QBrush kBrand6() const; + QBrush kBrand7() const; + QBrush kBrandClick() const; + QBrush kBrandFocus() const; + QBrush kBrandHover() const; + QBrush kBrandNormal() const; + QBrush kComponentAlphaClick() const; + QBrush kComponentAlphaDisable() const; + QBrush kComponentAlphaHover() const; + QBrush kComponentAlphaNormal() const; + QBrush kComponentClick() const; + QBrush kComponentDisable() const; + QBrush kComponentHover() const; + QBrush kComponentNormal() const; + QBrush kContainClick() const; + QBrush kContainHover() const; + QBrush kContainGeneralNormal() const; + QBrush kContainSecondaryAlpphaNormal() const; + QBrush kContainSecondaryNormal() const; + QBrush kErrorClick() const; + QBrush kErrorHover() const; + QBrush kErrorNormal() const; + QBrush kFontPrimary() const; + QBrush kFontPrimaryDisable() const; + QBrush kFontSecondary() const; + QBrush kFontSecondaryDisable() const; + QBrush kFontStrong() const; + QBrush kFontWhite() const; + QBrush kFontWhiteDisable() const; + QBrush kFontWhiteSecondary() const; + QBrush kFontWhiteSecondaryDisable() const; + QBrush kGray0() const; + QBrush kGray1() const; + QBrush kGray2() const; + QBrush kGray3() const; + QBrush kGray4() const; + QBrush kGray5() const; + QBrush kGray6() const; + QBrush kGray7() const; + QBrush kGray8() const; + QBrush kGray9() const; + QBrush kGray10() const; + QBrush kGray11() const; + QBrush kGray12() const; + QBrush kGray13() const; + QBrush kGray14() const; + QBrush kGray15() const; + QBrush kGray16() const; + QBrush kGray17() const; + QBrush kGrayAlpha0() const; + QBrush kGrayAlpha1() const; + QBrush kGrayAlpha2() const; + QBrush kGrayAlpha3() const; + QBrush kGrayAlpha4() const; + QBrush kGrayAlpha5() const; + QBrush kGrayAlpha6() const; + QBrush kGrayAlpha7() const; + QBrush kGrayAlpha8() const; + QBrush kGrayAlpha9() const; + QBrush kGrayAlpha10() const; + QBrush kGrayAlpha11() const; + QBrush kGrayAlpha12() const; + QBrush kGrayAlpha13() const; + QBrush kLineBrandClick() const; + QBrush kLineBrandDisable() const; + QBrush kLineBrandHover() const; + QBrush kLineBrandNormal() const; + QBrush kLineComponentClick() const; + QBrush kLineComponentDisable() const; + QBrush kLineComponentHover() const; + QBrush kLineComponentNormal() const; + QBrush kLineDisable() const; + QBrush kLineNormal() const; + QBrush kLineWindow() const; + QBrush kLineWindowActive() const; + QBrush kModalmask() const; + QBrush kSuccessNormal() const; + QBrush kWarningNormal() const; + QBrush kWhite() const; + + //line and margin + int normalline() const; + int focusline() const; + int tokenGap4() const; + int tokenGap8() const; + int tokenGap16() const; + int tokenGap24() const; + int tokenGap40() const; + + //radius + int kradiusMin() const; + int kradiusMenu() const; + int kradiusNormal() const; + int kradiusWindow() const; - QString getColorValueAdjustRules(); +Q_SIGNALS: + void tokenChanged(); private: - QString m_colorCfgPath; - bool m_themeIsDark = false; - UKUIColorTheme::PaletteColorCfg m_paletteColorCfg ; - UKUIColorTheme::ButtonColorCfg m_buttonColorCfg ; - UKUIColorTheme::ToolButtonColorCfg m_toolButtonColorCfg ; - UKUIColorTheme::CheckBoxColorCfg m_checkBoxColorCfg ; - UKUIColorTheme::RadioButtonColorCfg m_radioButtonColorCfg ; - UKUIColorTheme::LineEditColorCfg m_lineEditColorCfg ; - UKUIColorTheme::ComboBoxColorCfg m_comboBoxColorCfg ; - UKUIColorTheme::SpinBoxColorCfg m_spinBoxColorCfg ; - UKUIColorTheme::TableColorCfg m_tableColorCfg ; - UKUIColorTheme::ListViewColorCfg m_listViewColorCfg ; - UKUIColorTheme::TreeViewColorCfg m_treeViewColorCfg ; - UKUIColorTheme::SliderBarColorCfg m_sliderBarColorCfg ; - UKUIColorTheme::ProgressBarColorCfg m_progressBarColorCfg ; - UKUIColorTheme::ToolTipColorCfg m_toolTipColorCfg ; - UKUIColorTheme::ScrollBarColorCfg m_scrollBarColorCfg ; - UKUIColorTheme::TabWidgetColorCfg m_tabWidgetColorCfg ; - UKUIColorTheme::MenuColorCfg m_menuColorCfg ; - - UKUIRadiusInformation::UKUIRadiusStruct m_radiusStruct; - - ReadConfig *m_readConfig = nullptr; - - QString m_theme = ""; - bool m_loadConfig = false; + GlobalDTConfigPrivate *d {nullptr}; }; -/* -class RadiusConfig : public QObject{ - Q_OBJECT -public: - RadiusConfig(QString cfgPath); - ~RadiusConfig(); - - bool setRadius(QString key, int r); - void getRadius(QString key, int &r); +} -private: - QString m_cfgPath = ""; - ReadConfig *m_readConfig = nullptr; - bool m_loadConfig = false; -}; -*/ #endif // READCONFIG_H diff -Nru qt5-ukui-platformtheme-4.1.0.0/ukui-styles/themeinformation.h qt5-ukui-platformtheme-4.10.0.1/ukui-styles/themeinformation.h --- qt5-ukui-platformtheme-4.1.0.0/ukui-styles/themeinformation.h 2023-08-25 11:24:16.000000000 +0800 +++ qt5-ukui-platformtheme-4.10.0.1/ukui-styles/themeinformation.h 1970-01-01 08:00:00.000000000 +0800 @@ -1,799 +0,0 @@ -/* - * Qt5-UKUI's Library - * - * Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * - * Authors: Yue Lan <lanyue@kylinos.cn> - * - */ - -#ifndef THEMEINFORMATION_H -#define THEMEINFORMATION_H - -#include <QObject> -#include <QSettings> -#include <QColor> -#include <QBrush> -#include <QPen> - -#define ConfigUserPath "/usr/share/qt5-ukui-platformtheme/themeconfig/" -#define ColorPath "/usr/share/qt5-ukui-platformtheme/themeconfig/" -#define UsrRadiusPath "/usr/share/qt5-ukui-platformtheme/themeconfig/" -#define HomeCFGColorPath "/.config/qt5-ukui-platformthemem/themeconfig/" - -#define Obj_Value "value" -#define Obj_Type "type" -#define Obj_Color_Type "color" -#define Obj_Gradient_Type "gradient" -#define Obj_Int_Type "int" -#define Obj_PaletteRole_Type "paletterole" - -#define UKUI_Radius "Radius" -#define Max_Radius "Max_Radius" -#define Normal_Radius "Normal_Radius" -#define Min_Radius "Min_Radius" - -#define UKUIDarkTheme "DarkTheme" -#define UKUILightTheme "LightTheme" -#define UKUIPalette "Palette" -#define ColorAdjustRules "ColorAdjustRules" - -#define UKUIPushButton "PushButton" -#define C_Button_DefaultPushButton "DefaultPushButton" -#define C_Button_WindowCloseButton "WindowCloseButton" -#define C_Button_WindowButton "WindowButton" -#define C_Button_UseButtonPalette "UseButtonPalette" -#define C_Button_ImportButton "ImportButton" -#define C_Button_TranslucentButton "TranslucentButton" -#define C_Button_DefaultBrush "DefaultBrush" -#define C_Button_HoverBrush "HoverBrush" -#define C_Button_DefaultPen "DefaultPen" -#define C_Button_HoverPen "HoverPen" -#define C_Button_ClickPen "ClickPen" -#define C_Button_DisablePen "DisablePen" -#define C_Button_CheckPen "CheckPen" -#define C_Button_CheckHoverPen "CheckHoverPen" -#define C_Button_CheckClickPen "CheckClickPen" -#define C_Button_CheckDisablePen "CheckDisablePen" -#define C_Button_FocusPen "FocusPen" -#define C_Button_TextColor "TextColor" -#define C_Button_TextHoverColor "TextHoverColor" - -#define C_Button_ClickBrush "ClickBrush" -#define C_Button_DisableBrush "DisableBrush" -#define C_Button_FocusPenColor "FocusPenColor" - -#define UKUIToolButton "ToolButton" -#define C_Button_DefaultToolButton "DefaultToolButton" - -#define UKUICheckBox "CheckBox" -#define C_CheckBox_Default "DefaultCheckBox" -#define C_CheckBox_Translucent "TranslucentCheckBox" -#define C_CheckBox_DefaultPen "DefaultPen" -#define C_CheckBox_HoverPen "HoverPen" -#define C_CheckBox_ClickPen "ClickPen" -#define C_CheckBox_DisablePen "DisablePen" -#define C_CheckBox_OnDefaultPen "OnDefaultPen" -#define C_CheckBox_OnHoverPen "OnHoverPen" -#define C_CheckBox_OnClickPen "OnClickPen" -#define C_CheckBox_ContentPen "ContentPen" -#define C_CheckBox_DefaultBrush "DefaultBrush" -#define C_CheckBox_HoverBrush "HoverBrush" -#define C_CheckBox_ClickBrush "ClickBrush" -#define C_CheckBox_DisableBrush "DisableBrush" -#define C_CheckBox_OnDefaultBrush "OnDefaultBrush" -#define C_CheckBox_OnHoverBrush "OnHoverBrush" -#define C_CheckBox_OnClickBrush "OnClickBrush" -#define C_CheckBox_PathBrush "PathBrush" -#define C_CheckBox_PathDisableBrush "PathDisableBrush" - - -#define UKUIRadioButton "RadioButton" -#define C_RadioButton_Default "DefaultRadioButton" -#define C_RadioButton_Translucent "TranslucentRadioButton" -#define C_RadioButton_DefaultPen "DefaultPen" -#define C_RadioButton_HoverPen "HoverPen" -#define C_RadioButton_ClickPen "ClickPen" -#define C_RadioButton_DisablePen "DisablePen" -#define C_RadioButton_OnDefaultPen "OnDefaultPen" -#define C_RadioButton_OnHoverPen "OnHoverPen" -#define C_RadioButton_OnClickPen "OnClickPen" -#define C_RadioButton_DefaultBrush "DefaultBrush" -#define C_RadioButton_HoverBrush "HoverBrush" -#define C_RadioButton_ClickBrush "ClickBrush" -#define C_RadioButton_DisableBrush "DisableBrush" -#define C_RadioButton_OnDefaultBrush "OnDefaultBrush" -#define C_RadioButton_OnHoverBrush "OnHoverBrush" -#define C_RadioButton_OnClickBrush "OnClickBrush" -#define C_RadioButton_ChildrenOnDefaultBrush "ChildrenOnDefaultBrush" -#define C_RadioButton_ChildrenOnHoverBrush "ChildrenOnHoverBrush" -#define C_RadioButton_ChildrenOnClickBrush "ChildrenOnClickBrush" -#define C_RadioButton_ChildrenOnDisableBrush "ChildrenOnDisableBrush" - -#define UKUILineEdit "LineEdit" -#define C_LineEdit_Default "DefaultLineEdit" -#define C_LineEdit_Translucent "TranslucentLineEdit" -#define C_LineEdit_DefaultPen "DefaultPen" -#define C_LineEdit_HoverPen "HoverPen" -#define C_LineEdit_FocusPen "FocusPen" -#define C_LineEdit_DisablePen "DisablePen" -#define C_LineEdit_DefaultBrush "DefaultBrush" -#define C_LineEdit_HoverBrush "HoverBrush" -#define C_LineEdit_FocusBrush "FocusBrush" -#define C_LineEdit_DisableBrush "DisableBrush" - -#define UKUIComboBox "ComboBox" -#define C_ComboBox_Default "DefaultComboBox" -#define C_ComboBox_Translucent "TranslucentComboBox" -#define C_ComboBox_DefaultPen "DefaultPen" -#define C_ComboBox_HoverPen "HoverPen" -#define C_ComboBox_OnPen "OnPen" -#define C_ComboBox_EditPen "EditPen" -#define C_ComboBox_DisablePen "DisablePen" -#define C_ComboBox_DefaultBrush "DefaultBrush" -#define C_ComboBox_HoverBrush "HoverBrush" -#define C_ComboBox_OnBrush "OnBrush" -#define C_ComboBox_EditBrush "EditBrush" -#define C_ComboBox_DisableBrush "DisableBrush" - -#define UKUISpinBox "SpinBox" -#define C_SpinBox_Default "DefaultSpinBox" -#define C_SpinBox_Translucent "TranslucentSpinBox" -#define C_SpinBox_DefaultLayout "DefaultLayout" -#define C_SpinBox_HorizonLayout "HorizonLayout" -#define C_SpinBox_DefaultPen "DefaultPen" -#define C_SpinBox_HoverPen "HoverPen" -#define C_SpinBox_FocusPen "FocusPen" -#define C_SpinBox_DisablePen "DisablePen" -#define C_SpinBox_DefaultBrush "DefaultBrush" -#define C_SpinBox_HoverBrush "HoverBrush" -#define C_SpinBox_FocusBrush "FocusBrush" -#define C_SpinBox_DisableBrush "DisableBrush" -#define C_SpinBox_UpDefaultPen "UpDefaultPen" -#define C_SpinBox_UpHoverPen "UpHoverPen" -#define C_SpinBox_UpFocusPen "UpFocusPen" -#define C_SpinBox_UpClickPen "UpClickPen" -#define C_SpinBox_UpDisablePen "UpDisablePen" -#define C_SpinBox_UpHoverBrush "UpHoverBrush" -#define C_SpinBox_UpFocusHoverBrush "UpFocusHoverBrush" -#define C_SpinBox_UpClickBrush "UpClickBrush" -#define C_SpinBox_UpDefaultBrush "UpDefaultBrush" - -#define C_SpinBox_DownDefaultPen "DownDefaultPen" -#define C_SpinBox_DownHoverPen "DownHoverPen" -#define C_SpinBox_DownFocusPen "DownFocusPen" -#define C_SpinBox_DownClickPen "DownClickPen" -#define C_SpinBox_DownDisablePen "DownDisablePen" -#define C_SpinBox_DownHoverBrush "DownHoverBrush" -#define C_SpinBox_DownFocusHoverBrush "DownFocusHoverBrush" -#define C_SpinBox_DownClickBrush "DownClickBrush" -#define C_SpinBox_DownDefaultBrush "DownDefaultBrush" - -#define UKUITable "Table" -#define C_Table_Default "DefaultTable" -#define C_Table_DefaultBrush "DefaultBrush" -#define C_Table_HoverBrush "HoverBrush" -#define C_Table_SelectBrush "SelectBrush" -#define C_Table_DisableBrush "DisableBrush" -#define C_Table_HoverPen "HoverPen" -#define C_Table_SelectPen "SelectPen" -#define C_Table_TextHoverPen "TextHoverPen" -#define C_Table_TextSelectPen "TextSelectPen" - -#define UKUIListView "ListView" -#define C_ListView_Default "DefaultListView" -#define C_ListView_Translucent "TranslucentListView" -#define C_ListView_DefaultBrush "DefaultBrush" -#define C_ListView_HoverBrush "HoverBrush" -#define C_ListView_SelectBrush "SelectBrush" -#define C_ListView_DisableBrush "DisableBrush" -#define C_ListView_TextHoverPen "TextHoverPen" -#define C_ListView_TextSelectPen "TextSelectPen" -#define C_ListView_HoverPen "HoverPen" -#define C_ListView_SelectPen "SelectPen" - -#define UKUITreeView "TreeView" -#define C_TreeView_Default "DefaultTreeView" -#define C_TreeView_Translucent "TranslucentTreeView" -#define C_TreeView_DefaultBrush "DefaultBrush" -#define C_TreeView_HoverBrush "HoverBrush" -#define C_TreeView_SelectBrush "SelectBrush" -#define C_TreeView_DisableBrush "DisableBrush" -#define C_TreeView_BranchDefaultBrush "BranchDefaultBrush" -#define C_TreeView_BranchHoverBrush "BranchHoverBrush" -#define C_TreeView_BranchSelectBrush "BranchSelectBrush" -#define C_TreeView_BranchDisableBrush "BranchDisableBrush" -#define C_TreeView_TextHoverPen "TextHoverPen" -#define C_TreeView_TextSelectPen "TextSelectPen" -#define C_TreeView_HoverPen "HoverPen" -#define C_TreeView_SelectPen "SelectPen" -#define C_TreeView_BranchHoverPen "BranchHoverPen" -#define C_TreeView_BranchSelectPen "BranchSelectPen" - -#define UKUISliderBar "SliderBar" -#define C_SliderBar_Default "DefaultSliderBar" -#define C_SliderBar_Translucent "TranslucentSliderBar" -#define C_SliderBar_HandleDefaultBrush "HandleDefaultBrush" -#define C_SliderBar_HandleHoverBrush "HandleHoverBrush" -#define C_SliderBar_HandleClickBrush "HandleClickBrush" -#define C_SliderBar_HandleDisableBrush "HandleDisableBrush" -#define C_SliderBar_GrooveValueDefaultBrush "GrooveValueDefaultBrush" -#define C_SliderBar_GrooveValueHoverBrush "GrooveValueHoverBrush" -#define C_SliderBar_GrooveValueDisableBrush "GrooveValueDisableBrush" -#define C_SliderBar_GrooveUnvalueDefaultBrush "GrooveUnvalueDefaultBrush" -#define C_SliderBar_GrooveUnvalueHoverBrush "GrooveUnvalueHoverBrush" -#define C_SliderBar_GrooveUnvalueDisableBrush "GrooveUnvalueDisableBrush" -#define C_SliderBar_HandleDefaultPen "HandleDefaultPen" -#define C_SliderBar_HandleHoverPen "HandleHoverPen" -#define C_SliderBar_HandleClickPen "HandleClickPen" -#define C_SliderBar_HandleDisablePen "HandleDisablePen" -#define C_SliderBar_SliderGroovePen "SliderGroovePen" - -#define UKUIProgressBar "ProgressBar" -#define C_ProgressBar_Default "DefaultProgressBar" -#define C_ProgressBar_Translucent "TranslucentProgressBar" -#define C_ProgressBar_ContentStartColor "ContentStart" -#define C_ProgressBar_ContentEndColor "ContentEnd" -#define C_ProgressBar_ContentBrush "ContentBrush" -#define C_ProgressBar_GrooveDefaultBrush "GrooveDefaultBrush" -#define C_ProgressBar_GrooveDisableBrush "GrooveDisableBrush" -#define C_ProgressBar_ContentPen "ContentPen" -#define C_ProgressBar_GrooveDefaultPen "GrooveDefaultPen" -#define C_ProgressBar_GrooveDisablePen "GrooveDisablePen" - -#define UKUIToolTip "ToolTip" -#define C_ToolTip_Default "DefaultToolTip" -#define C_ToolTip_BackgroundBrush "BackgroundBrush" -#define C_ToolTip_BackgroundPen "BackgroundPen" - -#define UKUIScrollBar "ScrollBar" -#define C_ScrollBar_Default "DefaultScrollBar" -#define C_ScrollBar_Translucent "TranslucentScrollBar" -#define C_ScrollBar_GrooveDefaultBrush "GrooveDefaultBrush" -#define C_ScrollBar_GrooveInactiveBrush "GrooveInactiveBrush" -#define C_ScrollBar_SliderDefaultBrush "SliderDefaultBrush" -#define C_ScrollBar_SliderHoverBrush "SliderHoverBrush" -#define C_ScrollBar_SliderClickBrush "SliderClickBrush" -#define C_ScrollBar_SliderDisableBrush "SliderDisableBrush" - -#define UKUITabWidget "TabWidget" -#define C_TabWidget_Default "DefaultTabWidget" -#define C_TabWidget_WidgetBackgroundBrush "WidgetBackgroundBrush" -#define C_TabWidget_TabBarBackgroundBrush "TabBarBackgroundBrush" -#define C_TabWidget_TabBarDefaultBrush "TabBarDefaultBrush" -#define C_TabWidget_TabBarHoverBrush "TabBarHoverBrush" -#define C_TabWidget_TabBarSelectBrush "TabBarSelectBrush" -#define C_TabWidget_TabBarClickBrush "TabBarClickBrush" -#define C_TabWidget_TabBarHoverPen "TabBarHoverPen" -#define C_TabWidget_TabBarClickPen "TabBarClickPen" - - -#define UKUIMenu "Menu" -#define C_Menu_Default "DefaultMenu" -#define C_Menu_MenuBackgroundBrush "MenuBackgroundBrush" -#define C_Menu_MenuBackgroundPen "MenuBackgroundPen" -#define C_Menu_MenuItemSelectBrush "MenuItemSelectBrush" -#define C_Menu_MenuTextHoverPen "MenuTextHoverPen" - -#define c_windowText_at "WindowText_at" -#define c_windowText_iat "WindowText_iat" -#define c_windowText_dis "WindowText_dis" -#define c_button_at "Button_at" -#define c_button_iat "Button_iat" -#define c_button_dis "Button_dis" -#define c_light_at "Light_at" -#define c_light_iat "Light_iat" -#define c_light_dis "Light_dis" -#define c_midlight_at "Midlight_at" -#define c_midlight_iat "Midlight_iat" -#define c_midlight_dis "Midlight_dis" -#define c_dark_at "Dark_at" -#define c_dark_iat "Dark_iat" -#define c_dark_dis "Dark_dis" -#define c_mid_at "Mid_at" -#define c_mid_iat "Mid_iat" -#define c_mid_dis "Mid_dis" -#define c_text_at "Text_at" -#define c_text_iat "Text_iat" -#define c_text_dis "Text_dis" -#define c_brightText_at "BrightText_at" -#define c_brightText_iat "BrightText_iat" -#define c_brightText_dis "BrightText_dis" -#define c_buttonText_at "ButtonText_at" -#define c_buttonText_iat "ButtonText_iat" -#define c_buttonText_dis "ButtonText_dis" -#define c_base_at "Base_at" -#define c_base_iat "Base_iat" -#define c_base_dis "Base_dis" -#define c_window_at "Window_at" -#define c_window_iat "Window_iat" -#define c_window_dis "Window_dis" -#define c_shadow_at "Shadow_at" -#define c_shadow_iat "Shadow_iat" -#define c_shadow_dis "Shadow_dis" -#define c_highLight_at "HighLight_at" -#define c_highLight_iat "HighLight_iat" -#define c_highLight_dis "HighLight_dis" -#define c_highLightText_at "HighLightText_at" -#define c_highLightText_iat "HighLightText_iat" -#define c_highLightText_dis "HighLightText_dis" -#define c_link_at "Link_at" -#define c_link_iat "Link_iat" -#define c_link_dis "Link_dis" -#define c_linkVisited_at "LinkVisited_at" -#define c_linkVisited_iat "LinkVisited_iat" -#define c_linkVisited_dis "LinkVisited_dis" -#define c_alternateBase_at "AlternateBase_at" -#define c_alternateBase_iat "AlternateBase_iat" -#define c_alternateBase_dis "AlternateBase_dis" -#define c_noRole_at "NoRole_at" -#define c_noRole_iat "NoRole_iat" -#define c_noRole_dis "NoRole_dis" -#define c_toolTipBase_at "ToolTipBase_at" -#define c_toolTipBase_iat "ToolTipBase_iat" -#define c_toolTipBase_dis "ToolTipBase_dis" -#define c_toolTipText_at "ToolTipText_at" -#define c_toolTipText_iat "ToolTipText_iat" -#define c_toolTipText_dis "ToolTipText_dis" -#define c_placeholderText_at "PlaceholderText_at" -#define c_placeholderText_iat "PlaceholderText_iat" -#define c_placeholderText_dis "PlaceholderText_dis" - -namespace UKUIRadiusInformation { - -typedef struct UKUIRadiusStruct -{ - int maxRadius = 8; - int normalRadius = 6; - int minRadius = 4; -}UKUIRadiusStruct; -} - - -class UKUIPaletteRole : public QObject -{ - Q_OBJECT -public: - enum PaletteRole - { - WindowText_at = 0, - WindowText_iat, - WindowText_dis, - Button_at, - Button_iat, - Button_dis, - Light_at, - Light_iat, - Light_dis, - Midlight_at, - Midlight_iat, - Midlight_dis, - Dark_at, - Dark_iat, - Dark_dis, - Mid_at, - Mid_iat, - Mid_dis, - Text_at, - Text_iat, - Text_dis, - BrightText_at, - BrightText_iat, - BrightText_dis, - ButtonText_at, - ButtonText_iat, - ButtonText_dis, - Base_at, - Base_iat, - Base_dis, - Window_at, - Window_iat, - Window_dis, - Shadow_at, - Shadow_iat, - Shadow_dis, - HighLight_at, - HighLight_iat, - HighLight_dis, - HighLightText_at, - HighLightText_iat, - HighLightText_dis, - Link_at, - Link_iat, - Link_dis, - LinkVisited_at, - LinkVisited_iat, - LinkVisited_dis, - AlternateBase_at, - AlternateBase_iat, - AlternateBase_dis, - NoRole_at, - NoRole_iat, - NoRole_dis, - ToolTipBase_at, - ToolTipBase_iat, - ToolTipBase_dis, - ToolTipText_at, - ToolTipText_iat, - ToolTipText_dis, - PlaceholderText_at, - PlaceholderText_iat, - PlaceholderText_dis - }; - Q_ENUM(PaletteRole) - -}; - - -namespace UKUIColorTheme { -typedef struct PaletteColorStruct -{ - QColor windowText_at= QColor(38, 38, 38); - QColor windowText_iat= QColor(0, 0, 0, 255*0.55); - QColor windowText_dis= QColor(0, 0, 0, 255*0.3); - QColor button_at= QColor(230, 230, 230 ); - QColor button_iat= QColor(230, 230, 230); - QColor button_dis= QColor(233, 233, 233); - QColor light_at= QColor(255, 255, 255); - QColor light_iat= QColor(255, 255, 255); - QColor light_dis= QColor(242, 242, 242); - QColor midlight_at= QColor(218, 218, 218); - QColor midlight_iat= QColor(218, 218, 218); - QColor midlight_dis= QColor(230, 230, 230); - QColor dark_at= QColor(77, 77, 77); - QColor dark_iat= QColor(77, 77, 77); - QColor dark_dis= QColor(64, 64, 64); - QColor mid_at= QColor(115, 115, 115); - QColor mid_iat= QColor(115, 115, 115); - QColor mid_dis= QColor(102, 102, 102); - QColor text_at= QColor(38, 38, 38 ); - QColor text_iat= QColor(38, 38, 38); - QColor text_dis= QColor(0, 0, 0, 255 * 0.3 ); - QColor brightText_at= QColor(0, 0, 0); - QColor brightText_iat= QColor(0, 0, 0); - QColor brightText_dis= QColor(0, 0, 0); - QColor buttonText_at= QColor(38, 38, 38); - QColor buttonText_iat= QColor(38, 38, 38); - QColor buttonText_dis= QColor(179, 179, 179); - QColor base_at= QColor(255, 255, 255); - QColor base_iat= QColor(245, 245, 245); - QColor base_dis= QColor(237, 237, 237); - QColor window_at= QColor(245, 245, 245); - QColor window_iat= QColor(237, 237, 237); - QColor window_dis= QColor(230, 230, 230); - QColor shadow_at= QColor(0, 0, 0, 255 * 0.16); - QColor shadow_iat= QColor(0, 0, 0, 255 * 0.16); - QColor shadow_dis= QColor(0, 0, 0, 255 * 0.21); - QColor highLight_at= QColor(55, 144, 250); - QColor highLight_iat= QColor(55, 144, 250); - QColor highLight_dis= QColor(233, 233, 233 ); - QColor highLightText_at= QColor(255, 255, 255); - QColor highLightText_iat= QColor(255, 255, 255); - QColor highLightText_dis= QColor(179, 179, 179); - QColor link_at= QColor(55, 144, 250 ); - QColor link_iat= QColor(55, 144, 250 ); - QColor link_dis= QColor(55, 144, 250 ); - QColor linkVisited_at= QColor(114, 46, 209 ); - QColor linkVisited_iat= QColor(114, 46, 209 ); - QColor linkVisited_dis= QColor(114, 46, 209 ); - QColor alternateBase_at= QColor(245, 245, 245 ); - QColor alternateBase_iat= QColor(245, 245, 245 ); - QColor alternateBase_dis= QColor(245, 245, 245 ); - QColor noRole_at= QColor(240, 240, 240 ); - QColor noRole_iat= QColor(240, 240, 240 ); - QColor noRole_dis= QColor(217, 217, 217 ); - QColor toolTipBase_at= QColor(255, 255, 255 ); - QColor toolTipBase_iat= QColor(255, 255, 255 ); - QColor toolTipBase_dis= QColor(255, 255, 255 ); - QColor toolTipText_at= QColor(38, 38, 38 ); - QColor toolTipText_iat= QColor(38, 38, 38 ); - QColor toolTipText_dis= QColor(38, 38, 38 ); - QColor placeholderText_at= QColor(0, 0, 0, 255 * 0.35 ); - QColor placeholderText_iat= QColor(0, 0, 0, 255 * 0.35 ); - QColor placeholderText_dis= QColor(0, 0, 0, 255 * 0.3 ); -}PaletteColorCfg; - -typedef struct ButtonColorStruct -{ - QColor defaultBrush = QColor(230, 230, 230); - QColor hoverBrush = QColor(52, 137, 238); - QColor clickBrush = QColor(44, 115, 200); - QColor disableBrush = QColor(233, 233, 233); - - QColor defaultPen = Qt::NoPen; - QColor hoverPen = Qt::NoPen; - QColor clickPen = Qt::NoPen; - QColor disablePen = Qt::NoPen; - QColor focusPen = Qt::NoPen; - - QColor textColor = QColor(38, 38, 38); - QColor textHoverColor = QColor(38, 38, 38); - - QList<QColor> hoverGradientList; - QString hoverType = "color"; - -}ButtonColorCfg; - -typedef struct ToolButtonColorStruct -{ - QColor defaultBrush = QColor(230, 230, 230); - QColor hoverBrush = QColor(52, 137, 238); - QList<QColor> hoverGradientList; - QString hoverType = "color"; - QColor clickBrush = QColor(44, 115, 200); - QColor disableBrush = QColor(233, 233, 233); - - QColor defaultPen = Qt::NoPen; - QColor hoverPen = Qt::NoPen; - QColor clickPen = Qt::NoPen; - QColor disablePen = Qt::NoPen; - QColor focusPen = Qt::NoPen; - - QColor textColor = Qt::NoPen; - QColor textHoverColor = Qt::NoPen; - -}ToolButtonColorCfg; - -typedef struct CheckBoxColorStruct -{ - QColor defaultPen = QColor(166, 166, 166); - QColor hoverPen = QColor(166, 166, 166); - QColor clickPen = QColor(115, 115, 115); - QColor disablePen = QColor(166, 166, 166); - QColor onDefaultPen = QColor(0, 0, 0, 0.1); - QColor onHoverPen = QColor(0, 0, 0, 0.1); - QColor onClickPen = QColor(0, 0, 0, 0.1); - QColor contentPen = QColor(255, 255, 255); - QColor defaultBrush = QColor(255, 255, 255); - QColor hoverBrush = QColor(0, 0, 0, 0.05); - QColor clickBrush = QColor(0, 0, 0, 0.15); - QColor onDefaultBrush = QColor(55, 144, 250); - QColor onHoverBrush = QColor(52, 137, 238); - QColor onClickBrush = QColor(44, 115, 200); - QColor disableBrush = QColor(233, 233, 233); - QColor pathBrush = QColor(255, 255, 255); - QColor pathDisableBrush = QColor(179, 179, 179); - - QList<QColor> hoverGradientList; - QString hoverType = "color"; - QList<QColor> onHoverGradientList; - QString onHoverType = "color"; - QList<QColor> onClickGradientList; - QString onClickType = "color"; -}CheckBoxColorCfg; - -typedef struct RadioButtonColorStruct -{ - QColor defaultPen = QColor(166, 166, 166); - QColor hoverPen = QColor(166, 166, 166); - QColor clickPen = QColor(115, 115, 115); - QColor disablePen = QColor(166, 166, 166); - QColor onDefaultPen = QColor(0, 0, 0, 0.1 ); - QColor onHoverPen = QColor(0, 0, 0, 0.1 ); - QColor onClickPen = QColor(0, 0, 0, 0.1 ); - QColor defaultBrush = QColor(255, 255, 255); - QColor hoverBrush = QColor(0, 0, 0, 0.05); - QColor clickBrush = QColor(0, 0, 0, 0.15); - QColor disableBrush = QColor(55, 144, 250 ); - QColor onDefaultBrush = QColor(52, 137, 238 ); - QColor onHoverBrush = QColor(44, 115, 200 ); - QColor onClickBrush = QColor(233, 233, 233); - QColor childrenOnDefaultBrush = QColor(255, 255, 255); - QColor childrenOnHoverBrush = QColor(255, 255, 255); - QColor childrenOnClickBrush = QColor(230, 230, 230); - QColor childrenOnDisableBrush = QColor(179, 179, 179); - QList<QColor> onHoverGradientList; - QString onHoverType = "color"; -}RadioButtonColorCfg; - -typedef struct LineEditColorStruct -{ - QColor defaultPen = QColor(0, 0, 0, 0 ); - QColor hoverPen = QColor(0, 0, 0, 0 ); - QColor disablePen = QColor(0, 0, 0, 0 ); - QColor focusPen = QColor(55, 144, 250); - QColor defaultBrush = QColor(230, 230, 230); - QColor hoverBrush = QColor(216, 216, 216); - QColor focusBrush = QColor(255, 255, 255); - QColor disableBrush = QColor(233, 233, 233); - QList<QColor> hoverGradientList; - QString hoverType = "color"; -}LineEditColorCfg; - -typedef struct ComboBoxColorStruct -{ - QColor defaultPen = QColor(0, 0, 0, 0 ); - QColor hoverPen = QColor(0, 0, 0, 0 ); - QColor disablePen = QColor(0, 0, 0, 0 ); - QColor onPen = QColor(0, 0, 0, 0 ); - QColor editPen = QColor(44, 115, 200 ); - QColor defaultBrush = QColor(230, 230, 230); - QColor hoverBrush = QColor(216, 216, 216); - QColor onBrush = QColor(255, 255, 255); - QColor editBrush = QColor(255, 255, 255); - QColor disableBrush = QColor(233, 233, 233); -}ComboBoxColorCfg; - -typedef struct SpinBoxColorStruct -{ - QColor defaultPen = QColor(0, 0, 0, 0 ); - QColor hoverPen = QColor(0, 0, 0, 0 ); - QColor disablePen = QColor(0, 0, 0, 0 ); - QColor focusPen = QColor(55, 144, 250 ); - QColor defaultBrush = QColor(230, 230, 230); - QColor hoverBrush = QColor(216, 216, 216); - QColor focusBrush = QColor(216, 216, 216); - QColor disableBrush = QColor(233, 233, 233); - - QColor upDefaultPen = QColor(0, 0, 0, 0 ); - QColor upHoverPen = QColor(0, 0, 0, 0 ); - QColor upDisablePen = QColor(0, 0, 0, 0 ); - QColor upClickPen = QColor(0, 0, 0, 0 ); - QColor upFocusPen = QColor(0, 0, 0, 0 ); - QColor upHoverBrush = QColor(218, 218, 218); - QColor upFocusHoverBrush = QColor(218, 218, 218); - QColor upClickBrush = QColor(184, 184, 184); - QColor upDefaultBrush = QColor(230, 230, 230); - - QColor downDefaultPen = QColor(0, 0, 0, 0 ); - QColor downHoverPen = QColor(0, 0, 0, 0 ); - QColor downDisablePen = QColor(0, 0, 0, 0 ); - QColor downClickPen = QColor(0, 0, 0, 0 ); - QColor downFocusPen = QColor(0, 0, 0, 0 ); - QColor downHoverBrush = QColor(218, 218, 218); - QColor downFocusHoverBrush = QColor(218, 218, 218); - QColor downClickBrush = QColor(184, 184, 184); - QColor downDefaultBrush = QColor(230, 230, 230); - - QList<QColor> hoverGradientList; - QString hoverType = "color"; - QList<QColor> upHoverBrushGradientList; - QString upHoverBrushType = "color"; - QList<QColor> upFocusHoverBrushGradientList; - QString upFocusHoverBrushType = "color"; - QList<QColor> downHoverBrushGradientList; - QString downHoverBrushType = "color"; - QList<QColor> downFocusHoverBrushGradientList; - QString downFocusHoverBrushType = "color"; -}SpinBoxColorCfg; - -typedef struct TableColorStruct -{ - QColor defaultBrush = QColor(255, 255, 255, 0 ); - QColor hoverBrush = QColor(0, 0, 0, 0.05 ); - QColor selectBrush = QColor(55, 144, 250 ); - QColor disableBrush = QColor(255, 255, 255, 0 ); - QColor hoverPen = QColor(0, 0, 0, 0 ); - QColor selectPen = QColor(0, 0, 0, 0 ); - QColor textHoverPen = QColor(38, 38, 38 ); - QColor textSelectPen = QColor(255, 255, 255 ); - QList<QColor>